Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

getting AST from yacc

66 views
Skip to first unread message

iwlnx

unread,
Mar 30, 2023, 8:33:22 PM3/30/23
to
I am a bit old and do not learn as well as in the past. I have a very
large yacc file that works fine.

What I want is to produce an AST tree from the yacc .y file. I have read
many things on the net

about this but they all start at too high a level for me to grasp.

Any help for an old slow old man (related to this problem)?

Larry
[The short answer is that yacc doesn't do that, but it's not hard to write action
code that builds a AST as it does the rule reductions. If you can find a copy of
my "flex & bison" it has some examples that build AST. -John]

0 new messages