a3 parsing implemented with some class structure