[antlr-interest] super grammar surprise

Lloyd Dupont lloyd at nova-mind.com
Wed May 25 16:38:05 PDT 2005


mmhh... I guess it's a feature, as it let you 'override' the declared code.
well I have to copy paste I suppose....

BTW if I don't declare any class code in my subgrammar the supergrammar class code is used, sweet ;)
  ----- Original Message ----- 
  From: Lloyd Dupont 
  To: antlr-interest at antlr.org 
  Sent: Thursday, May 26, 2005 9:24 AM
  Subject: [antlr-interest] super grammar surprise


  I'm writting a subgrammar of the GNU-C grammar.
  I don't know if my problem is due to a 4 level inheritance (Parser -> StdCParser -> GnuCParser -> ObjectiveCParser) but anyway, I had the surprise that the class code (as in:
      class MyParser extends Parser;
      {
          // class code
      }
      idList : ( ID )+;   // parser rule definition
  ) is not passed on the subclass?!
  Is it a bug or a feature?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050526/94f02527/attachment.html


More information about the antlr-interest mailing list