tags:

views:

100

answers:

1

I am building ANTLR3 applications where some of the same grammar rules are likely to be used in different applications. There will be many *.g files but they may, for example, all wish to reference the same version of FLOAT. Are there "import" facilities whereby a *.g can be assembled from other *.g files and if so what are the precedence rules?

+3  A: 

You mean composite grammars?

Bart Kiers
This is what I think I am looking for, thanks. I don't think it is mentioned in the ANTLR reference and I assume it's fairly recent from reading the wiki page you mention. Assuming my import strategy is DAG-like it should be tractable.
peter.murray.rust
Yes, I couldn't find it in my copy of the *ANTLR reference* either, but I stumbled upon this while browsing the ANTLR wiki recently.
Bart Kiers
... And you're welcome of course.
Bart Kiers