[antlr-interest] Re: Seperating Grammar and Actions..
micheal_jor <open.zone at virgin.net>
open.zone at virgin.net
Mon Jan 13 16:32:13 PST 2003
> I've remarked on this before but not in a year or two so... :-)
>
> I'm very much of the opinion that for any non-trivial translator,
the only
> thing that the parser should do is to build the AST and any
auxiliary data
> structures that only it can build and nothing else. I.e., no
> syntax-directed, parser translators for anything that's non-trivial.
This can be interpreted as "strive for no [minimal?] embedded action
code in parsers for non-trivial translators". Is this what you meant?
<SNIPPED-stuff-I-agree-with/>
> For many translators, that's just making passes over the AST and
> doing annotation, pruning, rearrangement, and some insertions. For
others,
> that's a basis from which to build additional auxiliary structures
> (e.g., def-use, use-def chains) or more specialized IRs (e.g.,
machine
> specific tuple formats).
Can all the remaining work be specified as ANTLR tree parsers (this
is related to my other post about resolvers-etc-as-treeparsers I
guess) ?.
Any links/cites to information (particularly practical implementation
related info) on some of these other passes and auxilliary structures
please?
Micheal
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list