arcalot / arcaflow-expressions

Expressions language for Arcaflow
Apache License 2.0
0 stars 0 forks source link

Inconsistency in token patterns #41

Open webbnh opened 5 months ago

webbnh commented 5 months ago

In the Arcaflow tokenizer, the pattern for BooleanLiteralToken is incorrect: since anchoring (^/$) is higher precedence than alternation (|), we need to explicitly group the alternation so that the anchoring applies to both alternates (which is why lines 110 and 112 contain groupings). As the code stands at the moment, it will match a string which begins with true or ends with false, since each alternation uses separate anchoring.