mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
glr.cc: %defines is no longer mandatory
* data/glr.cc: No longer require %defines. When it is not given, define the position and location classes instead of including their headers. (b4_shared_declarations): Use the original parse-params. * data/glr.c (b4_shared_declarations): Define only if undefined. * tests/actions.at, tests/calc.at: No longer force the use of %defines for glr.cc. * NEWS: Doc it.
This commit is contained in:
@@ -1278,7 +1278,6 @@ AT_BISON_OPTION_PUSHDEFS([%skeleton "$1"])
|
||||
|
||||
AT_DATA_GRAMMAR([[input.y]],
|
||||
[[%skeleton "$1"
|
||||
%defines // FIXME: Mandated by glr.cc.
|
||||
%debug
|
||||
%code requires
|
||||
{
|
||||
|
||||
@@ -736,19 +736,19 @@ AT_CHECK_CALC_LALR1_CC([%defines %locations %pure-parser %define parse.error ver
|
||||
AT_BANNER([[Simple GLR C++ Calculator.]])
|
||||
|
||||
# Again, we try also using %skeleton.
|
||||
AT_CHECK_CALC([%skeleton "glr.cc" %defines])
|
||||
AT_CHECK_CALC([%skeleton "glr.cc"])
|
||||
|
||||
# AT_CHECK_CALC_GLR_CC([BISON-OPTIONS])
|
||||
# -------------------------------------
|
||||
# Start a testing chunk which compiles `calc' grammar with
|
||||
# the GLR C++ skeleton, and performs several tests over the parser.
|
||||
m4_define([AT_CHECK_CALC_GLR_CC],
|
||||
[AT_CHECK_CALC([%language "C++" %glr-parser %defines %locations] $@)])
|
||||
[AT_CHECK_CALC([%language "C++" %glr-parser] $@)])
|
||||
|
||||
AT_CHECK_CALC_GLR_CC([])
|
||||
AT_CHECK_CALC_GLR_CC([%locations])
|
||||
AT_CHECK_CALC_GLR_CC([%locations %define location_type Span])
|
||||
AT_CHECK_CALC_GLR_CC([%define parse.error verbose %name-prefix "calc" %verbose %yacc])
|
||||
AT_CHECK_CALC_GLR_CC([%defines %define parse.error verbose %name-prefix "calc" %verbose %yacc])
|
||||
AT_CHECK_CALC_GLR_CC([%define parse.error verbose %define api.prefix "calc" %verbose %yacc])
|
||||
|
||||
AT_CHECK_CALC_GLR_CC([%debug])
|
||||
@@ -757,5 +757,5 @@ AT_CHECK_CALC_GLR_CC([%define parse.error verbose %debug %name-prefix "calc" %ve
|
||||
AT_CHECK_CALC_GLR_CC([%pure-parser %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc])
|
||||
AT_CHECK_CALC_GLR_CC([%pure-parser %define parse.error verbose %debug %name-prefix "calc" %define api.tokens.prefix "TOK_" %verbose %yacc])
|
||||
|
||||
AT_CHECK_CALC_GLR_CC([%locations %pure-parser %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} {int *count}])
|
||||
AT_CHECK_CALC_GLR_CC([%locations %pure-parser %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc %parse-param {semantic_value *result} {int *count}])
|
||||
AT_CHECK_CALC_GLR_CC([%locations %defines %pure-parser %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} {int *count}])
|
||||
AT_CHECK_CALC_GLR_CC([%locations %defines %pure-parser %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc %parse-param {semantic_value *result} {int *count}])
|
||||
|
||||
Reference in New Issue
Block a user