lua-users home
lua-l archive

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


On Sun-2011/10/02-11:44 Petite Abeille wrote:

> On Oct 2, 2011, at 10:20 AM, Dieter Plaetinck wrote:
> 
>> The long story is @
>> http://dieter.plaetinck.be/luamail_a_mail_client_built_into_luakit.html
> 
> Nice :)
> 
>> currently our biggest concern is - as is mentioned here adequately -
>> finding a good message parser.
> 
> Right, it's a bit of a pain.
> 
> For the sake of expediency, I'm presently using a mixture of external
> tools to get this going:
> 
> - 822date to parse RFC*822 dates
> - reformail to extract headers
> - reformime to handle MIME structures
> - addrlist to parse RFC*822 addresses
> - iconv for charset conversion

For completeness, look at [1].  It calls itself a "State Machine
Compiler" and already contains an example for scanning email headers.
Note that this is a scanner constructor, a little like bison, but easier
to use IMO.

[1] http://www.complang.org/ragel/


clemens