/[mailutils]/mailutils/libsieve/sieve.y
ViewVC logotype

Diff of /mailutils/libsieve/sieve.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by polak, Sun Feb 9 20:39:57 2003 UTC revision 1.17 by gray, Sat Jul 26 11:22:17 2003 UTC
# Line 39  static void branch_fixup __P((size_t sta Line 39  static void branch_fixup __P((size_t sta
39    list_t list;    list_t list;
40    size_t pc;    size_t pc;
41    struct {    struct {
42        size_t start;
43        size_t end;
44      } pclist;
45      struct {
46      char *ident;      char *ident;
47      list_t args;      list_t args;
48    } command;    } command;
# Line 57  static void branch_fixup __P((size_t sta Line 61  static void branch_fixup __P((size_t sta
61  %type <value> arg  %type <value> arg
62  %type <list> slist stringlist stringorlist arglist maybe_arglist  %type <list> slist stringlist stringorlist arglist maybe_arglist
63  %type <command> command  %type <command> command
64  %type <number> testlist  %type <pclist> testlist
65  %type <pc> action test statement list elsif else cond begin if block  %type <pc> action test statement list elsif else cond begin if block
66  %type <branch> elsif_branch maybe_elsif else_part  %type <branch> elsif_branch maybe_elsif else_part
67    
# Line 171  block        : '{' list '}' Line 175  block        : '{' list '}'
175    
176  testlist     : cond_expr  testlist     : cond_expr
177                 {                 {
178                   if (sieve_code_instr (instr_push))                   $$.start = $$.end = sieve_machine->pc;
179                     if (sieve_code_instr (instr_brz)
180                         || sieve_code_number (0))
181                     YYERROR;                     YYERROR;
                  $$ = 1;  
182                 }                 }
183               | testlist ',' cond_expr               | testlist ',' cond_expr
184                 {                 {
185                   if (sieve_code_instr (instr_push))                   sieve_machine->prog[$1.end+1].pc = sieve_machine->pc;
186                     $1.end = sieve_machine->pc;
187                     if (sieve_code_instr (instr_brz)
188                         || sieve_code_number (0))
189                     YYERROR;                     YYERROR;
190                   $$ = $1 + 1;                   $$ = $1;
191                 }                 }
192               ;               ;
193    
# Line 195  cond_expr    : test Line 203  cond_expr    : test
203                 { /* to placate bison */ }                 { /* to placate bison */ }
204               | ANYOF '(' testlist ')'               | ANYOF '(' testlist ')'
205                 {                 {
206                   if (sieve_code_instr (instr_anyof)                   sieve_code_anyof ($3.start);
                      || sieve_code_number ($3))  
                    YYERROR;  
207                 }                 }
208               | ALLOF '(' testlist ')'               | ALLOF '(' testlist ')'
209                 {                 {
210                   if (sieve_code_instr (instr_allof)                   sieve_code_allof ($3.start);
                      || sieve_code_number ($3))  
                    YYERROR;  
211                 }                 }
212               | NOT cond_expr               | NOT cond_expr
213                 {                 {

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26