Add semantic passes
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
#define YY_USER_ACTION this->location.columns(yyleng);
|
||||
|
||||
#include <sstream>
|
||||
#include "parser.hpp"
|
||||
#include "parser.hh"
|
||||
|
||||
#undef YY_DECL
|
||||
#define YY_DECL yy::parser::symbol_type elna::source::lexer::lex()
|
||||
#define YY_DECL yy::parser::symbol_type elna::source::lexer::lex(elna::source::driver& driver)
|
||||
#define yyterminate() return yy::parser::make_YYEOF(this->location)
|
||||
%}
|
||||
|
||||
@@ -126,6 +126,6 @@ false {
|
||||
std::stringstream ss;
|
||||
|
||||
ss << "Illegal character 0x" << std::hex << static_cast<unsigned int>(yytext[0]);
|
||||
throw yy::parser::syntax_error(this->location, ss.str());
|
||||
driver.error(this->location, ss.str());
|
||||
}
|
||||
%%
|
||||
|
||||
Reference in New Issue
Block a user