| <ARRAYASSIGN : "=>">
}
+<PHPPARSING> TOKEN :
+{
+ <LIST : "list">
+}
/* RESERVED WORDS AND LITERALS */
<PHPPARSING> TOKEN :
expr = PrintExpression()
{return expr;}
|
+ expr = ListExpression()
+ {return expr;}
+|
expr = ConditionalExpression()
[
assignOperator = AssignmentOperator()
}
}
+String ListExpression() :
+{
+ final StringBuffer buff = new StringBuffer("list(");
+ String expr;
+}
+{
+ <LIST> <LPAREN>
+ [
+ expr = VariableDeclaratorId()
+ {buff.append(expr);}
+ ]
+ <COMMA>
+ {buff.append(",");}
+ [
+ expr = VariableDeclaratorId()
+ {buff.append(expr);}
+ ]
+ <RPAREN>
+ {
+ buff.append(")");
+ return buff.toString();
+ }
+}
+
void EchoStatement() :
{}
{