Permalink
Browse files

fixed last few errors for reentrant parser

  • Loading branch information...
1 parent f04e5fd commit 68b5bd75cf68f32347ad539d0e9de696fc5d419b @tj committed May 8, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/parser.c
  2. +2 −2 src/parser.leg
View
@@ -357,12 +357,12 @@ YY_ACTION(void) yy_3_primary(CDESCENT *G, char *yytext, int yyleng, YY_XTYPE YY_
YY_ACTION(void) yy_2_primary(CDESCENT *G, char *yytext, int yyleng, YY_XTYPE YY_XVAR)
{
yyprintf((stderr, "do yy_2_primary\n"));
- Node *name= makeName(findRule(yytext)); name->name.variable= pop(); push(name); ;
+ Node *name= makeName(findRule(yytext, 0)); name->name.variable= pop(); push(name); ;
}
YY_ACTION(void) yy_1_primary(CDESCENT *G, char *yytext, int yyleng, YY_XTYPE YY_XVAR)
{
yyprintf((stderr, "do yy_1_primary\n"));
- push(makeVariable(yytext, 0)); ;
+ push(makeVariable(yytext)); ;
}
YY_ACTION(void) yy_3_suffix(CDESCENT *G, char *yytext, int yyleng, YY_XTYPE YY_XVAR)
{
View
@@ -88,8 +88,8 @@ suffix= primary (QUESTION { push(makeQuery(pop())); }
| PLUS { push(makePlus (pop())); }
)?
-primary= identifier { push(makeVariable(yytext, 0)); }
- COLON identifier !EQUAL { Node *name= makeName(findRule(yytext)); name->name.variable= pop(); push(name); }
+primary= identifier { push(makeVariable(yytext)); }
+ COLON identifier !EQUAL { Node *name= makeName(findRule(yytext, 0)); name->name.variable= pop(); push(name); }
| identifier !EQUAL { push(makeName(findRule(yytext, 0))); }
| OPEN expression CLOSE
| literal { push(makeString(yytext)); }

0 comments on commit 68b5bd7

Please sign in to comment.