[antlr-interest] Visual Studio plugin for ANTLR grammar files

Sam Harwell sharwell at pixelminegames.com
Thu Apr 1 22:34:13 PDT 2010


Hi Shawn,

I went the route of tying it into MSBuild. The generated file is placed
in the intermediate output directory (often obj\Debug or obj\Release).
This system properly handles dependent grammars (eg. tree grammars are
automatically recompiled when the lexer defining the tokens is
recompiled). The latest source is in source control as the
AntlrBuildTask project that's part of the C# 3 port. I still need to
post an updated set of binaries for it since I fixed several bugs.

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Shawn Poulson
Sent: Thursday, April 01, 2010 6:36 PM
To: ANTLR Interest
Subject: [antlr-interest] Visual Studio plugin for ANTLR grammar files

Hello all,

 

I've been working on and off with ANTLR over the past couple years and
one
thing that always got me, not being a Java developer, was trying to
remember
how to call ANTLR to compile my grammars to C#.  Moreover, I really
wanted
it to be part of Visual Studio so that it generated code from the
grammar on
change, like a Makefile.  I searched around and couldn't find any such
tool
that already existed.

 

Visual Studio has an API that allows you to create your own code
generators,
so I took a shot at it.  I have a working proof of concept that works as
you
would expect.  The generated code files are seen as child nodes hanging
off
the grammar file.  I was curious if anyone were willing to give it a
shot
and let me know how it works for them.  I'd like to package it up into
an
installer and put the source up on something like github or ohloh.  Any
input would be greatly appreciated.

 

---

Shawn Poulson

spoulson at explodingcoder.com

 


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address


More information about the antlr-interest mailing list