Changes between Version 14 and Version 15 of C to tass-AST xml


Ignore:
Timestamp:
04/10/11 20:20:48 (15 years ago)
Author:
Stephen Siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • C to tass-AST xml

    v14 v15  
    1616
    1717
    18 Preprocessing: first, the file is preprocessed to create a stream of tokens with original source information.
     18Preprocessing: before an AST is created, the source file(s) are preprocessed to create a stream of tokens with complete source information.  This stream is fed to the parser which creates the AST.
    1919
    2020All AST nodes have source information.
     
    3030   * assign
    3131   * assert
    32    * pragma
     32   * assume
     33   * pragma (any kind of pragma, represented as just a string)
    3334      * string
    3435      * assert, assume, invariant, input, output, ...
    35    * switch
     36   * case statement (select)
    3637   * if-then, if-then-else
    3738   * while
     
    5152      * static, ...?
    5253   * expressions (may have side-effects)
    53       * literals (including named literals)
     54      * literals (including named literals): integers, reals, strings, chars
    5455      * variable
    5556      * operators: +,-,*,/,%,<,<=,>,>=,==,!=,!,&&,\|\|
     
    6263      * function invocation f(x)
    6364      * initializers
     65      * sizeof (type, expression, or string literal)
     66      * startOf(a): &a[0] -- that is the Cil way of converting an array to pointer to first element
     67     
    6468
    6569== Processing Stages ==
     
    6973Stages
    7074 1. All variables, types, etc., are represented simply as identifiers
    71  1. Symbol table information is used to annotate the AST
     75 1. Symbol table information is associated to the identifiers in the AST
    7276 1. (Static) types are created and associated to every expression
    7377 1. Variable objects are created and inserted into AST
    74  1. Variables may be moved around to facilitate translation to model, ....
     78 1. Side effects are removed by introducing temp variables
     79 1. Local variables are all lifted to outermost scope
    7580
    7681