Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2746

How can I get my act together on the backend of this compiler?

Path csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From luser droog <luser.droog@gmail.com>
Newsgroups comp.compilers
Subject How can I get my act together on the backend of this compiler?
Date Fri, 22 Oct 2021 17:58:16 -0700 (PDT)
Organization Compilers Central
Lines 35
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <21-10-039@comp.compilers> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8bit
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="37746"; mail-complaints-to="abuse@iecc.com"
Keywords code, question
Posted-Date 22 Oct 2021 21:43:01 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:2746

Show key headers only | View raw


I've been working (playing) off and on with code for doing
parser combinators in C. And I filled it out with a K&R C
tokenizer and syntax analyzer so it produces as CST.
Some extra tree trimming and other gyrations to smooth
it out into something more like a usable AST.

And then I don't know what I'm doing anymore. I don't know
where best to study up to figure out how to write a
super amazing code generation backend that's fancy and
cryptic and short like I like.

Since the code itself is kinda stealing from FP literature,
I've been advised to look into "pattern matching" as an
appropriate FP technology to power my "middle end".
(My last question here was asking about how to power
my middle end.) And that has led to this article, which
kinda looks like exactly what I want...

  https://arxiv.org/pdf/1210.3593.pdf
Ondˇrej B ́ılka, Pattern matching in compilers. Prague 2012

And I've also put down the Forth books and picked up
good old Budge, /Recursive Programming Techniques/ 1975,
for my lunch breaks. A sort of proto-SICP AFAICT.

Is there anywhere else I should be looking for inspiration
for a really concise and elegant way to write and organise
the tree-walking code-generation code? Or is this paper
the thing, and I'm just not seeing it yet?

I hope this is technical enough for the forum, despite being
somewhat vague and unconstructive. Hoping the experts
here can give me a kick in the right direction.

-- droog

Back to comp.compilers | Previous | NextNext in thread | Find similar


Thread

How can I get my act together on the backend of this compiler? luser droog <luser.droog@gmail.com> - 2021-10-22 17:58 -0700
  Re: How can I get my act together on the backend of this compiler? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2021-10-23 05:07 +0200
    Re: How can I get my act together on the backend of this compiler? luser droog <luser.droog@gmail.com> - 2021-11-12 18:18 -0800

csiph-web