Need help parsing with pyparsing...
Just Another Victim of the Ambient Morality
ihatespam at hotmail.com
Mon Oct 22 05:18:54 EDT 2007
I'm trying to parse with pyparsing but the grammar I'm using is somewhat
unorthodox. I need to be able to parse something like the following:
UPPER CASE WORDS And Title Like Words
...into two sentences:
UPPER CASE WORDS
And Title Like Words
I'm finding this surprisingly hard to do. The problem is that pyparsing
implicitly assumes whitespace are ignorable characters and is (perhaps
necessarily) greedy with its term matching. All attempts to do the
described parsing either fails to parse or incorrectly parses so:
UPPER CASE WORDS A
nd Title Like Words
Frankly, I'm stuck. I don't know how to parse this grammar with
pyparsing.
Does anyone know how to accomplish what I'm trying to do?
Thank you...
More information about the Python-list
mailing list