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 subprogramf
in the global symbol table isl
.
- argumentList!: (Symbol, List Symbol, %) -> Void
argumentList!(f, l, tab)
declares that the argument list for subprogramf
in symbol table tab isl
.
- argumentList!: List Symbol -> Void
argumentList!(l)
declares that the argument list for the current subprogram in the global symbol table isl
.
- clearTheSymbolTable: () -> Void
clearTheSymbolTable()
clears the current symbol 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 parametersu
of subprogramasp
to have typet
in symbol table tab.
- declare!: (Symbol, FortranType) -> FortranType
declare!(u, t)
declares the parameteru
to have typet
in the current level of the symbol table.
- declare!: (Symbol, FortranType, Symbol) -> FortranType
declare!(u, t, asp)
declares the parameteru
to have typet
in asp.
- declare!: (Symbol, FortranType, Symbol, %) -> FortranType
declare!(u, t, asp, tab)
declares the parameteru
of subprogramasp
to have typet
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 subprogramf
.
- 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 subprogramf
in symbol table tab on the current FORTRAN output stream.
- printHeader: Symbol -> Void
printHeader(f)
produces the FORTRAN header for subprogramf
in the global symbol table on the current FORTRAN output stream.
- printTypes: Symbol -> Void
printTypes(tab)
produces FORTRAN type declarations fromtab
, on the current FORTRAN output stream
- returnType!: (Symbol, Union(fst: FortranScalarType, void: void)) -> Void
returnType!(f, t)
declares that the return type of subprogramf
in the global symbol table ist
.
- returnType!: (Symbol, Union(fst: FortranScalarType, void: void), %) -> Void
returnType!(f, t, tab)
declares that the return type of subprogramf
in symbol table tab ist
.
- returnType!: Union(fst: FortranScalarType, void: void) -> Void
returnType!(t)
declares that the return type of he current subprogram in the global symbol table ist
.
- returnTypeOf: (Symbol, %) -> Union(fst: FortranScalarType, void: void)
returnTypeOf(f, tab)
returns the type of the object returned byf
- showTheSymbolTable: () -> %
showTheSymbolTable()
returns the current symbol table.
- symbolTableOf: (Symbol, %) -> SymbolTable
symbolTableOf(f, tab)
returns the symbol table off