~ubuntu-dev/ubuntu/lucid/dovecot/lucid-201002110912

« back to all changes in this revision

Viewing changes to dovecot-sieve/src/libsieve/addr.c

  • Committer: Bazaar Package Importer
  • Author(s): CHuck Short, Chuck Short
  • Date: 2009-11-06 00:47:29 UTC
  • mfrom: (4.1.9 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091106004729-i39n7v9e7d4h51f6
Tags: 1:1.2.6-1ubuntu1
* Merge from debian testing, remaining changes:
  Add new binary pkg dovecot-postfix that integrates postfix and dovecot
  automatically: (LP: #164837)
  + debian/control:
    - add new binary with short description
    - set Architecture all for dovecot-postfix (LP: #329878)
  + debian/dovecot-postfix.postinst:
    - create initial certificate symlinks to snakeoil.
    - set up postfix with postconf to:
      - use Maildir/ as the default mailbox.
      - use dovecot as the sasl authentication server.
      - use dovecot LDA (deliver).
      - use tls for smtp{d} services.
    - fix certificates paths in postfix' main.cf
    - add reject_unauth_destination to postfix' recipient restrictions
    - add reject_unknown_sender_domain to postfix' sender restrictions
    - rename configuration name on remove, delete on purge
    - restart dovecot after linking certificates
    - handle use case when postfix is unconfigurated
   + debian/dovecot-postfix.dirs: create backup directory for postfix's configuration
   + restart postfix and dovecot.
   + debian/dovecot-postfix.postrm:
     - remove all dovecot related configuration from postfix.
     - restart postfix and dovecot.
   + debian/dovecot-common.init:
     - check if /etc/dovecot/dovecot-postfix.conf exists and use it
       as the configuration file if so.
   + debian/patches/warning-ubuntu-postfix.dpatch
     - add warning about dovecot-postfix.conf in dovecot default 
       configuration file
   + debian/patches/dovecot-postfix.conf.diff:
     - Ubuntu server custom changes to the default dovecot configuration for
       better interfation with postfix
     - enable sieve plugin
   + debian/patches/dovecot-postfix.conf.diff:
     + Ubuntu server custom changes to the default dovecot configuration for
       better integration with postfix:
       - enable imap, pop3, imaps, pop3s and managesieve by default.
       - enable dovecot LDA (deliver).
       - enable SASL auth socket in postfix private directory.
   + debian/rules:
     - copy, patch and install dovecot-postfix.conf in /etc/dovecot/.
     - build architecure independent packages too
   + Use Snakeoil SSL certificates by default.
     - debian/control: Depend on ssl-cert.
     - debian/patches/ssl-cert-snakeoil.dpatch: Change default SSL cert
       paths to snakeoil.
     - debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
   + Add autopkgtest to debian/tests/*.
   + Fast TearDown: Update the lsb init header to not stop in level 6.
   + Add ufw integration:
     - Created debian/dovecot-common.ufw.profile.
     - debian/rules:
       + install profile
     - debian/control:
       + Suggest ufw
   + debian/{control,rules}: enable PIE hardening.
   + dovecot-imapd, dovecot-pop3: Replaces dovecot-common (<< 1:1.1). LP: #254721
   + debian/control:
     - Update Vcs-* headers.
   + debian/rules:
     - Create emtpy stamp.h.in files in dovecot-sieve/ and dovecot-managesieve/
       if they're not there since empty files are not included in the diff.gz 
       file.
   + Add SMTP-AUTH support for Outlook (login auth mechanism)
   + Dropped:
     - debian/patches/security-CVE-2009-3235: Applied upstream.
     - debian/patches/fix-pop3-assertion.dpatch: Applied upstream.
     - dovecot-sieve and dovecot-managesieve: Use the debian patches instead.

  [Chuck Short]
  - Updated dovecot-sieve to 0.1.13.
  - Updated dovecot-managesieve to 0.11.9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A Bison parser, made by GNU Bison 2.3.  */
2
 
 
3
 
/* Skeleton implementation for Bison's Yacc-like parsers in C
4
 
 
5
 
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
 
   Free Software Foundation, 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 2, or (at your option)
11
 
   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, write to the Free Software
20
 
   Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
 
   Boston, MA 02110-1301, USA.  */
22
 
 
23
 
/* As a special exception, you may create a larger work that contains
24
 
   part or all of the Bison parser skeleton and distribute that work
25
 
   under terms of your choice, so long as that work isn't itself a
26
 
   parser generator using the skeleton or a modified version thereof
27
 
   as a parser skeleton.  Alternatively, if you modify or redistribute
28
 
   the parser skeleton itself, you may (at your option) remove this
29
 
   special exception, which will cause the skeleton and the resulting
30
 
   Bison output files to be licensed under the GNU General Public
31
 
   License without this special exception.
32
 
 
33
 
   This special exception was added by the Free Software Foundation in
34
 
   version 2.2 of Bison.  */
35
 
 
36
 
/* C LALR(1) parser skeleton written by Richard Stallman, by
37
 
   simplifying the original so-called "semantic" parser.  */
38
 
 
39
 
/* All symbols defined below should begin with yy or YY, to avoid
40
 
   infringing on user name space.  This should be done even for local
41
 
   variables, as they might otherwise be expanded by user macros.
42
 
   There are some unavoidable exceptions within include files to
43
 
   define necessary library symbols; they are noted "INFRINGES ON
44
 
   USER NAME SPACE" below.  */
45
 
 
46
 
/* Identify Bison output.  */
47
 
#define YYBISON 1
48
 
 
49
 
/* Bison version.  */
50
 
#define YYBISON_VERSION "2.3"
51
 
 
52
 
/* Skeleton name.  */
53
 
#define YYSKELETON_NAME "yacc.c"
54
 
 
55
 
/* Pure parsers.  */
56
 
#define YYPURE 0
57
 
 
58
 
/* Using locations.  */
59
 
#define YYLSP_NEEDED 0
60
 
 
61
 
/* Substitute the variable and function names.  */
62
 
#define yyparse addrparse
63
 
#define yylex   addrlex
64
 
#define yyerror addrerror
65
 
#define yylval  addrlval
66
 
#define yychar  addrchar
67
 
#define yydebug addrdebug
68
 
#define yynerrs addrnerrs
69
 
 
70
 
 
71
 
/* Tokens.  */
72
 
#ifndef YYTOKENTYPE
73
 
# define YYTOKENTYPE
74
 
   /* Put the tokens into the symbol table, so that GDB and other debuggers
75
 
      know about them.  */
76
 
   enum yytokentype {
77
 
     ATOM = 258,
78
 
     QTEXT = 259,
79
 
     DTEXT = 260
80
 
   };
81
 
#endif
82
 
/* Tokens.  */
83
 
#define ATOM 258
84
 
#define QTEXT 259
85
 
#define DTEXT 260
86
 
 
87
 
 
88
 
 
89
 
 
90
 
/* Copy the first part of user declarations.  */
91
 
#line 1 "addr.y"
92
 
 
93
 
/*
94
 
 * addr.y -- RFC 822 address parser
95
 
 * Ken Murchison
96
 
 * $Id$
97
 
 */
98
 
/***********************************************************
99
 
        Copyright 1999 by Carnegie Mellon University
100
 
 
101
 
                      All Rights Reserved
102
 
 
103
 
Permission to use, copy, modify, and distribute this software and its
104
 
documentation for any purpose and without fee is hereby granted,
105
 
provided that the above copyright notice appear in all copies and that
106
 
both that copyright notice and this permission notice appear in
107
 
supporting documentation, and that the name of Carnegie Mellon
108
 
University not be used in advertising or publicity pertaining to
109
 
distribution of the software without specific, written prior
110
 
permission.
111
 
 
112
 
CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
113
 
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
114
 
FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
115
 
ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
116
 
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
117
 
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
118
 
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
119
 
******************************************************************/
120
 
 
121
 
#include <stdlib.h>
122
 
#include <string.h>
123
 
 
124
 
#include "addr.h"
125
 
#include "script.h"
126
 
#include "xmalloc.h"
127
 
    
128
 
int addrerror(char *msg);
129
 
extern int yylex(void);
130
 
 
131
 
#define YYERROR_VERBOSE /* i want better error messages! */
132
 
 
133
 
 
134
 
/* Enabling traces.  */
135
 
#ifndef YYDEBUG
136
 
# define YYDEBUG 0
137
 
#endif
138
 
 
139
 
/* Enabling verbose error messages.  */
140
 
#ifdef YYERROR_VERBOSE
141
 
# undef YYERROR_VERBOSE
142
 
# define YYERROR_VERBOSE 1
143
 
#else
144
 
# define YYERROR_VERBOSE 0
145
 
#endif
146
 
 
147
 
/* Enabling the token table.  */
148
 
#ifndef YYTOKEN_TABLE
149
 
# define YYTOKEN_TABLE 0
150
 
#endif
151
 
 
152
 
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
153
 
typedef int YYSTYPE;
154
 
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
155
 
# define YYSTYPE_IS_DECLARED 1
156
 
# define YYSTYPE_IS_TRIVIAL 1
157
 
#endif
158
 
 
159
 
 
160
 
 
161
 
/* Copy the second part of user declarations.  */
162
 
 
163
 
 
164
 
/* Line 216 of yacc.c.  */
165
 
#line 166 "addr.c"
166
 
 
167
 
#ifdef short
168
 
# undef short
169
 
#endif
170
 
 
171
 
#ifdef YYTYPE_UINT8
172
 
typedef YYTYPE_UINT8 yytype_uint8;
173
 
#else
174
 
typedef unsigned char yytype_uint8;
175
 
#endif
176
 
 
177
 
#ifdef YYTYPE_INT8
178
 
typedef YYTYPE_INT8 yytype_int8;
179
 
#elif (defined __STDC__ || defined __C99__FUNC__ \
180
 
     || defined __cplusplus || defined _MSC_VER)
181
 
typedef signed char yytype_int8;
182
 
#else
183
 
typedef short int yytype_int8;
184
 
#endif
185
 
 
186
 
#ifdef YYTYPE_UINT16
187
 
typedef YYTYPE_UINT16 yytype_uint16;
188
 
#else
189
 
typedef unsigned short int yytype_uint16;
190
 
#endif
191
 
 
192
 
#ifdef YYTYPE_INT16
193
 
typedef YYTYPE_INT16 yytype_int16;
194
 
#else
195
 
typedef short int yytype_int16;
196
 
#endif
197
 
 
198
 
#ifndef YYSIZE_T
199
 
# ifdef __SIZE_TYPE__
200
 
#  define YYSIZE_T __SIZE_TYPE__
201
 
# elif defined size_t
202
 
#  define YYSIZE_T size_t
203
 
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
204
 
     || defined __cplusplus || defined _MSC_VER)
205
 
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
206
 
#  define YYSIZE_T size_t
207
 
# else
208
 
#  define YYSIZE_T unsigned int
209
 
# endif
210
 
#endif
211
 
 
212
 
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
213
 
 
214
 
#ifndef YY_
215
 
# if YYENABLE_NLS
216
 
#  if ENABLE_NLS
217
 
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
218
 
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
219
 
#  endif
220
 
# endif
221
 
# ifndef YY_
222
 
#  define YY_(msgid) msgid
223
 
# endif
224
 
#endif
225
 
 
226
 
/* Suppress unused-variable warnings by "using" E.  */
227
 
#if ! defined lint || defined __GNUC__
228
 
# define YYUSE(e) ((void) (e))
229
 
#else
230
 
# define YYUSE(e) /* empty */
231
 
#endif
232
 
 
233
 
/* Identity function, used to suppress warnings about constant conditions.  */
234
 
#ifndef lint
235
 
# define YYID(n) (n)
236
 
#else
237
 
#if (defined __STDC__ || defined __C99__FUNC__ \
238
 
     || defined __cplusplus || defined _MSC_VER)
