[antlr-interest] inherited grammar!

Lloyd Dupont lloyd at nova-mind.com
Tue May 24 22:20:43 PDT 2005


just replying myself, so you don't bother....
 $(ANTLR) -glib "GnuCParser.g;StdCParser.g" ObjectiveCParser.g

  ----- Original Message ----- 
  From: Lloyd Dupont 
  To: antlr-interest at antlr.org 
  Sent: Wednesday, May 25, 2005 2:58 PM
  Subject: [antlr-interest] inherited grammar!


  I downloaded the C grammar file and tryed to extends it.
  (from there: http://www.antlr.org/grammar/cgram)

  I created my own
  ObjectiveCParser.g file in which I declare
      class ObjectiveCParser extends GnuCParser;

  But this one inherit from:
      class GnuCParser extends StdCParser;

  But it, itself, inherit from:
      class StdCParser extends Parser;

  on the command line to generate the GnuCParser.java they call:
  java antlr.Tool -glib "StdCParser.g" GnuCParser.g

  So I though, to generate my ObjectiveCParser.java I could try:
  java antlr.Tool -glib "GnuCParser.g StdCParser.g" ObjectiveCParser.g 
  or
  java antlr.Tool -glib "GnuCParser.g" -glib "StdCParser.g" ObjectiveCParser.g
  or
  java antlr.Tool -glib "StdCParser.g" -glib "GnuCParser.g" ObjectiveCParser.g

  but none of that worked...
  BTW the GnuCParser is generated, compiled and working.

  Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050525/67f48fa5/attachment-0001.html


More information about the antlr-interest mailing list