symbol::token.

This is allows the user to get the type of a token return by
yylex.

	* data/lalr1.cc (symbol::token): New.
	(yytoknum_): Define when %define lex_symbol, independently of
	%debug.
	(yytoken_number_): Move into...
	(symbol::token): here, since that's the only use.
	The other one is YYPRINT which was not officially supported
	by lalr1.cc, and anyway it did not work since YYPRINT uses this
	array under a different name (yytoknum).
This commit is contained in:
Akim Demaille
2008-09-01 10:51:46 +02:00
parent fc2476c7cd
commit 202598d3ab
2 changed files with 33 additions and 9 deletions

View File

@@ -1,3 +1,18 @@
2008-11-13 Akim Demaille <demaille@gostai.com>
symbol::token.
This is allows the user to get the type of a token return by
yylex.
* data/lalr1.cc (symbol::token): New.
(yytoknum_): Define when %define lex_symbol, independently of
%debug.
(yytoken_number_): Move into...
(symbol::token): here, since that's the only use.
The other one is YYPRINT which was not officially supported
by lalr1.cc, and anyway it did not work since YYPRINT uses this
array under a different name (yytoknum).
2008-11-13 Akim Demaille <demaille@gostai.com>
YYERRCODE.