239
 
static int
240
 
YYID (int i)
241
 
#else
242
 
static int
243
 
YYID (i)
244
 
    int i;
245
 
#endif
246
 
{
247
 
  return i;
248
 
}
249
 
#endif
250
 
 
251
 
#if ! defined yyoverflow || YYERROR_VERBOSE
252
 
 
253
 
/* The parser invokes alloca or malloc; define the necessary symbols.  */
254
 
 
255
 
# ifdef YYSTACK_USE_ALLOCA
256
 
#  if YYSTACK_USE_ALLOCA
257
 
#   ifdef __GNUC__
258
 
#    define YYSTACK_ALLOC __builtin_alloca
259
 
#   elif defined __BUILTIN_VA_ARG_INCR
260
 
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
261
 
#   elif defined _AIX
262
 
#    define YYSTACK_ALLOC __alloca
263
 
#   elif defined _MSC_VER
264
 
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
265
 
#    define alloca _alloca
266
 
#   else
267
 
#    define YYSTACK_ALLOC alloca
268
 
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
269
 
     || defined __cplusplus || defined _MSC_VER)
270
 
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
271
 
#     ifndef _STDLIB_H
272
 
#      define _STDLIB_H 1
273
 
#     endif
274
 
#    endif
275
 
#   endif
276
 
#  endif
277
 
# endif
278
 
 
279
 
# ifdef YYSTACK_ALLOC
280
 
   /* Pacify GCC's `empty if-body' warning.  */
281
 
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
282
 
#  ifndef YYSTACK_ALLOC_MAXIMUM
283
 
    /* The OS might guarantee only one guard page at the bottom of the stack,
284
 
       and a page size can be as small as 4096 bytes.  So we cannot safely
285
 
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
286
 
       to allow for a few compiler-allocated temporary stack slots.  */
287
 
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
288
 
#  endif
289
 
# else
290
 
#  define YYSTACK_ALLOC YYMALLOC
291
 
#  define YYSTACK_FREE YYFREE
292
 
#  ifndef YYSTACK_ALLOC_MAXIMUM
293
 
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
294
 
#  endif
295
 
#  if (defined __cplusplus && ! defined _STDLIB_H \
296
 
       && ! ((defined YYMALLOC || defined malloc) \
297
 
             && (defined YYFREE || defined free)))
298
 
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
299
 
#   ifndef _STDLIB_H
300
 
#    define _STDLIB_H 1
301
 
#   endif
302
 
#  endif
303
 
#  ifndef YYMALLOC
304
 
#   define YYMALLOC malloc
305
 
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
306
 
     || defined __cplusplus || defined _MSC_VER)
307
 
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
308
 
#   endif
309
 
#  endif
310
 
#  ifndef YYFREE
311
 
#   define YYFREE free
312
 
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
313
 
     || defined __cplusplus || defined _MSC_VER)
314
 
void free (void *); /* INFRINGES ON USER NAME SPACE */
315
 
#   endif
316
 
#  endif
317
 
# endif
318
 
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
319
 
 
320
 
 
321
 
#if (! defined yyoverflow \
322
 
     && (! defined __cplusplus \
323
 
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
324
 
 
325
 
/* A type that is properly aligned for any stack member.  */
326
 
union yyalloc
327
 
{
328
 
  yytype_int16 yyss;
329
 
  YYSTYPE yyvs;
330
 
  };
331
 
 
332
 
/* The size of the maximum gap between one aligned stack and the next.  */
333
 
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
334
 
 
335
 
/* The size of an array large to enough to hold all stacks, each with
336
 
   N elements.  */
337
 
# define YYSTACK_BYTES(N) \
338
 
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
339
 
      + YYSTACK_GAP_MAXIMUM)
340
 
 
341
 
/* Copy COUNT objects from FROM to TO.  The source and destination do
342
 
   not overlap.  */
343
 
