tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1503056 - in /tomcat/trunk: java/org/apache/el/ java/org/apache/el/parser/ test/org/apache/el/parser/
Date Tue, 16 Jul 2013 11:42:25 GMT
On 16/07/2013 09:02, Violeta Georgieva wrote:
> 2013/7/15 <markt@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.

Mark

> void LambdaExpressionOrCall() #LambdaExpression : {}
> {
> <LPAREN>
> LambdaParameters() <ARROW>
> (LOOKAHEAD(3) LambdaExpression() | Choice() )
> <RPAREN>
> (MethodArguments())*
> }




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message