many changes; some cosmetic; coercions now explicit in tree

This commit is contained in:
ceriel
1987-07-30 13:37:39 +00:00
parent 48a4d04b61
commit 0e397f09f3
25 changed files with 707 additions and 584 deletions

View File

@@ -146,19 +146,21 @@ AddOperator:
term(struct node **pnd;)
{
register struct node *nd;
}:
factor(pnd)
factor(pnd) { nd = *pnd; }
[
/* MulOperator */
[ '*' | '/' | DIV | MOD | AND | '&' ]
{ *pnd = MkNode(Oper, *pnd, NULLNODE, &dot); }
factor(&((*pnd)->nd_right))
[ '*' | '/' | DIV | MOD | AND ]
{ nd = MkNode(Oper, nd, NULLNODE, &dot); }
factor(&(nd->nd_right))
]*
{ *pnd = nd; }
;
/* inline in "term"
MulOperator:
'*' | '/' | DIV | MOD | AND | '&'
'*' | '/' | DIV | MOD | AND
;
*/