:class = CLASS IDENT [ '<' +basic_decl '>' ] '{' *( ((PUBLIC | PRIVATE | PROTECTED) ':' ) | *( ?STATIC ( function | var_decl | property | enum ) ) '}' :property = PROPERTY (IDENT|+('['']')|'('')') ':' type_decl '{' GET [ '(' basic_decl *( ',' basic_decl ) ')' ] '{' *statement '}' SET '(' [ (basic_decl *( ',' basic_decl ) ',' ] IDENT ')' '{' *statement '}' :enum = ENUM IDENT '{' IDENT [ '=' INTEGER ] *( ',' IDENT [ '=' INTEGER ] ) '}' :function = FUNCTION (IDENT|CAST|DESTROY|OPERATOR OVERLOADABLE) '(' [ basic_decl *( ',' basic_decl ')' [ ':' type_decl ] ( ';' | '{' *statement '}' :type_decl = IDENT [ '<' IDENT [ ':' type_decl *(',' IDENT [ ':' type_decl ]) ] '>' ] :var_decl = VAR IDENT *('[' basic_expr ']') ) [ IDENT *('[' basic_expr ']') ] [ ':' type_decl ] [ '=' expression ] :basic_decl = IDENT *('[' basic_expr ']') [ ':' type_decl ] :statement = ( ';' | if_statement | for_statement | while_statement | switch_statement | expression ';' | function | var_decl ';' ) :for_statement = FOR '(' basic_expr *(',' basic_expr) ';' basic_expr *(',' basic_expr) ';' basic_expr *(',' basic_expr) ')' ( statement | '{' *statement '}' ) :if_statement = IF '(' basic_expr ')' ( statement | '{' *statement '}' ) [!] ELSE ( statement | '{' *statement '}' | if_statement ) :while_statement = WHILE '(' basic_expr *(',' basic_expr) ')' ( statement | '{' *statement '}' ) :switch_statement = SWITCH '(' basic_expr ')' '{' *( statement | CASE (FLOAT|INTEGER|STRING) ':' | DEFAULT ':' ) '}' :expression = FUNCTION '(' [ IDENT *( '[' basic_expr ']' [ ':' type_decl ] *( ',' IDENT *( '[' basic_expr ']' ) [ ':' type_decl ] ) ] ')' [ ':' type_decl ] RIGHTARROW ( expression | '{' *statement '}' ) | basic_expr | '{' expression *( ',' expression ) '}' :basic_expr = FLOAT|INTEGER|STRINGLIT|ident_ops | '(' basic_expr ')' | basic_expr BINOP basic_expr | UNARY_OP basic_expr :ident_ops = ?GLOBAL_SCOPE IDENT *( '.' ident_ops ) | ident_ops '(' [ expression *( ',' expression ) ] ')' | ident_ops *( '[' basic_expr ']' ) | ( INCOP | DECOP ) ident_ops | ident_ops ( INCOP | DECOP )