~ubuntu-branches/ubuntu/intrepid/tcm/intrepid

« back to all changes in this revision

Viewing changes to src/sd/dv/cardconstraint.tab.c

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador
  • Date: 2003-07-03 20:08:21 UTC
  • Revision ID: james.westby@ubuntu.com-20030703200821-se4xtqx25e5miczi
Tags: upstream-2.20
ImportĀ upstreamĀ versionĀ 2.20

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*  A Bison parser, made from cardconstraint.y
 
3
    by GNU Bison version 1.28  */
 
4
 
 
5
#define YYBISON 1  /* Identify Bison output.  */
 
6
 
 
7
#define yyparse cardconstraintparse
 
8
#define yylex cardconstraintlex
 
9
#define yyerror cardconstrainterror
 
10
#define yylval cardconstraintlval
 
11
#define yychar cardconstraintchar
 
12
#define yydebug cardconstraintdebug
 
13
#define yynerrs cardconstraintnerrs
 
14
#define COMMA   257
 
15
#define NUMBER  258
 
16
#define N       259
 
17
#define M       260
 
18
#define DOTDOT  261
 
19
#define UNDEFINED       262
 
20
#define EQUAL   263
 
21
#define NOTEQUAL        264
 
22
#define LESS    265
 
23
#define LESSEQUAL       266
 
24
#define GREATER 267
 
25
#define GREATEREQUAL    268
 
26
 
 
27
#line 1 "cardconstraint.y"
 
28
 
 
29
#include "erparse.h"
 
30
#include <stdio.h>
 
31
#define YYERROR_VERBOSE
 
32
#ifndef YYSTYPE
 
33
#define YYSTYPE int
 
34
#endif
 
35
#ifndef YYDEBUG
 
36
#define YYDEBUG 1
 
37
#endif
 
38
 
 
39
#include <stdio.h>
 
40
 
 
41
#ifndef __cplusplus
 
42
#ifndef __STDC__
 
43
#define const
 
44
#endif
 
45
#endif
 
46
 
 
47
 
 
48
 
 
49
#define YYFINAL         24
 
50
#define YYFLAG          -32768
 
51
#define YYNTBASE        15
 
52
 
 
53
#define YYTRANSLATE(x) ((unsigned)(x) <= 268 ? yytranslate[x] : 18)
 
54
 
 
55
static const char yytranslate[] = {     0,
 
56
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
57
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
58
     2,     2,     2,     2,     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,     2,     2,     2,     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,     2,     2,     2,     2,     2,
 
80
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
81
     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
 
82
     7,     8,     9,    10,    11,    12,    13,    14
 
83
};
 
84
 
 
85
#if YYDEBUG != 0
 
86
static const short yyprhs[] = {     0,
 
87
     0,     2,     6,    10,    14,    18,    22,    26,    30,    34,
 
88
    36,    38,    40
 
89
};
 
90
 
 
91
static const short yyrhs[] = {    16,
 
92
     0,    15,     3,    16,     0,     4,     7,     4,     0,    17,
 
93
     9,     4,     0,    17,    10,     4,     0,    17,    11,     4,
 
94
     0,    17,    12,     4,     0,    17,    13,     4,     0,    17,
 
95
    14,     4,     0,     4,     0,     5,     0,     6,     0,     0
 
96
};
 
97
 
 
98
#endif
 
99
 
 
100
#if YYDEBUG != 0
 
101
static const short yyrline[] = { 0,
 
102
    11,    12,    15,    16,    17,    18,    19,    20,    21,    22,
 
103
    25,    26,    27
 
104
};
 
105
#endif
 
106
 
 
107
 
 
108
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
 
109
 
 
110
static const char * const yytname[] = {   "$","error","$undefined.","COMMA",
 
111
"NUMBER","N","M","DOTDOT","UNDEFINED","EQUAL","NOTEQUAL","LESS","LESSEQUAL",
 
112
"GREATER","GREATEREQUAL","cardconstraint","expr","nletter", NULL
 
113
};
 
114
#endif
 
115
 
 
116
static const short yyr1[] = {     0,
 
117
    15,    15,    16,    16,    16,    16,    16,    16,    16,    16,
 
118
    17,    17,    17
 
119
};
 
120
 
 
121
static const short yyr2[] = {     0,
 
122
     1,     3,     3,     3,     3,     3,     3,     3,     3,     1,
 
123
     1,     1,     0
 
124
};
 
