mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 19:23:03 +01:00
23 lines
250 B
Plaintext
23 lines
250 B
Plaintext
%left LO '+' '-'
|
|
%left HI '*' '/' '%'
|
|
%nonassoc UNARY
|
|
|
|
%%
|
|
|
|
expr: expr op1 expr %prec LO
|
|
| expr op2 expr %prec HI
|
|
| unary expr %prec UNARY
|
|
;
|
|
|
|
op1 : '+'
|
|
| '-'
|
|
;
|
|
|
|
op2 : '*'
|
|
| '/'
|
|
| '%'
|
|
;
|
|
|
|
unary : '+' | '-' | '*' | '&' ;
|
|
|