1 /* A Bison parser, made by GNU Bison 3.7.4. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41 /* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48 /* Identify Bison output, and Bison version. */
49 #define YYBISON 30704
50
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.7.4"
53
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56
57 /* Pure parsers. */
58 #define YYPURE 0
59
60 /* Push parsers. */
61 #define YYPUSH 0
62
63 /* Pull parsers. */
64 #define YYPULL 1
65
66
67
68
69 /* First part of user prologue. */
70 #line 1 "matcher_parser_parse.y"
71
72 /*
73 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
74 * Copyright (c) 2001-2014 by Hiroyuki Yamamoto & The Claws Mail Team
75 *
76 * This program is free software; you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License as published by
78 * the Free Software Foundation; either version 3 of the License, or
79 * (at your option) any later version.
80 *
81 * This program is distributed in the hope that it will be useful,
82 * but WITHOUT ANY WARRANTY; without even the implied warranty of
83 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84 * GNU General Public License for more details.
85 *
86 * You should have received a copy of the GNU General Public License
87 * along with this program. If not, see <http://www.gnu.org/licenses/>.
88 *
89 */
90
91 #include "defs.h"
92
93 #include <glib.h>
94 #include <glib/gi18n.h>
95
96 #include "utils.h"
97 #include "filtering.h"
98 #include "procheader.h"
99 #include "matcher.h"
100 #include "matcher_parser.h"
101 #include "matcher_parser_lex.h"
102 #include "colorlabel.h"
103 #include "folder_item_prefs.h"
104
105 static gint error = 0;
106 static gint bool_op = 0;
107 static gint match_type = 0;
108 static gchar *header = NULL;
109
110 static MatcherProp *prop;
111
112 static GSList *matchers_list = NULL;
113
114 static gboolean enabled = TRUE;
115 static gchar *name = NULL;
116 static gint account_id = 0;
117 static MatcherList *cond;
118 static GSList *action_list = NULL;
119 static FilteringAction *action = NULL;
120 static gboolean matcher_is_fast = TRUE;
121 static gboolean disable_warnings = FALSE;
122
123 static FilteringProp *filtering;
124 static gboolean filtering_ptr_externally_managed = FALSE;
125
126 static GSList **prefs_filtering = NULL;
127 static int enable_compatibility = 0;
128
129 enum {
130 MATCHER_PARSE_FILE,
131 MATCHER_PARSE_NO_EOL,
132 MATCHER_PARSE_ENABLED,
133 MATCHER_PARSE_NAME,
134 MATCHER_PARSE_ACCOUNT,
135 MATCHER_PARSE_CONDITION,
136 MATCHER_PARSE_FILTERING_ACTION,
137 };
138
139 static int matcher_parse_op = MATCHER_PARSE_FILE;
140
141
142 /* ******************************************************************** */
143 /* redeclarations to avoid warnings */
144 void matcher_parserrestart(FILE *input_file);
145 void matcher_parser_init(void);
146 void matcher_parser_switch_to_buffer(void * new_buffer);
147 void matcher_parser_delete_buffer(void * b);
148 void matcher_parserpop_buffer_state(void);
149 int matcher_parserlex(void);
150
matcher_parser_disable_warnings(const gboolean disable)151 void matcher_parser_disable_warnings(const gboolean disable)
152 {
153 disable_warnings = disable;
154 }
155
matcher_parser_start_parsing(FILE * f)156 void matcher_parser_start_parsing(FILE *f)
157 {
158 matcher_parserlineno = 1;
159 matcher_parserrestart(f);
160 account_id = 0;
161 matcher_parserparse();
162 }
163
164
165 void * matcher_parser_scan_string(const char * str);
166
matcher_parser_get_filtering(gchar * str)167 FilteringProp *matcher_parser_get_filtering(gchar *str)
168 {
169 void *bufstate;
170 void *tmp_str = NULL;
171
172 /* little hack to allow passing rules with no names */
173 if (!strncmp(str, "rulename ", 9))
174 tmp_str = g_strdup(str);
175 else
176 tmp_str = g_strconcat("rulename \"\" ", str, NULL);
177
178 /* bad coding to enable the sub-grammar matching
179 in yacc */
180 matcher_parserlineno = 1;
181 matcher_parse_op = MATCHER_PARSE_NO_EOL;
182 matcher_parserrestart(NULL);
183 matcher_parserpop_buffer_state();
184 matcher_parser_init();
185 bufstate = matcher_parser_scan_string((const char *) tmp_str);
186 matcher_parser_switch_to_buffer(bufstate);
187 /* Indicate that we will be using the global "filtering" pointer,
188 * so that yyparse does not free it in "filtering_action_list"
189 * section. */
190 filtering_ptr_externally_managed = TRUE;
191 if (matcher_parserparse() != 0)
192 filtering = NULL;
193 matcher_parse_op = MATCHER_PARSE_FILE;
194 matcher_parser_delete_buffer(bufstate);
195 g_free(tmp_str);
196 filtering_ptr_externally_managed = FALSE; /* Return to normal. */
197 return filtering;
198 }
199
check_quote_symetry(gchar * str)200 static gboolean check_quote_symetry(gchar *str)
201 {
202 const gchar *walk;
203 int ret = 0;
204
205 if (str == NULL)
206 return TRUE; /* heh, that's symetric */
207 if (*str == '\0')
208 return TRUE;
209 for (walk = str; *walk; walk++) {
210 if (*walk == '\"') {
211 if (walk == str /* first char */
212 || *(walk - 1) != '\\') /* not escaped */
213 ret ++;
214 }
215 }
216 return !(ret % 2);
217 }
218
matcher_parser_get_name(gchar * str)219 MatcherList *matcher_parser_get_name(gchar *str)
220 {
221 void *bufstate;
222
223 if (!check_quote_symetry(str)) {
224 cond = NULL;
225 return cond;
226 }
227
228 /* bad coding to enable the sub-grammar matching
229 in yacc */
230 matcher_parserlineno = 1;
231 matcher_parse_op = MATCHER_PARSE_NAME;
232 matcher_parserrestart(NULL);
233 matcher_parserpop_buffer_state();
234 matcher_parser_init();
235 bufstate = matcher_parser_scan_string(str);
236 matcher_parserparse();
237 matcher_parse_op = MATCHER_PARSE_FILE;
238 matcher_parser_delete_buffer(bufstate);
239 return cond;
240 }
241
matcher_parser_get_enabled(gchar * str)242 MatcherList *matcher_parser_get_enabled(gchar *str)
243 {
244 void *bufstate;
245
246 if (!check_quote_symetry(str)) {
247 cond = NULL;
248 return cond;
249 }
250
251 /* bad coding to enable the sub-grammar matching
252 in yacc */
253 matcher_parserlineno = 1;
254 matcher_parse_op = MATCHER_PARSE_ENABLED;
255 matcher_parserrestart(NULL);
256 matcher_parserpop_buffer_state();
257 matcher_parser_init();
258 bufstate = matcher_parser_scan_string(str);
259 matcher_parserparse();
260 matcher_parse_op = MATCHER_PARSE_FILE;
261 matcher_parser_delete_buffer(bufstate);
262 return cond;
263 }
264
matcher_parser_get_account(gchar * str)265 MatcherList *matcher_parser_get_account(gchar *str)
266 {
267 void *bufstate;
268
269 if (!check_quote_symetry(str)) {
270 cond = NULL;
271 return cond;
272 }
273
274 /* bad coding to enable the sub-grammar matching
275 in yacc */
276 matcher_parserlineno = 1;
277 matcher_parse_op = MATCHER_PARSE_ACCOUNT;
278 matcher_parserrestart(NULL);
279 matcher_parserpop_buffer_state();
280 matcher_parser_init();
281 bufstate = matcher_parser_scan_string(str);
282 matcher_parserparse();
283 matcher_parse_op = MATCHER_PARSE_FILE;
284 matcher_parser_delete_buffer(bufstate);
285 return cond;
286 }
287
matcher_parser_get_cond(gchar * str,gboolean * is_fast)288 MatcherList *matcher_parser_get_cond(gchar *str, gboolean *is_fast)
289 {
290 void *bufstate;
291
292 if (!check_quote_symetry(str)) {
293 cond = NULL;
294 return cond;
295 }
296
297 matcher_is_fast = TRUE;
298 /* bad coding to enable the sub-grammar matching
299 in yacc */
300 matcher_parserlineno = 1;
301 matcher_parse_op = MATCHER_PARSE_CONDITION;
302 matcher_parserrestart(NULL);
303 matcher_parserpop_buffer_state();
304 matcher_parser_init();
305 bufstate = matcher_parser_scan_string(str);
306 matcher_parserparse();
307 matcher_parse_op = MATCHER_PARSE_FILE;
308 matcher_parser_delete_buffer(bufstate);
309 if (is_fast)
310 *is_fast = matcher_is_fast;
311 return cond;
312 }
313
matcher_parser_get_action_list(gchar * str)314 GSList *matcher_parser_get_action_list(gchar *str)
315 {
316 void *bufstate;
317
318 if (!check_quote_symetry(str)) {
319 action_list = NULL;
320 return action_list;
321 }
322
323 /* bad coding to enable the sub-grammar matching
324 in yacc */
325 matcher_parserlineno = 1;
326 matcher_parse_op = MATCHER_PARSE_FILTERING_ACTION;
327 matcher_parserrestart(NULL);
328 matcher_parserpop_buffer_state();
329 matcher_parser_init();
330 bufstate = matcher_parser_scan_string(str);
331 matcher_parserparse();
332 matcher_parse_op = MATCHER_PARSE_FILE;
333 matcher_parser_delete_buffer(bufstate);
334 return action_list;
335 }
336
matcher_parser_get_prop(gchar * str)337 MatcherProp *matcher_parser_get_prop(gchar *str)
338 {
339 MatcherList *list;
340 MatcherProp *prop;
341
342 matcher_parserlineno = 1;
343 list = matcher_parser_get_cond(str, NULL);
344 if (list == NULL)
345 return NULL;
346
347 if (list->matchers == NULL)
348 return NULL;
349
350 if (list->matchers->next != NULL)
351 return NULL;
352
353 prop = list->matchers->data;
354
355 g_slist_free(list->matchers);
356 g_free(list);
357
358 return prop;
359 }
360
matcher_parsererror(char * str)361 void matcher_parsererror(char *str)
362 {
363 GSList *l;
364
365 if (matchers_list) {
366 for (l = matchers_list; l != NULL; l = g_slist_next(l)) {
367 matcherprop_free((MatcherProp *)
368 l->data);
369 l->data = NULL;
370 }
371 g_slist_free(matchers_list);
372 matchers_list = NULL;
373 }
374 cond = NULL;
375 if (!disable_warnings)
376 g_warning("filtering parsing: %i: %s",
377 matcher_parserlineno, str);
378 error = 1;
379 }
380
matcher_parserwrap(void)381 int matcher_parserwrap(void)
382 {
383 return 1;
384 }
385
386 #line 387 "matcher_parser_parse.c"
387
388 # ifndef YY_CAST
389 # ifdef __cplusplus
390 # define YY_CAST(Type, Val) static_cast<Type> (Val)
391 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
392 # else
393 # define YY_CAST(Type, Val) ((Type) (Val))
394 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
395 # endif
396 # endif
397 # ifndef YY_NULLPTR
398 # if defined __cplusplus
399 # if 201103L <= __cplusplus
400 # define YY_NULLPTR nullptr
401 # else
402 # define YY_NULLPTR 0
403 # endif
404 # else
405 # define YY_NULLPTR ((void*)0)
406 # endif
407 # endif
408
409 /* Use api.header.include to #include this header
410 instead of duplicating it here. */
411 #ifndef YY_YY_MATCHER_PARSER_PARSE_H_INCLUDED
412 # define YY_YY_MATCHER_PARSER_PARSE_H_INCLUDED
413 /* Debug traces. */
414 #ifndef YYDEBUG
415 # define YYDEBUG 0
416 #endif
417 #if YYDEBUG
418 extern int yydebug;
419 #endif
420
421 /* Token kinds. */
422 #ifndef YYTOKENTYPE
423 # define YYTOKENTYPE
424 enum yytokentype
425 {
426 YYEMPTY = -2,
427 YYEOF = 0, /* "end of file" */
428 YYerror = 256, /* error */
429 YYUNDEF = 257, /* "invalid token" */
430 MATCHER_ALL = 258, /* MATCHER_ALL */
431 MATCHER_UNREAD = 259, /* MATCHER_UNREAD */
432 MATCHER_NOT_UNREAD = 260, /* MATCHER_NOT_UNREAD */
433 MATCHER_NEW = 261, /* MATCHER_NEW */
434 MATCHER_NOT_NEW = 262, /* MATCHER_NOT_NEW */
435 MATCHER_MARKED = 263, /* MATCHER_MARKED */
436 MATCHER_NOT_MARKED = 264, /* MATCHER_NOT_MARKED */
437 MATCHER_DELETED = 265, /* MATCHER_DELETED */
438 MATCHER_NOT_DELETED = 266, /* MATCHER_NOT_DELETED */
439 MATCHER_REPLIED = 267, /* MATCHER_REPLIED */
440 MATCHER_NOT_REPLIED = 268, /* MATCHER_NOT_REPLIED */
441 MATCHER_FORWARDED = 269, /* MATCHER_FORWARDED */
442 MATCHER_NOT_FORWARDED = 270, /* MATCHER_NOT_FORWARDED */
443 MATCHER_SUBJECT = 271, /* MATCHER_SUBJECT */
444 MATCHER_NOT_SUBJECT = 272, /* MATCHER_NOT_SUBJECT */
445 MATCHER_FROM = 273, /* MATCHER_FROM */
446 MATCHER_NOT_FROM = 274, /* MATCHER_NOT_FROM */
447 MATCHER_TO = 275, /* MATCHER_TO */
448 MATCHER_NOT_TO = 276, /* MATCHER_NOT_TO */
449 MATCHER_CC = 277, /* MATCHER_CC */
450 MATCHER_NOT_CC = 278, /* MATCHER_NOT_CC */
451 MATCHER_TO_OR_CC = 279, /* MATCHER_TO_OR_CC */
452 MATCHER_NOT_TO_AND_NOT_CC = 280, /* MATCHER_NOT_TO_AND_NOT_CC */
453 MATCHER_AGE_GREATER = 281, /* MATCHER_AGE_GREATER */
454 MATCHER_AGE_LOWER = 282, /* MATCHER_AGE_LOWER */
455 MATCHER_NEWSGROUPS = 283, /* MATCHER_NEWSGROUPS */
456 MATCHER_AGE_GREATER_HOURS = 284, /* MATCHER_AGE_GREATER_HOURS */
457 MATCHER_AGE_LOWER_HOURS = 285, /* MATCHER_AGE_LOWER_HOURS */
458 MATCHER_DATE_AFTER = 286, /* MATCHER_DATE_AFTER */
459 MATCHER_DATE_BEFORE = 287, /* MATCHER_DATE_BEFORE */
460 MATCHER_NOT_NEWSGROUPS = 288, /* MATCHER_NOT_NEWSGROUPS */
461 MATCHER_INREPLYTO = 289, /* MATCHER_INREPLYTO */
462 MATCHER_NOT_INREPLYTO = 290, /* MATCHER_NOT_INREPLYTO */
463 MATCHER_MESSAGEID = 291, /* MATCHER_MESSAGEID */
464 MATCHER_NOT_MESSAGEID = 292, /* MATCHER_NOT_MESSAGEID */
465 MATCHER_REFERENCES = 293, /* MATCHER_REFERENCES */
466 MATCHER_NOT_REFERENCES = 294, /* MATCHER_NOT_REFERENCES */
467 MATCHER_SCORE_GREATER = 295, /* MATCHER_SCORE_GREATER */
468 MATCHER_SCORE_LOWER = 296, /* MATCHER_SCORE_LOWER */
469 MATCHER_HEADER = 297, /* MATCHER_HEADER */
470 MATCHER_NOT_HEADER = 298, /* MATCHER_NOT_HEADER */
471 MATCHER_HEADERS_PART = 299, /* MATCHER_HEADERS_PART */
472 MATCHER_NOT_HEADERS_PART = 300, /* MATCHER_NOT_HEADERS_PART */
473 MATCHER_MESSAGE = 301, /* MATCHER_MESSAGE */
474 MATCHER_HEADERS_CONT = 302, /* MATCHER_HEADERS_CONT */
475 MATCHER_NOT_HEADERS_CONT = 303, /* MATCHER_NOT_HEADERS_CONT */
476 MATCHER_NOT_MESSAGE = 304, /* MATCHER_NOT_MESSAGE */
477 MATCHER_BODY_PART = 305, /* MATCHER_BODY_PART */
478 MATCHER_NOT_BODY_PART = 306, /* MATCHER_NOT_BODY_PART */
479 MATCHER_TEST = 307, /* MATCHER_TEST */
480 MATCHER_NOT_TEST = 308, /* MATCHER_NOT_TEST */
481 MATCHER_MATCHCASE = 309, /* MATCHER_MATCHCASE */
482 MATCHER_MATCH = 310, /* MATCHER_MATCH */
483 MATCHER_REGEXPCASE = 311, /* MATCHER_REGEXPCASE */
484 MATCHER_REGEXP = 312, /* MATCHER_REGEXP */
485 MATCHER_SCORE = 313, /* MATCHER_SCORE */
486 MATCHER_MOVE = 314, /* MATCHER_MOVE */
487 MATCHER_FOUND_IN_ADDRESSBOOK = 315, /* MATCHER_FOUND_IN_ADDRESSBOOK */
488 MATCHER_NOT_FOUND_IN_ADDRESSBOOK = 316, /* MATCHER_NOT_FOUND_IN_ADDRESSBOOK */
489 MATCHER_IN = 317, /* MATCHER_IN */
490 MATCHER_COPY = 318, /* MATCHER_COPY */
491 MATCHER_DELETE = 319, /* MATCHER_DELETE */
492 MATCHER_MARK = 320, /* MATCHER_MARK */
493 MATCHER_UNMARK = 321, /* MATCHER_UNMARK */
494 MATCHER_LOCK = 322, /* MATCHER_LOCK */
495 MATCHER_UNLOCK = 323, /* MATCHER_UNLOCK */
496 MATCHER_EXECUTE = 324, /* MATCHER_EXECUTE */
497 MATCHER_MARK_AS_READ = 325, /* MATCHER_MARK_AS_READ */
498 MATCHER_MARK_AS_UNREAD = 326, /* MATCHER_MARK_AS_UNREAD */
499 MATCHER_FORWARD = 327, /* MATCHER_FORWARD */
500 MATCHER_MARK_AS_SPAM = 328, /* MATCHER_MARK_AS_SPAM */
501 MATCHER_MARK_AS_HAM = 329, /* MATCHER_MARK_AS_HAM */
502 MATCHER_FORWARD_AS_ATTACHMENT = 330, /* MATCHER_FORWARD_AS_ATTACHMENT */
503 MATCHER_EOL = 331, /* MATCHER_EOL */
504 MATCHER_OR = 332, /* MATCHER_OR */
505 MATCHER_AND = 333, /* MATCHER_AND */
506 MATCHER_COLOR = 334, /* MATCHER_COLOR */
507 MATCHER_SCORE_EQUAL = 335, /* MATCHER_SCORE_EQUAL */
508 MATCHER_REDIRECT = 336, /* MATCHER_REDIRECT */
509 MATCHER_SIZE_GREATER = 337, /* MATCHER_SIZE_GREATER */
510 MATCHER_SIZE_SMALLER = 338, /* MATCHER_SIZE_SMALLER */
511 MATCHER_SIZE_EQUAL = 339, /* MATCHER_SIZE_EQUAL */
512 MATCHER_LOCKED = 340, /* MATCHER_LOCKED */
513 MATCHER_NOT_LOCKED = 341, /* MATCHER_NOT_LOCKED */
514 MATCHER_PARTIAL = 342, /* MATCHER_PARTIAL */
515 MATCHER_NOT_PARTIAL = 343, /* MATCHER_NOT_PARTIAL */
516 MATCHER_COLORLABEL = 344, /* MATCHER_COLORLABEL */
517 MATCHER_NOT_COLORLABEL = 345, /* MATCHER_NOT_COLORLABEL */
518 MATCHER_IGNORE_THREAD = 346, /* MATCHER_IGNORE_THREAD */
519 MATCHER_NOT_IGNORE_THREAD = 347, /* MATCHER_NOT_IGNORE_THREAD */
520 MATCHER_WATCH_THREAD = 348, /* MATCHER_WATCH_THREAD */
521 MATCHER_NOT_WATCH_THREAD = 349, /* MATCHER_NOT_WATCH_THREAD */
522 MATCHER_CHANGE_SCORE = 350, /* MATCHER_CHANGE_SCORE */
523 MATCHER_SET_SCORE = 351, /* MATCHER_SET_SCORE */
524 MATCHER_ADD_TO_ADDRESSBOOK = 352, /* MATCHER_ADD_TO_ADDRESSBOOK */
525 MATCHER_STOP = 353, /* MATCHER_STOP */
526 MATCHER_HIDE = 354, /* MATCHER_HIDE */
527 MATCHER_IGNORE = 355, /* MATCHER_IGNORE */
528 MATCHER_WATCH = 356, /* MATCHER_WATCH */
529 MATCHER_SPAM = 357, /* MATCHER_SPAM */
530 MATCHER_NOT_SPAM = 358, /* MATCHER_NOT_SPAM */
531 MATCHER_HAS_ATTACHMENT = 359, /* MATCHER_HAS_ATTACHMENT */
532 MATCHER_HAS_NO_ATTACHMENT = 360, /* MATCHER_HAS_NO_ATTACHMENT */
533 MATCHER_SIGNED = 361, /* MATCHER_SIGNED */
534 MATCHER_NOT_SIGNED = 362, /* MATCHER_NOT_SIGNED */
535 MATCHER_TAG = 363, /* MATCHER_TAG */
536 MATCHER_NOT_TAG = 364, /* MATCHER_NOT_TAG */
537 MATCHER_SET_TAG = 365, /* MATCHER_SET_TAG */
538 MATCHER_UNSET_TAG = 366, /* MATCHER_UNSET_TAG */
539 MATCHER_TAGGED = 367, /* MATCHER_TAGGED */
540 MATCHER_NOT_TAGGED = 368, /* MATCHER_NOT_TAGGED */
541 MATCHER_CLEAR_TAGS = 369, /* MATCHER_CLEAR_TAGS */
542 MATCHER_ENABLED = 370, /* MATCHER_ENABLED */
543 MATCHER_DISABLED = 371, /* MATCHER_DISABLED */
544 MATCHER_RULENAME = 372, /* MATCHER_RULENAME */
545 MATCHER_ACCOUNT = 373, /* MATCHER_ACCOUNT */
546 MATCHER_STRING = 374, /* MATCHER_STRING */
547 MATCHER_SECTION = 375, /* MATCHER_SECTION */
548 MATCHER_INTEGER = 376 /* MATCHER_INTEGER */
549 };
550 typedef enum yytokentype yytoken_kind_t;
551 #endif
552 /* Token kinds. */
553 #define YYEMPTY -2
554 #define YYEOF 0
555 #define YYerror 256
556 #define YYUNDEF 257
557 #define MATCHER_ALL 258
558 #define MATCHER_UNREAD 259
559 #define MATCHER_NOT_UNREAD 260
560 #define MATCHER_NEW 261
561 #define MATCHER_NOT_NEW 262
562 #define MATCHER_MARKED 263
563 #define MATCHER_NOT_MARKED 264
564 #define MATCHER_DELETED 265
565 #define MATCHER_NOT_DELETED 266
566 #define MATCHER_REPLIED 267
567 #define MATCHER_NOT_REPLIED 268
568 #define MATCHER_FORWARDED 269
569 #define MATCHER_NOT_FORWARDED 270
570 #define MATCHER_SUBJECT 271
571 #define MATCHER_NOT_SUBJECT 272
572 #define MATCHER_FROM 273
573 #define MATCHER_NOT_FROM 274
574 #define MATCHER_TO 275
575 #define MATCHER_NOT_TO 276
576 #define MATCHER_CC 277
577 #define MATCHER_NOT_CC 278
578 #define MATCHER_TO_OR_CC 279
579 #define MATCHER_NOT_TO_AND_NOT_CC 280
580 #define MATCHER_AGE_GREATER 281
581 #define MATCHER_AGE_LOWER 282
582 #define MATCHER_NEWSGROUPS 283
583 #define MATCHER_AGE_GREATER_HOURS 284
584 #define MATCHER_AGE_LOWER_HOURS 285
585 #define MATCHER_DATE_AFTER 286
586 #define MATCHER_DATE_BEFORE 287
587 #define MATCHER_NOT_NEWSGROUPS 288
588 #define MATCHER_INREPLYTO 289
589 #define MATCHER_NOT_INREPLYTO 290
590 #define MATCHER_MESSAGEID 291
591 #define MATCHER_NOT_MESSAGEID 292
592 #define MATCHER_REFERENCES 293
593 #define MATCHER_NOT_REFERENCES 294
594 #define MATCHER_SCORE_GREATER 295
595 #define MATCHER_SCORE_LOWER 296
596 #define MATCHER_HEADER 297
597 #define MATCHER_NOT_HEADER 298
598 #define MATCHER_HEADERS_PART 299
599 #define MATCHER_NOT_HEADERS_PART 300
600 #define MATCHER_MESSAGE 301
601 #define MATCHER_HEADERS_CONT 302
602 #define MATCHER_NOT_HEADERS_CONT 303
603 #define MATCHER_NOT_MESSAGE 304
604 #define MATCHER_BODY_PART 305
605 #define MATCHER_NOT_BODY_PART 306
606 #define MATCHER_TEST 307
607 #define MATCHER_NOT_TEST 308
608 #define MATCHER_MATCHCASE 309
609 #define MATCHER_MATCH 310
610 #define MATCHER_REGEXPCASE 311
611 #define MATCHER_REGEXP 312
612 #define MATCHER_SCORE 313
613 #define MATCHER_MOVE 314
614 #define MATCHER_FOUND_IN_ADDRESSBOOK 315
615 #define MATCHER_NOT_FOUND_IN_ADDRESSBOOK 316
616 #define MATCHER_IN 317
617 #define MATCHER_COPY 318
618 #define MATCHER_DELETE 319
619 #define MATCHER_MARK 320
620 #define MATCHER_UNMARK 321
621 #define MATCHER_LOCK 322
622 #define MATCHER_UNLOCK 323
623 #define MATCHER_EXECUTE 324
624 #define MATCHER_MARK_AS_READ 325
625 #define MATCHER_MARK_AS_UNREAD 326
626 #define MATCHER_FORWARD 327
627 #define MATCHER_MARK_AS_SPAM 328
628 #define MATCHER_MARK_AS_HAM 329
629 #define MATCHER_FORWARD_AS_ATTACHMENT 330
630 #define MATCHER_EOL 331
631 #define MATCHER_OR 332
632 #define MATCHER_AND 333
633 #define MATCHER_COLOR 334
634 #define MATCHER_SCORE_EQUAL 335
635 #define MATCHER_REDIRECT 336
636 #define MATCHER_SIZE_GREATER 337
637 #define MATCHER_SIZE_SMALLER 338
638 #define MATCHER_SIZE_EQUAL 339
639 #define MATCHER_LOCKED 340
640 #define MATCHER_NOT_LOCKED 341
641 #define MATCHER_PARTIAL 342
642 #define MATCHER_NOT_PARTIAL 343
643 #define MATCHER_COLORLABEL 344
644 #define MATCHER_NOT_COLORLABEL 345
645 #define MATCHER_IGNORE_THREAD 346
646 #define MATCHER_NOT_IGNORE_THREAD 347
647 #define MATCHER_WATCH_THREAD 348
648 #define MATCHER_NOT_WATCH_THREAD 349
649 #define MATCHER_CHANGE_SCORE 350
650 #define MATCHER_SET_SCORE 351
651 #define MATCHER_ADD_TO_ADDRESSBOOK 352
652 #define MATCHER_STOP 353
653 #define MATCHER_HIDE 354
654 #define MATCHER_IGNORE 355
655 #define MATCHER_WATCH 356
656 #define MATCHER_SPAM 357
657 #define MATCHER_NOT_SPAM 358
658 #define MATCHER_HAS_ATTACHMENT 359
659 #define MATCHER_HAS_NO_ATTACHMENT 360
660 #define MATCHER_SIGNED 361
661 #define MATCHER_NOT_SIGNED 362
662 #define MATCHER_TAG 363
663 #define MATCHER_NOT_TAG 364
664 #define MATCHER_SET_TAG 365
665 #define MATCHER_UNSET_TAG 366
666 #define MATCHER_TAGGED 367
667 #define MATCHER_NOT_TAGGED 368
668 #define MATCHER_CLEAR_TAGS 369
669 #define MATCHER_ENABLED 370
670 #define MATCHER_DISABLED 371
671 #define MATCHER_RULENAME 372
672 #define MATCHER_ACCOUNT 373
673 #define MATCHER_STRING 374
674 #define MATCHER_SECTION 375
675 #define MATCHER_INTEGER 376
676
677 /* Value type. */
678 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
679 union YYSTYPE
680 {
681 #line 317 "matcher_parser_parse.y"
682
683 char *str;
684 int value;
685
686 #line 687 "matcher_parser_parse.c"
687
688 };
689 typedef union YYSTYPE YYSTYPE;
690 # define YYSTYPE_IS_TRIVIAL 1
691 # define YYSTYPE_IS_DECLARED 1
692 #endif
693
694
695 extern YYSTYPE yylval;
696
697 int yyparse (void);
698
699 #endif /* !YY_YY_MATCHER_PARSER_PARSE_H_INCLUDED */
700 /* Symbol kind. */
701 enum yysymbol_kind_t
702 {
703 YYSYMBOL_YYEMPTY = -2,
704 YYSYMBOL_YYEOF = 0, /* "end of file" */
705 YYSYMBOL_YYerror = 1, /* error */
706 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
707 YYSYMBOL_MATCHER_ALL = 3, /* MATCHER_ALL */
708 YYSYMBOL_MATCHER_UNREAD = 4, /* MATCHER_UNREAD */
709 YYSYMBOL_MATCHER_NOT_UNREAD = 5, /* MATCHER_NOT_UNREAD */
710 YYSYMBOL_MATCHER_NEW = 6, /* MATCHER_NEW */
711 YYSYMBOL_MATCHER_NOT_NEW = 7, /* MATCHER_NOT_NEW */
712 YYSYMBOL_MATCHER_MARKED = 8, /* MATCHER_MARKED */
713 YYSYMBOL_MATCHER_NOT_MARKED = 9, /* MATCHER_NOT_MARKED */
714 YYSYMBOL_MATCHER_DELETED = 10, /* MATCHER_DELETED */
715 YYSYMBOL_MATCHER_NOT_DELETED = 11, /* MATCHER_NOT_DELETED */
716 YYSYMBOL_MATCHER_REPLIED = 12, /* MATCHER_REPLIED */
717 YYSYMBOL_MATCHER_NOT_REPLIED = 13, /* MATCHER_NOT_REPLIED */
718 YYSYMBOL_MATCHER_FORWARDED = 14, /* MATCHER_FORWARDED */
719 YYSYMBOL_MATCHER_NOT_FORWARDED = 15, /* MATCHER_NOT_FORWARDED */
720 YYSYMBOL_MATCHER_SUBJECT = 16, /* MATCHER_SUBJECT */
721 YYSYMBOL_MATCHER_NOT_SUBJECT = 17, /* MATCHER_NOT_SUBJECT */
722 YYSYMBOL_MATCHER_FROM = 18, /* MATCHER_FROM */
723 YYSYMBOL_MATCHER_NOT_FROM = 19, /* MATCHER_NOT_FROM */
724 YYSYMBOL_MATCHER_TO = 20, /* MATCHER_TO */
725 YYSYMBOL_MATCHER_NOT_TO = 21, /* MATCHER_NOT_TO */
726 YYSYMBOL_MATCHER_CC = 22, /* MATCHER_CC */
727 YYSYMBOL_MATCHER_NOT_CC = 23, /* MATCHER_NOT_CC */
728 YYSYMBOL_MATCHER_TO_OR_CC = 24, /* MATCHER_TO_OR_CC */
729 YYSYMBOL_MATCHER_NOT_TO_AND_NOT_CC = 25, /* MATCHER_NOT_TO_AND_NOT_CC */
730 YYSYMBOL_MATCHER_AGE_GREATER = 26, /* MATCHER_AGE_GREATER */
731 YYSYMBOL_MATCHER_AGE_LOWER = 27, /* MATCHER_AGE_LOWER */
732 YYSYMBOL_MATCHER_NEWSGROUPS = 28, /* MATCHER_NEWSGROUPS */
733 YYSYMBOL_MATCHER_AGE_GREATER_HOURS = 29, /* MATCHER_AGE_GREATER_HOURS */
734 YYSYMBOL_MATCHER_AGE_LOWER_HOURS = 30, /* MATCHER_AGE_LOWER_HOURS */
735 YYSYMBOL_MATCHER_DATE_AFTER = 31, /* MATCHER_DATE_AFTER */
736 YYSYMBOL_MATCHER_DATE_BEFORE = 32, /* MATCHER_DATE_BEFORE */
737 YYSYMBOL_MATCHER_NOT_NEWSGROUPS = 33, /* MATCHER_NOT_NEWSGROUPS */
738 YYSYMBOL_MATCHER_INREPLYTO = 34, /* MATCHER_INREPLYTO */
739 YYSYMBOL_MATCHER_NOT_INREPLYTO = 35, /* MATCHER_NOT_INREPLYTO */
740 YYSYMBOL_MATCHER_MESSAGEID = 36, /* MATCHER_MESSAGEID */
741 YYSYMBOL_MATCHER_NOT_MESSAGEID = 37, /* MATCHER_NOT_MESSAGEID */
742 YYSYMBOL_MATCHER_REFERENCES = 38, /* MATCHER_REFERENCES */
743 YYSYMBOL_MATCHER_NOT_REFERENCES = 39, /* MATCHER_NOT_REFERENCES */
744 YYSYMBOL_MATCHER_SCORE_GREATER = 40, /* MATCHER_SCORE_GREATER */
745 YYSYMBOL_MATCHER_SCORE_LOWER = 41, /* MATCHER_SCORE_LOWER */
746 YYSYMBOL_MATCHER_HEADER = 42, /* MATCHER_HEADER */
747 YYSYMBOL_MATCHER_NOT_HEADER = 43, /* MATCHER_NOT_HEADER */
748 YYSYMBOL_MATCHER_HEADERS_PART = 44, /* MATCHER_HEADERS_PART */
749 YYSYMBOL_MATCHER_NOT_HEADERS_PART = 45, /* MATCHER_NOT_HEADERS_PART */
750 YYSYMBOL_MATCHER_MESSAGE = 46, /* MATCHER_MESSAGE */
751 YYSYMBOL_MATCHER_HEADERS_CONT = 47, /* MATCHER_HEADERS_CONT */
752 YYSYMBOL_MATCHER_NOT_HEADERS_CONT = 48, /* MATCHER_NOT_HEADERS_CONT */
753 YYSYMBOL_MATCHER_NOT_MESSAGE = 49, /* MATCHER_NOT_MESSAGE */
754 YYSYMBOL_MATCHER_BODY_PART = 50, /* MATCHER_BODY_PART */
755 YYSYMBOL_MATCHER_NOT_BODY_PART = 51, /* MATCHER_NOT_BODY_PART */
756 YYSYMBOL_MATCHER_TEST = 52, /* MATCHER_TEST */
757 YYSYMBOL_MATCHER_NOT_TEST = 53, /* MATCHER_NOT_TEST */
758 YYSYMBOL_MATCHER_MATCHCASE = 54, /* MATCHER_MATCHCASE */
759 YYSYMBOL_MATCHER_MATCH = 55, /* MATCHER_MATCH */
760 YYSYMBOL_MATCHER_REGEXPCASE = 56, /* MATCHER_REGEXPCASE */
761 YYSYMBOL_MATCHER_REGEXP = 57, /* MATCHER_REGEXP */
762 YYSYMBOL_MATCHER_SCORE = 58, /* MATCHER_SCORE */
763 YYSYMBOL_MATCHER_MOVE = 59, /* MATCHER_MOVE */
764 YYSYMBOL_MATCHER_FOUND_IN_ADDRESSBOOK = 60, /* MATCHER_FOUND_IN_ADDRESSBOOK */
765 YYSYMBOL_MATCHER_NOT_FOUND_IN_ADDRESSBOOK = 61, /* MATCHER_NOT_FOUND_IN_ADDRESSBOOK */
766 YYSYMBOL_MATCHER_IN = 62, /* MATCHER_IN */
767 YYSYMBOL_MATCHER_COPY = 63, /* MATCHER_COPY */
768 YYSYMBOL_MATCHER_DELETE = 64, /* MATCHER_DELETE */
769 YYSYMBOL_MATCHER_MARK = 65, /* MATCHER_MARK */
770 YYSYMBOL_MATCHER_UNMARK = 66, /* MATCHER_UNMARK */
771 YYSYMBOL_MATCHER_LOCK = 67, /* MATCHER_LOCK */
772 YYSYMBOL_MATCHER_UNLOCK = 68, /* MATCHER_UNLOCK */
773 YYSYMBOL_MATCHER_EXECUTE = 69, /* MATCHER_EXECUTE */
774 YYSYMBOL_MATCHER_MARK_AS_READ = 70, /* MATCHER_MARK_AS_READ */
775 YYSYMBOL_MATCHER_MARK_AS_UNREAD = 71, /* MATCHER_MARK_AS_UNREAD */
776 YYSYMBOL_MATCHER_FORWARD = 72, /* MATCHER_FORWARD */
777 YYSYMBOL_MATCHER_MARK_AS_SPAM = 73, /* MATCHER_MARK_AS_SPAM */
778 YYSYMBOL_MATCHER_MARK_AS_HAM = 74, /* MATCHER_MARK_AS_HAM */
779 YYSYMBOL_MATCHER_FORWARD_AS_ATTACHMENT = 75, /* MATCHER_FORWARD_AS_ATTACHMENT */
780 YYSYMBOL_MATCHER_EOL = 76, /* MATCHER_EOL */
781 YYSYMBOL_MATCHER_OR = 77, /* MATCHER_OR */
782 YYSYMBOL_MATCHER_AND = 78, /* MATCHER_AND */
783 YYSYMBOL_MATCHER_COLOR = 79, /* MATCHER_COLOR */
784 YYSYMBOL_MATCHER_SCORE_EQUAL = 80, /* MATCHER_SCORE_EQUAL */
785 YYSYMBOL_MATCHER_REDIRECT = 81, /* MATCHER_REDIRECT */
786 YYSYMBOL_MATCHER_SIZE_GREATER = 82, /* MATCHER_SIZE_GREATER */
787 YYSYMBOL_MATCHER_SIZE_SMALLER = 83, /* MATCHER_SIZE_SMALLER */
788 YYSYMBOL_MATCHER_SIZE_EQUAL = 84, /* MATCHER_SIZE_EQUAL */
789 YYSYMBOL_MATCHER_LOCKED = 85, /* MATCHER_LOCKED */
790 YYSYMBOL_MATCHER_NOT_LOCKED = 86, /* MATCHER_NOT_LOCKED */
791 YYSYMBOL_MATCHER_PARTIAL = 87, /* MATCHER_PARTIAL */
792 YYSYMBOL_MATCHER_NOT_PARTIAL = 88, /* MATCHER_NOT_PARTIAL */
793 YYSYMBOL_MATCHER_COLORLABEL = 89, /* MATCHER_COLORLABEL */
794 YYSYMBOL_MATCHER_NOT_COLORLABEL = 90, /* MATCHER_NOT_COLORLABEL */
795 YYSYMBOL_MATCHER_IGNORE_THREAD = 91, /* MATCHER_IGNORE_THREAD */
796 YYSYMBOL_MATCHER_NOT_IGNORE_THREAD = 92, /* MATCHER_NOT_IGNORE_THREAD */
797 YYSYMBOL_MATCHER_WATCH_THREAD = 93, /* MATCHER_WATCH_THREAD */
798 YYSYMBOL_MATCHER_NOT_WATCH_THREAD = 94, /* MATCHER_NOT_WATCH_THREAD */
799 YYSYMBOL_MATCHER_CHANGE_SCORE = 95, /* MATCHER_CHANGE_SCORE */
800 YYSYMBOL_MATCHER_SET_SCORE = 96, /* MATCHER_SET_SCORE */
801 YYSYMBOL_MATCHER_ADD_TO_ADDRESSBOOK = 97, /* MATCHER_ADD_TO_ADDRESSBOOK */
802 YYSYMBOL_MATCHER_STOP = 98, /* MATCHER_STOP */
803 YYSYMBOL_MATCHER_HIDE = 99, /* MATCHER_HIDE */
804 YYSYMBOL_MATCHER_IGNORE = 100, /* MATCHER_IGNORE */
805 YYSYMBOL_MATCHER_WATCH = 101, /* MATCHER_WATCH */
806 YYSYMBOL_MATCHER_SPAM = 102, /* MATCHER_SPAM */
807 YYSYMBOL_MATCHER_NOT_SPAM = 103, /* MATCHER_NOT_SPAM */
808 YYSYMBOL_MATCHER_HAS_ATTACHMENT = 104, /* MATCHER_HAS_ATTACHMENT */
809 YYSYMBOL_MATCHER_HAS_NO_ATTACHMENT = 105, /* MATCHER_HAS_NO_ATTACHMENT */
810 YYSYMBOL_MATCHER_SIGNED = 106, /* MATCHER_SIGNED */
811 YYSYMBOL_MATCHER_NOT_SIGNED = 107, /* MATCHER_NOT_SIGNED */
812 YYSYMBOL_MATCHER_TAG = 108, /* MATCHER_TAG */
813 YYSYMBOL_MATCHER_NOT_TAG = 109, /* MATCHER_NOT_TAG */
814 YYSYMBOL_MATCHER_SET_TAG = 110, /* MATCHER_SET_TAG */
815 YYSYMBOL_MATCHER_UNSET_TAG = 111, /* MATCHER_UNSET_TAG */
816 YYSYMBOL_MATCHER_TAGGED = 112, /* MATCHER_TAGGED */
817 YYSYMBOL_MATCHER_NOT_TAGGED = 113, /* MATCHER_NOT_TAGGED */
818 YYSYMBOL_MATCHER_CLEAR_TAGS = 114, /* MATCHER_CLEAR_TAGS */
819 YYSYMBOL_MATCHER_ENABLED = 115, /* MATCHER_ENABLED */
820 YYSYMBOL_MATCHER_DISABLED = 116, /* MATCHER_DISABLED */
821 YYSYMBOL_MATCHER_RULENAME = 117, /* MATCHER_RULENAME */
822 YYSYMBOL_MATCHER_ACCOUNT = 118, /* MATCHER_ACCOUNT */
823 YYSYMBOL_MATCHER_STRING = 119, /* MATCHER_STRING */
824 YYSYMBOL_MATCHER_SECTION = 120, /* MATCHER_SECTION */
825 YYSYMBOL_MATCHER_INTEGER = 121, /* MATCHER_INTEGER */
826 YYSYMBOL_YYACCEPT = 122, /* $accept */
827 YYSYMBOL_file = 123, /* file */
828 YYSYMBOL_124_1 = 124, /* $@1 */
829 YYSYMBOL_file_line_list = 125, /* file_line_list */
830 YYSYMBOL_file_line = 126, /* file_line */
831 YYSYMBOL_127_2 = 127, /* $@2 */
832 YYSYMBOL_section_notification = 128, /* section_notification */
833 YYSYMBOL_instruction = 129, /* instruction */
834 YYSYMBOL_enabled = 130, /* enabled */
835 YYSYMBOL_name = 131, /* name */
836 YYSYMBOL_account = 132, /* account */
837 YYSYMBOL_filtering = 133, /* filtering */
838 YYSYMBOL_filtering_action_list = 134, /* filtering_action_list */
839 YYSYMBOL_filtering_action_b = 135, /* filtering_action_b */
840 YYSYMBOL_match_type = 136, /* match_type */
841 YYSYMBOL_condition = 137, /* condition */
842 YYSYMBOL_condition_list = 138, /* condition_list */
843 YYSYMBOL_bool_op = 139, /* bool_op */
844 YYSYMBOL_one_condition = 140, /* one_condition */
845 YYSYMBOL_141_3 = 141, /* $@3 */
846 YYSYMBOL_142_4 = 142, /* $@4 */
847 YYSYMBOL_143_5 = 143, /* $@5 */
848 YYSYMBOL_144_6 = 144, /* $@6 */
849 YYSYMBOL_filtering_action = 145, /* filtering_action */
850 YYSYMBOL_146_7 = 146 /* $@7 */
851 };
852 typedef enum yysymbol_kind_t yysymbol_kind_t;
853
854
855
856
857 #ifdef short
858 # undef short
859 #endif
860
861 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
862 <limits.h> and (if available) <stdint.h> are included
863 so that the code can choose integer types of a good width. */
864
865 #ifndef __PTRDIFF_MAX__
866 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
867 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
868 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
869 # define YY_STDINT_H
870 # endif
871 #endif
872
873 /* Narrow types that promote to a signed type and that can represent a
874 signed or unsigned integer of at least N bits. In tables they can
875 save space and decrease cache pressure. Promoting to a signed type
876 helps avoid bugs in integer arithmetic. */
877
878 #ifdef __INT_LEAST8_MAX__
879 typedef __INT_LEAST8_TYPE__ yytype_int8;
880 #elif defined YY_STDINT_H
881 typedef int_least8_t yytype_int8;
882 #else
883 typedef signed char yytype_int8;
884 #endif
885
886 #ifdef __INT_LEAST16_MAX__
887 typedef __INT_LEAST16_TYPE__ yytype_int16;
888 #elif defined YY_STDINT_H
889 typedef int_least16_t yytype_int16;
890 #else
891 typedef short yytype_int16;
892 #endif
893
894 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
895 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
896 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
897 && UINT_LEAST8_MAX <= INT_MAX)
898 typedef uint_least8_t yytype_uint8;
899 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
900 typedef unsigned char yytype_uint8;
901 #else
902 typedef short yytype_uint8;
903 #endif
904
905 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
906 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
907 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
908 && UINT_LEAST16_MAX <= INT_MAX)
909 typedef uint_least16_t yytype_uint16;
910 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
911 typedef unsigned short yytype_uint16;
912 #else
913 typedef int yytype_uint16;
914 #endif
915
916 #ifndef YYPTRDIFF_T
917 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
918 # define YYPTRDIFF_T __PTRDIFF_TYPE__
919 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
920 # elif defined PTRDIFF_MAX
921 # ifndef ptrdiff_t
922 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
923 # endif
924 # define YYPTRDIFF_T ptrdiff_t
925 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
926 # else
927 # define YYPTRDIFF_T long
928 # define YYPTRDIFF_MAXIMUM LONG_MAX
929 # endif
930 #endif
931
932 #ifndef YYSIZE_T
933 # ifdef __SIZE_TYPE__
934 # define YYSIZE_T __SIZE_TYPE__
935 # elif defined size_t
936 # define YYSIZE_T size_t
937 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
938 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
939 # define YYSIZE_T size_t
940 # else
941 # define YYSIZE_T unsigned
942 # endif
943 #endif
944
945 #define YYSIZE_MAXIMUM \
946 YY_CAST (YYPTRDIFF_T, \
947 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
948 ? YYPTRDIFF_MAXIMUM \
949 : YY_CAST (YYSIZE_T, -1)))
950
951 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
952
953
954 /* Stored state numbers (used for stacks). */
955 typedef yytype_int16 yy_state_t;
956
957 /* State numbers in computations. */
958 typedef int yy_state_fast_t;
959
960 #ifndef YY_
961 # if defined YYENABLE_NLS && YYENABLE_NLS
962 # if ENABLE_NLS
963 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
964 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
965 # endif
966 # endif
967 # ifndef YY_
968 # define YY_(Msgid) Msgid
969 # endif
970 #endif
971
972
973 #ifndef YY_ATTRIBUTE_PURE
974 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
975 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
976 # else
977 # define YY_ATTRIBUTE_PURE
978 # endif
979 #endif
980
981 #ifndef YY_ATTRIBUTE_UNUSED
982 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
983 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
984 # else
985 # define YY_ATTRIBUTE_UNUSED
986 # endif
987 #endif
988
989 /* Suppress unused-variable warnings by "using" E. */
990 #if ! defined lint || defined __GNUC__
991 # define YYUSE(E) ((void) (E))
992 #else
993 # define YYUSE(E) /* empty */
994 #endif
995
996 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
997 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
998 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
999 _Pragma ("GCC diagnostic push") \
1000 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
1001 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1002 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1003 _Pragma ("GCC diagnostic pop")
1004 #else
1005 # define YY_INITIAL_VALUE(Value) Value
1006 #endif
1007 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1008 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1009 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1010 #endif
1011 #ifndef YY_INITIAL_VALUE
1012 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1013 #endif
1014
1015 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
1016 # define YY_IGNORE_USELESS_CAST_BEGIN \
1017 _Pragma ("GCC diagnostic push") \
1018 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
1019 # define YY_IGNORE_USELESS_CAST_END \
1020 _Pragma ("GCC diagnostic pop")
1021 #endif
1022 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
1023 # define YY_IGNORE_USELESS_CAST_BEGIN
1024 # define YY_IGNORE_USELESS_CAST_END
1025 #endif
1026
1027
1028 #define YY_ASSERT(E) ((void) (0 && (E)))
1029
1030 #if !defined yyoverflow
1031
1032 /* The parser invokes alloca or malloc; define the necessary symbols. */
1033
1034 # ifdef YYSTACK_USE_ALLOCA
1035 # if YYSTACK_USE_ALLOCA
1036 # ifdef __GNUC__
1037 # define YYSTACK_ALLOC __builtin_alloca
1038 # elif defined __BUILTIN_VA_ARG_INCR
1039 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1040 # elif defined _AIX
1041 # define YYSTACK_ALLOC __alloca
1042 # elif defined _MSC_VER
1043 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1044 # define alloca _alloca
1045 # else
1046 # define YYSTACK_ALLOC alloca
1047 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1048 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1049 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1050 # ifndef EXIT_SUCCESS
1051 # define EXIT_SUCCESS 0
1052 # endif
1053 # endif
1054 # endif
1055 # endif
1056 # endif
1057
1058 # ifdef YYSTACK_ALLOC
1059 /* Pacify GCC's 'empty if-body' warning. */
1060 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1061 # ifndef YYSTACK_ALLOC_MAXIMUM
1062 /* The OS might guarantee only one guard page at the bottom of the stack,
1063 and a page size can be as small as 4096 bytes. So we cannot safely
1064 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1065 to allow for a few compiler-allocated temporary stack slots. */
1066 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1067 # endif
1068 # else
1069 # define YYSTACK_ALLOC YYMALLOC
1070 # define YYSTACK_FREE YYFREE
1071 # ifndef YYSTACK_ALLOC_MAXIMUM
1072 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1073 # endif
1074 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1075 && ! ((defined YYMALLOC || defined malloc) \
1076 && (defined YYFREE || defined free)))
1077 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1078 # ifndef EXIT_SUCCESS
1079 # define EXIT_SUCCESS 0
1080 # endif
1081 # endif
1082 # ifndef YYMALLOC
1083 # define YYMALLOC malloc
1084 # if ! defined malloc && ! defined EXIT_SUCCESS
1085 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1086 # endif
1087 # endif
1088 # ifndef YYFREE
1089 # define YYFREE free
1090 # if ! defined free && ! defined EXIT_SUCCESS
1091 void free (void *); /* INFRINGES ON USER NAME SPACE */
1092 # endif
1093 # endif
1094 # endif
1095 #endif /* !defined yyoverflow */
1096
1097 #if (! defined yyoverflow \
1098 && (! defined __cplusplus \
1099 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1100
1101 /* A type that is properly aligned for any stack member. */
1102 union yyalloc
1103 {
1104 yy_state_t yyss_alloc;
1105 YYSTYPE yyvs_alloc;
1106 };
1107
1108 /* The size of the maximum gap between one aligned stack and the next. */
1109 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
1110
1111 /* The size of an array large to enough to hold all stacks, each with
1112 N elements. */
1113 # define YYSTACK_BYTES(N) \
1114 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
1115 + YYSTACK_GAP_MAXIMUM)
1116
1117 # define YYCOPY_NEEDED 1
1118
1119 /* Relocate STACK from its old location to the new one. The
1120 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1121 elements in the stack, and YYPTR gives the new location of the
1122 stack. Advance YYPTR to a properly aligned location for the next
1123 stack. */
1124 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1125 do \
1126 { \
1127 YYPTRDIFF_T yynewbytes; \
1128 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1129 Stack = &yyptr->Stack_alloc; \
1130 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1131 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1132 } \
1133 while (0)
1134
1135 #endif
1136
1137 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1138 /* Copy COUNT objects from SRC to DST. The source and destination do
1139 not overlap. */
1140 # ifndef YYCOPY
1141 # if defined __GNUC__ && 1 < __GNUC__
1142 # define YYCOPY(Dst, Src, Count) \
1143 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1144 # else
1145 # define YYCOPY(Dst, Src, Count) \
1146 do \
1147 { \
1148 YYPTRDIFF_T yyi; \
1149 for (yyi = 0; yyi < (Count); yyi++) \
1150 (Dst)[yyi] = (Src)[yyi]; \
1151 } \
1152 while (0)
1153 # endif
1154 # endif
1155 #endif /* !YYCOPY_NEEDED */
1156
1157 /* YYFINAL -- State number of the termination state. */
1158 #define YYFINAL 3
1159 /* YYLAST -- Last index in YYTABLE. */
1160 #define YYLAST 751
1161
1162 /* YYNTOKENS -- Number of terminals. */
1163 #define YYNTOKENS 122
1164 /* YYNNTS -- Number of nonterminals. */
1165 #define YYNNTS 25
1166 /* YYNRULES -- Number of rules. */
1167 #define YYNRULES 148
1168 /* YYNSTATES -- Number of states. */
1169 #define YYNSTATES 261
1170
1171 /* YYMAXUTOK -- Last valid token kind. */
1172 #define YYMAXUTOK 376
1173
1174
1175 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1176 as returned by yylex, with out-of-bounds checking. */
1177 #define YYTRANSLATE(YYX) \
1178 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1179 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1180 : YYSYMBOL_YYUNDEF)
1181
1182 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1183 as returned by yylex. */
1184 static const yytype_int8 yytranslate[] =
1185 {
1186 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1187 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1190 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1191 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1192 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1193 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1194 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1196 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1197 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1198 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1199 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1200 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1201 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1202 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1203 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1204 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1205 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1206 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1207 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1211 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1212 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1213 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1214 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1215 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1216 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1217 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1218 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1219 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1220 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1221 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1222 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1223 115, 116, 117, 118, 119, 120, 121
1224 };
1225
1226 #if YYDEBUG
1227 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1228 static const yytype_int16 yyrline[] =
1229 {
1230 0, 376, 376, 376, 384, 386, 390, 392, 392, 394,
1231 400, 433, 434, 435, 436, 437, 438, 447, 456, 465,
1232 474, 483, 492, 496, 500, 507, 514, 521, 562, 563,
1233 567, 575, 579, 583, 587, 594, 602, 606, 614, 618,
1234 625, 632, 639, 646, 653, 660, 667, 674, 681, 688,
1235 695, 702, 709, 716, 723, 730, 737, 744, 751, 758,
1236 765, 772, 779, 786, 797, 808, 815, 822, 829, 836,
1237 845, 854, 863, 872, 881, 890, 899, 908, 917, 926,
1238 935, 944, 951, 958, 967, 976, 985, 994, 1005, 1016,
1239 1025, 1034, 1043, 1052, 1061, 1070, 1079, 1088, 1097, 1106,
1240 1115, 1123, 1131, 1140, 1139, 1153, 1152, 1165, 1174, 1183,
1241 1192, 1202, 1201, 1215, 1214, 1227, 1236, 1245, 1254, 1263,
1242 1272, 1284, 1293, 1302, 1311, 1320, 1327, 1336, 1343, 1350,
1243 1357, 1364, 1371, 1378, 1385, 1392, 1399, 1411, 1423, 1435,
1244 1444, 1453, 1461, 1469, 1473, 1477, 1482, 1481, 1494
1245 };
1246 #endif
1247
1248 /** Accessing symbol of state STATE. */
1249 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1250
1251 #if YYDEBUG || 0
1252 /* The user-facing name of the symbol whose (internal) number is
1253 YYSYMBOL. No bounds checking. */
1254 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1255
1256 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1257 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1258 static const char *const yytname[] =
1259 {
1260 "\"end of file\"", "error", "\"invalid token\"", "MATCHER_ALL",
1261 "MATCHER_UNREAD", "MATCHER_NOT_UNREAD", "MATCHER_NEW", "MATCHER_NOT_NEW",
1262 "MATCHER_MARKED", "MATCHER_NOT_MARKED", "MATCHER_DELETED",
1263 "MATCHER_NOT_DELETED", "MATCHER_REPLIED", "MATCHER_NOT_REPLIED",
1264 "MATCHER_FORWARDED", "MATCHER_NOT_FORWARDED", "MATCHER_SUBJECT",
1265 "MATCHER_NOT_SUBJECT", "MATCHER_FROM", "MATCHER_NOT_FROM", "MATCHER_TO",
1266 "MATCHER_NOT_TO", "MATCHER_CC", "MATCHER_NOT_CC", "MATCHER_TO_OR_CC",
1267 "MATCHER_NOT_TO_AND_NOT_CC", "MATCHER_AGE_GREATER", "MATCHER_AGE_LOWER",
1268 "MATCHER_NEWSGROUPS", "MATCHER_AGE_GREATER_HOURS",
1269 "MATCHER_AGE_LOWER_HOURS", "MATCHER_DATE_AFTER", "MATCHER_DATE_BEFORE",
1270 "MATCHER_NOT_NEWSGROUPS", "MATCHER_INREPLYTO", "MATCHER_NOT_INREPLYTO",
1271 "MATCHER_MESSAGEID", "MATCHER_NOT_MESSAGEID", "MATCHER_REFERENCES",
1272 "MATCHER_NOT_REFERENCES", "MATCHER_SCORE_GREATER", "MATCHER_SCORE_LOWER",
1273 "MATCHER_HEADER", "MATCHER_NOT_HEADER", "MATCHER_HEADERS_PART",
1274 "MATCHER_NOT_HEADERS_PART", "MATCHER_MESSAGE", "MATCHER_HEADERS_CONT",
1275 "MATCHER_NOT_HEADERS_CONT", "MATCHER_NOT_MESSAGE", "MATCHER_BODY_PART",
1276 "MATCHER_NOT_BODY_PART", "MATCHER_TEST", "MATCHER_NOT_TEST",
1277 "MATCHER_MATCHCASE", "MATCHER_MATCH", "MATCHER_REGEXPCASE",
1278 "MATCHER_REGEXP", "MATCHER_SCORE", "MATCHER_MOVE",
1279 "MATCHER_FOUND_IN_ADDRESSBOOK", "MATCHER_NOT_FOUND_IN_ADDRESSBOOK",
1280 "MATCHER_IN", "MATCHER_COPY", "MATCHER_DELETE", "MATCHER_MARK",
1281 "MATCHER_UNMARK", "MATCHER_LOCK", "MATCHER_UNLOCK", "MATCHER_EXECUTE",
1282 "MATCHER_MARK_AS_READ", "MATCHER_MARK_AS_UNREAD", "MATCHER_FORWARD",
1283 "MATCHER_MARK_AS_SPAM", "MATCHER_MARK_AS_HAM",
1284 "MATCHER_FORWARD_AS_ATTACHMENT", "MATCHER_EOL", "MATCHER_OR",
1285 "MATCHER_AND", "MATCHER_COLOR", "MATCHER_SCORE_EQUAL",
1286 "MATCHER_REDIRECT", "MATCHER_SIZE_GREATER", "MATCHER_SIZE_SMALLER",
1287 "MATCHER_SIZE_EQUAL", "MATCHER_LOCKED", "MATCHER_NOT_LOCKED",
1288 "MATCHER_PARTIAL", "MATCHER_NOT_PARTIAL", "MATCHER_COLORLABEL",
1289 "MATCHER_NOT_COLORLABEL", "MATCHER_IGNORE_THREAD",
1290 "MATCHER_NOT_IGNORE_THREAD", "MATCHER_WATCH_THREAD",
1291 "MATCHER_NOT_WATCH_THREAD", "MATCHER_CHANGE_SCORE", "MATCHER_SET_SCORE",
1292 "MATCHER_ADD_TO_ADDRESSBOOK", "MATCHER_STOP", "MATCHER_HIDE",
1293 "MATCHER_IGNORE", "MATCHER_WATCH", "MATCHER_SPAM", "MATCHER_NOT_SPAM",
1294 "MATCHER_HAS_ATTACHMENT", "MATCHER_HAS_NO_ATTACHMENT", "MATCHER_SIGNED",
1295 "MATCHER_NOT_SIGNED", "MATCHER_TAG", "MATCHER_NOT_TAG",
1296 "MATCHER_SET_TAG", "MATCHER_UNSET_TAG", "MATCHER_TAGGED",
1297 "MATCHER_NOT_TAGGED", "MATCHER_CLEAR_TAGS", "MATCHER_ENABLED",
1298 "MATCHER_DISABLED", "MATCHER_RULENAME", "MATCHER_ACCOUNT",
1299 "MATCHER_STRING", "MATCHER_SECTION", "MATCHER_INTEGER", "$accept",
1300 "file", "$@1", "file_line_list", "file_line", "$@2",
1301 "section_notification", "instruction", "enabled", "name", "account",
1302 "filtering", "filtering_action_list", "filtering_action_b", "match_type",
1303 "condition", "condition_list", "bool_op", "one_condition", "$@3", "$@4",
1304 "$@5", "$@6", "filtering_action", "$@7", YY_NULLPTR
1305 };
1306
1307 static const char *
yysymbol_name(yysymbol_kind_t yysymbol)1308 yysymbol_name (yysymbol_kind_t yysymbol)
1309 {
1310 return yytname[yysymbol];
1311 }
1312 #endif
1313
1314 #ifdef YYPRINT
1315 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1316 (internal) symbol number NUM (which must be that of a token). */
1317 static const yytype_int16 yytoknum[] =
1318 {
1319 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1320 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1321 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1322 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1323 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1324 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1325 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1326 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1327 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1328 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1329 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1330 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1331 375, 376
1332 };
1333 #endif
1334
1335 #define YYPACT_NINF (-229)
1336
1337 #define yypact_value_is_default(Yyn) \
1338 ((Yyn) == YYPACT_NINF)
1339
1340 #define YYTABLE_NINF (-8)
1341
1342 #define yytable_value_is_error(Yyn) \
1343 0
1344
1345 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1346 STATE-NUM. */
1347 static const yytype_int16 yypact[] =
1348 {
1349 -229, 12, 237, -229, -63, -61, -229, 119, 406, -229,
1350 -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
1351 -229, -229, -229, -229, -229, -229, 5, 5, 5, 5,
1352 5, 5, 5, 5, 5, 5, -97, -96, 5, -95,
1353 -84, -81, -80, 5, 5, 5, 5, 5, 5, 5,
1354 -66, -64, -56, -55, 5, 5, 5, 5, 5, 5,
1355 5, 5, -54, -53, -52, -51, -49, -48, -40, -229,
1356 -229, -229, -229, -229, -39, -229, -229, -38, -229, -229,
1357 -35, -229, -32, -31, -29, -28, -26, -25, -229, -229,
1358 -229, -229, -24, -22, -229, -229, -229, -229, -21, -20,
1359 -37, -229, -229, -229, -229, -229, -229, -229, -229, -229,
1360 -229, 5, 5, -17, -16, -229, -229, -229, -229, -229,
1361 -15, -14, -229, -50, 638, -229, -229, -23, -229, -68,
1362 -229, -229, -229, -229, -229, -229, -13, -11, -10, -9,
1363 -8, -7, -6, -5, -4, -3, -229, -229, -2, -229,
1364 -229, -229, -229, -1, 2, 55, 56, 57, 62, 173,
1365 -229, -229, -229, -229, 174, 175, 180, 195, 196, 239,
1366 240, 241, -229, -229, -229, -229, -229, -229, -229, -229,
1367 242, 243, -229, -229, 244, -229, -229, -229, -229, -229,
1368 -229, -229, -229, 245, 246, -229, -229, -229, -229, 522,
1369 -23, -229, -229, -229, 638, -229, -229, -229, -229, -229,
1370 -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
1371 -229, -229, -229, 5, 5, -229, -229, -229, -229, -229,
1372 -229, -229, -229, 19, 32, -229, -229, -229, 248, -229,
1373 -229, 638, -23, 22, -229, -229, 249, 250, 251, 252,
1374 -229, -23, 29, -229, -229, -229, -229, -229, 280, -229,
1375 -229
1376 };
1377
1378 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1379 Performed when YYTABLE does not specify something else to do. Zero
1380 means the default is an error. */
1381 static const yytype_uint8 yydefact[] =
1382 {
1383 2, 0, 0, 1, 0, 0, 3, 0, 0, 6,
1384 9, 10, 4, 40, 41, 42, 43, 44, 45, 46,
1385 47, 48, 49, 50, 51, 52, 0, 0, 0, 0,
1386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1387 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1389 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
1390 128, 129, 130, 131, 0, 132, 133, 0, 134, 135,
1391 0, 22, 0, 0, 0, 0, 0, 0, 53, 54,
1392 61, 62, 0, 0, 65, 66, 67, 68, 0, 0,
1393 0, 148, 143, 144, 145, 55, 56, 57, 58, 59,
1394 60, 0, 0, 0, 0, 81, 82, 125, 23, 24,
1395 0, 0, 8, 17, 19, 18, 21, 29, 20, 35,
1396 37, 30, 31, 32, 33, 34, 0, 0, 0, 0,
1397 0, 0, 0, 0, 0, 0, 83, 84, 0, 85,
1398 86, 87, 88, 0, 0, 0, 0, 0, 0, 0,
1399 97, 98, 103, 105, 0, 0, 0, 0, 0, 0,
1400 0, 0, 119, 120, 141, 122, 111, 113, 126, 121,
1401 0, 0, 139, 99, 0, 100, 101, 102, 63, 64,
1402 140, 142, 146, 0, 0, 123, 124, 25, 26, 0,
1403 0, 28, 39, 38, 0, 69, 70, 71, 72, 73,
1404 74, 75, 76, 77, 78, 89, 90, 93, 94, 91,
1405 92, 95, 96, 0, 0, 107, 108, 115, 109, 110,
1406 116, 117, 118, 0, 0, 136, 137, 138, 0, 79,
1407 80, 0, 0, 16, 27, 36, 0, 0, 0, 0,
1408 147, 0, 14, 15, 104, 106, 112, 114, 12, 13,
1409 11
1410 };
1411
1412 /* YYPGOTO[NTERM-NUM]. */
1413 static const yytype_int16 yypgoto[] =
1414 {
1415 -229, -229, -229, 365, -229, -229, -229, -229, -229, -70,
1416 176, -228, 46, -229, -27, 167, -229, -229, 169, -229,
1417 -229, -229, -229, -229, -229
1418 };
1419
1420 /* YYDEFGOTO[NTERM-NUM]. */
1421 static const yytype_int16 yydefgoto[] =
1422 {
1423 -1, 1, 2, 6, 7, 8, 9, 122, 123, 124,
1424 125, 243, 244, 127, 136, 128, 129, 204, 130, 223,
1425 224, 233, 234, 131, 238
1426 };
1427
1428 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1429 positive, shift that token. If negative, reduce the rule whose
1430 number is the opposite. If YYTABLE_NINF, syntax error. */
1431 static const yytype_int16 yytable[] =
1432 {
1433 137, 138, 139, 140, 141, 142, 143, 144, 145, 202,
1434 203, 148, 3, 10, 252, 11, 153, 154, 155, 156,
1435 157, 158, 159, 258, 146, 147, 149, 164, 165, 166,
1436 167, 168, 169, 170, 171, 64, 65, 150, 151, 152,
1437 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
1438 78, 79, 80, 199, 126, 160, 82, 161, 84, 132,
1439 133, 134, 135, 162, 163, 172, 173, 120, 175, 174,
1440 176, 177, 98, 99, 100, 101, 102, 103, 104, 178,
1441 179, 248, 192, 180, 193, 194, 181, 113, 114, 182,
1442 183, 117, 184, 185, 249, 186, 187, 188, 253, 189,
1443 190, 191, 195, 196, 197, 259, 205, 198, 206, 207,
1444 208, 209, 210, 211, 212, 213, 214, 215, 216, -5,
1445 4, 217, -7, -7, -7, -7, -7, -7, -7, -7,
1446 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1447 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1448 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1449 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1450 -7, -7, -7, 201, 218, 219, 220, -7, -7, -7,
1451 -7, 221, -7, -7, -7, -7, -7, -7, -7, -7,
1452 -7, -7, -7, -7, -7, -7, 246, 247, -7, -7,
1453 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1454 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1455 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1456 -7, -7, -7, -7, -7, -7, -7, -7, 4, 5,
1457 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1458 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1459 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1460 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1461 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1462 -7, 200, 222, 225, 226, -7, -7, -7, -7, 227,
1463 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1464 -7, -7, -7, -7, 228, 229, -7, -7, -7, -7,
1465 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1466 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1467 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
1468 -7, -7, -7, -7, -7, -7, 260, 5, 230, 231,
1469 232, 235, 236, 237, 239, 240, 242, 250, 254, 255,
1470 256, 257, 12, 245, 0, 241, 0, 0, 0, 0,
1471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1473 0, 0, 0, 0, 0, 0, 0, 0, 251, 13,
1474 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1475 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1476 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
1477 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1478 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1479 0, 0, 0, 0, 64, 65, 66, 67, 0, 68,
1480 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
1481 79, 80, 81, 0, 0, 82, 83, 84, 85, 86,
1482 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1483 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
1484 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1485 117, 118, 119, 120, 121, 13, 14, 15, 16, 17,
1486 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1487 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1488 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1489 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1490 58, 59, 60, 61, 62, 63, 0, 0, 0, 0,
1491 0, 0, 66, 67, 0, 0, 0, 0, 0, 0,
1492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1493 0, 0, 83, 0, 85, 86, 87, 88, 89, 90,
1494 91, 92, 93, 94, 95, 96, 97, 0, 0, 0,
1495 0, 0, 0, 0, 105, 106, 107, 108, 109, 110,
1496 111, 112, 0, 0, 115, 116, 0, 0, 0, 0,
1497 121, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1498 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1499 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1500 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1501 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1502 62, 63, 0, 0, 0, 0, 0, 0, 66, 67,
1503 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1504 0, 0, 0, 0, 0, 0, 0, 0, 83, 0,
1505 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1506 95, 96, 97, 0, 0, 0, 0, 0, 0, 0,
1507 105, 106, 107, 108, 109, 110, 111, 112, 0, 0,
1508 115, 116
1509 };
1510
1511 static const yytype_int16 yycheck[] =
1512 {
1513 27, 28, 29, 30, 31, 32, 33, 34, 35, 77,
1514 78, 38, 0, 76, 242, 76, 43, 44, 45, 46,
1515 47, 48, 49, 251, 121, 121, 121, 54, 55, 56,
1516 57, 58, 59, 60, 61, 58, 59, 121, 119, 119,
1517 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1518 73, 74, 75, 123, 8, 121, 79, 121, 81, 54,
1519 55, 56, 57, 119, 119, 119, 119, 117, 119, 121,
1520 119, 119, 95, 96, 97, 98, 99, 100, 101, 119,
1521 119, 62, 119, 121, 111, 112, 121, 110, 111, 121,
1522 121, 114, 121, 121, 62, 121, 121, 121, 76, 121,
1523 121, 121, 119, 119, 119, 76, 119, 121, 119, 119,
1524 119, 119, 119, 119, 119, 119, 119, 119, 119, 0,
1525 1, 119, 3, 4, 5, 6, 7, 8, 9, 10,
1526 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1527 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1528 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1529 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
1530 51, 52, 53, 127, 119, 119, 119, 58, 59, 60,
1531 61, 119, 63, 64, 65, 66, 67, 68, 69, 70,
1532 71, 72, 73, 74, 75, 76, 223, 224, 79, 80,
1533 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1534 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
1535 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1536 111, 112, 113, 114, 115, 116, 117, 118, 1, 120,
1537 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1538 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1539 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
1540 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1541 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1542 53, 124, 119, 119, 119, 58, 59, 60, 61, 119,
1543 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1544 73, 74, 75, 76, 119, 119, 79, 80, 81, 82,
1545 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
1546 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1547 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
1548 113, 114, 115, 116, 117, 118, 76, 120, 119, 119,
1549 119, 119, 119, 119, 119, 119, 199, 119, 119, 119,
1550 119, 119, 7, 204, -1, 199, -1, -1, -1, -1,
1551 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1552 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1553 -1, -1, -1, -1, -1, -1, -1, -1, 241, 3,
1554 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1555 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1556 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1557 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
1558 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1559 -1, -1, -1, -1, 58, 59, 60, 61, -1, 63,
1560 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1561 74, 75, 76, -1, -1, 79, 80, 81, 82, 83,
1562 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1563 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
1564 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1565 114, 115, 116, 117, 118, 3, 4, 5, 6, 7,
1566 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1567 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1568 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1569 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1570 48, 49, 50, 51, 52, 53, -1, -1, -1, -1,
1571 -1, -1, 60, 61, -1, -1, -1, -1, -1, -1,
1572 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1573 -1, -1, 80, -1, 82, 83, 84, 85, 86, 87,
1574 88, 89, 90, 91, 92, 93, 94, -1, -1, -1,
1575 -1, -1, -1, -1, 102, 103, 104, 105, 106, 107,
1576 108, 109, -1, -1, 112, 113, -1, -1, -1, -1,
1577 118, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1578 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1579 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1580 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1581 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1582 52, 53, -1, -1, -1, -1, -1, -1, 60, 61,
1583 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1584 -1, -1, -1, -1, -1, -1, -1, -1, 80, -1,
1585 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1586 92, 93, 94, -1, -1, -1, -1, -1, -1, -1,
1587 102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
1588 112, 113
1589 };
1590
1591 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1592 symbol of state STATE-NUM. */
1593 static const yytype_uint8 yystos[] =
1594 {
1595 0, 123, 124, 0, 1, 120, 125, 126, 127, 128,
1596 76, 76, 125, 3, 4, 5, 6, 7, 8, 9,
1597 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1598 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1599 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1600 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
1601 50, 51, 52, 53, 58, 59, 60, 61, 63, 64,
1602 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1603 75, 76, 79, 80, 81, 82, 83, 84, 85, 86,
1604 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1605 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
1606 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1607 117, 118, 129, 130, 131, 132, 134, 135, 137, 138,
1608 140, 145, 54, 55, 56, 57, 136, 136, 136, 136,
1609 136, 136, 136, 136, 136, 136, 121, 121, 136, 121,
1610 121, 119, 119, 136, 136, 136, 136, 136, 136, 136,
1611 121, 121, 119, 119, 136, 136, 136, 136, 136, 136,
1612 136, 136, 119, 119, 121, 119, 119, 119, 119, 119,
1613 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1614 121, 121, 119, 136, 136, 119, 119, 119, 121, 131,
1615 137, 134, 77, 78, 139, 119, 119, 119, 119, 119,
1616 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
1617 119, 119, 119, 141, 142, 119, 119, 119, 119, 119,
1618 119, 119, 119, 143, 144, 119, 119, 119, 146, 119,
1619 119, 132, 137, 133, 134, 140, 136, 136, 62, 62,
1620 119, 137, 133, 76, 119, 119, 119, 119, 133, 76,
1621 76
1622 };
1623
1624 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1625 static const yytype_uint8 yyr1[] =
1626 {
1627 0, 122, 124, 123, 125, 125, 126, 127, 126, 126,
1628 128, 129, 129, 129, 129, 129, 129, 129, 129, 129,
1629 129, 129, 129, 130, 130, 131, 132, 133, 134, 134,
1630 135, 136, 136, 136, 136, 137, 138, 138, 139, 139,
1631 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
1632 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
1633 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
1634 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
1635 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
1636 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
1637 140, 140, 140, 141, 140, 142, 140, 140, 140, 140,
1638 140, 143, 140, 144, 140, 140, 140, 140, 140, 140,
1639 140, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1640 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1641 145, 145, 145, 145, 145, 145, 146, 145, 145
1642 };
1643
1644 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1645 static const yytype_int8 yyr2[] =
1646 {
1647 0, 2, 0, 2, 2, 1, 1, 0, 2, 2,
1648 2, 6, 5, 5, 4, 4, 3, 1, 1, 1,
1649 1, 1, 1, 1, 1, 2, 2, 1, 2, 1,
1650 1, 1, 1, 1, 1, 1, 3, 1, 1, 1,
1651 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1652 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1653 1, 1, 1, 2, 2, 1, 1, 1, 1, 3,
1654 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1655 3, 1, 1, 2, 2, 2, 2, 2, 2, 3,
1656 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
1657 2, 2, 2, 0, 5, 0, 5, 3, 3, 3,
1658 3, 0, 5, 0, 5, 3, 3, 3, 3, 2,
1659 2, 2, 2, 2, 2, 1, 2, 1, 1, 1,
1660 1, 1, 1, 1, 1, 1, 3, 3, 3, 2,
1661 2, 2, 2, 1, 1, 1, 0, 4, 1
1662 };
1663
1664
1665 enum { YYENOMEM = -2 };
1666
1667 #define yyerrok (yyerrstatus = 0)
1668 #define yyclearin (yychar = YYEMPTY)
1669
1670 #define YYACCEPT goto yyacceptlab
1671 #define YYABORT goto yyabortlab
1672 #define YYERROR goto yyerrorlab
1673
1674
1675 #define YYRECOVERING() (!!yyerrstatus)
1676
1677 #define YYBACKUP(Token, Value) \
1678 do \
1679 if (yychar == YYEMPTY) \
1680 { \
1681 yychar = (Token); \
1682 yylval = (Value); \
1683 YYPOPSTACK (yylen); \
1684 yystate = *yyssp; \
1685 goto yybackup; \
1686 } \
1687 else \
1688 { \
1689 yyerror (YY_("syntax error: cannot back up")); \
1690 YYERROR; \
1691 } \
1692 while (0)
1693
1694 /* Backward compatibility with an undocumented macro.
1695 Use YYerror or YYUNDEF. */
1696 #define YYERRCODE YYUNDEF
1697
1698
1699 /* Enable debugging if requested. */
1700 #if YYDEBUG
1701
1702 # ifndef YYFPRINTF
1703 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1704 # define YYFPRINTF fprintf
1705 # endif
1706
1707 # define YYDPRINTF(Args) \
1708 do { \
1709 if (yydebug) \
1710 YYFPRINTF Args; \
1711 } while (0)
1712
1713 /* This macro is provided for backward compatibility. */
1714 # ifndef YY_LOCATION_PRINT
1715 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1716 # endif
1717
1718
1719 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1720 do { \
1721 if (yydebug) \
1722 { \
1723 YYFPRINTF (stderr, "%s ", Title); \
1724 yy_symbol_print (stderr, \
1725 Kind, Value); \
1726 YYFPRINTF (stderr, "\n"); \
1727 } \
1728 } while (0)
1729
1730
1731 /*-----------------------------------.
1732 | Print this symbol's value on YYO. |
1733 `-----------------------------------*/
1734
1735 static void
yy_symbol_value_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep)1736 yy_symbol_value_print (FILE *yyo,
1737 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
1738 {
1739 FILE *yyoutput = yyo;
1740 YYUSE (yyoutput);
1741 if (!yyvaluep)
1742 return;
1743 # ifdef YYPRINT
1744 if (yykind < YYNTOKENS)
1745 YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
1746 # endif
1747 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1748 YYUSE (yykind);
1749 YY_IGNORE_MAYBE_UNINITIALIZED_END
1750 }
1751
1752
1753 /*---------------------------.
1754 | Print this symbol on YYO. |
1755 `---------------------------*/
1756
1757 static void
yy_symbol_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep)1758 yy_symbol_print (FILE *yyo,
1759 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
1760 {
1761 YYFPRINTF (yyo, "%s %s (",
1762 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
1763
1764 yy_symbol_value_print (yyo, yykind, yyvaluep);
1765 YYFPRINTF (yyo, ")");
1766 }
1767
1768 /*------------------------------------------------------------------.
1769 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1770 | TOP (included). |
1771 `------------------------------------------------------------------*/
1772
1773 static void
yy_stack_print(yy_state_t * yybottom,yy_state_t * yytop)1774 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1775 {
1776 YYFPRINTF (stderr, "Stack now");
1777 for (; yybottom <= yytop; yybottom++)
1778 {
1779 int yybot = *yybottom;
1780 YYFPRINTF (stderr, " %d", yybot);
1781 }
1782 YYFPRINTF (stderr, "\n");
1783 }
1784
1785 # define YY_STACK_PRINT(Bottom, Top) \
1786 do { \
1787 if (yydebug) \
1788 yy_stack_print ((Bottom), (Top)); \
1789 } while (0)
1790
1791
1792 /*------------------------------------------------.
1793 | Report that the YYRULE is going to be reduced. |
1794 `------------------------------------------------*/
1795
1796 static void
yy_reduce_print(yy_state_t * yyssp,YYSTYPE * yyvsp,int yyrule)1797 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1798 int yyrule)
1799 {
1800 int yylno = yyrline[yyrule];
1801 int yynrhs = yyr2[yyrule];
1802 int yyi;
1803 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1804 yyrule - 1, yylno);
1805 /* The symbols being reduced. */
1806 for (yyi = 0; yyi < yynrhs; yyi++)
1807 {
1808 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1809 yy_symbol_print (stderr,
1810 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1811 &yyvsp[(yyi + 1) - (yynrhs)]);
1812 YYFPRINTF (stderr, "\n");
1813 }
1814 }
1815
1816 # define YY_REDUCE_PRINT(Rule) \
1817 do { \
1818 if (yydebug) \
1819 yy_reduce_print (yyssp, yyvsp, Rule); \
1820 } while (0)
1821
1822 /* Nonzero means print parse trace. It is left uninitialized so that
1823 multiple parsers can coexist. */
1824 int yydebug;
1825 #else /* !YYDEBUG */
1826 # define YYDPRINTF(Args) ((void) 0)
1827 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1828 # define YY_STACK_PRINT(Bottom, Top)
1829 # define YY_REDUCE_PRINT(Rule)
1830 #endif /* !YYDEBUG */
1831
1832
1833 /* YYINITDEPTH -- initial size of the parser's stacks. */
1834 #ifndef YYINITDEPTH
1835 # define YYINITDEPTH 200
1836 #endif
1837
1838 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1839 if the built-in stack extension method is used).
1840
1841 Do not make this value too large; the results are undefined if
1842 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1843 evaluated with infinite-precision integer arithmetic. */
1844
1845 #ifndef YYMAXDEPTH
1846 # define YYMAXDEPTH 10000
1847 #endif
1848
1849
1850
1851
1852
1853
1854 /*-----------------------------------------------.
1855 | Release the memory associated to this symbol. |
1856 `-----------------------------------------------*/
1857
1858 static void
yydestruct(const char * yymsg,yysymbol_kind_t yykind,YYSTYPE * yyvaluep)1859 yydestruct (const char *yymsg,
1860 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
1861 {
1862 YYUSE (yyvaluep);
1863 if (!yymsg)
1864 yymsg = "Deleting";
1865 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
1866
1867 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1868 YYUSE (yykind);
1869 YY_IGNORE_MAYBE_UNINITIALIZED_END
1870 }
1871
1872
1873 /* Lookahead token kind. */
1874 int yychar;
1875
1876 /* The semantic value of the lookahead symbol. */
1877 YYSTYPE yylval;
1878 /* Number of syntax errors so far. */
1879 int yynerrs;
1880
1881
1882
1883
1884 /*----------.
1885 | yyparse. |
1886 `----------*/
1887
1888 int
yyparse(void)1889 yyparse (void)
1890 {
1891 yy_state_fast_t yystate = 0;
1892 /* Number of tokens to shift before error messages enabled. */
1893 int yyerrstatus = 0;
1894
1895 /* Refer to the stacks through separate pointers, to allow yyoverflow
1896 to reallocate them elsewhere. */
1897
1898 /* Their size. */
1899 YYPTRDIFF_T yystacksize = YYINITDEPTH;
1900
1901 /* The state stack: array, bottom, top. */
1902 yy_state_t yyssa[YYINITDEPTH];
1903 yy_state_t *yyss = yyssa;
1904 yy_state_t *yyssp = yyss;
1905
1906 /* The semantic value stack: array, bottom, top. */
1907 YYSTYPE yyvsa[YYINITDEPTH];
1908 YYSTYPE *yyvs = yyvsa;
1909 YYSTYPE *yyvsp = yyvs;
1910
1911 int yyn;
1912 /* The return value of yyparse. */
1913 int yyresult;
1914 /* Lookahead symbol kind. */
1915 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
1916 /* The variables used to return semantic value and location from the
1917 action routines. */
1918 YYSTYPE yyval;
1919
1920
1921
1922 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1923
1924 /* The number of symbols on the RHS of the reduced rule.
1925 Keep to zero when no symbol should be popped. */
1926 int yylen = 0;
1927
1928 YYDPRINTF ((stderr, "Starting parse\n"));
1929
1930 yychar = YYEMPTY; /* Cause a token to be read. */
1931 goto yysetstate;
1932
1933
1934 /*------------------------------------------------------------.
1935 | yynewstate -- push a new state, which is found in yystate. |
1936 `------------------------------------------------------------*/
1937 yynewstate:
1938 /* In all cases, when you get here, the value and location stacks
1939 have just been pushed. So pushing a state here evens the stacks. */
1940 yyssp++;
1941
1942
1943 /*--------------------------------------------------------------------.
1944 | yysetstate -- set current state (the top of the stack) to yystate. |
1945 `--------------------------------------------------------------------*/
1946 yysetstate:
1947 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1948 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1949 YY_IGNORE_USELESS_CAST_BEGIN
1950 *yyssp = YY_CAST (yy_state_t, yystate);
1951 YY_IGNORE_USELESS_CAST_END
1952 YY_STACK_PRINT (yyss, yyssp);
1953
1954 if (yyss + yystacksize - 1 <= yyssp)
1955 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1956 goto yyexhaustedlab;
1957 #else
1958 {
1959 /* Get the current used size of the three stacks, in elements. */
1960 YYPTRDIFF_T yysize = yyssp - yyss + 1;
1961
1962 # if defined yyoverflow
1963 {
1964 /* Give user a chance to reallocate the stack. Use copies of
1965 these so that the &'s don't force the real ones into
1966 memory. */
1967 yy_state_t *yyss1 = yyss;
1968 YYSTYPE *yyvs1 = yyvs;
1969
1970 /* Each stack pointer address is followed by the size of the
1971 data in use in that stack, in bytes. This used to be a
1972 conditional around just the two extra args, but that might
1973 be undefined if yyoverflow is a macro. */
1974 yyoverflow (YY_("memory exhausted"),
1975 &yyss1, yysize * YYSIZEOF (*yyssp),
1976 &yyvs1, yysize * YYSIZEOF (*yyvsp),
1977 &yystacksize);
1978 yyss = yyss1;
1979 yyvs = yyvs1;
1980 }
1981 # else /* defined YYSTACK_RELOCATE */
1982 /* Extend the stack our own way. */
1983 if (YYMAXDEPTH <= yystacksize)
1984 goto yyexhaustedlab;
1985 yystacksize *= 2;
1986 if (YYMAXDEPTH < yystacksize)
1987 yystacksize = YYMAXDEPTH;
1988
1989 {
1990 yy_state_t *yyss1 = yyss;
1991 union yyalloc *yyptr =
1992 YY_CAST (union yyalloc *,
1993 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1994 if (! yyptr)
1995 goto yyexhaustedlab;
1996 YYSTACK_RELOCATE (yyss_alloc, yyss);
1997 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1998 # undef YYSTACK_RELOCATE
1999 if (yyss1 != yyssa)
2000 YYSTACK_FREE (yyss1);
2001 }
2002 # endif
2003
2004 yyssp = yyss + yysize - 1;
2005 yyvsp = yyvs + yysize - 1;
2006
2007 YY_IGNORE_USELESS_CAST_BEGIN
2008 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
2009 YY_CAST (long, yystacksize)));
2010 YY_IGNORE_USELESS_CAST_END
2011
2012 if (yyss + yystacksize - 1 <= yyssp)
2013 YYABORT;
2014 }
2015 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
2016
2017 if (yystate == YYFINAL)
2018 YYACCEPT;
2019
2020 goto yybackup;
2021
2022
2023 /*-----------.
2024 | yybackup. |
2025 `-----------*/
2026 yybackup:
2027 /* Do appropriate processing given the current state. Read a
2028 lookahead token if we need one and don't already have one. */
2029
2030 /* First try to decide what to do without reference to lookahead token. */
2031 yyn = yypact[yystate];
2032 if (yypact_value_is_default (yyn))
2033 goto yydefault;
2034
2035 /* Not known => get a lookahead token if don't already have one. */
2036
2037 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
2038 if (yychar == YYEMPTY)
2039 {
2040 YYDPRINTF ((stderr, "Reading a token\n"));
2041 yychar = yylex ();
2042 }
2043
2044 if (yychar <= YYEOF)
2045 {
2046 yychar = YYEOF;
2047 yytoken = YYSYMBOL_YYEOF;
2048 YYDPRINTF ((stderr, "Now at end of input.\n"));
2049 }
2050 else if (yychar == YYerror)
2051 {
2052 /* The scanner already issued an error message, process directly
2053 to error recovery. But do not keep the error token as
2054 lookahead, it is too special and may lead us to an endless
2055 loop in error recovery. */
2056 yychar = YYUNDEF;
2057 yytoken = YYSYMBOL_YYerror;
2058 goto yyerrlab1;
2059 }
2060 else
2061 {
2062 yytoken = YYTRANSLATE (yychar);
2063 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2064 }
2065
2066 /* If the proper action on seeing token YYTOKEN is to reduce or to
2067 detect an error, take that action. */
2068 yyn += yytoken;
2069 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2070 goto yydefault;
2071 yyn = yytable[yyn];
2072 if (yyn <= 0)
2073 {
2074 if (yytable_value_is_error (yyn))
2075 goto yyerrlab;
2076 yyn = -yyn;
2077 goto yyreduce;
2078 }
2079
2080 /* Count tokens shifted since error; after three, turn off error
2081 status. */
2082 if (yyerrstatus)
2083 yyerrstatus--;
2084
2085 /* Shift the lookahead token. */
2086 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2087 yystate = yyn;
2088 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2089 *++yyvsp = yylval;
2090 YY_IGNORE_MAYBE_UNINITIALIZED_END
2091
2092 /* Discard the shifted token. */
2093 yychar = YYEMPTY;
2094 goto yynewstate;
2095
2096
2097 /*-----------------------------------------------------------.
2098 | yydefault -- do the default action for the current state. |
2099 `-----------------------------------------------------------*/
2100 yydefault:
2101 yyn = yydefact[yystate];
2102 if (yyn == 0)
2103 goto yyerrlab;
2104 goto yyreduce;
2105
2106
2107 /*-----------------------------.
2108 | yyreduce -- do a reduction. |
2109 `-----------------------------*/
2110 yyreduce:
2111 /* yyn is the number of a rule to reduce with. */
2112 yylen = yyr2[yyn];
2113
2114 /* If YYLEN is nonzero, implement the default value of the action:
2115 '$$ = $1'.
2116
2117 Otherwise, the following line sets YYVAL to garbage.
2118 This behavior is undocumented and Bison
2119 users should not rely upon it. Assigning to YYVAL
2120 unconditionally makes the parser a bit smaller, and it avoids a
2121 GCC warning that YYVAL may be used uninitialized. */
2122 yyval = yyvsp[1-yylen];
2123
2124
2125 YY_REDUCE_PRINT (yyn);
2126 switch (yyn)
2127 {
2128 case 2: /* $@1: %empty */
2129 #line 376 "matcher_parser_parse.y"
2130 {
2131 if (matcher_parse_op == MATCHER_PARSE_FILE) {
2132 prefs_filtering = &pre_global_processing;
2133 }
2134 }
2135 #line 2136 "matcher_parser_parse.c"
2136 break;
2137
2138 case 7: /* $@2: %empty */
2139 #line 392 "matcher_parser_parse.y"
2140 { action_list = NULL; }
2141 #line 2142 "matcher_parser_parse.c"
2142 break;
2143
2144 case 9: /* file_line: error MATCHER_EOL */
2145 #line 395 "matcher_parser_parse.y"
2146 {
2147 yyerrok;
2148 }
2149 #line 2150 "matcher_parser_parse.c"
2150 break;
2151
2152 case 10: /* section_notification: MATCHER_SECTION MATCHER_EOL */
2153 #line 401 "matcher_parser_parse.y"
2154 {
2155 gchar *folder = (yyvsp[-1].str);
2156 FolderItem *item = NULL;
2157
2158 if (matcher_parse_op == MATCHER_PARSE_FILE) {
2159 enable_compatibility = 0;
2160 if (!strcmp(folder, "global")) {
2161 /* backward compatibility */
2162 enable_compatibility = 1;
2163 }
2164 else if (!strcmp(folder, "preglobal")) {
2165 prefs_filtering = &pre_global_processing;
2166 }
2167 else if (!strcmp(folder, "postglobal")) {
2168 prefs_filtering = &post_global_processing;
2169 }
2170 else if (!strcmp(folder, "filtering")) {
2171 prefs_filtering = &filtering_rules;
2172 }
2173 else {
2174 item = folder_find_item_from_identifier(folder);
2175 if (item != NULL) {
2176 prefs_filtering = &item->prefs->processing;
2177 } else {
2178 prefs_filtering = NULL;
2179 }
2180 }
2181 }
2182 }
2183 #line 2184 "matcher_parser_parse.c"
2184 break;
2185
2186 case 16: /* instruction: name condition filtering */
2187 #line 439 "matcher_parser_parse.y"
2188 {
2189 if (matcher_parse_op == MATCHER_PARSE_NO_EOL)
2190 YYACCEPT;
2191 else {
2192 matcher_parsererror("parse error [no eol]");
2193 YYERROR;
2194 }
2195 }
2196 #line 2197 "matcher_parser_parse.c"
2197 break;
2198
2199 case 17: /* instruction: enabled */
2200 #line 448 "matcher_parser_parse.y"
2201 {
2202 if (matcher_parse_op == MATCHER_PARSE_ENABLED)
2203 YYACCEPT;
2204 else {
2205 matcher_parsererror("parse error [enabled]");
2206 YYERROR;
2207 }
2208 }
2209 #line 2210 "matcher_parser_parse.c"
2210 break;
2211
2212 case 18: /* instruction: account */
2213 #line 457 "matcher_parser_parse.y"
2214 {
2215 if (matcher_parse_op == MATCHER_PARSE_ACCOUNT)
2216 YYACCEPT;
2217 else {
2218 matcher_parsererror("parse error [account]");
2219 YYERROR;
2220 }
2221 }
2222 #line 2223 "matcher_parser_parse.c"
2223 break;
2224
2225 case 19: /* instruction: name */
2226 #line 466 "matcher_parser_parse.y"
2227 {
2228 if (matcher_parse_op == MATCHER_PARSE_NAME)
2229 YYACCEPT;
2230 else {
2231 matcher_parsererror("parse error [name]");
2232 YYERROR;
2233 }
2234 }
2235 #line 2236 "matcher_parser_parse.c"
2236 break;
2237
2238 case 20: /* instruction: condition */
2239 #line 475 "matcher_parser_parse.y"
2240 {
2241 if (matcher_parse_op == MATCHER_PARSE_CONDITION)
2242 YYACCEPT;
2243 else {
2244 matcher_parsererror("parse error [condition]");
2245 YYERROR;
2246 }
2247 }
2248 #line 2249 "matcher_parser_parse.c"
2249 break;
2250
2251 case 21: /* instruction: filtering_action_list */
2252 #line 484 "matcher_parser_parse.y"
2253 {
2254 if (matcher_parse_op == MATCHER_PARSE_FILTERING_ACTION)
2255 YYACCEPT;
2256 else {
2257 matcher_parsererror("parse error [filtering action]");
2258 YYERROR;
2259 }
2260 }
2261 #line 2262 "matcher_parser_parse.c"
2262 break;
2263
2264 case 23: /* enabled: MATCHER_ENABLED */
2265 #line 497 "matcher_parser_parse.y"
2266 {
2267 enabled = TRUE;
2268 }
2269 #line 2270 "matcher_parser_parse.c"
2270 break;
2271
2272 case 24: /* enabled: MATCHER_DISABLED */
2273 #line 501 "matcher_parser_parse.y"
2274 {
2275 enabled = FALSE;
2276 }
2277 #line 2278 "matcher_parser_parse.c"
2278 break;
2279
2280 case 25: /* name: MATCHER_RULENAME MATCHER_STRING */
2281 #line 508 "matcher_parser_parse.y"
2282 {
2283 name = g_strdup((yyvsp[0].str));
2284 }
2285 #line 2286 "matcher_parser_parse.c"
2286 break;
2287
2288 case 26: /* account: MATCHER_ACCOUNT MATCHER_INTEGER */
2289 #line 515 "matcher_parser_parse.y"
2290 {
2291 account_id = strtol((yyvsp[0].str), NULL, 10);
2292 }
2293 #line 2294 "matcher_parser_parse.c"
2294 break;
2295
2296 case 27: /* filtering: filtering_action_list */
2297 #line 522 "matcher_parser_parse.y"
2298 {
2299 filtering = filteringprop_new(enabled, name, account_id, cond, action_list);
2300 enabled = TRUE;
2301 account_id = 0;
2302 g_free(name);
2303 name = NULL;
2304 if (enable_compatibility) {
2305 prefs_filtering = &filtering_rules;
2306 if (action_list != NULL) {
2307 FilteringAction * first_action;
2308
2309 first_action = action_list->data;
2310
2311 if (first_action->type == MATCHACTION_CHANGE_SCORE)
2312 prefs_filtering = &pre_global_processing;
2313 }
2314 }
2315
2316 cond = NULL;
2317 action_list = NULL;
2318
2319 if ((matcher_parse_op == MATCHER_PARSE_FILE) &&
2320 (prefs_filtering != NULL)) {
2321 *prefs_filtering = g_slist_append(*prefs_filtering,
2322 filtering);
2323 filtering = NULL;
2324 } else if (!filtering_ptr_externally_managed) {
2325 /* If filtering_ptr_externally_managed was TRUE, it
2326 * would mean that some function higher in the stack is
2327 * interested in the data "filtering" is pointing at, so
2328 * we would not free it. That function has to free it itself.
2329 * At the time of writing this, the only function that
2330 * does this is matcher_parser_get_filtering(). */
2331 filteringprop_free(filtering);
2332 filtering = NULL;
2333 }
2334 }
2335 #line 2336 "matcher_parser_parse.c"
2336 break;
2337
2338 case 30: /* filtering_action_b: filtering_action */
2339 #line 568 "matcher_parser_parse.y"
2340 {
2341 action_list = g_slist_append(action_list, action);
2342 action = NULL;
2343 }
2344 #line 2345 "matcher_parser_parse.c"
2345 break;
2346
2347 case 31: /* match_type: MATCHER_MATCHCASE */
2348 #line 576 "matcher_parser_parse.y"
2349 {
2350 match_type = MATCHTYPE_MATCHCASE;
2351 }
2352 #line 2353 "matcher_parser_parse.c"
2353 break;
2354
2355 case 32: /* match_type: MATCHER_MATCH */
2356 #line 580 "matcher_parser_parse.y"
2357 {
2358 match_type = MATCHTYPE_MATCH;
2359 }
2360 #line 2361 "matcher_parser_parse.c"
2361 break;
2362
2363 case 33: /* match_type: MATCHER_REGEXPCASE */
2364 #line 584 "matcher_parser_parse.y"
2365 {
2366 match_type = MATCHTYPE_REGEXPCASE;
2367 }
2368 #line 2369 "matcher_parser_parse.c"
2369 break;
2370
2371 case 34: /* match_type: MATCHER_REGEXP */
2372 #line 588 "matcher_parser_parse.y"
2373 {
2374 match_type = MATCHTYPE_REGEXP;
2375 }
2376 #line 2377 "matcher_parser_parse.c"
2377 break;
2378
2379 case 35: /* condition: condition_list */
2380 #line 595 "matcher_parser_parse.y"
2381 {
2382 cond = matcherlist_new(matchers_list, (bool_op == MATCHERBOOL_AND));
2383 matchers_list = NULL;
2384 }
2385 #line 2386 "matcher_parser_parse.c"
2386 break;
2387
2388 case 36: /* condition_list: condition_list bool_op one_condition */
2389 #line 603 "matcher_parser_parse.y"
2390 {
2391 matchers_list = g_slist_append(matchers_list, prop);
2392 }
2393 #line 2394 "matcher_parser_parse.c"
2394 break;
2395
2396 case 37: /* condition_list: one_condition */
2397 #line 607 "matcher_parser_parse.y"
2398 {
2399 matchers_list = NULL;
2400 matchers_list = g_slist_append(matchers_list, prop);
2401 }
2402 #line 2403 "matcher_parser_parse.c"
2403 break;
2404
2405 case 38: /* bool_op: MATCHER_AND */
2406 #line 615 "matcher_parser_parse.y"
2407 {
2408 bool_op = MATCHERBOOL_AND;
2409 }
2410 #line 2411 "matcher_parser_parse.c"
2411 break;
2412
2413 case 39: /* bool_op: MATCHER_OR */
2414 #line 619 "matcher_parser_parse.y"
2415 {
2416 bool_op = MATCHERBOOL_OR;
2417 }
2418 #line 2419 "matcher_parser_parse.c"
2419 break;
2420
2421 case 40: /* one_condition: MATCHER_ALL */
2422 #line 626 "matcher_parser_parse.y"
2423 {
2424 gint criteria = 0;
2425
2426 criteria = MATCHCRITERIA_ALL;
2427 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2428 }
2429 #line 2430 "matcher_parser_parse.c"
2430 break;
2431
2432 case 41: /* one_condition: MATCHER_UNREAD */
2433 #line 633 "matcher_parser_parse.y"
2434 {
2435 gint criteria = 0;
2436
2437 criteria = MATCHCRITERIA_UNREAD;
2438 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2439 }
2440 #line 2441 "matcher_parser_parse.c"
2441 break;
2442
2443 case 42: /* one_condition: MATCHER_NOT_UNREAD */
2444 #line 640 "matcher_parser_parse.y"
2445 {
2446 gint criteria = 0;
2447
2448 criteria = MATCHCRITERIA_NOT_UNREAD;
2449 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2450 }
2451 #line 2452 "matcher_parser_parse.c"
2452 break;
2453
2454 case 43: /* one_condition: MATCHER_NEW */
2455 #line 647 "matcher_parser_parse.y"
2456 {
2457 gint criteria = 0;
2458
2459 criteria = MATCHCRITERIA_NEW;
2460 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2461 }
2462 #line 2463 "matcher_parser_parse.c"
2463 break;
2464
2465 case 44: /* one_condition: MATCHER_NOT_NEW */
2466 #line 654 "matcher_parser_parse.y"
2467 {
2468 gint criteria = 0;
2469
2470 criteria = MATCHCRITERIA_NOT_NEW;
2471 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2472 }
2473 #line 2474 "matcher_parser_parse.c"
2474 break;
2475
2476 case 45: /* one_condition: MATCHER_MARKED */
2477 #line 661 "matcher_parser_parse.y"
2478 {
2479 gint criteria = 0;
2480
2481 criteria = MATCHCRITERIA_MARKED;
2482 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2483 }
2484 #line 2485 "matcher_parser_parse.c"
2485 break;
2486
2487 case 46: /* one_condition: MATCHER_NOT_MARKED */
2488 #line 668 "matcher_parser_parse.y"
2489 {
2490 gint criteria = 0;
2491
2492 criteria = MATCHCRITERIA_NOT_MARKED;
2493 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2494 }
2495 #line 2496 "matcher_parser_parse.c"
2496 break;
2497
2498 case 47: /* one_condition: MATCHER_DELETED */
2499 #line 675 "matcher_parser_parse.y"
2500 {
2501 gint criteria = 0;
2502
2503 criteria = MATCHCRITERIA_DELETED;
2504 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2505 }
2506 #line 2507 "matcher_parser_parse.c"
2507 break;
2508
2509 case 48: /* one_condition: MATCHER_NOT_DELETED */
2510 #line 682 "matcher_parser_parse.y"
2511 {
2512 gint criteria = 0;
2513
2514 criteria = MATCHCRITERIA_NOT_DELETED;
2515 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2516 }
2517 #line 2518 "matcher_parser_parse.c"
2518 break;
2519
2520 case 49: /* one_condition: MATCHER_REPLIED */
2521 #line 689 "matcher_parser_parse.y"
2522 {
2523 gint criteria = 0;
2524
2525 criteria = MATCHCRITERIA_REPLIED;
2526 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2527 }
2528 #line 2529 "matcher_parser_parse.c"
2529 break;
2530
2531 case 50: /* one_condition: MATCHER_NOT_REPLIED */
2532 #line 696 "matcher_parser_parse.y"
2533 {
2534 gint criteria = 0;
2535
2536 criteria = MATCHCRITERIA_NOT_REPLIED;
2537 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2538 }
2539 #line 2540 "matcher_parser_parse.c"
2540 break;
2541
2542 case 51: /* one_condition: MATCHER_FORWARDED */
2543 #line 703 "matcher_parser_parse.y"
2544 {
2545 gint criteria = 0;
2546
2547 criteria = MATCHCRITERIA_FORWARDED;
2548 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2549 }
2550 #line 2551 "matcher_parser_parse.c"
2551 break;
2552
2553 case 52: /* one_condition: MATCHER_NOT_FORWARDED */
2554 #line 710 "matcher_parser_parse.y"
2555 {
2556 gint criteria = 0;
2557
2558 criteria = MATCHCRITERIA_NOT_FORWARDED;
2559 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2560 }
2561 #line 2562 "matcher_parser_parse.c"
2562 break;
2563
2564 case 53: /* one_condition: MATCHER_LOCKED */
2565 #line 717 "matcher_parser_parse.y"
2566 {
2567 gint criteria = 0;
2568
2569 criteria = MATCHCRITERIA_LOCKED;
2570 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2571 }
2572 #line 2573 "matcher_parser_parse.c"
2573 break;
2574
2575 case 54: /* one_condition: MATCHER_NOT_LOCKED */
2576 #line 724 "matcher_parser_parse.y"
2577 {
2578 gint criteria = 0;
2579
2580 criteria = MATCHCRITERIA_NOT_LOCKED;
2581 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2582 }
2583 #line 2584 "matcher_parser_parse.c"
2584 break;
2585
2586 case 55: /* one_condition: MATCHER_SPAM */
2587 #line 731 "matcher_parser_parse.y"
2588 {
2589 gint criteria = 0;
2590
2591 criteria = MATCHCRITERIA_SPAM;
2592 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2593 }
2594 #line 2595 "matcher_parser_parse.c"
2595 break;
2596
2597 case 56: /* one_condition: MATCHER_NOT_SPAM */
2598 #line 738 "matcher_parser_parse.y"
2599 {
2600 gint criteria = 0;
2601
2602 criteria = MATCHCRITERIA_NOT_SPAM;
2603 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2604 }
2605 #line 2606 "matcher_parser_parse.c"
2606 break;
2607
2608 case 57: /* one_condition: MATCHER_HAS_ATTACHMENT */
2609 #line 745 "matcher_parser_parse.y"
2610 {
2611 gint criteria = 0;
2612
2613 criteria = MATCHCRITERIA_HAS_ATTACHMENT;
2614 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2615 }
2616 #line 2617 "matcher_parser_parse.c"
2617 break;
2618
2619 case 58: /* one_condition: MATCHER_HAS_NO_ATTACHMENT */
2620 #line 752 "matcher_parser_parse.y"
2621 {
2622 gint criteria = 0;
2623
2624 criteria = MATCHCRITERIA_HAS_NO_ATTACHMENT;
2625 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2626 }
2627 #line 2628 "matcher_parser_parse.c"
2628 break;
2629
2630 case 59: /* one_condition: MATCHER_SIGNED */
2631 #line 759 "matcher_parser_parse.y"
2632 {
2633 gint criteria = 0;
2634
2635 criteria = MATCHCRITERIA_SIGNED;
2636 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2637 }
2638 #line 2639 "matcher_parser_parse.c"
2639 break;
2640
2641 case 60: /* one_condition: MATCHER_NOT_SIGNED */
2642 #line 766 "matcher_parser_parse.y"
2643 {
2644 gint criteria = 0;
2645
2646 criteria = MATCHCRITERIA_NOT_SIGNED;
2647 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2648 }
2649 #line 2650 "matcher_parser_parse.c"
2650 break;
2651
2652 case 61: /* one_condition: MATCHER_PARTIAL */
2653 #line 773 "matcher_parser_parse.y"
2654 {
2655 gint criteria = 0;
2656
2657 criteria = MATCHCRITERIA_PARTIAL;
2658 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2659 }
2660 #line 2661 "matcher_parser_parse.c"
2661 break;
2662
2663 case 62: /* one_condition: MATCHER_NOT_PARTIAL */
2664 #line 780 "matcher_parser_parse.y"
2665 {
2666 gint criteria = 0;
2667
2668 criteria = MATCHCRITERIA_NOT_PARTIAL;
2669 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2670 }
2671 #line 2672 "matcher_parser_parse.c"
2672 break;
2673
2674 case 63: /* one_condition: MATCHER_COLORLABEL MATCHER_INTEGER */
2675 #line 787 "matcher_parser_parse.y"
2676 {
2677 gint criteria = 0;
2678 gint value = 0;
2679
2680 criteria = MATCHCRITERIA_COLORLABEL;
2681 value = strtol((yyvsp[0].str), NULL, 10);
2682 if (value < 0) value = 0;
2683 else if (value > COLORLABELS) value = COLORLABELS;
2684 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
2685 }
2686 #line 2687 "matcher_parser_parse.c"
2687 break;
2688
2689 case 64: /* one_condition: MATCHER_NOT_COLORLABEL MATCHER_INTEGER */
2690 #line 798 "matcher_parser_parse.y"
2691 {
2692 gint criteria = 0;
2693 gint value = 0;
2694
2695 criteria = MATCHCRITERIA_NOT_COLORLABEL;
2696 value = strtol((yyvsp[0].str), NULL, 0);
2697 if (value < 0) value = 0;
2698 else if (value > COLORLABELS) value = COLORLABELS;
2699 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
2700 }
2701 #line 2702 "matcher_parser_parse.c"
2702 break;
2703
2704 case 65: /* one_condition: MATCHER_IGNORE_THREAD */
2705 #line 809 "matcher_parser_parse.y"
2706 {
2707 gint criteria = 0;
2708
2709 criteria = MATCHCRITERIA_IGNORE_THREAD;
2710 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2711 }
2712 #line 2713 "matcher_parser_parse.c"
2713 break;
2714
2715 case 66: /* one_condition: MATCHER_NOT_IGNORE_THREAD */
2716 #line 816 "matcher_parser_parse.y"
2717 {
2718 gint criteria = 0;
2719
2720 criteria = MATCHCRITERIA_NOT_IGNORE_THREAD;
2721 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2722 }
2723 #line 2724 "matcher_parser_parse.c"
2724 break;
2725
2726 case 67: /* one_condition: MATCHER_WATCH_THREAD */
2727 #line 823 "matcher_parser_parse.y"
2728 {
2729 gint criteria = 0;
2730
2731 criteria = MATCHCRITERIA_WATCH_THREAD;
2732 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2733 }
2734 #line 2735 "matcher_parser_parse.c"
2735 break;
2736
2737 case 68: /* one_condition: MATCHER_NOT_WATCH_THREAD */
2738 #line 830 "matcher_parser_parse.y"
2739 {
2740 gint criteria = 0;
2741
2742 criteria = MATCHCRITERIA_NOT_WATCH_THREAD;
2743 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2744 }
2745 #line 2746 "matcher_parser_parse.c"
2746 break;
2747
2748 case 69: /* one_condition: MATCHER_SUBJECT match_type MATCHER_STRING */
2749 #line 837 "matcher_parser_parse.y"
2750 {
2751 gint criteria = 0;
2752 gchar *expr = NULL;
2753
2754 criteria = MATCHCRITERIA_SUBJECT;
2755 expr = (yyvsp[0].str);
2756 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2757 }
2758 #line 2759 "matcher_parser_parse.c"
2759 break;
2760
2761 case 70: /* one_condition: MATCHER_NOT_SUBJECT match_type MATCHER_STRING */
2762 #line 846 "matcher_parser_parse.y"
2763 {
2764 gint criteria = 0;
2765 gchar *expr = NULL;
2766
2767 criteria = MATCHCRITERIA_NOT_SUBJECT;
2768 expr = (yyvsp[0].str);
2769 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2770 }
2771 #line 2772 "matcher_parser_parse.c"
2772 break;
2773
2774 case 71: /* one_condition: MATCHER_FROM match_type MATCHER_STRING */
2775 #line 855 "matcher_parser_parse.y"
2776 {
2777 gint criteria = 0;
2778 gchar *expr = NULL;
2779
2780 criteria = MATCHCRITERIA_FROM;
2781 expr = (yyvsp[0].str);
2782 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2783 }
2784 #line 2785 "matcher_parser_parse.c"
2785 break;
2786
2787 case 72: /* one_condition: MATCHER_NOT_FROM match_type MATCHER_STRING */
2788 #line 864 "matcher_parser_parse.y"
2789 {
2790 gint criteria = 0;
2791 gchar *expr = NULL;
2792
2793 criteria = MATCHCRITERIA_NOT_FROM;
2794 expr = (yyvsp[0].str);
2795 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2796 }
2797 #line 2798 "matcher_parser_parse.c"
2798 break;
2799
2800 case 73: /* one_condition: MATCHER_TO match_type MATCHER_STRING */
2801 #line 873 "matcher_parser_parse.y"
2802 {
2803 gint criteria = 0;
2804 gchar *expr = NULL;
2805
2806 criteria = MATCHCRITERIA_TO;
2807 expr = (yyvsp[0].str);
2808 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2809 }
2810 #line 2811 "matcher_parser_parse.c"
2811 break;
2812
2813 case 74: /* one_condition: MATCHER_NOT_TO match_type MATCHER_STRING */
2814 #line 882 "matcher_parser_parse.y"
2815 {
2816 gint criteria = 0;
2817 gchar *expr = NULL;
2818
2819 criteria = MATCHCRITERIA_NOT_TO;
2820 expr = (yyvsp[0].str);
2821 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2822 }
2823 #line 2824 "matcher_parser_parse.c"
2824 break;
2825
2826 case 75: /* one_condition: MATCHER_CC match_type MATCHER_STRING */
2827 #line 891 "matcher_parser_parse.y"
2828 {
2829 gint criteria = 0;
2830 gchar *expr = NULL;
2831
2832 criteria = MATCHCRITERIA_CC;
2833 expr = (yyvsp[0].str);
2834 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2835 }
2836 #line 2837 "matcher_parser_parse.c"
2837 break;
2838
2839 case 76: /* one_condition: MATCHER_NOT_CC match_type MATCHER_STRING */
2840 #line 900 "matcher_parser_parse.y"
2841 {
2842 gint criteria = 0;
2843 gchar *expr = NULL;
2844
2845 criteria = MATCHCRITERIA_NOT_CC;
2846 expr = (yyvsp[0].str);
2847 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2848 }
2849 #line 2850 "matcher_parser_parse.c"
2850 break;
2851
2852 case 77: /* one_condition: MATCHER_TO_OR_CC match_type MATCHER_STRING */
2853 #line 909 "matcher_parser_parse.y"
2854 {
2855 gint criteria = 0;
2856 gchar *expr = NULL;
2857
2858 criteria = MATCHCRITERIA_TO_OR_CC;
2859 expr = (yyvsp[0].str);
2860 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2861 }
2862 #line 2863 "matcher_parser_parse.c"
2863 break;
2864
2865 case 78: /* one_condition: MATCHER_NOT_TO_AND_NOT_CC match_type MATCHER_STRING */
2866 #line 918 "matcher_parser_parse.y"
2867 {
2868 gint criteria = 0;
2869 gchar *expr = NULL;
2870
2871 criteria = MATCHCRITERIA_NOT_TO_AND_NOT_CC;
2872 expr = (yyvsp[0].str);
2873 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2874 }
2875 #line 2876 "matcher_parser_parse.c"
2876 break;
2877
2878 case 79: /* one_condition: MATCHER_TAG match_type MATCHER_STRING */
2879 #line 927 "matcher_parser_parse.y"
2880 {
2881 gint criteria = 0;
2882 gchar *expr = NULL;
2883
2884 criteria = MATCHCRITERIA_TAG;
2885 expr = (yyvsp[0].str);
2886 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2887 }
2888 #line 2889 "matcher_parser_parse.c"
2889 break;
2890
2891 case 80: /* one_condition: MATCHER_NOT_TAG match_type MATCHER_STRING */
2892 #line 936 "matcher_parser_parse.y"
2893 {
2894 gint criteria = 0;
2895 gchar *expr = NULL;
2896
2897 criteria = MATCHCRITERIA_NOT_TAG;
2898 expr = (yyvsp[0].str);
2899 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
2900 }
2901 #line 2902 "matcher_parser_parse.c"
2902 break;
2903
2904 case 81: /* one_condition: MATCHER_TAGGED */
2905 #line 945 "matcher_parser_parse.y"
2906 {
2907 gint criteria = 0;
2908
2909 criteria = MATCHCRITERIA_TAGGED;
2910 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2911 }
2912 #line 2913 "matcher_parser_parse.c"
2913 break;
2914
2915 case 82: /* one_condition: MATCHER_NOT_TAGGED */
2916 #line 952 "matcher_parser_parse.y"
2917 {
2918 gint criteria = 0;
2919
2920 criteria = MATCHCRITERIA_NOT_TAGGED;
2921 prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
2922 }
2923 #line 2924 "matcher_parser_parse.c"
2924 break;
2925
2926 case 83: /* one_condition: MATCHER_AGE_GREATER MATCHER_INTEGER */
2927 #line 959 "matcher_parser_parse.y"
2928 {
2929 gint criteria = 0;
2930 gint value = 0;
2931
2932 criteria = MATCHCRITERIA_AGE_GREATER;
2933 value = strtol((yyvsp[0].str), NULL, 0);
2934 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
2935 }
2936 #line 2937 "matcher_parser_parse.c"
2937 break;
2938
2939 case 84: /* one_condition: MATCHER_AGE_LOWER MATCHER_INTEGER */
2940 #line 968 "matcher_parser_parse.y"
2941 {
2942 gint criteria = 0;
2943 gint value = 0;
2944
2945 criteria = MATCHCRITERIA_AGE_LOWER;
2946 value = strtol((yyvsp[0].str), NULL, 0);
2947 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
2948 }
2949 #line 2950 "matcher_parser_parse.c"
2950 break;
2951
2952 case 85: /* one_condition: MATCHER_AGE_GREATER_HOURS MATCHER_INTEGER */
2953 #line 977 "matcher_parser_parse.y"
2954 {
2955 gint criteria = 0;
2956 gint value = 0;
2957
2958 criteria = MATCHCRITERIA_AGE_GREATER_HOURS;
2959 value = strtol((yyvsp[0].str), NULL, 0);
2960 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
2961 }
2962 #line 2963 "matcher_parser_parse.c"
2963 break;
2964
2965 case 86: /* one_condition: MATCHER_AGE_LOWER_HOURS MATCHER_INTEGER */
2966 #line 986 "matcher_parser_parse.y"
2967 {
2968 gint criteria = 0;
2969 gint value = 0;
2970
2971 criteria = MATCHCRITERIA_AGE_LOWER_HOURS;
2972 value = strtol((yyvsp[0].str), NULL, 0);
2973 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
2974 }
2975 #line 2976 "matcher_parser_parse.c"
2976 break;
2977
2978 case 87: /* one_condition: MATCHER_DATE_AFTER MATCHER_STRING */
2979 #line 995 "matcher_parser_parse.y"
2980 {
2981 gint criteria = 0;
2982 gchar *expr = NULL;
2983 time_t value;
2984
2985 criteria = MATCHCRITERIA_DATE_AFTER;
2986 expr = (yyvsp[0].str);
2987 value = procheader_date_parse(NULL, expr, 0);
2988 prop = matcherprop_new(criteria, NULL, 0, expr, value);
2989 }
2990 #line 2991 "matcher_parser_parse.c"
2991 break;
2992
2993 case 88: /* one_condition: MATCHER_DATE_BEFORE MATCHER_STRING */
2994 #line 1006 "matcher_parser_parse.y"
2995 {
2996 gint criteria = 0;
2997 gchar *expr = NULL;
2998 time_t value;
2999
3000 criteria = MATCHCRITERIA_DATE_BEFORE;
3001 expr = (yyvsp[0].str);
3002 value = procheader_date_parse(NULL, expr, 0);
3003 prop = matcherprop_new(criteria, NULL, 0, expr, value);
3004 }
3005 #line 3006 "matcher_parser_parse.c"
3006 break;
3007
3008 case 89: /* one_condition: MATCHER_NEWSGROUPS match_type MATCHER_STRING */
3009 #line 1017 "matcher_parser_parse.y"
3010 {
3011 gint criteria = 0;
3012 gchar *expr = NULL;
3013
3014 criteria = MATCHCRITERIA_NEWSGROUPS;
3015 expr = (yyvsp[0].str);
3016 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3017 }
3018 #line 3019 "matcher_parser_parse.c"
3019 break;
3020
3021 case 90: /* one_condition: MATCHER_NOT_NEWSGROUPS match_type MATCHER_STRING */
3022 #line 1026 "matcher_parser_parse.y"
3023 {
3024 gint criteria = 0;
3025 gchar *expr = NULL;
3026
3027 criteria = MATCHCRITERIA_NOT_NEWSGROUPS;
3028 expr = (yyvsp[0].str);
3029 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3030 }
3031 #line 3032 "matcher_parser_parse.c"
3032 break;
3033
3034 case 91: /* one_condition: MATCHER_MESSAGEID match_type MATCHER_STRING */
3035 #line 1035 "matcher_parser_parse.y"
3036 {
3037 gint criteria = 0;
3038 gchar *expr = NULL;
3039
3040 criteria = MATCHCRITERIA_MESSAGEID;
3041 expr = (yyvsp[0].str);
3042 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3043 }
3044 #line 3045 "matcher_parser_parse.c"
3045 break;
3046
3047 case 92: /* one_condition: MATCHER_NOT_MESSAGEID match_type MATCHER_STRING */
3048 #line 1044 "matcher_parser_parse.y"
3049 {
3050 gint criteria = 0;
3051 gchar *expr = NULL;
3052
3053 criteria = MATCHCRITERIA_NOT_MESSAGEID;
3054 expr = (yyvsp[0].str);
3055 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3056 }
3057 #line 3058 "matcher_parser_parse.c"
3058 break;
3059
3060 case 93: /* one_condition: MATCHER_INREPLYTO match_type MATCHER_STRING */
3061 #line 1053 "matcher_parser_parse.y"
3062 {
3063 gint criteria = 0;
3064 gchar *expr = NULL;
3065
3066 criteria = MATCHCRITERIA_INREPLYTO;
3067 expr = (yyvsp[0].str);
3068 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3069 }
3070 #line 3071 "matcher_parser_parse.c"
3071 break;
3072
3073 case 94: /* one_condition: MATCHER_NOT_INREPLYTO match_type MATCHER_STRING */
3074 #line 1062 "matcher_parser_parse.y"
3075 {
3076 gint criteria = 0;
3077 gchar *expr = NULL;
3078
3079 criteria = MATCHCRITERIA_NOT_INREPLYTO;
3080 expr = (yyvsp[0].str);
3081 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3082 }
3083 #line 3084 "matcher_parser_parse.c"
3084 break;
3085
3086 case 95: /* one_condition: MATCHER_REFERENCES match_type MATCHER_STRING */
3087 #line 1071 "matcher_parser_parse.y"
3088 {
3089 gint criteria = 0;
3090 gchar *expr = NULL;
3091
3092 criteria = MATCHCRITERIA_REFERENCES;
3093 expr = (yyvsp[0].str);
3094 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3095 }
3096 #line 3097 "matcher_parser_parse.c"
3097 break;
3098
3099 case 96: /* one_condition: MATCHER_NOT_REFERENCES match_type MATCHER_STRING */
3100 #line 1080 "matcher_parser_parse.y"
3101 {
3102 gint criteria = 0;
3103 gchar *expr = NULL;
3104
3105 criteria = MATCHCRITERIA_NOT_REFERENCES;
3106 expr = (yyvsp[0].str);
3107 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3108 }
3109 #line 3110 "matcher_parser_parse.c"
3110 break;
3111
3112 case 97: /* one_condition: MATCHER_SCORE_GREATER MATCHER_INTEGER */
3113 #line 1089 "matcher_parser_parse.y"
3114 {
3115 gint criteria = 0;
3116 gint value = 0;
3117
3118 criteria = MATCHCRITERIA_SCORE_GREATER;
3119 value = strtol((yyvsp[0].str), NULL, 0);
3120 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
3121 }
3122 #line 3123 "matcher_parser_parse.c"
3123 break;
3124
3125 case 98: /* one_condition: MATCHER_SCORE_LOWER MATCHER_INTEGER */
3126 #line 1098 "matcher_parser_parse.y"
3127 {
3128 gint criteria = 0;
3129 gint value = 0;
3130
3131 criteria = MATCHCRITERIA_SCORE_LOWER;
3132 value = strtol((yyvsp[0].str), NULL, 0);
3133 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
3134 }
3135 #line 3136 "matcher_parser_parse.c"
3136 break;
3137
3138 case 99: /* one_condition: MATCHER_SCORE_EQUAL MATCHER_INTEGER */
3139 #line 1107 "matcher_parser_parse.y"
3140 {
3141 gint criteria = 0;
3142 gint value = 0;
3143
3144 criteria = MATCHCRITERIA_SCORE_EQUAL;
3145 value = strtol((yyvsp[0].str), NULL, 0);
3146 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
3147 }
3148 #line 3149 "matcher_parser_parse.c"
3149 break;
3150
3151 case 100: /* one_condition: MATCHER_SIZE_GREATER MATCHER_INTEGER */
3152 #line 1116 "matcher_parser_parse.y"
3153 {
3154 gint criteria = 0;
3155 gint value = 0;
3156 criteria = MATCHCRITERIA_SIZE_GREATER;
3157 value = strtol((yyvsp[0].str), NULL, 0);
3158 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
3159 }
3160 #line 3161 "matcher_parser_parse.c"
3161 break;
3162
3163 case 101: /* one_condition: MATCHER_SIZE_SMALLER MATCHER_INTEGER */
3164 #line 1124 "matcher_parser_parse.y"
3165 {
3166 gint criteria = 0;
3167 gint value = 0;
3168 criteria = MATCHCRITERIA_SIZE_SMALLER;
3169 value = strtol((yyvsp[0].str), NULL, 0);
3170 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
3171 }
3172 #line 3173 "matcher_parser_parse.c"
3173 break;
3174
3175 case 102: /* one_condition: MATCHER_SIZE_EQUAL MATCHER_INTEGER */
3176 #line 1132 "matcher_parser_parse.y"
3177 {
3178 gint criteria = 0;
3179 gint value = 0;
3180 criteria = MATCHCRITERIA_SIZE_EQUAL;
3181 value = strtol((yyvsp[0].str), NULL, 0);
3182 prop = matcherprop_new(criteria, NULL, 0, NULL, value);
3183 }
3184 #line 3185 "matcher_parser_parse.c"
3185 break;
3186
3187 case 103: /* $@3: %empty */
3188 #line 1140 "matcher_parser_parse.y"
3189 {
3190 header = g_strdup((yyvsp[0].str));
3191 }
3192 #line 3193 "matcher_parser_parse.c"
3193 break;
3194
3195 case 104: /* one_condition: MATCHER_HEADER MATCHER_STRING $@3 match_type MATCHER_STRING */
3196 #line 1143 "matcher_parser_parse.y"
3197 {
3198 gint criteria = 0;
3199 gchar *expr = NULL;
3200 matcher_is_fast = FALSE;
3201 criteria = MATCHCRITERIA_HEADER;
3202 expr = (yyvsp[-3].str);
3203 prop = matcherprop_new(criteria, header, match_type, expr, 0);
3204 g_free(header);
3205 }
3206 #line 3207 "matcher_parser_parse.c"
3207 break;
3208
3209 case 105: /* $@4: %empty */
3210 #line 1153 "matcher_parser_parse.y"
3211 {
3212 header = g_strdup((yyvsp[0].str));
3213 }
3214 #line 3215 "matcher_parser_parse.c"
3215 break;
3216
3217 case 106: /* one_condition: MATCHER_NOT_HEADER MATCHER_STRING $@4 match_type MATCHER_STRING */
3218 #line 1156 "matcher_parser_parse.y"
3219 {
3220 gint criteria = 0;
3221 gchar *expr = NULL;
3222 matcher_is_fast = FALSE;
3223 criteria = MATCHCRITERIA_NOT_HEADER;
3224 expr = (yyvsp[-3].str);
3225 prop = matcherprop_new(criteria, header, match_type, expr, 0);
3226 g_free(header);
3227 }
3228 #line 3229 "matcher_parser_parse.c"
3229 break;
3230
3231 case 107: /* one_condition: MATCHER_HEADERS_PART match_type MATCHER_STRING */
3232 #line 1166 "matcher_parser_parse.y"
3233 {
3234 gint criteria = 0;
3235 gchar *expr = NULL;
3236 matcher_is_fast = FALSE;
3237 criteria = MATCHCRITERIA_HEADERS_PART;
3238 expr = (yyvsp[0].str);
3239 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3240 }
3241 #line 3242 "matcher_parser_parse.c"
3242 break;
3243
3244 case 108: /* one_condition: MATCHER_NOT_HEADERS_PART match_type MATCHER_STRING */
3245 #line 1175 "matcher_parser_parse.y"
3246 {
3247 gint criteria = 0;
3248 gchar *expr = NULL;
3249 matcher_is_fast = FALSE;
3250 criteria = MATCHCRITERIA_NOT_HEADERS_PART;
3251 expr = (yyvsp[0].str);
3252 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3253 }
3254 #line 3255 "matcher_parser_parse.c"
3255 break;
3256
3257 case 109: /* one_condition: MATCHER_HEADERS_CONT match_type MATCHER_STRING */
3258 #line 1184 "matcher_parser_parse.y"
3259 {
3260 gint criteria = 0;
3261 gchar *expr = NULL;
3262 matcher_is_fast = FALSE;
3263 criteria = MATCHCRITERIA_HEADERS_CONT;
3264 expr = (yyvsp[0].str);
3265 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3266 }
3267 #line 3268 "matcher_parser_parse.c"
3268 break;
3269
3270 case 110: /* one_condition: MATCHER_NOT_HEADERS_CONT match_type MATCHER_STRING */
3271 #line 1193 "matcher_parser_parse.y"
3272 {
3273 gint criteria = 0;
3274 gchar *expr = NULL;
3275 matcher_is_fast = FALSE;
3276 criteria = MATCHCRITERIA_NOT_HEADERS_CONT;
3277 expr = (yyvsp[0].str);
3278 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3279 }
3280 #line 3281 "matcher_parser_parse.c"
3281 break;
3282
3283 case 111: /* $@5: %empty */
3284 #line 1202 "matcher_parser_parse.y"
3285 {
3286 header = g_strdup((yyvsp[0].str));
3287 }
3288 #line 3289 "matcher_parser_parse.c"
3289 break;
3290
3291 case 112: /* one_condition: MATCHER_FOUND_IN_ADDRESSBOOK MATCHER_STRING $@5 MATCHER_IN MATCHER_STRING */
3292 #line 1205 "matcher_parser_parse.y"
3293 {
3294 gint criteria = 0;
3295 gchar *expr = NULL;
3296
3297 criteria = MATCHCRITERIA_FOUND_IN_ADDRESSBOOK;
3298 expr = (yyvsp[-3].str);
3299 prop = matcherprop_new(criteria, header, match_type, expr, 0);
3300 g_free(header);
3301 }
3302 #line 3303 "matcher_parser_parse.c"
3303 break;
3304
3305 case 113: /* $@6: %empty */
3306 #line 1215 "matcher_parser_parse.y"
3307 {
3308 header = g_strdup((yyvsp[0].str));
3309 }
3310 #line 3311 "matcher_parser_parse.c"
3311 break;
3312
3313 case 114: /* one_condition: MATCHER_NOT_FOUND_IN_ADDRESSBOOK MATCHER_STRING $@6 MATCHER_IN MATCHER_STRING */
3314 #line 1218 "matcher_parser_parse.y"
3315 {
3316 gint criteria = 0;
3317 gchar *expr = NULL;
3318
3319 criteria = MATCHCRITERIA_NOT_FOUND_IN_ADDRESSBOOK;
3320 expr = (yyvsp[-3].str);
3321 prop = matcherprop_new(criteria, header, match_type, expr, 0);
3322 g_free(header);
3323 }
3324 #line 3325 "matcher_parser_parse.c"
3325 break;
3326
3327 case 115: /* one_condition: MATCHER_MESSAGE match_type MATCHER_STRING */
3328 #line 1228 "matcher_parser_parse.y"
3329 {
3330 gint criteria = 0;
3331 gchar *expr = NULL;
3332 matcher_is_fast = FALSE;
3333 criteria = MATCHCRITERIA_MESSAGE;
3334 expr = (yyvsp[0].str);
3335 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3336 }
3337 #line 3338 "matcher_parser_parse.c"
3338 break;
3339
3340 case 116: /* one_condition: MATCHER_NOT_MESSAGE match_type MATCHER_STRING */
3341 #line 1237 "matcher_parser_parse.y"
3342 {
3343 gint criteria = 0;
3344 gchar *expr = NULL;
3345 matcher_is_fast = FALSE;
3346 criteria = MATCHCRITERIA_NOT_MESSAGE;
3347 expr = (yyvsp[0].str);
3348 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3349 }
3350 #line 3351 "matcher_parser_parse.c"
3351 break;
3352
3353 case 117: /* one_condition: MATCHER_BODY_PART match_type MATCHER_STRING */
3354 #line 1246 "matcher_parser_parse.y"
3355 {
3356 gint criteria = 0;
3357 gchar *expr = NULL;
3358 matcher_is_fast = FALSE;
3359 criteria = MATCHCRITERIA_BODY_PART;
3360 expr = (yyvsp[0].str);
3361 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3362 }
3363 #line 3364 "matcher_parser_parse.c"
3364 break;
3365
3366 case 118: /* one_condition: MATCHER_NOT_BODY_PART match_type MATCHER_STRING */
3367 #line 1255 "matcher_parser_parse.y"
3368 {
3369 gint criteria = 0;
3370 gchar *expr = NULL;
3371 matcher_is_fast = FALSE;
3372 criteria = MATCHCRITERIA_NOT_BODY_PART;
3373 expr = (yyvsp[0].str);
3374 prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
3375 }
3376 #line 3377 "matcher_parser_parse.c"
3377 break;
3378
3379 case 119: /* one_condition: MATCHER_TEST MATCHER_STRING */
3380 #line 1264 "matcher_parser_parse.y"
3381 {
3382 gint criteria = 0;
3383 gchar *expr = NULL;
3384 matcher_is_fast = FALSE;
3385 criteria = MATCHCRITERIA_TEST;
3386 expr = (yyvsp[0].str);
3387 prop = matcherprop_new(criteria, NULL, MATCHTYPE_MATCH, expr, 0);
3388 }
3389 #line 3390 "matcher_parser_parse.c"
3390 break;
3391
3392 case 120: /* one_condition: MATCHER_NOT_TEST MATCHER_STRING */
3393 #line 1273 "matcher_parser_parse.y"
3394 {
3395 gint criteria = 0;
3396 gchar *expr = NULL;
3397 matcher_is_fast = FALSE;
3398 criteria = MATCHCRITERIA_NOT_TEST;
3399 expr = (yyvsp[0].str);
3400 prop = matcherprop_new(criteria, NULL, MATCHTYPE_MATCH, expr, 0);
3401 }
3402 #line 3403 "matcher_parser_parse.c"
3403 break;
3404
3405 case 121: /* filtering_action: MATCHER_EXECUTE MATCHER_STRING */
3406 #line 1285 "matcher_parser_parse.y"
3407 {
3408 gchar *cmd = NULL;
3409 gint action_type = 0;
3410
3411 action_type = MATCHACTION_EXECUTE;
3412 cmd = (yyvsp[0].str);
3413 action = filteringaction_new(action_type, 0, cmd, 0, 0, NULL);
3414 }
3415 #line 3416 "matcher_parser_parse.c"
3416 break;
3417
3418 case 122: /* filtering_action: MATCHER_MOVE MATCHER_STRING */
3419 #line 1294 "matcher_parser_parse.y"
3420 {
3421 gchar *destination = NULL;
3422 gint action_type = 0;
3423
3424 action_type = MATCHACTION_MOVE;
3425 destination = (yyvsp[0].str);
3426 action = filteringaction_new(action_type, 0, destination, 0, 0, NULL);
3427 }
3428 #line 3429 "matcher_parser_parse.c"
3429 break;
3430
3431 case 123: /* filtering_action: MATCHER_SET_TAG MATCHER_STRING */
3432 #line 1303 "matcher_parser_parse.y"
3433 {
3434 gchar *destination = NULL;
3435 gint action_type = 0;
3436
3437 action_type = MATCHACTION_SET_TAG;
3438 destination = (yyvsp[0].str);
3439 action = filteringaction_new(action_type, 0, destination, 0, 0, NULL);
3440 }
3441 #line 3442 "matcher_parser_parse.c"
3442 break;
3443
3444 case 124: /* filtering_action: MATCHER_UNSET_TAG MATCHER_STRING */
3445 #line 1312 "matcher_parser_parse.y"
3446 {
3447 gchar *destination = NULL;
3448 gint action_type = 0;
3449
3450 action_type = MATCHACTION_UNSET_TAG;
3451 destination = (yyvsp[0].str);
3452 action = filteringaction_new(action_type, 0, destination, 0, 0, NULL);
3453 }
3454 #line 3455 "matcher_parser_parse.c"
3455 break;
3456
3457 case 125: /* filtering_action: MATCHER_CLEAR_TAGS */
3458 #line 1321 "matcher_parser_parse.y"
3459 {
3460 gint action_type = 0;
3461
3462 action_type = MATCHACTION_CLEAR_TAGS;
3463 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3464 }
3465 #line 3466 "matcher_parser_parse.c"
3466 break;
3467
3468 case 126: /* filtering_action: MATCHER_COPY MATCHER_STRING */
3469 #line 1328 "matcher_parser_parse.y"
3470 {
3471 gchar *destination = NULL;
3472 gint action_type = 0;
3473
3474 action_type = MATCHACTION_COPY;
3475 destination = (yyvsp[0].str);
3476 action = filteringaction_new(action_type, 0, destination, 0, 0, NULL);
3477 }
3478 #line 3479 "matcher_parser_parse.c"
3479 break;
3480
3481 case 127: /* filtering_action: MATCHER_DELETE */
3482 #line 1337 "matcher_parser_parse.y"
3483 {
3484 gint action_type = 0;
3485
3486 action_type = MATCHACTION_DELETE;
3487 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3488 }
3489 #line 3490 "matcher_parser_parse.c"
3490 break;
3491
3492 case 128: /* filtering_action: MATCHER_MARK */
3493 #line 1344 "matcher_parser_parse.y"
3494 {
3495 gint action_type = 0;
3496
3497 action_type = MATCHACTION_MARK;
3498 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3499 }
3500 #line 3501 "matcher_parser_parse.c"
3501 break;
3502
3503 case 129: /* filtering_action: MATCHER_UNMARK */
3504 #line 1351 "matcher_parser_parse.y"
3505 {
3506 gint action_type = 0;
3507
3508 action_type = MATCHACTION_UNMARK;
3509 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3510 }
3511 #line 3512 "matcher_parser_parse.c"
3512 break;
3513
3514 case 130: /* filtering_action: MATCHER_LOCK */
3515 #line 1358 "matcher_parser_parse.y"
3516 {
3517 gint action_type = 0;
3518
3519 action_type = MATCHACTION_LOCK;
3520 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3521 }
3522 #line 3523 "matcher_parser_parse.c"
3523 break;
3524
3525 case 131: /* filtering_action: MATCHER_UNLOCK */
3526 #line 1365 "matcher_parser_parse.y"
3527 {
3528 gint action_type = 0;
3529
3530 action_type = MATCHACTION_UNLOCK;
3531 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3532 }
3533 #line 3534 "matcher_parser_parse.c"
3534 break;
3535
3536 case 132: /* filtering_action: MATCHER_MARK_AS_READ */
3537 #line 1372 "matcher_parser_parse.y"
3538 {
3539 gint action_type = 0;
3540
3541 action_type = MATCHACTION_MARK_AS_READ;
3542 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3543 }
3544 #line 3545 "matcher_parser_parse.c"
3545 break;
3546
3547 case 133: /* filtering_action: MATCHER_MARK_AS_UNREAD */
3548 #line 1379 "matcher_parser_parse.y"
3549 {
3550 gint action_type = 0;
3551
3552 action_type = MATCHACTION_MARK_AS_UNREAD;
3553 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3554 }
3555 #line 3556 "matcher_parser_parse.c"
3556 break;
3557
3558 case 134: /* filtering_action: MATCHER_MARK_AS_SPAM */
3559 #line 1386 "matcher_parser_parse.y"
3560 {
3561 gint action_type = 0;
3562
3563 action_type = MATCHACTION_MARK_AS_SPAM;
3564 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3565 }
3566 #line 3567 "matcher_parser_parse.c"
3567 break;
3568
3569 case 135: /* filtering_action: MATCHER_MARK_AS_HAM */
3570 #line 1393 "matcher_parser_parse.y"
3571 {
3572 gint action_type = 0;
3573
3574 action_type = MATCHACTION_MARK_AS_HAM;
3575 action = filteringaction_new(action_type, 0, NULL, 0, 0, NULL);
3576 }
3577 #line 3578 "matcher_parser_parse.c"
3578 break;
3579
3580 case 136: /* filtering_action: MATCHER_FORWARD MATCHER_INTEGER MATCHER_STRING */
3581 #line 1400 "matcher_parser_parse.y"
3582 {
3583 gchar *destination = NULL;
3584 gint action_type = 0;
3585 gint account_id = 0;
3586
3587 action_type = MATCHACTION_FORWARD;
3588 account_id = strtol((yyvsp[-1].str), NULL, 10);
3589 destination = (yyvsp[0].str);
3590 action = filteringaction_new(action_type,
3591 account_id, destination, 0, 0, NULL);
3592 }
3593 #line 3594 "matcher_parser_parse.c"
3594 break;
3595
3596 case 137: /* filtering_action: MATCHER_FORWARD_AS_ATTACHMENT MATCHER_INTEGER MATCHER_STRING */
3597 #line 1412 "matcher_parser_parse.y"
3598 {
3599 gchar *destination = NULL;
3600 gint action_type = 0;
3601 gint account_id = 0;
3602
3603 action_type = MATCHACTION_FORWARD_AS_ATTACHMENT;
3604 account_id = strtol((yyvsp[-1].str), NULL, 10);
3605 destination = (yyvsp[0].str);
3606 action = filteringaction_new(action_type,
3607 account_id, destination, 0, 0, NULL);
3608 }
3609 #line 3610 "matcher_parser_parse.c"
3610 break;
3611
3612 case 138: /* filtering_action: MATCHER_REDIRECT MATCHER_INTEGER MATCHER_STRING */
3613 #line 1424 "matcher_parser_parse.y"
3614 {
3615 gchar *destination = NULL;
3616 gint action_type = 0;
3617 gint account_id = 0;
3618
3619 action_type = MATCHACTION_REDIRECT;
3620 account_id = strtol((yyvsp[-1].str), NULL, 10);
3621 destination = (yyvsp[0].str);
3622 action = filteringaction_new(action_type,
3623 account_id, destination, 0, 0, NULL);
3624 }
3625 #line 3626 "matcher_parser_parse.c"
3626 break;
3627
3628 case 139: /* filtering_action: MATCHER_COLOR MATCHER_INTEGER */
3629 #line 1436 "matcher_parser_parse.y"
3630 {
3631 gint action_type = 0;
3632 gint color = 0;
3633
3634 action_type = MATCHACTION_COLOR;
3635 color = strtol((yyvsp[0].str), NULL, 10);
3636 action = filteringaction_new(action_type, 0, NULL, color, 0, NULL);
3637 }
3638 #line 3639 "matcher_parser_parse.c"
3639 break;
3640
3641 case 140: /* filtering_action: MATCHER_CHANGE_SCORE MATCHER_INTEGER */
3642 #line 1445 "matcher_parser_parse.y"
3643 {
3644 gint score = 0;
3645
3646 score = strtol((yyvsp[0].str), NULL, 10);
3647 action = filteringaction_new(MATCHACTION_CHANGE_SCORE, 0,
3648 NULL, 0, score, NULL);
3649 }
3650 #line 3651 "matcher_parser_parse.c"
3651 break;
3652
3653 case 141: /* filtering_action: MATCHER_SCORE MATCHER_INTEGER */
3654 #line 1454 "matcher_parser_parse.y"
3655 {
3656 gint score = 0;
3657
3658 score = strtol((yyvsp[0].str), NULL, 10);
3659 action = filteringaction_new(MATCHACTION_CHANGE_SCORE, 0,
3660 NULL, 0, score, NULL);
3661 }
3662 #line 3663 "matcher_parser_parse.c"
3663 break;
3664
3665 case 142: /* filtering_action: MATCHER_SET_SCORE MATCHER_INTEGER */
3666 #line 1462 "matcher_parser_parse.y"
3667 {
3668 gint score = 0;
3669
3670 score = strtol((yyvsp[0].str), NULL, 10);
3671 action = filteringaction_new(MATCHACTION_SET_SCORE, 0,
3672 NULL, 0, score, NULL);
3673 }
3674 #line 3675 "matcher_parser_parse.c"
3675 break;
3676
3677 case 143: /* filtering_action: MATCHER_HIDE */
3678 #line 1470 "matcher_parser_parse.y"
3679 {
3680 action = filteringaction_new(MATCHACTION_HIDE, 0, NULL, 0, 0, NULL);
3681 }
3682 #line 3683 "matcher_parser_parse.c"
3683 break;
3684
3685 case 144: /* filtering_action: MATCHER_IGNORE */
3686 #line 1474 "matcher_parser_parse.y"
3687 {
3688 action = filteringaction_new(MATCHACTION_IGNORE, 0, NULL, 0, 0, NULL);
3689 }
3690 #line 3691 "matcher_parser_parse.c"
3691 break;
3692
3693 case 145: /* filtering_action: MATCHER_WATCH */
3694 #line 1478 "matcher_parser_parse.y"
3695 {
3696 action = filteringaction_new(MATCHACTION_WATCH, 0, NULL, 0, 0, NULL);
3697 }
3698 #line 3699 "matcher_parser_parse.c"
3699 break;
3700
3701 case 146: /* $@7: %empty */
3702 #line 1482 "matcher_parser_parse.y"
3703 {
3704 header = g_strdup((yyvsp[0].str));
3705 }
3706 #line 3707 "matcher_parser_parse.c"
3707 break;
3708
3709 case 147: /* filtering_action: MATCHER_ADD_TO_ADDRESSBOOK MATCHER_STRING $@7 MATCHER_STRING */
3710 #line 1485 "matcher_parser_parse.y"
3711 {
3712 gchar *addressbook = NULL;
3713 gint action_type = 0;
3714
3715 action_type = MATCHACTION_ADD_TO_ADDRESSBOOK;
3716 addressbook = (yyvsp[-2].str);
3717 action = filteringaction_new(action_type, 0, addressbook, 0, 0, header);
3718 g_free(header);
3719 }
3720 #line 3721 "matcher_parser_parse.c"
3721 break;
3722
3723 case 148: /* filtering_action: MATCHER_STOP */
3724 #line 1495 "matcher_parser_parse.y"
3725 {
3726 action = filteringaction_new(MATCHACTION_STOP, 0, NULL, 0, 0, NULL);
3727 }
3728 #line 3729 "matcher_parser_parse.c"
3729 break;
3730
3731
3732 #line 3733 "matcher_parser_parse.c"
3733
3734 default: break;
3735 }
3736 /* User semantic actions sometimes alter yychar, and that requires
3737 that yytoken be updated with the new translation. We take the
3738 approach of translating immediately before every use of yytoken.
3739 One alternative is translating here after every semantic action,
3740 but that translation would be missed if the semantic action invokes
3741 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3742 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3743 incorrect destructor might then be invoked immediately. In the
3744 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3745 to an incorrect destructor call or verbose syntax error message
3746 before the lookahead is translated. */
3747 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
3748
3749 YYPOPSTACK (yylen);
3750 yylen = 0;
3751
3752 *++yyvsp = yyval;
3753
3754 /* Now 'shift' the result of the reduction. Determine what state
3755 that goes to, based on the state we popped back to and the rule
3756 number reduced by. */
3757 {
3758 const int yylhs = yyr1[yyn] - YYNTOKENS;
3759 const int yyi = yypgoto[yylhs] + *yyssp;
3760 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
3761 ? yytable[yyi]
3762 : yydefgoto[yylhs]);
3763 }
3764
3765 goto yynewstate;
3766
3767
3768 /*--------------------------------------.
3769 | yyerrlab -- here on detecting error. |
3770 `--------------------------------------*/
3771 yyerrlab:
3772 /* Make sure we have latest lookahead translation. See comments at
3773 user semantic actions for why this is necessary. */
3774 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
3775 /* If not already recovering from an error, report this error. */
3776 if (!yyerrstatus)
3777 {
3778 ++yynerrs;
3779 yyerror (YY_("syntax error"));
3780 }
3781
3782 if (yyerrstatus == 3)
3783 {
3784 /* If just tried and failed to reuse lookahead token after an
3785 error, discard it. */
3786
3787 if (yychar <= YYEOF)
3788 {
3789 /* Return failure if at end of input. */
3790 if (yychar == YYEOF)
3791 YYABORT;
3792 }
3793 else
3794 {
3795 yydestruct ("Error: discarding",
3796 yytoken, &yylval);
3797 yychar = YYEMPTY;
3798 }
3799 }
3800
3801 /* Else will try to reuse lookahead token after shifting the error
3802 token. */
3803 goto yyerrlab1;
3804
3805
3806 /*---------------------------------------------------.
3807 | yyerrorlab -- error raised explicitly by YYERROR. |
3808 `---------------------------------------------------*/
3809 yyerrorlab:
3810 /* Pacify compilers when the user code never invokes YYERROR and the
3811 label yyerrorlab therefore never appears in user code. */
3812 if (0)
3813 YYERROR;
3814
3815 /* Do not reclaim the symbols of the rule whose action triggered
3816 this YYERROR. */
3817 YYPOPSTACK (yylen);
3818 yylen = 0;
3819 YY_STACK_PRINT (yyss, yyssp);
3820 yystate = *yyssp;
3821 goto yyerrlab1;
3822
3823
3824 /*-------------------------------------------------------------.
3825 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3826 `-------------------------------------------------------------*/
3827 yyerrlab1:
3828 yyerrstatus = 3; /* Each real token shifted decrements this. */
3829
3830 /* Pop stack until we find a state that shifts the error token. */
3831 for (;;)
3832 {
3833 yyn = yypact[yystate];
3834 if (!yypact_value_is_default (yyn))
3835 {
3836 yyn += YYSYMBOL_YYerror;
3837 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
3838 {
3839 yyn = yytable[yyn];
3840 if (0 < yyn)
3841 break;
3842 }
3843 }
3844
3845 /* Pop the current state because it cannot handle the error token. */
3846 if (yyssp == yyss)
3847 YYABORT;
3848
3849
3850 yydestruct ("Error: popping",
3851 YY_ACCESSING_SYMBOL (yystate), yyvsp);
3852 YYPOPSTACK (1);
3853 yystate = *yyssp;
3854 YY_STACK_PRINT (yyss, yyssp);
3855 }
3856
3857 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3858 *++yyvsp = yylval;
3859 YY_IGNORE_MAYBE_UNINITIALIZED_END
3860
3861
3862 /* Shift the error token. */
3863 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
3864
3865 yystate = yyn;
3866 goto yynewstate;
3867
3868
3869 /*-------------------------------------.
3870 | yyacceptlab -- YYACCEPT comes here. |
3871 `-------------------------------------*/
3872 yyacceptlab:
3873 yyresult = 0;
3874 goto yyreturn;
3875
3876
3877 /*-----------------------------------.
3878 | yyabortlab -- YYABORT comes here. |
3879 `-----------------------------------*/
3880 yyabortlab:
3881 yyresult = 1;
3882 goto yyreturn;
3883
3884
3885 #if !defined yyoverflow
3886 /*-------------------------------------------------.
3887 | yyexhaustedlab -- memory exhaustion comes here. |
3888 `-------------------------------------------------*/
3889 yyexhaustedlab:
3890 yyerror (YY_("memory exhausted"));
3891 yyresult = 2;
3892 goto yyreturn;
3893 #endif
3894
3895
3896 /*-------------------------------------------------------.
3897 | yyreturn -- parsing is finished, clean up and return. |
3898 `-------------------------------------------------------*/
3899 yyreturn:
3900 if (yychar != YYEMPTY)
3901 {
3902 /* Make sure we have latest lookahead translation. See comments at
3903 user semantic actions for why this is necessary. */
3904 yytoken = YYTRANSLATE (yychar);
3905 yydestruct ("Cleanup: discarding lookahead",
3906 yytoken, &yylval);
3907 }
3908 /* Do not reclaim the symbols of the rule whose action triggered
3909 this YYABORT or YYACCEPT. */
3910 YYPOPSTACK (yylen);
3911 YY_STACK_PRINT (yyss, yyssp);
3912 while (yyssp != yyss)
3913 {
3914 yydestruct ("Cleanup: popping",
3915 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
3916 YYPOPSTACK (1);
3917 }
3918 #ifndef yyoverflow
3919 if (yyss != yyssa)
3920 YYSTACK_FREE (yyss);
3921 #endif
3922
3923 return yyresult;
3924 }
3925
3926