develooper Front page | perl.perl5.porters | Postings from January 2001

RE: [PATCH perl@8269] Corrections for Perl_yylex_r (used by a reentra nt parser as Bison)

Thread Next
From:
Roca, Ignasi
Date:
January 22, 2001 08:54
Subject:
RE: [PATCH perl@8269] Corrections for Perl_yylex_r (used by a reentra nt parser as Bison)
Message ID:
5930DC161690D21196670090271575470397E915@madt009a.siemens.es
> On Thu, Jan 04, 2001 at 12:47:10PM +0100, Roca, Ignasi wrote:
> > Here some diff on perl@8269 sources to correct Perl_yylex_r declarations
> as
> > well as to correct the stack counter used in Perl_yylex_r function.
> 
> I now applied the toke.c pat of this, the yylex #define thing needs to
> be solved in some other way.
> 
What do you think with following changes to avoid problems with declarations
of yylex and yylex_r when using a pure Bison.


Following diff files are on perl@8506:
=================================================
--- perly.y.orig        Wed Jan 17 16:58:29 2001
+++ perly.y     Mon Jan 22 09:54:31 2001
@@ -61,6 +61,7 @@
 #ifdef USE_PURE_BISON
 #define YYLEX_PARAM (&yychar)
+#define yylex yylex_r
 #endif
 
 %}
=================================================
--- embed.pl.orig       Sun Jan 21 19:30:39 2001
+++ embed.pl    Mon Jan 22 09:53:58 2001
@@ -2103,10 +2103,8 @@
 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)
=================================================


-- Ignasi Roca

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About