[Top] [All Lists]

sample filter implementation

1997-05-04 21:02:46
  Just to see what it would entail, I implemented
draft-showalter-sieve-00.txt.  The code's available from

  A few notes:

  The code's alpha.  It works, it doesn't seem to have any bugs, and
it implements all the features, but the interface is a little
simplistic.  It also has a few hardcoded limitations (no more than 80
characters in a header name, 1024 in a header body, 100 headers,
etc...).  This is not meant to be production code, just stable and
useable by humans for playing with filter scripts.  :-)

  It should be able to figure out how to compile itself on pretty much
anything with lex, yacc, and an ANSI C compiler.

  It basically just takes the name of a filter script, and a message
on stdin, and prints out the actions generated by the script.

  It doesn't have any framework for extensions, although it wouldn't
be hard at all to add one.

  While the diagnostics it prints out are reasonably nice, it doesn't
do error recovery in the parser - figuring out the token to shift to,
with the way control structures are implemented, is a royal pain, and
most yaccs don't have token-insertion recovery.  So you get one error,
and then it exits.

  Still, it's useable, and stable, and proof that it's possible to
implement the draft as it stands.



<Prev in Thread] Current Thread [Next in Thread>
  • sample filter implementation, Rob Earhart <=