ietf-mta-filters
[Top] [All Lists]

Re: variables draft (draft-homme-sieve-variables-00.txt)

2003-04-08 10:16:04

   From: Kjetil Torgrim Homme <kjetilho(_at_)ifi(_dot_)uio(_dot_)no>
   Date: 08 Apr 2003 06:27:05 +0200

   >   * Syntactic structure
   >   
   >   The "set" action doesn't fit into the Sieve grammar, as something
   >   that is identical to an "identifier" is not a valid argument.

   I don't understand what you mean here.

From RFC 3028, section 8.2:

   command = identifier arguments ( ";" / block )

   argument = string-list / number / tag

   arguments = *argument [test / test-list]

Your "set" action is implicitly extending 'argument' to allow for
something that is lexically identical to an 'identifier'. This
extension needs to be made explicit.

You then have to resolve the parsing ambiguity, since

set variable "string";

can be produced by 

command -> identifier arguments ; 
        -> identifier *argument ;
        -> identifier variable *argument ;
        -> identifier variable string-list *argument ;
        -> identifier variable string *argument ;
        -> identifier variable string ;

OR

command -> identifier arguments ;
        -> identifier *argument test ;
        -> identifier test ;
        -> identifier identifier arguments ;
        -> identifier identifier *argument ;
        -> identifier identifier string-list *argument ;
        -> identifier identifier string *argument ;
        -> identifier identifier string ;

which are obviously two different parse trees.

   >   Global scope is a wonderful choice that years of programming
   >   language theory has shown to be an extremely bad thing.
   >   
   >   When Sieve scripts are run in serial (as many implementations now
   >   allow) do variables carry over from one to another? Why or why
   >   not?

   does require carry over?  I'd say "no".  variables shouldn't either.

It's not clear to me. Nor is it clear that sites won't want to have
variables cascade.

[ ... explanations elided ... ]

I'm not convinced that Sieve-with-variables is a simple enough
language to explain without the use of formal semantics. I will
attempt to find a simple reference to post to the list.

Larry