[antlr-interest] use of tree matching rules in tree grammar

Jeroen van Schagen jeroen.v.schagen at gmail.com
Mon Aug 3 00:03:51 PDT 2009


Hello,

Currently I'm working on my first tree grammar after reading the definitive
ANTLR reference. Personally I love the concept of tree grammars, but there
are some things that seem a bit unlogical to me. Why do you have to specify
"tree matching rules" after having specified recognition rules and rewrite
rules? Wouldn't it be allot more productive and most definately less
error-prone to extend a parser grammar and only overwrite the rules in which
you want to embed action code? Just imagion having a project with a dozen
tree grammars and somthing changes in the parser grammar, e.g. two nodes are
swapped, you would have to change all tree grammars. Not the mention the
amount of duplicate code you would have to write.

Yours,
Jeroen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090803/e157769d/attachment.html 


More information about the antlr-interest mailing list