This is a text format of the NS Grammar. Sort of BNF-like. Goal ==> [ Constit [ ; Constit ]* [;]] Constit ==> Expression GlobDeclaration Expression ==> SimpleExp CompExp Literal Constructor LValue Assignment ExistsExp FuncCall MsgSend IfExp Iteration BreakExp TryExp LocalDeclaration ConstDeclaration RetExp SimpleExp ==> Expression BinOp Expression UnOp Expression LPAREN_TOK Expression RPAREN_TOK SELF_TOK BinOp ==> ArithOp RelOp BoolOp StringOp ArithOp ==> PLUS_TOK MINUS_TOK STAR_TOK SLASH_TOK DIV_TOK MOD_TOK LSHIFT_TOK RSHIFT_TOK RelOp ==> EQUALS_TOK NEQUALS_TOK LT_TOK GT_TOK LE_TOK GE_TOK BoolOp ==> AND_TOK OR_TOK StringOP ==> CONCAT_TOK CONCAT2_TOK UnOp ==> MINUS_TOK NOT_TOK CompExp ==> BEGIN_TOK ExpSeq END_TOK ExpSeq ==> [ Expression [ SEMI_TOK Expression ] [SEMI_TOK]] Literal ==> SimpleLiteral PRIME_TOK Object SimpleLiteral ==> String Integer Real Character TRUE_TOK NIL_TOK Object ==> SimpleLiteral PathExp Frame Array PathExp ==> Symbol [POINT_TOK Symbol] PLUS_TOK Array ==> LBRACK_TOK [ Symbol COLON_TOK ] [ Object [ COMMA_TOK Object ] [ COMMA_TOK ] ] RBRACK_TOK Frame ==> LCURLY_TOK [ FrameSlot [ COMMA_TOK FrameSlot ] [ COMMA_TOK ] ] RCURLY_TOK FrameSlot ==> Symbol COLON_TOK Object