Quoting skaller <[EMAIL PROTECTED]>: > 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!
If you're only considering the age of the rule used to produce the toplevel statement to decide which interpretation to keep, then this behavior makes sense. If you are considering the max of the age of all the rules used, then it's weird and it may not be reliable. Emmanuel ------------------------------------------------------------------------- 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