X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fepist.y;h=243e416877c5ca8f268efd198c68b2bb00c9d02d;hb=f1b9e2168d8c1b03b0fcf0b6dd70aa46c513059d;hp=d187e96f0c2f19c5da9222b46b0f83452df40813;hpb=483b8496d615dc1ed6934fb685b904ad6923b8a1;p=chaz%2Fopenbox 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 %%