125
 
 
126
static const short yydefact[] = {    13,
 
127
    10,    11,    12,     0,     1,     0,     0,    13,     0,     0,
 
128
     0,     0,     0,     0,     3,     2,     4,     5,     6,     7,
 
129
     8,     9,     0,     0
 
130
};
 
131
 
 
132
static const short yydefgoto[] = {     4,
 
133
     5,     6
 
134
};
 
135
 
 
136
static const short yypact[] = {     7,
 
137
     0,-32768,-32768,     6,-32768,    -9,     4,     7,    10,    11,
 
138
    12,    13,    14,    15,-32768,-32768,-32768,-32768,-32768,-32768,
 
139
-32768,-32768,    20,-32768
 
140
};
 
141
 
 
142
static const short yypgoto[] = {-32768,
 
143
     2,-32768
 
144
};
 
145
 
 
146
 
 
147
#define YYLAST          20
 
148
 
 
149
 
 
150
static const short yytable[] = {     9,
 
151
    10,    11,    12,    13,    14,    23,     7,    15,     8,    16,
 
152
     1,     2,     3,    17,    18,    19,    20,    21,    22,    24
 
153
};
 
154
 
 
155
static const short yycheck[] = {     9,
 
156
    10,    11,    12,    13,    14,     0,     7,     4,     3,     8,
 
157
     4,     5,     6,     4,     4,     4,     4,     4,     4,     0
 
158
};
 
159
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 
160
#line 3 "/usr/lib/bison.simple"
 
161
/* This file comes from bison-1.28.  */
 
162
 
 
163
/* Skeleton output parser for bison,
 
164
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
 
165
 
 
166
   This program is free software; you can redistribute it and/or modify
 
167
   it under the terms of the GNU General Public License as published by
 
168
   the Free Software Foundation; either version 2, or (at your option)
 
169
   any later version.
 
170
 
 
171
   This program is distributed in the hope that it will be useful,
 
172
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
173
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
174
   GNU General Public License for more details.
 
175
 
 
176
   You should have received a copy of the GNU General Public License
 
177
   along with this program; if not, write to the Free Software
 
178
   Foundation, Inc., 59 Temple Place - Suite 330,
 
179
   Boston, MA 02111-1307, USA.  */
 
180
 
 
181
/* As a special exception, when this file is copied by Bison into a
 
182
   Bison output file, you may use that output file without restriction.
 
183
   This special exception was added by the Free Software Foundation
 
184
   in version 1.24 of Bison.  */
 
185
 
 
186
/* This is the parser code that is written into each bison parser
 
187
  when the %semantic_parser declaration is not specified in the grammar.
 
188
  It was written by Richard Stallman by simplifying the hairy parser
 
189
  used when %semantic_parser is specified.  */
 
190
 
 
191
#ifndef YYSTACK_USE_ALLOCA
 
192
#ifdef alloca
 
193
#define YYSTACK_USE_ALLOCA
 
194
#else /* alloca not defined */
 
195
#ifdef __GNUC__
 
196
#define YYSTACK_USE_ALLOCA
 
197
#define alloca __builtin_alloca
 
198
#else /* not GNU C.  */
 
199
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
 
200
#define YYSTACK_USE_ALLOCA
 
201
#include <alloca.h>
 
202
#else /* not sparc */
 
203
/* We think this test detects Watcom and Microsoft C.  */
 
204
/* This used to test MSDOS, but that is a bad idea
 
205
   since that symbol is in the user namespace.  */
 
206
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
 
207
#if 0 /* No need for malloc.h, which pollutes the namespace;
 
208
         instead, just don't use alloca.  */
 
209
#include <malloc.h>
 
210
#endif
 
211
#else /* not MSDOS, or __TURBOC__ */
 
212
#if defined(_AIX)
 
213
/* I don't know what this was needed for, but it pollutes the namespace.
 
214
   So I turned it off.   rms, 2 May 1997.  */
 
215
/* #include <malloc.h>  */
 
216
 #pragma alloca
 
217
#define YYSTACK_USE_ALLOCA
 
218
#else /* not MSDOS, or __TURBOC__, or _AIX */
 
219
#if 0
 
220
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
 
221
                 and on HPUX 10.  Eventually we can turn this on.  */
 
222
#define YYSTACK_USE_ALLOCA
 
223
#define alloca __builtin_alloca
 
