[antlr-interest] Don't Shoot! (Getting started w/ANTLR3 and C#)

C. Mundi cmundi at gmail.com
Tue May 13 17:41:14 PDT 2008


Ok.  I have been reading the wiki and experimenting with ANTLRWorks while
waiting for the book to arrive in my mailbox.

I'm not sure the book will (or should) answer this.  I am looking for a
start-to-finish example targeting C#.  The finish line for me is *not* the
output of ANTLR.  My finish line is a Windows dll or exe that actually
parses user input.

I am already able to generate lexing and parsing code for various targets,
either with ANTLRWorks or with ANTLR from the Linux command line.
Ultimately I need to build Windows apps, so I need to get the ANTLR
environment set up for Dev Studio.  So, newly emboldened by my success on
Linux, I tried to port my new skills to Windows by gamely adding an option{
language=CSharp; } phrase.  Oh, if only it were so easy!  I got C# code, but
I couldn't build it.

So I read a number of semi-mutually-contradictory-and-or-incomplete helpful
hints on the wiki and by Googling.

That got me as far as adding a Reference to the Antlr3.Runtime -- huge step
forward.

Then I ran into this mysterious RecognizerSharedState object in the C#
target.  Uh oh.  I guess I'm still missing a Reference to a .NET Assembly,
which probably means I skipped an important step, like building it.  I get a
vague sense of this from some of the postings, but I guess I'm just dense.

Any clues will be greatly appreciated.  I'll be happy to wait for the book
to arrive, if it has the answer.  Please be blunt.  Insults can only make me
smarter.  :)

Thanks,
CM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080513/42e3a89c/attachment.html 


More information about the antlr-interest mailing list