]> git.saurik.com Git - bison.git/commit - etc/bench.pl.in
Instead of using make_symbol<TOK_FOO>, generate make_FOO for each token type.
authorAkim Demaille <demaille@gostai.com>
Thu, 4 Sep 2008 20:41:01 +0000 (22:41 +0200)
committerAkim Demaille <demaille@gostai.com>
Sat, 15 Nov 2008 09:20:02 +0000 (10:20 +0100)
commitfe1b448ada5e3a79ae3f523e08b5004396f30ca9
tree19b637f4d3b3601ae94117db53e32f9bebc104ae
parent5679f31101d0bc5aab6adbce37212b2fdedd32cd
Instead of using make_symbol<TOK_FOO>, generate make_FOO for each token type.

Using template buys us nothing, and makes it uselessly complex to
construct a symbol.  Besides, it could not be generalized to other
languages, while make_FOO would work in C/Java etc.

* data/lalr1.cc (b4_symbol_): New.
(b4_symbol): Use it.
(b4_symbol_constructor_declaration_)
(b4_symbol_constructor_definition_): Instead of generating
specializations of an overloaded template function, just generate
several functions whose names are forged from the token names
without the token.prefix.
(b4_symbol_constructor_declarations): Generate them for all the
symbols, not just by class of symbol type, now that instead of
specializing a function template by the token, we generate a
function named after the token.
(b4_symbol_constructor_specialization_)
(b4_symbol_constructor_specializations): Remove.
* etc/bench.pl.in: Adjust to this new API.
ChangeLog
data/lalr1.cc
etc/bench.pl.in