pyparsing: how to negate a grammar

knguyen at megisto.com knguyen at megisto.com
Sat Jan 8 19:03:59 EST 2005


Hi,

I want to define a rule for a line that does NOT start with a given
Literal. How do I do that? I try the following and my program just hang
there:

BodyLine = ~Literal("HTTP/1.1") + restOfLine

Thanks,
Khoa




More information about the Python-list mailing list