BNF parsing implemented