Re: R-beta: Precedence of ~ and |

Ross Ihaka (ihaka@stat.auckland.ac.nz)
Thu, 3 Apr 1997 07:44:40 +1200 (NZST)


Date: Thu, 3 Apr 1997 07:44:40 +1200 (NZST)
From: Ross Ihaka <ihaka@stat.auckland.ac.nz>
Message-Id: <199704021944.HAA11479@stat1.stat.auckland.ac.nz>
To: bates@stat.wisc.edu, r-testers@stat.math.ethz.ch
Subject: Re:  R-beta: Precedence of ~ and |

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@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=