On Wed, 2007-08-01 at 14:48 +1000, skaller wrote: > if(i==10) > if(i==0) println "WRONG"; > else println "RIGHT";
> Unfortuntely .. the last group there is misinterpreted: > it matches the else with the outer statement! The grammar is: > > sifgoto := if lpar sexpr rpar statement // i > sifgoto := if lpar sexpr rpar statement else statement // ie > > which in Felix parser system gives the second production precedence. Weirdly .. this: sifgoto := if lpar sexpr rpar statement else statement =># sifgoto := if lpar sexpr rpar statement =># actually works .. or seems to lol! -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language