[antlr-interest] Exception while debugging C# 2.0 with ANTLRWorks1.2.3

Bayle Jonathan Bayle-J at mgdis.fr
Wed Aug 12 05:47:15 PDT 2009


Hi everybody,

 

I have identified which piece of code returns « False » (and sometimes « True ») and make ANTLRWorks throw a "java.lang.NumberFormatException".

It is the result of 2 semantic predicates embedded in the same rule :

 

// beginning of rule (...)

      | {input.LA(1) == MY_TOKEN}? // (...) First production

| {input.LA(1) != MY_TOKEN}? // (...) Second production

// (...) end of rule

;

 I am used to work with ANTLR 2.7.7, so this syntax may be wrong under ANTLR 3.1.3.

Could anybody help me please ?

 

 

--

Jonathan Bayle
IUT Informatique Vannes

________________________________

De : antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] De la part de Bayle Jonathan
Envoyé : lundi 10 août 2009 18:10
À : antlr-interest at antlr.org
Objet : [antlr-interest] Exception while debugging C# 2.0 with ANTLRWorks1.2.3

 

Hi,

 

I am currently trying to debug a SQL grammar generated by ANTLR 3.1.3 with ANTLRWorks 1.2.3.

I have upgraded ANTLRWorks as explained in Readme.txt to make it compliant with v 3.1.3.

I generate my lexer and parser files with "-debug" option. Then I launch parsing under Visual Studio 2008, and finally I do a "Debug Remote" under ANTLRWorks. All seems to work first. I was able to debug my grammar with several .sql files. But sometimes, I get a :

java.lang.NumberFormatException: For input string: "False"

that is not handled by ANTLRWorks. Then the application freezes and I have to stop debugging.

 

Do you have an idea to solve that issue ?

 

Cheers,

 

 

--

Jonathan Bayle
IUT Informatique Vannes

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090812/b7babd8b/attachment.html 


More information about the antlr-interest mailing list