2
/* A Bison parser, made from adsmcoutput.y
3
by GNU Bison version 1.28 */
5
#define YYBISON 1 /* Identify Bison output. */
7
#define yyparse adsmcoutputparse
8
#define yylex adsmcoutputlex
9
#define yyerror adsmcoutputerror
10
#define yylval adsmcoutputlval
11
#define yychar adsmcoutputchar
12
#define yydebug adsmcoutputdebug
13
#define yynerrs adsmcoutputnerrs
28
#line 1 "adsmcoutput.y"
31
#include "adsmcoutputparse.h"
36
typedef char *CHAR_PTR;
37
#define YYSTYPE CHAR_PTR
46
int enabledhyperedge[2000];
47
int enabledstatenumber[2000];
48
char *sourcename[2000]; /* name of source */
49
char *targetname[2000]; /* name of target */
50
int sourcestatenumber[2000];
51
int targetstatenumber[2000]; /* what statecounter does sourcestatenumber[i] belong to?*/
53
int sourceindex, targetindex;
55
#line 29 "adsmcoutput.y"
73
#define YYTRANSLATE(x) ((unsigned)(x) <= 269 ? yytranslate[x] : 38)
75
static const char yytranslate[] = { 0,
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, 2, 2, 2, 2, 2,
82
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
83
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
84
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
85
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
86
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
87
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
88
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
89
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
90
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
91
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
92
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
93
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
94
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
95
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
96
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
97
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
98
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
99
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
100
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
101
2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
102
7, 8, 9, 10, 11, 12, 13, 14, 15
106
static const short yyprhs[] = { 0,
107
0, 2, 6, 9, 12, 15, 18, 19, 22, 25,
108
28, 29, 33, 34, 39, 42, 43, 47, 50, 52,
109
58, 65, 67, 71, 72, 78, 80, 83, 84, 88,
110
91, 94, 98, 102, 105, 107, 111, 113, 116, 118,
111
121, 122, 129, 135, 138
114
static const short yyrhs[] = { 17,
115
0, 21, 22, 34, 0, 13, 18, 0, 9, 18,
116
0, 8, 18, 0, 12, 18, 0, 0, 13, 19,
117
0, 9, 19, 0, 8, 19, 0, 0, 19, 11,
118
20, 0, 0, 20, 5, 18, 11, 0, 23, 24,
119
0, 0, 5, 19, 11, 0, 26, 25, 0, 26,
120
0, 5, 33, 5, 11, 26, 0, 25, 5, 33,
121
5, 11, 26, 0, 27, 0, 28, 30, 27, 0,
122
0, 12, 29, 13, 13, 11, 0, 10, 0, 31,
123
30, 0, 0, 13, 14, 11, 0, 13, 8, 0,
124
13, 9, 0, 13, 13, 8, 0, 13, 13, 9,
125
0, 14, 11, 0, 11, 0, 6, 13, 11, 0,
126
7, 0, 32, 7, 0, 19, 0, 35, 36, 0,
127
0, 32, 11, 19, 37, 11, 19, 0, 32, 19,
128
37, 11, 19, 0, 5, 37, 0, 5, 0
134
static const short yyrline[] = { 0,
135
39, 42, 47, 48, 49, 50, 51, 54, 55, 56,
136
57, 60, 60, 64, 67, 68, 71, 74, 74, 78,
137
79, 85, 90, 92, 97, 100, 104, 105, 108, 122,
138
135, 148, 149, 151, 152, 153, 162, 162, 164, 168,
139
168, 171, 174, 181, 182
144
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
146
static const char * const yytname[] = { "$","error","$undefined.","IQ","QUOTE",
147
"COMMENT","COUNTER","HASH","ISZERO","ISONE","STATE","NL","ARROW","STRING","ENABLED",
148
"IN","input","line","arrowstringseq","stringseq","stringlines","start","middle",
149
"middle1","middle2","middle4","feedback","enabledfeedback","stateseq","state",
150
"enabledfeedback2","enabledfeedbackatom","hashseq","loop","end","end1","end2",
155
static const short yyr1[] = { 0,
156
16, 17, 18, 18, 18, 18, 18, 19, 19, 19,
157
19, 20, 20, 21, 22, 22, 23, 24, 24, 25,
158
25, 26, 27, 27, 28, 29, 30, 30, 31, 31,
159
31, 31, 31, 31, 31, 31, 32, 32, 33, 34,
163
static const short yyr2[] = { 0,
164
1, 3, 2, 2, 2, 2, 0, 2, 2, 2,
165
0, 3, 0, 4, 2, 0, 3, 2, 1, 5,
166
6, 1, 3, 0, 5, 1, 2, 0, 3, 2,
167
2, 3, 3, 2, 1, 3, 1, 2, 1, 2,
171
static const short yydefact[] = { 11,
172
11, 11, 11, 1, 0, 0, 16, 10, 9, 8,
173
11, 7, 11, 41, 24, 12, 7, 7, 7, 7,
174
0, 0, 37, 0, 2, 0, 0, 15, 19, 22,
175
28, 5, 4, 6, 3, 14, 17, 38, 11, 11,
176
40, 26, 0, 11, 18, 0, 35, 0, 0, 24,
177
28, 0, 0, 0, 39, 0, 11, 0, 30, 31,
178
0, 0, 34, 23, 27, 45, 0, 0, 0, 0,
179
0, 36, 32, 33, 29, 44, 11, 11, 25, 24,
180
0, 42, 43, 20, 24, 21, 0, 0, 0
183
static const short yydefgoto[] = { 87,
184
4, 21, 5, 6, 7, 14, 15, 28, 45, 29,
185
30, 31, 43, 50, 51, 24, 56, 25, 26, 41,
189
static const short yypact[] = { 0,
190
-2, -2, -2,-32768, -7, 9, 19,-32768,-32768,-32768,
191
0, 21, -2, 28, 30,-32768, 21, 21, 21, 21,
192
26, 37,-32768, 25,-32768, 28, 39,-32768, 45,-32768,
193
4,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -2, 12,
194
-32768,-32768, 38, -2, 47, 40,-32768, 14, 43, 30,
195
4, 50, 50, 44,-32768, 53, -2, 48,-32768,-32768,
196
32, 49,-32768,-32768,-32768, 50, 51, 52, 54, 55,
197
56,-32768,-32768,-32768,-32768,-32768, -2, -2,-32768, 30,
198
57,-32768,-32768,-32768, 30,-32768, 64, 67,-32768
201
static const short yypgoto[] = {-32768,
202
-32768, 27, -1, 58,-32768,-32768,-32768,-32768,-32768, -54,
203
20,-32768,-32768, 22,-32768, 46, 17,-32768,-32768,-32768,
211
static const short yytable[] = { 8,
212
9, 10, 68, 11, -13, 1, 2, 1, 2, 46,
213
3, 22, 3, 12, 47, 76, 48, 49, 38, 1,
214
2, 59, 60, 13, 3, 84, 61, 62, 17, 18,
215
86, 38, 19, 20, 23, 39, 36, 52, 53, 73,
216
74, 27, 55, 32, 33, 34, 35, 37, 42, 44,
217
54, 57, 58, 63, 66, 55, 69, 70, 72, 75,
218
81, 77, 78, 88, 79, 80, 89, 85, 16, 64,
219
0, 40, 65, 71, 0, 82, 83
222
static const short yycheck[] = { 1,
223
2, 3, 53, 11, 5, 8, 9, 8, 9, 6,
224
13, 13, 13, 5, 11, 66, 13, 14, 7, 8,
225
9, 8, 9, 5, 13, 80, 13, 14, 8, 9,
226
85, 7, 12, 13, 7, 11, 11, 39, 40, 8,
227
9, 12, 44, 17, 18, 19, 20, 11, 10, 5,
228
13, 5, 13, 11, 5, 57, 13, 5, 11, 11,
229
5, 11, 11, 0, 11, 11, 0, 11, 11, 50,
230
-1, 26, 51, 57, -1, 77, 78
232
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
233
#line 3 "/usr/lib/bison.simple"
234
/* This file comes from bison-1.28. */
236
/* Skeleton output parser for bison,
237
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
239
This program is free software; you can redistribute it and/or modify
240
it under the terms of the GNU General Public License as published by
241
the Free Software Foundation; either version 2, or (at your option)
244
This program is distributed in the hope that it will be useful,
245
but WITHOUT ANY WARRANTY; without even the implied warranty of
246
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
247
GNU General Public License for more details.
249
You should have received a copy of the GNU General Public License
250
along with this program; if not, write to the Free Software
251
Foundation, Inc., 59 Temple Place - Suite 330,
252
Boston, MA 02111-1307, USA. */
254
/* As a special exception, when this file is copied by Bison into a
255
Bison output file, you may use that output file without restriction.
256
This special exception was added by the Free Software Foundation
257
in version 1.24 of Bison. */
259
/* This is the parser code that is written into each bison parser
260
when the %semantic_parser declaration is not specified in the grammar.
261
It was written by Richard Stallman by simplifying the hairy parser
262
used when %semantic_parser is specified. */
264
#ifndef YYSTACK_USE_ALLOCA
266
#define YYSTACK_USE_ALLOCA
267
#else /* alloca not defined */
269
#define YYSTACK_USE_ALLOCA
270
#define alloca __builtin_alloca
271
#else /* not GNU C. */
272
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
273
#define YYSTACK_USE_ALLOCA
275
#else /* not sparc */
276
/* We think this test detects Watcom and Microsoft C. */
277
/* This used to test MSDOS, but that is a bad idea
278
since that symbol is in the user namespace. */
279
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
280
#if 0 /* No need for malloc.h, which pollutes the namespace;
281
instead, just don't use alloca. */
284
#else /* not MSDOS, or __TURBOC__ */
286
/* I don't know what this was needed for, but it pollutes the namespace.
287
So I turned it off. rms, 2 May 1997. */
288
/* #include <malloc.h> */
290
#define YYSTACK_USE_ALLOCA
291
#else /* not MSDOS, or __TURBOC__, or _AIX */
293
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
294
and on HPUX 10. Eventually we can turn this on. */
295
#define YYSTACK_USE_ALLOCA
296
#define alloca __builtin_alloca
299
#endif /* not _AIX */
300
#endif /* not MSDOS, or __TURBOC__ */
301
#endif /* not sparc */
302
#endif /* not GNU C */
303
#endif /* alloca not defined */
304
#endif /* YYSTACK_USE_ALLOCA not defined */
306
#ifdef YYSTACK_USE_ALLOCA
307
#define YYSTACK_ALLOC alloca
309
#define YYSTACK_ALLOC malloc
312
/* Note: there must be only one dollar sign in this file.
313
It is replaced by the list of actions, each action
314
as one case of the switch. */
316
#define yyerrok (yyerrstatus = 0)
317
#define yyclearin (yychar = YYEMPTY)
320
#define YYACCEPT goto yyacceptlab
321
#define YYABORT goto yyabortlab
322
#define YYERROR goto yyerrlab1
323
/* Like YYERROR except do call yyerror.
324
This remains here temporarily to ease the
325
transition to the new meaning of YYERROR, for GCC.
326
Once GCC version 2 has supplanted version 1, this can go. */
327
#define YYFAIL goto yyerrlab
328
#define YYRECOVERING() (!!yyerrstatus)
329
#define YYBACKUP(token, value) \
331
if (yychar == YYEMPTY && yylen == 1) \
332
{ yychar = (token), yylval = (value); \
333
yychar1 = YYTRANSLATE (yychar); \
338
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
342
#define YYERRCODE 256
345
#define YYLEX yylex()
351
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
353
#define YYLEX yylex(&yylval, &yylloc)
355
#else /* not YYLSP_NEEDED */
357
#define YYLEX yylex(&yylval, YYLEX_PARAM)
359
#define YYLEX yylex(&yylval)
361
#endif /* not YYLSP_NEEDED */
364
/* If nonreentrant, generate the variables here */
368
int yychar; /* the lookahead symbol */
369
YYSTYPE yylval; /* the semantic value of the */
370
/* lookahead symbol */
373
YYLTYPE yylloc; /* location data for the lookahead */
377
int yynerrs; /* number of parse errors so far */
378
#endif /* not YYPURE */
381
int yydebug; /* nonzero means print parse trace */
382
/* Since this is uninitialized, it does not stop multiple parsers
386
/* YYINITDEPTH indicates the initial size of the parser's stacks */
389
#define YYINITDEPTH 200
392
/* YYMAXDEPTH is the maximum size the stacks can grow to
393
(effective only if the built-in stack extension method is used). */
400
#define YYMAXDEPTH 10000
403
/* Define __yy_memcpy. Note that the size argument
404
should be passed with type unsigned int, because that is what the non-GCC
405
definitions require. With GCC, __builtin_memcpy takes an arg
406
of type size_t, but it can handle unsigned int. */
408
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
409
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
410
#else /* not GNU C or C++ */
413
/* This is the most reliable way to avoid incompatibilities
414
in available built-in functions on various systems. */
416
__yy_memcpy (to, from, count)
421
register char *f = from;
422
register char *t = to;
423
register int i = count;
429
#else /* __cplusplus */
431
/* This is the most reliable way to avoid incompatibilities
432
in available built-in functions on various systems. */
434
__yy_memcpy (char *to, char *from, unsigned int count)
436
register char *t = to;
437
register char *f = from;
438
register int i = count;
447
#line 217 "/usr/lib/bison.simple"
449
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
450
into yyparse. The argument should have type void *.
451
It should actually point to an object.
452
Grammar actions can access the variable by casting it
453
to the proper pointer type. */
457
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
458
#define YYPARSE_PARAM_DECL
459
#else /* not __cplusplus */
460
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
461
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
462
#endif /* not __cplusplus */
463
#else /* not YYPARSE_PARAM */
464
#define YYPARSE_PARAM_ARG
465
#define YYPARSE_PARAM_DECL
466
#endif /* not YYPARSE_PARAM */
468
/* Prevent warning if -Wstrict-prototypes. */
471
int yyparse (void *);
478
yyparse(YYPARSE_PARAM_ARG)
481
register int yystate;
483
register short *yyssp;
484
register YYSTYPE *yyvsp;
485
int yyerrstatus; /* number of tokens to shift before error messages enabled */
486
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
488
short yyssa[YYINITDEPTH]; /* the state stack */
489
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
491
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
492
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
495
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
496
YYLTYPE *yyls = yylsa;
499
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
501
#define YYPOPSTACK (yyvsp--, yyssp--)
504
int yystacksize = YYINITDEPTH;
505
int yyfree_stacks = 0;
516
YYSTYPE yyval; /* the variable used to return */
517
/* semantic values from the action */
524
fprintf(stderr, "Starting parse\n");
530
yychar = YYEMPTY; /* Cause a token to be read. */
532
/* Initialize stack pointers.
533
Waste one element of value and location stack
534
so that they stay on the same level as the state stack.
535
The wasted elements are never initialized. */
543
/* Push a new state, which is found in yystate . */
544
/* In all cases, when you get here, the value and location stacks
545
have just been pushed. so pushing a state here evens the stacks. */
550
if (yyssp >= yyss + yystacksize - 1)
552
/* Give user a chance to reallocate the stack */
553
/* Use copies of these so that the &'s don't force the real ones into memory. */
554
YYSTYPE *yyvs1 = yyvs;
557
YYLTYPE *yyls1 = yyls;
560
/* Get the current used size of the three stacks, in elements. */
561
int size = yyssp - yyss + 1;
564
/* Each stack pointer address is followed by the size of
565
the data in use in that stack, in bytes. */
567
/* This used to be a conditional around just the two extra args,
568
but that might be undefined if yyoverflow is a macro. */
569
yyoverflow("parser stack overflow",
570
&yyss1, size * sizeof (*yyssp),
571
&yyvs1, size * sizeof (*yyvsp),
572
&yyls1, size * sizeof (*yylsp),
575
yyoverflow("parser stack overflow",
576
&yyss1, size * sizeof (*yyssp),
577
&yyvs1, size * sizeof (*yyvsp),
581
yyss = yyss1; yyvs = yyvs1;
585
#else /* no yyoverflow */
586
/* Extend the stack our own way. */
587
if (yystacksize >= YYMAXDEPTH)
589
yyerror("parser stack overflow");
601
if (yystacksize > YYMAXDEPTH)
602
yystacksize = YYMAXDEPTH;
603
#ifndef YYSTACK_USE_ALLOCA
606
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
607
__yy_memcpy ((char *)yyss, (char *)yyss1,
608
size * (unsigned int) sizeof (*yyssp));
609
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
610
__yy_memcpy ((char *)yyvs, (char *)yyvs1,
611
size * (unsigned int) sizeof (*yyvsp));
613
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
614
__yy_memcpy ((char *)yyls, (char *)yyls1,
615
size * (unsigned int) sizeof (*yylsp));
617
#endif /* no yyoverflow */
619
yyssp = yyss + size - 1;
620
yyvsp = yyvs + size - 1;
622
yylsp = yyls + size - 1;
627
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
630
if (yyssp >= yyss + yystacksize - 1)
636
fprintf(stderr, "Entering state %d\n", yystate);
642
/* Do appropriate processing given the current state. */
643
/* Read a lookahead token if we need one and don't already have one. */
646
/* First try to decide what to do without reference to lookahead token. */
648
yyn = yypact[yystate];
652
/* Not known => get a lookahead token if don't already have one. */
654
/* yychar is either YYEMPTY or YYEOF
655
or a valid token in external form. */
657
if (yychar == YYEMPTY)
661
fprintf(stderr, "Reading a token: ");
666
/* Convert token to internal form (in yychar1) for indexing tables with */
668
if (yychar <= 0) /* This means end of input. */
671
yychar = YYEOF; /* Don't call YYLEX any more */
675
fprintf(stderr, "Now at end of input.\n");
680
yychar1 = YYTRANSLATE(yychar);
685
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
686
/* Give the individual parser a way to print the precise meaning
687
of a token, for further debugging info. */
689
YYPRINT (stderr, yychar, yylval);
691
fprintf (stderr, ")\n");
697
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
702
/* yyn is what to do for this token type in this state.
703
Negative => reduce, -yyn is rule number.
704
Positive => shift, yyn is new state.
705
New state is final state => don't bother to shift,
707
0, or most negative number => error. */
722
/* Shift the lookahead token. */
726
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
729
/* Discard the token being shifted unless it is eof. */
738
/* count tokens shifted since error; after three, turn off error status. */
739
if (yyerrstatus) yyerrstatus--;
744
/* Do the default action for the current state. */
747
yyn = yydefact[yystate];
751
/* Do a reduction. yyn is the number of a rule to reduce with. */
755
yyval = yyvsp[1-yylen]; /* implement default value of the action */
762
fprintf (stderr, "Reducing via rule %d (line %d), ",
765
/* Print the symbols being reduced, and their result. */
766
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
767
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
768
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
776
#line 47 "adsmcoutput.y"
780
#line 54 "adsmcoutput.y"
784
#line 67 "adsmcoutput.y"
788
#line 68 "adsmcoutput.y"
792
#line 85 "adsmcoutput.y"
796
#line 90 "adsmcoutput.y"
801
#line 97 "adsmcoutput.y"
805
#line 109 "adsmcoutput.y"
807
int i=3; /* STRING starts with "HE_" */
809
while (yyvsp[-2].str_ptr[i]!='-'){
810
temp[i-3]=yyvsp[-2].str_ptr[i];
814
enabledhyperedge[enabledindex] = atoi(temp);
815
enabledstatenumber[enabledindex]= statecounter ;
821
#line 123 "adsmcoutput.y"
825
strcpy(temp,yyvsp[-1].str_ptr);
826
len=strcspn(temp,"=\r\n");
827
/* printf("name\t%d\t%s\n",len,temp);*/
828
sourcename[sourceindex]= (char *)malloc(len+1);
829
strncpy(sourcename[sourceindex],temp,len);
830
sourcename[sourceindex][len]='\0';
831
sourcestatenumber[sourceindex]=statecounter;
836
#line 136 "adsmcoutput.y"
840
strcpy(temp,yyvsp[-1].str_ptr);
841
len=strcspn(temp," =\r\n");
842
/* printf("name\t%d\t%s\n",len,temp);*/
843
targetname[targetindex]= (char *)malloc(len+1);
844
strncpy(targetname[targetindex],temp,len);
845
targetname[targetindex][len]='\0';
846
targetstatenumber[targetindex]=statecounter;
851
#line 148 "adsmcoutput.y"
855
#line 149 "adsmcoutput.y"
859
#line 151 "adsmcoutput.y"
863
#line 152 "adsmcoutput.y"
867
#line 154 "adsmcoutput.y"
870
mctrace[mctraceindex] =atoi(yyvsp[-1].str_ptr);
875
/* the action file gets copied in in place of this dollarsign */
876
#line 543 "/usr/lib/bison.simple"
887
short *ssp1 = yyss - 1;
888
fprintf (stderr, "state stack now");
889
while (ssp1 != yyssp)
890
fprintf (stderr, " %d", *++ssp1);
891
fprintf (stderr, "\n");
901
yylsp->first_line = yylloc.first_line;
902
yylsp->first_column = yylloc.first_column;
903
yylsp->last_line = (yylsp-1)->last_line;
904
yylsp->last_column = (yylsp-1)->last_column;
909
yylsp->last_line = (yylsp+yylen-1)->last_line;
910
yylsp->last_column = (yylsp+yylen-1)->last_column;
914
/* Now "shift" the result of the reduction.
915
Determine what state that goes to,
916
based on the state we popped back to
917
and the rule number reduced by. */
921
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
922
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
923
yystate = yytable[yystate];
925
yystate = yydefgoto[yyn - YYNTBASE];
929
yyerrlab: /* here on detecting error */
932
/* If not already recovering from an error, report this error. */
936
#ifdef YYERROR_VERBOSE
937
yyn = yypact[yystate];
939
if (yyn > YYFLAG && yyn < YYLAST)
946
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
947
for (x = (yyn < 0 ? -yyn : 0);
948
x < (sizeof(yytname) / sizeof(char *)); x++)
949
if (yycheck[x + yyn] == x)
950
size += strlen(yytname[x]) + 15, count++;
951
msg = (char *) malloc(size + 15);
954
strcpy(msg, "parse error");
959
for (x = (yyn < 0 ? -yyn : 0);
960
x < (sizeof(yytname) / sizeof(char *)); x++)
961
if (yycheck[x + yyn] == x)
963
strcat(msg, count == 0 ? ", expecting `" : " or `");
964
strcat(msg, yytname[x]);
973
yyerror ("parse error; also virtual memory exceeded");
976
#endif /* YYERROR_VERBOSE */
977
yyerror("parse error");
981
yyerrlab1: /* here on error raised explicitly by an action */
983
if (yyerrstatus == 3)
985
/* if just tried and failed to reuse lookahead token after an error, discard it. */
987
/* return failure if at end of input */
993
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
999
/* Else will try to reuse lookahead token
1000
after shifting the error token. */
1002
yyerrstatus = 3; /* Each real token shifted decrements this */
1006
yyerrdefault: /* current state does not do anything special for the error token. */
1009
/* This is wrong; only states that explicitly want error tokens
1010
should shift them. */
1011
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
1012
if (yyn) goto yydefault;
1015
yyerrpop: /* pop the current state because it cannot handle the error token */
1017
if (yyssp == yyss) YYABORT;
1027
short *ssp1 = yyss - 1;
1028
fprintf (stderr, "Error: state stack now");
1029
while (ssp1 != yyssp)
1030
fprintf (stderr, " %d", *++ssp1);
1031
fprintf (stderr, "\n");
1037
yyn = yypact[yystate];
1042
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1061
fprintf(stderr, "Shifting error token, ");
1073
/* YYACCEPT comes here. */
1085
/* YYABORT comes here. */
1096
#line 187 "adsmcoutput.y"