[antlr-interest] C# code generation problem: skip() is not valid ...

Micheal J open.zone at virgin.net
Wed Jul 4 14:59:09 PDT 2007


Hi,
 
Search/browse the list archives for recent discussions about remote
debugging, C# and AntlrWorks. The behaviour you are seeing is documented.
 
Micheal

-----------------------
The best way to contact me is via the list/forum. My time is very limited. 

-----Original Message-----
From: Liviu U [mailto:liviu.u at gmail.com] 
Sent: 04 July 2007 22:23
To: Micheal J
Subject: Re: [antlr-interest] C# code generation problem: skip() is not
valid ...


;) The annoying thing is that debugging works in ANTLR only after i comment
the option .... and the C# custom code!!!!


On 7/5/07, Micheal J < open.zone at virgin.net <mailto:open.zone at virgin.net> >
wrote: 

Hi,
 
AntlrWorks is not to blame - you need to change your grammar file: search
for "skip()" and replace with "Skip()" if your target language is C#.
 
As for the error handling, look on the wiki or, try the ANTLR book. This
excerpt should help: http://media.pragprog.com/titles/tpantlr/errors.pdf

 
Micheal
 

-----------------------
The best way to contact me is via the list/forum. My time is very limited. 



-----Original Message-----
From: Liviu U [mailto:liviu.u at gmail.com] 
Sent: 04 July 2007 21:55
To: Micheal J
Subject: Re: [antlr-interest] C# code generation problem: skip() is not
valid ...


Excellent now it works ( Please does someone want to fix antlrwork?
Everytime i regenerate my code i have to correct that "skip" );
BUT...

CSharpParserLexer lexer = new CSharpParserLexer(new
ANTLRStringStream(code)); 
            CSharpParserParser parser = new CSharpParserParser(new
CommonTokenStream(lexer));
            CSharpParserParser.prog_return ret = parser.prog();

DOES SWALLOW ERRORS!  if input file is wrong how should I detect that an
error occured? I've been looking for some events, but nothing's there... 
Does anybody have a clue?

PS: Even in ANTLRWORKS, the execution does not BREAK on errors!



On 7/4/07, Micheal J <  <mailto:open.zone at virgin.net> open.zone at virgin.net>
wrote: 

Hi,
 
"skip()" should be changed to "Skip()" if you are using the C# runtime.
 
 
Micheal
 
-----------------------
The best way to contact me is via the list/forum. My time is very limited. 


-----Original Message-----
From: antlr-interest-bounces at antlr.org [mailto:
<mailto:antlr-interest-bounces at antlr.org> antlr-interest-bounces at antlr.org]
On Behalf Of Liviu U
Sent: 04 July 2007 17:27
To: antlr-interest at antlr.org
Subject: [antlr-interest] C# code generation problem: skip() is not valid
...


Hi guys,

I was very optimistic after antlr3 was realesed. Now I seem to have problem
with a small grammar.
Is there a solution for this error ( the problem is at C# code generation )?
Commenting "skip()" will affect the logic of the parser or lexer? 


Regards
Liviu




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070704/87341af7/attachment-0001.html 


More information about the antlr-interest mailing list