Hello People, this is a question about best practices when augmenting lexer and parser with Java code providing helper methods (or even inner classes for storare purposes).
The Maven prototype "antlr3-maven-archetype" creates example grammars which use super classes (AbstractTParser and AbstractTLexer). The comments in those super classes suggest to honour this as a general pattern: put helper methods in a grammar base class in order to keep the grammar light and clean. I think this has pros and a con. The con is that this way the compactness of "all-in-one-unit" is sacrificed; and reading the grammar one has to consult a second source. Also I noted that the Definitive Guide never made any suggestions to employ superclasses. So this is my question: would you recommend the superclass approach indeed as the best practise, or rather regard it as a good practise one might follow or not, perhaps depending on complexity? Thank you, cheers, -- Hans-Juergen Rennau List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
