<YYINITIAL> isvalid { return tok(Sym.ISVALID, yytext()); }
<YYINITIAL> for { return tok(Sym.FOR, yytext()); }
<YYINITIAL> to { return tok(Sym.TO, yytext()); }
+<YYINITIAL> this { return tok(Sym.THIS, yytext()); }
<YYINITIAL> structure { return tok(Sym.STRUCTURE, yytext()); }
<YYINITIAL> reserved { return tok(Sym.RESERVED, yytext()); }
terminal FORALL;
terminal IN;
terminal INTEST;
+ terminal THIS;
terminal COMMA;
terminal SIZEOF;
expr ::=
- simple_expr:se
+ THIS DOT ID:field
+ {:
+ debugMessage(PRODSTRING);
+ ParseNode expr = new ParseNode("expr", parser.curLine(1));
+ ParseNode sexpr = new ParseNode("simple_expr", parser.curLine(1));
+ ParseNode loc = new ParseNode("location", parser.curLine(1));
+ loc.addChild("thisfield",parser.curLine(1)).addChild(field);
+ sexpr.addChild(loc);
+ expr.addChild(sexpr);
+ RESULT = expr;
+ :}
+ | simple_expr:se
{:
debugMessage(PRODSTRING);
ParseNode expr = new ParseNode("expr", parser.curLine(1));