[antlr-interest] Composite grammars and "no start rule" warning

Peterson, Joe joe.peterson at intel.com
Mon Jul 13 14:06:22 PDT 2009


> If you are using another_file from other contexts (or if the above
> doesn't work), then you could try defining a throwaway rule in
> another_file.g:

> another_start : list EOF;

Ah, yeah, I could do this one. I remember either reading about this or doing this before. Today, it didn't occur to me to write code that will never be tested. My code coverage shouldn't suffer too much and I like this better than using a single rule to call into the file every time.

The other options won't work because I do use it elsewhere and it doesn't actually end with EOF. (The grammar is broken into 12 files.)

Thanks,
-JEEP


More information about the antlr-interest mailing list