Push the state, value, and location at the same time.

This is needed to prepare a forthcoming patch that fuses the three
stacks into one.

	* data/lalr1.cc (parser::yypush_): New.
	(parser::yynewstate): Change the semantics: instead of arriving to
	this label when value and location have been pushed, but yystate
	is to be pushed on the state stack, now the three of them must
	have been pushed before.  yystate still must be the new state.
	This allows to use yypush_ everywhere instead of individual
	handling of the stacks.
This commit is contained in:
Akim Demaille
2008-10-22 05:17:07 -05:00
parent c4585f1e2d
commit 7dedf26e55
2 changed files with 35 additions and 10 deletions

View File

@@ -1,3 +1,17 @@
2008-11-03 Akim Demaille <demaille@gostai.com>
Push the state, value, and location at the same time.
This is needed to prepare a forthcoming patch that fuses the three
stacks into one.
* data/lalr1.cc (parser::yypush_): New.
(parser::yynewstate): Change the semantics: instead of arriving to
this label when value and location have been pushed, but yystate
is to be pushed on the state stack, now the three of them must
have been pushed before. yystate still must be the new state.
This allows to use yypush_ everywhere instead of individual
handling of the stacks.
2008-11-03 Akim Demaille <demaille@gostai.com>
Prefer references to pointers.