[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
skeletons: shorten b4_parser_class_name to b4_parser_class
From: |
Akim Demaille |
Subject: |
skeletons: shorten b4_parser_class_name to b4_parser_class |
Date: |
Wed, 2 Jan 2019 08:06:40 +0100 |
commit 5be47a73e848fd2ccc86c479cdb155ce3fa315c9
Author: Akim Demaille <address@hidden>
Date: Tue Jan 1 16:44:41 2019 +0100
skeletons: shorten b4_parser_class_name to b4_parser_class
* skeletons/c++.m4, skeletons/d.m4, skeletons/glr.c, skeletons/glr.cc,
* skeletons/java.m4, skeletons/lalr1.cc, skeletons/lalr1.d,
* skeletons/lalr1.java: Here.
diff --git a/data/skeletons/c++.m4 b/data/skeletons/c++.m4
index 0ef5bb70..82b0d0e8 100644
--- a/data/skeletons/c++.m4
+++ b/data/skeletons/c++.m4
@@ -366,14 +366,14 @@ m4_define([b4_symbol_type_define],
m4_define([b4_public_types_define],
[[ // basic_symbol.
template <typename Base>
- ]b4_parser_class_name[::basic_symbol<Base>::basic_symbol ()
+ ]b4_parser_class[::basic_symbol<Base>::basic_symbol ()
: value ()]b4_locations_if([
, location ()])[
{}
#if 201103L <= YY_CPLUSPLUS
template <typename Base>
- ]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (basic_symbol&&
that)
+ ]b4_parser_class[::basic_symbol<Base>::basic_symbol (basic_symbol&& that)
: Base (std::move (that))
, value (]b4_variant_if([], [std::move (that.value)]))b4_locations_if([
, location (std::move (that.location))])[
@@ -384,7 +384,7 @@ m4_define([b4_public_types_define],
#endif
template <typename Base>
- ]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const
basic_symbol& that)
+ ]b4_parser_class[::basic_symbol<Base>::basic_symbol (const basic_symbol&
that)
: Base (that)
, value (]b4_variant_if([], [that.value]))b4_locations_if([
, location (that.location)])[
@@ -396,7 +396,7 @@ m4_define([b4_public_types_define],
]b4_variant_if([], [[
/// Constructor for valueless symbols.
template <typename Base>
- ]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
+ ]b4_parser_class[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
b4_locations_if([YY_MOVE_REF (location_type) l]))[)
: Base (t)
@@ -405,7 +405,7 @@ m4_define([b4_public_types_define],
{}
template <typename Base>
- ]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
+ ]b4_parser_class[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
[YY_RVREF (semantic_type) v],
b4_locations_if([YY_RVREF (location_type) l]))[)
@@ -417,14 +417,14 @@ m4_define([b4_public_types_define],
]b4_symbol_variant([this->type_get ()], [value], [YY_MOVE_OR_COPY],
[YY_MOVE (v)])])[}]])[
template <typename Base>
- ]b4_parser_class_name[::basic_symbol<Base>::~basic_symbol ()
+ ]b4_parser_class[::basic_symbol<Base>::~basic_symbol ()
{
clear ();
}
template <typename Base>
void
- ]b4_parser_class_name[::basic_symbol<Base>::clear ()
+ ]b4_parser_class[::basic_symbol<Base>::clear ()
{]b4_variant_if([[
// User destructor.
symbol_number_type yytype = this->type_get ();
@@ -444,14 +444,14 @@ m4_define([b4_public_types_define],
template <typename Base>
bool
- ]b4_parser_class_name[::basic_symbol<Base>::empty () const YY_NOEXCEPT
+ ]b4_parser_class[::basic_symbol<Base>::empty () const YY_NOEXCEPT
{
return Base::type_get () == empty_symbol;
}
template <typename Base>
void
- ]b4_parser_class_name[::basic_symbol<Base>::move (basic_symbol& s)
+ ]b4_parser_class[::basic_symbol<Base>::move (basic_symbol& s)
{
super_type::move (s);
]b4_variant_if([b4_symbol_variant([this->type_get ()], [value], [move],
@@ -461,47 +461,47 @@ m4_define([b4_public_types_define],
}
// by_type.
- ]b4_inline([$1])b4_parser_class_name[::by_type::by_type ()
+ ]b4_inline([$1])b4_parser_class[::by_type::by_type ()
: type (empty_symbol)
{}
#if 201103L <= YY_CPLUSPLUS
- ]b4_inline([$1])b4_parser_class_name[::by_type::by_type (by_type&& that)
+ ]b4_inline([$1])b4_parser_class[::by_type::by_type (by_type&& that)
: type (that.type)
{
that.clear ();
}
#endif
- ]b4_inline([$1])b4_parser_class_name[::by_type::by_type (const by_type& that)
+ ]b4_inline([$1])b4_parser_class[::by_type::by_type (const by_type& that)
: type (that.type)
{}
- ]b4_inline([$1])b4_parser_class_name[::by_type::by_type (token_type t)
+ ]b4_inline([$1])b4_parser_class[::by_type::by_type (token_type t)
: type (yytranslate_ (t))
{}
]b4_inline([$1])[void
- ]b4_parser_class_name[::by_type::clear ()
+ ]b4_parser_class[::by_type::clear ()
{
type = empty_symbol;
}
]b4_inline([$1])[void
- ]b4_parser_class_name[::by_type::move (by_type& that)
+ ]b4_parser_class[::by_type::move (by_type& that)
{
type = that.type;
that.clear ();
}
]b4_inline([$1])[int
- ]b4_parser_class_name[::by_type::type_get () const YY_NOEXCEPT
+ ]b4_parser_class[::by_type::type_get () const YY_NOEXCEPT
{
return type;
}
]b4_token_ctor_if([[
- ]b4_inline([$1])b4_parser_class_name[::token_type
- ]b4_parser_class_name[::by_type::token () const YY_NOEXCEPT
+ ]b4_inline([$1])b4_parser_class[::token_type
+ ]b4_parser_class[::by_type::token () const YY_NOEXCEPT
{
// YYTOKNUM[NUM] -- (External) token number corresponding to the
// (internal) symbol number NUM (which must be that of a token). */
@@ -529,8 +529,8 @@ m4_define([b4_token_constructor_define], [])
# Define yytranslate_. Sometimes used in the header file ($1=hh),
# sometimes in the cc file.
m4_define([b4_yytranslate_define],
-[ b4_inline([$1])b4_parser_class_name[::token_number_type
- ]b4_parser_class_name[::yytranslate_ (]b4_token_ctor_if([token_type],
+[ b4_inline([$1])b4_parser_class[::token_number_type
+ ]b4_parser_class[::yytranslate_ (]b4_token_ctor_if([token_type],
[int])[ t)
{
// YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
diff --git a/data/skeletons/d.m4 b/data/skeletons/d.m4
index 1240309a..e874e1dd 100644
--- a/data/skeletons/d.m4
+++ b/data/skeletons/d.m4
@@ -179,7 +179,7 @@ b4_percent_define_default([[stype]], [[YYSemanticType]])])
m4_define_default([b4_prefix], [[YY]])
b4_percent_define_default([[parser_class_name]], [b4_prefix[]YYParser])])
-m4_define([b4_parser_class_name],
[b4_percent_define_get([[parser_class_name]])])
+m4_define([b4_parser_class], [b4_percent_define_get([[parser_class_name]])])
#b4_percent_define_default([[location_type]], [Location])])
m4_define([b4_location_type],
b4_percent_define_ifdef([[location_type]],[b4_percent_define_get([[location_type]])],[YYLocation]))
diff --git a/data/skeletons/glr.c b/data/skeletons/glr.c
index a102d552..20add6f7 100644
--- a/data/skeletons/glr.c
+++ b/data/skeletons/glr.c
@@ -777,7 +777,7 @@ yygetToken (int *yycharp][]b4_pure_if([, yyGLRStack*
yystackp])[]b4_user_formals
*yycharp = ]b4_lex[;
#if YY_EXCEPTIONS
}
- catch (const ]b4_namespace_ref[::]b4_parser_class_name[::syntax_error&
yyexc)
+ catch (const ]b4_namespace_ref[::]b4_parser_class[::syntax_error& yyexc)
{]b4_locations_if([
yylloc = yyexc.location;])[
yyerror (]b4_lyyerror_args[yyexc.what ());
@@ -859,7 +859,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem*
yyvsp,
yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
]])[]b4_glr_cc_if([[
#if YY_EXCEPTIONS
- typedef ]b4_namespace_ref[::]b4_parser_class_name[::syntax_error
syntax_error;
+ typedef ]b4_namespace_ref[::]b4_parser_class[::syntax_error syntax_error;
try
{
#endif // YY_EXCEPTIONS]])[
diff --git a/data/skeletons/glr.cc b/data/skeletons/glr.cc
index dad6ec56..dbf89fea 100644
--- a/data/skeletons/glr.cc
+++ b/data/skeletons/glr.cc
@@ -49,7 +49,7 @@ m4_define([b4_pure_flag], [1])
m4_include(b4_skeletonsdir/[c++.m4])
b4_bison_locations_if([m4_include(b4_skeletonsdir/[location.cc])])
-m4_define([b4_parser_class_name],
+m4_define([b4_parser_class],
[b4_percent_define_get([[parser_class_name]])])
# Save the parse parameters.
@@ -60,10 +60,10 @@ m4_define([b4_parse_param_orig], m4_defn([b4_parse_param]))
# New ones.
m4_ifset([b4_parse_param],
[m4_define([b4_parse_param_wrap],
- [[b4_namespace_ref::b4_parser_class_name[& yyparser],
[[yyparser]]],]
+ [[b4_namespace_ref::b4_parser_class[& yyparser], [[yyparser]]],]
m4_defn([b4_parse_param]))],
[m4_define([b4_parse_param_wrap],
- [[b4_namespace_ref::b4_parser_class_name[& yyparser],
[[yyparser]]]])
+ [[b4_namespace_ref::b4_parser_class[& yyparser], [[yyparser]]]])
])
@@ -81,10 +81,10 @@ m4_define([b4_yy_symbol_print_define],
[static void],
[[FILE *], []],
[[int yytype], [yytype]],
- [[const ]b4_namespace_ref::b4_parser_class_name[::semantic_type *yyvaluep],
+ [[const ]b4_namespace_ref::b4_parser_class[::semantic_type *yyvaluep],
[yyvaluep]][]dnl
b4_locations_if([,
- [[const ]b4_namespace_ref::b4_parser_class_name[::location_type
*yylocationp],
+ [[const ]b4_namespace_ref::b4_parser_class[::location_type *yylocationp],
[yylocationp]]]),
b4_parse_param)[
{
@@ -103,7 +103,7 @@ m4_defn([b4_initial_action])]))])[
[b4_syncline(address@hidden@], address@hidden@])[
]b4_function_declare([yyerror],
[static void],b4_locations_if([
- [[const ]b4_namespace_ref::b4_parser_class_name[::location_type
*yylocationp],
+ [[const ]b4_namespace_ref::b4_parser_class[::location_type *yylocationp],
[yylocationp]],])
b4_parse_param,
[[const char* msg], [msg]])])[
@@ -136,7 +136,7 @@ m4_append([b4_epilogue],
]b4_function_define([yyerror],
[static void],b4_locations_if([
- [[const ]b4_namespace_ref::b4_parser_class_name[::location_type
*yylocationp],
+ [[const ]b4_namespace_ref::b4_parser_class[::location_type *yylocationp],
[yylocationp]],])
b4_parse_param,
[[const char* msg], [msg]])[
@@ -150,24 +150,24 @@ m4_append([b4_epilogue],
]dnl In this section, the parse params are the original parse_params.
m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
[ /// Build a parser object.
- ]b4_parser_class_name::b4_parser_class_name[
(]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
+ ]b4_parser_class::b4_parser_class[
(]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
:])[
#if ]b4_api_PREFIX[DEBUG
]m4_ifset([b4_parse_param], [ ], [ :])[yycdebug_
(&std::cerr)]m4_ifset([b4_parse_param], [,])[
#endif]b4_parse_param_cons[
{}
- ]b4_parser_class_name::~b4_parser_class_name[ ()
+ ]b4_parser_class::~b4_parser_class[ ()
{}
int
- ]b4_parser_class_name[::operator() ()
+ ]b4_parser_class[::operator() ()
{
return parse ();
}
int
- ]b4_parser_class_name[::parse ()
+ ]b4_parser_class[::parse ()
{
return ::yyparse (*this]b4_user_args[);
}
@@ -178,7 +178,7 @@ m4_pushdef([b4_parse_param],
m4_defn([b4_parse_param_orig]))dnl
`--------------------*/
void
- ]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
+ ]b4_parser_class[::yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[)
{]b4_locations_if([[
@@ -192,7 +192,7 @@ m4_pushdef([b4_parse_param],
m4_defn([b4_parse_param_orig]))dnl
void
- ]b4_parser_class_name[::yy_symbol_print_ (int yytype,
+ ]b4_parser_class[::yy_symbol_print_ (int yytype,
const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[)
{
@@ -204,26 +204,26 @@ m4_pushdef([b4_parse_param],
m4_defn([b4_parse_param_orig]))dnl
}
std::ostream&
- ]b4_parser_class_name[::debug_stream () const
+ ]b4_parser_class[::debug_stream () const
{
return *yycdebug_;
}
void
- ]b4_parser_class_name[::set_debug_stream (std::ostream& o)
+ ]b4_parser_class[::set_debug_stream (std::ostream& o)
{
yycdebug_ = &o;
}
- ]b4_parser_class_name[::debug_level_type
- ]b4_parser_class_name[::debug_level () const
+ ]b4_parser_class[::debug_level_type
+ ]b4_parser_class[::debug_level () const
{
return yydebug;
}
void
- ]b4_parser_class_name[::set_debug_level (debug_level_type l)
+ ]b4_parser_class[::set_debug_level (debug_level_type l)
{
// Actually, it is yydebug which is really used.
yydebug = l;
@@ -267,14 +267,14 @@ b4_percent_code_get([[requires]])[
[b4_location_define])])[
/// A Bison parser.
- class ]b4_parser_class_name[
+ class ]b4_parser_class[
{
public:
]b4_public_types_declare[
/// Build a parser object.
- ]b4_parser_class_name[ (]b4_parse_param_decl[);
- virtual ~]b4_parser_class_name[ ();
+ ]b4_parser_class[ (]b4_parse_param_decl[);
+ virtual ~]b4_parser_class[ ();
/// Parse. An alias for parse ().
/// \returns 0 iff parsing succeeded.
@@ -331,10 +331,10 @@ b4_percent_define_flag_if([[global_tokens_and_yystype]],
[b4_token_defines])
[
#ifndef ]b4_api_PREFIX[STYPE
-# define ]b4_api_PREFIX[STYPE
]b4_namespace_ref[::]b4_parser_class_name[::semantic_type
+# define ]b4_api_PREFIX[STYPE
]b4_namespace_ref[::]b4_parser_class[::semantic_type
#endif
#ifndef ]b4_api_PREFIX[LTYPE
-# define ]b4_api_PREFIX[LTYPE
]b4_namespace_ref[::]b4_parser_class_name[::location_type
+# define ]b4_api_PREFIX[LTYPE
]b4_namespace_ref[::]b4_parser_class[::location_type
#endif
]b4_namespace_close[
diff --git a/data/skeletons/java.m4 b/data/skeletons/java.m4
index 4b9565af..1d34d1ce 100644
--- a/data/skeletons/java.m4
+++ b/data/skeletons/java.m4
@@ -196,7 +196,7 @@ b4_percent_define_default([[api.value.type]], [[Object]])
m4_define_default([b4_prefix], [[YY]])
b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser])
-m4_define([b4_parser_class_name],
[b4_percent_define_get([[parser_class_name]])])
+m4_define([b4_parser_class], [b4_percent_define_get([[parser_class_name]])])
b4_percent_define_default([[lex_throws]], [[java.io.IOException]])
m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])])
diff --git a/data/skeletons/lalr1.cc b/data/skeletons/lalr1.cc
index 2d82172e..58e8f897 100644
--- a/data/skeletons/lalr1.cc
+++ b/data/skeletons/lalr1.cc
@@ -35,7 +35,7 @@ m4_define([b4_integral_parser_table_declare],
# Define "parser::yy<TABLE-NAME>_" whose contents is CONTENT.
m4_define([b4_integral_parser_table_define],
[ const b4_int_type_for([$2])
- b4_parser_class_name::yy$1_[[]] =
+ b4_parser_class::yy$1_[[]] =
{
$2
};dnl
@@ -137,7 +137,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))])])
m4_pushdef([b4_copyright_years],
[2002-2015, 2018])
-m4_define([b4_parser_class_name],
+m4_define([b4_parser_class],
[b4_percent_define_get([[parser_class_name]])])
b4_bison_locations_if([# Backward compatibility.
@@ -176,14 +176,14 @@ m4_define([b4_shared_declarations],
[b4_location_define])])[
/// A Bison parser.
- class ]b4_parser_class_name[
+ class ]b4_parser_class[
{
public:
]b4_public_types_declare[
]b4_symbol_type_define[
/// Build a parser object.
- ]b4_parser_class_name[ (]b4_parse_param_decl[);
- virtual ~]b4_parser_class_name[ ();
+ ]b4_parser_class[ (]b4_parse_param_decl[);
+ virtual ~]b4_parser_class[ ();
/// Parse. An alias for parse ().
/// \returns 0 iff parsing succeeded.
@@ -219,8 +219,8 @@ m4_define([b4_shared_declarations],
private:
/// This class is not copyable.
- ]b4_parser_class_name[ (const ]b4_parser_class_name[&);
- ]b4_parser_class_name[& operator= (const ]b4_parser_class_name[&);
+ ]b4_parser_class[ (const ]b4_parser_class[&);
+ ]b4_parser_class[& operator= (const ]b4_parser_class[&);
/// State numbers.
typedef int state_type;
@@ -388,7 +388,7 @@ m4_define([b4_shared_declarations],
#ifndef ]b4_api_PREFIX[STYPE
// Redirection for backward compatibility.
-# define ]b4_api_PREFIX[STYPE
b4_namespace_ref::b4_parser_class_name::semantic_type
+# define ]b4_api_PREFIX[STYPE b4_namespace_ref::b4_parser_class::semantic_type
#endif
])[
]b4_percent_code_get([[provides]])[
@@ -515,7 +515,7 @@ m4_if(b4_prefix, [yy], [],
apostrophe, a comma, or backslash (other than backslash-backslash).
YYSTR is taken from yytname. */
std::string
- ]b4_parser_class_name[::yytnamerr_ (const char *yystr)
+ ]b4_parser_class[::yytnamerr_ (const char *yystr)
{
if (*yystr == '"')
{
@@ -548,7 +548,7 @@ m4_if(b4_prefix, [yy], [],
]])[
/// Build a parser object.
- ]b4_parser_class_name::b4_parser_class_name[
(]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
+ ]b4_parser_class::b4_parser_class[
(]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
:])[
#if ]b4_api_PREFIX[DEBUG
]m4_ifset([b4_parse_param], [ ], [ :])[yydebug_ (false),
@@ -556,7 +556,7 @@ m4_if(b4_prefix, [yy], [],
#endif]b4_parse_param_cons[
{}
- ]b4_parser_class_name::~b4_parser_class_name[ ()
+ ]b4_parser_class::~b4_parser_class[ ()
{}
@@ -567,33 +567,33 @@ m4_if(b4_prefix, [yy], [],
]b4_token_ctor_if([], [b4_public_types_define([cc])])[
// by_state.
- ]b4_parser_class_name[::by_state::by_state () YY_NOEXCEPT
+ ]b4_parser_class[::by_state::by_state () YY_NOEXCEPT
: state (empty_state)
{}
- ]b4_parser_class_name[::by_state::by_state (const by_state& that) YY_NOEXCEPT
+ ]b4_parser_class[::by_state::by_state (const by_state& that) YY_NOEXCEPT
: state (that.state)
{}
void
- ]b4_parser_class_name[::by_state::clear () YY_NOEXCEPT
+ ]b4_parser_class[::by_state::clear () YY_NOEXCEPT
{
state = empty_state;
}
void
- ]b4_parser_class_name[::by_state::move (by_state& that)
+ ]b4_parser_class[::by_state::move (by_state& that)
{
state = that.state;
that.clear ();
}
- ]b4_parser_class_name[::by_state::by_state (state_type s) YY_NOEXCEPT
+ ]b4_parser_class[::by_state::by_state (state_type s) YY_NOEXCEPT
: state (s)
{}
- ]b4_parser_class_name[::symbol_number_type
- ]b4_parser_class_name[::by_state::type_get () const YY_NOEXCEPT
+ ]b4_parser_class[::symbol_number_type
+ ]b4_parser_class[::by_state::type_get () const YY_NOEXCEPT
{
if (state == empty_state)
return empty_symbol;
@@ -601,10 +601,10 @@ m4_if(b4_prefix, [yy], [],
return yystos_[state];
}
- ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type ()
+ ]b4_parser_class[::stack_symbol_type::stack_symbol_type ()
{}
- ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (YY_RVREF
(stack_symbol_type) that)
+ ]b4_parser_class[::stack_symbol_type::stack_symbol_type (YY_RVREF
(stack_symbol_type) that)
: super_type (YY_MOVE (that.state)]b4_variant_if([], [, YY_MOVE
(that.value)])b4_locations_if([, YY_MOVE (that.location)])[)
{]b4_variant_if([
b4_symbol_variant([that.type_get ()],
@@ -615,7 +615,7 @@ m4_if(b4_prefix, [yy], [],
#endif
}
- ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) that)
+ ]b4_parser_class[::stack_symbol_type::stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) that)
: super_type (s]b4_variant_if([], [, YY_MOVE
(that.value)])[]b4_locations_if([, YY_MOVE (that.location)])[)
{]b4_variant_if([
b4_symbol_variant([that.type_get ()],
@@ -625,8 +625,8 @@ m4_if(b4_prefix, [yy], [],
}
#if YY_CPLUSPLUS < 201103L
- ]b4_parser_class_name[::stack_symbol_type&
- ]b4_parser_class_name[::stack_symbol_type::operator= (stack_symbol_type&
that)
+ ]b4_parser_class[::stack_symbol_type&
+ ]b4_parser_class[::stack_symbol_type::operator= (stack_symbol_type& that)
{
state = that.state;
]b4_variant_if([b4_symbol_variant([that.type_get ()],
@@ -641,7 +641,7 @@ m4_if(b4_prefix, [yy], [],
template <typename Base>
void
- ]b4_parser_class_name[::yy_destroy_ (const char* yymsg, basic_symbol<Base>&
yysym) const
+ ]b4_parser_class[::yy_destroy_ (const char* yymsg, basic_symbol<Base>&
yysym) const
{
if (yymsg)
YY_SYMBOL_PRINT (yymsg, yysym);]b4_variant_if([], [
@@ -653,7 +653,7 @@ m4_if(b4_prefix, [yy], [],
#if ]b4_api_PREFIX[DEBUG
template <typename Base>
void
- ]b4_parser_class_name[::yy_print_ (std::ostream& yyo,
+ ]b4_parser_class[::yy_print_ (std::ostream& yyo,
const basic_symbol<Base>& yysym) const
{
std::ostream& yyoutput = yyo;
@@ -672,7 +672,7 @@ m4_if(b4_prefix, [yy], [],
#endif
void
- ]b4_parser_class_name[::yypush_ (const char* m, YY_MOVE_REF
(stack_symbol_type) sym)
+ ]b4_parser_class[::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type)
sym)
{
if (m)
YY_SYMBOL_PRINT (m, sym);
@@ -680,7 +680,7 @@ m4_if(b4_prefix, [yy], [],
}
void
- ]b4_parser_class_name[::yypush_ (const char* m, state_type s, YY_MOVE_REF
(symbol_type) sym)
+ ]b4_parser_class[::yypush_ (const char* m, state_type s, YY_MOVE_REF
(symbol_type) sym)
{
#if 201103L <= YY_CPLUSPLUS
yypush_ (m, stack_symbol_type (s, std::move (sym)));
@@ -691,40 +691,40 @@ m4_if(b4_prefix, [yy], [],
}
void
- ]b4_parser_class_name[::yypop_ (int n)
+ ]b4_parser_class[::yypop_ (int n)
{
yystack_.pop (n);
}
#if ]b4_api_PREFIX[DEBUG
std::ostream&
- ]b4_parser_class_name[::debug_stream () const
+ ]b4_parser_class[::debug_stream () const
{
return *yycdebug_;
}
void
- ]b4_parser_class_name[::set_debug_stream (std::ostream& o)
+ ]b4_parser_class[::set_debug_stream (std::ostream& o)
{
yycdebug_ = &o;
}
- ]b4_parser_class_name[::debug_level_type
- ]b4_parser_class_name[::debug_level () const
+ ]b4_parser_class[::debug_level_type
+ ]b4_parser_class[::debug_level () const
{
return yydebug_;
}
void
- ]b4_parser_class_name[::set_debug_level (debug_level_type l)
+ ]b4_parser_class[::set_debug_level (debug_level_type l)
{
yydebug_ = l;
}
#endif // ]b4_api_PREFIX[DEBUG
- ]b4_parser_class_name[::state_type
- ]b4_parser_class_name[::yy_lr_goto_state_ (state_type yystate, int yysym)
+ ]b4_parser_class[::state_type
+ ]b4_parser_class[::yy_lr_goto_state_ (state_type yystate, int yysym)
{
int yyr = yypgoto_[yysym - yyntokens_] + yystate;
if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
@@ -734,25 +734,25 @@ m4_if(b4_prefix, [yy], [],
}
bool
- ]b4_parser_class_name[::yy_pact_value_is_default_ (int yyvalue)
+ ]b4_parser_class[::yy_pact_value_is_default_ (int yyvalue)
{
return yyvalue == yypact_ninf_;
}
bool
- ]b4_parser_class_name[::yy_table_value_is_error_ (int yyvalue)
+ ]b4_parser_class[::yy_table_value_is_error_ (int yyvalue)
{
return yyvalue == yytable_ninf_;
}
int
- ]b4_parser_class_name[::operator() ()
+ ]b4_parser_class[::operator() ()
{
return parse ();
}
int
- ]b4_parser_class_name[::parse ()
+ ]b4_parser_class[::parse ()
{
// State.
int yyn;
@@ -1075,7 +1075,7 @@ b4_dollar_popdef])[]dnl
}
void
- ]b4_parser_class_name[::error (const syntax_error& yyexc)
+ ]b4_parser_class[::error (const syntax_error& yyexc)
{
error (]b4_join(b4_locations_if([yyexc.location]),
[[yyexc.what ()]])[);
@@ -1083,7 +1083,7 @@ b4_dollar_popdef])[]dnl
// Generate an error message.
std::string
- ]b4_parser_class_name[::yysyntax_error_ (]dnl
+ ]b4_parser_class[::yysyntax_error_ (]dnl
b4_error_verbose_if([state_type yystate, const symbol_type& yyla],
[state_type, const symbol_type&])[) const
{]b4_error_verbose_if([[
@@ -1182,9 +1182,9 @@ b4_error_verbose_if([state_type yystate, const
symbol_type& yyla],
}
- const ]b4_int_type(b4_pact_ninf, b4_pact_ninf)
b4_parser_class_name::yypact_ninf_ = b4_pact_ninf[;
+ const ]b4_int_type(b4_pact_ninf, b4_pact_ninf) b4_parser_class::yypact_ninf_
= b4_pact_ninf[;
- const ]b4_int_type(b4_table_ninf, b4_table_ninf)
b4_parser_class_name::yytable_ninf_ = b4_table_ninf[;
+ const ]b4_int_type(b4_table_ninf, b4_table_ninf)
b4_parser_class::yytable_ninf_ = b4_table_ninf[;
]b4_parser_tables_define[
@@ -1192,7 +1192,7 @@ b4_error_verbose_if([state_type yystate, const
symbol_type& yyla],
// YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
// First, the terminals, then, starting at \a yyntokens_, nonterminals.
const char*
- const ]b4_parser_class_name[::yytname_[] =
+ const ]b4_parser_class[::yytname_[] =
{
]b4_tname[
};
@@ -1202,7 +1202,7 @@ b4_error_verbose_if([state_type yystate, const
symbol_type& yyla],
// Print the state stack on the debug stream.
void
- ]b4_parser_class_name[::yystack_print_ ()
+ ]b4_parser_class[::yystack_print_ ()
{
*yycdebug_ << "Stack now";
for (stack_type::const_iterator
@@ -1215,7 +1215,7 @@ b4_error_verbose_if([state_type yystate, const
symbol_type& yyla],
// Report on the debug stream that the rule \a yyrule is going to be reduced.
void
- ]b4_parser_class_name[::yy_reduce_print_ (int yyrule)
+ ]b4_parser_class[::yy_reduce_print_ (int yyrule)
{
unsigned yylno = yyrline_[yyrule];
int yynrhs = yyr2_[yyrule];
diff --git a/data/skeletons/lalr1.d b/data/skeletons/lalr1.d
index c65370c6..e4a4f114 100644
--- a/data/skeletons/lalr1.d
+++ b/data/skeletons/lalr1.d
@@ -44,7 +44,7 @@ import std.format;
/**
* Communication interface between the scanner and the Bison-generated
- * parser <tt>]b4_parser_class_name[</tt>.
+ * parser <tt>]b4_parser_class[</tt>.
*/
public interface Lexer
{
@@ -233,7 +233,7 @@ b4_user_union_members
]b4_public_if([public ])dnl
b4_abstract_if([abstract ])dnl
b4_final_if([final ])dnl
-[class ]b4_parser_class_name[]dnl
+[class ]b4_parser_class[]dnl
b4_percent_define_get3([extends], [ extends ])dnl
b4_percent_define_get3([implements], [ implements ])[
{
diff --git a/data/skeletons/lalr1.java b/data/skeletons/lalr1.java
index 5424c58f..7f9952ca 100644
--- a/data/skeletons/lalr1.java
+++ b/data/skeletons/lalr1.java
@@ -100,7 +100,7 @@ b4_public_if([public ])dnl
b4_abstract_if([abstract ])dnl
b4_final_if([final ])dnl
b4_strictfp_if([strictfp ])dnl
-[class ]b4_parser_class_name[]dnl
+[class ]b4_parser_class[]dnl
b4_percent_define_get3([extends], [ extends ])dnl
b4_percent_define_get3([implements], [ implements ])[
{
@@ -187,7 +187,7 @@ b4_locations_if([[
/**
* Communication interface between the scanner and the Bison-generated
- * parser <tt>]b4_parser_class_name[</tt>.
+ * parser <tt>]b4_parser_class[</tt>.
*/
public interface Lexer {
/** Token returned by the scanner to signal the end of its input. */
@@ -247,7 +247,7 @@ b4_lexer_if([[
/**
* Instantiates the Bison-generated parser.
*/
- public ]b4_parser_class_name (b4_parse_param_decl([b4_lex_param_decl])[)
]b4_maybe_throws([b4_init_throws])[
+ public ]b4_parser_class (b4_parse_param_decl([b4_lex_param_decl])[)
]b4_maybe_throws([b4_init_throws])[
{
]b4_percent_code_get([[init]])[
this.yylexer = new YYLexer(]b4_lex_param_call[);
@@ -259,7 +259,7 @@ b4_lexer_if([[
* Instantiates the Bison-generated parser.
* @@param yylexer The scanner that will supply tokens to the parser.
*/
- b4_lexer_if([[protected]], [[public]]) b4_parser_class_name[
(]b4_parse_param_decl([[Lexer yylexer]])[) ]b4_maybe_throws([b4_init_throws])[
+ b4_lexer_if([[protected]], [[public]]) b4_parser_class[
(]b4_parse_param_decl([[Lexer yylexer]])[) ]b4_maybe_throws([b4_init_throws])[
{
]b4_percent_code_get([[init]])[
this.yylexer = yylexer;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- skeletons: shorten b4_parser_class_name to b4_parser_class,
Akim Demaille <=