[antlr-interest] Re: Translators Should Use Tree Grammars
micheal_jor
open.zone at virgin.net
Mon Nov 15 19:50:18 PST 2004
--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
> Ok, whew! 8 furiously written pages on visitors, tree node classes,
> tree grammars, and action execution:
>
> http://www.antlr.org/article/1100569809276/use.tree.grammars.tml
>
> Hopefully, this is clearly written. Regardless, it summarizes my
> position rather thoroughly. ;) Please send me feedback if you think
> the article can be improved etc...
Comments:
C1. Remote attribution is cool but, does it remain useful if one
already has a symbol table?
C2. Visitors tend to be used with tree built from strongly-typed nodes
(heterogenous nodes). Ignoring the [potential] typing issue related to
the representation of lists of [children] nodes, the strong typing
enforces structural "correctness" - so explicit tree structure
validation isn't required. You get it for free.
Errata:
E1. Section "Grammars as formal structure specifications" - "not"
missing in first sentence:
"No one will argue that building a text parser by hand should be done
manually in most circumstances."
- should be -
"No one will argue that building a text parser by hand should not
be done manually in most circumstances."
Nice. Very clearly argued points in the article.
Cheers!
Micheal
ANTLR/C#
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list