问题 I've built a basic parser using the C++ runtime demo and it works fine. However I typically parse a lot of input strings, can the code be modified to reuse existing objects for repeated calls? If so, does anyone have an example of this? 回答1: Yes, reusing the objects is possible. A typcial sequence for a parse call looks like this then: input.load(newText); errors.clear(); lexer.reset(); lexer.setInputStream(&input); // Not just reset(), which only rewinds the current position. tokens