224
#endif /* __hpux */
 
225
#endif
 
226
#endif /* not _AIX */
 
227
#endif /* not MSDOS, or __TURBOC__ */
 
228
#endif /* not sparc */
 
229
#endif /* not GNU C */
 
230
#endif /* alloca not defined */
 
231
#endif /* YYSTACK_USE_ALLOCA not defined */
 
232
 
 
233
#ifdef YYSTACK_USE_ALLOCA
 
234
#define YYSTACK_ALLOC alloca
 
235
#else
 
236
#define YYSTACK_ALLOC malloc
 
237
#endif
 
238
 
 
239
/* Note: there must be only one dollar sign in this file.
 
240
   It is replaced by the list of actions, each action
 
241
   as one case of the switch.  */
 
242
 
 
243
#define yyerrok         (yyerrstatus = 0)
 
244
#define yyclearin       (yychar = YYEMPTY)
 
245
#define YYEMPTY         -2
 
246
#define YYEOF           0
 
247
#define YYACCEPT        goto yyacceptlab
 
248
#define YYABORT         goto yyabortlab
 
249
#define YYERROR         goto yyerrlab1
 
250
/* Like YYERROR except do call yyerror.
 
251
   This remains here temporarily to ease the
 
252
   transition to the new meaning of YYERROR, for GCC.
 
253
   Once GCC version 2 has supplanted version 1, this can go.  */
 
254
#define YYFAIL          goto yyerrlab
 
255
#define YYRECOVERING()  (!!yyerrstatus)
 
256
#define YYBACKUP(token, value) \
 
257
do                                                              \
 
258
  if (yychar == YYEMPTY && yylen == 1)                          \
 
259
    { yychar = (token), yylval = (value);                       \
 
260
      yychar1 = YYTRANSLATE (yychar);                           \
 
261
      YYPOPSTACK;                                               \
 
262
      goto yybackup;                                            \
 
263
    }                                                           \
 
264
  else                                                          \
 
265
    { yyerror ("syntax error: cannot back up"); YYERROR; }      \
 
266
while (0)
 
267
 
 
268
#define YYTERROR        1
 
269
#define YYERRCODE       256
 
270
 
 
271
#ifndef YYPURE
 
272
#define YYLEX           yylex()
 
273
#endif
 
274
 
 
275
#ifdef YYPURE
 
276
#ifdef YYLSP_NEEDED
 
277
#ifdef YYLEX_PARAM
 
278
#define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
 
279
#else
 
280
#define YYLEX           yylex(&yylval, &yylloc)
 
281
#endif
 
282
#else /* not YYLSP_NEEDED */
 
283
#ifdef YYLEX_PARAM
 
284
#define YYLEX           yylex(&yylval, YYLEX_PARAM)
 
285
#else
 
286
#define YYLEX           yylex(&yylval)
 
287
#endif
 
288
#endif /* not YYLSP_NEEDED */
 
289
#endif
 
290
 
 
291
/* If nonreentrant, generate the variables here */
 
292
 
 
293
#ifndef YYPURE
 
294
 
 
295
int     yychar;                 /*  the lookahead symbol                */
 
296
YYSTYPE yylval;                 /*  the semantic value of the           */
 
297
                                /*  lookahead symbol                    */
 
298
 
 
299
#ifdef YYLSP_NEEDED
 
300
YYLTYPE yylloc;                 /*  location data for the lookahead     */
 
301
                                /*  symbol                              */
 
302
#endif
 
303
 
 
304
int yynerrs;                    /*  number of parse errors so far       */
 
305
#endif  /* not YYPURE */
 
306
 
 
307
#if YYDEBUG != 0
 
308
int yydebug;                    /*  nonzero means print parse trace     */
 
309
/* Since this is uninitialized, it does not stop multiple parsers
 
310
   from coexisting.  */
 
311
#endif
 
312
 
 
313
/*  YYINITDEPTH indicates the initial size of the parser's stacks       */
 
314
 
 
315
#ifndef YYINITDEPTH
 
316
#define YYINITDEPTH 200
 
317
#endif
 
318
 
 
319
/*  YYMAXDEPTH is the maximum size the stacks can grow to
 
320
    (effective only if the built-in stack extension method is used).  */
 
321
 
 
322
#if YYMAXDEPTH == 0
 
323
#undef YYMAXDEPTH
 
324
#endif
 
325
 
 
326
#ifndef YYMAXDEPTH
 
