2013/7/16 Mark Thomas wrote: > > On 16/07/2013 09:02, Violeta Georgieva wrote: > > 2013/7/15 <ma...@apache.org> > > <snip/> > > >> +public class AstLambdaExpressionOrInvocation extends SimpleNode { > >> + > >> + public AstLambdaExpressionOrInvocation(int id) { > >> + super(id); > >> + } > >> + > >> + > >> + @Override > >> + public Object getValue(EvaluationContext ctx) throws ELException { > >> + > >> + if (children.length == 2) { > > > > Why you are limiting the children to 2. > > I was working on the basis that one LambdaExpression should have one set > of method parameters. > > > We have MethodArguments -> zero or more: > > That is what the specification indicates and where I would have got the > choice of '*' rather than '? 'from but as I think about it I wonder if > that is right. It doesn't look right. My instinct is that it should be '?'. > > Note that the use of * might be an artefact of how they decided to > implement the spec. Note also that the grammar is not definitive - it is > only meant to be a guide. > > Do you have an example of a valid expression that needs multiple method > arguments? I'll try and come up with one. If I can't I'll change the > grammar and re-generate.
What about (x->y->x+y)(a)(b) in the spec it is said that "x->y->x+y is parsed as x->(y->x+y)"