Rename token.prefix as api.tokens.prefix.

Discussed here.
http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.

	* NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
	* tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
	(token.prefix): Rename as...
	(api.tokens.prefix): this.
This commit is contained in:
Akim Demaille
2009-05-15 16:06:31 +02:00
parent 3c248d705d
commit 4c6622c2dd
10 changed files with 67 additions and 55 deletions

View File

@@ -199,7 +199,7 @@ AT_CHECK_VARIANTS([])
AT_CHECK_VARIANTS([%define parse.assert])
AT_CHECK_VARIANTS([[%define parse.assert %code {\n#define ONE_STAGE_BUILD\n}]])
AT_CHECK_VARIANTS([[%define parse.assert %define lex_symbol %code {\n#define USE_LEX_SYMBOL\n}]])
AT_CHECK_VARIANTS([[%define parse.assert %define lex_symbol %code {\n#define USE_LEX_SYMBOL\n} %define token.prefix "TOK_"]])
AT_CHECK_VARIANTS([[%define parse.assert %define lex_symbol %code {\n#define USE_LEX_SYMBOL\n} %define api.tokens.prefix "TOK_"]])
## ----------------------- ##

View File

@@ -579,7 +579,7 @@ AT_CHECK_CALC_LALR([%define api.push-pull "both" %define api.pure %locations])
AT_CHECK_CALC_LALR([%error-verbose %locations])
AT_CHECK_CALC_LALR([%error-verbose %locations %defines %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_LALR([%error-verbose %locations %defines %name-prefix "calc" %define token.prefix "TOK_" %verbose %yacc])
AT_CHECK_CALC_LALR([%error-verbose %locations %defines %name-prefix "calc" %define api.tokens.prefix "TOK_" %verbose %yacc])
AT_CHECK_CALC_LALR([%debug])
AT_CHECK_CALC_LALR([%error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
@@ -620,7 +620,7 @@ AT_CHECK_CALC_GLR([%error-verbose %locations %defines %name-prefix "calc" %verbo
AT_CHECK_CALC_GLR([%debug])
AT_CHECK_CALC_GLR([%error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_GLR([%error-verbose %debug %locations %defines %name-prefix "calc" %define token.prefix "TOK_" %verbose %yacc])
AT_CHECK_CALC_GLR([%error-verbose %debug %locations %defines %name-prefix "calc" %define api.tokens.prefix "TOK_" %verbose %yacc])
AT_CHECK_CALC_GLR([%define api.pure %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
@@ -650,7 +650,7 @@ AT_CHECK_CALC_LALR1_CC([%locations %error-verbose %name-prefix "calc" %verbose %
AT_CHECK_CALC_LALR1_CC([%locations %error-verbose %debug %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_LALR1_CC([%locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_LALR1_CC([%locations %pure-parser %error-verbose %debug %name-prefix "calc" %define token.prefix "TOK_" %verbose %yacc])
AT_CHECK_CALC_LALR1_CC([%locations %pure-parser %error-verbose %debug %name-prefix "calc" %define api.tokens.prefix "TOK_" %verbose %yacc])
AT_CHECK_CALC_LALR1_CC([%locations %pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
@@ -679,6 +679,6 @@ AT_CHECK_CALC_GLR_CC([%debug])
AT_CHECK_CALC_GLR_CC([%error-verbose %debug %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_GLR_CC([%pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_GLR_CC([%pure-parser %error-verbose %debug %name-prefix "calc" %define token.prefix "TOK_" %verbose %yacc])
AT_CHECK_CALC_GLR_CC([%pure-parser %error-verbose %debug %name-prefix "calc" %define api.tokens.prefix "TOK_" %verbose %yacc])
AT_CHECK_CALC_GLR_CC([%pure-parser %error-verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])

View File

@@ -487,7 +487,7 @@ AT_CHECK_JAVA_GREP([[class YYParser]])
AT_CHECK_JAVA_MINIMAL([[%name-prefix "Prefix"]])
AT_CHECK_JAVA_GREP([[class PrefixParser]])
AT_CHECK_JAVA_MINIMAL([[%define token.prefix "TOK_"]])
AT_CHECK_JAVA_MINIMAL([[%define api.tokens.prefix "TOK_"]])
AT_CHECK_JAVA_GREP([[.*TOK_END.*]])
AT_CHECK_JAVA_MINIMAL([[%define parser_class_name "ParserClassName"]])

View File

@@ -88,8 +88,8 @@ m4_pushdef([AT_NAME_PREFIX],
[m4_bregexp([$3], [name-prefix "\([^"]*\)"], [\1])],
[yy])])
m4_pushdef([AT_TOKEN_PREFIX],
[m4_bmatch([$3], [%define token.prefix ".*"],
[m4_bregexp([$3], [%define token.prefix "\(.*\)"], [\1])])])
[m4_bmatch([$3], [%define api.tokens.prefix ".*"],
[m4_bregexp([$3], [%define api.tokens.prefix "\(.*\)"], [\1])])])
# yyerror receives the location if %location & %pure & (%glr or %parse-param).
m4_pushdef([AT_YYERROR_ARG_LOC_IF],
[AT_GLR_OR_PARAM_IF([AT_PURE_AND_LOC_IF([$1], [$2])],