2006-10-16 Paolo Bonzini <bonzini@gnu.org>

* data/bison.m4 (b4_user_requires, b4_user_provides): New.
	(b4_user_start_header): Remove.
	* data/glr.c: Use new macros instead of b4_*start_header
	and b4_*end_header.
	* data/glr.cc: Likewise.
	* data/lalr1.cc: Likewise.
	* data/push.c: Likewise.
	* data/yacc.c: Likewise.

	* doc/bison.texinfo: Remove %before-header, rename
	%{start,end,after}-header to %requires, %provides, %code.

	* src/parse-gram.y: Likewise (also rename token names accordingly).
	* src/scan-gram.l: Likewise.
	* tests/actions.at: Likewise.
This commit is contained in:
Paolo Bonzini
2006-10-15 12:37:07 +00:00
parent 10f429ef19
commit 136a0f766b
13 changed files with 887 additions and 776 deletions

View File

@@ -43,9 +43,9 @@ dnl FIXME: This is wrong, we want computed header guards.
#ifndef PARSER_HEADER_H
# define PARSER_HEADER_H
]m4_ifdef([b4_start_header],
[[/* Copy the %start-header blocks. */
]b4_user_start_header])[
]m4_ifdef([b4_requires],
[[/* Copy the %requires blocks. */
]b4_user_requires])[
#include <string>
#include <iostream>
@@ -295,9 +295,9 @@ b4_error_verbose_if([, int tok])[);
# define YYSTYPE b4_namespace::b4_parser_class_name::semantic_type
#endif
])
m4_ifdef([b4_end_header],
[[/* Copy the %end-header blocks. */
]b4_end_header])[]dnl
m4_ifdef([b4_provides],
[[/* Copy the %provides blocks. */
]b4_user_provides])[]dnl
[#endif /* ! defined PARSER_HEADER_H */]
])dnl
@@ -310,7 +310,7 @@ m4_if(b4_prefix, [yy], [],
#define yylex b4_prefix[]lex])[
/* First part of user declarations. */
]b4_pre_prologue
]b4_user_pre_prologue
b4_defines_if([
#include @output_header_name@])[