[antlr-interest] ANTLR C# Example Demanded

Mohammed Ibrahim snouto at gmail.com
Thu Aug 16 09:20:47 PDT 2007


Please Everybody in this group , i would like to have a good working C# code written for This simple grammar File 
==========================================
grammar hello;
options
{
   language = CSharp;
}
prog : stat+;
stat returns [string value] : GREETING{$value = $GREETING.text;} (LETTER{$value +=" "+$LETTER.text; })+;
GREETING: 'welcome'|'greeting'|'hello';
LETTER : ('a'..'z')+;
WS : ('"'|' '|'\r'|'\n'|'\t')+ {skip();};

======================================

Please Suppose that the Output Lexer and Parser files are named HelloLexer and HelloParser respectively .

Can anybody Show me a working C# Code for this simple Grammar File.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070816/f21c9afc/attachment.html 


More information about the antlr-interest mailing list