Re: I found program for AST generating
Zartaj Majeed <[email protected]> Tue, 7 Sep 2021 10:18:52 -0400
| Newsgroups | gmane.comp.parsers.bison.bugs |
|---|---|
| Message-ID | <[email protected]> |
This is quite interesting - thanks! If you've tried it out I'd be interested in knowing what you think of the quality of the generated files. Does it use the latest bison and C++ features? Is it thread-safe? Does it use the flex C++ lexer? Are the generated data structures for the AST easy to use and extensible? I saw some very small toy examples in the github repo - do you know if it's been used for any large or complex grammars? On 7/10/2021 7:28 PM, Askar Safin wrote: > Hi. I long time ago I was interested in generating input files for bison (i. e. generating .y files) for producing AST. For example, I asked about it here: https://lists.gnu.org/archive/html/bug-bison/2018-12/msg00008.html . Now I found solution to this problem: BNFC. https://bnfc.digitalgrammars.com/ . You write single concise input file and BNFC generates bison's .y file (which parses to AST) from it together with pretty-printer. > > == > Askar Safin > http://safinaskar.com > https://sr.ht/~safinaskar > https://github.com/safinaskar