[antlr-interest] inherited grammar!
Lloyd Dupont
lloyd at nova-mind.com
Tue May 24 21:58:52 PDT 2005
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/072ef428/attachment.html
More information about the antlr-interest
mailing list