Implemented error handling by overriding antlr methods