program -> body body -> '(' BodyDef line '(' {declarations} ')' statement ')' declarations -> '(' VarDecs '(' {var-dec} ')' ')' -> '(' TypeDecs '(' {type-dec} ')' ')' -> '(' ProcDecs '(' {proc-dec} ')' ')' var-dec -> '(' VarDec line ID type expression ')' type-dec -> '(' TypeDec line ID type ')' proc-dec -> '(' ProcDec line ID '(' { formal-param } ')' type body ')' type -> '(' NamedTyp line ID ')' -> '(' ArrayTyp line type ')' -> '(' RecordTyp line '(' { component } ')' ')' -> '(' NoTyp ')' component -> '(' Comp line ID type ')' formal-param -> '(' Param line ID type ')' statement -> '(' AssignSt line lvalue expression ')' -> '(' CallSt line ID '(' { expression } ')' ')' -> '(' ReadSt line '(' { lvalue } ')' ')' -> '(' WriteSt line '(' { expression } ')' ')' -> '(' IfSt line expression statement statement ')' -> '(' WhileSt line expression statement ')' -> '(' LoopSt line statement ')' -> '(' ForSt line ID expression expression expression statement ')' -> '(' ExitSt line ')' -> '(' RetSt line [ expression ] ')' -> '(' SeqSt '(' { statement } ')' ')' expression -> '(' BinOpExp line binop expression expression ')' -> '(' UnOpExp line unop expression ')' -> '(' LvalExp lvalue ')' -> '(' CallExp line ID '(' { expression } ')' ')' -> '(' RecordExp line ID '(' { record-init } ')' ')' -> '(' ArrayExp line ID '(' { array-init } ')' ')' -> '(' IntConst line INTEGER ')' -> '(' RealConst line STRING ')' -> '(' StringConst line STRING ')' record-init -> '(' RecordInit ID expression ')' array-init -> '(' ArrayInit expression expression ')' lvalue -> '(' Var line ID ')' -> '(' ArrayDeref line lvalue expression ')' -> '(' RecordDeref line lvalue ID ')' binop -> GT | LT | EQ | GE | LE | NE | PLUS | MINUS | TIMES | SLASH -> DIV | MOD | AND | OR unop -> UPLUS | UMINUS | NOT line -> INTEGER