# ifndef YYCOPY
344
 
#  if defined __GNUC__ && 1 < __GNUC__
345
 
#   define YYCOPY(To, From, Count) \
346
 
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
347
 
#  else
348
 
#   define YYCOPY(To, From, Count)              \
349
 
      do                                        \
350
 
        {                                       \
351
 
          YYSIZE_T yyi;                         \
352
 
          for (yyi = 0; yyi < (Count); yyi++)   \
353
 
            (To)[yyi] = (From)[yyi];            \
354
 
        }                                       \
355
 
      while (YYID (0))
356
 
#  endif
357
 
# endif
358
 
 
359
 
/* Relocate STACK from its old location to the new one.  The
360
 
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
361
 
   elements in the stack, and YYPTR gives the new location of the
362
 
   stack.  Advance YYPTR to a properly aligned location for the next
363
 
   stack.  */
364
 
# define YYSTACK_RELOCATE(Stack)                                        \
365
 
    do                                                                  \
366
 
      {                                                                 \
367
 
        YYSIZE_T yynewbytes;                                            \
368
 
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
369
 
        Stack = &yyptr->Stack;                                          \
370
 
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
371
 
        yyptr += yynewbytes / sizeof (*yyptr);                          \
372
 
      }                                                                 \
373
 
    while (YYID (0))
374
 
 
375
 
#endif
376
 
 
377
 
/* YYFINAL -- State number of the termination state.  */
378
 
#define YYFINAL  10
379
 
/* YYLAST -- Last index in YYTABLE.  */
380
 
#define YYLAST   26
381
 
 
382
 
/* YYNTOKENS -- Number of terminals.  */
383
 
#define YYNTOKENS  13
384
 
/* YYNNTS -- Number of nonterminals.  */
385
 
#define YYNNTS  11
386
 
/* YYNRULES -- Number of rules.  */
387
 
#define YYNRULES  17
388
 
/* YYNRULES -- Number of states.  */
389
 
#define YYNSTATES  31
390
 
 
391
 
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
392
 
#define YYUNDEFTOK  2
393
 
#define YYMAXUTOK   260
394
 
 
395
 
#define YYTRANSLATE(YYX)                                                \
396
 
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
397
 
 
398
 
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
399
 
static const yytype_uint8 yytranslate[] =
400
 
{
401
 
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
402
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
403
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
404
 
       2,     2,     2,     2,    12,     2,     2,     2,     2,     2,
405
 
       2,     2,     2,     2,     2,     2,     9,     2,     2,     2,
406
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
407
 
       6,     2,     7,     2,     8,     2,     2,     2,     2,     2,
408
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
409
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
410
 
       2,    10,     2,    11,     2,     2,     2,     2,     2,     2,
411
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
412
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
413
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
414
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
415
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
416
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
417
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
418
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
419
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
420
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
421
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
422
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
423
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
424
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
425
 
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
426
 
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
427
 
       5
428
 
};
429
 
 
430
 
#if YYDEBUG
431
 
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
432
 
   YYRHS.  */
433
 
static const yytype_uint8 yyprhs[] =
434
 
{
435
 
       0,     0,     3,     5,    10,    14,    16,    20,    22,    26,
436
 
      28,    30,    32,    36,    38,    41,    43,    45
437
 
};
438
 
 
439
 
/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
440
 
static const yytype_int8 yyrhs[] =
441
 
{
442
 
      14,     0,    -1,    15,    -1,    21,     6,    15,     7,    -1,
443
 
      16,     8,    17,    -1,    22,    -1,    22,     9,    16,    -1,
444
 
      18,    -1,    18,     9,    17,    -1,    19,    -1,    20,    -1,
445
 
       3,    -1,    10,     5,    11,    -1,    22,    -1,    22,    21,
446
 
      -1,     3,    -1,    23,    -1,    12,     4,    12,    -1
447
 
};
448
 
 
449
 
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
450
 
static const yytype_uint8 yyrline[] =
451
 
{
452
 
       0,    46,    46,    47,    50,    53,    54,    57,    58,    61,
453
 
      62,    65,    68,    71,    72,    75,    76,    79
454
 
};
455
 
#endif
456
 
 
457
 
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
458
 
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
459
 
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
460
 
static const char *const yytname[] =
461
 
{
462
 
  "$end", "error", "$undefined", "ATOM", "QTEXT", "DTEXT", "'<'", "'>'",
463
 
  "'@'", "'.'", "'['", "']'", "'\"'", "$accept", "sieve_address",
464
 
  "addrspec", "localpart", "domain", "subdomain", "domainref", "domainlit",
465
 
  "phrase", "word", "qstring", 0
466
 
};
467
 
#endif
468
 
 
469
 
# ifdef YYPRINT
470
 
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
471
 
   token YYLEX-NUM.  */
472
 
static const yytype_uint16 yytoknum[] =
473
 
{
474
 
       0,   256,   257,   258,   259,   260,    60,    62,    64,    46,
475
 
      91,    93,    34
476
 
};
477
 
# endif
478
 
 
479
 
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
480
 
static const yytype_uint8 yyr1[] =
481
 
{
482
 
       0,    13,    14,    14,    15,    16,    16,    17,    17,    18,
483
 
      18,    19,    20,    21,    21,    22,    22,    23
484
 
};
485
 
 
486
 
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
487
 
static const yytype_uint8 yyr2[] =
488
 
{
489
 
       0,     2,     1,     4,     3,     1,     3,     1,     3,     1,
490
 
       1,     1,     3,     1,     2,     1,     1,     3
491
 
};
492
 
 
493
 
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
494
 
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
495
 
   means the default is an error.  */
496
 
static const yytype_uint8 yydefact[] =
497
 
{
498
 
       0,    15,     0,     0,     2,     0,     0,     5,    16,     0,
499
 
       1,     0,     0,     0,    14,    13,    17,    11,     0,     4,
500
 
       7,     9,    10,     0,     5,     6,     0,     0,     3,    12,
501
 
       8
502
 
};
503
 
 
504
 
/* YYDEFGOTO[NTERM-NUM].  */
505
 
static const yytype_int8 yydefgoto[] =
506
 
{
507
 
      -1,     3,     4,     5,    19,    20,    21,    22,    14,    15,
508
 
       8
509
 
};
510
 
 
511
 
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
512
 
   STATE-NUM.  */
513
 
#define YYPACT_NINF -7
514
 
static const yytype_int8 yypact[] =
515
 
{
516
 
      -1,    -7,     1,     3,    -7,     6,    10,    -2,    -7,    -6,
517
 
      -7,     5,    -1,    -1,    -7,    -1,    -7,    -7,     4,    -7,
518
 
       8,    -7,    -7,    11,    12,    -7,     9,     5,    -7,    -7,
519
 
      -7
520
 
};
521
 
 
522
 
/* YYPGOTO[NTERM-NUM].  */
523
 
static const yytype_int8 yypgoto[] =
524
 
{
525
 
      -7,    -7,     7,    13,    -5,    -7,    -7,    -7,    23,     0,
526
 
      -7
527
 
};
528
 
 
529
 
/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
530
 
   positive, shift that token.  If negative, reduce the rule which
531
 
   number is the opposite.  If zero, do what YYDEFACT says.
532
 
   If YYTABLE_NINF, syntax error.  */
533
 
#define YYTABLE_NINF -14
534
 
static const yytype_int8 yytable[] =
535
 
{
536
 
       7,     1,     1,    10,   -13,     9,    16,    13,    17,    26,
537
 
       2,     2,    24,    24,    11,    18,    12,    27,    28,    23,
538
 
      29,    13,    30,     6,     0,     0,    25
539
 
};
540
 
 
541
 
static const yytype_int8 yycheck[] =
542
 
