[antlr-interest] #include mechanism for grammar files?

g4 at novadsp.com g4 at novadsp.com
Sun Mar 13 07:33:16 PDT 2011


Sorry! Must remember  to post plain-text only.

It would be useful to be able to #include a file in a grammar. use case: 
grammar is generated by another tool but the lexer definitions are not.

i.e.

grammar auto
...

#include auto_lexer.g

Is there a way to do this with the grammar spread over 2 files?

thx++

Jerry




More information about the antlr-interest mailing list