From dceaa2b1ee2bb4e6aa7de3bd8906f96ace9049a9 Mon Sep 17 00:00:00 2001 From: The Alliance Tool Date: Mon, 18 Apr 2005 13:06:21 +0000 Subject: [PATCH] * ppt/src : - Bug make pat_decl_y a reentrant parser. This bug shows only under Darwin. --- alliance/src/ppt/src/Makefile.am | 3 --- alliance/src/ppt/src/pat_decl_l.l | 5 +++++ alliance/src/ppt/src/pat_decl_y.y | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/alliance/src/ppt/src/Makefile.am b/alliance/src/ppt/src/Makefile.am index c656016e..85037018 100644 --- a/alliance/src/ppt/src/Makefile.am +++ b/alliance/src/ppt/src/Makefile.am @@ -18,9 +18,6 @@ CLEANFILES = pat_decl_y.c pat_decl_y.h pat_desc_y.h pat_desc_y.c \ pat_decl_y.c pat_decl_y.h : $(srcdir)/pat_decl_y.y $(YACC) -d $(YFLAGS) $(srcdir)/pat_decl_y.y \ && sed -e "s/yy/pat_decl_y_/g" -e "s/YY/PAT_DECL_Y_/g" y.tab.c \ - | sed -e "s/int[\t ]*pat_decl_y_char;/extern int pat_decl_y_char;/" \ - | sed -e "s/PAT_DECL_Y_STYPE[\t ]*pat_decl_y_lval;/extern PAT_DECL_Y_STYPE pat_decl_y_lval;/" \ - | sed -e "s/int[\t ]*pat_decl_y_nerrs;/extern int pat_decl_y_nerrs;/" \ > pat_decl_y.c \ && sed -e "s/yy/pat_decl_y_/g" -e "s/YY/PAT_DECL_Y_/g" y.tab.h > pat_decl_y.h diff --git a/alliance/src/ppt/src/pat_decl_l.l b/alliance/src/ppt/src/pat_decl_l.l index acdb44ee..6dd1f398 100644 --- a/alliance/src/ppt/src/pat_decl_l.l +++ b/alliance/src/ppt/src/pat_decl_l.l @@ -36,6 +36,11 @@ #include "pat_type.h" #include "pat_decl_y.h" +extern int yychar; +extern YYSTYPE yylval; +extern int yynerrs; + + /* ICI LUDO #ifdef YY_DECL #undef YY_DECL diff --git a/alliance/src/ppt/src/pat_decl_y.y b/alliance/src/ppt/src/pat_decl_y.y index 2556d184..f8b47e26 100644 --- a/alliance/src/ppt/src/pat_decl_y.y +++ b/alliance/src/ppt/src/pat_decl_y.y @@ -390,6 +390,7 @@ struct paseq *ptseq ; %} +%pure-parser %union { int valu;