Program = { Variable-Declaration | Function-Declaration | Function-Definition } . Variable-Declaration = Type Ident ";" . Function-Declaration = Type Ident "(" Function-Arguments ")" ";" . Function-Definition = Type Ident "(" Function-Arguments ")" Function-Body . Function-Arguments = [ Type Index { "," Type Ident } ] . Type = "int" | "char" . Function-Body = Statement . Statement = "{" Statement "}" | Type Ident [ "=" Expression ] ";" | "return" Expression ";" | "if" "(" Expression ")" Statement [ "else" Statement ] | "while" "(" Expression ")" Statement | Expression ";" . Expression = Equal-Expression . Equal-Expression = ::= | = ::= | & | | ::= | == | != ::= | < ::= | << | >> ::= | + | - ::= | [ ] | ( { "," } ) := | | | "(" ")"