diff options
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/lexer.l | 8 | ||||
-rw-r--r-- | grammar/parserif.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/grammar/lexer.l b/grammar/lexer.l index d56b4fc2..0c82a4af 100644 --- a/grammar/lexer.l +++ b/grammar/lexer.l @@ -75,7 +75,7 @@ struct bufstack { es_str_t *estr; } *currbs = NULL; -char *currfn; /* name of currently processed file */ +char *cnfcurrfn; /* name of currently processed file */ int popfile(void); int cnfSetLexFile(char *fname); @@ -220,7 +220,7 @@ cnfParseBuffer(char *buf, unsigned lenBuf) bs->bs = yy_scan_buffer(buf, lenBuf); bs->estr = NULL; currbs = bs; - currfn = bs->fn; + cnfcurrfn = bs->fn; yylineno = 1; done: return r; } @@ -259,7 +259,7 @@ cnfSetLexFile(char *fname) bs->bs = yy_scan_buffer((char*)es_getBufAddr(str), es_strlen(str)); bs->estr = str; /* needed so we can free it later */ currbs = bs; - currfn = bs->fn; + cnfcurrfn = bs->fn; yylineno = 1; done: @@ -294,6 +294,6 @@ popfile(void) yy_switch_to_buffer(currbs->bs); yylineno = currbs->lineno; - currfn = currbs->fn; + cnfcurrfn = currbs->fn; return 0; } diff --git a/grammar/parserif.h b/grammar/parserif.h index bebb1dfb..58b8fbdd 100644 --- a/grammar/parserif.h +++ b/grammar/parserif.h @@ -4,6 +4,7 @@ int cnfSetLexFile(char*); int yyparse(); int yydebug; +char *cnfcurrfn; void dbgprintf(char *fmt, ...) __attribute__((format(printf, 1, 2))); void parser_errmsg(char *fmt, ...) __attribute__((format(printf, 1, 2))); |