[antlr-interest] another nondeterminism question

jbb at acm.org jbb at acm.org
Fri Feb 14 16:03:39 PST 2003


Mr. Oursland :-

Does this help?

-----------------------------
class SampleParser extends Parser;

startRule
    : expression
    ;
expression
    : "("
      "cond"
      "(" ( (expression)+ ")" "(" )+ "else" (expression)+ ")"
      ")"
    | "EXPR"
    ;
-----------------------------

Basically, I left factored the "(" out of your cond_clause and
else_clause rules and then simplified.....

-- 
	-jbb
----------------+----------------------------
 John B. Brodie | Email : jbrodie at cs.fit.edu
----------------+----------------------------

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list