This patch:
- limits the regexp for namespace to what is in the spec
- removes the namespace token since the maximal munch rule means that there is a risk the second and third parts of a ternary expression would, incorrectly, be interpreted as a fucntion call.
- modifies the lookahead for function to be more explicit about what to look for
My set of weird and wonderful test cases (mixing ternary, fucntion and empty) now all work.
Updated generated files will follow.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@681736
13f79535-47bb-0310-9956-
ffa450edef68
void NonLiteral() : {}
{
<LPAREN> Expression() <RPAREN>
- | LOOKAHEAD(3) Function()
+ | LOOKAHEAD((<IDENTIFIER> <COLON>)? <IDENTIFIER>) Function()
| Identifier()
}
Token t1 = null;
}
{
- (t0=<NAMESPACE>)? t1=<IDENTIFIER>
+ (t0=<IDENTIFIER> <COLON>)? t1=<IDENTIFIER>
{
if (t0 != null) {
jjtThis.setPrefix(t0.image.substring(0, t0.image.length() - 1));
| < MOD0 : "%" >
| < MOD1 : "mod" >
| < IDENTIFIER : (<LETTER>|<IMPL_OBJ_START>) (<LETTER>|<DIGIT>)* >
-| < NAMESPACE : (<IDENTIFIER> (<IDENTIFIER>|<MINUS>|<DOT>)* <COLON>) >
| < FUNCTIONSUFFIX : (<IDENTIFIER>) >
| < #IMPL_OBJ_START: "#" >
| < #LETTER: