summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoca, Ignasi <ignasi.roca@fujitsu.siemens.es>2001-01-22 18:51:58 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-23 16:13:27 +0000
commit48cf72c85711f1650a96caf8dc746a297ee2bd06 (patch)
tree5884f9e4c95d96b7fde498099e063d387c6164ea
parentc512e37464e3d1c993af1ac99fc83869882e5c21 (diff)
downloadperl-48cf72c85711f1650a96caf8dc746a297ee2bd06.tar.gz
RE: [PATCH perl@8269] Corrections for Perl_yylex_r (used by a reentrant parser as Bison)
Message-ID: <5930DC161690D21196670090271575470397E915@madt009a.siemens.es> p4raw-id: //depot/perl@8532
-rw-r--r--embed.h13
-rwxr-xr-xembed.pl4
-rw-r--r--objXSUB.h1
-rw-r--r--perlapi.c1
-rw-r--r--perly.y1
-rw-r--r--proto.h4
6 files changed, 6 insertions, 18 deletions
diff --git a/embed.h b/embed.h
index 4c7c531499..790f43b9c1 100644
--- a/embed.h
+++ b/embed.h
@@ -755,10 +755,8 @@
#define yyerror Perl_yyerror
#ifdef USE_PURE_BISON
#define yylex_r Perl_yylex_r
-#define yylex Perl_yylex
-#else
-#define yylex Perl_yylex
#endif
+#define yylex Perl_yylex
#define yyparse Perl_yyparse
#define yywarn Perl_yywarn
#if defined(MYMALLOC)
@@ -2231,10 +2229,8 @@
#define yyerror(a) Perl_yyerror(aTHX_ a)
#ifdef USE_PURE_BISON
#define yylex_r(a,b) Perl_yylex_r(aTHX_ a,b)
-#define yylex(a,b) Perl_yylex(aTHX_ a,b)
-#else
-#define yylex() Perl_yylex(aTHX)
#endif
+#define yylex() Perl_yylex(aTHX)
#define yyparse() Perl_yyparse(aTHX)
#define yywarn(a) Perl_yywarn(aTHX_ a)
#if defined(MYMALLOC)
@@ -4379,12 +4375,9 @@
#ifdef USE_PURE_BISON
#define Perl_yylex_r CPerlObj::Perl_yylex_r
#define yylex_r Perl_yylex_r
+#endif
#define Perl_yylex CPerlObj::Perl_yylex
#define yylex Perl_yylex
-#else
-#define Perl_yylex CPerlObj::Perl_yylex
-#define yylex Perl_yylex
-#endif
#define Perl_yyparse CPerlObj::Perl_yyparse
#define yyparse Perl_yyparse
#define Perl_yywarn CPerlObj::Perl_yywarn
diff --git a/embed.pl b/embed.pl
index d823456e8c..e5ca87a4f0 100755
--- a/embed.pl
+++ b/embed.pl
@@ -2103,10 +2103,8 @@ Ap |I32 |whichsig |char* sig
p |int |yyerror |char* s
#ifdef USE_PURE_BISON
p |int |yylex_r |YYSTYPE *lvalp|int *lcharp
-p |int |yylex |YYSTYPE *lvalp|int *lcharp
-#else
-p |int |yylex
#endif
+p |int |yylex
p |int |yyparse
p |int |yywarn |char* s
#if defined(MYMALLOC)
diff --git a/objXSUB.h b/objXSUB.h
index 5867ed279b..8cdfec059e 100644
--- a/objXSUB.h
+++ b/objXSUB.h
@@ -1926,7 +1926,6 @@
#undef whichsig
#define whichsig Perl_whichsig
#ifdef USE_PURE_BISON
-#else
#endif
#if defined(MYMALLOC)
#undef Perl_dump_mstats
diff --git a/perlapi.c b/perlapi.c
index fb69281c51..f0016d516e 100644
--- a/perlapi.c
+++ b/perlapi.c
@@ -3482,7 +3482,6 @@ Perl_whichsig(pTHXo_ char* sig)
return ((CPerlObj*)pPerl)->Perl_whichsig(sig);
}
#ifdef USE_PURE_BISON
-#else
#endif
#if defined(MYMALLOC)
diff --git a/perly.y b/perly.y
index 74802f4237..f9c5c5f606 100644
--- a/perly.y
+++ b/perly.y
@@ -61,6 +61,7 @@ static void yydestruct(pTHXo_ void *ptr);
#ifdef USE_PURE_BISON
#define YYLEX_PARAM (&yychar)
+#define yylex yylex_r
#endif
%}
diff --git a/proto.h b/proto.h
index 0a0a60c961..97e7ba7e65 100644
--- a/proto.h
+++ b/proto.h
@@ -844,10 +844,8 @@ PERL_CALLCONV I32 Perl_whichsig(pTHX_ char* sig);
PERL_CALLCONV int Perl_yyerror(pTHX_ char* s);
#ifdef USE_PURE_BISON
PERL_CALLCONV int Perl_yylex_r(pTHX_ YYSTYPE *lvalp, int *lcharp);
-PERL_CALLCONV int Perl_yylex(pTHX_ YYSTYPE *lvalp, int *lcharp);
-#else
-PERL_CALLCONV int Perl_yylex(pTHX);
#endif
+PERL_CALLCONV int Perl_yylex(pTHX);
PERL_CALLCONV int Perl_yyparse(pTHX);
PERL_CALLCONV int Perl_yywarn(pTHX_ char* s);
#if defined(MYMALLOC)