{
543
 
       0,     3,     3,     0,     6,     4,    12,     9,     3,     5,
544
 
      12,    12,    12,    13,     8,    10,     6,     9,     7,    12,
545
 
      11,     9,    27,     0,    -1,    -1,    13
546
 
};
547
 
 
548
 
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
549
 
   symbol of state STATE-NUM.  */
550
 
static const yytype_uint8 yystos[] =
551
 
{
552
 
       0,     3,    12,    14,    15,    16,    21,    22,    23,     4,
553
 
       0,     8,     6,     9,    21,    22,    12,     3,    10,    17,
554
 
      18,    19,    20,    15,    22,    16,     5,     9,     7,    11,
555
 
      17
556
 
};
557
 
 
558
 
#define yyerrok         (yyerrstatus = 0)
559
 
#define yyclearin       (yychar = YYEMPTY)
560
 
#define YYEMPTY         (-2)
561
 
#define YYEOF           0
562
 
 
563
 
#define YYACCEPT        goto yyacceptlab
564
 
#define YYABORT         goto yyabortlab
565
 
#define YYERROR         goto yyerrorlab
566
 
 
567
 
 
568
 
/* Like YYERROR except do call yyerror.  This remains here temporarily
569
 
   to ease the transition to the new meaning of YYERROR, for GCC.
570
 
   Once GCC version 2 has supplanted version 1, this can go.  */
571
 
 
572
 
#define YYFAIL          goto yyerrlab
573
 
 
574
 
#define YYRECOVERING()  (!!yyerrstatus)
575
 
 
576
 
#define YYBACKUP(Token, Value)                                  \
577
 
do                                                              \
578
 
  if (yychar == YYEMPTY && yylen == 1)                          \
579
 
    {                                                           \
580
 
      yychar = (Token);                                         \
581
 
      yylval = (Value);                                         \
582
 
      yytoken = YYTRANSLATE (yychar);                           \
583
 
      YYPOPSTACK (1);                                           \
584
 
      goto yybackup;                                            \
585
 
    }                                                           \
586
 
  else                                                          \
587
 
    {                                                           \
588
 
      yyerror (YY_("syntax error: cannot back up")); \
589
 
      YYERROR;                                                  \
590
 
    }                                                           \
591
 
while (YYID (0))
592
 
 
593
 
 
594
 
#define YYTERROR        1
595
 
#define YYERRCODE       256
596
 
 
597
 
 
598
 
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
599
 
   If N is 0, then set CURRENT to the empty location which ends
600
 
   the previous symbol: RHS[0] (always defined).  */
601
 
 
602
 
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
603
 
#ifndef YYLLOC_DEFAULT
604
 
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
605
 
    do                                                                  \
606
 
      if (YYID (N))                                                    \
607
 
        {                                                               \
608
 
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
609
 
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
610
 
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
611
 
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
612
 
        }                                                               \
613
 
      else                                                              \
614
 
        {                                                               \
615
 
          (Current).first_line   = (Current).last_line   =              \
616
 
            YYRHSLOC (Rhs, 0).last_line;                                \
617
 
          (Current).first_column = (Current).last_column =              \
618
 
            YYRHSLOC (Rhs, 0).last_column;                              \
619
 
        }                                                               \
620
 
    while (YYID (0))
621
 
#endif
622
 
 
623
 
 
624
 
/* YY_LOCATION_PRINT -- Print the location on the stream.
625
 
   This macro was not mandated originally: define only if we know
626
 
   we won't break user code: when these are the locations we know.  */
627
 
 
628
 
#ifndef YY_LOCATION_PRINT
629
 
# if YYLTYPE_IS_TRIVIAL
630
 
#  define YY_LOCATION_PRINT(File, Loc)                  \
631
 
     fprintf (File, "%d.%d-%d.%d",                      \
632
 
              (Loc).first_line, (Loc).first_column,     \
633
 
              (Loc).last_line,  (Loc).last_column)
634
 
# else
635
 
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
636
 
# endif
637
 
#endif
638
 
 
639
 
 
640
 
/* YYLEX -- calling `yylex' with the right arguments.  */
641
 
 
642
 
#ifdef YYLEX_PARAM
643
 
# define YYLEX yylex (YYLEX_PARAM)
644
 
#else
645
 
# define YYLEX yylex ()
646
 
#endif
647
 
 
648
 
/* Enable debugging if requested.  */
649
 
#if YYDEBUG
650
 
 
651
 
# ifndef YYFPRINTF
652
 
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
653
 
#  define YYFPRINTF fprintf
654
 
# endif
655
 
 
656
 
# define YYDPRINTF(Args)                        \
657
 
do {                                            \
658
 
  if (yydebug)                                  \
659
 
    YYFPRINTF Args;                             \
660
 
} while (YYID (0))
661
 
 
662
 
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
663
 
do {                                                                      \
664
 
  if (yydebug)                                                            \
665
 
    {                                                                     \
666
 
      YYFPRINTF (stderr, "%s ", Title);                                   \
667
 
      yy_symbol_print (stderr,                                            \
668
 
                  Type, Value); \
669
 
      YYFPRINTF (stderr, "\n");                                           \
670
 
    }                                                                     \
671
 
} while (YYID (0))
672
 
 
673
 
 
674
 
/*--------------------------------.
675
 
| Print this symbol on YYOUTPUT.  |
676
 
`--------------------------------*/
677
 
 
678
 
/*ARGSUSED*/
679
 
#if (defined __STDC__ || defined __C99__FUNC__ \
680
 
     || defined __cplusplus || defined _MSC_VER)
681
 
static void
682
 
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
683
 
#else
684
 
static void
685
 
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
686
 
    FILE *yyoutput;
687
 
    int yytype;
688
 
    YYSTYPE const * const yyvaluep;
689
 
#endif
690
 
{
691
 
  if (!yyvaluep)
692
 
    return;
693
 
# ifdef YYPRINT
694
 
  if (yytype < YYNTOKENS)
695
 
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
696
 
# else
697
 
  YYUSE (yyoutput);
698
 
# endif
699
 
  switch (yytype)
700
 
    {
701
 
      default:
702
 
        break;
703
 
    }
704
 
}
705
 
 
706
 
 
707
 
/*--------------------------------.
708
 
| Print this symbol on YYOUTPUT.  |
709
 
`--------------------------------*/
710
 
 
711
 
#if (defined __STDC__ || defined __C99__FUNC__ \
712
 
     || defined __cplusplus || defined _MSC_VER)
713
 
static void
714
 
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
715
 
#else
716
 
static void
717
 
yy_symbol_print (yyoutput, yytype, yyvaluep)
718
 
    FILE *yyoutput;
719
 
    int yytype;
720
 
    YYSTYPE const * const yyvaluep;
721
 
#endif
722
 
{
723
 
  if (yytype < YYNTOKENS)
724
 
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
725
 
  else
726
 
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
727
 
 
728
 
  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
729
 
  YYFPRINTF (yyoutput, ")");
730
 
}
731
 
 
732
 
/*------------------------------------------------------------------.
733
 
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
734
 
| TOP (included).                                                   |
735
 
`------------------------------------------------------------------*/
736
 
 
737
 
#if (defined __STDC__ || defined __C99__FUNC__ \
738
 
     || defined __cplusplus || defined _MSC_VER)
739
 
static void
740
 
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
741
 
#else
742
 
static void
743
 
yy_stack_print (bottom, top)
744
 
    yytype_int16 *bottom;
745
 
    yytype_int16 *top;
746
 
#endif
747
 
{
748
 
  YYFPRINTF (stderr, "Stack now");
749
 
  for (; bottom <= top; ++bottom)
750
 
    YYFPRINTF (stderr, " %d", *bottom);
751
 
  YYFPRINTF (stderr, "\n");
752
 
}
753
 
 
754
 
# define YY_STACK_PRINT(Bottom, Top)                            \
755
 
do {                                                            \
756
 
  if (yydebug)                                                  \
757
 
    yy_stack_print ((Bottom), (Top));                           \
758
 
} while (YYID (0))
759
 
 
760
 
 
761
 
