From: Roca, Ignasi Date: Mon, 22 Jan 2001 17:51:58 +0000 (+0100) Subject: RE: [PATCH perl@8269] Corrections for Perl_yylex_r (used by a reentrant parser as... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=48cf72c85711f1650a96caf8dc746a297ee2bd06;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/embed.h b/embed.h index 4c7c531..790f43b 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 d823456..e5ca87a 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 5867ed2..8cdfec0 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 fb69281..f0016d5 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 74802f4..f9c5c5f 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 0a0a60c..97e7ba7 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)