|Examples/resources for the "middle end" of a compiler? email@example.com (luser droog) (2019-06-20)|
|From:||luser droog <firstname.lastname@example.org>|
|Date:||Thu, 20 Jun 2019 14:47:49 -0700 (PDT)|
|Injection-Info:||gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="40527"; mail-complaints-to="email@example.com"|
|Posted-Date:||21 Jun 2019 16:28:01 EDT|
I have worked up a scanner and parser for a primitive version of C,
but I have hit a block on how to extend the code further to make
a fully working compiler.
I have a lisp-like list containing sublists and token objects.
What does a nice tree traversal code look like? Any thoughts or
suggestions? I can add annotations in the parser to insert things
to search for.
Perhaps my problem is vague criteria. I kind of want to make a
code formatting tool first rather than a compiler, so I really want
some kind of middle-end processing that makes formatting easier.
I am ignoring the rats nest issue of the preprocessor entirely for
To put it succinctly, are there any good examples of lisp code for
processing a C-like grammar that handles the middle end nicely?
Or any related stuff I should look at? tia
Return to the
Search the comp.compilers archives again.