Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Sic transit discus mundi -- From the System Administrator's Guide, by Lars Wirzenius


devel / comp.compilers / getting AST from yacc

SubjectAuthor
o getting AST from yacciwlnx

1
getting AST from yacc

<23-03-040@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=772&group=comp.compilers#772

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: lar...@rockridgefarm.com (iwlnx)
Newsgroups: comp.compilers
Subject: getting AST from yacc
Date: Sat, 25 Mar 2023 09:45:06 -0400
Organization: Compilers Central
Sender: johnl@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <23-03-040@comp.compilers>
References: <sympa.1679707581.2255.930@lists.iecc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="36785"; mail-complaints-to="abuse@iecc.com"
Keywords: yacc, AST
Posted-Date: 30 Mar 2023 20:33:18 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
Content-Language: en-US
In-Reply-To: <sympa.1679707581.2255.930@lists.iecc.com>
 by: iwlnx - Sat, 25 Mar 2023 13:45 UTC

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]

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor