Introduce a hierarchy for symbols.

* data/lalr1.cc (symbol_base_type, symbol_type): New.
	(data_type): Rename as...
	(stack_symbol_type): this.
	Derive from symbol_base_type.
	(yy_symbol_value_print_): Merge into...
	(yy_symbol_print_): this.
	Rename as...
	(yy_print_): this.
	(yydestruct_): Rename as...
	(yy_destroy_): this.
	(b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
	(parser::parse): yyla is now of symbol_type.
	Use its type member instead of yytoken.
This commit is contained in:
Akim Demaille
2008-08-02 21:42:48 +02:00
parent bc0b0477e2
commit 1f7d007bf6
2 changed files with 192 additions and 111 deletions

View File

@@ -1,3 +1,20 @@
2008-11-09 Akim Demaille <demaille@gostai.com>
Introduce a hierarchy for symbols.
* data/lalr1.cc (symbol_base_type, symbol_type): New.
(data_type): Rename as...
(stack_symbol_type): this.
Derive from symbol_base_type.
(yy_symbol_value_print_): Merge into...
(yy_symbol_print_): this.
Rename as...
(yy_print_): this.
(yydestruct_): Rename as...
(yy_destroy_): this.
(b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
(parser::parse): yyla is now of symbol_type.
Use its type member instead of yytoken.
2008-11-09 Akim Demaille <demaille@gostai.com>
Rename data_type and stack_symbol_type.