(Decl Summary): yytname's first element is not always "$end", as the

user might specify a different name for the end token.
This commit is contained in:
Paul Eggert
2002-12-21 12:49:33 +00:00
parent 879ca4f81b
commit f67ad422a4

View File

@@ -3753,7 +3753,8 @@ Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
Generate an array of token names in the parser file. The name of the Generate an array of token names in the parser file. The name of the
array is @code{yytname}; @code{yytname[@var{i}]} is the name of the array is @code{yytname}; @code{yytname[@var{i}]} is the name of the
token whose internal Bison token code number is @var{i}. The first token whose internal Bison token code number is @var{i}. The first
three elements of @code{yytname} are always @code{"$end"}, three elements of @code{yytname} correspond to the predefined tokens
@code{"$end"},
@code{"error"}, and @code{"$undefined"}; after these come the symbols @code{"error"}, and @code{"$undefined"}; after these come the symbols
defined in the grammar file. defined in the grammar file.