[Pyparsing] Lenient Parsing
Brought to you by:
ptmcg
From: Haq, S. <Sal...@ne...> - 2012-04-03 21:41:32
|
Hi, I am trying to write a parser that can parse various dialects of SQL. It will be formally defined for a specific, minimal dialect. Other dialects can be expected to have unrecognized tokens and can be considered supersets of the base dialect. It should be easy to define rules for the parser so that it does not choke on unrecognized tokens. I'm still reading up on PyParsing for this specific problem. I've seen various examples of simple SQL parsers implemented using PyParsing, but none that are lenient. I've also looked at PyParsing's 'makeHTMLTags' function which leniently parses HTML tags that can have arbitrary attributes. Are there other examples of lenient parsing / malformed syntax parsing that have been implemented with PyParsing? Thanks, Shaq |