Parsing BNF Grammar