TheSymbolTableΒΆ

forttyp.spad line 430 [edit on github]

Creates and manipulates one global symbol table for FORTRAN code generation, containing details of types, dimensions, and argument lists.

argumentList!: (Symbol, List Symbol) -> Void

argumentList!(f, l) declares that the argument list for subprogram f in the global symbol table is l.

argumentList!: (Symbol, List Symbol, %) -> Void

argumentList!(f, l, tab) declares that the argument list for subprogram f in symbol table tab is l.

argumentList!: List Symbol -> Void

argumentList!(l) declares that the argument list for the current subprogram in the global symbol table is l.

argumentListOf: (Symbol, %) -> List Symbol

argumentListOf(f, tab) returns the argument list of f

clearTheSymbolTable: () -> Void

clearTheSymbolTable() clears the current symbol table.

clearTheSymbolTable: Symbol -> Void

clearTheSymbolTable(x) removes the symbol x from the table

coerce: % -> OutputForm

from CoercibleTo OutputForm

currentSubProgram: () -> Symbol

currentSubProgram() returns the name of the current subprogram being processed

declare!: (List Symbol, FortranType, Symbol, %) -> FortranType

declare!(u, t, asp, tab) declares the parameters u of subprogram asp to have type t in symbol table tab.

declare!: (Symbol, FortranType) -> FortranType

declare!(u, t) declares the parameter u to have type t in the current level of the symbol table.

declare!: (Symbol, FortranType, Symbol) -> FortranType

declare!(u, t, asp) declares the parameter u to have type t in asp.

declare!: (Symbol, FortranType, Symbol, %) -> FortranType

declare!(u, t, asp, tab) declares the parameter u of subprogram asp to have type t in symbol table tab.

empty: () -> %

empty() creates a new, empty symbol table.

endSubProgram: () -> Symbol

endSubProgram() asserts that we are no longer processing the current subprogram.

newSubProgram: Symbol -> Void

newSubProgram(f) asserts that from now on type declarations are part of subprogram f.

printHeader: () -> Void

printHeader() produces the FORTRAN header for the current subprogram in the global symbol table on the current FORTRAN output stream.

printHeader: (Symbol, %) -> Void

printHeader(f, tab) produces the FORTRAN header for subprogram f in symbol table tab on the current FORTRAN output stream.

printHeader: Symbol -> Void

printHeader(f) produces the FORTRAN header for subprogram f in the global symbol table on the current FORTRAN output stream.

printTypes: Symbol -> Void

printTypes(tab) produces FORTRAN type declarations from tab, on the current FORTRAN output stream

returnType!: (Symbol, Union(fst: FortranScalarType, void: void)) -> Void

returnType!(f, t) declares that the return type of subprogram f in the global symbol table is t.

returnType!: (Symbol, Union(fst: FortranScalarType, void: void), %) -> Void

returnType!(f, t, tab) declares that the return type of subprogram f in symbol table tab is t.

returnType!: Union(fst: FortranScalarType, void: void) -> Void

returnType!(t) declares that the return type of he current subprogram in the global symbol table is t.

returnTypeOf: (Symbol, %) -> Union(fst: FortranScalarType, void: void)

returnTypeOf(f, tab) returns the type of the object returned by f

showTheSymbolTable: () -> %

showTheSymbolTable() returns the current symbol table.

symbolTableOf: (Symbol, %) -> SymbolTable

symbolTableOf(f, tab) returns the symbol table of f

CoercibleTo OutputForm