]> andersk Git - splint.git/blob - src/signature.c.der
Fixed state clauses. Added obvious loop exec checking.
[splint.git] / src / signature.c.der
1 /*
2 ** Inserted at beginning of c files generated by bison
3 ** REMEMBER:  Change bison.reset too.
4 */
5
6 /*@-allmacros@*/
7 /*@+boolint@*/
8 /*@+charint@*/
9 /*@-macroparams@*/
10 /*@-macroundef@*/
11 /*@-unreachable@*/
12 /*@-macrospec@*/
13 /*@-varuse@*/
14 /*@+ignorequals@*/
15 /*@-macrostmt@*/
16 /*@-noeffect@*/
17 /*@-shadow@*/
18 /*@-exitarg@*/
19 /*@-macroredef@*/
20 /*@-uniondef@*/
21 /*@-compdef@*/
22 /*@-matchfields@*/
23 /*@-exportlocal@*/
24 /*@-evalorderuncon@*/
25 /*@-exportheader@*/
26 /*@-typeuse@*/
27 /*@-redecl@*/
28 /*@-redef@*/
29 /*@-noparams@*/
30 /*@-ansireserved@*/
31 /*@-fielduse@*/
32 /*@-ifblock@*/
33 /*@-elseifcomplete@*/
34 /*@-whileblock@*/
35 /*@-forblock@*/
36 /*@-branchstate@*/
37 /*@-readonlytrans@*/
38 /*@-namechecks@*/
39 /*@-usedef@*/
40 /*@-systemunrecog@*/
41 /*@-dependenttrans@*/
42 /*@-unqualifiedtrans@*/
43 /*@-nullassign@*/
44 /*@-declundef@*/
45
46 /*drl added 11/27/2001*/
47 /*@-arraybounds@*/
48 /*@-arrayboundsread@*/
49 /* < end of bison.head > */
50
51
52 /*  A Bison parser, made from signature.y
53     by GNU Bison version 1.28  */
54
55 #define YYBISON 1  /* Identify Bison output.  */
56
57 #define yyparse lslparse
58 #define yylex lsllex
59 #define yyerror lslerror
60 #define yylval lsllval
61 #define yychar lslchar
62 #define yydebug lsldebug
63 #define yynerrs lslnerrs
64 #define LST_SIMPLEID    257
65 #define LST_LOGICALOP   258
66 #define LST_EQOP        259
67 #define LST_SIMPLEOP    260
68 #define LST_MAPSYM      261
69 #define LST_FIELDMAPSYM 262
70 #define LST_MARKERSYM   263
71 #define LST_ifTOKEN     264
72 #define LST_thenTOKEN   265
73 #define LST_elseTOKEN   266
74 #define LST_LBRACKET    267
75 #define LST_RBRACKET    268
76 #define LST_SELECTSYM   269
77 #define LST_SEPSYM      270
78 #define LST_OPENSYM     271
79 #define LST_CLOSESYM    272
80 #define LST_COLON       273
81 #define LST_COMMA       274
82 #define LST_EOL 275
83 #define LST_COMMENTSYM  276
84 #define LST_WHITESPACE  277
85 #define LST_QUANTIFIERSYM       278
86 #define LST_EQUATIONSYM 279
87 #define LST_EQSEPSYM    280
88 #define LST_COMPOSESYM  281
89 #define LST_LPAR        282
90 #define LST_RPAR        283
91 #define LST_assertsTOKEN        284
92 #define LST_assumesTOKEN        285
93 #define LST_byTOKEN     286
94 #define LST_convertsTOKEN       287
95 #define LST_enumerationTOKEN    288
96 #define LST_equationsTOKEN      289
97 #define LST_exemptingTOKEN      290
98 #define LST_forTOKEN    291
99 #define LST_generatedTOKEN      292
100 #define LST_impliesTOKEN        293
101 #define LST_includesTOKEN       294
102 #define LST_introducesTOKEN     295
103 #define LST_ofTOKEN     296
104 #define LST_partitionedTOKEN    297
105 #define LST_traitTOKEN  298
106 #define LST_tupleTOKEN  299
107 #define LST_unionTOKEN  300
108 #define LST_BADTOKEN    301
109
110
111
112 # include <stdio.h>
113 # include "lclintMacros.nf"
114 # include "llbasic.h"
115 # include "lslparse.h"
116 # include "signature.h"
117
118 void lslerror (char *);
119 /*@dependent@*/ /*@null@*/ lslOp importedlslOp;
120
121 /*@-noparams@*/ /* Can't list params since YYSTYPE isn't defined yet. */
122 static void yyprint (/*FILE *p_file, int p_type, YYSTYPE p_value */);
123 /*@=noparams@*/
124
125 # define YYPRINT(file, type, value) yyprint (file, type, value)
126
127 # define YYDEBUG 1
128
129 /*@-redef@*/
130 /*@-readonlytrans@*/
131 /*@-nullassign@*/
132
133
134 typedef union {
135   ltoken ltok;  /* a leaf is also an ltoken */
136   unsigned int count;
137   /*@only@*/  ltokenList ltokenList;
138   /*@only@*/  opFormNode opform;
139   /*@owned@*/ sigNode signature;
140   /*@only@*/  nameNode name;
141   /*@owned@*/ lslOp operator;
142   /*@only@*/  lslOpList operators;
143   /*@-redef@*/ /*@-matchfields@*/ 
144 } YYSTYPE;
145 #ifndef YYDEBUG
146 #define YYDEBUG 1
147 #endif
148
149 #include <stdio.h>
150
151 #ifndef __cplusplus
152 #ifndef __STDC__
153 #define const
154 #endif
155 #endif
156
157
158
159 #define YYFINAL         62
160 #define YYFLAG          -32768
161 #define YYNTBASE        48
162
163 #define YYTRANSLATE(x) ((unsigned)(x) <= 301 ? yytranslate[x] : 62)
164
165 static const char yytranslate[] = {     0,
166      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
167      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
168      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
169      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
170      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
171      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
172      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
173      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
174      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
175      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
176      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
177      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
178      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
179      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
180      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
181      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
182      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
183      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
184      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
185      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
186      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
187      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
188      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
189      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
190      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
191      2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
192      7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
193     17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
194     27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
195     37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
196     47
197 };
198
199 #if YYDEBUG != 0
200 static const short yyprhs[] = {     0,
201      0,     2,     4,     7,    11,    13,    15,    22,    24,    27,
202     30,    34,    38,    43,    48,    54,    58,    63,    68,    74,
203     77,    81,    85,    87,    89,    91,    92,    94,    96,   100,
204    102,   104,   108,   109,   111,   113,   117,   119
205 };
206
207 static const short yyrhs[] = {    49,
208      0,    50,     0,    49,    50,     0,    51,    19,    57,     0,
209     61,     0,    52,     0,    10,     9,    11,     9,    12,     9,
210      0,    53,     0,     9,    53,     0,    53,     9,     0,     9,
211     53,     9,     0,    17,    54,    18,     0,     9,    17,    54,
212     18,     0,    17,    54,    18,     9,     0,     9,    17,    54,
213     18,     9,     0,    13,    54,    14,     0,     9,    13,    54,
214     14,     0,    13,    54,    14,     9,     0,     9,    13,    54,
215     14,     9,     0,    15,     3,     0,     9,    15,     3,     0,
216      9,     8,     3,     0,     6,     0,     4,     0,     5,     0,
217      0,    55,     0,     9,     0,    55,    56,     9,     0,    20,
218      0,    16,     0,    58,     7,    60,     0,     0,    59,     0,
219     60,     0,    59,    20,    60,     0,     3,     0,     3,     0
220 };
221
222 #endif
223
224 #if YYDEBUG != 0
225 static const short yyrline[] = { 0,
226    137,   139,   144,   148,   154,   156,   160,   162,   164,   166,
227    168,   170,   172,   174,   176,   179,   182,   185,   188,   191,
228    194,   199,   204,   206,   208,   211,   213,   216,   218,   221,
229    223,   226,   229,   231,   234,   236,   239,   245
230 };
231 #endif
232
233
234 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
235
236 static const char * const yytname[] = {   "$","error","$undefined.","LST_SIMPLEID",
237 "LST_LOGICALOP","LST_EQOP","LST_SIMPLEOP","LST_MAPSYM","LST_FIELDMAPSYM","LST_MARKERSYM",
238 "LST_ifTOKEN","LST_thenTOKEN","LST_elseTOKEN","LST_LBRACKET","LST_RBRACKET",
239 "LST_SELECTSYM","LST_SEPSYM","LST_OPENSYM","LST_CLOSESYM","LST_COLON","LST_COMMA",
240 "LST_EOL","LST_COMMENTSYM","LST_WHITESPACE","LST_QUANTIFIERSYM","LST_EQUATIONSYM",
241 "LST_EQSEPSYM","LST_COMPOSESYM","LST_LPAR","LST_RPAR","LST_assertsTOKEN","LST_assumesTOKEN",
242 "LST_byTOKEN","LST_convertsTOKEN","LST_enumerationTOKEN","LST_equationsTOKEN",
243 "LST_exemptingTOKEN","LST_forTOKEN","LST_generatedTOKEN","LST_impliesTOKEN",
244 "LST_includesTOKEN","LST_introducesTOKEN","LST_ofTOKEN","LST_partitionedTOKEN",
245 "LST_traitTOKEN","LST_tupleTOKEN","LST_unionTOKEN","LST_BADTOKEN","top","operatorList",
246 "operator","name","opForm","anyOp","middle","placeList","separator","signature",
247 "domain","sortList","sortId","opId", NULL
248 };
249 #endif
250
251 static const short yyr1[] = {     0,
252     48,    49,    49,    50,    51,    51,    52,    52,    52,    52,
253     52,    52,    52,    52,    52,    52,    52,    52,    52,    52,
254     52,    52,    53,    53,    53,    54,    54,    55,    55,    56,
255     56,    57,    58,    58,    59,    59,    60,    61
256 };
257
258 static const short yyr2[] = {     0,
259      1,     1,     2,     3,     1,     1,     6,     1,     2,     2,
260      3,     3,     4,     4,     5,     3,     4,     4,     5,     2,
261      3,     3,     1,     1,     1,     0,     1,     1,     3,     1,
262      1,     3,     0,     1,     1,     3,     1,     1
263 };
264
265 static const short yydefact[] = {     0,
266     38,    24,    25,    23,     0,     0,    26,     0,    26,     1,
267      2,     0,     6,     8,     5,     0,    26,     0,    26,     9,
268      0,    28,     0,    27,    20,     0,     3,    33,    10,    22,
269      0,    21,     0,    11,     0,    16,    31,    30,     0,    12,
270     37,     4,     0,    34,    35,    17,    13,     0,    18,    29,
271     14,     0,     0,    19,    15,     0,    32,    36,     7,     0,
272      0,     0
273 };
274
275 static const short yydefgoto[] = {    60,
276     10,    11,    12,    13,    14,    23,    24,    39,    42,    43,
277     44,    45,    15
278 };
279
280 static const short yypact[] = {    -3,
281 -32768,-32768,-32768,-32768,    11,    -4,     0,     8,     0,    -3,
282 -32768,    -1,-32768,    13,-32768,    17,     0,    22,     0,    18,
283     20,-32768,    19,   -12,-32768,    14,-32768,    31,-32768,-32768,
284     21,-32768,    23,-32768,    27,    28,-32768,-32768,    29,    30,
285 -32768,-32768,    33,    24,-32768,    34,    36,    35,-32768,-32768,
286 -32768,    31,    31,-32768,-32768,    37,-32768,-32768,-32768,    42,
287     48,-32768
288 };
289
290 static const short yypgoto[] = {-32768,
291 -32768,    39,-32768,-32768,    45,     4,-32768,-32768,-32768,-32768,
292 -32768,   -23,-32768
293 };
294
295
296 #define YYLAST          50
297
298
299 static const short yytable[] = {     1,
300      2,     3,     4,    37,    21,     5,     6,    38,    22,     7,
301     25,     8,    26,     9,     2,     3,     4,    28,    16,    30,
302     31,    29,    33,    17,    32,    18,    34,    19,    57,    58,
303     35,    40,    36,    41,    46,    48,    49,    50,    51,    52,
304     47,    61,    54,    53,    55,    59,    56,    62,    27,    20
305 };
306
307 static const short yycheck[] = {     3,
308      4,     5,     6,    16,     9,     9,    10,    20,     9,    13,
309      3,    15,     9,    17,     4,     5,     6,    19,     8,     3,
310     17,     9,    19,    13,     3,    15,     9,    17,    52,    53,
311     11,    18,    14,     3,    14,     9,     9,     9,     9,     7,
312     18,     0,     9,    20,     9,     9,    12,     0,    10,     5
313 };
314 #define YYPURE 1
315
316 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
317
318 /* This file comes from bison-1.28.  */
319
320 /* Skeleton output parser for bison,
321    Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
322
323    This program is free software; you can redistribute it and/or modify
324    it under the terms of the GNU General Public License as published by
325    the Free Software Foundation; either version 2, or (at your option)
326    any later version.
327
328    This program is distributed in the hope that it will be useful,
329    but WITHOUT ANY WARRANTY; without even the implied warranty of
330    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
331    GNU General Public License for more details.
332
333    You should have received a copy of the GNU General Public License
334    along with this program; if not, write to the Free Software
335    Foundation, Inc., 59 Temple Place - Suite 330,
336    Boston, MA 02111-1307, USA.  */
337
338 /* As a special exception, when this file is copied by Bison into a
339    Bison output file, you may use that output file without restriction.
340    This special exception was added by the Free Software Foundation
341    in version 1.24 of Bison.  */
342
343 /* This is the parser code that is written into each bison parser
344   when the %semantic_parser declaration is not specified in the grammar.
345   It was written by Richard Stallman by simplifying the hairy parser
346   used when %semantic_parser is specified.  */
347
348 #ifndef YYSTACK_USE_ALLOCA
349 #ifdef alloca
350 #define YYSTACK_USE_ALLOCA
351 #else /* alloca not defined */
352 #ifdef __GNUC__
353 #define YYSTACK_USE_ALLOCA
354 #define alloca __builtin_alloca
355 #else /* not GNU C.  */
356 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
357 #define YYSTACK_USE_ALLOCA
358 #include <alloca.h>
359 #else /* not sparc */
360 /* We think this test detects Watcom and Microsoft C.  */
361 /* This used to test MSDOS, but that is a bad idea
362    since that symbol is in the user namespace.  */
363 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
364 #if 0 /* No need for malloc.h, which pollutes the namespace;
365          instead, just don't use alloca.  */
366 #include <malloc.h>
367 #endif
368 #else /* not MSDOS, or __TURBOC__ */
369 #if defined(_AIX)
370 /* I don't know what this was needed for, but it pollutes the namespace.
371    So I turned it off.   rms, 2 May 1997.  */
372 /* #include <malloc.h>  */
373  #pragma alloca
374 #define YYSTACK_USE_ALLOCA
375 #else /* not MSDOS, or __TURBOC__, or _AIX */
376 #if 0
377 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
378                  and on HPUX 10.  Eventually we can turn this on.  */
379 #define YYSTACK_USE_ALLOCA
380 #define alloca __builtin_alloca
381 #endif /* __hpux */
382 #endif
383 #endif /* not _AIX */
384 #endif /* not MSDOS, or __TURBOC__ */
385 #endif /* not sparc */
386 #endif /* not GNU C */
387 #endif /* alloca not defined */
388 #endif /* YYSTACK_USE_ALLOCA not defined */
389
390 #ifdef YYSTACK_USE_ALLOCA
391 #define YYSTACK_ALLOC alloca
392 #else
393 #define YYSTACK_ALLOC malloc
394 #endif
395
396 /* Note: there must be only one dollar sign in this file.
397    It is replaced by the list of actions, each action
398    as one case of the switch.  */
399
400 #define yyerrok         (yyerrstatus = 0)
401 #define yyclearin       (yychar = YYEMPTY)
402 #define YYEMPTY         -2
403 #define YYEOF           0
404 #define YYACCEPT        goto yyacceptlab
405 #define YYABORT         goto yyabortlab
406 #define YYERROR         goto yyerrlab1
407 /* Like YYERROR except do call yyerror.
408    This remains here temporarily to ease the
409    transition to the new meaning of YYERROR, for GCC.
410    Once GCC version 2 has supplanted version 1, this can go.  */
411 #define YYFAIL          goto yyerrlab
412 #define YYRECOVERING()  (!!yyerrstatus)
413 #define YYBACKUP(token, value) \
414 do                                                              \
415   if (yychar == YYEMPTY && yylen == 1)                          \
416     { yychar = (token), yylval = (value);                       \
417       yychar1 = YYTRANSLATE (yychar);                           \
418       YYPOPSTACK;                                               \
419       goto yybackup;                                            \
420     }                                                           \
421   else                                                          \
422     { yyerror ("syntax error: cannot back up"); YYERROR; }      \
423 while (0)
424
425 #define YYTERROR        1
426 #define YYERRCODE       256
427
428 #ifndef YYPURE
429 #define YYLEX           yylex()
430 #endif
431
432 #ifdef YYPURE
433 #ifdef YYLSP_NEEDED
434 #ifdef YYLEX_PARAM
435 #define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
436 #else
437 #define YYLEX           yylex(&yylval, &yylloc)
438 #endif
439 #else /* not YYLSP_NEEDED */
440 #ifdef YYLEX_PARAM
441 #define YYLEX           yylex(&yylval, YYLEX_PARAM)
442 #else
443 #define YYLEX           yylex(&yylval)
444 #endif
445 #endif /* not YYLSP_NEEDED */
446 #endif
447
448 /* If nonreentrant, generate the variables here */
449
450 #ifndef YYPURE
451
452 int     yychar;                 /*  the lookahead symbol                */
453 YYSTYPE yylval;                 /*  the semantic value of the           */
454                                 /*  lookahead symbol                    */
455
456 #ifdef YYLSP_NEEDED
457 YYLTYPE yylloc;                 /*  location data for the lookahead     */
458                                 /*  symbol                              */
459 #endif
460
461 int yynerrs;                    /*  number of parse errors so far       */
462 #endif  /* not YYPURE */
463
464 #if YYDEBUG != 0
465 int yydebug;                    /*  nonzero means print parse trace     */
466 /* Since this is uninitialized, it does not stop multiple parsers
467    from coexisting.  */
468 #endif
469
470 /*  YYINITDEPTH indicates the initial size of the parser's stacks       */
471
472 #ifndef YYINITDEPTH
473 #define YYINITDEPTH 200
474 #endif
475
476 /*  YYMAXDEPTH is the maximum size the stacks can grow to
477     (effective only if the built-in stack extension method is used).  */
478
479 #if YYMAXDEPTH == 0
480 #undef YYMAXDEPTH
481 #endif
482
483 #ifndef YYMAXDEPTH
484 #define YYMAXDEPTH 10000
485 #endif
486 \f
487 /* Define __yy_memcpy.  Note that the size argument
488    should be passed with type unsigned int, because that is what the non-GCC
489    definitions require.  With GCC, __builtin_memcpy takes an arg
490    of type size_t, but it can handle unsigned int.  */
491
492 #if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
493 #define __yy_memcpy(TO,FROM,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
494 #else                           /* not GNU C or C++ */
495 #ifndef __cplusplus
496
497 /* This is the most reliable way to avoid incompatibilities
498    in available built-in functions on various systems.  */
499 static void
500 __yy_memcpy (to, from, count)
501      char *to;
502      char *from;
503      unsigned int count;
504 {
505   register char *f = from;
506   register char *t = to;
507   register int i = count;
508
509   while (i-- > 0)
510     *t++ = *f++;
511 }
512
513 #else /* __cplusplus */
514
515 /* This is the most reliable way to avoid incompatibilities
516    in available built-in functions on various systems.  */
517 static void
518 __yy_memcpy (char *to, char *from, unsigned int count)
519 {
520   register char *t = to;
521   register char *f = from;
522   register int i = count;
523
524   while (i-- > 0)
525     *t++ = *f++;
526 }
527
528 #endif
529 #endif
530 \f
531
532
533 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
534    into yyparse.  The argument should have type void *.
535    It should actually point to an object.
536    Grammar actions can access the variable by casting it
537    to the proper pointer type.  */
538
539 #ifdef YYPARSE_PARAM
540 #ifdef __cplusplus
541 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
542 #define YYPARSE_PARAM_DECL
543 #else /* not __cplusplus */
544 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
545 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
546 #endif /* not __cplusplus */
547 #else /* not YYPARSE_PARAM */
548 #define YYPARSE_PARAM_ARG
549 #define YYPARSE_PARAM_DECL
550 #endif /* not YYPARSE_PARAM */
551
552 /* Prevent warning if -Wstrict-prototypes.  */
553 #ifdef __GNUC__
554 #ifdef YYPARSE_PARAM
555 int yyparse (void *);
556 #else
557 int yyparse (void);
558 #endif
559 #endif
560
561 int
562 yyparse(YYPARSE_PARAM_ARG)
563      YYPARSE_PARAM_DECL
564 {
565   register int yystate;
566   register int yyn;
567   register short *yyssp;
568   register YYSTYPE *yyvsp;
569   int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
570   int yychar1 = 0;              /*  lookahead token as an internal (translated) token number */
571
572   short yyssa[YYINITDEPTH];     /*  the state stack                     */
573   YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */
574
575   short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
576   YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */
577
578 #ifdef YYLSP_NEEDED
579   YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
580   YYLTYPE *yyls = yylsa;
581   YYLTYPE *yylsp;
582
583 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
584 #else
585 #define YYPOPSTACK   (yyvsp--, yyssp--)
586 #endif
587
588   int yystacksize = YYINITDEPTH;
589   int yyfree_stacks = 0;
590
591 #ifdef YYPURE
592   int yychar;
593   YYSTYPE yylval;
594   int yynerrs;
595 #ifdef YYLSP_NEEDED
596   YYLTYPE yylloc;
597 #endif
598 #endif
599
600   YYSTYPE yyval;                /*  the variable used to return         */
601                                 /*  semantic values from the action     */
602                                 /*  routines                            */
603
604   int yylen;
605
606 #if YYDEBUG != 0
607   if (yydebug)
608     fprintf(stderr, "Starting parse\n");
609 #endif
610
611   yystate = 0;
612   yyerrstatus = 0;
613   yynerrs = 0;
614   yychar = YYEMPTY;             /* Cause a token to be read.  */
615
616   /* Initialize stack pointers.
617      Waste one element of value and location stack
618      so that they stay on the same level as the state stack.
619      The wasted elements are never initialized.  */
620
621   yyssp = yyss - 1;
622   yyvsp = yyvs;
623 #ifdef YYLSP_NEEDED
624   yylsp = yyls;
625 #endif
626
627 /* Push a new state, which is found in  yystate  .  */
628 /* In all cases, when you get here, the value and location stacks
629    have just been pushed. so pushing a state here evens the stacks.  */
630 yynewstate:
631
632   *++yyssp = yystate;
633
634   if (yyssp >= yyss + yystacksize - 1)
635     {
636       /* Give user a chance to reallocate the stack */
637       /* Use copies of these so that the &'s don't force the real ones into memory. */
638       YYSTYPE *yyvs1 = yyvs;
639       short *yyss1 = yyss;
640 #ifdef YYLSP_NEEDED
641       YYLTYPE *yyls1 = yyls;
642 #endif
643
644       /* Get the current used size of the three stacks, in elements.  */
645       int size = yyssp - yyss + 1;
646
647 #ifdef yyoverflow
648       /* Each stack pointer address is followed by the size of
649          the data in use in that stack, in bytes.  */
650 #ifdef YYLSP_NEEDED
651       /* This used to be a conditional around just the two extra args,
652          but that might be undefined if yyoverflow is a macro.  */
653       yyoverflow("parser stack overflow",
654                  &yyss1, size * sizeof (*yyssp),
655                  &yyvs1, size * sizeof (*yyvsp),
656                  &yyls1, size * sizeof (*yylsp),
657                  &yystacksize);
658 #else
659       yyoverflow("parser stack overflow",
660                  &yyss1, size * sizeof (*yyssp),
661                  &yyvs1, size * sizeof (*yyvsp),
662                  &yystacksize);
663 #endif
664
665       yyss = yyss1; yyvs = yyvs1;
666 #ifdef YYLSP_NEEDED
667       yyls = yyls1;
668 #endif
669 #else /* no yyoverflow */
670       /* Extend the stack our own way.  */
671       if (yystacksize >= YYMAXDEPTH)
672         {
673           yyerror("parser stack overflow");
674           if (yyfree_stacks)
675             {
676               free (yyss);
677               free (yyvs);
678 #ifdef YYLSP_NEEDED
679               free (yyls);
680 #endif
681             }
682           return 2;
683         }
684       yystacksize *= 2;
685       if (yystacksize > YYMAXDEPTH)
686         yystacksize = YYMAXDEPTH;
687 #ifndef YYSTACK_USE_ALLOCA
688       yyfree_stacks = 1;
689 #endif
690       yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
691       __yy_memcpy ((char *)yyss, (char *)yyss1,
692                    size * (unsigned int) sizeof (*yyssp));
693       yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
694       __yy_memcpy ((char *)yyvs, (char *)yyvs1,
695                    size * (unsigned int) sizeof (*yyvsp));
696 #ifdef YYLSP_NEEDED
697       yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
698       __yy_memcpy ((char *)yyls, (char *)yyls1,
699                    size * (unsigned int) sizeof (*yylsp));
700 #endif
701 #endif /* no yyoverflow */
702
703       yyssp = yyss + size - 1;
704       yyvsp = yyvs + size - 1;
705 #ifdef YYLSP_NEEDED
706       yylsp = yyls + size - 1;
707 #endif
708
709 #if YYDEBUG != 0
710       if (yydebug)
711         fprintf(stderr, "Stack size increased to %d\n", yystacksize);
712 #endif
713
714       if (yyssp >= yyss + yystacksize - 1)
715         YYABORT;
716     }
717
718 #if YYDEBUG != 0
719   if (yydebug)
720     fprintf(stderr, "Entering state %d\n", yystate);
721 #endif
722
723   goto yybackup;
724  yybackup:
725
726 /* Do appropriate processing given the current state.  */
727 /* Read a lookahead token if we need one and don't already have one.  */
728 /* yyresume: */
729
730   /* First try to decide what to do without reference to lookahead token.  */
731
732   yyn = yypact[yystate];
733   if (yyn == YYFLAG)
734     goto yydefault;
735
736   /* Not known => get a lookahead token if don't already have one.  */
737
738   /* yychar is either YYEMPTY or YYEOF
739      or a valid token in external form.  */
740
741   if (yychar == YYEMPTY)
742     {
743 #if YYDEBUG != 0
744       if (yydebug)
745         fprintf(stderr, "Reading a token: ");
746 #endif
747       yychar = YYLEX;
748     }
749
750   /* Convert token to internal form (in yychar1) for indexing tables with */
751
752   if (yychar <= 0)              /* This means end of input. */
753     {
754       yychar1 = 0;
755       yychar = YYEOF;           /* Don't call YYLEX any more */
756
757 #if YYDEBUG != 0
758       if (yydebug)
759         fprintf(stderr, "Now at end of input.\n");
760 #endif
761     }
762   else
763     {
764       yychar1 = YYTRANSLATE(yychar);
765
766 #if YYDEBUG != 0
767       if (yydebug)
768         {
769           fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
770           /* Give the individual parser a way to print the precise meaning
771              of a token, for further debugging info.  */
772 #ifdef YYPRINT
773           YYPRINT (stderr, yychar, yylval);
774 #endif
775           fprintf (stderr, ")\n");
776         }
777 #endif
778     }
779
780   yyn += yychar1;
781   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
782     goto yydefault;
783
784   yyn = yytable[yyn];
785
786   /* yyn is what to do for this token type in this state.
787      Negative => reduce, -yyn is rule number.
788      Positive => shift, yyn is new state.
789        New state is final state => don't bother to shift,
790        just return success.
791      0, or most negative number => error.  */
792
793   if (yyn < 0)
794     {
795       if (yyn == YYFLAG)
796         goto yyerrlab;
797       yyn = -yyn;
798       goto yyreduce;
799     }
800   else if (yyn == 0)
801     goto yyerrlab;
802
803   if (yyn == YYFINAL)
804     YYACCEPT;
805
806   /* Shift the lookahead token.  */
807
808 #if YYDEBUG != 0
809   if (yydebug)
810     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
811 #endif
812
813   /* Discard the token being shifted unless it is eof.  */
814   if (yychar != YYEOF)
815     yychar = YYEMPTY;
816
817   *++yyvsp = yylval;
818 #ifdef YYLSP_NEEDED
819   *++yylsp = yylloc;
820 #endif
821
822   /* count tokens shifted since error; after three, turn off error status.  */
823   if (yyerrstatus) yyerrstatus--;
824
825   yystate = yyn;
826   goto yynewstate;
827
828 /* Do the default action for the current state.  */
829 yydefault:
830
831   yyn = yydefact[yystate];
832   if (yyn == 0)
833     goto yyerrlab;
834
835 /* Do a reduction.  yyn is the number of a rule to reduce with.  */
836 yyreduce:
837   yylen = yyr2[yyn];
838   if (yylen > 0)
839     yyval = yyvsp[1-yylen]; /* implement default value of the action */
840
841 #if YYDEBUG != 0
842   if (yydebug)
843     {
844       int i;
845
846       fprintf (stderr, "Reducing via rule %d (line %d), ",
847                yyn, yyrline[yyn]);
848
849       /* Print the symbols being reduced, and their result.  */
850       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
851         fprintf (stderr, "%s ", yytname[yyrhs[i]]);
852       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
853     }
854 #endif
855
856
857   switch (yyn) {
858
859 case 1:
860 { lslOpList_free (yyvsp[0].operators); ;
861     break;}
862 case 2:
863 { lslOpList x = lslOpList_new ();
864                 g_importedlslOp = yyvsp[0].operator;
865                 lslOpList_add (x, yyvsp[0].operator);
866                 yyval.operators = x; ;
867     break;}
868 case 3:
869 { lslOpList_add (yyvsp[-1].operators, yyvsp[0].operator);
870                 yyval.operators = yyvsp[-1].operators; ;
871     break;}
872 case 4:
873 { yyval.operator = makelslOpNode (yyvsp[-2].name, yyvsp[0].signature); ;
874     break;}
875 case 5:
876 { yyval.name = makeNameNodeId (yyvsp[0].ltok); ;
877     break;}
878 case 6:
879 { yyval.name = makeNameNodeForm (yyvsp[0].opform); ;
880     break;}
881 case 7:
882 { yyval.opform = makeOpFormNode (yyvsp[-5].ltok, OPF_IF, opFormUnion_createMiddle (0), ltoken_undefined); ;
883     break;}
884 case 8:
885 { yyval.opform = makeOpFormNode (yyvsp[0].ltok, OPF_ANYOP, opFormUnion_createAnyOp (yyvsp[0].ltok), ltoken_undefined); ;
886     break;}
887 case 9:
888 { yyval.opform = makeOpFormNode (yyvsp[-1].ltok, OPF_MANYOP, opFormUnion_createAnyOp (yyvsp[0].ltok), ltoken_undefined); ;
889     break;}
890 case 10:
891 { yyval.opform = makeOpFormNode (yyvsp[-1].ltok, OPF_ANYOPM, opFormUnion_createAnyOp (yyvsp[-1].ltok), ltoken_undefined); ;
892     break;}
893 case 11:
894 { yyval.opform = makeOpFormNode (yyvsp[-2].ltok, OPF_MANYOPM, opFormUnion_createAnyOp (yyvsp[-1].ltok), ltoken_undefined); ;
895     break;}
896 case 12:
897 { yyval.opform = makeOpFormNode (yyvsp[-2].ltok, OPF_MIDDLE, opFormUnion_createMiddle (yyvsp[-1].count), yyvsp[0].ltok); ;
898     break;}
899 case 13:
900 { yyval.opform = makeOpFormNode (yyvsp[-2].ltok, OPF_MMIDDLE, opFormUnion_createMiddle (yyvsp[-1].count), yyvsp[0].ltok); ;
901     break;}
902 case 14:
903 { yyval.opform = makeOpFormNode (yyvsp[-3].ltok, OPF_MIDDLEM, opFormUnion_createMiddle (yyvsp[-2].count), yyvsp[-1].ltok); ;
904     break;}
905 case 15:
906 { yyval.opform = makeOpFormNode (yyvsp[-3].ltok, OPF_MMIDDLEM, 
907                               opFormUnion_createMiddle (yyvsp[-2].count), yyvsp[-1].ltok); ;
908     break;}
909 case 16:
910 { yyval.opform = makeOpFormNode (yyvsp[-2].ltok, OPF_BMIDDLE, 
911                               opFormUnion_createMiddle (yyvsp[-1].count), yyvsp[0].ltok); ;
912     break;}
913 case 17:
914 { yyval.opform = makeOpFormNode (yyvsp[-2].ltok, OPF_BMMIDDLE, 
915                               opFormUnion_createMiddle (yyvsp[-1].count), yyvsp[0].ltok); ;
916     break;}
917 case 18:
918 { yyval.opform = makeOpFormNode (yyvsp[-3].ltok, OPF_BMIDDLEM, 
919                             opFormUnion_createMiddle (yyvsp[-2].count), yyvsp[-1].ltok); ;
920     break;}
921 case 19:
922 { yyval.opform = makeOpFormNode (yyvsp[-3].ltok, OPF_BMMIDDLEM, 
923                             opFormUnion_createMiddle (yyvsp[-2].count), yyvsp[-1].ltok); ;
924     break;}
925 case 20:
926 { yyval.opform = makeOpFormNode (yyvsp[-1].ltok, OPF_SELECT, 
927                             opFormUnion_createAnyOp (yyvsp[0].ltok), ltoken_undefined); ;
928     break;}
929 case 21:
930 { yyval.opform = makeOpFormNode (yyvsp[-2].ltok, OPF_MSELECT, 
931                             opFormUnion_createAnyOp (yyvsp[0].ltok), ltoken_undefined); ;
932     break;}
933 case 22:
934 { yyval.opform = makeOpFormNode (yyvsp[-2].ltok, OPF_MMAP, 
935                             opFormUnion_createAnyOp (yyvsp[0].ltok), ltoken_undefined); ;
936     break;}
937 case 23:
938 { yyval.ltok = yyvsp[0].ltok; ;
939     break;}
940 case 24:
941 { yyval.ltok = yyvsp[0].ltok; ;
942     break;}
943 case 25:
944 { yyval.ltok = yyvsp[0].ltok; ;
945     break;}
946 case 26:
947 { yyval.count = 0; ;
948     break;}
949 case 27:
950 { yyval.count = yyvsp[0].count; ;
951     break;}
952 case 28:
953 { yyval.count = 1; ;
954     break;}
955 case 29:
956 { yyval.count = yyvsp[-2].count + 1; ;
957     break;}
958 case 30:
959 { yyval.ltok = yyvsp[0].ltok; ;
960     break;}
961 case 31:
962 { yyval.ltok = yyvsp[0].ltok; ;
963     break;}
964 case 32:
965 { yyval.signature = makesigNode (yyvsp[-1].ltok, yyvsp[-2].ltokenList, yyvsp[0].ltok); ;
966     break;}
967 case 33:
968 { yyval.ltokenList = ltokenList_new (); ;
969     break;}
970 case 34:
971 { yyval.ltokenList = yyvsp[0].ltokenList; ;
972     break;}
973 case 35:
974 { yyval.ltokenList = ltokenList_singleton (yyvsp[0].ltok); ;
975     break;}
976 case 36:
977 { yyval.ltokenList = ltokenList_push (yyvsp[-2].ltokenList, yyvsp[0].ltok); ;
978     break;}
979 case 37:
980
981           yyval.ltok = yyvsp[0].ltok; 
982           ltoken_setText (yyval.ltok, processTraitSortId (ltoken_getText (yyvsp[0].ltok))); 
983         ;
984     break;}
985 case 38:
986 { yyval.ltok = yyvsp[0].ltok; ;
987     break;}
988 }
989    /* the action file gets copied in in place of this dollarsign */
990
991 \f
992   yyvsp -= yylen;
993   yyssp -= yylen;
994 #ifdef YYLSP_NEEDED
995   yylsp -= yylen;
996 #endif
997
998 #if YYDEBUG != 0
999   if (yydebug)
1000     {
1001       short *ssp1 = yyss - 1;
1002       fprintf (stderr, "state stack now");
1003       while (ssp1 != yyssp)
1004         fprintf (stderr, " %d", *++ssp1);
1005       fprintf (stderr, "\n");
1006     }
1007 #endif
1008
1009   *++yyvsp = yyval;
1010
1011 #ifdef YYLSP_NEEDED
1012   yylsp++;
1013   if (yylen == 0)
1014     {
1015       yylsp->first_line = yylloc.first_line;
1016       yylsp->first_column = yylloc.first_column;
1017       yylsp->last_line = (yylsp-1)->last_line;
1018       yylsp->last_column = (yylsp-1)->last_column;
1019       yylsp->text = 0;
1020     }
1021   else
1022     {
1023       yylsp->last_line = (yylsp+yylen-1)->last_line;
1024       yylsp->last_column = (yylsp+yylen-1)->last_column;
1025     }
1026 #endif
1027
1028   /* Now "shift" the result of the reduction.
1029      Determine what state that goes to,
1030      based on the state we popped back to
1031      and the rule number reduced by.  */
1032
1033   yyn = yyr1[yyn];
1034
1035   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1036   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1037     yystate = yytable[yystate];
1038   else
1039     yystate = yydefgoto[yyn - YYNTBASE];
1040
1041   goto yynewstate;
1042
1043 yyerrlab:   /* here on detecting error */
1044
1045   if (! yyerrstatus)
1046     /* If not already recovering from an error, report this error.  */
1047     {
1048       ++yynerrs;
1049
1050 #ifdef YYERROR_VERBOSE
1051       yyn = yypact[yystate];
1052
1053       if (yyn > YYFLAG && yyn < YYLAST)
1054         {
1055           int size = 0;
1056           char *msg;
1057           int x, count;
1058
1059           count = 0;
1060           /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
1061           for (x = (yyn < 0 ? -yyn : 0);
1062                x < (sizeof(yytname) / sizeof(char *)); x++)
1063             if (yycheck[x + yyn] == x)
1064               size += strlen(yytname[x]) + 15, count++;
1065           msg = (char *) malloc(size + 15);
1066           if (msg != 0)
1067             {
1068               strcpy(msg, "parse error");
1069
1070               if (count < 5)
1071                 {
1072                   count = 0;
1073                   for (x = (yyn < 0 ? -yyn : 0);
1074                        x < (sizeof(yytname) / sizeof(char *)); x++)
1075                     if (yycheck[x + yyn] == x)
1076                       {
1077                         strcat(msg, count == 0 ? ", expecting `" : " or `");
1078                         strcat(msg, yytname[x]);
1079                         strcat(msg, "'");
1080                         count++;
1081                       }
1082                 }
1083               yyerror(msg);
1084               free(msg);
1085             }
1086           else
1087             yyerror ("parse error; also virtual memory exceeded");
1088         }
1089       else
1090 #endif /* YYERROR_VERBOSE */
1091         yyerror("parse error");
1092     }
1093
1094   goto yyerrlab1;
1095 yyerrlab1:   /* here on error raised explicitly by an action */
1096
1097   if (yyerrstatus == 3)
1098     {
1099       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
1100
1101       /* return failure if at end of input */
1102       if (yychar == YYEOF)
1103         YYABORT;
1104
1105 #if YYDEBUG != 0
1106       if (yydebug)
1107         fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
1108 #endif
1109
1110       yychar = YYEMPTY;
1111     }
1112
1113   /* Else will try to reuse lookahead token
1114      after shifting the error token.  */
1115
1116   yyerrstatus = 3;              /* Each real token shifted decrements this */
1117
1118   goto yyerrhandle;
1119
1120 yyerrdefault:  /* current state does not do anything special for the error token. */
1121
1122 #if 0
1123   /* This is wrong; only states that explicitly want error tokens
1124      should shift them.  */
1125   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
1126   if (yyn) goto yydefault;
1127 #endif
1128
1129 yyerrpop:   /* pop the current state because it cannot handle the error token */
1130
1131   if (yyssp == yyss) YYABORT;
1132   yyvsp--;
1133   yystate = *--yyssp;
1134 #ifdef YYLSP_NEEDED
1135   yylsp--;
1136 #endif
1137
1138 #if YYDEBUG != 0
1139   if (yydebug)
1140     {
1141       short *ssp1 = yyss - 1;
1142       fprintf (stderr, "Error: state stack now");
1143       while (ssp1 != yyssp)
1144         fprintf (stderr, " %d", *++ssp1);
1145       fprintf (stderr, "\n");
1146     }
1147 #endif
1148
1149 yyerrhandle:
1150
1151   yyn = yypact[yystate];
1152   if (yyn == YYFLAG)
1153     goto yyerrdefault;
1154
1155   yyn += YYTERROR;
1156   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1157     goto yyerrdefault;
1158
1159   yyn = yytable[yyn];
1160   if (yyn < 0)
1161     {
1162       if (yyn == YYFLAG)
1163         goto yyerrpop;
1164       yyn = -yyn;
1165       goto yyreduce;
1166     }
1167   else if (yyn == 0)
1168     goto yyerrpop;
1169
1170   if (yyn == YYFINAL)
1171     YYACCEPT;
1172
1173 #if YYDEBUG != 0
1174   if (yydebug)
1175     fprintf(stderr, "Shifting error token, ");
1176 #endif
1177
1178   *++yyvsp = yylval;
1179 #ifdef YYLSP_NEEDED
1180   *++yylsp = yylloc;
1181 #endif
1182
1183   yystate = yyn;
1184   goto yynewstate;
1185
1186  yyacceptlab:
1187   /* YYACCEPT comes here.  */
1188   if (yyfree_stacks)
1189     {
1190       free (yyss);
1191       free (yyvs);
1192 #ifdef YYLSP_NEEDED
1193       free (yyls);
1194 #endif
1195     }
1196   return 0;
1197
1198  yyabortlab:
1199   /* YYABORT comes here.  */
1200   if (yyfree_stacks)
1201     {
1202       free (yyss);
1203       free (yyvs);
1204 #ifdef YYLSP_NEEDED
1205       free (yyls);
1206 #endif
1207     }
1208   return 1;
1209 }
1210
1211
1212 # include "bison.reset"
1213
1214 extern char *yytext;
1215
1216 void lslerror (char *s) 
1217 {
1218   llfatalbug 
1219     (cstring_makeLiteral 
1220      ("There has been a problem in the parser with LSL signatures. This is believed to result "
1221       "from a problem with bison v. 1.25.  Please try rebuidling LCLint "
1222       "using the pre-compiled grammar files by commenting out the "
1223       "BISON= line in the top-level Makefile."));
1224 }
1225
1226 static void yyprint (FILE *file, int type, YYSTYPE value)
1227 {
1228   fprintf (file, " (%u:%u type: %d; text: %s) ", 
1229            ltoken_getLine (value.ltok), 
1230            ltoken_getCol (value.ltok), 
1231            type, 
1232            ltoken_getRawTextChars (value.ltok));
1233 }
1234
1235 extern void PrintToken (ltoken tok) {
1236   char *codStr;
1237   
1238   switch (ltoken_getCode (tok)) 
1239     {
1240     case NOTTOKEN:          codStr = "*** NOTTOKEN ***"; break;
1241     case LST_QUANTIFIERSYM: codStr = "QUANTIFIERSYM"; break;
1242     case LST_LOGICALOP:     codStr = "LOGICALOP: "; break; 
1243     case LST_SELECTSYM:     codStr = "LST_SELECTSYM"; break;
1244     case LST_OPENSYM:       codStr = "LST_OPENSYM"; break;
1245     case LST_SEPSYM:        codStr = "SEPSYM"; break;
1246     case LST_CLOSESYM:      codStr = "LST_CLOSESYM"; break;
1247     case LST_SIMPLEID:      codStr = "LST_SIMPLEID"; break;
1248     case LST_MAPSYM:        codStr = "MAPSYM"; break;
1249     case LST_MARKERSYM:     codStr = "LST_MARKERSYM"; break;
1250     case LST_COMMENTSYM:    codStr = "COMMENTSYM"; break;
1251     case LST_SIMPLEOP:      codStr = "SIMPLEOP"; break;
1252     case LST_COLON:         codStr = "LST_COLON"; break;
1253     case LST_COMMA:         codStr = "COMMA"; break;
1254     case LST_LBRACKET:      codStr = "LST_LBRACKET"; break;
1255     case LST_LPAR:          codStr = "LST_LPAR"; break;
1256     case LST_RBRACKET:      codStr = "LST_RBRACKET"; break;
1257     case LST_RPAR:          codStr = "LST_RPAR"; break;
1258     case LST_EQOP:          codStr = "LST_EQOP"; break;
1259     case LST_WHITESPACE:    codStr = "WHITESPACE,"; break;
1260     case LST_EOL:           codStr = "LST_EOL"; break;
1261     case LST_elseTOKEN:     codStr = "elseTOKEN"; break;
1262     case LST_ifTOKEN:       codStr = "ifTOKEN"; break;
1263     case LST_thenTOKEN:     codStr = "thenTOKEN"; break;
1264     case LST_BADTOKEN:      codStr = "*** BADTOKEN ***"; break;
1265     case LEOFTOKEN: /* can't reach LEOFTOKEN easily */
1266       codStr = "LEOFTOKEN"; break;
1267     default:
1268       codStr = "*** invalid token code ***";
1269       break;
1270     } /* end switch */
1271   
1272   /* only used for debugging */
1273   printf ("%u:%u: Token Code (%u): %s",
1274           ltoken_getLine (tok), ltoken_getCol (tok), 
1275           ltoken_getCode (tok), codStr);
1276   if (ltoken_getRawText (tok) != 0) 
1277     {
1278       printf (", Token String (%lu): %s\n", 
1279               ltoken_getRawText (tok), ltoken_getRawTextChars (tok));
1280     }
1281   else printf ("\n");
1282 }
1283
1284
1285
1286
1287 /*
1288 ** Resets all flags in bison.head
1289 */
1290
1291
1292 /*@=allmacros@*/
1293 /*@=boolint@*/
1294 /*@=charint@*/
1295 /*@=macroparams@*/
1296 /*@=macroundef@*/
1297 /*@=unreachable@*/
1298 /*@=macrospec@*/
1299 /*@=varuse@*/
1300 /*@=ignorequals@*/
1301 /*@=macrostmt@*/
1302 /*@=noeffect@*/
1303 /*@=shadow@*/
1304 /*@=exitarg@*/
1305 /*@=macroredef@*/
1306 /*@=uniondef@*/
1307 /*@=compdef@*/
1308 /*@=matchfields@*/
1309 /*@=exportlocal@*/
1310 /*@=evalorderuncon@*/
1311 /*@=exportheader@*/
1312 /*@=typeuse@*/
1313 /*@=redecl@*/
1314 /*@=redef@*/
1315 /*@=noparams@*/
1316 /*@=ansireserved@*/
1317 /*@=fielduse@*/
1318 /*@=ifblock@*/
1319 /*@=elseifcomplete@*/
1320 /*@=whileblock@*/
1321 /*@=forblock@*/
1322 /*@=branchstate@*/
1323 /*@=readonlytrans@*/
1324 /*@=namechecks@*/
1325 /*@=usedef@*/
1326 /*@=systemunrecog@*/
1327 /*@=dependenttrans@*/
1328 /*@=unqualifiedtrans@*/
1329 /*@=declundef@*/
1330
1331
1332 /*drl added 11/27/2001*/
1333 /*@=arraybounds@*/
1334 /*@=arrayboundsread@*/
This page took 0.139925 seconds and 5 git commands to generate.