Compiling E: Phases of Transformations
Monty Zukowski
mzukowski@bco.com
Mon, 7 Aug 2000 11:33:57 -0700
> -----Original Message-----
> From: Ken Kahn [mailto:kenkahn@toontalk.com]
> Subject: Re: Compiling E: Phases of Transformations
>
>
> From: "Mark S. Miller" <markm@caplet.com>
> >
> > Language: Kernel-E -- portable interface from virtual machine
> > The subset of Auditable-E that
> passes audit. Seen
> > by debuggers and other meta-level tools.
> >
>
> Everything you wrote made sense to me until I saw "debuggers"
> here. Wouldn't
> someone want to debug at the level of User-E and not
> Kernel-E?
Absolutely.
> Doesn't the
> ability to debug make this whole transformation scheme much more
> complicated?
Usually debugging information is saved with the byte codes or binary executable.
If these compiliation phases are actually implemented as source to source
translations then I hope E has a statement equivalent to C's #line directive.
Actually something like #line would be very useful for parser generators as
well. GCC's #line directive allows nesting so you can see the whole stack of
files which included other files, etc.
Something like:
Syntax Error at someheader.h:12
included in main.c:8
An accurate source to source translation system needs to track the whole stack
of line number includes and keep it's own stack as it is generating code so that
it won't mess up the nesting, etc.
I would imagine that E as implemented now is actually translating by passing
around parse trees and the nodes themselves can keep track of their origins.
A quick glance at the E Language Grammar doesn't show any #line directives, but
I might be missing something.
Line directives would be useful for parser generators and other things that
generate E. This information could be kept externally to the program, too, to
avoid cluttering up the intermediate source code.
Monty