help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parsing mime multipart sections...


From: Bruce Lilly
Subject: Re: parsing mime multipart sections...
Date: Tue, 5 Jul 2005 10:31:58 -0400
User-agent: KMail/1.8.1

On Tue July 5 2005 05:41, Roberto Diaz wrote:
> Hi.
> 
> I have to parser some documents which contain some mime/multiparts
> sections..
> 
> I haven't problems parsing most of the document using flex/bison the
> problem is in the multipart sections.
[...]
>  you see the boundary is dynamically defined so I can no use regular
> expressions to detect the "--break".. this wouldn't be an issue at all
> if I could use regular expressions to detect the bodies..  but this is
> not the case for the text/plain parts.
> 
> 
> Maybe some of you know about some trick.,.

You need some code to handle the situation.  And a regular expression
wouldn't help, because a boundary parameter can be quoted and/or
encoded and/or split (see RFC 2231).  You will also need to take into
account missing closing delimiters (RFC 2046 section 5.1.2).

There is a flex/bison/C solution at http://users.erols.com/blilly/mparse
It's at alpha because it depends on reentrant flex which has been stuck
at beta for years. 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]