add 'Selective download'
[claws.git] / src / matcher_parser_parse.c
1
2 /*  A Bison parser, made from matcher_parser_parse.y
3     by GNU Bison version 1.28  */
4
5 #define YYBISON 1  /* Identify Bison output.  */
6
7 #define MATCHER_ALL     257
8 #define MATCHER_UNREAD  258
9 #define MATCHER_NOT_UNREAD      259
10 #define MATCHER_NEW     260
11 #define MATCHER_NOT_NEW 261
12 #define MATCHER_MARKED  262
13 #define MATCHER_NOT_MARKED      263
14 #define MATCHER_DELETED 264
15 #define MATCHER_NOT_DELETED     265
16 #define MATCHER_REPLIED 266
17 #define MATCHER_NOT_REPLIED     267
18 #define MATCHER_FORWARDED       268
19 #define MATCHER_NOT_FORWARDED   269
20 #define MATCHER_SUBJECT 270
21 #define MATCHER_NOT_SUBJECT     271
22 #define MATCHER_FROM    272
23 #define MATCHER_NOT_FROM        273
24 #define MATCHER_TO      274
25 #define MATCHER_NOT_TO  275
26 #define MATCHER_CC      276
27 #define MATCHER_NOT_CC  277
28 #define MATCHER_TO_OR_CC        278
29 #define MATCHER_NOT_TO_AND_NOT_CC       279
30 #define MATCHER_AGE_GREATER     280
31 #define MATCHER_AGE_LOWER       281
32 #define MATCHER_NEWSGROUPS      282
33 #define MATCHER_NOT_NEWSGROUPS  283
34 #define MATCHER_INREPLYTO       284
35 #define MATCHER_NOT_INREPLYTO   285
36 #define MATCHER_REFERENCES      286
37 #define MATCHER_NOT_REFERENCES  287
38 #define MATCHER_SCORE_GREATER   288
39 #define MATCHER_SCORE_LOWER     289
40 #define MATCHER_HEADER  290
41 #define MATCHER_NOT_HEADER      291
42 #define MATCHER_HEADERS_PART    292
43 #define MATCHER_NOT_HEADERS_PART        293
44 #define MATCHER_MESSAGE 294
45 #define MATCHER_NOT_MESSAGE     295
46 #define MATCHER_BODY_PART       296
47 #define MATCHER_NOT_BODY_PART   297
48 #define MATCHER_EXECUTE 298
49 #define MATCHER_NOT_EXECUTE     299
50 #define MATCHER_MATCHCASE       300
51 #define MATCHER_MATCH   301
52 #define MATCHER_REGEXPCASE      302
53 #define MATCHER_REGEXP  303
54 #define MATCHER_SCORE   304
55 #define MATCHER_MOVE    305
56 #define MATCHER_COPY    306
57 #define MATCHER_DELETE  307
58 #define MATCHER_MARK    308
59 #define MATCHER_UNMARK  309
60 #define MATCHER_MARK_AS_READ    310
61 #define MATCHER_MARK_AS_UNREAD  311
62 #define MATCHER_FORWARD 312
63 #define MATCHER_FORWARD_AS_ATTACHMENT   313
64 #define MATCHER_EOL     314
65 #define MATCHER_STRING  315
66 #define MATCHER_OR      316
67 #define MATCHER_AND     317
68 #define MATCHER_COLOR   318
69 #define MATCHER_SCORE_EQUAL     319
70 #define MATCHER_BOUNCE  320
71 #define MATCHER_DELETE_ON_SERVER        321
72 #define MATCHER_SECTION 322
73 #define MATCHER_INTEGER 323
74
75 #line 1 "matcher_parser_parse.y"
76
77 #include "filtering.h"
78 #include "scoring.h"
79 #include "matcher.h"
80 #include "matcher_parser.h"
81 #include "matcher_parser_lex.h"
82 #include "intl.h"
83 #include <glib.h>
84 #include "defs.h"
85 #include "utils.h"
86
87 static gint error = 0;
88 static gint bool_op = 0;
89 static gint match_type = 0;
90 static gchar * header = NULL;
91
92 static MatcherProp * prop;
93
94 static GSList * matchers_list = NULL;
95
96 static MatcherList * cond;
97 static gint score = 0;
98 static FilteringAction * action = NULL;
99
100 static FilteringProp *  filtering;
101 static ScoringProp * scoring = NULL;
102
103 static GSList ** prefs_scoring = NULL;
104 static GSList ** prefs_filtering = NULL;
105
106 static int matcher_parser_dialog = 0;
107
108
109 /* ******************************************************************** */
110
111
112
113 void matcher_parser_start_parsing(FILE * f)
114 {
115         matcher_parserrestart(f);
116         matcher_parserparse();
117 }
118  
119 FilteringProp * matcher_parser_get_filtering(gchar * str)
120 {
121         void * bufstate;
122
123         /* bad coding to enable the sub-grammar matching
124            in yacc */
125         matcher_parserlineno = 1;
126         matcher_parser_dialog = 1;
127         bufstate = matcher_parser_scan_string(str);
128         if (matcher_parserparse() != 0)
129                 filtering = NULL;
130         matcher_parser_dialog = 0;
131         matcher_parser_delete_buffer(bufstate);
132         return filtering;
133 }
134
135 ScoringProp * matcher_parser_get_scoring(gchar * str)
136 {
137         void * bufstate;
138
139         /* bad coding to enable the sub-grammar matching
140            in yacc */
141         matcher_parserlineno = 1;
142         matcher_parser_dialog = 1;
143         bufstate = matcher_parser_scan_string(str);
144         if (matcher_parserparse() != 0)
145                 scoring = NULL;
146         matcher_parser_dialog = 0;
147         matcher_parser_delete_buffer(bufstate);
148         return scoring;
149 }
150
151 MatcherList * matcher_parser_get_cond(gchar * str)
152 {
153         void * bufstate;
154
155         /* bad coding to enable the sub-grammar matching
156            in yacc */
157         matcher_parserlineno = 1;
158         matcher_parser_dialog = 1;
159         bufstate = matcher_parser_scan_string(str);
160         matcher_parserparse();
161         matcher_parser_dialog = 0;
162         matcher_parser_delete_buffer(bufstate);
163         return cond;
164 }
165
166 MatcherProp * matcher_parser_get_prop(gchar * str)
167 {
168         MatcherList * list;
169         MatcherProp * prop;
170
171         matcher_parserlineno = 1;
172         list = matcher_parser_get_cond(str);
173         if (list == NULL)
174                 return NULL;
175
176         if (list->matchers == NULL)
177                 return NULL;
178
179         if (list->matchers->next != NULL)
180                 return NULL;
181
182         prop = list->matchers->data;
183
184         g_slist_free(list->matchers);
185         g_free(list);
186
187         return prop;
188 }
189
190 void matcher_parsererror(char * str)
191 {
192         GSList * l;
193
194         if (matchers_list) {
195                 for(l = matchers_list ; l != NULL ;
196                     l = g_slist_next(l))
197                         matcherprop_free((MatcherProp *)
198                                          l->data);
199                 g_slist_free(matchers_list);
200                 matchers_list = NULL;
201         }
202
203         g_warning(_("scoring / filtering parsing: %i: %s\n"),
204                   matcher_parserlineno, str);
205         error = 1;
206 }
207
208 int matcher_parserwrap(void)
209 {
210         return 1;
211 }
212
213 #line 139 "matcher_parser_parse.y"
214 typedef union {
215         char * str;
216         int value;
217 } YYSTYPE;
218 #include <stdio.h>
219
220 #ifndef __cplusplus
221 #ifndef __STDC__
222 #define const
223 #endif
224 #endif
225
226
227
228 #define YYFINAL         159
229 #define YYFLAG          -32768
230 #define YYNTBASE        70
231
232 #define YYTRANSLATE(x) ((unsigned)(x) <= 323 ? yytranslate[x] : 88)
233
234 static const char yytranslate[] = {     0,
235      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
236      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
237      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
238      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
239      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
240      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
241      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
242      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
243      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
244      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
245      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
246      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
247      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
248      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
249      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
250      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
251      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
252      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
253      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
254      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
255      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
256      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
257      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
258      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
259      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
260      2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
261      7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
262     17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
263     27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
264     37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
265     47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
266     57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
267     67,    68,    69
268 };
269
270 #if YYDEBUG != 0
271 static const short yyprhs[] = {     0,
272      0,     1,     4,     7,     9,    11,    13,    16,    19,    22,
273     24,    27,    28,    30,    31,    33,    35,    37,    39,    41,
274     43,    45,    49,    51,    53,    55,    57,    59,    61,    63,
275     65,    67,    69,    71,    73,    75,    77,    79,    81,    85,
276     89,    93,    97,   101,   105,   109,   113,   117,   121,   124,
277    127,   131,   135,   139,   143,   147,   151,   154,   157,   160,
278    161,   167,   168,   174,   178,   182,   186,   190,   194,   198,
279    201,   204,   207,   210,   213,   215,   217,   219,   221,   223,
280    227,   231,   235,   238,   240
281 };
282
283 static const short yyrhs[] = {    -1,
284     71,    72,     0,    73,    72,     0,    73,     0,    74,     0,
285     75,     0,     1,    60,     0,    68,    60,     0,    80,    76,
286      0,    60,     0,    78,    77,     0,     0,    60,     0,     0,
287     86,     0,    87,     0,    46,     0,    47,     0,    48,     0,
288     49,     0,    81,     0,    81,    82,    83,     0,    83,     0,
289     63,     0,    62,     0,     3,     0,     4,     0,     5,     0,
290      6,     0,     7,     0,     8,     0,     9,     0,    10,     0,
291     11,     0,    12,     0,    13,     0,    14,     0,    15,     0,
292     16,    79,    61,     0,    17,    79,    61,     0,    18,    79,
293     61,     0,    19,    79,    61,     0,    20,    79,    61,     0,
294     21,    79,    61,     0,    22,    79,    61,     0,    23,    79,
295     61,     0,    24,    79,    61,     0,    25,    79,    61,     0,
296     26,    69,     0,    27,    69,     0,    28,    79,    61,     0,
297     29,    79,    61,     0,    30,    79,    61,     0,    31,    79,
298     61,     0,    32,    79,    61,     0,    33,    79,    61,     0,
299     34,    69,     0,    35,    69,     0,    65,    69,     0,     0,
300     36,    61,    84,    79,    61,     0,     0,    37,    61,    85,
301     79,    61,     0,    38,    79,    61,     0,    39,    79,    61,
302      0,    40,    79,    61,     0,    41,    79,    61,     0,    42,
303     79,    61,     0,    43,    79,    61,     0,    44,    61,     0,
304     45,    61,     0,    44,    61,     0,    51,    61,     0,    52,
305     61,     0,    53,     0,    54,     0,    55,     0,    56,     0,
306     57,     0,    58,    69,    61,     0,    59,    69,    61,     0,
307     66,    69,    61,     0,    64,    69,     0,    67,     0,    50,
308     69,     0
309 };
310
311 #endif
312
313 #if YYDEBUG != 0
314 static const short yyrline[] = { 0,
315    173,   180,   182,   185,   188,   190,   191,   196,   216,   218,
316    221,   223,   234,   236,   247,   259,   271,   276,   280,   284,
317    290,   298,   303,   310,   315,   321,   329,   336,   343,   350,
318    357,   364,   371,   378,   385,   392,   399,   406,   413,   422,
319    431,   440,   449,   458,   467,   476,   485,   494,   503,   512,
320    521,   530,   539,   548,   557,   566,   575,   584,   593,   602,
321    605,   615,   618,   628,   637,   646,   655,   664,   673,   682,
322    691,   702,   712,   721,   730,   737,   744,   751,   758,   765,
323    776,   787,   798,   807,   815
324 };
325 #endif
326
327
328 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
329
330 static const char * const yytname[] = {   "$","error","$undefined.","MATCHER_ALL",
331 "MATCHER_UNREAD","MATCHER_NOT_UNREAD","MATCHER_NEW","MATCHER_NOT_NEW","MATCHER_MARKED",
332 "MATCHER_NOT_MARKED","MATCHER_DELETED","MATCHER_NOT_DELETED","MATCHER_REPLIED",
333 "MATCHER_NOT_REPLIED","MATCHER_FORWARDED","MATCHER_NOT_FORWARDED","MATCHER_SUBJECT",
334 "MATCHER_NOT_SUBJECT","MATCHER_FROM","MATCHER_NOT_FROM","MATCHER_TO","MATCHER_NOT_TO",
335 "MATCHER_CC","MATCHER_NOT_CC","MATCHER_TO_OR_CC","MATCHER_NOT_TO_AND_NOT_CC",
336 "MATCHER_AGE_GREATER","MATCHER_AGE_LOWER","MATCHER_NEWSGROUPS","MATCHER_NOT_NEWSGROUPS",
337 "MATCHER_INREPLYTO","MATCHER_NOT_INREPLYTO","MATCHER_REFERENCES","MATCHER_NOT_REFERENCES",
338 "MATCHER_SCORE_GREATER","MATCHER_SCORE_LOWER","MATCHER_HEADER","MATCHER_NOT_HEADER",
339 "MATCHER_HEADERS_PART","MATCHER_NOT_HEADERS_PART","MATCHER_MESSAGE","MATCHER_NOT_MESSAGE",
340 "MATCHER_BODY_PART","MATCHER_NOT_BODY_PART","MATCHER_EXECUTE","MATCHER_NOT_EXECUTE",
341 "MATCHER_MATCHCASE","MATCHER_MATCH","MATCHER_REGEXPCASE","MATCHER_REGEXP","MATCHER_SCORE",
342 "MATCHER_MOVE","MATCHER_COPY","MATCHER_DELETE","MATCHER_MARK","MATCHER_UNMARK",
343 "MATCHER_MARK_AS_READ","MATCHER_MARK_AS_UNREAD","MATCHER_FORWARD","MATCHER_FORWARD_AS_ATTACHMENT",
344 "MATCHER_EOL","MATCHER_STRING","MATCHER_OR","MATCHER_AND","MATCHER_COLOR","MATCHER_SCORE_EQUAL",
345 "MATCHER_BOUNCE","MATCHER_DELETE_ON_SERVER","MATCHER_SECTION","MATCHER_INTEGER",
346 "file","@1","file_line_list","file_line","section_notification","instruction",
347 "end_instr_opt","end_action","filtering_or_scoring","match_type","condition",
348 "condition_list","bool_op","one_condition","@2","@3","filtering_action","scoring_rule", NULL
349 };
350 #endif
351
352 static const short yyr1[] = {     0,
353     71,    70,    72,    72,    73,    73,    73,    74,    75,    75,
354     76,    76,    77,    77,    78,    78,    79,    79,    79,    79,
355     80,    81,    81,    82,    82,    83,    83,    83,    83,    83,
356     83,    83,    83,    83,    83,    83,    83,    83,    83,    83,
357     83,    83,    83,    83,    83,    83,    83,    83,    83,    83,
358     83,    83,    83,    83,    83,    83,    83,    83,    83,    84,
359     83,    85,    83,    83,    83,    83,    83,    83,    83,    83,
360     83,    86,    86,    86,    86,    86,    86,    86,    86,    86,
361     86,    86,    86,    86,    87
362 };
363
364 static const short yyr2[] = {     0,
365      0,     2,     2,     1,     1,     1,     2,     2,     2,     1,
366      2,     0,     1,     0,     1,     1,     1,     1,     1,     1,
367      1,     3,     1,     1,     1,     1,     1,     1,     1,     1,
368      1,     1,     1,     1,     1,     1,     1,     1,     3,     3,
369      3,     3,     3,     3,     3,     3,     3,     3,     2,     2,
370      3,     3,     3,     3,     3,     3,     2,     2,     2,     0,
371      5,     0,     5,     3,     3,     3,     3,     3,     3,     2,
372      2,     2,     2,     2,     1,     1,     1,     1,     1,     3,
373      3,     3,     2,     1,     2
374 };
375
376 static const short yydefact[] = {     1,
377      0,     0,    26,    27,    28,    29,    30,    31,    32,    33,
378     34,    35,    36,    37,    38,     0,     0,     0,     0,     0,
379      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
380      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
381      0,     0,     0,     0,     0,    10,     0,     0,     2,     0,
382      5,     6,    12,    21,    23,     7,    17,    18,    19,    20,
383      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
384     49,    50,     0,     0,     0,     0,     0,     0,    57,    58,
385     60,    62,     0,     0,     0,     0,     0,     0,    70,    71,
386     59,     8,     3,     0,     0,     0,     0,    75,    76,    77,
387     78,    79,     0,     0,     0,     0,    84,     9,    14,    15,
388     16,    25,    24,     0,    39,    40,    41,    42,    43,    44,
389     45,    46,    47,    48,    51,    52,    53,    54,    55,    56,
390      0,     0,    64,    65,    66,    67,    68,    69,    72,    85,
391     73,    74,     0,     0,    83,     0,    13,    11,    22,     0,
392      0,    80,    81,    82,    61,    63,     0,     0,     0
393 };
394
395 static const short yydefgoto[] = {   157,
396      1,    49,    50,    51,    52,   108,   148,   109,    61,    53,
397     54,   114,    55,   131,   132,   110,   111
398 };
399
400 static const short yypact[] = {-32768,
401    115,   -31,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
402 -32768,-32768,-32768,-32768,-32768,   -29,   -29,   -29,   -29,   -29,
403    -29,   -29,   -29,   -29,   -29,     4,     5,   -29,   -29,   -29,
404    -29,   -29,   -29,     6,     7,    16,    17,   -29,   -29,   -29,
405    -29,   -29,   -29,    18,    19,-32768,    12,    22,-32768,    27,
406 -32768,-32768,    46,   -53,-32768,-32768,-32768,-32768,-32768,-32768,
407     23,    24,    25,    28,    30,    32,    33,    45,    47,    48,
408 -32768,-32768,    50,    56,   100,   101,   102,   103,-32768,-32768,
409 -32768,-32768,   104,   105,   106,   107,   108,   109,-32768,-32768,
410 -32768,-32768,-32768,   110,    14,   111,   112,-32768,-32768,-32768,
411 -32768,-32768,    38,   113,   158,   159,-32768,-32768,   114,-32768,
412 -32768,-32768,-32768,   181,-32768,-32768,-32768,-32768,-32768,-32768,
413 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
414    -29,   -29,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
415 -32768,-32768,   116,   117,-32768,   118,-32768,-32768,-32768,   120,
416    168,-32768,-32768,-32768,-32768,-32768,    88,   176,-32768
417 };
418
419 static const short yypgoto[] = {-32768,
420 -32768,   180,-32768,-32768,-32768,-32768,-32768,-32768,   -17,-32768,
421 -32768,-32768,   119,-32768,-32768,-32768,-32768
422 };
423
424
425 #define YYLAST          246
426
427
428 static const short yytable[] = {    62,
429     63,    64,    65,    66,    67,    68,    69,    70,   112,   113,
430     73,    74,    75,    76,    77,    78,    57,    58,    59,    60,
431     83,    84,    85,    86,    87,    88,    -4,     2,    56,     3,
432      4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
433     14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
434     24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
435     34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
436     44,    45,    71,    72,    79,    80,    81,    82,    89,    90,
437     91,    92,   140,   115,   116,   117,    46,   158,   118,    94,
438    119,    47,   120,   121,    48,    95,    96,    97,    98,    99,
439    100,   101,   102,   103,   104,   122,   143,   123,   124,   105,
440    125,   106,   107,   150,   151,     2,   126,     3,     4,     5,
441      6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
442     16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
443     26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
444     36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
445    127,   128,   129,   130,   133,   134,   135,   136,   137,   138,
446    139,   141,   142,   147,    46,   159,   152,   153,   154,    47,
447    155,   144,    48,     3,     4,     5,     6,     7,     8,     9,
448     10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
449     20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
450     30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
451     40,    41,    42,    43,    44,    45,   145,   146,   156,    93,
452      0,     0,   149,     0,     0,     0,     0,     0,     0,     0,
453      0,     0,     0,     0,     0,    47
454 };
455
456 static const short yycheck[] = {    17,
457     18,    19,    20,    21,    22,    23,    24,    25,    62,    63,
458     28,    29,    30,    31,    32,    33,    46,    47,    48,    49,
459     38,    39,    40,    41,    42,    43,     0,     1,    60,     3,
460      4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
461     14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
462     24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
463     34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
464     44,    45,    69,    69,    69,    69,    61,    61,    61,    61,
465     69,    60,    69,    61,    61,    61,    60,     0,    61,    44,
466     61,    65,    61,    61,    68,    50,    51,    52,    53,    54,
467     55,    56,    57,    58,    59,    61,    69,    61,    61,    64,
468     61,    66,    67,   131,   132,     1,    61,     3,     4,     5,
469      6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
470     16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
471     26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
472     36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
473     61,    61,    61,    61,    61,    61,    61,    61,    61,    61,
474     61,    61,    61,    60,    60,     0,    61,    61,    61,    65,
475     61,    69,    68,     3,     4,     5,     6,     7,     8,     9,
476     10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
477     20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
478     30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
479     40,    41,    42,    43,    44,    45,    69,    69,    61,    50,
480     -1,    -1,   114,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
481     -1,    -1,    -1,    -1,    -1,    65
482 };
483 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
484 #line 3 "/usr/lib/bison.simple"
485 /* This file comes from bison-1.28.  */
486
487 /* Skeleton output parser for bison,
488    Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
489
490    This program is free software; you can redistribute it and/or modify
491    it under the terms of the GNU General Public License as published by
492    the Free Software Foundation; either version 2, or (at your option)
493    any later version.
494
495    This program is distributed in the hope that it will be useful,
496    but WITHOUT ANY WARRANTY; without even the implied warranty of
497    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
498    GNU General Public License for more details.
499
500    You should have received a copy of the GNU General Public License
501    along with this program; if not, write to the Free Software
502    Foundation, Inc., 59 Temple Place - Suite 330,
503    Boston, MA 02111-1307, USA.  */
504
505 /* As a special exception, when this file is copied by Bison into a
506    Bison output file, you may use that output file without restriction.
507    This special exception was added by the Free Software Foundation
508    in version 1.24 of Bison.  */
509
510 /* This is the parser code that is written into each bison parser
511   when the %semantic_parser declaration is not specified in the grammar.
512   It was written by Richard Stallman by simplifying the hairy parser
513   used when %semantic_parser is specified.  */
514
515 #ifndef YYSTACK_USE_ALLOCA
516 #ifdef alloca
517 #define YYSTACK_USE_ALLOCA
518 #else /* alloca not defined */
519 #ifdef __GNUC__
520 #define YYSTACK_USE_ALLOCA
521 #define alloca __builtin_alloca
522 #else /* not GNU C.  */
523 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
524 #define YYSTACK_USE_ALLOCA
525 #include <alloca.h>
526 #else /* not sparc */
527 /* We think this test detects Watcom and Microsoft C.  */
528 /* This used to test MSDOS, but that is a bad idea
529    since that symbol is in the user namespace.  */
530 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
531 #if 0 /* No need for malloc.h, which pollutes the namespace;
532          instead, just don't use alloca.  */
533 #include <malloc.h>
534 #endif
535 #else /* not MSDOS, or __TURBOC__ */
536 #if defined(_AIX)
537 /* I don't know what this was needed for, but it pollutes the namespace.
538    So I turned it off.   rms, 2 May 1997.  */
539 /* #include <malloc.h>  */
540  #pragma alloca
541 #define YYSTACK_USE_ALLOCA
542 #else /* not MSDOS, or __TURBOC__, or _AIX */
543 #if 0
544 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
545                  and on HPUX 10.  Eventually we can turn this on.  */
546 #define YYSTACK_USE_ALLOCA
547 #define alloca __builtin_alloca
548 #endif /* __hpux */
549 #endif
550 #endif /* not _AIX */
551 #endif /* not MSDOS, or __TURBOC__ */
552 #endif /* not sparc */
553 #endif /* not GNU C */
554 #endif /* alloca not defined */
555 #endif /* YYSTACK_USE_ALLOCA not defined */
556
557 #ifdef YYSTACK_USE_ALLOCA
558 #define YYSTACK_ALLOC alloca
559 #else
560 #define YYSTACK_ALLOC malloc
561 #endif
562
563 /* Note: there must be only one dollar sign in this file.
564    It is replaced by the list of actions, each action
565    as one case of the switch.  */
566
567 #define yyerrok         (yyerrstatus = 0)
568 #define yyclearin       (yychar = YYEMPTY)
569 #define YYEMPTY         -2
570 #define YYEOF           0
571 #define YYACCEPT        goto yyacceptlab
572 #define YYABORT         goto yyabortlab
573 #define YYERROR         goto yyerrlab1
574 /* Like YYERROR except do call yyerror.
575    This remains here temporarily to ease the
576    transition to the new meaning of YYERROR, for GCC.
577    Once GCC version 2 has supplanted version 1, this can go.  */
578 #define YYFAIL          goto yyerrlab
579 #define YYRECOVERING()  (!!yyerrstatus)
580 #define YYBACKUP(token, value) \
581 do                                                              \
582   if (yychar == YYEMPTY && yylen == 1)                          \
583     { yychar = (token), yylval = (value);                       \
584       yychar1 = YYTRANSLATE (yychar);                           \
585       YYPOPSTACK;                                               \
586       goto yybackup;                                            \
587     }                                                           \
588   else                                                          \
589     { yyerror ("syntax error: cannot back up"); YYERROR; }      \
590 while (0)
591
592 #define YYTERROR        1
593 #define YYERRCODE       256
594
595 #ifndef YYPURE
596 #define YYLEX           yylex()
597 #endif
598
599 #ifdef YYPURE
600 #ifdef YYLSP_NEEDED
601 #ifdef YYLEX_PARAM
602 #define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
603 #else
604 #define YYLEX           yylex(&yylval, &yylloc)
605 #endif
606 #else /* not YYLSP_NEEDED */
607 #ifdef YYLEX_PARAM
608 #define YYLEX           yylex(&yylval, YYLEX_PARAM)
609 #else
610 #define YYLEX           yylex(&yylval)
611 #endif
612 #endif /* not YYLSP_NEEDED */
613 #endif
614
615 /* If nonreentrant, generate the variables here */
616
617 #ifndef YYPURE
618
619 int     yychar;                 /*  the lookahead symbol                */
620 YYSTYPE yylval;                 /*  the semantic value of the           */
621                                 /*  lookahead symbol                    */
622
623 #ifdef YYLSP_NEEDED
624 YYLTYPE yylloc;                 /*  location data for the lookahead     */
625                                 /*  symbol                              */
626 #endif
627
628 int yynerrs;                    /*  number of parse errors so far       */
629 #endif  /* not YYPURE */
630
631 #if YYDEBUG != 0
632 int yydebug;                    /*  nonzero means print parse trace     */
633 /* Since this is uninitialized, it does not stop multiple parsers
634    from coexisting.  */
635 #endif
636
637 /*  YYINITDEPTH indicates the initial size of the parser's stacks       */
638
639 #ifndef YYINITDEPTH
640 #define YYINITDEPTH 200
641 #endif
642
643 /*  YYMAXDEPTH is the maximum size the stacks can grow to
644     (effective only if the built-in stack extension method is used).  */
645
646 #if YYMAXDEPTH == 0
647 #undef YYMAXDEPTH
648 #endif
649
650 #ifndef YYMAXDEPTH
651 #define YYMAXDEPTH 10000
652 #endif
653 \f
654 /* Define __yy_memcpy.  Note that the size argument
655    should be passed with type unsigned int, because that is what the non-GCC
656    definitions require.  With GCC, __builtin_memcpy takes an arg
657    of type size_t, but it can handle unsigned int.  */
658
659 #if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
660 #define __yy_memcpy(TO,FROM,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
661 #else                           /* not GNU C or C++ */
662 #ifndef __cplusplus
663
664 /* This is the most reliable way to avoid incompatibilities
665    in available built-in functions on various systems.  */
666 static void
667 __yy_memcpy (to, from, count)
668      char *to;
669      char *from;
670      unsigned int count;
671 {
672   register char *f = from;
673   register char *t = to;
674   register int i = count;
675
676   while (i-- > 0)
677     *t++ = *f++;
678 }
679
680 #else /* __cplusplus */
681
682 /* This is the most reliable way to avoid incompatibilities
683    in available built-in functions on various systems.  */
684 static void
685 __yy_memcpy (char *to, char *from, unsigned int count)
686 {
687   register char *t = to;
688   register char *f = from;
689   register int i = count;
690
691   while (i-- > 0)
692     *t++ = *f++;
693 }
694
695 #endif
696 #endif
697 \f
698 #line 217 "/usr/lib/bison.simple"
699
700 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
701    into yyparse.  The argument should have type void *.
702    It should actually point to an object.
703    Grammar actions can access the variable by casting it
704    to the proper pointer type.  */
705
706 #ifdef YYPARSE_PARAM
707 #ifdef __cplusplus
708 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
709 #define YYPARSE_PARAM_DECL
710 #else /* not __cplusplus */
711 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
712 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
713 #endif /* not __cplusplus */
714 #else /* not YYPARSE_PARAM */
715 #define YYPARSE_PARAM_ARG
716 #define YYPARSE_PARAM_DECL
717 #endif /* not YYPARSE_PARAM */
718
719 /* Prevent warning if -Wstrict-prototypes.  */
720 #ifdef __GNUC__
721 #ifdef YYPARSE_PARAM
722 int yyparse (void *);
723 #else
724 int yyparse (void);
725 #endif
726 #endif
727
728 int
729 yyparse(YYPARSE_PARAM_ARG)
730      YYPARSE_PARAM_DECL
731 {
732   register int yystate;
733   register int yyn;
734   register short *yyssp;
735   register YYSTYPE *yyvsp;
736   int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
737   int yychar1 = 0;              /*  lookahead token as an internal (translated) token number */
738
739   short yyssa[YYINITDEPTH];     /*  the state stack                     */
740   YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */
741
742   short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
743   YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */
744
745 #ifdef YYLSP_NEEDED
746   YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
747   YYLTYPE *yyls = yylsa;
748   YYLTYPE *yylsp;
749
750 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
751 #else
752 #define YYPOPSTACK   (yyvsp--, yyssp--)
753 #endif
754
755   int yystacksize = YYINITDEPTH;
756   int yyfree_stacks = 0;
757
758 #ifdef YYPURE
759   int yychar;
760   YYSTYPE yylval;
761   int yynerrs;
762 #ifdef YYLSP_NEEDED
763   YYLTYPE yylloc;
764 #endif
765 #endif
766
767   YYSTYPE yyval;                /*  the variable used to return         */
768                                 /*  semantic values from the action     */
769                                 /*  routines                            */
770
771   int yylen;
772
773 #if YYDEBUG != 0
774   if (yydebug)
775     fprintf(stderr, "Starting parse\n");
776 #endif
777
778   yystate = 0;
779   yyerrstatus = 0;
780   yynerrs = 0;
781   yychar = YYEMPTY;             /* Cause a token to be read.  */
782
783   /* Initialize stack pointers.
784      Waste one element of value and location stack
785      so that they stay on the same level as the state stack.
786      The wasted elements are never initialized.  */
787
788   yyssp = yyss - 1;
789   yyvsp = yyvs;
790 #ifdef YYLSP_NEEDED
791   yylsp = yyls;
792 #endif
793
794 /* Push a new state, which is found in  yystate  .  */
795 /* In all cases, when you get here, the value and location stacks
796    have just been pushed. so pushing a state here evens the stacks.  */
797 yynewstate:
798
799   *++yyssp = yystate;
800
801   if (yyssp >= yyss + yystacksize - 1)
802     {
803       /* Give user a chance to reallocate the stack */
804       /* Use copies of these so that the &'s don't force the real ones into memory. */
805       YYSTYPE *yyvs1 = yyvs;
806       short *yyss1 = yyss;
807 #ifdef YYLSP_NEEDED
808       YYLTYPE *yyls1 = yyls;
809 #endif
810
811       /* Get the current used size of the three stacks, in elements.  */
812       int size = yyssp - yyss + 1;
813
814 #ifdef yyoverflow
815       /* Each stack pointer address is followed by the size of
816          the data in use in that stack, in bytes.  */
817 #ifdef YYLSP_NEEDED
818       /* This used to be a conditional around just the two extra args,
819          but that might be undefined if yyoverflow is a macro.  */
820       yyoverflow("parser stack overflow",
821                  &yyss1, size * sizeof (*yyssp),
822                  &yyvs1, size * sizeof (*yyvsp),
823                  &yyls1, size * sizeof (*yylsp),
824                  &yystacksize);
825 #else
826       yyoverflow("parser stack overflow",
827                  &yyss1, size * sizeof (*yyssp),
828                  &yyvs1, size * sizeof (*yyvsp),
829                  &yystacksize);
830 #endif
831
832       yyss = yyss1; yyvs = yyvs1;
833 #ifdef YYLSP_NEEDED
834       yyls = yyls1;
835 #endif
836 #else /* no yyoverflow */
837       /* Extend the stack our own way.  */
838       if (yystacksize >= YYMAXDEPTH)
839         {
840           yyerror("parser stack overflow");
841           if (yyfree_stacks)
842             {
843               free (yyss);
844               free (yyvs);
845 #ifdef YYLSP_NEEDED
846               free (yyls);
847 #endif
848             }
849           return 2;
850         }
851       yystacksize *= 2;
852       if (yystacksize > YYMAXDEPTH)
853         yystacksize = YYMAXDEPTH;
854 #ifndef YYSTACK_USE_ALLOCA
855       yyfree_stacks = 1;
856 #endif
857       yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
858       __yy_memcpy ((char *)yyss, (char *)yyss1,
859                    size * (unsigned int) sizeof (*yyssp));
860       yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
861       __yy_memcpy ((char *)yyvs, (char *)yyvs1,
862                    size * (unsigned int) sizeof (*yyvsp));
863 #ifdef YYLSP_NEEDED
864       yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
865       __yy_memcpy ((char *)yyls, (char *)yyls1,
866                    size * (unsigned int) sizeof (*yylsp));
867 #endif
868 #endif /* no yyoverflow */
869
870       yyssp = yyss + size - 1;
871       yyvsp = yyvs + size - 1;
872 #ifdef YYLSP_NEEDED
873       yylsp = yyls + size - 1;
874 #endif
875
876 #if YYDEBUG != 0
877       if (yydebug)
878         fprintf(stderr, "Stack size increased to %d\n", yystacksize);
879 #endif
880
881       if (yyssp >= yyss + yystacksize - 1)
882         YYABORT;
883     }
884
885 #if YYDEBUG != 0
886   if (yydebug)
887     fprintf(stderr, "Entering state %d\n", yystate);
888 #endif
889
890   goto yybackup;
891  yybackup:
892
893 /* Do appropriate processing given the current state.  */
894 /* Read a lookahead token if we need one and don't already have one.  */
895 /* yyresume: */
896
897   /* First try to decide what to do without reference to lookahead token.  */
898
899   yyn = yypact[yystate];
900   if (yyn == YYFLAG)
901     goto yydefault;
902
903   /* Not known => get a lookahead token if don't already have one.  */
904
905   /* yychar is either YYEMPTY or YYEOF
906      or a valid token in external form.  */
907
908   if (yychar == YYEMPTY)
909     {
910 #if YYDEBUG != 0
911       if (yydebug)
912         fprintf(stderr, "Reading a token: ");
913 #endif
914       yychar = YYLEX;
915     }
916
917   /* Convert token to internal form (in yychar1) for indexing tables with */
918
919   if (yychar <= 0)              /* This means end of input. */
920     {
921       yychar1 = 0;
922       yychar = YYEOF;           /* Don't call YYLEX any more */
923
924 #if YYDEBUG != 0
925       if (yydebug)
926         fprintf(stderr, "Now at end of input.\n");
927 #endif
928     }
929   else
930     {
931       yychar1 = YYTRANSLATE(yychar);
932
933 #if YYDEBUG != 0
934       if (yydebug)
935         {
936           fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
937           /* Give the individual parser a way to print the precise meaning
938              of a token, for further debugging info.  */
939 #ifdef YYPRINT
940           YYPRINT (stderr, yychar, yylval);
941 #endif
942           fprintf (stderr, ")\n");
943         }
944 #endif
945     }
946
947   yyn += yychar1;
948   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
949     goto yydefault;
950
951   yyn = yytable[yyn];
952
953   /* yyn is what to do for this token type in this state.
954      Negative => reduce, -yyn is rule number.
955      Positive => shift, yyn is new state.
956        New state is final state => don't bother to shift,
957        just return success.
958      0, or most negative number => error.  */
959
960   if (yyn < 0)
961     {
962       if (yyn == YYFLAG)
963         goto yyerrlab;
964       yyn = -yyn;
965       goto yyreduce;
966     }
967   else if (yyn == 0)
968     goto yyerrlab;
969
970   if (yyn == YYFINAL)
971     YYACCEPT;
972
973   /* Shift the lookahead token.  */
974
975 #if YYDEBUG != 0
976   if (yydebug)
977     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
978 #endif
979
980   /* Discard the token being shifted unless it is eof.  */
981   if (yychar != YYEOF)
982     yychar = YYEMPTY;
983
984   *++yyvsp = yylval;
985 #ifdef YYLSP_NEEDED
986   *++yylsp = yylloc;
987 #endif
988
989   /* count tokens shifted since error; after three, turn off error status.  */
990   if (yyerrstatus) yyerrstatus--;
991
992   yystate = yyn;
993   goto yynewstate;
994
995 /* Do the default action for the current state.  */
996 yydefault:
997
998   yyn = yydefact[yystate];
999   if (yyn == 0)
1000     goto yyerrlab;
1001
1002 /* Do a reduction.  yyn is the number of a rule to reduce with.  */
1003 yyreduce:
1004   yylen = yyr2[yyn];
1005   if (yylen > 0)
1006     yyval = yyvsp[1-yylen]; /* implement default value of the action */
1007
1008 #if YYDEBUG != 0
1009   if (yydebug)
1010     {
1011       int i;
1012
1013       fprintf (stderr, "Reducing via rule %d (line %d), ",
1014                yyn, yyrline[yyn]);
1015
1016       /* Print the symbols being reduced, and their result.  */
1017       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1018         fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1019       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1020     }
1021 #endif
1022
1023
1024   switch (yyn) {
1025
1026 case 1:
1027 #line 174 "matcher_parser_parse.y"
1028 {
1029         if (!matcher_parser_dialog) {
1030                 prefs_scoring = &global_scoring;
1031                 prefs_filtering = &global_processing;
1032         }
1033 ;
1034     break;}
1035 case 7:
1036 #line 192 "matcher_parser_parse.y"
1037 {
1038         yyerrok;
1039 ;
1040     break;}
1041 case 8:
1042 #line 198 "matcher_parser_parse.y"
1043 {
1044         gchar * folder = yyvsp[-1].str;
1045         FolderItem * item = NULL;
1046
1047         if (!matcher_parser_dialog) {
1048                 item = folder_find_item_from_identifier(folder);
1049                 if (item == NULL) {
1050                         prefs_scoring = &global_scoring;
1051                         prefs_filtering = &global_processing;
1052                 }
1053                 else {
1054                         prefs_scoring = &item->prefs->scoring;
1055                         prefs_filtering = &item->prefs->processing;
1056                 }
1057         }
1058 ;
1059     break;}
1060 case 12:
1061 #line 224 "matcher_parser_parse.y"
1062 {
1063         if (matcher_parser_dialog)
1064                 YYACCEPT;
1065         else {
1066                 matcher_parsererror("parse error");
1067                 YYERROR;
1068         }
1069 ;
1070     break;}
1071 case 14:
1072 #line 237 "matcher_parser_parse.y"
1073 {
1074         if (matcher_parser_dialog)
1075                 YYACCEPT;
1076         else {
1077                 matcher_parsererror("parse error");
1078                 YYERROR;
1079         }
1080 ;
1081     break;}
1082 case 15:
1083 #line 249 "matcher_parser_parse.y"
1084 {
1085         filtering = filteringprop_new(cond, action);
1086         cond = NULL;
1087         action = NULL;
1088         if (!matcher_parser_dialog) {
1089                 * prefs_filtering = g_slist_append(* prefs_filtering,
1090                                                    filtering);
1091                 filtering = NULL;
1092         }
1093 ;
1094     break;}
1095 case 16:
1096 #line 260 "matcher_parser_parse.y"
1097 {
1098         scoring = scoringprop_new(cond, score);
1099         cond = NULL;
1100         score = 0;
1101         if (!matcher_parser_dialog) {
1102                 * prefs_scoring = g_slist_append(* prefs_scoring, scoring);
1103                 scoring = NULL;
1104         }
1105 ;
1106     break;}
1107 case 17:
1108 #line 273 "matcher_parser_parse.y"
1109 {
1110         match_type = MATCHTYPE_MATCHCASE;
1111 ;
1112     break;}
1113 case 18:
1114 #line 277 "matcher_parser_parse.y"
1115 {
1116         match_type = MATCHTYPE_MATCH;
1117 ;
1118     break;}
1119 case 19:
1120 #line 281 "matcher_parser_parse.y"
1121 {
1122         match_type = MATCHTYPE_REGEXPCASE;
1123 ;
1124     break;}
1125 case 20:
1126 #line 285 "matcher_parser_parse.y"
1127 {
1128         match_type = MATCHTYPE_REGEXP;
1129 ;
1130     break;}
1131 case 21:
1132 #line 292 "matcher_parser_parse.y"
1133 {
1134         cond = matcherlist_new(matchers_list, (bool_op == MATCHERBOOL_AND));
1135         matchers_list = NULL;
1136 ;
1137     break;}
1138 case 22:
1139 #line 300 "matcher_parser_parse.y"
1140 {
1141         matchers_list = g_slist_append(matchers_list, prop);
1142 ;
1143     break;}
1144 case 23:
1145 #line 304 "matcher_parser_parse.y"
1146 {
1147         matchers_list = NULL;
1148         matchers_list = g_slist_append(matchers_list, prop);
1149 ;
1150     break;}
1151 case 24:
1152 #line 312 "matcher_parser_parse.y"
1153 {
1154         bool_op = MATCHERBOOL_AND;
1155 ;
1156     break;}
1157 case 25:
1158 #line 316 "matcher_parser_parse.y"
1159 {
1160         bool_op = MATCHERBOOL_OR;
1161 ;
1162     break;}
1163 case 26:
1164 #line 323 "matcher_parser_parse.y"
1165 {
1166         gint criteria = 0;
1167
1168         criteria = MATCHCRITERIA_ALL;
1169         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1170 ;
1171     break;}
1172 case 27:
1173 #line 330 "matcher_parser_parse.y"
1174 {
1175         gint criteria = 0;
1176
1177         criteria = MATCHCRITERIA_UNREAD;
1178         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1179 ;
1180     break;}
1181 case 28:
1182 #line 337 "matcher_parser_parse.y"
1183 {
1184         gint criteria = 0;
1185
1186         criteria = MATCHCRITERIA_NOT_UNREAD;
1187         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1188 ;
1189     break;}
1190 case 29:
1191 #line 344 "matcher_parser_parse.y"
1192 {
1193         gint criteria = 0;
1194
1195         criteria = MATCHCRITERIA_NEW;
1196         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1197 ;
1198     break;}
1199 case 30:
1200 #line 351 "matcher_parser_parse.y"
1201 {
1202         gint criteria = 0;
1203
1204         criteria = MATCHCRITERIA_NOT_NEW;
1205         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1206 ;
1207     break;}
1208 case 31:
1209 #line 358 "matcher_parser_parse.y"
1210 {
1211         gint criteria = 0;
1212
1213         criteria = MATCHCRITERIA_MARKED;
1214         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1215 ;
1216     break;}
1217 case 32:
1218 #line 365 "matcher_parser_parse.y"
1219 {
1220         gint criteria = 0;
1221
1222         criteria = MATCHCRITERIA_NOT_MARKED;
1223         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1224 ;
1225     break;}
1226 case 33:
1227 #line 372 "matcher_parser_parse.y"
1228 {
1229         gint criteria = 0;
1230
1231         criteria = MATCHCRITERIA_DELETED;
1232         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1233 ;
1234     break;}
1235 case 34:
1236 #line 379 "matcher_parser_parse.y"
1237 {
1238         gint criteria = 0;
1239
1240         criteria = MATCHCRITERIA_NOT_DELETED;
1241         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1242 ;
1243     break;}
1244 case 35:
1245 #line 386 "matcher_parser_parse.y"
1246 {
1247         gint criteria = 0;
1248
1249         criteria = MATCHCRITERIA_REPLIED;
1250         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1251 ;
1252     break;}
1253 case 36:
1254 #line 393 "matcher_parser_parse.y"
1255 {
1256         gint criteria = 0;
1257
1258         criteria = MATCHCRITERIA_NOT_REPLIED;
1259         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1260 ;
1261     break;}
1262 case 37:
1263 #line 400 "matcher_parser_parse.y"
1264 {
1265         gint criteria = 0;
1266
1267         criteria = MATCHCRITERIA_FORWARDED;
1268         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1269 ;
1270     break;}
1271 case 38:
1272 #line 407 "matcher_parser_parse.y"
1273 {
1274         gint criteria = 0;
1275
1276         criteria = MATCHCRITERIA_NOT_FORWARDED;
1277         prop = matcherprop_new(criteria, NULL, 0, NULL, 0);
1278 ;
1279     break;}
1280 case 39:
1281 #line 414 "matcher_parser_parse.y"
1282 {
1283         gint criteria = 0;
1284         gchar * expr = NULL;
1285
1286         criteria = MATCHCRITERIA_SUBJECT;
1287         expr = yyvsp[0].str;
1288         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1289 ;
1290     break;}
1291 case 40:
1292 #line 423 "matcher_parser_parse.y"
1293 {
1294         gint criteria = 0;
1295         gchar * expr = NULL;
1296
1297         criteria = MATCHCRITERIA_NOT_SUBJECT;
1298         expr = yyvsp[0].str;
1299         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1300 ;
1301     break;}
1302 case 41:
1303 #line 432 "matcher_parser_parse.y"
1304 {
1305         gint criteria = 0;
1306         gchar * expr = NULL;
1307
1308         criteria = MATCHCRITERIA_FROM;
1309         expr = yyvsp[0].str;
1310         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1311 ;
1312     break;}
1313 case 42:
1314 #line 441 "matcher_parser_parse.y"
1315 {
1316         gint criteria = 0;
1317         gchar * expr = NULL;
1318
1319         criteria = MATCHCRITERIA_NOT_FROM;
1320         expr = yyvsp[0].str;
1321         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1322 ;
1323     break;}
1324 case 43:
1325 #line 450 "matcher_parser_parse.y"
1326 {
1327         gint criteria = 0;
1328         gchar * expr = NULL;
1329
1330         criteria = MATCHCRITERIA_TO;
1331         expr = yyvsp[0].str;
1332         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1333 ;
1334     break;}
1335 case 44:
1336 #line 459 "matcher_parser_parse.y"
1337 {
1338         gint criteria = 0;
1339         gchar * expr = NULL;
1340
1341         criteria = MATCHCRITERIA_NOT_TO;
1342         expr = yyvsp[0].str;
1343         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1344 ;
1345     break;}
1346 case 45:
1347 #line 468 "matcher_parser_parse.y"
1348 {
1349         gint criteria = 0;
1350         gchar * expr = NULL;
1351
1352         criteria = MATCHCRITERIA_CC;
1353         expr = yyvsp[0].str;
1354         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1355 ;
1356     break;}
1357 case 46:
1358 #line 477 "matcher_parser_parse.y"
1359 {
1360         gint criteria = 0;
1361         gchar * expr = NULL;
1362
1363         criteria = MATCHCRITERIA_NOT_CC;
1364         expr = yyvsp[0].str;
1365         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1366 ;
1367     break;}
1368 case 47:
1369 #line 486 "matcher_parser_parse.y"
1370 {
1371         gint criteria = 0;
1372         gchar * expr = NULL;
1373
1374         criteria = MATCHCRITERIA_TO_OR_CC;
1375         expr = yyvsp[0].str;
1376         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1377 ;
1378     break;}
1379 case 48:
1380 #line 495 "matcher_parser_parse.y"
1381 {
1382         gint criteria = 0;
1383         gchar * expr = NULL;
1384
1385         criteria = MATCHCRITERIA_NOT_TO_AND_NOT_CC;
1386         expr = yyvsp[0].str;
1387         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1388 ;
1389     break;}
1390 case 49:
1391 #line 504 "matcher_parser_parse.y"
1392 {
1393         gint criteria = 0;
1394         gint value = 0;
1395
1396         criteria = MATCHCRITERIA_AGE_GREATER;
1397         value = atoi(yyvsp[0].value);
1398         prop = matcherprop_new(criteria, NULL, 0, NULL, value);
1399 ;
1400     break;}
1401 case 50:
1402 #line 513 "matcher_parser_parse.y"
1403 {
1404         gint criteria = 0;
1405         gint value = 0;
1406
1407         criteria = MATCHCRITERIA_AGE_LOWER;
1408         value = atoi(yyvsp[0].value);
1409         prop = matcherprop_new(criteria, NULL, 0, NULL, value);
1410 ;
1411     break;}
1412 case 51:
1413 #line 522 "matcher_parser_parse.y"
1414 {
1415         gint criteria = 0;
1416         gchar * expr = NULL;
1417
1418         criteria = MATCHCRITERIA_NEWSGROUPS;
1419         expr = yyvsp[0].str;
1420         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1421 ;
1422     break;}
1423 case 52:
1424 #line 531 "matcher_parser_parse.y"
1425 {
1426         gint criteria = 0;
1427         gchar * expr = NULL;
1428
1429         criteria = MATCHCRITERIA_NOT_NEWSGROUPS;
1430         expr = yyvsp[0].str;
1431         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1432 ;
1433     break;}
1434 case 53:
1435 #line 540 "matcher_parser_parse.y"
1436 {
1437         gint criteria = 0;
1438         gchar * expr = NULL;
1439
1440         criteria = MATCHCRITERIA_INREPLYTO;
1441         expr = yyvsp[0].str;
1442         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1443 ;
1444     break;}
1445 case 54:
1446 #line 549 "matcher_parser_parse.y"
1447 {
1448         gint criteria = 0;
1449         gchar * expr = NULL;
1450
1451         criteria = MATCHCRITERIA_NOT_INREPLYTO;
1452         expr = yyvsp[0].str;
1453         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1454 ;
1455     break;}
1456 case 55:
1457 #line 558 "matcher_parser_parse.y"
1458 {
1459         gint criteria = 0;
1460         gchar * expr = NULL;
1461
1462         criteria = MATCHCRITERIA_REFERENCES;
1463         expr = yyvsp[0].str;
1464         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1465 ;
1466     break;}
1467 case 56:
1468 #line 567 "matcher_parser_parse.y"
1469 {
1470         gint criteria = 0;
1471         gchar * expr = NULL;
1472
1473         criteria = MATCHCRITERIA_NOT_REFERENCES;
1474         expr = yyvsp[0].str;
1475         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1476 ;
1477     break;}
1478 case 57:
1479 #line 576 "matcher_parser_parse.y"
1480 {
1481         gint criteria = 0;
1482         gint value = 0;
1483
1484         criteria = MATCHCRITERIA_SCORE_GREATER;
1485         value = atoi(yyvsp[0].value);
1486         prop = matcherprop_new(criteria, NULL, 0, NULL, value);
1487 ;
1488     break;}
1489 case 58:
1490 #line 585 "matcher_parser_parse.y"
1491 {
1492         gint criteria = 0;
1493         gint value = 0;
1494
1495         criteria = MATCHCRITERIA_SCORE_LOWER;
1496         value = atoi(yyvsp[0].value);
1497         prop = matcherprop_new(criteria, NULL, 0, NULL, value);
1498 ;
1499     break;}
1500 case 59:
1501 #line 594 "matcher_parser_parse.y"
1502 {
1503         gint criteria = 0;
1504         gint value = 0;
1505
1506         criteria = MATCHCRITERIA_SCORE_EQUAL;
1507         value = atoi(yyvsp[0].value);
1508         prop = matcherprop_new(criteria, NULL, 0, NULL, value);
1509 ;
1510     break;}
1511 case 60:
1512 #line 603 "matcher_parser_parse.y"
1513 {
1514         header = g_strdup(yyvsp[0].str);
1515 ;
1516     break;}
1517 case 61:
1518 #line 606 "matcher_parser_parse.y"
1519 {
1520         gint criteria = 0;
1521         gchar * expr = NULL;
1522
1523         criteria = MATCHCRITERIA_HEADER;
1524         expr = yyvsp[-3].str;
1525         prop = matcherprop_new(criteria, header, match_type, expr, 0);
1526         g_free(header);
1527 ;
1528     break;}
1529 case 62:
1530 #line 616 "matcher_parser_parse.y"
1531 {
1532         header = g_strdup(yyvsp[0].str);
1533 ;
1534     break;}
1535 case 63:
1536 #line 619 "matcher_parser_parse.y"
1537 {
1538         gint criteria = 0;
1539         gchar * expr = NULL;
1540
1541         criteria = MATCHCRITERIA_NOT_HEADER;
1542         expr = yyvsp[-3].str;
1543         prop = matcherprop_new(criteria, header, match_type, expr, 0);
1544         g_free(header);
1545 ;
1546     break;}
1547 case 64:
1548 #line 629 "matcher_parser_parse.y"
1549 {
1550         gint criteria = 0;
1551         gchar * expr = NULL;
1552
1553         criteria = MATCHCRITERIA_HEADERS_PART;
1554         expr = yyvsp[0].str;
1555         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1556 ;
1557     break;}
1558 case 65:
1559 #line 638 "matcher_parser_parse.y"
1560 {
1561         gint criteria = 0;
1562         gchar * expr = NULL;
1563
1564         criteria = MATCHCRITERIA_NOT_HEADERS_PART;
1565         expr = yyvsp[0].str;
1566         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1567 ;
1568     break;}
1569 case 66:
1570 #line 647 "matcher_parser_parse.y"
1571 {
1572         gint criteria = 0;
1573         gchar * expr = NULL;
1574
1575         criteria = MATCHCRITERIA_MESSAGE;
1576         expr = yyvsp[0].str;
1577         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1578 ;
1579     break;}
1580 case 67:
1581 #line 656 "matcher_parser_parse.y"
1582 {
1583         gint criteria = 0;
1584         gchar * expr = NULL;
1585
1586         criteria = MATCHCRITERIA_NOT_MESSAGE;
1587         expr = yyvsp[0].str;
1588         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1589 ;
1590     break;}
1591 case 68:
1592 #line 665 "matcher_parser_parse.y"
1593 {
1594         gint criteria = 0;
1595         gchar * expr = NULL;
1596
1597         criteria = MATCHCRITERIA_BODY_PART;
1598         expr = yyvsp[0].str;
1599         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1600 ;
1601     break;}
1602 case 69:
1603 #line 674 "matcher_parser_parse.y"
1604 {
1605         gint criteria = 0;
1606         gchar * expr = NULL;
1607
1608         criteria = MATCHCRITERIA_NOT_BODY_PART;
1609         expr = yyvsp[0].str;
1610         prop = matcherprop_new(criteria, NULL, match_type, expr, 0);
1611 ;
1612     break;}
1613 case 70:
1614 #line 683 "matcher_parser_parse.y"
1615 {
1616         gint criteria = 0;
1617         gchar * expr = NULL;
1618
1619         criteria = MATCHCRITERIA_EXECUTE;
1620         expr = yyvsp[0].str;
1621         prop = matcherprop_new(criteria, NULL, 0, expr, 0);
1622 ;
1623     break;}
1624 case 71:
1625 #line 692 "matcher_parser_parse.y"
1626 {
1627         gint criteria = 0;
1628         gchar * expr = NULL;
1629
1630         criteria = MATCHCRITERIA_NOT_EXECUTE;
1631         expr = yyvsp[0].str;
1632         prop = matcherprop_new(criteria, NULL, 0, expr, 0);
1633 ;
1634     break;}
1635 case 72:
1636 #line 704 "matcher_parser_parse.y"
1637 {
1638         gchar * cmd = NULL;
1639         gint action_type = 0;
1640
1641         action_type = MATCHACTION_EXECUTE;
1642         cmd = yyvsp[0].str;
1643         action = filteringaction_new(action_type, 0, cmd, 0);
1644 ;
1645     break;}
1646 case 73:
1647 #line 713 "matcher_parser_parse.y"
1648 {
1649         gchar * destination = NULL;
1650         gint action_type = 0;
1651
1652         action_type = MATCHACTION_MOVE;
1653         destination = yyvsp[0].str;
1654         action = filteringaction_new(action_type, 0, destination, 0);
1655 ;
1656     break;}
1657 case 74:
1658 #line 722 "matcher_parser_parse.y"
1659 {
1660         gchar * destination = NULL;
1661         gint action_type = 0;
1662
1663         action_type = MATCHACTION_COPY;
1664         destination = yyvsp[0].str;
1665         action = filteringaction_new(action_type, 0, destination, 0);
1666 ;
1667     break;}
1668 case 75:
1669 #line 731 "matcher_parser_parse.y"
1670 {
1671         gint action_type = 0;
1672
1673         action_type = MATCHACTION_DELETE;
1674         action = filteringaction_new(action_type, 0, NULL, 0);
1675 ;
1676     break;}
1677 case 76:
1678 #line 738 "matcher_parser_parse.y"
1679 {
1680         gint action_type = 0;
1681
1682         action_type = MATCHACTION_MARK;
1683         action = filteringaction_new(action_type, 0, NULL, 0);
1684 ;
1685     break;}
1686 case 77:
1687 #line 745 "matcher_parser_parse.y"
1688 {
1689         gint action_type = 0;
1690
1691         action_type = MATCHACTION_UNMARK;
1692         action = filteringaction_new(action_type, 0, NULL, 0);
1693 ;
1694     break;}
1695 case 78:
1696 #line 752 "matcher_parser_parse.y"
1697 {
1698         gint action_type = 0;
1699
1700         action_type = MATCHACTION_MARK_AS_READ;
1701         action = filteringaction_new(action_type, 0, NULL, 0);
1702 ;
1703     break;}
1704 case 79:
1705 #line 759 "matcher_parser_parse.y"
1706 {
1707         gint action_type = 0;
1708
1709         action_type = MATCHACTION_MARK_AS_UNREAD;
1710         action = filteringaction_new(action_type, 0, NULL, 0);
1711 ;
1712     break;}
1713 case 80:
1714 #line 766 "matcher_parser_parse.y"
1715 {
1716         gchar * destination = NULL;
1717         gint action_type = 0;
1718         gint account_id = 0;
1719
1720         action_type = MATCHACTION_FORWARD;
1721         account_id = atoi(yyvsp[-1].value);
1722         destination = yyvsp[0].str;
1723         action = filteringaction_new(action_type, account_id, destination, 0);
1724 ;
1725     break;}
1726 case 81:
1727 #line 777 "matcher_parser_parse.y"
1728 {
1729         gchar * destination = NULL;
1730         gint action_type = 0;
1731         gint account_id = 0;
1732
1733         action_type = MATCHACTION_FORWARD_AS_ATTACHMENT;
1734         account_id = atoi(yyvsp[-1].value);
1735         destination = yyvsp[0].str;
1736         action = filteringaction_new(action_type, account_id, destination, 0);
1737 ;
1738     break;}
1739 case 82:
1740 #line 788 "matcher_parser_parse.y"
1741 {
1742         gchar * destination = NULL;
1743         gint action_type = 0;
1744         gint account_id = 0;
1745
1746         action_type = MATCHACTION_BOUNCE;
1747         account_id = atoi(yyvsp[-1].value);
1748         destination = yyvsp[0].str;
1749         action = filteringaction_new(action_type, account_id, destination, 0);
1750 ;
1751     break;}
1752 case 83:
1753 #line 799 "matcher_parser_parse.y"
1754 {
1755         gint action_type = 0;
1756         gint color = 0;
1757
1758         action_type = MATCHACTION_COLOR;
1759         color = atoi(yyvsp[0].value);
1760         action = filteringaction_new(action_type, 0, NULL, color);
1761 ;
1762     break;}
1763 case 84:
1764 #line 808 "matcher_parser_parse.y"
1765 {
1766         gint action_type = 0;
1767         action_type = MATCHACTION_DELETE_ON_SERVER;
1768         action = filteringaction_new(action_type, 0, NULL, 0);
1769 ;
1770     break;}
1771 case 85:
1772 #line 817 "matcher_parser_parse.y"
1773 {
1774         score = atoi(yyvsp[0].value);
1775 ;
1776     break;}
1777 }
1778    /* the action file gets copied in in place of this dollarsign */
1779 #line 543 "/usr/lib/bison.simple"
1780 \f
1781   yyvsp -= yylen;
1782   yyssp -= yylen;
1783 #ifdef YYLSP_NEEDED
1784   yylsp -= yylen;
1785 #endif
1786
1787 #if YYDEBUG != 0
1788   if (yydebug)
1789     {
1790       short *ssp1 = yyss - 1;
1791       fprintf (stderr, "state stack now");
1792       while (ssp1 != yyssp)
1793         fprintf (stderr, " %d", *++ssp1);
1794       fprintf (stderr, "\n");
1795     }
1796 #endif
1797
1798   *++yyvsp = yyval;
1799
1800 #ifdef YYLSP_NEEDED
1801   yylsp++;
1802   if (yylen == 0)
1803     {
1804       yylsp->first_line = yylloc.first_line;
1805       yylsp->first_column = yylloc.first_column;
1806       yylsp->last_line = (yylsp-1)->last_line;
1807       yylsp->last_column = (yylsp-1)->last_column;
1808       yylsp->text = 0;
1809     }
1810   else
1811     {
1812       yylsp->last_line = (yylsp+yylen-1)->last_line;
1813       yylsp->last_column = (yylsp+yylen-1)->last_column;
1814     }
1815 #endif
1816
1817   /* Now "shift" the result of the reduction.
1818      Determine what state that goes to,
1819      based on the state we popped back to
1820      and the rule number reduced by.  */
1821
1822   yyn = yyr1[yyn];
1823
1824   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1825   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1826     yystate = yytable[yystate];
1827   else
1828     yystate = yydefgoto[yyn - YYNTBASE];
1829
1830   goto yynewstate;
1831
1832 yyerrlab:   /* here on detecting error */
1833
1834   if (! yyerrstatus)
1835     /* If not already recovering from an error, report this error.  */
1836     {
1837       ++yynerrs;
1838
1839 #ifdef YYERROR_VERBOSE
1840       yyn = yypact[yystate];
1841
1842       if (yyn > YYFLAG && yyn < YYLAST)
1843         {
1844           int size = 0;
1845           char *msg;
1846           int x, count;
1847
1848           count = 0;
1849           /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
1850           for (x = (yyn < 0 ? -yyn : 0);
1851                x < (sizeof(yytname) / sizeof(char *)); x++)
1852             if (yycheck[x + yyn] == x)
1853               size += strlen(yytname[x]) + 15, count++;
1854           msg = (char *) malloc(size + 15);
1855           if (msg != 0)
1856             {
1857               strcpy(msg, "parse error");
1858
1859               if (count < 5)
1860                 {
1861                   count = 0;
1862                   for (x = (yyn < 0 ? -yyn : 0);
1863                        x < (sizeof(yytname) / sizeof(char *)); x++)
1864                     if (yycheck[x + yyn] == x)
1865                       {
1866                         strcat(msg, count == 0 ? ", expecting `" : " or `");
1867                         strcat(msg, yytname[x]);
1868                         strcat(msg, "'");
1869                         count++;
1870                       }
1871                 }
1872               yyerror(msg);
1873               free(msg);
1874             }
1875           else
1876             yyerror ("parse error; also virtual memory exceeded");
1877         }
1878       else
1879 #endif /* YYERROR_VERBOSE */
1880         yyerror("parse error");
1881     }
1882
1883   goto yyerrlab1;
1884 yyerrlab1:   /* here on error raised explicitly by an action */
1885
1886   if (yyerrstatus == 3)
1887     {
1888       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
1889
1890       /* return failure if at end of input */
1891       if (yychar == YYEOF)
1892         YYABORT;
1893
1894 #if YYDEBUG != 0
1895       if (yydebug)
1896         fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
1897 #endif
1898
1899       yychar = YYEMPTY;
1900     }
1901
1902   /* Else will try to reuse lookahead token
1903      after shifting the error token.  */
1904
1905   yyerrstatus = 3;              /* Each real token shifted decrements this */
1906
1907   goto yyerrhandle;
1908
1909 yyerrdefault:  /* current state does not do anything special for the error token. */
1910
1911 #if 0
1912   /* This is wrong; only states that explicitly want error tokens
1913      should shift them.  */
1914   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
1915   if (yyn) goto yydefault;
1916 #endif
1917
1918 yyerrpop:   /* pop the current state because it cannot handle the error token */
1919
1920   if (yyssp == yyss) YYABORT;
1921   yyvsp--;
1922   yystate = *--yyssp;
1923 #ifdef YYLSP_NEEDED
1924   yylsp--;
1925 #endif
1926
1927 #if YYDEBUG != 0
1928   if (yydebug)
1929     {
1930       short *ssp1 = yyss - 1;
1931       fprintf (stderr, "Error: state stack now");
1932       while (ssp1 != yyssp)
1933         fprintf (stderr, " %d", *++ssp1);
1934       fprintf (stderr, "\n");
1935     }
1936 #endif
1937
1938 yyerrhandle:
1939
1940   yyn = yypact[yystate];
1941   if (yyn == YYFLAG)
1942     goto yyerrdefault;
1943
1944   yyn += YYTERROR;
1945   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1946     goto yyerrdefault;
1947
1948   yyn = yytable[yyn];
1949   if (yyn < 0)
1950     {
1951       if (yyn == YYFLAG)
1952         goto yyerrpop;
1953       yyn = -yyn;
1954       goto yyreduce;
1955     }
1956   else if (yyn == 0)
1957     goto yyerrpop;
1958
1959   if (yyn == YYFINAL)
1960     YYACCEPT;
1961
1962 #if YYDEBUG != 0
1963   if (yydebug)
1964     fprintf(stderr, "Shifting error token, ");
1965 #endif
1966
1967   *++yyvsp = yylval;
1968 #ifdef YYLSP_NEEDED
1969   *++yylsp = yylloc;
1970 #endif
1971
1972   yystate = yyn;
1973   goto yynewstate;
1974
1975  yyacceptlab:
1976   /* YYACCEPT comes here.  */
1977   if (yyfree_stacks)
1978     {
1979       free (yyss);
1980       free (yyvs);
1981 #ifdef YYLSP_NEEDED
1982       free (yyls);
1983 #endif
1984     }
1985   return 0;
1986
1987  yyabortlab:
1988   /* YYABORT comes here.  */
1989   if (yyfree_stacks)
1990     {
1991       free (yyss);
1992       free (yyvs);
1993 #ifdef YYLSP_NEEDED
1994       free (yyls);
1995 #endif
1996     }
1997   return 1;
1998 }
1999 #line 821 "matcher_parser_parse.y"