327
#define YYMAXDEPTH 10000
 
328
#endif
 
329
 
 
330
/* Define __yy_memcpy.  Note that the size argument
 
331
   should be passed with type unsigned int, because that is what the non-GCC
 
332
   definitions require.  With GCC, __builtin_memcpy takes an arg
 
333
   of type size_t, but it can handle unsigned int.  */
 
334
 
 
335
#if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
 
336
#define __yy_memcpy(TO,FROM,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
 
337
#else                           /* not GNU C or C++ */
 
338
#ifndef __cplusplus
 
339
 
 
340
/* This is the most reliable way to avoid incompatibilities
 
341
   in available built-in functions on various systems.  */
 
342
static void
 
343
__yy_memcpy (to, from, count)
 
344
     char *to;
 
345
     char *from;
 
346
     unsigned int count;
 
347
{
 
348
  register char *f = from;
 
349
  register char *t = to;
 
350
  register int i = count;
 
351
 
 
352
  while (i-- > 0)
 
353
    *t++ = *f++;
 
354
}
 
355
 
 
356
#else /* __cplusplus */
 
357
 
 
358
/* This is the most reliable way to avoid incompatibilities
 
359
   in available built-in functions on various systems.  */
 
360
static void
 
361
__yy_memcpy (char *to, char *from, unsigned int count)
 
362
{
 
363
  register char *t = to;
 
364
  register char *f = from;
 
365
  register int i = count;
 
366
 
 
367
  while (i-- > 0)
 
368
    *t++ = *f++;
 
369
}
 
370
 
 
371
#endif
 
372
#endif
 
373
 
 
374
#line 217 "/usr/lib/bison.simple"
 
375
 
 
376
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
 
377
   into yyparse.  The argument should have type void *.
 
378
   It should actually point to an object.
 
379
   Grammar actions can access the variable by casting it
 
380
   to the proper pointer type.  */
 
381
 
 
382
#ifdef YYPARSE_PARAM
 
383
#ifdef __cplusplus
 
384
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
 
385
#define YYPARSE_PARAM_DECL
 
386
#else /* not __cplusplus */
 
387
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
 
388
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
 
389
#endif /* not __cplusplus */
 
390
#else /* not YYPARSE_PARAM */
 
391
#define YYPARSE_PARAM_ARG
 
392
#define YYPARSE_PARAM_DECL
 
393
#endif /* not YYPARSE_PARAM */
 
394
 
 
395
/* Prevent warning if -Wstrict-prototypes.  */
 
396
#ifdef __GNUC__
 
397
#ifdef YYPARSE_PARAM
 
398
int yyparse (void *);
 
399
#else
 
400
int yyparse (void);
 
401
#endif
 
402
#endif
 
403
 
 
404
int
 
405
yyparse(YYPARSE_PARAM_ARG)
 
406
     YYPARSE_PARAM_DECL
 
