mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
c++: add support for api.position.file and api.location.file
* data/location.cc: Sort includes. (b4_position_file, b4_location_file): New. When there's a file for locations but not for positions, include the definition of position in the location file. * data/lalr1.cc (b4_shared_declarations): Include the position/location file when it exists. Otherwise, define the class. * data/glr.cc: Likewise. * tests/input.at (%define file variables): Check them. * tests/output.at (C++ output): Check various cases with api.position.file and api.location.file.
This commit is contained in:
@@ -695,8 +695,9 @@ AT_CHECK_CALC_LALR1_CC([%define parse.error verbose %debug %define api.prefix {c
|
||||
AT_CHECK_CALC_LALR1_CC([%defines %locations %define parse.error verbose %debug %define api.prefix {calc} %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
||||
|
||||
AT_CHECK_CALC_LALR1_CC([%locations %define api.stack.file "my-stack.hh"])
|
||||
AT_CHECK_CALC_LALR1_CC([%locations %defines %define api.stack.file none])
|
||||
AT_CHECK_CALC_LALR1_CC([%locations %defines %define api.stack.file none %define api.location.file none %define api.position.file none])
|
||||
AT_CHECK_CALC_LALR1_CC([%defines %locations %define api.stack.file "my-stack.hh"])
|
||||
AT_CHECK_CALC_LALR1_CC([%defines %locations %define api.stack.file "my-stack.hh" %define api.position.file none %define api.location.file "my-location.hh"])
|
||||
|
||||
|
||||
# --------------------------- #
|
||||
|
||||
Reference in New Issue
Block a user