[ 
https://issues.apache.org/jira/browse/NIFI-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722989#comment-15722989
 ] 

ASF subversion and git services commented on NIFI-3149:
-------------------------------------------------------

Commit 7633fe35c1e73037b00e8d3a098546c6fde8d53c in nifi's branch 
refs/heads/master from jpercivall
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=7633fe3 ]

NIFI-3149 Adding proper literal support for number operators ('-' and '+') to 
ANTLR parser and UI highlighting

This closes #1298


> Expression Language should support passing negative numbers as literals
> -----------------------------------------------------------------------
>
>                 Key: NIFI-3149
>                 URL: https://issues.apache.org/jira/browse/NIFI-3149
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Joseph Percivall
>            Assignee: Joseph Percivall
>            Priority: Trivial
>             Fix For: 1.2.0
>
>
> Currently using "${literal(\-5.5):toNumber()" will result in an anltr parsing 
> exception due to '-' not being handled in the Lexer[1]. 
> In the ANTLR lexer, "+" and "-" should be added a potential values at the 
> beginning of a WHOLE_NUMBER  or DECIMAL.
> A workaround is to place the number in quotes: ${literal("-5.5"):toNumber()
> [1] 
> https://github.com/apache/nifi/blob/master/nifi-commons/nifi-expression-language/src/main/antlr3/org/apache/nifi/attribute/expression/language/antlr/AttributeExpressionLexer.g#L80-L80



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to