David-Sarah Hopwood wrote:
Jim Idle wrote:
  
Further than this though I always suggest that in production you use separate 
lexer and parser grammars and use superclasses for any support methods or 
overrides such as displayRecognitionError. Keep all the code that you can out of 
the .g file.
    

I'd like to put support code in superclasses, but would prefer not to
separate the lexer and parser grammars. Is there any way to do that (without
changing the Java target templates)?
<http://www.antlr.org/jira/browse/ANTLR-375> seems relevant, but it is
shown as not fixed.

  
You would get the superclass for the parser only. But, as soon as you want to use superclasses, then you should really separate them out as it is easier to spot what is going on when you come back to it in 18 months time.

Jim

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to