CQL: Parser falsely interpretes "from" in entity name
Summary
Consider a property with a name with the string "from" in it, e.g., HeightFromBottom. Using this property in a SELECT query like SELECT HeightFromBottom FROM RECORD results in a parser error
mismatched input 'from' expecting {<EOF>, WITH_A, WHERE, WHICH, HAS_A, '.'}
since the parser misinterpretes the "from" in the selector.
Expected Behavior
Only the FROM surrounded by whitespaces should be recognized.
Actual Behavior
The first occurrence of the string "from" is connected to the SELECT.
Steps to Reproduce the Problem
Simply type the above query and execute. E.g., https://demo.indiscale.com/Entity/?query=SELECT%20HeightFromBottom%20FROM%20RECORD.
Specifications
- Version: LinkAhead 0.13
- Platform: any
Possible fixes
Parse for whitespaces around FROM.
Workaround
For the time being, selectors containing "from" need to be quoted. I.e., SELECT "HeightFromBottom" FROM RECORD works without problems.