/**
* The overall pseudocode file
*/
file: function*;
/**
* A single function
*/
function
: intendedUse statements
;
/**
* The intended use header
*/
intendedUse
: fnDecl varDecls
;
/**
* The function declaration
*/
fnDecl
: name=ID LPAREN argList RPAREN
;
/**
* The argument list
*/
argList
: (ID (COMMA ID)*)?
;
/**
* Declarations of the variables used in the pseudocode
*/
varDecls
: LBRACE (varEntry)* RBRACE
;
/**
* An entry in the list of variables
*/
varEntry
: TYPENAME COLON (ID)+ SEMICOLON
;