Commit 998153bc by Andrew Dahl

Added Line Numbers in Error Output

parent 7efc4488
Showing with 2 additions and 3 deletions
......@@ -446,11 +446,10 @@ func_call_args: { $$ = NULL; }
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "lex.yy.c"
void hack_yyerror (char const *s)
{
fprintf (stderr, "%s\n", s);
fprintf (stderr, "Line %i: %s\n", yylineno, s);
yynerrs += 1;
}
#include "lex.yy.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment