diff options
Diffstat (limited to '')
| -rw-r--r-- | src/parser.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp new file mode 100644 index 0000000..d9fd2d0 --- /dev/null +++ b/src/parser.cpp | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #include "parser.h" | ||
| 2 | #include "build.h" | ||
| 3 | |||
| 4 | Parser::Parser() | ||
| 5 | { | ||
| 6 | } | ||
| 7 | |||
| 8 | Parser::~Parser() | ||
| 9 | { | ||
| 10 | } | ||
| 11 | |||
| 12 | void Parser::error( YYLTYPE *locp, const char *msg ) | ||
| 13 | { | ||
| 14 | fflush( stdout ); | ||
| 15 | throw BuildException("%s: %d.%d-%d.%d: %s", | ||
| 16 | file.c_str(), | ||
| 17 | locp->first_line, locp->first_column, | ||
| 18 | locp->last_line, locp->last_column, | ||
| 19 | msg ); | ||
| 20 | } | ||
| 21 | |||
| 22 | void Parser::error( const std::string &msg ) | ||
| 23 | { | ||
| 24 | fflush( stdout ); | ||
| 25 | throw BuildException("%s", msg.c_str() ); | ||
| 26 | } | ||
| 27 | |||
