[ 
https://issues.apache.org/jira/browse/JEXL-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henri Biestro resolved JEXL-348.
--------------------------------
    Resolution: Fixed

https://github.com/apache/commons-jexl/commit/263e221a7a71b1b14469d6778b681f5100fa4e81

The grammar is back to cleaner self where ternary expressions use a simple rule.
The namespace identifiers and function parts call got a refined lookahead to 
try and disambiguate the usage of namespaces. Knowledge of local variables and 
declared namespaces is used to solve ambiguities; in the worst case, a 
syntactic hint (kludge) uses the fact that spaces between a name and a colon is 
probably not a namespace identifier...

Anyhow, this solves the real-life cases and usage.

> Parsing error when mixing namespaces with conditional expressions
> -----------------------------------------------------------------
>
>                 Key: JEXL-348
>                 URL: https://issues.apache.org/jira/browse/JEXL-348
>             Project: Commons JEXL
>          Issue Type: Bug
>            Reporter: Cameron Samak
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.2
>
>
> {code}empty(A) ? ns:func() : B{code}
> results in an unexpected parse error: 1:22 parsing error in ':'
> Tested at HEAD. This seems like it worked in 3.0.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to