summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-15 16:10:46 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-15 16:10:46 +0000
commitcdfb297e497e6b3fa53d95a7caf146fe81f33555 (patch)
tree1be9a0c252afce5e8792b8bdc4870a7a0a804511 /toke.c
parentd0650a05fe2c0c137c168267e07071f674fa64bd (diff)
downloadperl-cdfb297e497e6b3fa53d95a7caf146fe81f33555.tar.gz
fix incompatibility with bison generated parser (from
Ignasi Roca <ignasi.roca@fujitsu.siemens.es>) p4raw-id: //depot/perl@5098
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index 44b3023f10..da4314d0ac 100644
--- 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";