aboutsummaryrefslogtreecommitdiffstats
path: root/tool/lrama/template/bison/yacc.c
diff options
context:
space:
mode:
Diffstat (limited to 'tool/lrama/template/bison/yacc.c')
-rw-r--r--tool/lrama/template/bison/yacc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/lrama/template/bison/yacc.c b/tool/lrama/template/bison/yacc.c
index 90ea228e22..0e17b46f25 100644
--- a/tool/lrama/template/bison/yacc.c
+++ b/tool/lrama/template/bison/yacc.c
@@ -69,11 +69,13 @@
<%# b4_user_pre_prologue -%>
+<%- if output.aux.prologue -%>
/* First part of user prologue. */
#line <%= output.aux.prologue_first_lineno %> "<%= output.grammar_file_path %>"
<%= output.aux.prologue %>
#line [@oline@] [@ofile@]
+<%- end -%>
<%# b4_cast_define -%>
# ifndef YY_CAST
@@ -1483,6 +1485,7 @@ YYLTYPE yylloc = yyloc_default;
<%# b4_declare_parser_state_variables -%>
/* Number of syntax errors so far. */
int yynerrs = 0;
+ YY_USE (yynerrs); /* Silence compiler warning. */
yy_state_fast_t yystate = 0;
/* Number of tokens to shift before error messages enabled. */
@@ -2043,7 +2046,9 @@ yyreturnlab:
}
<%# b4_percent_code_get([[epilogue]]) -%>
+<%- if output.aux.epilogue -%>
#line <%= output.aux.epilogue_first_lineno - 1 %> "<%= output.grammar_file_path %>"
<%= output.aux.epilogue -%>
+<%- end -%>