+2009-03-02 Akim Demaille <demaille@gostai.com>
+
+ Coding style changes.
+ * data/lalr1.cc (b4_symbol_constructor_declaration_)
+ (b4_symbol_constructor_declarations)
+ (b4_symbol_constructor_definition_)
+ (b4_symbol_constructor_definitions)
+ (b4_yytranslate_definition): Rename as...
+ (b4_symbol_constructor_declare_)
+ (b4_symbol_constructor_declare)
+ (b4_symbol_constructor_define_)
+ (b4_symbol_constructor_define)
+ (b4_yytranslate_define): these.
+ * data/variant.hh (b4_variant_definition): Rename as...
+ (b4_variant_define): this.
+
2009-03-02 Akim Demaille <demaille@gostai.com>
Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
m4_popdef([b4_dollar_dollar])dnl
])])
-# b4_symbol_constructor_declaration_(SYMBOL-NUMBER)
-# -------------------------------------------------
+# b4_symbol_constructor_declare_(SYMBOL-NUMBER)
+# ---------------------------------------------
# Declare the overloaded version of make_symbol for the (common) type of
# these SYMBOL-NUMBERS. Use at class-level.
-m4_define([b4_symbol_constructor_declaration_],
+m4_define([b4_symbol_constructor_declare_],
[b4_symbol_if([$1], [is_token], [b4_symbol_if([$1], [has_id],
[ static inline
symbol_type
])])])
-# b4_symbol_constructor_declarations
-# ----------------------------------
+# b4_symbol_constructor_declare
+# -----------------------------
# Declare symbol constructors for all the value types.
# Use at class-level.
-m4_define([b4_symbol_constructor_declarations],
+m4_define([b4_symbol_constructor_declare],
[b4_variant_if([
// Symbol constructors declarations.
-b4_symbol_foreach([b4_symbol_constructor_declaration_])])])
+b4_symbol_foreach([b4_symbol_constructor_declare_])])])
-# b4_symbol_constructor_definition_(SYMBOL-NUMBER)
-# ------------------------------------------------
+# b4_symbol_constructor_define_(SYMBOL-NUMBER)
+# --------------------------------------------
# Define symbol constructor for this SYMBOL-NUMBER.
-m4_define([b4_symbol_constructor_definition_],
+m4_define([b4_symbol_constructor_define_],
[b4_symbol_if([$1], [is_token], [b4_symbol_if([$1], [has_id],
[ b4_parser_class_name::symbol_type
b4_parser_class_name::make_[]b4_symbol_([$1], [id]) (dnl
])])])
-# b4_symbol_constructor_definitions
-# ----------------------------------
+# b4_symbol_constructor_define
+# ----------------------------
# Define the overloaded versions of make_symbol for all the value types.
-m4_define([b4_symbol_constructor_definitions],
+m4_define([b4_symbol_constructor_define],
[b4_variant_if([
// Implementation of make_symbol for each symbol type.
-b4_symbol_foreach([b4_symbol_constructor_definition_])])])
+b4_symbol_foreach([b4_symbol_constructor_define_])])])
-# b4_yytranslate_definition
-# -------------------------
+# b4_yytranslate_define
+# ---------------------
# Define yytranslate_. Sometimes we want it in the header file,
# sometimes the cc file suffices.
-m4_define([b4_yytranslate_definition],
+m4_define([b4_yytranslate_define],
[[ // Symbol number corresponding to token number t.
]b4_parser_class_name[::token_number_type
]b4_parser_class_name[::yytranslate_ (]b4_lex_symbol_if([token_type],
]b4_namespace_open[
]b4_locations_if([ class position;
class location;])[
-]b4_variant_if([b4_variant_definition])[
+]b4_variant_if([b4_variant_define])[
]b4_namespace_close[
]b4_locations_if([#include "location.hh"])[
{
public:
]b4_public_types_declare[
-]b4_symbol_constructor_declarations[
+]b4_symbol_constructor_declare[
/// Build a parser object.
]b4_parser_class_name[ (]b4_parse_param_decl[);
virtual ~]b4_parser_class_name[ ();
]b4_parse_param_vars[
};
-]b4_lex_symbol_if([b4_yytranslate_definition
+]b4_lex_symbol_if([b4_yytranslate_define
b4_public_types_define
-b4_symbol_constructor_definitions])[
+b4_symbol_constructor_define])[
]b4_namespace_close[
]b4_percent_define_flag_if([[global_tokens_and_yystype]],
`---------------*/
]b4_lex_symbol_if([], [b4_public_types_define
-b4_symbol_constructor_definitions])[
+b4_symbol_constructor_define])[
// stack_symbol_type.
]b4_parser_class_name[::stack_symbol_type::stack_symbol_type ()
}
#endif // YYDEBUG
-]b4_lex_symbol_if([], [b4_yytranslate_definition])[
+]b4_lex_symbol_if([], [b4_yytranslate_define])[
]b4_namespace_close[
]b4_epilogue[]dnl
m4_divert_pop(0)