From: Jarkko Hietaniemi Date: Mon, 26 Oct 1998 08:47:32 +0000 (+0000) Subject: s/YYLEXPARAM/PERL_YYLEX_PARAM_DECL/g X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bee8cd070729d5e43d142bdd15dbfc4300e23b39;p=p5sagit%2Fp5-mst-13.2.git s/YYLEXPARAM/PERL_YYLEX_PARAM_DECL/g Bison really wants YYLEX_PARAM. p4raw-id: //depot/cfgperl@2091 --- diff --git a/perly.y b/perly.y index 5c7e6f7..78378b6 100644 --- a/perly.y +++ b/perly.y @@ -42,7 +42,7 @@ dep(void) #endif /* !OEMVS && !__OPEN_VM && !POSIX_BC */ #ifdef USE_PURE_BISON -#define YYLEXPARAM (&yychar) +#define YYLEX_PARAM (&yychar) #endif %} diff --git a/proto.h b/proto.h index efc1ea8..246112e 100644 --- a/proto.h +++ b/proto.h @@ -672,10 +672,11 @@ VIRTUAL void watch _((char** addr)); VIRTUAL I32 whichsig _((char* sig)); VIRTUAL int yyerror _((char* s)); #ifdef USE_PURE_BISON -VIRTUAL int yylex _((YYSTYPE* lvalp, int* lcharp)); +# define PERL_YYLEX_PARAM_DECL YYSTYPE *, int * #else -VIRTUAL int yylex _((void)); +# define PERL_YYLEX_PARAM_DECL #endif +VIRTUAL int yylex _((PERL_YYLEX_PARAM_DECL)); VIRTUAL int yyparse _((void)); VIRTUAL int yywarn _((char* s)); diff --git a/toke.c b/toke.c index 1827a39..e086203 100644 --- a/toke.c +++ b/toke.c @@ -118,9 +118,6 @@ int* yychar_pointer = NULL; #endif #define yylval (*yylval_pointer) #define yychar (*yychar_pointer) -#define YYLEXPARAM yylval_pointer,yychar_pointer -#else -#define YYLEXPARAM #endif #include "keywords.h" @@ -798,7 +795,7 @@ sublex_done(void) if (PL_lex_casemods) { /* oops, we've got some unbalanced parens */ PL_lex_state = LEX_INTERPCASEMOD; - return yylex(YYLEXPARAM); + return yylex(PERL_YYLEX_PARAM_DECL); } /* Is there a right-hand side to take care of? */ @@ -1585,12 +1582,7 @@ filter_gets(register SV *sv, register PerlIO *fp, STRLEN append) if we already built the token before, use it. */ -int yylex -#ifdef USE_PURE_BISON -(YYSTYPE* lvalp, int* lcharp) -#else -(void) -#endif +int yylex(PERL_YYLEX_PARAM_DECL) { dTHR; register char *s; @@ -1742,7 +1734,7 @@ int yylex if (PL_bufptr != PL_bufend) PL_bufptr += 2; PL_lex_state = LEX_INTERPCONCAT; - return yylex(YYLEXPARAM); + return yylex(PERL_YYLEX_PARAM_DECL); } else { s = PL_bufptr + 1; @@ -1786,7 +1778,7 @@ int yylex Aop(OP_CONCAT); } else - return yylex(YYLEXPARAM); + return yylex(PERL_YYLEX_PARAM_DECL); } case LEX_INTERPPUSH: @@ -1819,7 +1811,7 @@ int yylex s = PL_bufptr; Aop(OP_CONCAT); } - return yylex(YYLEXPARAM); + return yylex(PERL_YYLEX_PARAM_DECL); case LEX_INTERPENDMAYBE: if (intuit_more(PL_bufptr)) { @@ -1868,11 +1860,11 @@ int yylex Aop(OP_CONCAT); else { PL_bufptr = s; - return yylex(YYLEXPARAM); + return yylex(PERL_YYLEX_PARAM_DECL); } } - return yylex(YYLEXPARAM); + return yylex(PERL_YYLEX_PARAM_DECL); case LEX_FORMLINE: PL_lex_state = LEX_NORMAL; s = scan_formline(PL_bufptr); @@ -2152,7 +2144,7 @@ int yylex if (PL_lex_formbrack && PL_lex_brackets <= PL_lex_formbrack) { PL_bufptr = s; PL_lex_state = LEX_FORMLINE; - return yylex(YYLEXPARAM); + return yylex(PERL_YYLEX_PARAM_DECL); } goto retry; case '\r': @@ -2176,7 +2168,7 @@ int yylex if (PL_lex_formbrack && PL_lex_brackets <= PL_lex_formbrack) { PL_bufptr = s; PL_lex_state = LEX_FORMLINE; - return yylex(YYLEXPARAM); + return yylex(PERL_YYLEX_PARAM_DECL); } } else { @@ -2513,7 +2505,7 @@ int yylex if (PL_lex_fakebrack) { PL_lex_state = LEX_INTERPEND; PL_bufptr = s; - return yylex(YYLEXPARAM); /* ignore fake brackets */ + return yylex(PERL_YYLEX_PARAM_DECL); /* ignore fake brackets */ } if (*s == '-' && s[1] == '>') PL_lex_state = LEX_INTERPENDMAYBE; @@ -2524,7 +2516,7 @@ int yylex if (PL_lex_brackets < PL_lex_fakebrack) { PL_bufptr = s; PL_lex_fakebrack = 0; - return yylex(YYLEXPARAM); /* ignore fake brackets */ + return yylex(PERL_YYLEX_PARAM_DECL); /* ignore fake brackets */ } force_next('}'); TOKEN(';');