rogDecl  ::= subProgHead decls compoundStm.

subProgHead  ::= FUNCTION  ident arguments ':' ident ';' 
           | PROCEDURE ident arguments ';'.

arguments    ::= '(' parameterList ')'| empty. 

parameterList  ::= identList ':' type parameterLists.

parameterLists ::= ';' identList ':' type parameterLists 
             | empty.

compoundStm ::= BEGIN optStm END. 

optStm      ::= stmList | empty.

stmList     ::= statement, stmLists.

stmLists    ::= ';' statement stmLists | empty.

statement ::= ident pa