[antlr-interest] Is C# supported for parser generation yet pls?

Terence Parr parrt at jguru.com
Sat Jan 19 09:35:30 PST 2002


On Saturday, January 19, 2002, at 06:54  AM, micheal_jor wrote:

> Hi All,
>
> Does ANTLR support the creation of parsers in C#?

Nope.  (not yet?)  I talked with a friend at M$ who said he had one .5 
finished, but he's probably too busy to finish.  Code is pretty dark and 
icky in there ;)

> If not, can someone pls outline the steps I need to take in order to
> add C# output to ANTLR?
> - I am familiar with C# and Java but not with ANTLR. So as long as I
> am pointed in the right direction (and all the right directions pls),
> I'll be OK.
> - If I get helpful pointers in time, I'll get cranking with the hope
> that C# support will be added before 2.7.2 reaches final status.
> - On that note, is there a grammar for ANTLR that has extensive
> compliance tests that I can use to test the generated grammar-parser?

The example grammars are a good step, but (mea culpa mea culpa) there is 
no good regression test.  Nothing automated anyway.

As for a code generator, the diff between CPP and Java should be a good 
clue.  You need a code generator object called CSharpCodeGenerator 
(subclass of CodeGenerator) plus an action.g file to parse C# actions 
within a grammar and lots of support code in C# that would mimick the 
C++ and Java stuff.

Probably not something that can be done that quickly, although C# is 
remarkably close to Java ;)

Ter
--
Chief Scientist & Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org


 

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



More information about the antlr-interest mailing list