RE: [PATCH perl@8269] Corrections for Perl_yylex_r (used by a reentrant parser as...
Roca, Ignasi [Mon, 22 Jan 2001 17:51:58 +0000 (18:51 +0100)]
Message-ID: <5930DC161690D21196670090271575470397E915@madt009a.siemens.es>

p4raw-id: //depot/perl@8532

embed.h
embed.pl
objXSUB.h
perlapi.c
perly.y
proto.h

diff --git a/embed.h b/embed.h
index 4c7c531..790f43b 100644 (file)
--- a/embed.h
+++ b/embed.h
 #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)
 #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)
 #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
index d823456..e5ca87a 100755 (executable)
--- 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)
index 5867ed2..8cdfec0 100644 (file)
--- a/objXSUB.h
+++ b/objXSUB.h
 #undef  whichsig
 #define whichsig               Perl_whichsig
 #ifdef USE_PURE_BISON
-#else
 #endif
 #if defined(MYMALLOC)
 #undef  Perl_dump_mstats
index fb69281..f0016d5 100644 (file)
--- 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 74802f4..f9c5c5f 100644 (file)
--- 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 0a0a60c..97e7ba7 100644 (file)
--- 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)