407
{
 
408
  register int yystate;
 
409
  register int yyn;
 
410
  register short *yyssp;
 
411
  register YYSTYPE *yyvsp;
 
412
  int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
 
413
  int yychar1 = 0;              /*  lookahead token as an internal (translated) token number */
 
414
 
 
415
  short yyssa[YYINITDEPTH];     /*  the state stack                     */
 
416
  YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */
 
417
 
 
418
  short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
 
419
  YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */
 
420
 
 
421
#ifdef YYLSP_NEEDED
 
422
  YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
 
423
  YYLTYPE *yyls = yylsa;
 
424
  YYLTYPE *yylsp;
 
425
 
 
426
#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
 
427
#else
 
428
#define YYPOPSTACK   (yyvsp--, yyssp--)
 
429
#endif
 
430
 
 
431
  int yystacksize = YYINITDEPTH;
 
432
  int yyfree_stacks = 0;
 
433
 
 
434
#ifdef YYPURE
 
435
  int yychar;
 
436
  YYSTYPE yylval;
 
437
  int yynerrs;
 
438
#ifdef YYLSP_NEEDED
 
439
  YYLTYPE yylloc;
 
440
#endif
 
441
#endif
 
442
 
 
443
  YYSTYPE yyval;                /*  the variable used to return         */
 
444
                                /*  semantic values from the action     */
 
445
                                /*  routines                            */
 
446
 
 
447
  int yylen;
 
448
 
 
449
#if YYDEBUG != 0
 
450
  if (yydebug)
 
451
    fprintf(stderr, "Starting parse\n");
 
452
#endif
 
453
 
 
454
  yystate = 0;
 
455
  yyerrstatus = 0;
 
456
  yynerrs = 0;
 
457
  yychar = YYEMPTY;             /* Cause a token to be read.  */
 
458
 
 
459
  /* Initialize stack pointers.
 
460
     Waste one element of value and location stack
 
461
     so that they stay on the same level as the state stack.
 
462
     The wasted elements are never initialized.  */
 
463
 
 
464
  yyssp = yyss - 1;
 
465
  yyvsp = yyvs;
 
466
#ifdef YYLSP_NEEDED
 
467
  yylsp = yyls;
 
468
#endif
 
469
 
 
470
/* Push a new state, which is found in  yystate  .  */
 
471
/* In all cases, when you get here, the value and location stacks
 
472
   have just been pushed. so pushing a state here evens the stacks.  */
 
473
yynewstate:
 
474
 
 
475
  *++yyssp = yystate;
 
476
 
 
477
  if (yyssp >= yyss + yystacksize - 1)
 
478
    {
 
479
      /* Give user a chance to reallocate the stack */
 
480
      /* Use copies of these so that the &'s don't force the real ones into memory. */
 
481
      YYSTYPE *yyvs1 = yyvs;
 
482
      short *yyss1 = yyss;
 
483
#ifdef YYLSP_NEEDED
 
484
      YYLTYPE *yyls1 = yyls;
 
485
#endif
 
486
 
 
487
      /* Get the current used size of the three stacks, in elements.  */
 
488
      int size = yyssp - yyss + 1;
 
489
 
 
490
#ifdef yyoverflow
 
491
      /* Each stack pointer address is followed by the size of
 
492
         the data in use in that stack, in bytes.  */
 
493
#ifdef YYLSP_NEEDED
 
494
      /* This used to be a conditional around just the two extra args,
 
495
         but that might be undefined if yyoverflow is a macro.  */
 
496
      yyoverflow("parser stack overflow",
 
497
                 &yyss1, size * sizeof (*yyssp),
 
498
                 &yyvs1, size * sizeof (*yyvsp),
 
499
                 &yyls1, size * sizeof (*yylsp),
 
500
                 &yystacksize);
 
501
#else
 
502
      yyoverflow("parser stack overflow",
 
503
                 &yyss1, size * sizeof (*yyssp),
 
504
                 &yyvs1, size * sizeof (*yyvsp),
 
505
                 &yystacksize);
 
506
#endif
 
507
 
 
508
      yyss = yyss1; yyvs = yyvs1;
 
509
#ifdef YYLSP_NEEDED
 
510
      yyls = yyls1;
 
511
#endif
 
512
#else /* no yyoverflow */
 
513
      /* Extend the stack our own way.  */
 
514
      if (yystacksize >= YYMAXDEPTH)
 
515
        {
 
516
          yyerror("parser stack overflow");
 
517
          if (yyfree_stacks)
 
518
            {
 
519
              free (yyss);
 
520
              free (yyvs);
 
521
#ifdef YYLSP_NEEDED
 
522
              free (yyls);
 
523
#endif
 
524
            }
 
525
          return 2;
 
526
        }
 
527
      yystacksize *= 2;
 
528
      if (yystacksize > YYMAXDEPTH)
 
529
        yystacksize = YYMAXDEPTH;
 
530
#ifndef YYSTACK_USE_ALLOCA
 
531
      yyfree_stacks = 1;
 
532
#endif
 
533
      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
 
534
      __yy_memcpy ((char *)yyss, (char *)yyss1,
 
535
                   size * (unsigned int) sizeof (*yyssp));
 
536
      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
 
537
      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
 
538
                   size * (unsigned int) sizeof (*yyvsp));
 
539
#ifdef YYLSP_NEEDED
 
540
      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
 
541
      __yy_memcpy ((char *)yyls, (char *)yyls1,
 
542
                   size * (unsigned int) sizeof (*yylsp));
 
543
#endif
 
544
#endif /* no yyoverflow */
 
545
 
 
546
      yyssp = yyss + size - 1;
 
547
      yyvsp = yyvs + size - 1;
 
548
#ifdef YYLSP_NEEDED
 
549
      yylsp = yyls + size - 1;
 
550
#endif
 
551
 
 
552
#if YYDEBUG != 0
 
553
      if (yydebug)
 
554
        fprintf(stderr, "Stack size increased to %d\n", yystacksize);
 
555
#endif
 
556
 
 
557
      if (yyssp >= yyss + yystacksize - 1)
 
558
        YYABORT;
 
559
    }
 
