mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
c++: api.location.type
This feature was introduced in 95a2de5695
(which is part of 2.5), but not documented. Give it a proper name, and
make it public.
* data/c++.m4, data/lalr1.cc, data/glr.cc, data/java.m4: Use
api.location.type instead of location_type.
* src/muscle-tab.c (muscle_percent_variable_update): Map the latter to
the former.
* tests/local.at: Adjust.
* tests/calc.at: Use api.location.type.
Leave tests/java.at with location_type, at least for the time being,
to cover both names.
* doc/bison.texi: Document api.location.type.
(User Defined Location Type): New.
* NEWS: Update.
This commit is contained in:
@@ -29,7 +29,7 @@ b4_percent_define_default([[parser_class_name]], [[parser]])
|
||||
# Don't do that so that we remember whether we're using a user
|
||||
# request, or the default value.
|
||||
#
|
||||
# b4_percent_define_default([[location_type]], [[location]])
|
||||
# b4_percent_define_default([[api.location.type]], [[location]])
|
||||
|
||||
b4_percent_define_default([[filename_type]], [[std::string]])
|
||||
b4_percent_define_default([[namespace]], m4_defn([b4_prefix]))
|
||||
|
||||
@@ -54,7 +54,7 @@ b4_defines_if([],
|
||||
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
|
||||
|
||||
m4_include(b4_pkgdatadir/[c++.m4])
|
||||
b4_percent_define_ifdef([[location_type]], [],
|
||||
b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[m4_include(b4_pkgdatadir/[location.cc])])
|
||||
|
||||
m4_define([b4_parser_class_name],
|
||||
@@ -238,7 +238,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
|
||||
# include <string>
|
||||
# include <iostream>
|
||||
]b4_percent_define_ifdef([[location_type]], [],
|
||||
]b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[[# include "location.hh"]])[
|
||||
|
||||
]b4_YYDEBUG_define[
|
||||
@@ -262,7 +262,7 @@ b4_user_stype
|
||||
typedef ]b4_api_PREFIX[STYPE semantic_type;
|
||||
# endif
|
||||
/// Symbol locations.
|
||||
typedef ]b4_percent_define_get([[location_type]],
|
||||
typedef ]b4_percent_define_get([[api.location.type]],
|
||||
[[location]])[ location_type;
|
||||
/// Tokens.
|
||||
struct token
|
||||
|
||||
@@ -169,8 +169,8 @@ m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])])
|
||||
b4_percent_define_default([[throws]], [])])
|
||||
m4_define([b4_throws], [b4_percent_define_get([[throws]])])
|
||||
|
||||
b4_percent_define_default([[location_type]], [Location])])
|
||||
m4_define([b4_location_type], [b4_percent_define_get([[location_type]])])
|
||||
b4_percent_define_default([[api.location.type]], [Location])])
|
||||
m4_define([b4_location_type], [b4_percent_define_get([[api.location.type]])])
|
||||
|
||||
b4_percent_define_default([[position_type]], [Position])])
|
||||
m4_define([b4_position_type], [b4_percent_define_get([[position_type]])])
|
||||
|
||||
@@ -24,7 +24,7 @@ m4_define([b4_parser_class_name],
|
||||
b4_defines_if([],
|
||||
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
|
||||
|
||||
b4_percent_define_ifdef([[location_type]], [],
|
||||
b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[# Backward compatibility.
|
||||
m4_define([b4_location_constructors])
|
||||
m4_include(b4_pkgdatadir/[location.cc])])
|
||||
@@ -52,7 +52,7 @@ b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "stack.hh"
|
||||
]b4_percent_define_ifdef([[location_type]], [],
|
||||
]b4_percent_define_ifdef([[api.location.type]], [],
|
||||
[[#include "location.hh"]])[
|
||||
|
||||
]b4_YYDEBUG_define[
|
||||
@@ -77,7 +77,7 @@ b4_user_stype
|
||||
typedef ]b4_api_PREFIX[STYPE semantic_type;
|
||||
#endif
|
||||
/// Symbol locations.
|
||||
typedef ]b4_percent_define_get([[location_type]],
|
||||
typedef ]b4_percent_define_get([[api.location.type]],
|
||||
[[location]])[ location_type;
|
||||
/// Tokens.
|
||||
struct token
|
||||
|
||||
Reference in New Issue
Block a user