Re: pyparsing: how to negate a grammar

2005-01-09 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Paul, > > I am trying to extract HTTP response codes from a HTTP page send from > a web server. Below is my test program. The program just hangs. > > Thanks, > Khoa > ## > > Khoa - T

Re: pyparsing: how to negate a grammar

2005-01-09 Thread knguyen
Hi Paul, I am trying to extract HTTP response codes from a HTTP page send from a web server. Below is my test program. The program just hangs. Thanks, Khoa ## #!/usr/bin/python from pyparsing import ParseException, Dict, CharsNotIn, Group,Lite

Re: pyparsing: how to negate a grammar

2005-01-09 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 > Khoa -