[antlr-interest] Urgent: how to "include" a grammar defined in a
separate file
Micheal J
open.zone at virgin.net
Wed Jun 15 06:05:54 PDT 2005
Rupinder,
Have a look here at the ANTLR project here and especially the annotation
tool. The author uses it to maintain a single tree parser grammar for
multiple walks. You can adapt it for single grammar and multiple languages
too. You would probably want to move to a one-grammar-per-*.g-file
arrangement for this to work smoothly.
http://storm.cs.unipi.gr/~anakreon/aspa.html
Incidentally, there is no guarantee that you will receive a response (let
alone a "satisfactory response") from any mailing list staffed by
volunteers. ;-)
Cheers,
Micheal
-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Rupinder S. Gill
Sent: 15 June 2005 04:56
To: antlr-interest at antlr.org
Subject: [antlr-interest] Urgent: how to "include" a grammar defined in
aseparate file
(I posted a query a week ago but didn't receive a satisfactory response.)
I have a grammar for logical-expressions from which I need to build the
following:
- Java lexer and parser
- C# lexer and parser
- Two java tree-walkers
- One C# tree-walkers
The two java tree-walkers are in independent projects; both projects do
depend on the project that defines the grammar (and contains lexer and
parser). C# lexer, parser and tree-walker can be in the same project. I
want to keep only one copy of the common.g file (one containing parser and
lexer sections). How do I this?
Grammar inheritance nor importVocab seem to be up to the task. Or am I
missing something?
Thanks,
R.G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050615/368a6ac6/attachment.html
More information about the antlr-interest
mailing list