]> git.saurik.com Git - bison.git/commit - ChangeLog-2012
Introduce make_symbol.
authorAkim Demaille <demaille@gostai.com>
Mon, 18 Aug 2008 13:48:36 +0000 (15:48 +0200)
committerAkim Demaille <demaille@gostai.com>
Tue, 11 Nov 2008 14:16:53 +0000 (15:16 +0100)
commit2873fdf8b1f91a9cbc8d258367c920eb637a0099
tree977e8746e73d68504a68303ea0068f5017de6afe
parent8be046d7b84f6949ecc0eb80abb4edb02dacae76
Introduce make_symbol.

make_symbol provides a means to construct a full symbol (kind, value,
location) in a single shot.  It is meant to be a Symbol constructor,
parameterized by the symbol kind so that overloading would prevent
incorrect kind/value pairs.  Unfortunately parameterized constructors do
not work well in C++ (unless the parameter also appears as an argument,
which is not acceptable), hence the use of a function instead of a
constructor.

* data/lalr1.cc (b4_symbol_constructor_declaration_)
(b4_symbol_constructor_declarations)
(b4_symbol_constructor_specialization_)
(b4_symbol_constructor_specializations)
(b4_symbol_constructor_definition_)
(b4_symbol_constructor_definitions): New.
Use them where appropriate to generate declaration, declaration of
the specializations, and implementations of the templated
overloaded function "make_symbol".
(variant::variant): Always define a default ctor.
Also provide a copy ctor.
(symbol_base_type, symbol_type): New ctor overloads for value-less
symbols.
(symbol_type): Now public, so that functions such as yylex can use
it.
ChangeLog
data/lalr1.cc