bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Define make_symbol in the header.


From: Akim Demaille
Subject: [PATCH] Define make_symbol in the header.
Date: Thu, 13 Nov 2008 05:52:12 -0000

To reach good performances these functions should be inlined (yet this is
to measure precisely).  To this end they must be available to the caller.

        * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
        location_type with the class name.
        Since will now be output in the header, declare "inline".
        No longer use b4_symbol_constructor_specializations, but
        b4_symbol_constructor_definitions in the header.
        Don't call it in the *.cc file.
---
 ChangeLog     |   13 +++++++++++++
 data/lalr1.cc |    3 ++-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5b1046b..a9c41f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2008-11-13  Akim Demaille  <address@hidden>
 
+       Define make_symbol in the header.
+       To reach good performances these functions should be inlined (yet this 
is
+       to measure precisely).  To this end they must be available to the 
caller.
+       
+       * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
+       location_type with the class name.
+       Since will now be output in the header, declare "inline".
+       No longer use b4_symbol_constructor_specializations, but
+       b4_symbol_constructor_definitions in the header.
+       Don't call it in the *.cc file.
+
+2008-11-13  Akim Demaille  <address@hidden>
+
        Define yytranslate in the header for lex_symbol.
        * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
        into the header file when using %define lex_symbol.
diff --git a/data/lalr1.cc b/data/lalr1.cc
index d2c33a1..2e9259c 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -877,6 +877,7 @@ m4_ifdef([b4_stype],
 
 ]b4_lex_symbol_if([b4_yytranslate_definition])[
 ]b4_symbol_constructor_specializations[
+]b4_lex_symbol_if([b4_symbol_constructor_definitions])[
 ]b4_namespace_close[
 
 ]b4_percent_define_flag_if([[global_tokens_and_yystype]],
@@ -1026,7 +1027,7 @@ b4_percent_code_get[]dnl
   | Symbol types.  |
   `---------------*/
 
-]b4_symbol_constructor_definitions[
+]b4_lex_symbol_if([], [b4_symbol_constructor_definitions])[
 
   // stack_symbol_type.
   ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type ()
-- 
1.6.0.2.588.g3102





reply via email to

[Prev in Thread] Current Thread [Next in Thread]