From: Baptiste L. <gai...@fr...> - 2003-04-26 22:21:09
|
I've added a new utility class: CStringView (in xtl/CStringView.h). Tests are in rftaparser. It's basically a object that take a start and end const char *pointer to represent a string. The string is not copied (it's to be use for parsing). A random access and reverse random access iterator are also provided. Notes that the iterators are also enumerators: they know the string they are iterating over. The classes probably still need a few adjustement, but I've already used it successfully to refactor CaseStatementParser. This should enable a few IntroduceParameterObject refactored. It should also be possible to extract some of the mini-parser present in Parser and made them more generic. This has already been done for a few (see ParserTools.h). Baptiste. |