摘要 |
A parser for parsing complex data is disclosed for avoiding the shortcomings of traditional text parsers by defining, constructing, and utilizing a parser in ways that allow for greater parsing complexity and flexibility, allowing performance of text transformations of greater complexity than would have been practical with traditional parsers. In some embodiments, a method is provided for receiving a parser definition as an input to a parser generator and generating a parser at least in part from the parser definition. In some embodiments, the generated parser comprises two or more handlers forming a processing pipeline. In some embodiments, the parser receives as input a first string into the processing pipeline. In some embodiments, the parser generates a second string by a first handler and inputs the second string regeneratively into the parsing pipeline, if the first string matches an expression specified for the first handler in the parser definition. |