If this error it's not a token, if it's an error handler then you could
redefine the yyerror function:

yyerror(message)
char *message;
{
        fprintf(stderr, "%s near '%s'\n", message, yytext);
        exit(1);
};

And everytime a syntactic error occurs it will display: kind_of_error 'near'
text before the error ocurred.
YACC and Bison includes so many usefull functions.
-- 
View this message in context: 
http://www.nabble.com/How-to-add-%22error%22-tf3556241.html#a10759771
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.



_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to