Hi, I'm aware there is `org.antlr.v4.gui.TestRig` tool that allows you to draw trees, problem being it requires to generate java files and compile them. That's notconvenient in case you're just using the python runtime.So, I'd like to know how can I use pydot to draw the trees? In fact, I'd also like to know how to pretty print trees using the python runtime (yeah, I'm aware of the existingclassmethod toStringTree.
Try my vscode extension for ANTLR4 (https://marketplace.visualstudio.com/items?itemName=mike-lischke.vscode-antlr4) which works independent of the target language by using the parser interpreter. Here's an example:
BPL.
Michal.
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/41b261aa-a0ae-4799-9d8a-eeb298ac529f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yes, Python runtime is ridiculously slow. The difference between C++ and Python runtime is more than 3 orders (for vhdl grammar). Python runtime has to be implemented as C++-Python extension in order to be usefull.
https://github.com/Nic30/hdlConvertor
It very depends on complexity of the file, but 100ms is realistic. But It may require a little bit of async and pipelining to work nicely.
(
Also:
* in hdlConvertor I just switched to vhdl-2008 grammar which is far from optimized yet, but still probably meets your perf. req.
* My knowledge of Python runtime is nearly 1y old, so something may changed.
* tree-sitter looks good, If you decide to use it I would be glad
to read a review.
)
Thanks!
Michal.
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/7e1b2973-3ca6-4262-a664-ee92a1c7a291%40googlegroups.com.
the extension looks great.Does something like this for Visual Studio exist?
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/4c64a91e-4963-4ab6-ab00-429a18938b69%40googlegroups.com.