[antlr-interest] file names and grammar names
Kay Roepke
kroepke at dolphin-services.de
Wed May 17 17:09:25 PDT 2006
On 18. May 2006, at 1:58 Uhr, Terence Parr wrote:
> Currently you can name your grammar file anything and then have any
> grammar name inside. E.g., t.g can have
>
> grammar Foo
>
> in it. When we go looking for other grammar vocabularies etc... it
> would be nice to be able to tell (like Java does) from the filename
> what's inside...
>
> Do people think I should force the grammar name (including case) to
> be same as filename (with .g suffix)?
Well, personally I have always disliked that but I can see the merit
for getting vocabs. If it's clearly spelled out in the docs, it
shouldn't really be a problem.
What would lexer grammar file names look like? Foo.lexer.g (like
those coming out of combined grammars)?
-k
More information about the antlr-interest
mailing list