diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-21 07:11:39 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-21 07:11:39 -0800 |
commit | 213412b3e747e29bf885e15b269191d9edb06a0a (patch) | |
tree | c3faeef47ec739bc1213da16152239460f7ba3e8 /parser.y | |
parent | 7515303c46d2e4e0b18544d1fe5acd942163ef42 (diff) | |
download | txr-213412b3e747e29bf885e15b269191d9edb06a0a.tar.gz txr-213412b3e747e29bf885e15b269191d9edb06a0a.tar.bz2 txr-213412b3e747e29bf885e15b269191d9edb06a0a.zip |
Bug #35139
Better fix.
* parser.y (YYEOF): If YYEOF is not defined, define it as zero.
(yybadtoken): Undo previous changes: do not test for zero.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -962,7 +962,7 @@ val get_spec(void) } #ifndef YYEOF -#define YYEOF YYEMPTY +#define YYEOF 0 #endif void yybadtoken(int tok, val context) @@ -1013,7 +1013,7 @@ void yybadtoken(int tok, val context) yyerrorf(lit("unexpected ~a"), problem, nao); else if (context) /* Byacc sets yychar to 0 */ - if (tok == YYEOF || tok == YYEMPTY || tok == 0) + if (tok == YYEOF || tok == YYEMPTY) yyerrorf(lit("unterminated ~a"), context, nao); else if (tok == '\n') yyerrorf(lit("newline in ~a"), context, nao); @@ -1022,7 +1022,7 @@ void yybadtoken(int tok, val context) else if (tok == YYEOF) yyerrorf(lit("unexpected end of input"), nao); - else if (tok == YYEMPTY || tok == 0) + else if (tok == YYEMPTY) return; else yyerrorf(lit("unexpected ~s"), chr(tok), nao); |