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