summaryrefslogtreecommitdiff
path: root/util/epist/epist.y
diff options
context:
space:
mode:
Diffstat (limited to 'util/epist/epist.y')
-rw-r--r--util/epist/epist.y12
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
%%