generating program structure (nodes) using bison and flex
Posted
by gruszczy
on Stack Overflow
See other posts from Stack Overflow
or by gruszczy
Published on 2010-06-13T17:59:41Z
Indexed on
2010/06/14
10:02 UTC
Read the original article
Hit count: 389
I would like to write myself a pretty printer for java using bison and flex. I have written a pretty printer for a script language, but I was only writing visitors, which made the printing. How can I turn a program using my formal grammar into a tree of nodes (made using C++ classes), that afterwards I could visit using my visitor? Maybe you could give me some link with an example of this? What i need to put into flex/bison files?
© Stack Overflow or respective owner