560
 
 
561
#if YYDEBUG != 0
 
562
  if (yydebug)
 
563
    fprintf(stderr, "Entering state %d\n", yystate);
 
564
#endif
 
565
 
 
566
  goto yybackup;
 
567
 yybackup:
 
568
 
 
569
/* Do appropriate processing given the current state.  */
 
570
/* Read a lookahead token if we need one and don't already have one.  */
 
571
/* yyresume: */
 
572
 
 
573
  /* First try to decide what to do without reference to lookahead token.  */
 
574
 
 
575
  yyn = yypact[yystate];
 
576
  if (yyn == YYFLAG)
 
577
    goto yydefault;
 
578
 
 
579
  /* Not known => get a lookahead token if don't already have one.  */
 
580
 
 
581
  /* yychar is either YYEMPTY or YYEOF
 
582
     or a valid token in external form.  */
 
583
 
 
584
  if (yychar == YYEMPTY)
 
585
    {
 
586
#if YYDEBUG != 0
 
587
      if (yydebug)
 
588
        fprintf(stderr, "Reading a token: ");
 
589
#endif
 
590
      yychar = YYLEX;
 
591
    }
 
592
 
 
593
  /* Convert token to internal form (in yychar1) for indexing tables with */
 
594
 
 
595
  if (yychar <= 0)              /* This means end of input. */
 
596
    {
 
597
      yychar1 = 0;
 
598
      yychar = YYEOF;           /* Don't call YYLEX any more */
 
599
 
 
600
#if YYDEBUG != 0
 
601
      if (yydebug)
 
602
        fprintf(stderr, "Now at end of input.\n");
 
603
#endif
 
604
    }
 
605
  else
 
606
    {
 
607
      yychar1 = YYTRANSLATE(yychar);
 
608
 
 
609
#if YYDEBUG != 0
 
610
      if (yydebug)
 
611
        {
 
612
          fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
 
613
          /* Give the individual parser a way to print the precise meaning
 
614
             of a token, for further debugging info.  */
 
615
#ifdef YYPRINT
 
616
          YYPRINT (stderr, yychar, yylval);
 
617
#endif
 
618
          fprintf (stderr, ")\n");
 
619
        }
 
620
#endif
 
621
    }
 
622
 
 
623
  yyn += yychar1;
 
624
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
 
625
    goto yydefault;
 
626
 
 
627
  yyn = yytable[yyn];
 
628
 
 
629
  /* yyn is what to do for this token type in this state.
 
630
     Negative => reduce, -yyn is rule number.
 
631
     Positive => shift, yyn is new state.
 
632
       New state is final state => don't bother to shift,
 
633
       just return success.
 
634
     0, or most negative number => error.  */
 
635
 
 
636
  if (yyn < 0)
 
637
    {
 
638
      if (yyn == YYFLAG)
 
639
        goto yyerrlab;
 
640
      yyn = -yyn;
 
641
      goto yyreduce;
 
642
    }
 
643
  else if (yyn == 0)
 
644
    goto yyerrlab;
 
645
 
 
646
  if (yyn == YYFINAL)
 
647
    YYACCEPT;
 
648
 
 
649
  /* Shift the lookahead token.  */
 
650
 
 
651
#if YYDEBUG != 0
 
652
  if (yydebug)
 
653
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
 
654
#endif
 
655
 
 
656
  /* Discard the token being shifted unless it is eof.  */
 
657
  if (yychar != YYEOF)
 
658
    yychar = YYEMPTY;
 
659
 
 
660
  *++yyvsp = yylval;
 
661
#ifdef YYLSP_NEEDED
 
662
  *++yylsp = yylloc;
 
663
#endif
 
664
 
 
665
  /* count tokens shifted since error; after three, turn off error status.  */
 
666
  if (yyerrstatus) yyerrstatus--;
 
667
 
 
668
  yystate = yyn;
 
669
  goto yynewstate;
 
670
 
 
671
/* Do the default action for the current state.  */
 
672
yydefault:
 
673
 
 
674
  yyn = yydefact[yystate];
 
675
  if (yyn == 0)
 
