Closed tomitrescak closed 2 years ago
The actual python parsing is all antlr (grammar and library), so it might be better for discussion over there. https://github.com/antlr/grammars-v4/issues/2251 seems to discuss the need to optimise the grammar to avoid this sort of chaining, for example.
How did you even visualize this snapshot? I can't figure out how to use this library.
@genderev I used my own visualisation code for this using vega. This library just builds the AST, nothing else.
Hello, thank you for the amazing library!
I'm just curious why the grammar is creating such a long chains of contexts. I have a simple expression
1+1
and this is just a snapshot of the tree (I just visualise children of each context):You can see how many contexts are built in order to reach the arithmetic expression with many redundant nodes in between. I worked with java-ast and there were no redundant nodes.