visual-studio-2010antlr3

Configuring ANTLR target output location with VS2010


I am new to ANTLR. I wanted to learning start by setting up a project so that lexers\parsers would be automatically generated by the build. So I downloaded antlr-dotnet-tool package, modified a project file to include antlr targets. I also installed some VS extension that add syntax highlighting and new item types for grammar files.

Now, generation seems to works, but it puts output files into obj/${Configuration} folder. And I don't really know what I am supposed to do with them there. Surely, you don't want me to manually copy them to proper locations (supposedly next to grammar files), do you?

It would be great if you could shed some light on it.


Solution

  • If you followed my blog post, you will see that you need to do nothing else.

    At compile time the generated files are automatically linked to the output assembly, and the debugger is capable of loading them when you debug the program.