%define token.prefix.

Provide a means to add a prefix to the name of the tokens as output in the
generated files.  Because of name clashes, it is good to have such a
prefix such as TOK_ that protects from names such as EOF, FILE etc.
But it clutters the grammar itself.

	* data/bison.m4 (token.prefix): Empty by default.
	* data/c.m4 (b4_token_enum, b4_token_define): Use it.
	* data/lalr1.cc (b4_symbol): Ditto.
This commit is contained in:
Akim Demaille
2008-09-01 16:58:13 +02:00
parent 3204049e31
commit 5679f31101
4 changed files with 24 additions and 4 deletions

View File

@@ -542,6 +542,13 @@ m4_define([b4_percent_code_ifdef],
[$3])])
# Default values for %define.
# ---------------------------
# If the %token.prefix, it is empty.
m4_percent_define_default([[token.prefix]], [[]])
## ----------------------------------------------------------- ##
## After processing the skeletons, check that all the user's ##
## %define variables and %code qualifiers were used by Bison. ##