| 33 | | * +,-,*,/,%,<,<=,>,>=,==,!=,!,&&,\|\| |
| 34 | | * x++, x--, ++x, --x, x+=a, x*=a, ... |
| | 38 | * operators: +,-,*,/,%,<,<=,>,>=,==,!=,!,&&,\|\| |
| | 39 | * special kinds of assignments: x++, x--, ++x, --x, x+=a, x*=a, ... |
| 42 | | How to handle pre-processor macros? Include in AST? |
| | 47 | == Processing Stages == |
| | 48 | |
| | 49 | The AST can be used to represent the program at different stages of translation. |
| | 50 | |
| | 51 | Stages |
| | 52 | # All variables, types, etc., are represented simply as identifiers |
| | 53 | # Symbol table information is used to annotate the AST |
| | 54 | # (Static) types are created and associated to every expression |
| | 55 | # Variable objects are created and inserted into AST |
| | 56 | # Variables may be moved around to facilitate translation to model, .... |
| | 57 | |
| | 58 | |
| | 59 | Questions: |
| | 60 | * How to handle pre-processor macros? Include in AST? |