Changes between Version 8 and Version 9 of C to tass-AST xml


Ignore:
Timestamp:
04/10/11 12:09:29 (15 years ago)
Author:
Stephen Siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • C to tass-AST xml

    v8 v9  
    33== Elements of a TASS AST ==
    44
     5Preprocessing: first, the file is preprocessed to create a stream of tokens with original source information.
     6
     7All AST nodes have source information.
     8
     9Types of AST Node
    510 * identifiers
    611 * type expressions
     
    3136      * literals (including named literals)
    3237      * variable
    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, ...
    3540      * bit-wise operators?
    3641      * &,* (pointer operations)
     
    4045      * function invocation f(x)
    4146
    42 How to handle pre-processor macros?   Include in AST?
     47== Processing Stages ==
     48
     49The AST can be used to represent the program at different stages of translation.
     50
     51Stages
     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
     59Questions:
     60 * How to handle pre-processor macros?   Include in AST?
    4361
    4462