Fix token numbering (used to start at 258, not 257).

This commit is contained in:
Jesse Thilo
1998-11-25 22:13:09 +00:00
parent d968a24b6e
commit 5b2e3c8982

View File

@@ -122,6 +122,7 @@ static int lastprec; /* incremented for each %left, %right or %nonassoc seen */
static int gensym_count; /* incremented for each generated symbol */ static int gensym_count; /* incremented for each generated symbol */
static bucket *errtoken; static bucket *errtoken;
static bucket *undeftoken;
/* Nonzero if any action or guard uses the @n construct. */ /* Nonzero if any action or guard uses the @n construct. */
static int yylsp_needed; static int yylsp_needed;
@@ -190,7 +191,9 @@ reader()
errtoken->user_token_number = 256; /* Value specified by posix. */ errtoken->user_token_number = 256; /* Value specified by posix. */
/* construct a token that represents all undefined literal tokens. */ /* construct a token that represents all undefined literal tokens. */
/* it is always token number 2. */ /* it is always token number 2. */
getsym("$undefined.")->class = STOKEN; undeftoken = getsym("$undefined.");
undeftoken->class = STOKEN;
undeftoken->user_token_number = 2;
/* Read the declaration section. Copy %{ ... %} groups to ftable and fdefines file. /* Read the declaration section. Copy %{ ... %} groups to ftable and fdefines file.
Also notice any %token, %left, etc. found there. */ Also notice any %token, %left, etc. found there. */
if (noparserflag) if (noparserflag)