static char *sccsid
= "@(#)rval.c 1.1 (Berkeley) %G%";
/* Copyright (c) 1979 Regents of the University of California */
* pxp - Pascal execution profiler
* Version 1.2 January 1979
#define alph(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
* Rvalue reformats an expression.
* Par is a flag indicating that the expression
* should be parenthesized if it is non-atomic.
ppop(r
[0] == T_PLUS
? "+" : "-");
rvalue(r
[2], prec(al
) > prec(r
) || full
);
rvalue(al
, prec(al
) <= prec(r
) || full
);
rvalue(al
, prec(al
) < prec(r
) || full
);
rvalue(al
, prec(al
) <= prec(r
) || full
);
* Prec returns the precedence of an operator,
* with larger numbers indicating stronger binding.
* This is used to determine when parenthesization
* is needed on subexpressions.