Illegal start of expression error during debug in ANTLRWorks
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Natanael_Osorio
Posted On:   Tuesday, October 18, 2011 02:35 PM

I did the following grammar: grammar Tabulation_Test_02; s : l; l : ' 'l | ('a'..'a'|'A'..'Z'); WS : (' ' | ' ' | ' '){skip();}; It is an experience to create a grammar that recognizes a series of lines in which some are tabulated in order to create blocks according to the tab as the Python language. But when I try to debug with the following entry I get the following error in console: [14:47] C:outputTabulation_Test_02Parser.java:141: error: illegal start of expression [14:47] else if ( () ) { [14:47]            ^ [14:47] C:outputTabulation_Test_02Parser.java:177: error: illegal    More>>

I did the following grammar:


grammar Tabulation_Test_02;

s : l;


l : ' 'l | ('a'..'a'|'A'..'Z');



WS : (' ' | '
' | '
'){skip();};



It is an experience to create a grammar that recognizes a series of lines in which some are tabulated in order to create blocks according to the tab as the Python language.




But when I try to debug with the following entry I get the following error in console:



[14:47] C:outputTabulation_Test_02Parser.java:141: error: illegal start of expression


[14:47] else if ( () ) {


[14:47]            ^


[14:47] C:outputTabulation_Test_02Parser.java:177: error: illegal start of expression


[14:47] if ( ) {


[14:47]     ^


[14:47] 2 errors


   <<Less

Re: Illegal start of expression error during debug in ANTLRWorks

Posted By:   Natanael_Osorio  
Posted On:   Wednesday, October 19, 2011 11:42 PM

This was happening because of a confusion between two versions of Java. As I had Java 1.7 and 1.6 installed the program was compiled with one version and executed with another version.
About | Sitemap | Contact