Program Structure
< program > -> program { |
| | < type definition list > |
| | < body > |
| } |
|
< body > -> < variable declaration list >
< function 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 function 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