1 /* A Bison parser, made by GNU Bison 3.3.2.  */
2 
3 /* Bison interface for Yacc-like parsers in C
4 
5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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 /* Undocumented macros, especially those whose name start with YY_,
35    are private implementation details.  Do not rely on them.  */
36 
37 #ifndef YY_SIEVE_SIEVE_SIEVE_H_INCLUDED
38 # define YY_SIEVE_SIEVE_SIEVE_H_INCLUDED
39 /* Debug traces.  */
40 #ifndef YYDEBUG
41 # define YYDEBUG 0
42 #endif
43 #if YYDEBUG
44 extern int sievedebug;
45 #endif
46 
47 /* Token type.  */
48 #ifndef YYTOKENTYPE
49 # define YYTOKENTYPE
50   enum yytokentype
51   {
52     NUMBER = 258,
53     STRING = 259,
54     IF = 260,
55     ELSIF = 261,
56     ELSE = 262,
57     REJCT = 263,
58     FILEINTO = 264,
59     REDIRECT = 265,
60     KEEP = 266,
61     STOP = 267,
62     DISCARD = 268,
63     VACATION = 269,
64     REQUIRE = 270,
65     MARK = 271,
66     UNMARK = 272,
67     FLAGS = 273,
68     NOTIFY = 274,
69     DENOTIFY = 275,
70     ANYOF = 276,
71     ALLOF = 277,
72     EXISTS = 278,
73     SFALSE = 279,
74     STRUE = 280,
75     HEADER = 281,
76     NOT = 282,
77     SIZE = 283,
78     ADDRESS = 284,
79     ENVELOPE = 285,
80     BODY = 286,
81     COMPARATOR = 287,
82     IS = 288,
83     CONTAINS = 289,
84     MATCHES = 290,
85     REGEX = 291,
86     COUNT = 292,
87     VALUE = 293,
88     OVER = 294,
89     UNDER = 295,
90     GT = 296,
91     GE = 297,
92     LT = 298,
93     LE = 299,
94     EQ = 300,
95     NE = 301,
96     ALL = 302,
97     LOCALPART = 303,
98     DOMAIN = 304,
99     USER = 305,
100     DETAIL = 306,
101     RAW = 307,
102     TEXT = 308,
103     CONTENT = 309,
104     DAYS = 310,
105     ADDRESSES = 311,
106     SUBJECT = 312,
107     FROM = 313,
108     HANDLE = 314,
109     MIME = 315,
110     SECONDS = 316,
111     METHOD = 317,
112     ID = 318,
113     OPTIONS = 319,
114     LOW = 320,
115     NORMAL = 321,
116     HIGH = 322,
117     ANY = 323,
118     MESSAGE = 324,
119     INCLUDE = 325,
120     PERSONAL = 326,
121     GLOBAL = 327,
122     RETURN = 328,
123     OPTIONAL = 329,
124     ONCE = 330,
125     COPY = 331,
126     DATE = 332,
127     CURRENTDATE = 333,
128     INDEX = 334,
129     LAST = 335,
130     ZONE = 336,
131     ORIGINALZONE = 337,
132     MAILBOXEXISTS = 338,
133     CREATE = 339,
134     METADATA = 340,
135     METADATAEXISTS = 341,
136     SERVERMETADATA = 342,
137     SERVERMETADATAEXISTS = 343,
138     YEAR = 344,
139     MONTH = 345,
140     DAY = 346,
141     JULIAN = 347,
142     HOUR = 348,
143     MINUTE = 349,
144     SECOND = 350,
145     TIME = 351,
146     ISO8601 = 352,
147     STD11 = 353,
148     WEEKDAY = 354,
149     STRINGT = 355,
150     SET = 356,
151     LOWER = 357,
152     UPPER = 358,
153     LOWERFIRST = 359,
154     UPPERFIRST = 360,
155     QUOTEWILDCARD = 361,
156     LENGTH = 362,
157     SETFLAG = 363,
158     ADDFLAG = 364,
159     REMOVEFLAG = 365,
160     HASFLAG = 366
161   };
162 #endif
163 /* Tokens.  */
164 #define NUMBER 258
165 #define STRING 259
166 #define IF 260
167 #define ELSIF 261
168 #define ELSE 262
169 #define REJCT 263
170 #define FILEINTO 264
171 #define REDIRECT 265
172 #define KEEP 266
173 #define STOP 267
174 #define DISCARD 268
175 #define VACATION 269
176 #define REQUIRE 270
177 #define MARK 271
178 #define UNMARK 272
179 #define FLAGS 273
180 #define NOTIFY 274
181 #define DENOTIFY 275
182 #define ANYOF 276
183 #define ALLOF 277
184 #define EXISTS 278
185 #define SFALSE 279
186 #define STRUE 280
187 #define HEADER 281
188 #define NOT 282
189 #define SIZE 283
190 #define ADDRESS 284
191 #define ENVELOPE 285
192 #define BODY 286
193 #define COMPARATOR 287
194 #define IS 288
195 #define CONTAINS 289
196 #define MATCHES 290
197 #define REGEX 291
198 #define COUNT 292
199 #define VALUE 293
200 #define OVER 294
201 #define UNDER 295
202 #define GT 296
203 #define GE 297
204 #define LT 298
205 #define LE 299
206 #define EQ 300
207 #define NE 301
208 #define ALL 302
209 #define LOCALPART 303
210 #define DOMAIN 304
211 #define USER 305
212 #define DETAIL 306
213 #define RAW 307
214 #define TEXT 308
215 #define CONTENT 309
216 #define DAYS 310
217 #define ADDRESSES 311
218 #define SUBJECT 312
219 #define FROM 313
220 #define HANDLE 314
221 #define MIME 315
222 #define SECONDS 316
223 #define METHOD 317
224 #define ID 318
225 #define OPTIONS 319
226 #define LOW 320
227 #define NORMAL 321
228 #define HIGH 322
229 #define ANY 323
230 #define MESSAGE 324
231 #define INCLUDE 325
232 #define PERSONAL 326
233 #define GLOBAL 327
234 #define RETURN 328
235 #define OPTIONAL 329
236 #define ONCE 330
237 #define COPY 331
238 #define DATE 332
239 #define CURRENTDATE 333
240 #define INDEX 334
241 #define LAST 335
242 #define ZONE 336
243 #define ORIGINALZONE 337
244 #define MAILBOXEXISTS 338
245 #define CREATE 339
246 #define METADATA 340
247 #define METADATAEXISTS 341
248 #define SERVERMETADATA 342
249 #define SERVERMETADATAEXISTS 343
250 #define YEAR 344
251 #define MONTH 345
252 #define DAY 346
253 #define JULIAN 347
254 #define HOUR 348
255 #define MINUTE 349
256 #define SECOND 350
257 #define TIME 351
258 #define ISO8601 352
259 #define STD11 353
260 #define WEEKDAY 354
261 #define STRINGT 355
262 #define SET 356
263 #define LOWER 357
264 #define UPPER 358
265 #define LOWERFIRST 359
266 #define UPPERFIRST 360
267 #define QUOTEWILDCARD 361
268 #define LENGTH 362
269 #define SETFLAG 363
270 #define ADDFLAG 364
271 #define REMOVEFLAG 365
272 #define HASFLAG 366
273 
274 /* Value type.  */
275 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
276 
277 union YYSTYPE
278 {
279 #line 238 "sieve/sieve.y" /* yacc.c:1921  */
280 
281     int nval;
282     char *sval;
283     strarray_t *sl;
284     test_t *test;
285     testlist_t *testl;
286     commandlist_t *cl;
287     struct vtags *vtag;
288     struct aetags *aetag;
289     struct comptags *ctag;
290     struct btags *btag;
291     struct ntags *ntag;
292     struct dtags *dtag;
293     struct itags *itag;
294     struct dttags *dttag;
295     struct ftags *ftag;
296     struct stags *stag;
297 
298 #line 299 "sieve/sieve.h" /* yacc.c:1921  */
299 };
300 
301 typedef union YYSTYPE YYSTYPE;
302 # define YYSTYPE_IS_TRIVIAL 1
303 # define YYSTYPE_IS_DECLARED 1
304 #endif
305 
306 
307 
308 int sieveparse (sieve_script_t *parse_script);
309 
310 #endif /* !YY_SIEVE_SIEVE_SIEVE_H_INCLUDED  */
311