2 /* A Bison parser, made from ssl_expr_parse.y
3 by GNU Bison version 1.28 */
5 #define YYBISON 1 /* Identify Bison output. */
14 #define T_FUNC_FILE 264
28 #line 68 "ssl_expr_parse.y"
30 #include "ssl_private.h"
32 #line 72 "ssl_expr_parse.y"
51 #define YYTRANSLATE(x) ((unsigned)(x) <= 276 ? ssl_expr_yytranslate[x] : 36)
53 static const char ssl_expr_yytranslate[] = { 0,
54 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
55 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
56 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
57 2, 2, 2, 2, 2, 2, 28, 2, 2, 23,
58 24, 2, 2, 27, 2, 2, 2, 2, 2, 2,
59 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
60 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
61 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
62 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
63 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
64 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
65 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
66 2, 2, 25, 2, 26, 2, 2, 2, 2, 2,
67 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
68 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
69 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
70 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
71 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
72 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
73 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
74 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
75 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
76 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
77 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
78 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
79 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
80 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
81 17, 18, 19, 20, 21, 22
85 static const short ssl_expr_yyprhs[] = { 0,
86 0, 2, 4, 6, 9, 13, 17, 19, 23, 27,
87 31, 35, 39, 43, 47, 53, 57, 61, 63, 67,
88 69, 71, 76, 78, 80, 82
91 static const short ssl_expr_yyrhs[] = { 30,
92 0, 3, 0, 4, 0, 22, 30, 0, 30, 20,
93 30, 0, 30, 21, 30, 0, 31, 0, 23, 30,
94 24, 0, 33, 11, 33, 0, 33, 12, 33, 0,
95 33, 13, 33, 0, 33, 14, 33, 0, 33, 15,
96 33, 0, 33, 16, 33, 0, 33, 19, 25, 32,
97 26, 0, 33, 17, 34, 0, 33, 18, 34, 0,
98 33, 0, 32, 27, 33, 0, 5, 0, 7, 0,
99 28, 25, 6, 26, 0, 35, 0, 8, 0, 9,
106 static const short ssl_expr_yyrline[] = { 0,
107 115, 118, 119, 120, 121, 122, 123, 124, 127, 128,
108 129, 130, 131, 132, 133, 134, 135, 138, 139, 142,
109 143, 144, 145, 148, 158, 170
114 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
116 static const char * const ssl_expr_yytname[] = { "$","error","$undefined.","T_TRUE",
117 "T_FALSE","T_DIGIT","T_ID","T_STRING","T_REGEX","T_REGEX_I","T_FUNC_FILE","T_OP_EQ",
118 "T_OP_NE","T_OP_LT","T_OP_LE","T_OP_GT","T_OP_GE","T_OP_REG","T_OP_NRE","T_OP_IN",
119 "T_OP_OR","T_OP_AND","T_OP_NOT","'('","')'","'{'","'}'","','","'%'","root","expr",
120 "comparison","words","word","regex","funccall", NULL
124 static const short ssl_expr_yyr1[] = { 0,
125 29, 30, 30, 30, 30, 30, 30, 30, 31, 31,
126 31, 31, 31, 31, 31, 31, 31, 32, 32, 33,
127 33, 33, 33, 34, 34, 35
130 static const short ssl_expr_yyr2[] = { 0,
131 1, 1, 1, 2, 3, 3, 1, 3, 3, 3,
132 3, 3, 3, 3, 5, 3, 3, 1, 3, 1,
136 static const short ssl_expr_yydefact[] = { 0,
137 2, 3, 20, 21, 0, 0, 0, 0, 1, 7,
138 0, 23, 0, 4, 0, 0, 0, 0, 0, 0,
139 0, 0, 0, 0, 0, 0, 0, 0, 8, 0,
140 5, 6, 9, 10, 11, 12, 13, 14, 24, 25,
141 16, 17, 0, 26, 22, 0, 18, 15, 0, 19,
145 static const short ssl_expr_yydefgoto[] = { 51,
146 9, 10, 46, 11, 41, 12
149 static const short ssl_expr_yypact[] = { 3,
150 -32768,-32768,-32768,-32768, -11, 3, 3, -10, 0,-32768,
151 22,-32768, 16,-32768, -2, 23, 3, 3, 4, 4,
152 4, 4, 4, 4, 34, 34, 21, 24,-32768, 25,
153 26,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
154 -32768,-32768, 4,-32768,-32768, 18,-32768,-32768, 4,-32768,
158 static const short ssl_expr_yypgoto[] = {-32768,
159 10,-32768,-32768, -19, 27,-32768
166 static const short ssl_expr_yytable[] = { 33,
167 34, 35, 36, 37, 38, 1, 2, 3, 3, 4,
168 4, 13, 5, 5, 16, 14, 15, 17, 18, 17,
169 18, 29, 28, 47, 6, 7, 31, 32, 30, 50,
170 8, 8, 19, 20, 21, 22, 23, 24, 25, 26,
171 27, 39, 40, 48, 49, 43, 18, 44, 52, 53,
175 static const short ssl_expr_yycheck[] = { 19,
176 20, 21, 22, 23, 24, 3, 4, 5, 5, 7,
177 7, 23, 10, 10, 25, 6, 7, 20, 21, 20,
178 21, 24, 7, 43, 22, 23, 17, 18, 6, 49,
179 28, 28, 11, 12, 13, 14, 15, 16, 17, 18,
180 19, 8, 9, 26, 27, 25, 21, 24, 0, 0,
183 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
184 #line 3 "/usr/local/share/bison.simple"
185 /* This file comes from bison-1.28. */
187 /* Skeleton output parser for bison,
188 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
190 This program is free software; you can redistribute it and/or modify
191 it under the terms of the GNU General Public License as published by
192 the Free Software Foundation; either version 2, or (at your option)
195 This program is distributed in the hope that it will be useful,
196 but WITHOUT ANY WARRANTY; without even the implied warranty of
197 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
198 GNU General Public License for more details.
200 You should have received a copy of the GNU General Public License
201 along with this program; if not, write to the Free Software
202 Foundation, Inc., 59 Temple Place - Suite 330,
203 Boston, MA 02111-1307, USA. */
205 /* As a special exception, when this file is copied by Bison into a
206 Bison output file, you may use that output file without restriction.
207 This special exception was added by the Free Software Foundation
208 in version 1.24 of Bison. */
210 /* This is the parser code that is written into each bison parser
211 when the %semantic_parser declaration is not specified in the grammar.
212 It was written by Richard Stallman by simplifying the hairy parser
213 used when %semantic_parser is specified. */
215 #ifndef YYSTACK_USE_ALLOCA
217 #define YYSTACK_USE_ALLOCA
218 #else /* alloca not defined */
220 #define YYSTACK_USE_ALLOCA
221 #define alloca __builtin_alloca
222 #else /* not GNU C. */
223 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
224 #define YYSTACK_USE_ALLOCA
226 #else /* not sparc */
227 /* We think this test detects Watcom and Microsoft C. */
228 /* This used to test MSDOS, but that is a bad idea
229 since that symbol is in the user namespace. */
230 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
231 #if 0 /* No need for malloc.h, which pollutes the namespace;
232 instead, just don't use alloca. */
235 #else /* not MSDOS, or __TURBOC__ */
237 /* I don't know what this was needed for, but it pollutes the namespace.
238 So I turned it off. rms, 2 May 1997. */
239 /* #include <malloc.h> */
241 #define YYSTACK_USE_ALLOCA
242 #else /* not MSDOS, or __TURBOC__, or _AIX */
244 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
245 and on HPUX 10. Eventually we can turn this on. */
246 #define YYSTACK_USE_ALLOCA
247 #define alloca __builtin_alloca
250 #endif /* not _AIX */
251 #endif /* not MSDOS, or __TURBOC__ */
252 #endif /* not sparc */
253 #endif /* not GNU C */
254 #endif /* alloca not defined */
255 #endif /* YYSTACK_USE_ALLOCA not defined */
257 #ifdef YYSTACK_USE_ALLOCA
258 #define YYSTACK_ALLOC alloca
260 #define YYSTACK_ALLOC malloc
263 /* Note: there must be only one dollar sign in this file.
264 It is replaced by the list of actions, each action
265 as one case of the switch. */
267 #define ssl_expr_yyerrok (ssl_expr_yyerrstatus = 0)
268 #define ssl_expr_yyclearin (ssl_expr_yychar = YYEMPTY)
271 #define YYACCEPT goto ssl_expr_yyacceptlab
272 #define YYABORT goto ssl_expr_yyabortlab
273 #define YYERROR goto ssl_expr_yyerrlab1
274 /* Like YYERROR except do call ssl_expr_yyerror.
275 This remains here temporarily to ease the
276 transition to the new meaning of YYERROR, for GCC.
277 Once GCC version 2 has supplanted version 1, this can go. */
278 #define YYFAIL goto ssl_expr_yyerrlab
279 #define YYRECOVERING() (!!ssl_expr_yyerrstatus)
280 #define YYBACKUP(token, value) \
282 if (ssl_expr_yychar == YYEMPTY && ssl_expr_yylen == 1) \
283 { ssl_expr_yychar = (token), ssl_expr_yylval = (value); \
284 ssl_expr_yychar1 = YYTRANSLATE (ssl_expr_yychar); \
286 goto ssl_expr_yybackup; \
289 { ssl_expr_yyerror ("syntax error: cannot back up"); YYERROR; } \
293 #define YYERRCODE 256
296 #define YYLEX ssl_expr_yylex()
302 #define YYLEX ssl_expr_yylex(&ssl_expr_yylval, &ssl_expr_yylloc, YYLEX_PARAM)
304 #define YYLEX ssl_expr_yylex(&ssl_expr_yylval, &ssl_expr_yylloc)
306 #else /* not YYLSP_NEEDED */
308 #define YYLEX ssl_expr_yylex(&ssl_expr_yylval, YYLEX_PARAM)
310 #define YYLEX ssl_expr_yylex(&ssl_expr_yylval)
312 #endif /* not YYLSP_NEEDED */
315 /* If nonreentrant, generate the variables here */
319 int ssl_expr_yychar; /* the lookahead symbol */
320 YYSTYPE ssl_expr_yylval; /* the semantic value of the */
321 /* lookahead symbol */
324 YYLTYPE ssl_expr_yylloc; /* location data for the lookahead */
328 int ssl_expr_yynerrs; /* number of parse errors so far */
329 #endif /* not YYPURE */
332 int ssl_expr_yydebug; /* nonzero means print parse trace */
333 /* Since this is uninitialized, it does not stop multiple parsers
337 /* YYINITDEPTH indicates the initial size of the parser's stacks */
340 #define YYINITDEPTH 200
343 /* YYMAXDEPTH is the maximum size the stacks can grow to
344 (effective only if the built-in stack extension method is used). */
351 #define YYMAXDEPTH 10000
354 /* Define __ssl_expr_yy_memcpy. Note that the size argument
355 should be passed with type unsigned int, because that is what the non-GCC
356 definitions require. With GCC, __builtin_memcpy takes an arg
357 of type size_t, but it can handle unsigned int. */
359 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
360 #define __ssl_expr_yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
361 #else /* not GNU C or C++ */
364 /* This is the most reliable way to avoid incompatibilities
365 in available built-in functions on various systems. */
367 __ssl_expr_yy_memcpy (to, from, count)
372 register char *f = from;
373 register char *t = to;
374 register int i = count;
380 #else /* __cplusplus */
382 /* This is the most reliable way to avoid incompatibilities
383 in available built-in functions on various systems. */
385 __ssl_expr_yy_memcpy (char *to, char *from, unsigned int count)
387 register char *t = to;
388 register char *f = from;
389 register int i = count;
398 #line 217 "/usr/local/share/bison.simple"
400 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
401 into ssl_expr_yyparse. The argument should have type void *.
402 It should actually point to an object.
403 Grammar actions can access the variable by casting it
404 to the proper pointer type. */
408 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
409 #define YYPARSE_PARAM_DECL
410 #else /* not __cplusplus */
411 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
412 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
413 #endif /* not __cplusplus */
414 #else /* not YYPARSE_PARAM */
415 #define YYPARSE_PARAM_ARG
416 #define YYPARSE_PARAM_DECL
417 #endif /* not YYPARSE_PARAM */
419 /* Prevent warning if -Wstrict-prototypes. */
422 int ssl_expr_yyparse (void *);
424 int ssl_expr_yyparse (void);
429 ssl_expr_yyparse(YYPARSE_PARAM_ARG)
432 register int ssl_expr_yystate;
433 register int ssl_expr_yyn;
434 register short *ssl_expr_yyssp;
435 register YYSTYPE *ssl_expr_yyvsp;
436 int ssl_expr_yyerrstatus; /* number of tokens to shift before error messages enabled */
437 int ssl_expr_yychar1 = 0; /* lookahead token as an internal (translated) token number */
439 short ssl_expr_yyssa[YYINITDEPTH]; /* the state stack */
440 YYSTYPE ssl_expr_yyvsa[YYINITDEPTH]; /* the semantic value stack */
442 short *ssl_expr_yyss = ssl_expr_yyssa; /* refer to the stacks thru separate pointers */
443 YYSTYPE *ssl_expr_yyvs = ssl_expr_yyvsa; /* to allow ssl_expr_yyoverflow to reallocate them elsewhere */
446 YYLTYPE ssl_expr_yylsa[YYINITDEPTH]; /* the location stack */
447 YYLTYPE *ssl_expr_yyls = ssl_expr_yylsa;
448 YYLTYPE *ssl_expr_yylsp;
450 #define YYPOPSTACK (ssl_expr_yyvsp--, ssl_expr_yyssp--, ssl_expr_yylsp--)
452 #define YYPOPSTACK (ssl_expr_yyvsp--, ssl_expr_yyssp--)
455 int ssl_expr_yystacksize = YYINITDEPTH;
456 int ssl_expr_yyfree_stacks = 0;
460 YYSTYPE ssl_expr_yylval;
461 int ssl_expr_yynerrs;
463 YYLTYPE ssl_expr_yylloc;
467 YYSTYPE ssl_expr_yyval; /* the variable used to return */
468 /* semantic values from the action */
474 if (ssl_expr_yydebug)
475 fprintf(stderr, "Starting parse\n");
478 ssl_expr_yystate = 0;
479 ssl_expr_yyerrstatus = 0;
480 ssl_expr_yynerrs = 0;
481 ssl_expr_yychar = YYEMPTY; /* Cause a token to be read. */
483 /* Initialize stack pointers.
484 Waste one element of value and location stack
485 so that they stay on the same level as the state stack.
486 The wasted elements are never initialized. */
488 ssl_expr_yyssp = ssl_expr_yyss - 1;
489 ssl_expr_yyvsp = ssl_expr_yyvs;
491 ssl_expr_yylsp = ssl_expr_yyls;
494 /* Push a new state, which is found in ssl_expr_yystate . */
495 /* In all cases, when you get here, the value and location stacks
496 have just been pushed. so pushing a state here evens the stacks. */
499 *++ssl_expr_yyssp = ssl_expr_yystate;
501 if (ssl_expr_yyssp >= ssl_expr_yyss + ssl_expr_yystacksize - 1)
503 /* Give user a chance to reallocate the stack */
504 /* Use copies of these so that the &'s don't force the real ones into memory. */
505 YYSTYPE *ssl_expr_yyvs1 = ssl_expr_yyvs;
506 short *ssl_expr_yyss1 = ssl_expr_yyss;
508 YYLTYPE *ssl_expr_yyls1 = ssl_expr_yyls;
511 /* Get the current used size of the three stacks, in elements. */
512 int size = ssl_expr_yyssp - ssl_expr_yyss + 1;
514 #ifdef ssl_expr_yyoverflow
515 /* Each stack pointer address is followed by the size of
516 the data in use in that stack, in bytes. */
518 /* This used to be a conditional around just the two extra args,
519 but that might be undefined if ssl_expr_yyoverflow is a macro. */
520 ssl_expr_yyoverflow("parser stack overflow",
521 &ssl_expr_yyss1, size * sizeof (*ssl_expr_yyssp),
522 &ssl_expr_yyvs1, size * sizeof (*ssl_expr_yyvsp),
523 &ssl_expr_yyls1, size * sizeof (*ssl_expr_yylsp),
524 &ssl_expr_yystacksize);
526 ssl_expr_yyoverflow("parser stack overflow",
527 &ssl_expr_yyss1, size * sizeof (*ssl_expr_yyssp),
528 &ssl_expr_yyvs1, size * sizeof (*ssl_expr_yyvsp),
529 &ssl_expr_yystacksize);
532 ssl_expr_yyss = ssl_expr_yyss1; ssl_expr_yyvs = ssl_expr_yyvs1;
534 ssl_expr_yyls = ssl_expr_yyls1;
536 #else /* no ssl_expr_yyoverflow */
537 /* Extend the stack our own way. */
538 if (ssl_expr_yystacksize >= YYMAXDEPTH)
540 ssl_expr_yyerror("parser stack overflow");
541 if (ssl_expr_yyfree_stacks)
543 free (ssl_expr_yyss);
544 free (ssl_expr_yyvs);
546 free (ssl_expr_yyls);
551 ssl_expr_yystacksize *= 2;
552 if (ssl_expr_yystacksize > YYMAXDEPTH)
553 ssl_expr_yystacksize = YYMAXDEPTH;
554 #ifndef YYSTACK_USE_ALLOCA
555 ssl_expr_yyfree_stacks = 1;
557 ssl_expr_yyss = (short *) YYSTACK_ALLOC (ssl_expr_yystacksize * sizeof (*ssl_expr_yyssp));
558 __ssl_expr_yy_memcpy ((char *)ssl_expr_yyss, (char *)ssl_expr_yyss1,
559 size * (unsigned int) sizeof (*ssl_expr_yyssp));
560 ssl_expr_yyvs = (YYSTYPE *) YYSTACK_ALLOC (ssl_expr_yystacksize * sizeof (*ssl_expr_yyvsp));
561 __ssl_expr_yy_memcpy ((char *)ssl_expr_yyvs, (char *)ssl_expr_yyvs1,
562 size * (unsigned int) sizeof (*ssl_expr_yyvsp));
564 ssl_expr_yyls = (YYLTYPE *) YYSTACK_ALLOC (ssl_expr_yystacksize * sizeof (*ssl_expr_yylsp));
565 __ssl_expr_yy_memcpy ((char *)ssl_expr_yyls, (char *)ssl_expr_yyls1,
566 size * (unsigned int) sizeof (*ssl_expr_yylsp));
568 #endif /* no ssl_expr_yyoverflow */
570 ssl_expr_yyssp = ssl_expr_yyss + size - 1;
571 ssl_expr_yyvsp = ssl_expr_yyvs + size - 1;
573 ssl_expr_yylsp = ssl_expr_yyls + size - 1;
577 if (ssl_expr_yydebug)
578 fprintf(stderr, "Stack size increased to %d\n", ssl_expr_yystacksize);
581 if (ssl_expr_yyssp >= ssl_expr_yyss + ssl_expr_yystacksize - 1)
586 if (ssl_expr_yydebug)
587 fprintf(stderr, "Entering state %d\n", ssl_expr_yystate);
590 goto ssl_expr_yybackup;
593 /* Do appropriate processing given the current state. */
594 /* Read a lookahead token if we need one and don't already have one. */
595 /* ssl_expr_yyresume: */
597 /* First try to decide what to do without reference to lookahead token. */
599 ssl_expr_yyn = ssl_expr_yypact[ssl_expr_yystate];
600 if (ssl_expr_yyn == YYFLAG)
601 goto ssl_expr_yydefault;
603 /* Not known => get a lookahead token if don't already have one. */
605 /* ssl_expr_yychar is either YYEMPTY or YYEOF
606 or a valid token in external form. */
608 if (ssl_expr_yychar == YYEMPTY)
611 if (ssl_expr_yydebug)
612 fprintf(stderr, "Reading a token: ");
614 ssl_expr_yychar = YYLEX;
617 /* Convert token to internal form (in ssl_expr_yychar1) for indexing tables with */
619 if (ssl_expr_yychar <= 0) /* This means end of input. */
621 ssl_expr_yychar1 = 0;
622 ssl_expr_yychar = YYEOF; /* Don't call YYLEX any more */
625 if (ssl_expr_yydebug)
626 fprintf(stderr, "Now at end of input.\n");
631 ssl_expr_yychar1 = YYTRANSLATE(ssl_expr_yychar);
634 if (ssl_expr_yydebug)
636 fprintf (stderr, "Next token is %d (%s", ssl_expr_yychar, ssl_expr_yytname[ssl_expr_yychar1]);
637 /* Give the individual parser a way to print the precise meaning
638 of a token, for further debugging info. */
640 YYPRINT (stderr, ssl_expr_yychar, ssl_expr_yylval);
642 fprintf (stderr, ")\n");
647 ssl_expr_yyn += ssl_expr_yychar1;
648 if (ssl_expr_yyn < 0 || ssl_expr_yyn > YYLAST || ssl_expr_yycheck[ssl_expr_yyn] != ssl_expr_yychar1)
649 goto ssl_expr_yydefault;
651 ssl_expr_yyn = ssl_expr_yytable[ssl_expr_yyn];
653 /* ssl_expr_yyn is what to do for this token type in this state.
654 Negative => reduce, -ssl_expr_yyn is rule number.
655 Positive => shift, ssl_expr_yyn is new state.
656 New state is final state => don't bother to shift,
658 0, or most negative number => error. */
660 if (ssl_expr_yyn < 0)
662 if (ssl_expr_yyn == YYFLAG)
663 goto ssl_expr_yyerrlab;
664 ssl_expr_yyn = -ssl_expr_yyn;
665 goto ssl_expr_yyreduce;
667 else if (ssl_expr_yyn == 0)
668 goto ssl_expr_yyerrlab;
670 if (ssl_expr_yyn == YYFINAL)
673 /* Shift the lookahead token. */
676 if (ssl_expr_yydebug)
677 fprintf(stderr, "Shifting token %d (%s), ", ssl_expr_yychar, ssl_expr_yytname[ssl_expr_yychar1]);
680 /* Discard the token being shifted unless it is eof. */
681 if (ssl_expr_yychar != YYEOF)
682 ssl_expr_yychar = YYEMPTY;
684 *++ssl_expr_yyvsp = ssl_expr_yylval;
686 *++ssl_expr_yylsp = ssl_expr_yylloc;
689 /* count tokens shifted since error; after three, turn off error status. */
690 if (ssl_expr_yyerrstatus) ssl_expr_yyerrstatus--;
692 ssl_expr_yystate = ssl_expr_yyn;
693 goto ssl_expr_yynewstate;
695 /* Do the default action for the current state. */
698 ssl_expr_yyn = ssl_expr_yydefact[ssl_expr_yystate];
699 if (ssl_expr_yyn == 0)
700 goto ssl_expr_yyerrlab;
702 /* Do a reduction. ssl_expr_yyn is the number of a rule to reduce with. */
704 ssl_expr_yylen = ssl_expr_yyr2[ssl_expr_yyn];
705 if (ssl_expr_yylen > 0)
706 ssl_expr_yyval = ssl_expr_yyvsp[1-ssl_expr_yylen]; /* implement default value of the action */
709 if (ssl_expr_yydebug)
713 fprintf (stderr, "Reducing via rule %d (line %d), ",
714 ssl_expr_yyn, ssl_expr_yyrline[ssl_expr_yyn]);
716 /* Print the symbols being reduced, and their result. */
717 for (i = ssl_expr_yyprhs[ssl_expr_yyn]; ssl_expr_yyrhs[i] > 0; i++)
718 fprintf (stderr, "%s ", ssl_expr_yytname[ssl_expr_yyrhs[i]]);
719 fprintf (stderr, " -> %s\n", ssl_expr_yytname[ssl_expr_yyr1[ssl_expr_yyn]]);
724 switch (ssl_expr_yyn) {
727 #line 115 "ssl_expr_parse.y"
728 { ssl_expr_info.expr = ssl_expr_yyvsp[0].exVal; ;
731 #line 118 "ssl_expr_parse.y"
732 { ssl_expr_yyval.exVal = ssl_expr_make(op_True, NULL, NULL); ;
735 #line 119 "ssl_expr_parse.y"
736 { ssl_expr_yyval.exVal = ssl_expr_make(op_False, NULL, NULL); ;
739 #line 120 "ssl_expr_parse.y"
740 { ssl_expr_yyval.exVal = ssl_expr_make(op_Not, ssl_expr_yyvsp[0].exVal, NULL); ;
743 #line 121 "ssl_expr_parse.y"
744 { ssl_expr_yyval.exVal = ssl_expr_make(op_Or, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
747 #line 122 "ssl_expr_parse.y"
748 { ssl_expr_yyval.exVal = ssl_expr_make(op_And, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
751 #line 123 "ssl_expr_parse.y"
752 { ssl_expr_yyval.exVal = ssl_expr_make(op_Comp, ssl_expr_yyvsp[0].exVal, NULL); ;
755 #line 124 "ssl_expr_parse.y"
756 { ssl_expr_yyval.exVal = ssl_expr_yyvsp[-1].exVal; ;
759 #line 127 "ssl_expr_parse.y"
760 { ssl_expr_yyval.exVal = ssl_expr_make(op_EQ, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
763 #line 128 "ssl_expr_parse.y"
764 { ssl_expr_yyval.exVal = ssl_expr_make(op_NE, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
767 #line 129 "ssl_expr_parse.y"
768 { ssl_expr_yyval.exVal = ssl_expr_make(op_LT, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
771 #line 130 "ssl_expr_parse.y"
772 { ssl_expr_yyval.exVal = ssl_expr_make(op_LE, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
775 #line 131 "ssl_expr_parse.y"
776 { ssl_expr_yyval.exVal = ssl_expr_make(op_GT, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
779 #line 132 "ssl_expr_parse.y"
780 { ssl_expr_yyval.exVal = ssl_expr_make(op_GE, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
783 #line 133 "ssl_expr_parse.y"
784 { ssl_expr_yyval.exVal = ssl_expr_make(op_IN, ssl_expr_yyvsp[-4].exVal, ssl_expr_yyvsp[-1].exVal); ;
787 #line 134 "ssl_expr_parse.y"
788 { ssl_expr_yyval.exVal = ssl_expr_make(op_REG, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
791 #line 135 "ssl_expr_parse.y"
792 { ssl_expr_yyval.exVal = ssl_expr_make(op_NRE, ssl_expr_yyvsp[-2].exVal, ssl_expr_yyvsp[0].exVal); ;
795 #line 138 "ssl_expr_parse.y"
796 { ssl_expr_yyval.exVal = ssl_expr_make(op_ListElement, ssl_expr_yyvsp[0].exVal, NULL); ;
799 #line 139 "ssl_expr_parse.y"
800 { ssl_expr_yyval.exVal = ssl_expr_make(op_ListElement, ssl_expr_yyvsp[0].exVal, ssl_expr_yyvsp[-2].exVal); ;
803 #line 142 "ssl_expr_parse.y"
804 { ssl_expr_yyval.exVal = ssl_expr_make(op_Digit, ssl_expr_yyvsp[0].cpVal, NULL); ;
807 #line 143 "ssl_expr_parse.y"
808 { ssl_expr_yyval.exVal = ssl_expr_make(op_String, ssl_expr_yyvsp[0].cpVal, NULL); ;
811 #line 144 "ssl_expr_parse.y"
812 { ssl_expr_yyval.exVal = ssl_expr_make(op_Var, ssl_expr_yyvsp[-1].cpVal, NULL); ;
815 #line 145 "ssl_expr_parse.y"
816 { ssl_expr_yyval.exVal = ssl_expr_yyvsp[0].exVal; ;
819 #line 148 "ssl_expr_parse.y"
822 if ((regex = ap_pregcomp(ssl_expr_info.pool, ssl_expr_yyvsp[0].cpVal,
823 REG_EXTENDED|REG_NOSUB)) == NULL) {
824 ssl_expr_error = "Failed to compile regular expression";
828 ssl_expr_yyval.exVal = ssl_expr_make(op_Regex, regex, NULL);
832 #line 158 "ssl_expr_parse.y"
835 if ((regex = ap_pregcomp(ssl_expr_info.pool, ssl_expr_yyvsp[0].cpVal,
836 REG_EXTENDED|REG_NOSUB|REG_ICASE)) == NULL) {
837 ssl_expr_error = "Failed to compile regular expression";
841 ssl_expr_yyval.exVal = ssl_expr_make(op_Regex, regex, NULL);
845 #line 170 "ssl_expr_parse.y"
847 ssl_expr *args = ssl_expr_make(op_ListElement, ssl_expr_yyvsp[-1].cpVal, NULL);
848 ssl_expr_yyval.exVal = ssl_expr_make(op_Func, "file", args);
852 /* the action file gets copied in in place of this dollarsign */
853 #line 543 "/usr/local/share/bison.simple"
855 ssl_expr_yyvsp -= ssl_expr_yylen;
856 ssl_expr_yyssp -= ssl_expr_yylen;
858 ssl_expr_yylsp -= ssl_expr_yylen;
862 if (ssl_expr_yydebug)
864 short *ssp1 = ssl_expr_yyss - 1;
865 fprintf (stderr, "state stack now");
866 while (ssp1 != ssl_expr_yyssp)
867 fprintf (stderr, " %d", *++ssp1);
868 fprintf (stderr, "\n");
872 *++ssl_expr_yyvsp = ssl_expr_yyval;
876 if (ssl_expr_yylen == 0)
878 ssl_expr_yylsp->first_line = ssl_expr_yylloc.first_line;
879 ssl_expr_yylsp->first_column = ssl_expr_yylloc.first_column;
880 ssl_expr_yylsp->last_line = (ssl_expr_yylsp-1)->last_line;
881 ssl_expr_yylsp->last_column = (ssl_expr_yylsp-1)->last_column;
882 ssl_expr_yylsp->text = 0;
886 ssl_expr_yylsp->last_line = (ssl_expr_yylsp+ssl_expr_yylen-1)->last_line;
887 ssl_expr_yylsp->last_column = (ssl_expr_yylsp+ssl_expr_yylen-1)->last_column;
891 /* Now "shift" the result of the reduction.
892 Determine what state that goes to,
893 based on the state we popped back to
894 and the rule number reduced by. */
896 ssl_expr_yyn = ssl_expr_yyr1[ssl_expr_yyn];
898 ssl_expr_yystate = ssl_expr_yypgoto[ssl_expr_yyn - YYNTBASE] + *ssl_expr_yyssp;
899 if (ssl_expr_yystate >= 0 && ssl_expr_yystate <= YYLAST && ssl_expr_yycheck[ssl_expr_yystate] == *ssl_expr_yyssp)
900 ssl_expr_yystate = ssl_expr_yytable[ssl_expr_yystate];
902 ssl_expr_yystate = ssl_expr_yydefgoto[ssl_expr_yyn - YYNTBASE];
904 goto ssl_expr_yynewstate;
906 ssl_expr_yyerrlab: /* here on detecting error */
908 if (! ssl_expr_yyerrstatus)
909 /* If not already recovering from an error, report this error. */
913 #ifdef YYERROR_VERBOSE
914 ssl_expr_yyn = ssl_expr_yypact[ssl_expr_yystate];
916 if (ssl_expr_yyn > YYFLAG && ssl_expr_yyn < YYLAST)
923 /* Start X at -ssl_expr_yyn if nec to avoid negative indexes in ssl_expr_yycheck. */
924 for (x = (ssl_expr_yyn < 0 ? -ssl_expr_yyn : 0);
925 x < (sizeof(ssl_expr_yytname) / sizeof(char *)); x++)
926 if (ssl_expr_yycheck[x + ssl_expr_yyn] == x)
927 size += strlen(ssl_expr_yytname[x]) + 15, count++;
928 msg = (char *) malloc(size + 15);
931 strcpy(msg, "parse error");
936 for (x = (ssl_expr_yyn < 0 ? -ssl_expr_yyn : 0);
937 x < (sizeof(ssl_expr_yytname) / sizeof(char *)); x++)
938 if (ssl_expr_yycheck[x + ssl_expr_yyn] == x)
940 strcat(msg, count == 0 ? ", expecting `" : " or `");
941 strcat(msg, ssl_expr_yytname[x]);
946 ssl_expr_yyerror(msg);
950 ssl_expr_yyerror ("parse error; also virtual memory exceeded");
953 #endif /* YYERROR_VERBOSE */
954 ssl_expr_yyerror("parse error");
957 goto ssl_expr_yyerrlab1;
958 ssl_expr_yyerrlab1: /* here on error raised explicitly by an action */
960 if (ssl_expr_yyerrstatus == 3)
962 /* if just tried and failed to reuse lookahead token after an error, discard it. */
964 /* return failure if at end of input */
965 if (ssl_expr_yychar == YYEOF)
969 if (ssl_expr_yydebug)
970 fprintf(stderr, "Discarding token %d (%s).\n", ssl_expr_yychar, ssl_expr_yytname[ssl_expr_yychar1]);
973 ssl_expr_yychar = YYEMPTY;
976 /* Else will try to reuse lookahead token
977 after shifting the error token. */
979 ssl_expr_yyerrstatus = 3; /* Each real token shifted decrements this */
981 goto ssl_expr_yyerrhandle;
983 ssl_expr_yyerrdefault: /* current state does not do anything special for the error token. */
986 /* This is wrong; only states that explicitly want error tokens
987 should shift them. */
988 ssl_expr_yyn = ssl_expr_yydefact[ssl_expr_yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
989 if (ssl_expr_yyn) goto ssl_expr_yydefault;
992 ssl_expr_yyerrpop: /* pop the current state because it cannot handle the error token */
994 if (ssl_expr_yyssp == ssl_expr_yyss) YYABORT;
996 ssl_expr_yystate = *--ssl_expr_yyssp;
1002 if (ssl_expr_yydebug)
1004 short *ssp1 = ssl_expr_yyss - 1;
1005 fprintf (stderr, "Error: state stack now");
1006 while (ssp1 != ssl_expr_yyssp)
1007 fprintf (stderr, " %d", *++ssp1);
1008 fprintf (stderr, "\n");
1012 ssl_expr_yyerrhandle:
1014 ssl_expr_yyn = ssl_expr_yypact[ssl_expr_yystate];
1015 if (ssl_expr_yyn == YYFLAG)
1016 goto ssl_expr_yyerrdefault;
1018 ssl_expr_yyn += YYTERROR;
1019 if (ssl_expr_yyn < 0 || ssl_expr_yyn > YYLAST || ssl_expr_yycheck[ssl_expr_yyn] != YYTERROR)
1020 goto ssl_expr_yyerrdefault;
1022 ssl_expr_yyn = ssl_expr_yytable[ssl_expr_yyn];
1023 if (ssl_expr_yyn < 0)
1025 if (ssl_expr_yyn == YYFLAG)
1026 goto ssl_expr_yyerrpop;
1027 ssl_expr_yyn = -ssl_expr_yyn;
1028 goto ssl_expr_yyreduce;
1030 else if (ssl_expr_yyn == 0)
1031 goto ssl_expr_yyerrpop;
1033 if (ssl_expr_yyn == YYFINAL)
1037 if (ssl_expr_yydebug)
1038 fprintf(stderr, "Shifting error token, ");
1041 *++ssl_expr_yyvsp = ssl_expr_yylval;
1043 *++ssl_expr_yylsp = ssl_expr_yylloc;
1046 ssl_expr_yystate = ssl_expr_yyn;
1047 goto ssl_expr_yynewstate;
1049 ssl_expr_yyacceptlab:
1050 /* YYACCEPT comes here. */
1051 if (ssl_expr_yyfree_stacks)
1053 free (ssl_expr_yyss);
1054 free (ssl_expr_yyvs);
1056 free (ssl_expr_yyls);
1061 ssl_expr_yyabortlab:
1062 /* YYABORT comes here. */
1063 if (ssl_expr_yyfree_stacks)
1065 free (ssl_expr_yyss);
1066 free (ssl_expr_yyvs);
1068 free (ssl_expr_yyls);
1073 #line 176 "ssl_expr_parse.y"
1076 int ssl_expr_yyerror(char *s)