Replies: 1 comment
-
Hello @Zuruckt The CST as a low level data structure representing the syntax. The order of insertion to these arrays is in the order they were encountered in the input text. except different logical operators (and vs or) often have different precedence, so we are back to either:
I prefer the 2nd option due to performance reasons and keeping the grammar "pure" (only dealing with syntax)
|
Beta Was this translation helpful? Give feedback.
-
I'm creating a tool to evaluate user defined expressions and I've stumbled upon some issues when creating the visitor for the AT_LEAST_ONE_SEP rule.
The input I'm giving is
40 >= 40 and 30 >= 30 and 20 >= 20
and with the implementation I made it returns the diferrent rules grouped by type in arraysHow should I keep track of the order which each comparasionExpression appeared in the tree?
My Diagram:
parsers.js:
Beta Was this translation helpful? Give feedback.
All reactions