From 6ed15cde294bb7503161e136371c6f36f51c6b3b Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 16 Aug 2008 15:47:30 +0200 Subject: [PATCH 1/1] Make parser::yytranslate static. Small speedup (1%) on the list grammar. And makes yytranslate_ available in non member functions. * data/lalr1.cc (yytranslate_): Does not need to be a instance function. --- ChangeLog | 9 +++++++++ data/lalr1.cc | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e3c3e0e5..d9e52b87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-11-10 Akim Demaille + + Make parser::yytranslate static. + Small speedup (1%) on the list grammar. And makes yytranslate_ available + in non member functions. + + * data/lalr1.cc (yytranslate_): Does not need to be a instance + function. + 2008-11-10 Akim Demaille Avoid trailing spaces. diff --git a/data/lalr1.cc b/data/lalr1.cc index c5433435..24b011bb 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -497,7 +497,7 @@ m4_ifdef([b4_stype], #endif /// Convert a scanner token number \a t to a symbol number. - token_number_type yytranslate_ (int t); + static inline token_number_type yytranslate_ (int t); /// A complete symbol, with its type. template -- 2.45.2