Implement parse tree pretty-printing a la Cpp runtime in other runtimes
See original GitHub issueThe C++ runtime supports generating string representations of the parse tree in two forms: the standard all-in-one-line Lisp-ish expression, and a pretty-printed version, which splits the Lisp expression into multiple lines and indents subexpressions. None of the other runtime targets have the pretty-printing capability. It would be quite handy for human-focused results, including the unit test systems of the grammars-v4
collection.
I suggest we implement the C++ runtime behavior in all the other runtimes.
Issue Analytics
- State:
- Created a year ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Pretty printing a parse tree to std out? - c++ - Stack Overflow
I have a class Node and it has a function printSymbol() to print its symbol. It has a std::list <Node*> m_children for its...
Read more >CSC 460/660 Compiler Construction The Compiler Project
We use a number of different symbol tables in this phase: • The Compilation parse tree node has a symbol table that holds...
Read more >Are errors caught during the evaluation of a programming ...
A parse tree is the output of the parse phase of the language compilation, ... The important distinction between a run-time error and...
Read more >Improving the performance of an ANTLR parser - Strumenta
Every runtime will have different performance and potential issues. Runtimes will usually follow the performance characteristics of their respective language.
Read more >What's New - Oracle Linux Yum Server
xdg-desktop-portal-kde-5.24.6-1.el9 - Backend implementation for ... castxml-0.4.7-1.el9 - C-family abstract syntax tree XML output tool ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have to generate json from parse trees to serialize across socket from server to client for antlr lab.
We’ve encoutered the similar issue several times:
It’s useful feature, but I consider the suggested format with a lot of confusing parentheses is confusing. I suggest using tree with indents:
It’s useful feature especially for client-server scenarious and other scenarios where serilization is required. Also, it’s useful for tree comparison in tests.