[Top] [All Lists]

acap, comparators, and semicolons

1997-12-02 18:52:37
So the contains, is, & matches tests use ACAP's comparator registry.  ACAP
defines 3 comparators, i;octet, i;ascii-casemap, and i;ascii-numeric.

Looking at the sieve-00 implementation Rob hacked up ages ago, i;octet is
the default and i;ascii-casemap is what used to be a "-nocase" change to the

There are two problems.  The first is that the comparator argument contains
a ; which makes the parser gross.  For the moment, I guess I'm going to
leave the "i;" part out as a hack (which is what the draft says because I
didn't read the ACAP drafts enough).

The easy remedy to this is to just put the comparator in quotes so that
instead of being part of the keyword, it's just an argument to the command.
There are a few other cases where optional arguments need to be used.

Any suggestions?

I'm considering something like

  compare-test-keywords = "is"/"matches"/"contains"
  comparator-name       = string
  optional-comparator   = "-comparator" WSP comparator-name
  compare-test          = compare-test-keywords WSP [optional-comparator]
  header                = "header" WSP string-list WSP compare-test 
                                WSP string-list

So comparator-keywords are moved out of the parser.  (Command parsing should
probably be moved out of the parser too, and resolved like symbols in a real

                                           Tim Showalter 

<Prev in Thread] Current Thread [Next in Thread>