fix incompatibility with bison generated parser (from
Gurusamy Sarathy [Tue, 15 Feb 2000 16:10:46 +0000 (16:10 +0000)]
Ignasi Roca <ignasi.roca@fujitsu.siemens.es>)

p4raw-id: //depot/perl@5098

toke.c

diff --git a/toke.c b/toke.c
index 44b3023..da4314d 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -7141,7 +7141,12 @@ Perl_yyerror(pTHX_ char *s)
     }
     else if (yychar > 255)
        where = "next token ???";
+#ifdef USE_PURE_BISON
+/*  GNU Bison sets the value -2 */
+    else if (yychar == -2) {
+#else
     else if ((yychar & 127) == 127) {
+#endif
        if (PL_lex_state == LEX_NORMAL ||
           (PL_lex_state == LEX_KNOWNEXT && PL_lex_defer == LEX_NORMAL))
            where = "at end of line";