]> Dogcows Code - chaz/openbox/blobdiff - util/epist/epist.y
workaround for swig problem
[chaz/openbox] / util / epist / epist.y
index d187e96f0c2f19c5da9222b46b0f83452df40813..243e416877c5ca8f268efd198c68b2bb00c9d02d 100644 (file)
@@ -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
 
 %%
 
This page took 0.024232 seconds and 4 git commands to generate.