Prev Up Next
Go backward to Lexical Issues
Go up to Top
Go forward to Types

Program Structure

< program > -> program < identifier >
< type definition part >
< body >
end
< body > -> < variable declaration part > < procedure definition list > < statement list >

Each program consists of a possibly empty list of type definitions, and a < body >. A < body > is composed of optional lists of variable declarations and procedure definitions followed by a list of executable statements. Note that type definitions can only appear in the header of the main program.


Computer Science 434
Department of Computer Science
Williams College

Prev Up Next