You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2021/06/07 13:15:06 UTC

[jira] [Closed] (JEXL-265) Ternary expression and namespace identifier grammar ambiguity leads to parsing error

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

Henri Biestro closed JEXL-265.
------------------------------

> Ternary expression and namespace identifier grammar ambiguity leads to parsing error
> ------------------------------------------------------------------------------------
>
>                 Key: JEXL-265
>                 URL: https://issues.apache.org/jira/browse/JEXL-265
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 3.1
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.2
>
>
> A common expression like {{(true) ? x : abs(1)}} throws a parsing exception.
> The workaround is to add parentheses around the right hand side {{(true) ? x : (abs(1))}} .
> The actual cause is that the grammar can not disambiguate between a correct ternary expression that uses a function call as right choice and one that uses a namespace function call as left choice {{x : abs(1)}} and misses the right hand choice, that latter case raising an exception.



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