Antlr C# Code Generation using Visual Studio.NET
These instructions are an extension to Notes for using the ANTLR C# Code Generator explaining the use of Visual Studio.NET to generate C# code from Antlr grammar files.
…
Step 5:
Use the calc.g, the example grammar file as your sample file for the project. This file can be found at the following location of your installation
Copy this file in your project folder (calcsample in this case).
Step 6:
Install BuildRules.exe from Visual Studio .NET 2003 Automation Samples to allow build rules definition in the Pre-Build Event Command Line (Project->Properties).
Use the following code to add the Pre-Build Event Command Line
java antlr.Tool -o …. ….calc.g
This will allow generating the corresponding ANTLR files required for the solution building.
Website: www.axisebusiness.com | Filesize: 102kb
No of Page(s): 8
Click here to download Antlr C# Code Generation using Visual Studio.NET.
Related Tutorial
Tags: .NET, Antlr, code generation
Comments
Leave a Reply