Infix Expression
Contents
Syntax
infix_expr ::= expr_l op expr_r
op ::= '*' | '/' | '%' | '+' | '-' | '<<' | '>>' | '&' | '^' | '|'
| '==' | '!=' | '<' | '<=' | '>' | '>='
| '&&' | '||'
| '=' | '*=' | '/=' | '%=' | '+=' | '-='
| '<<=' | '>>=' | '&=' | '^=' | '|='
Also see operator precedence.
Typing
Semantics
Basically, the semantics of all operations are just like in C with a few differences:
General
- no automatic conversions
Assignments
- an automatic [[address-of expression
|
Prefix Expression]] is inserted forexpr_r
ifexpr_l
is a [[Pointer Type]]. expr_r
maybe a subtype ofexpr_l
.
Examples
TODO