/*------------------------------------------------.
762
 
| Report that the YYRULE is going to be reduced.  |
763
 
`------------------------------------------------*/
764
 
 
765
 
#if (defined __STDC__ || defined __C99__FUNC__ \
766
 
     || defined __cplusplus || defined _MSC_VER)
767
 
static void
768
 
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
769
 
#else
770
 
static void
771
 
yy_reduce_print (yyvsp, yyrule)
772
 
    YYSTYPE *yyvsp;
773
 
    int yyrule;
774
 
#endif
775
 
{
776
 
  int yynrhs = yyr2[yyrule];
777
 
  int yyi;
778
 
  unsigned long int yylno = yyrline[yyrule];
779
 
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
780
 
             yyrule - 1, yylno);
781
 
  /* The symbols being reduced.  */
782
 
  for (yyi = 0; yyi < yynrhs; yyi++)
783
 
    {
784
 
      fprintf (stderr, "   $%d = ", yyi + 1);
785
 
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
786
 
                       &(yyvsp[(yyi + 1) - (yynrhs)])
787
 
                                       );
788
 
      fprintf (stderr, "\n");
789
 
    }
790
 
}
791
 
 
792
 
# define YY_REDUCE_PRINT(Rule)          \
793
 
do {                                    \
794
 
  if (yydebug)                          \
795
 
    yy_reduce_print (yyvsp, Rule); \
796
 
} while (YYID (0))
797
 
 
798
 
/* Nonzero means print parse trace.  It is left uninitialized so that
799
 
   multiple parsers can coexist.  */
800
 
int yydebug;
801
 
#else /* !YYDEBUG */
802
 
# define YYDPRINTF(Args)
803
 
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
804
 
# define YY_STACK_PRINT(Bottom, Top)
805
 
# define YY_REDUCE_PRINT(Rule)
806
 
#endif /* !YYDEBUG */
807
 
 
808
 
 
809
 
/* YYINITDEPTH -- initial size of the parser's stacks.  */
810
 
#ifndef YYINITDEPTH
811
 
# define YYINITDEPTH 200
812
 
#endif
813
 
 
814
 
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
815
 
   if the built-in stack extension method is used).
816
 
 
817
 
   Do not make this value too large; the results are undefined if
818
 
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
819
 
   evaluated with infinite-precision integer arithmetic.  */
820
 
 
821
 
#ifndef YYMAXDEPTH
822
 
# define YYMAXDEPTH 10000
823
 
#endif
824
 
 
825
 
 
826
 
 
827
 
#if YYERROR_VERBOSE
828
 
 
829
 
# ifndef yystrlen
830
 
#  if defined __GLIBC__ && defined _STRING_H
831
 
#   define yystrlen strlen
832
 
#  else
833
 
/* Return the length of YYSTR.  */
834
 
#if (defined __STDC__ || defined __C99__FUNC__ \
835
 
     || defined __cplusplus || defined _MSC_VER)
836
 
static YYSIZE_T
837
 
yystrlen (const char *yystr)
838
 
#else
839
 
static YYSIZE_T
840
 
yystrlen (yystr)
841
 
    const char *yystr;
842
 
#endif
843
 
{
844
 
  YYSIZE_T yylen;
845
 
  for (yylen = 0; yystr[yylen]; yylen++)
846
 
    continue;
847
 
  return yylen;
848
 
}
849
 
#  endif
850
 
# endif
851
 
 
852
 
# ifndef yystpcpy
853
 
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
854
 
#   define yystpcpy stpcpy
855
 
#  else
856
 
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
857
 
   YYDEST.  */
858
 
#if (defined __STDC__ || defined __C99__FUNC__ \
859
 
     || defined __cplusplus || defined _MSC_VER)
860
 
static char *
861
 
yystpcpy (char *yydest, const char *yysrc)
862
 
#else
863
 
static char *
864
 
yystpcpy (yydest, yysrc)
865
 
    char *yydest;
866
 
    const char *yysrc;
867
 
#endif
868
 
{
869
 
  char *yyd = yydest;
870
 
  const char *yys = yysrc;
871
 
 
872
 
  while ((*yyd++ = *yys++) != '\0')
873
 
    continue;
874
 
 
875
 
  return yyd - 1;
876
 
}
877
 
#  endif
878
 
# endif
879
 
 
880
 
# ifndef yytnamerr
881
 
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
882
 
   quotes and backslashes, so that it's suitable for yyerror.  The
883
 
   heuristic is that double-quoting is unnecessary unless the string
884
 
   contains an apostrophe, a comma, or backslash (other than
885
 
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
886
 
   null, do not copy; instead, return the length of what the result
887
 
   would have been.  */
888
 
static YYSIZE_T
889
 
yytnamerr (char *yyres, const char *yystr)
890
 
{
891
 
  if (*yystr == '"')
892
 
    {
893
 
      YYSIZE_T yyn = 0;
894
 
      char const *yyp = yystr;
895
 
 
896
 
      for (;;)
897
 
        switch (*++yyp)
898
 
          {
899
 
          case '\'':
900
 
          case ',':
901
 
            goto do_not_strip_quotes;
902
 
 
903
 
          case '\\':
904
 
            if (*++yyp != '\\')
905
 
              goto do_not_strip_quotes;
906
 
            /* Fall through.  */
907
 
          default:
908
 
            if (yyres)
909
 
              yyres[yyn] = *yyp;
910
 
            yyn++;
911
 
            break;
912
 
 
913
 
          case '"':
914
 
            if (yyres)
915
 
              yyres[yyn] = '\0';
916
 
            return yyn;
917
 
          }
918
 
    do_not_strip_quotes: ;
919
 
    }
920
 
 
921
 
  if (! yyres)
922
 
    return yystrlen (yystr);
923
 
 
924
 
  return yystpcpy (yyres, yystr) - yyres;
925
 
}
926
 
# endif
927
 
 
928
 
/* Copy into YYRESULT an error message about the unexpected token
929
 
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
930
 
   including the terminating null byte.  If YYRESULT is null, do not
931
 
   copy anything; just return the number of bytes that would be
932
 
   copied.  As a special case, return 0 if an ordinary "syntax error"
933
 
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
934
 
   size calculation.  */
935
 
static YYSIZE_T
936
 
yysyntax_error (char *yyresult, int yystate, int yychar)
937
 
{
938
 
  int yyn = yypact[yystate];
939
 
 
940
 
  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
941
 
    return 0;
942
 
  else
943
 
    {
944
 
      int yytype = YYTRANSLATE (yychar);
945
 
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
946
 
      YYSIZE_T yysize = yysize0;
947
 
      YYSIZE_T yysize1;
948
 
      int yysize_overflow = 0;
949
 
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
950
 
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
951
 
      int yyx;
952
 
 
953
 
# if 0
954
 
      /* This is so xgettext sees the translatable formats that are
955
 
         constructed on the fly.  */
956
 
      YY_("syntax error, unexpected %s");
957
 
      YY_("syntax error, unexpected %s, expecting %s");
958
 
      YY_("syntax error, unexpected %s, expecting %s or %s");
959
 
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
960
 
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
961
 
# endif
962
 
      char *yyfmt;
963
 
      char const *yyf;
964
 
      static char const yyunexpected[] = "syntax error, unexpected %s";
965
 
      static char const yyexpecting[] = ", expecting %s";
966
 
      static char const yyor[] = " or %s";
967
 
      char yyformat[sizeof yyunexpected
968
 
                    + sizeof yyexpecting - 1
969
 
                    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
970
 
                       * (sizeof yyor - 1))];
971
 
      char const *yyprefix = yyexpecting;
972
 
 
973
 
      /* Start YYX at -YYN if negative to avoid negative indexes in
974
 
         YYCHECK.  */
975
 
      int yyxbegin = yyn < 0 ? -yyn : 0;
976
 
 
977
 
      /* Stay within bounds of both yycheck and yytname.  */
978
 
      int yychecklim = YYLAST - yyn + 1;
979
 
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
980
 
      int yycount = 1;
981
 
 
982
 
      yyarg[0] = yytname[yytype];
983
 
      yyfmt = yystpcpy (yyformat, yyunexpected);
984
 
 
985
 
      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
986
 
        if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
987
 
          {
988
 
            if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
989
 
              {
990
 
                yycount = 1;
991
 
                yysize = yysize0;
992
 
                yyformat[sizeof yyunexpected - 1] = '\0';
993
 
                break;
994
 
              }
995
 
            yyarg[yycount++] = yytname[yyx];
996
 
            yysize1 = yysize + yytnamerr (0, yytname[yyx]);
997
 
            yysize_overflow |= (yysize1 < yysize);
998
 
            yysize = yysize1;
999
 
            yyfmt = yystpcpy (yyfmt, yyprefix);
1000
 
            yyprefix = yyor;
1001
 
          }
1002
 
 
1003
 
      yyf = YY_(yyformat);
1004
 
      yysize1 = yysize + yystrlen (yyf);
1005
 
      yysize_overflow |= (yysize1 < yysize);
1006
 
      yysize = yysize1;
1007
 
 
1008
 
      if (yysize_overflow)
1009
 
        return YYSIZE_MAXIMUM;
1010
 
 
1011
 
      if (yyresult)
1012
 
        {
1013
 
          /* Avoid sprintf, as that infringes on the user's name space.
1014
 
             Don't have undefined behavior even if the translation
1015
 
             produced a string with the wrong number of "%s"s.  */
1016
 
          char *yyp = yyresult;
1017
 
          int yyi = 0;
1018
 
          while ((*yyp = *yyf) != '\0')
1019
 
            {
1020
 
              if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1021
 
                {
1022
 
                  yyp += yytnamerr (yyp, yyarg[yyi++]);
1023
 
                  yyf += 2;
1024
 
                }
1025
 
              else
1026
 
                {
1027
 
                  yyp++;
1028
 
                  yyf++;
1029
 
                }
1030
 
            }
1031
 
        }
1032
 
      return yysize;
1033
 
    }
1034
 
}
1035
 
