R-beta: Precedence of ~ and |

Ross Ihaka ihaka at stat.auckland.ac.nz
Wed Apr 2 21:44:40 CEST 1997


I noticed this when I wrote a coplot gizmo and had to change the
precedence.  The new precedence list is

	%left           '?'
	%left           LOW WHILE FOR REPEAT
	%right          IF
	%left           ELSE
	%right          LEFT_ASSIGN
	%left           RIGHT_ASSIGN
	%nonassoc       '~' TILDE
	%left           OR AND
	%left           UNOT NOT
	%nonassoc       GT GE LT LE EQ NE
	%left           '+' '-'
	%left           '*' '/' '%'
	%left           SPECIAL
	%left           ':'
	%left           UMINUS UPLUS
	%right          '^'
	%left           '$'
	%nonassoc       '(' '[' LBB

It has also been pointed out to me (by the compiler division) that
AND and OR should have different precedences.  My C manual says
&& has higher precedence than || so I will make this change too.
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the R-help mailing list