| 215 | } |
| 216 | |
| 217 | bool cParser::Parse(cFile& input) |
| 218 | { |
| 219 | m_filename = input.GetFilename(); |
| 220 | m_lexer = new cLexer(input.GetFileStream()); |
| 221 | |
| 222 | m_tree = parseStatementList(); |
| 223 | |
| 224 | if (!m_eof && m_success) PARSE_ERROR(UNEXPECTED_TOKEN); |
| 225 | if (!m_tree) PARSE_ERROR(EMPTY); |
| 226 | |
| 227 | delete m_lexer; |
| 228 | m_lexer = NULL; |
| 229 | |
| 230 | return m_success; |
| 231 | } |
| 232 | |
| 233 | cParser::~cParser() |
| 234 | { |