mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
* data/c.m4 (b4_dirname): New.
(b4_syncline): Also output the location of its invocation (from the skeleton). (b4_user_action, b4_define_user_action, b4_user_actions) (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header) (b4_user_stype): New. * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
This commit is contained in:
15
data/glr.cc
15
data/glr.cc
@@ -90,8 +90,7 @@ m4_define([b4_yy_symbol_print_generate],
|
||||
|
||||
# Declare yyerror.
|
||||
m4_append([b4_post_prologue],
|
||||
[/* Line __line__ of glr.cc. */
|
||||
b4_syncline([@oline@], [@ofile@])
|
||||
[b4_syncline([@oline@], [@ofile@])
|
||||
|
||||
b4_c_ansi_function_decl([yyerror],
|
||||
[static void],
|
||||
@@ -102,8 +101,7 @@ b4_c_ansi_function_decl([yyerror],
|
||||
|
||||
# Define yyerror.
|
||||
m4_append([b4_epilogue],
|
||||
[/* Line __line__ of glr.cc. */
|
||||
b4_syncline([@oline@], [@ofile@])[
|
||||
[b4_syncline([@oline@], [@ofile@])[
|
||||
/*------------------.
|
||||
| Report an error. |
|
||||
`------------------*/
|
||||
@@ -237,10 +235,7 @@ namespace ]b4_namespace[
|
||||
|
||||
]m4_ifdef([b4_start_header],
|
||||
[[/* Copy the %start-header blocks. */
|
||||
]b4_start_header])[]dnl
|
||||
|
||||
[/* Line __line__ of glr.cc. */
|
||||
]b4_syncline([@oline@], [@ofile@])[
|
||||
]b4_user_start_header])[
|
||||
|
||||
#include "location.hh"
|
||||
|
||||
@@ -291,9 +286,7 @@ namespace ]b4_namespace[
|
||||
#ifndef YYSTYPE
|
||||
]m4_ifdef([b4_stype],
|
||||
[ union semantic_type
|
||||
b4_stype
|
||||
/* Line __line__ of lalr1.cc. */
|
||||
b4_syncline([@oline@], [@ofile@])
|
||||
b4_user_stype
|
||||
;],
|
||||
[ typedef int semantic_type;])[
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user