%token ID %left '-' %left '*' %right UNARY %% expr: expr '-' expr | expr '*' expr | '-' expr %prec UNARY | ID ;