On 16/07/2013 16:02, Mark Thomas wrote: > On 16/07/2013 15:39, Violeta Georgieva wrote: >> 2013/7/16 Mark Thomas wrote: >>> > > <snip/> > >>> 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)" > > I dug into the change history of the grammar used in the spec. The > example you quote above is indeed the style of invocation that triggered > a change from '?' to '*'. > > Modifying your example a little, consider this: > (x->y->x-y)(1)(2)
This isn't even parsed correctly currently. The result is two nested lambda expressions both with a single parameter x. I suspect that the spec grammar forces what I have called LambdaExpressionOrInvocation to parse as LambdaExpression is the key difference here. I have found the references in the spec that make clear that the (args)(args) syntax is expected but nothing that defines the ordering - I'll have to look at the RI. (Once I get the parsing fixed). Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org