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_rifexpr_lis a [[Pointer Type]]. expr_rmaybe a subtype ofexpr_l.
Examples
TODO