diff options
Diffstat (limited to 'util/epist/epist.y')
| -rw-r--r-- | util/epist/epist.y | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/util/epist/epist.y b/util/epist/epist.y index d187e96f..243e4168 100644 --- a/util/epist/epist.y +++ b/util/epist/epist.y @@ -9,7 +9,10 @@ #define YYPARSE_PARAM parser_obj #define YYSTYPE char* - + +extern int yylineno; +extern char *yytext; + extern "C" { int yylex(); int yywrap() { @@ -17,14 +20,15 @@ extern "C" { } } -void yyerror(const char *c) { - printf("ERROR: %s\n", c); +void yyerror(const char *c) +{ + printf("ERROR: %s, on line %d, near %s\n", c, yylineno, yytext); } - %} %token OBRACE EBRACE SEMICOLON DASH NUMBER QUOTES WORD BINDING OPTIONS TRUE FALSE +%expect 1 %% |
