diff --git a/hcore/deviceManager/deviceSpecp.yy b/hcore/deviceManager/deviceSpecp.yy index 6027abc..3cc9bfd 100644 --- a/hcore/deviceManager/deviceSpecp.yy +++ b/hcore/deviceManager/deviceSpecp.yy @@ -25,13 +25,20 @@ #undef yylex #define yylex deviceSpecllex +#ifdef yytext +#undef yytext +#endif +#define yytext deviceSpecltext + // Declare the symbols that our lexer will export. int yylex(void); +extern char* yytext; // Declare yytext to access the current token text void yyerror(const char *message) { - throw std::runtime_error( + throw std::runtime_error( std::string("deviceSpec parser error: ") - + std::string(message)); + + std::string(message) + + " at token: " + std::string(yytext)); } %}