[antlr-interest] Need to generate C# and Java code from same grammar

stefan stefan at amiq.ro
Thu Jun 9 13:29:57 PDT 2005


On Thursday 09 June 2005 22:37, Rupinder S. Gill wrote:
> Finally, you may find it more convenient to place your grammars in separate
> files, especially if you have multiple tree-walkers that do not add any
> literals to the token set."

     From the above paragraph I understand that you can copy&paste your 
grammar in two files, eg. CSharpGen.g & JavaGen.g, including in their options 
section a line with `importVocab="nameOfTheVocab"`. As long as the grammars 
do not add a new token to the already imported set, that should be enough. 
     

      Stefan.


More information about the antlr-interest mailing list