[antlr-interest] Re: C# working version

Robin Debreuil robin at debreuil.com
Fri Mar 5 12:41:46 PST 2004


> Sorry, I'm ask about IDE that used for develop C# grammar. I'm interesting
> in csproj/sln-files for MSVC#.

Oh - I had used TextPad, mostly because of using the java step to generate
the lexer/parser, but also it is because it is easy to adjust the syntax
highlighting for different sections. To work on the token classes and the
antlr libs I used vs.net 2002 - I might have had to modify the project files
to be 2002 compatible (you can just modify the headers of the sln and proj
files). The bat file I use to run it copies whatever updates were made to
antlr into the working directory of the grammar.

To get it to run in vc# (as you probably know), just start an empty project,
add the cs files, and the add a reference to antlr.runtime-2.7.2 dll. I
didn't go as far as calling the java from vs.net, though it shouldn't be too
hard if you want that. The bat file I use (local dirs and all) looks like:

REM ** run.bat **
echo off
cls
java -cp G:\antlr-2.7.2 antlr.Tool csharp.g
copy G:\antlr-2.7.2\lib\csharp\src\obj\Debug\antlr.runtime.dll
F:\Mediator\CSharp\
csc /out:CSharp.exe /warn:1 /nologo /R:F:\Mediator\CSharp\antlr.runtime.dll
*.cs
CSharp.exe cs2.in

I just set that to the F5 hotkey in TextPad... I've put up the syntax
highlighting file for TextPad as well, in case anyone uses that too.
http://www.debreuil.com/CSharp/CSgrammar.syn

Cheers,
Robin



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list