camunda / feel-scala

FEEL parser and interpreter written in Scala
https://camunda.github.io/feel-scala/
Apache License 2.0
123 stars 50 forks source link

Fail to parse expression with variable name starting with "in" #873

Closed saig0 closed 1 month ago

saig0 commented 3 months ago

Describe the bug

The engine fails to evaluate/parse an expression that contains a variable name starting with in and followed by a number (e.g. in1).

The engine reports the following failure message:

failed to parse expression 'odd(in1)': Expected (binaryComparison | between | instanceOf | in | "and" | "or" | end-of-input):1:4, found "(in1)"

To Reproduce Steps to reproduce the behavior:

  1. Evaluate the expression odd(in1) with the context {"in1": 5}
  2. Verify that the evaluation/parsing fails

Try in FEEL Playground.

Expected behavior I can use variable names starting with "in".

Environment