676
    goto yyerrlab;
 
677
 
 
678
/* Do a reduction.  yyn is the number of a rule to reduce with.  */
 
679
yyreduce:
 
680
  yylen = yyr2[yyn];
 
681
  if (yylen > 0)
 
682
    yyval = yyvsp[1-yylen]; /* implement default value of the action */
 
683
 
 
684
#if YYDEBUG != 0
 
685
  if (yydebug)
 
686
    {
 
687
      int i;
 
688
 
 
689
      fprintf (stderr, "Reducing via rule %d (line %d), ",
 
690
               yyn, yyrline[yyn]);
 
691
 
 
692
      /* Print the symbols being reduced, and their result.  */
 
693
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
 
694
        fprintf (stderr, "%s ", yytname[yyrhs[i]]);
 
695
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
 
696
    }
 
697
#endif
 
698
 
 
699
 
 
700
  switch (yyn) {
 
701
 
 
702
}
 
703
   /* the action file gets copied in in place of this dollarsign */
 
704
#line 543 "/usr/lib/bison.simple"
 
705
 
 
706
  yyvsp -= yylen;
 
707
  yyssp -= yylen;
 
708
#ifdef YYLSP_NEEDED
 
709
  yylsp -= yylen;
 
710
#endif
 
711
 
 
712
#if YYDEBUG != 0
 
713
  if (yydebug)
 
714
    {
 
715
      short *ssp1 = yyss - 1;
 
716
      fprintf (stderr, "state stack now");
 
717
      while (ssp1 != yyssp)
 
718
        fprintf (stderr, " %d", *++ssp1);
 
719
      fprintf (stderr, "\n");
 
720
    }
 
721
#endif
 
722
 
 
723
  *++yyvsp = yyval;
 
724
 
 
725
#ifdef YYLSP_NEEDED
 
726
  yylsp++;
 
727
  if (yylen == 0)
 
728
    {
 
729
      yylsp->first_line = yylloc.first_line;
 
730
      yylsp->first_column = yylloc.first_column;
 
731
      yylsp->last_line = (yylsp-1)->last_line;
 
732
      yylsp->last_column = (yylsp-1)->last_column;
 
733
      yylsp->text = 0;
 
734
    }
 
735
  else
 
736
    {
 
737
      yylsp->last_line = (yylsp+yylen-1)->last_line;
 
738
      yylsp->last_column = (yylsp+yylen-1)->last_column;
 
739
    }
 
740
#endif
 
741
 
 
742
  /* Now "shift" the result of the reduction.
 
743
     Determine what state that goes to,
 
744
     based on the state we popped back to
 
745
     and the rule number reduced by.  */
 
746
 
 
747
  yyn = yyr1[yyn];
 
748
 
 
749
  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
 
750
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
 
751
    yystate = yytable[yystate];
 
752
  else
 
753
    yystate = yydefgoto[yyn - YYNTBASE];
 
754
 
 
755
  goto yynewstate;
 
756
 
 
757
yyerrlab:   /* here on detecting error */
 
758
 
 
759
  if (! yyerrstatus)
 
760
    /* If not already recovering from an error, report this error.  */
 
761
    {
 
762
      ++yynerrs;
 
763
 
 
764
#ifdef YYERROR_VERBOSE
 
765
      yyn = yypact[yystate];
 
766
 
 
767
      if (yyn > YYFLAG && yyn < YYLAST)
 
768
        {
 
769
          int size = 0;
 
770
          char *msg;
 
771
          int x, count;
 
772
 
 
773
          count = 0;
 
774
          /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
 
775
          for (x = (yyn < 0 ? -yyn : 0);
 
776
               x < (sizeof(yytname) / sizeof(char *)); x++)
 
777
            if (yycheck[x + yyn] == x)
 
778
              size += strlen(yytname[x]) + 15, count++;
 
779
          msg = (char *) malloc(size + 15);
 
780
          if (msg != 0)
 
781
            {
 
782
              strcpy(msg, "parse error");
 
783
 
 
784
              if (count < 5)
 
785
                {
 
786
                  count = 0;
 
787
                  for (x = (yyn < 0 ? -yyn : 0);
 
788
                       x < (sizeof(yytname) / sizeof(char *)); x++)
 
789
                    if (yycheck[x + yyn] == x)
 
790
                      {
 
791
                        strcat(msg, count == 0 ? ", expecting `" : " or `");
 
792
                        strcat(msg, yytname[x]);
 
793
                        strcat(msg, "'");
 
794
                        count++;
 
795
                      }
 
796
                }
 
797
              yyerror(msg);
 
798
              free(msg);
 
799
            }
 
800
          else
 
801
            yyerror ("parse error; also virtual memory exceeded");
 
802
        }
 
803
      else
 
804
#endif /* YYERROR_VERBOSE */
 
805
        yyerror("parse error");
 
806
    }
 
