I don't like to have the ANTLR generated files in the same location as my .g4
grammar and other version-controlled documents. I would like to put all the generated files in a separate nested folder that can be excluded via .gitignore
. What I have tried so far is to create a folder <someFolder>
inside the main folder and from inside that folder ran:
cd <someFolder>
antlr ../<grammarFile.g4>
however, it still spills all the generated files in the parent folder.
P.S. It shouldn't matter but my environment is macOS.