Re: A nice way to use regex for complicate parsing

2007-03-30 Thread aspineux
On 29 mar, 17:33, "Paul McGuire" <[EMAIL PROTECTED]> wrote: > On Mar 29, 9:42 am, Shane Geiger <[EMAIL PROTECTED]> wrote: > > > It would be worth learning pyparsing to do this. > > Thanks to Shane and Steven for the ref to pyparsing. I also was > struck by this post, thinking "this is pyparsing wr

Re: A nice way to use regex for complicate parsing

2007-03-29 Thread Paul McGuire
On Mar 29, 9:42 am, Shane Geiger <[EMAIL PROTECTED]> wrote: > It would be worth learning pyparsing to do this. > Thanks to Shane and Steven for the ref to pyparsing. I also was struck by this post, thinking "this is pyparsing written in re's and dicts". The approach you are taking is *very* much

Re: A nice way to use regex for complicate parsing

2007-03-29 Thread Shane Geiger
It would be worth learning pyparsing to do this. aspineux wrote: My goal is to write a parser for these imaginary string from the SMTP protocol, regarding RFC 821 and 1869. I'm a little flexible with the BNF from these RFC :-) Any comment ? tests=[ 'MAIL FROM:<[EMAIL PROTECTED]>', 'MA

A nice way to use regex for complicate parsing

2007-03-29 Thread aspineux
My goal is to write a parser for these imaginary string from the SMTP protocol, regarding RFC 821 and 1869. I'm a little flexible with the BNF from these RFC :-) Any comment ? tests=[ 'MAIL FROM:<[EMAIL PROTECTED]>', 'MAIL FROM:[EMAIL PROTECTED]', 'MAIL FROM:<[EMAIL PROTECTED]> SI