#endif /* YYERROR_VERBOSE */
1036
 
 
1037
 
 
1038
 
/*-----------------------------------------------.
1039
 
| Release the memory associated to this symbol.  |
1040
 
`-----------------------------------------------*/
1041
 
 
1042
 
/*ARGSUSED*/
1043
 
#if (defined __STDC__ || defined __C99__FUNC__ \
1044
 
     || defined __cplusplus || defined _MSC_VER)
1045
 
static void
1046
 
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1047
 
#else
1048
 
static void
1049
 
yydestruct (yymsg, yytype, yyvaluep)
1050
 
    const char *yymsg;
1051
 
    int yytype;
1052
 
    YYSTYPE *yyvaluep;
1053
 
#endif
1054
 
{
1055
 
  YYUSE (yyvaluep);
1056
 
 
1057
 
  if (!yymsg)
1058
 
    yymsg = "Deleting";
1059
 
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1060
 
 
1061
 
  switch (yytype)
1062
 
    {
1063
 
 
1064
 
      default:
1065
 
        break;
1066
 
    }
1067
 
}
1068
 
 
1069
 
 
1070
 
/* Prevent warnings from -Wmissing-prototypes.  */
1071
 
 
1072
 
#ifdef YYPARSE_PARAM
1073
 
#if defined __STDC__ || defined __cplusplus
1074
 
int yyparse (void *YYPARSE_PARAM);
1075
 
#else
1076
 
int yyparse ();
1077
 
#endif
1078
 
#else /* ! YYPARSE_PARAM */
1079
 
#if defined __STDC__ || defined __cplusplus
1080
 
int yyparse (void);
1081
 
#else
1082
 
int yyparse ();
1083
 
#endif
1084
 
#endif /* ! YYPARSE_PARAM */
1085
 
 
1086
 
 
1087
 
 
1088
 
/* The look-ahead symbol.  */
1089
 
int yychar;
1090
 
 
1091
 
/* The semantic value of the look-ahead symbol.  */
1092
 
YYSTYPE yylval;
1093
 
 
1094
 
/* Number of syntax errors so far.  */
1095
 
int yynerrs;
1096
 
 
1097
 
 
1098
 
 
1099
 
/*----------.
1100
 
| yyparse.  |
1101
 
`----------*/
1102
 
 
1103
 
#ifdef YYPARSE_PARAM
1104
 
#if (defined __STDC__ || defined __C99__FUNC__ \
1105
 
     || defined __cplusplus || defined _MSC_VER)
1106
 
int
1107
 
yyparse (void *YYPARSE_PARAM)
1108
 
#else
1109
 
int
1110
 
yyparse (YYPARSE_PARAM)
1111
 
    void *YYPARSE_PARAM;
1112
 
#endif
1113
 
#else /* ! YYPARSE_PARAM */
1114
 
#if (defined __STDC__ || defined __C99__FUNC__ \
1115
 
     || defined __cplusplus || defined _MSC_VER)
1116
 
int
1117
 
yyparse (void)
1118
 
#else
1119
 
int
1120
 
yyparse ()
1121
 
 
1122
 
#endif
1123
 
#endif
1124
 
