Changes between Version 7 and Version 8 of AST


Ignore:
Timestamp:
04/18/11 17:41:35 (15 years ago)
Author:
Stephen Siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AST

    v7 v8  
    3131
    3232Types of AST Node
    33  * identifiers
    34     * name: string
    35  * type node
    36     * identifier
     33 * IdentifierNodeIF: wraps a string. represents an identifier occurrence in code
     34    * methods
     35       * name: string
     36 * TypeNodeIF: a type expression
     37    * IdentifierTypeNodeIF
    3738       * this is a type that is just a name, e.g., resulting from a C typedef.   This will node will eventually be replaced by a more specific type tree once type definitions are processed.
    38     * void
    39     * integer
     39    * VoidTypeNodeIF: the type "void" used, for example, as the return type for a function that does not return anything
     40    * IntegerTypeNodeIF: an integer type, such as "int" or "long int" or "short int" in C
    4041       * integer sub-types, specified by parameters
    41     * real
     42    * RealTypeNodeIF: a real type, such as "float" or "double" in C
    4243       * real sub-stypes, specified by parameters (e.g., IEEE754 floating point numbers)
    43     * boolean
    44     * char
    45     * array of t
    46        * and possible extent?
    47     * pointer to t
    48     * record ("struct" in C)
    49        * name
    50        * sequence of fields, each with type and name
    51     * function from T1 to T2
    52     * enumeration type
    53        * name
    54        * sequence of elements
    55  * variable definition
    56     * scope (global, input/output, ...)
    57     * name (together with scope, this uniquely identifies the variable)
    58     * type
    59  * variable declaration: each declaration has an associated definition.  There can be many decls associated to one def.    This is a linking thing: a single variable that is to be used in several files will be defined in one file but be declared in all
     44    * BooleanTypeNodeIF: the boolean type
     45    * CharacterTypeNodeIF: the character type (char in C)
     46    * ArrayTypeNodeIF: an array type
     47       * methods
     48          * elementType: TypeNodeIF
     49          * extent: ?  This is complicated.   The extent might be an expression involving input variables.
     50    * PointerTypeNodeIF
     51       * methods
     52           * baseType: TypeNodeIF
     53    * RecordTypeNodeIF: "struct" in C
     54       * methods
     55          * name: IdentifierNodeIF
     56          * numFields: int
     57          * field(int i): NameTypePairNodeIF: this is an ordered pair (n,t) where n is an IdentifierNodeIF and t is a TypeNodeIF
     58    * FunctionTypeNodeIF
     59       * methods
     60          * numInputs: int
     61          * inputType(int i): TypeNodeIF
     62    * EnumerationTypeNodeIF
     63       * methods
     64         * name: IdentifierNodeIF
     65         * numElements: int
     66         * element(int i): IdentifierNodeIF
     67 * VariableDefinitionNodeIF
     68    * methods
     69       * scope: ? (global, input/output, ...)
     70       * name: IdentifierNodeIF (together with scope, this uniquely identifies the variable)
     71       * type: TypeNodeIF
     72 * VariableDeclarationNodeIF: each declaration has an associated definition.  There can be many decls associated to one def.    This is a linking thing: a single variable that is to be used in several files will be defined in one file but be declared in all
    6073    * scope
    6174    * name