807
 
 
808
  goto yyerrlab1;
 
809
yyerrlab1:   /* here on error raised explicitly by an action */
 
810
 
 
811
  if (yyerrstatus == 3)
 
812
    {
 
813
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
 
814
 
 
815
      /* return failure if at end of input */
 
816
      if (yychar == YYEOF)
 
817
        YYABORT;
 
818
 
 
819
#if YYDEBUG != 0
 
820
      if (yydebug)
 
821
        fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
 
822
#endif
 
823
 
 
824
      yychar = YYEMPTY;
 
825
    }
 
826
 
 
827
  /* Else will try to reuse lookahead token
 
828
     after shifting the error token.  */
 
829
 
 
830
  yyerrstatus = 3;              /* Each real token shifted decrements this */
 
831
 
 
832
  goto yyerrhandle;
 
833
 
 
834
yyerrdefault:  /* current state does not do anything special for the error token. */
 
835
 
 
836
#if 0
 
837
  /* This is wrong; only states that explicitly want error tokens
 
838
     should shift them.  */
 
839
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
 
840
  if (yyn) goto yydefault;
 
841
#endif
 
842
 
 
843
yyerrpop:   /* pop the current state because it cannot handle the error token */
 
844
 
 
845
  if (yyssp == yyss) YYABORT;
 
846
  yyvsp--;
 
847
  yystate = *--yyssp;
 
848
#ifdef YYLSP_NEEDED
 
849
  yylsp--;
 
850
#endif
 
851
 
 
852
#if YYDEBUG != 0
 
853
  if (yydebug)
 
854
    {
 
855
      short *ssp1 = yyss - 1;
 
856
      fprintf (stderr, "Error: state stack now");
 
857
      while (ssp1 != yyssp)
 
858
        fprintf (stderr, " %d", *++ssp1);
 
859
      fprintf (stderr, "\n");
 
860
    }
 
861
#endif
 
862
 
 
863
yyerrhandle:
 
864
 
 
865
  yyn = yypact[yystate];
 
866
  if (yyn == YYFLAG)
 
867
    goto yyerrdefault;
 
868
 
 
869
  yyn += YYTERROR;
 
870
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
 
871
    goto yyerrdefault;
 
872
 
 
873
  yyn = yytable[yyn];
 
874
  if (yyn < 0)
 
875
    {
 
876
      if (yyn == YYFLAG)
 
877
        goto yyerrpop;
 
878
      yyn = -yyn;
 
879
      goto yyreduce;
 
880
    }
 
881
  else if (yyn == 0)
 
882
    goto yyerrpop;
 
883
 
 
884
  if (yyn == YYFINAL)
 
885
    YYACCEPT;
 
886
 
 
887
#if YYDEBUG != 0
 
888
  if (yydebug)
 
889
    fprintf(stderr, "Shifting error token, ");
 
890
#endif
 
891
 
 
892
  *++yyvsp = yylval;
 
893
#ifdef YYLSP_NEEDED
 
894
  *++yylsp = yylloc;
 
895
#endif
 
896
 
 
897
  yystate = yyn;
 
898
  goto yynewstate;
 
899
 
 
900
 yyacceptlab:
 
901
  /* YYACCEPT comes here.  */
 
902
  if (yyfree_stacks)
 
903
    {
 
904
      free (yyss);
 
905
      free (yyvs);
 
906
#ifdef YYLSP_NEEDED
 
907
      free (yyls);
 
908
#endif
 
909
    }
 
910
  return 0;
 
911
 
 
912
 yyabortlab:
 
913
  /* YYABORT comes here.  */
 
914
  if (yyfree_stacks)
 
915
    {
 
916
      free (yyss);
 
917
      free (yyvs);
 
918
#ifdef YYLSP_NEEDED
 
919
      free (yyls);
 
920
#endif
 
921
    }
 
922
  return 1;
 
923
}
 
924
#line 29 "cardconstraint.y"
 
925