PROGRAM -> { DECL } DECL -> VAR_DECL | FUNC_DECL | STRUCT_DECL VAR_DECL -> TYPE NAME ";" FUNC_DECL -> TYPE NAME "(" [ PARAM_DECL { "," PARAM_DECL } ] ")" "{" { DECL } { STMT } "}" STRUCT_DECL -> "struct" NAME "{" { VAR_DECL } "}" PARAM_DECL -> [ "ref" ] TYPE NAME EXP -> EXP LOG_OP EXP | "!" EXP | EXP REL_OP EXP | EXP ARIT_OP EXP | "(" EXP ")" | LITERAL | CALL_STMT | "new" NAME "(" ")" | VAR VAR -> NAME | EXP "." NAME LOG_OP -> "&&" | "||" REL_OP -> "<" | "<=" | ">" | ">=" | "==" | "!=" ARIT_OP -> "+" | "-" | "*" | "/" | "**" LITERAL -> FLOAT_LITERAL | INT_LITERAL | STRING_LITERAL | "true" | "false" | "null" STMT -> ASSIGN_STMT ";" | IF_STMT | WHILE_STMT | RETURN_STMT ";" | CALL_STMT ";" ASSIGN_STMT -> VAR "=" EXP IF_STMT -> "if" "(" EXP ")" "{" { STMT ";" } "}" [ "else" "{" { STMT ";" } "}" ] WHILE_STMT -> "while" "(" EXP ")" "{" { STMT ";" } "}" RETURN_STMT -> "return" [ EXP ] CALL_STMT -> NAME "(" [ ACTUAL_PARAM { "," ACTUAL_PARAM } ")" ACTUAL_PARAM -> "ref" VAR | EXP TYPE -> "float" | "int" | "string" | "bool" | NAME