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

Marwan Ajraoui marwan.alephn at gmail.com
Mon Aug 3 00:54:08 PDT 2009


Divide and conquer, one thing is the fucionality of a syntax and
recognization rules and other diferent is the semantic.

Cheers,

Marouane


2009/8/3 Jeroen van Schagen <jeroen.v.schagen at gmail.com>:
> 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
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>



-- 
Marouane


More information about the antlr-interest mailing list