{
1125
 
  
1126
 
  int yystate;
1127
 
  int yyn;
1128
 
  int yyresult;
1129
 
  /* Number of tokens to shift before error messages enabled.  */
1130
 
  int yyerrstatus;
1131
 
  /* Look-ahead token as an internal (translated) token number.  */
1132
 
  int yytoken = 0;
1133
 
#if YYERROR_VERBOSE
1134
 
  /* Buffer for error messages, and its allocated size.  */
1135
 
  char yymsgbuf[128];
1136
 
  char *yymsg = yymsgbuf;
1137
 
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1138
 
#endif
1139
 
 
1140
 
  /* Three stacks and their tools:
1141
 
     `yyss': related to states,
1142
 
     `yyvs': related to semantic values,
1143
 
     `yyls': related to locations.
1144
 
 
1145
 
     Refer to the stacks thru separate pointers, to allow yyoverflow
1146
 
     to reallocate them elsewhere.  */
1147
 
 
1148
 
  /* The state stack.  */
1149
 
  yytype_int16 yyssa[YYINITDEPTH];
1150
 
  yytype_int16 *yyss = yyssa;
1151
 
  yytype_int16 *yyssp;
1152
 
 
1153
 
  /* The semantic value stack.  */
1154
 
  YYSTYPE yyvsa[YYINITDEPTH];
1155
 
  YYSTYPE *yyvs = yyvsa;
1156
 
  YYSTYPE *yyvsp;
1157
 
 
1158
 
 
1159
 
 
1160
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1161
 
 
1162
 
  YYSIZE_T yystacksize = YYINITDEPTH;
1163
 
 
1164
 
  /* The variables used to return semantic value and location from the
1165
 
     action routines.  */
1166
 
  YYSTYPE yyval;
1167
 
 
1168
 
 
1169
 
  /* The number of symbols on the RHS of the reduced rule.
1170
 
     Keep to zero when no symbol should be popped.  */
1171
 
  int yylen = 0;
1172
 
 
1173
 
  YYDPRINTF ((stderr, "Starting parse\n"));
1174
 
 
1175
 
  yystate = 0;
1176
 
  yyerrstatus = 0;
1177
 
  yynerrs = 0;
1178
 
  yychar = YYEMPTY;             /* Cause a token to be read.  */
1179
 
 
1180
 
  /* Initialize stack pointers.
1181
 
     Waste one element of value and location stack
1182
 
     so that they stay on the same level as the state stack.
1183
 
     The wasted elements are never initialized.  */
1184
 
 
1185
 
  yyssp = yyss;
1186
 
  yyvsp = yyvs;
1187
 
 
1188
 
  goto yysetstate;
1189
 
 
1190
 
/*------------------------------------------------------------.
1191
 
| yynewstate -- Push a new state, which is found in yystate.  |
1192
 
`------------------------------------------------------------*/
1193
 
 yynewstate:
1194
 
  /* In all cases, when you get here, the value and location stacks
1195
 
     have just been pushed.  So pushing a state here evens the stacks.  */
1196
 
  yyssp++;
1197
 
 
1198
 
 yysetstate:
1199
 
  *yyssp = yystate;
1200
 
 
1201
 
  if (yyss + yystacksize - 1 <= yyssp)
1202
 
    {
1203
 
      /* Get the current used size of the three stacks, in elements.  */
1204
 
      YYSIZE_T yysize = yyssp - yyss + 1;
1205
 
 
1206
 
#ifdef yyoverflow
1207
 
      {
1208
 
        /* Give user a chance to reallocate the stack.  Use copies of
1209
 
           these so that the &'s don't force the real ones into
1210
 
           memory.  */
1211
 
        YYSTYPE *yyvs1 = yyvs;
1212
 
        yytype_int16 *yyss1 = yyss;
1213
 
 
1214
 
 
1215
 
        /* Each stack pointer address is followed by the size of the
1216
 
           data in use in that stack, in bytes.  This used to be a
1217
 
           conditional around just the two extra args, but that might
1218
 
           be undefined if yyoverflow is a macro.  */
1219
 
        yyoverflow (YY_("memory exhausted"),
1220
 
                    &yyss1, yysize * sizeof (*yyssp),
1221
 
                    &yyvs1, yysize * sizeof (*yyvsp),
1222
 
 
1223
 
                    &yystacksize);
1224
 
 
1225
 
        yyss = yyss1;
1226
 
        yyvs = yyvs1;
1227
 
      }
1228
 
#else /* no yyoverflow */
1229
 
# ifndef YYSTACK_RELOCATE
1230
 
      goto yyexhaustedlab;
1231
 
# else
1232
 
      /* Extend the stack our own way.  */
1233
 
      if (YYMAXDEPTH <= yystacksize)
1234
 
        goto yyexhaustedlab;
1235
 
      yystacksize *= 2;
1236
 
      if (YYMAXDEPTH < yystacksize)
1237
 
        yystacksize = YYMAXDEPTH;
1238
 
 
1239
 
      {
1240
 
        yytype_int16 *yyss1 = yyss;
1241
 
        union yyalloc *yyptr =
1242
 
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1243
 
        if (! yyptr)
1244
 
          goto yyexhaustedlab;
1245
 
        YYSTACK_RELOCATE (yyss);
1246
 
        YYSTACK_RELOCATE (yyvs);
1247
 
 
1248
 
#  undef YYSTACK_RELOCATE
1249
 
        if (yyss1 != yyssa)
1250
 
          YYSTACK_FREE (yyss1);
1251
 
      }
1252
 
# endif
1253
 
#endif /* no yyoverflow */
1254
 
 
1255
 
      yyssp = yyss + yysize - 1;
1256
 
      yyvsp = yyvs + yysize - 1;
1257
 
 
1258
 
 
1259
 
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1260
 
                  (unsigned long int) yystacksize));
1261
 
 
1262
 
      if (yyss + yystacksize - 1 <= yyssp)
1263
 
        YYABORT;
1264
 
    }
1265
 
 
1266
 
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1267
 
 
1268
 
  goto yybackup;
1269
 
 
1270
 
/*-----------.
1271
 
| yybackup.  |
1272
 
`-----------*/
1273
 
yybackup:
1274
 
 
1275
 
  /* Do appropriate processing given the current state.  Read a
1276
 
     look-ahead token if we need one and don't already have one.  */
1277
 
 
1278
 
  /* First try to decide what to do without reference to look-ahead token.  */
1279
 
  yyn = yypact[yystate];
1280
 
  if (yyn == YYPACT_NINF)
1281
 
    goto yydefault;
1282
 
 
1283
 
  /* Not known => get a look-ahead token if don't already have one.  */
1284
 
 
1285
 
  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
1286
 
  if (yychar == YYEMPTY)
1287
 
    {
1288
 
      YYDPRINTF ((stderr, "Reading a token: "));
1289
 
      yychar = YYLEX;
1290
 
    }
1291
 
 
1292
 
  if (yychar <= YYEOF)
1293
 
    {
1294
 
      yychar = yytoken = YYEOF;
1295
 
      YYDPRINTF ((stderr, "Now at end of input.\n"));
1296
 
    }
1297
 
  else
1298
 
    {
1299
 
      yytoken = YYTRANSLATE (yychar);
1300
 
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1301
 
    }
1302
 
 
1303
 
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1304
 
     detect an error, take that action.  */
1305
 
  yyn += yytoken;
1306
 
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1307
 
    goto yydefault;
1308
 
  yyn = yytable[yyn];
1309
 
  if (yyn <= 0)
1310
 
    {
1311
 
      if (yyn == 0 || yyn == YYTABLE_NINF)
1312
 
        goto yyerrlab;
1313
 
      yyn = -yyn;
1314
 
      goto yyreduce;
1315
 
    }
1316
 
 
1317
 
  if (yyn == YYFINAL)
1318
 
    YYACCEPT;
1319
 
 
1320
 
  /* Count tokens shifted since error; after three, turn off error
1321
 
     status.  */
1322
 
  if (yyerrstatus)
1323
 
    yyerrstatus--;
1324
 
 
1325
 
  /* Shift the look-ahead token.  */
1326
 
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1327
 
 
1328
 
  /* Discard the shifted token unless it is eof.  */
1329
 
  if (yychar != YYEOF)
1330
 
    yychar = YYEMPTY;
1331
 
 
1332
 
  yystate = yyn;
1333
 
  *++yyvsp = yylval;
1334
 
 
1335
 
  goto yynewstate;
1336
 
 
1337
 
 
1338
 
/*-----------------------------------------------------------.
1339
 
| yydefault -- do the default action for the current state.  |
1340
 
`-----------------------------------------------------------*/
1341
 
yydefault:
1342
 
  yyn = yydefact[yystate];
1343
 
  if (yyn == 0)
1344
 
    goto yyerrlab;
1345
 
  goto yyreduce;
1346
 
 
1347
 
 
1348
 
/*-----------------------------.
1349
 
| yyreduce -- Do a reduction.  |
1350
 
`-----------------------------*/
1351
 
yyreduce:
1352
 
  /* yyn is the number of a rule to reduce with.  */
1353
 
  yylen = yyr2[yyn];
1354
 
 
1355
 
  /* If YYLEN is nonzero, implement the default value of the action:
1356
 
     `$$ = $1'.
1357
 
 
1358
 
     Otherwise, the following line sets YYVAL to garbage.
1359
 
     This behavior is undocumented and Bison
1360
 
     users should not rely upon it.  Assigning to YYVAL
1361
 
     unconditionally makes the parser a bit smaller, and it avoids a
1362
 
     GCC warning that YYVAL may be used uninitialized.  */
1363
 
  yyval = yyvsp[1-yylen];
1364
 
 
1365
 
 
1366
 
  YY_REDUCE_PRINT (yyn);
1367
 
  switch (yyn)
1368
 
    {
1369
 
      
1370
 
/* Line 1267 of yacc.c.  */
1371
 
#line 1372 "addr.c"
1372
 
      default: break;
1373
 
    }
1374
 
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1375
 
 
1376
 
  YYPOPSTACK (yylen);
1377
 
  yylen = 0;
1378
 
  YY_STACK_PRINT (yyss, yyssp);
1379
 
 
1380
 
  *++yyvsp = yyval;
1381
 
 
1382
 
 
1383
 
  /* Now `shift' the result of the reduction.  Determine what state
1384
 
     that goes to, based on the state we popped back to and the rule
1385
 
     number reduced by.  */
