Antlr C# Code Generation using Visual Studio.NET

Antlr C# Code Generation using Visual Studio.NETThese 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
Antlrantlr-2.7.6examplescsharpcalccalc.g
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: , ,

Comments

Leave a Reply