[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SableCC equivalent to %prec from yacc



What is the SableCC equivalent to %prec in yacc? I am trying to get the
following rule for an if statement to take the first if statement
otherwise try the ifelse statement.


Stephen

--------------------------
  selection_statement =
	{if} kw_if
	    tk_left_paren
	    condition
	    tk_right_paren
	    statement |
	{ifelse} kw_if
	    tk_left_paren
	    condition
	    tk_right_paren
	    [if]:statement
	    kw_else
	    [else]:statement |
	{sw} kw_switch
	    tk_left_paren
	    condition
	    tk_right_paren
	    statement;