1386
 
 
1387
 
  yyn = yyr1[yyn];
1388
 
 
1389
 
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1390
 
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1391
 
    yystate = yytable[yystate];
1392
 
  else
1393
 
    yystate = yydefgoto[yyn - YYNTOKENS];
1394
 
 
1395
 
  goto yynewstate;
1396
 
 
1397
 
 
1398
 
/*------------------------------------.
1399
 
| yyerrlab -- here on detecting error |
1400
 
`------------------------------------*/
1401
 
yyerrlab:
1402
 
  /* If not already recovering from an error, report this error.  */
1403
 
  if (!yyerrstatus)
1404
 
    {
1405
 
      ++yynerrs;
1406
 
#if ! YYERROR_VERBOSE
1407
 
      yyerror (YY_("syntax error"));
1408
 
#else
1409
 
      {
1410
 
        YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1411
 
        if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1412
 
          {
1413
 
            YYSIZE_T yyalloc = 2 * yysize;
1414
 
            if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1415
 
              yyalloc = YYSTACK_ALLOC_MAXIMUM;
1416
 
            if (yymsg != yymsgbuf)
1417
 
              YYSTACK_FREE (yymsg);
1418
 
            yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1419
 
            if (yymsg)
1420
 
              yymsg_alloc = yyalloc;
1421
 
            else
1422
 
              {
1423
 
                yymsg = yymsgbuf;
1424
 
                yymsg_alloc = sizeof yymsgbuf;
1425
 
              }
1426
 
          }
1427
 
 
1428
 
        if (0 < yysize && yysize <= yymsg_alloc)
1429
 
          {
1430
 
            (void) yysyntax_error (yymsg, yystate, yychar);
1431
 
            yyerror (yymsg);
1432
 
          }
1433
 
        else
1434
 
          {
1435
 
            yyerror (YY_("syntax error"));
1436
 
            if (yysize != 0)
1437
 
              goto yyexhaustedlab;
1438
 
          }
1439
 
      }
1440
 
#endif
1441
 
    }
1442
 
 
1443
 
 
1444
 
 
1445
 
  if (yyerrstatus == 3)
1446
 
    {
1447
 
      /* If just tried and failed to reuse look-ahead token after an
1448
 
         error, discard it.  */
1449
 
 
1450
 
      if (yychar <= YYEOF)
1451
 
        {
1452
 
          /* Return failure if at end of input.  */
1453
 
          if (yychar == YYEOF)
1454
 
            YYABORT;
1455
 
        }
1456
 
      else
1457
 
        {
1458
 
          yydestruct ("Error: discarding",
1459
 
                      yytoken, &yylval);
1460
 
          yychar = YYEMPTY;
1461
 
        }
1462
 
    }
1463
 
 
1464
 
  /* Else will try to reuse look-ahead token after shifting the error
1465
 
     token.  */
1466
 
  goto yyerrlab1;
1467
 
 
1468
 
 
1469
 
/*---------------------------------------------------.
1470
 
| yyerrorlab -- error raised explicitly by YYERROR.  |
1471
 
`---------------------------------------------------*/
1472
 
yyerrorlab:
1473
 
 
1474
 
  /* Pacify compilers like GCC when the user code never invokes
1475
 
     YYERROR and the label yyerrorlab therefore never appears in user
1476
 
     code.  */
1477
 
  if (/*CONSTCOND*/ 0)
1478
 
     goto yyerrorlab;
1479
 
 
1480
 
  /* Do not reclaim the symbols of the rule which action triggered
1481
 
     this YYERROR.  */
1482
 
  YYPOPSTACK (yylen);
1483
 
  yylen = 0;
1484
 
  YY_STACK_PRINT (yyss, yyssp);
1485
 
  yystate = *yyssp;
1486
 
  goto yyerrlab1;
1487
 
 
1488
 
 
1489
 
/*-------------------------------------------------------------.
1490
 
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
1491
 
`-------------------------------------------------------------*/
1492
 
yyerrlab1:
1493
 
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1494
 
 
1495
 
  for (;;)
1496
 
    {
1497
 
      yyn = yypact[yystate];
1498
 
      if (yyn != YYPACT_NINF)
1499
 
        {
1500
 
          yyn += YYTERROR;
1501
 
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1502
 
            {
1503
 
              yyn = yytable[yyn];
1504
 
              if (0 < yyn)
1505
 
                break;
1506
 
            }
1507
 
        }
1508
 
 
1509
 
      /* Pop the current state because it cannot handle the error token.  */
1510
 
      if (yyssp == yyss)
1511
 
        YYABORT;
1512
 
 
1513
 
 
1514
 
      yydestruct ("Error: popping",
1515
 
                  yystos[yystate], yyvsp);
1516
 
      YYPOPSTACK (1);
1517
 
      yystate = *yyssp;
1518
 
      YY_STACK_PRINT (yyss, yyssp);
1519
 
    }
1520
 
 
1521
 
  if (yyn == YYFINAL)
1522
 
    YYACCEPT;
1523
 
 
1524
 
  *++yyvsp = yylval;
1525
 
 
1526
 
 
1527
 
  /* Shift the error token.  */
1528
 
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1529
 
 
1530
 
  yystate = yyn;
1531
 
  goto yynewstate;
1532
 
 
1533
 
 
1534
 
/*-------------------------------------.
1535
 
| yyacceptlab -- YYACCEPT comes here.  |
1536
 
`-------------------------------------*/
1537
 
yyacceptlab:
1538
 
  yyresult = 0;
1539
 
  goto yyreturn;
1540
 
 
1541
 
/*-----------------------------------.
1542
 
| yyabortlab -- YYABORT comes here.  |
1543
 
`-----------------------------------*/
1544
 
yyabortlab:
1545
 
  yyresult = 1;
1546
 
  goto yyreturn;
1547
 
 
1548
 
#ifndef yyoverflow
1549
 
/*-------------------------------------------------.
1550
 
| yyexhaustedlab -- memory exhaustion comes here.  |
1551
 
`-------------------------------------------------*/
1552
 
yyexhaustedlab:
1553
 
  yyerror (YY_("memory exhausted"));
1554
 
  yyresult = 2;
1555
 
  /* Fall through.  */
1556
 
#endif
1557
 
 
1558
 
yyreturn:
1559
 
  if (yychar != YYEOF && yychar != YYEMPTY)
1560
 
     yydestruct ("Cleanup: discarding lookahead",
1561
 
                 yytoken, &yylval);
1562
 
  /* Do not reclaim the symbols of the rule which action triggered
1563
 
     this YYABORT or YYACCEPT.  */
1564
 
  YYPOPSTACK (yylen);
1565
 
  YY_STACK_PRINT (yyss, yyssp);
1566
 
  while (yyssp != yyss)
1567
 
    {
1568
 
      yydestruct ("Cleanup: popping",
1569
 
                  yystos[*yyssp], yyvsp);
1570
 
      YYPOPSTACK (1);
1571
 
    }
1572
 
#ifndef yyoverflow
1573
 
  if (yyss != yyssa)
1574
 
    YYSTACK_FREE (yyss);
1575
 
#endif
1576
 
#if YYERROR_VERBOSE
1577
 
  if (yymsg != yymsgbuf)
1578
 
    YYSTACK_FREE (yymsg);
1579
 
#endif
1580
 
  /* Make sure YYID is used.  */
1581
 
  return YYID (yyresult);
1582
 
}
1583
 
 
1584
 
 
1585
 
#line 82 "addr.y"
1586
 
 
1587
 
 
1588
 
/* copy address error message into buffer provided by sieve parser */
1589
 
int addrerror(char *s)
1590
 
{
1591
 
    extern char addrerr[ADDRERR_SIZE];
1592
 
    
1593
 
    strlcpy(addrerr, s, sizeof(addrerr));
1594
 
    return 0;
1595
 
}
1596