You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you for that an awesome tutorial and the library. I have reached the polish evaluation portion and i did the evaluation with the grammar
expr : |'(' +')’;
Now i want to change the grammar to this.
expr : | +;
But I am getting confused or I am unable to visualise how the AST will look like. I am unable to understand the tree structure generated.
Hi ,
First of all thank you for that an awesome tutorial and the library. I have reached the polish evaluation portion and i did the evaluation with the grammar
expr : |'(' +')’;
Now i want to change the grammar to this.
expr : | +;
But I am getting confused or I am unable to visualise how the AST will look like. I am unable to understand the tree structure generated.
(+ 2 3)(+ 2 3) <- For the first grammar
-> lispy|>
regex
operator|char:1:1 '*'
expr|>
char:1:3 '('
operator|char:1:5 '+'
expr|number|regex:1:7 '2'
expr|number|regex:1:9 '3'
char:1:10 ')'
expr|>
char:1:12 '('
operator|char:1:13 '+'
expr|number|regex:1:15 '2'
expr|number|regex:1:17 '3'
char:1:18 ')'
regex
lispy|>
regex
operator|char:1:1 '*'
expr|>
operator|char:1:3 '+'
expr|number|regex:1:5 '2'
expr|number|regex:1:7 '3'
expr|>
operator|char:1:9 '+'
expr|number|regex:1:11 '2'
expr|number|regex:1:13 '3'
regex
Hoping that you will help me .
The text was updated successfully, but these errors were encountered: