Held: Monday, February 9, 1998
Program ::= 'program' id ( IdList ) ; DeclarationList CompoundStatement '.'
DeclarationList generate the association table and
the CompoundStatement will use it.
Program ::= 'program' id ( IdList ) ; DeclarationList CompoundStatement '.' CompoundStatement.types = DeclarationList.types
DeclarationList look like? It is a sequence of
individual Declarations.
DeclarationList ::= Declaration ';' DeclarationList
DeclarationList ::= // nothing
DeclarationList_0 ::= Declaration ';' DeclarationList_1
DeclarationList_0.types =
Declaration.types union DeclarationList_1.types
DeclarationList ::= // nothing
DeclarationList.types = empty_set
var
followed by a list of identifiers and a type.
Declaration ::= 'var' VarList : Type
Declaration ::= 'var' VarList : Type VarList.type = Type.type Declaration.types = VarList.types
type attribute of
Type? By the base rules
Type ::= 'integer' Type.type = int Type ::= 'real' Type.type= real
VarList_0 ::= id ',' VarList_1
VarList_1.type = VarList_0.type
VarList_0.types =
(id: VarList_0.type) union VarList_1.types
VarList ::= id
VarList.types = (id: VarList.type)
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Thu May 7 20:29:37 1998.
This page generated on Thu May 7 20:34:37 1998 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu