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

« back to all changes in this revision

Viewing changes to src/sd/bv/adsmcoutput.tab.c

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*  A Bison parser, made from adsmcoutput.y
 
3
    by GNU Bison version 1.28  */
 
4
 
 
5
#define YYBISON 1  /* Identify Bison output.  */
 
6
 
 
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
 
14
#define IQ      257
 
15
#define QUOTE   258
 
16
#define COMMENT 259
 
17
#define COUNTER 260
 
18
#define HASH    261
 
19
#define ISZERO  262
 
20
#define ISONE   263
 
21
#define STATE   264
 
22
#define NL      265
 
23
#define ARROW   266
 
24
#define STRING  267
 
25
#define ENABLED 268
 
26
#define IN      269
 
27
 
 
28
#line 1 "adsmcoutput.y"
 
29
 
 
30
 
 
31
#include "adsmcoutputparse.h"
 
32
 
 
33
 
 
34
 
 
35
  /*
 
36
typedef char *CHAR_PTR;
 
37
#define YYSTYPE CHAR_PTR
 
38
#define YYDEBUG 1
 
39
  */
 
40
 
 
41
int mctraceindex;
 
42
 int mctrace[100];
 
43
 int mcfeedback;
 
44
 
 
45
 int enabledindex;
 
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?*/
 
52
 int statecounter;
 
53
 int sourceindex, targetindex;
 
54
 
 
55
#line 29 "adsmcoutput.y"
 
56
typedef union  {
 
57
  char *str_ptr;
 
58
} YYSTYPE;
 
59
#include <stdio.h>
 
60
 
 
61
#ifndef __cplusplus
 
62
#ifndef __STDC__
 
63
#define const
 
64
#endif
 
65
#endif
 
66
 
 
67
 
 
68
 
 
69
#define YYFINAL         89
 
70
#define YYFLAG          -32768
 
71
#define YYNTBASE        16
 
72
 
 
73
#define YYTRANSLATE(x) ((unsigned)(x) <= 269 ? yytranslate[x] : 38)
 
74
 
 
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
 
103
};
 
104
 
 
105
#if YYDEBUG != 0
 
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
 
112
};
 
113
 
 
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
 
129
};
 
130
 
 
131
#endif
 
132
 
 
133
#if YYDEBUG != 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
 
140
};
 
141
#endif
 
142
 
 
143
 
 
144
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
 
145
 
 
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",
 
151
"commentseq", NULL
 
152
};
 
153
#endif
 
154
 
 
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,
 
160
    34,    35,    36,    37,    37
 
161
};
 
162
 
 
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,
 
168
     0,     6,     5,     2,     1
 
169
};
 
170
 
 
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
 
181
};
 
182
 
 
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,
 
186
    67
 
187
};
 
188
 
 
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
 
199
};
 
200
 
 
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,
 
204
   -50
 
205
};
 
206
 
 
207
 
 
208
#define YYLAST          77
 
209
 
 
210
 
 
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
 
220
};
 
221
 
 
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
 
231
};
 
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.  */
 
235
 
 
236
/* Skeleton output parser for bison,
 
237
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
 
238
 
 
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)
 
242
   any later version.
 
243
 
 
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.
 
248
 
 
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.  */
 
253
 
 
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.  */
 
258
 
 
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.  */
 
263
 
 
264
#ifndef YYSTACK_USE_ALLOCA
 
265
#ifdef alloca
 
266
#define YYSTACK_USE_ALLOCA
 
267
#else /* alloca not defined */
 
268
#ifdef __GNUC__
 
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
 
274
#include <alloca.h>
 
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.  */
 
282
#include <malloc.h>
 
283
#endif
 
284
#else /* not MSDOS, or __TURBOC__ */
 
285
#if defined(_AIX)
 
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>  */
 
289
 #pragma alloca
 
290
#define YYSTACK_USE_ALLOCA
 
291
#else /* not MSDOS, or __TURBOC__, or _AIX */
 
292
#if 0
 
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
 
297
#endif /* __hpux */
 
298
#endif
 
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 */
 
305
 
 
306
#ifdef YYSTACK_USE_ALLOCA
 
307
#define YYSTACK_ALLOC alloca
 
308
#else
 
309
#define YYSTACK_ALLOC malloc
 
310
#endif
 
311
 
 
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.  */
 
315
 
 
316
#define yyerrok         (yyerrstatus = 0)
 
317
#define yyclearin       (yychar = YYEMPTY)
 
318
#define YYEMPTY         -2
 
319
#define YYEOF           0
 
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) \
 
330
do                                                              \
 
331
  if (yychar == YYEMPTY && yylen == 1)                          \
 
332
    { yychar = (token), yylval = (value);                       \
 
333
      yychar1 = YYTRANSLATE (yychar);                           \
 
334
      YYPOPSTACK;                                               \
 
335
      goto yybackup;                                            \
 
336
    }                                                           \
 
337
  else                                                          \
 
338
    { yyerror ("syntax error: cannot back up"); YYERROR; }      \
 
339
while (0)
 
340
 
 
341
#define YYTERROR        1
 
342
#define YYERRCODE       256
 
343
 
 
344
#ifndef YYPURE
 
345
#define YYLEX           yylex()
 
346
#endif
 
347
 
 
348
#ifdef YYPURE
 
349
#ifdef YYLSP_NEEDED
 
350
#ifdef YYLEX_PARAM
 
351
#define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
 
352
#else
 
353
#define YYLEX           yylex(&yylval, &yylloc)
 
354
#endif
 
355
#else /* not YYLSP_NEEDED */
 
356
#ifdef YYLEX_PARAM
 
357
#define YYLEX           yylex(&yylval, YYLEX_PARAM)
 
358
#else
 
359
#define YYLEX           yylex(&yylval)
 
360
#endif
 
361
#endif /* not YYLSP_NEEDED */
 
362
#endif
 
363
 
 
364
/* If nonreentrant, generate the variables here */
 
365
 
 
366
#ifndef YYPURE
 
367
 
 
368
int     yychar;                 /*  the lookahead symbol                */
 
369
YYSTYPE yylval;                 /*  the semantic value of the           */
 
370
                                /*  lookahead symbol                    */
 
371
 
 
372
#ifdef YYLSP_NEEDED
 
373
YYLTYPE yylloc;                 /*  location data for the lookahead     */
 
374
                                /*  symbol                              */
 
375
#endif
 
376
 
 
377
int yynerrs;                    /*  number of parse errors so far       */
 
378
#endif  /* not YYPURE */
 
379
 
 
380
#if YYDEBUG != 0
 
381
int yydebug;                    /*  nonzero means print parse trace     */
 
382
/* Since this is uninitialized, it does not stop multiple parsers
 
383
   from coexisting.  */
 
384
#endif
 
385
 
 
386
/*  YYINITDEPTH indicates the initial size of the parser's stacks       */
 
387
 
 
388
#ifndef YYINITDEPTH
 
389
#define YYINITDEPTH 200
 
390
#endif
 
391
 
 
392
/*  YYMAXDEPTH is the maximum size the stacks can grow to
 
393
    (effective only if the built-in stack extension method is used).  */
 
394
 
 
395
#if YYMAXDEPTH == 0
 
396
#undef YYMAXDEPTH
 
397
#endif
 
398
 
 
399
#ifndef YYMAXDEPTH
 
400
#define YYMAXDEPTH 10000
 
401
#endif
 
402
 
 
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.  */
 
407
 
 
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++ */
 
411
#ifndef __cplusplus
 
412
 
 
413
/* This is the most reliable way to avoid incompatibilities
 
414
   in available built-in functions on various systems.  */
 
415
static void
 
416
__yy_memcpy (to, from, count)
 
417
     char *to;
 
418
     char *from;
 
419
     unsigned int count;
 
420
{
 
421
  register char *f = from;
 
422
  register char *t = to;
 
423
  register int i = count;
 
424
 
 
425
  while (i-- > 0)
 
426
    *t++ = *f++;
 
427
}
 
428
 
 
429
#else /* __cplusplus */
 
430
 
 
431
/* This is the most reliable way to avoid incompatibilities
 
432
   in available built-in functions on various systems.  */
 
433
static void
 
434
__yy_memcpy (char *to, char *from, unsigned int count)
 
435
{
 
436
  register char *t = to;
 
437
  register char *f = from;
 
438
  register int i = count;
 
439
 
 
440
  while (i-- > 0)
 
441
    *t++ = *f++;
 
442
}
 
443
 
 
444
#endif
 
445
#endif
 
446
 
 
447
#line 217 "/usr/lib/bison.simple"
 
448
 
 
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.  */
 
454
 
 
455
#ifdef YYPARSE_PARAM
 
456
#ifdef __cplusplus
 
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 */
 
467
 
 
468
/* Prevent warning if -Wstrict-prototypes.  */
 
469
#ifdef __GNUC__
 
470
#ifdef YYPARSE_PARAM
 
471
int yyparse (void *);
 
472
#else
 
473
int yyparse (void);
 
474
#endif
 
475
#endif
 
476
 
 
477
int
 
478
yyparse(YYPARSE_PARAM_ARG)
 
479
     YYPARSE_PARAM_DECL
 
480
{
 
481
  register int yystate;
 
482
  register int yyn;
 
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 */
 
487
 
 
488
  short yyssa[YYINITDEPTH];     /*  the state stack                     */
 
489
  YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */
 
490
 
 
491
  short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
 
492
  YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */
 
493
 
 
494
#ifdef YYLSP_NEEDED
 
495
  YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
 
496
  YYLTYPE *yyls = yylsa;
 
497
  YYLTYPE *yylsp;
 
498
 
 
499
#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
 
500
#else
 
501
#define YYPOPSTACK   (yyvsp--, yyssp--)
 
502
#endif
 
503
 
 
504
  int yystacksize = YYINITDEPTH;
 
505
  int yyfree_stacks = 0;
 
506
 
 
507
#ifdef YYPURE
 
508
  int yychar;
 
509
  YYSTYPE yylval;
 
510
  int yynerrs;
 
511
#ifdef YYLSP_NEEDED
 
512
  YYLTYPE yylloc;
 
513
#endif
 
514
#endif
 
515
 
 
516
  YYSTYPE yyval;                /*  the variable used to return         */
 
517
                                /*  semantic values from the action     */
 
518
                                /*  routines                            */
 
519
 
 
520
  int yylen;
 
521
 
 
522
#if YYDEBUG != 0
 
523
  if (yydebug)
 
524
    fprintf(stderr, "Starting parse\n");
 
525
#endif
 
526
 
 
527
  yystate = 0;
 
528
  yyerrstatus = 0;
 
529
  yynerrs = 0;
 
530
  yychar = YYEMPTY;             /* Cause a token to be read.  */
 
531
 
 
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.  */
 
536
 
 
537
  yyssp = yyss - 1;
 
538
  yyvsp = yyvs;
 
539
#ifdef YYLSP_NEEDED
 
540
  yylsp = yyls;
 
541
#endif
 
542
 
 
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.  */
 
546
yynewstate:
 
547
 
 
548
  *++yyssp = yystate;
 
549
 
 
550
  if (yyssp >= yyss + yystacksize - 1)
 
551
    {
 
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;
 
555
      short *yyss1 = yyss;
 
556
#ifdef YYLSP_NEEDED
 
557
      YYLTYPE *yyls1 = yyls;
 
558
#endif
 
559
 
 
560
      /* Get the current used size of the three stacks, in elements.  */
 
561
      int size = yyssp - yyss + 1;
 
562
 
 
563
#ifdef yyoverflow
 
564
      /* Each stack pointer address is followed by the size of
 
565
         the data in use in that stack, in bytes.  */
 
566
#ifdef YYLSP_NEEDED
 
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),
 
573
                 &yystacksize);
 
574
#else
 
575
      yyoverflow("parser stack overflow",
 
576
                 &yyss1, size * sizeof (*yyssp),
 
577
                 &yyvs1, size * sizeof (*yyvsp),
 
578
                 &yystacksize);
 
579
#endif
 
580
 
 
581
      yyss = yyss1; yyvs = yyvs1;
 
582
#ifdef YYLSP_NEEDED
 
583
      yyls = yyls1;
 
584
#endif
 
585
#else /* no yyoverflow */
 
586
      /* Extend the stack our own way.  */
 
587
      if (yystacksize >= YYMAXDEPTH)
 
588
        {
 
589
          yyerror("parser stack overflow");
 
590
          if (yyfree_stacks)
 
591
            {
 
592
              free (yyss);
 
593
              free (yyvs);
 
594
#ifdef YYLSP_NEEDED
 
595
              free (yyls);
 
596
#endif
 
597
            }
 
598
          return 2;
 
599
        }
 
600
      yystacksize *= 2;
 
601
      if (yystacksize > YYMAXDEPTH)
 
602
        yystacksize = YYMAXDEPTH;
 
603
#ifndef YYSTACK_USE_ALLOCA
 
604
      yyfree_stacks = 1;
 
605
#endif
 
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));
 
612
#ifdef YYLSP_NEEDED
 
613
      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
 
614
      __yy_memcpy ((char *)yyls, (char *)yyls1,
 
615
                   size * (unsigned int) sizeof (*yylsp));
 
616
#endif
 
617
#endif /* no yyoverflow */
 
618
 
 
619
      yyssp = yyss + size - 1;
 
620
      yyvsp = yyvs + size - 1;
 
621
#ifdef YYLSP_NEEDED
 
622
      yylsp = yyls + size - 1;
 
623
#endif
 
624
 
 
625
#if YYDEBUG != 0
 
626
      if (yydebug)
 
627
        fprintf(stderr, "Stack size increased to %d\n", yystacksize);
 
628
#endif
 
629
 
 
630
      if (yyssp >= yyss + yystacksize - 1)
 
631
        YYABORT;
 
632
    }
 
633
 
 
634
#if YYDEBUG != 0
 
635
  if (yydebug)
 
636
    fprintf(stderr, "Entering state %d\n", yystate);
 
637
#endif
 
638
 
 
639
  goto yybackup;
 
640
 yybackup:
 
641
 
 
642
/* Do appropriate processing given the current state.  */
 
643
/* Read a lookahead token if we need one and don't already have one.  */
 
644
/* yyresume: */
 
645
 
 
646
  /* First try to decide what to do without reference to lookahead token.  */
 
647
 
 
648
  yyn = yypact[yystate];
 
649
  if (yyn == YYFLAG)
 
650
    goto yydefault;
 
651
 
 
652
  /* Not known => get a lookahead token if don't already have one.  */
 
653
 
 
654
  /* yychar is either YYEMPTY or YYEOF
 
655
     or a valid token in external form.  */
 
656
 
 
657
  if (yychar == YYEMPTY)
 
658
    {
 
659
#if YYDEBUG != 0
 
660
      if (yydebug)
 
661
        fprintf(stderr, "Reading a token: ");
 
662
#endif
 
663
      yychar = YYLEX;
 
664
    }
 
665
 
 
666
  /* Convert token to internal form (in yychar1) for indexing tables with */
 
667
 
 
668
  if (yychar <= 0)              /* This means end of input. */
 
669
    {
 
670
      yychar1 = 0;
 
671
      yychar = YYEOF;           /* Don't call YYLEX any more */
 
672
 
 
673
#if YYDEBUG != 0
 
674
      if (yydebug)
 
675
        fprintf(stderr, "Now at end of input.\n");
 
676
#endif
 
677
    }
 
678
  else
 
679
    {
 
680
      yychar1 = YYTRANSLATE(yychar);
 
681
 
 
682
#if YYDEBUG != 0
 
683
      if (yydebug)
 
684
        {
 
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.  */
 
688
#ifdef YYPRINT
 
689
          YYPRINT (stderr, yychar, yylval);
 
690
#endif
 
691
          fprintf (stderr, ")\n");
 
692
        }
 
693
#endif
 
694
    }
 
695
 
 
696
  yyn += yychar1;
 
697
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
 
698
    goto yydefault;
 
699
 
 
700
  yyn = yytable[yyn];
 
701
 
 
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,
 
706
       just return success.
 
707
     0, or most negative number => error.  */
 
708
 
 
709
  if (yyn < 0)
 
710
    {
 
711
      if (yyn == YYFLAG)
 
712
        goto yyerrlab;
 
713
      yyn = -yyn;
 
714
      goto yyreduce;
 
715
    }
 
716
  else if (yyn == 0)
 
717
    goto yyerrlab;
 
718
 
 
719
  if (yyn == YYFINAL)
 
720
    YYACCEPT;
 
721
 
 
722
  /* Shift the lookahead token.  */
 
723
 
 
724
#if YYDEBUG != 0
 
725
  if (yydebug)
 
726
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
 
727
#endif
 
728
 
 
729
  /* Discard the token being shifted unless it is eof.  */
 
730
  if (yychar != YYEOF)
 
731
    yychar = YYEMPTY;
 
732
 
 
733
  *++yyvsp = yylval;
 
734
#ifdef YYLSP_NEEDED
 
735
  *++yylsp = yylloc;
 
736
#endif
 
737
 
 
738
  /* count tokens shifted since error; after three, turn off error status.  */
 
739
  if (yyerrstatus) yyerrstatus--;
 
740
 
 
741
  yystate = yyn;
 
742
  goto yynewstate;
 
743
 
 
744
/* Do the default action for the current state.  */
 
745
yydefault:
 
746
 
 
747
  yyn = yydefact[yystate];
 
748
  if (yyn == 0)
 
749
    goto yyerrlab;
 
750
 
 
751
/* Do a reduction.  yyn is the number of a rule to reduce with.  */
 
752
yyreduce:
 
753
  yylen = yyr2[yyn];
 
754
  if (yylen > 0)
 
755
    yyval = yyvsp[1-yylen]; /* implement default value of the action */
 
756
 
 
757
#if YYDEBUG != 0
 
758
  if (yydebug)
 
759
    {
 
760
      int i;
 
761
 
 
762
      fprintf (stderr, "Reducing via rule %d (line %d), ",
 
763
               yyn, yyrline[yyn]);
 
764
 
 
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]]);
 
769
    }
 
770
#endif
 
771
 
 
772
 
 
773
  switch (yyn) {
 
774
 
 
775
case 3:
 
776
#line 47 "adsmcoutput.y"
 
777
{;
 
778
    break;}
 
779
case 8:
 
780
#line 54 "adsmcoutput.y"
 
781
{;
 
782
    break;}
 
783
case 15:
 
784
#line 67 "adsmcoutput.y"
 
785
{mcfeedback=1;;
 
786
    break;}
 
787
case 16:
 
788
#line 68 "adsmcoutput.y"
 
789
{mcfeedback=0;;
 
790
    break;}
 
791
case 22:
 
792
#line 85 "adsmcoutput.y"
 
793
{;
 
794
    break;}
 
795
case 23:
 
796
#line 90 "adsmcoutput.y"
 
797
{
 
798
statecounter++;;
 
799
    break;}
 
800
case 25:
 
801
#line 97 "adsmcoutput.y"
 
802
{;
 
803
    break;}
 
804
case 29:
 
805
#line 109 "adsmcoutput.y"
 
806
{
 
807
  int i=3; /* STRING starts with "HE_" */
 
808
  char temp[5];
 
809
  while (yyvsp[-2].str_ptr[i]!='-'){
 
810
    temp[i-3]=yyvsp[-2].str_ptr[i];
 
811
    i++;
 
812
  }
 
813
  temp[i-3]='\0';
 
814
  enabledhyperedge[enabledindex]  = atoi(temp);
 
815
  enabledstatenumber[enabledindex]= statecounter ;
 
816
  enabledindex++;
 
817
 
 
818
;
 
819
    break;}
 
820
case 30:
 
821
#line 123 "adsmcoutput.y"
 
822
{
 
823
  char temp[100];
 
824
  int len;
 
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;
 
832
  sourceindex++;
 
833
;
 
834
    break;}
 
835
case 31:
 
836
#line 136 "adsmcoutput.y"
 
837
{
 
838
  char temp[100];
 
839
  int len;
 
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;
 
847
  targetindex++;
 
848
;
 
849
    break;}
 
850
case 32:
 
851
#line 148 "adsmcoutput.y"
 
852
{;
 
853
    break;}
 
854
case 33:
 
855
#line 149 "adsmcoutput.y"
 
856
{;
 
857
    break;}
 
858
case 34:
 
859
#line 151 "adsmcoutput.y"
 
860
{;
 
861
    break;}
 
862
case 35:
 
863
#line 152 "adsmcoutput.y"
 
864
{;
 
865
    break;}
 
866
case 36:
 
867
#line 154 "adsmcoutput.y"
 
868
 
869
         
 
870
          mctrace[mctraceindex] =atoi(yyvsp[-1].str_ptr);
 
871
          mctraceindex++;
 
872
       ;
 
873
    break;}
 
874
}
 
875
   /* the action file gets copied in in place of this dollarsign */
 
876
#line 543 "/usr/lib/bison.simple"
 
877
 
 
878
  yyvsp -= yylen;
 
879
  yyssp -= yylen;
 
880
#ifdef YYLSP_NEEDED
 
881
  yylsp -= yylen;
 
882
#endif
 
883
 
 
884
#if YYDEBUG != 0
 
885
  if (yydebug)
 
886
    {
 
887
      short *ssp1 = yyss - 1;
 
888
      fprintf (stderr, "state stack now");
 
889
      while (ssp1 != yyssp)
 
890
        fprintf (stderr, " %d", *++ssp1);
 
891
      fprintf (stderr, "\n");
 
892
    }
 
893
#endif
 
894
 
 
895
  *++yyvsp = yyval;
 
896
 
 
897
#ifdef YYLSP_NEEDED
 
898
  yylsp++;
 
899
  if (yylen == 0)
 
900
    {
 
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;
 
905
      yylsp->text = 0;
 
906
    }
 
907
  else
 
908
    {
 
909
      yylsp->last_line = (yylsp+yylen-1)->last_line;
 
910
      yylsp->last_column = (yylsp+yylen-1)->last_column;
 
911
    }
 
912
#endif
 
913
 
 
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.  */
 
918
 
 
919
  yyn = yyr1[yyn];
 
920
 
 
921
  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
 
922
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
 
923
    yystate = yytable[yystate];
 
924
  else
 
925
    yystate = yydefgoto[yyn - YYNTBASE];
 
926
 
 
927
  goto yynewstate;
 
928
 
 
929
yyerrlab:   /* here on detecting error */
 
930
 
 
931
  if (! yyerrstatus)
 
932
    /* If not already recovering from an error, report this error.  */
 
933
    {
 
934
      ++yynerrs;
 
935
 
 
936
#ifdef YYERROR_VERBOSE
 
937
      yyn = yypact[yystate];
 
938
 
 
939
      if (yyn > YYFLAG && yyn < YYLAST)
 
940
        {
 
941
          int size = 0;
 
942
          char *msg;
 
943
          int x, count;
 
944
 
 
945
          count = 0;
 
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);
 
952
          if (msg != 0)
 
953
            {
 
954
              strcpy(msg, "parse error");
 
955
 
 
956
              if (count < 5)
 
957
                {
 
958
                  count = 0;
 
959
                  for (x = (yyn < 0 ? -yyn : 0);
 
960
                       x < (sizeof(yytname) / sizeof(char *)); x++)
 
961
                    if (yycheck[x + yyn] == x)
 
962
                      {
 
963
                        strcat(msg, count == 0 ? ", expecting `" : " or `");
 
964
                        strcat(msg, yytname[x]);
 
965
                        strcat(msg, "'");
 
966
                        count++;
 
967
                      }
 
968
                }
 
969
              yyerror(msg);
 
970
              free(msg);
 
971
            }
 
972
          else
 
973
            yyerror ("parse error; also virtual memory exceeded");
 
974
        }
 
975
      else
 
976
#endif /* YYERROR_VERBOSE */
 
977
        yyerror("parse error");
 
978
    }
 
979
 
 
980
  goto yyerrlab1;
 
981
yyerrlab1:   /* here on error raised explicitly by an action */
 
982
 
 
983
  if (yyerrstatus == 3)
 
984
    {
 
985
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
 
986
 
 
987
      /* return failure if at end of input */
 
988
      if (yychar == YYEOF)
 
989
        YYABORT;
 
990
 
 
991
#if YYDEBUG != 0
 
992
      if (yydebug)
 
993
        fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
 
994
#endif
 
995
 
 
996
      yychar = YYEMPTY;
 
997
    }
 
998
 
 
999
  /* Else will try to reuse lookahead token
 
1000
     after shifting the error token.  */
 
1001
 
 
1002
  yyerrstatus = 3;              /* Each real token shifted decrements this */
 
1003
 
 
1004
  goto yyerrhandle;
 
1005
 
 
1006
yyerrdefault:  /* current state does not do anything special for the error token. */
 
1007
 
 
1008
#if 0
 
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;
 
1013
#endif
 
1014
 
 
1015
yyerrpop:   /* pop the current state because it cannot handle the error token */
 
1016
 
 
1017
  if (yyssp == yyss) YYABORT;
 
1018
  yyvsp--;
 
1019
  yystate = *--yyssp;
 
1020
#ifdef YYLSP_NEEDED
 
1021
  yylsp--;
 
1022
#endif
 
1023
 
 
1024
#if YYDEBUG != 0
 
1025
  if (yydebug)
 
1026
    {
 
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");
 
1032
    }
 
1033
#endif
 
1034
 
 
1035
yyerrhandle:
 
1036
 
 
1037
  yyn = yypact[yystate];
 
1038
  if (yyn == YYFLAG)
 
1039
    goto yyerrdefault;
 
1040
 
 
1041
  yyn += YYTERROR;
 
1042
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
 
1043
    goto yyerrdefault;
 
1044
 
 
1045
  yyn = yytable[yyn];
 
1046
  if (yyn < 0)
 
1047
    {
 
1048
      if (yyn == YYFLAG)
 
1049
        goto yyerrpop;
 
1050
      yyn = -yyn;
 
1051
      goto yyreduce;
 
1052
    }
 
1053
  else if (yyn == 0)
 
1054
    goto yyerrpop;
 
1055
 
 
1056
  if (yyn == YYFINAL)
 
1057
    YYACCEPT;
 
1058
 
 
1059
#if YYDEBUG != 0
 
1060
  if (yydebug)
 
1061
    fprintf(stderr, "Shifting error token, ");
 
1062
#endif
 
1063
 
 
1064
  *++yyvsp = yylval;
 
1065
#ifdef YYLSP_NEEDED
 
1066
  *++yylsp = yylloc;
 
1067
#endif
 
1068
 
 
1069
  yystate = yyn;
 
1070
  goto yynewstate;
 
1071
 
 
1072
 yyacceptlab:
 
1073
  /* YYACCEPT comes here.  */
 
1074
  if (yyfree_stacks)
 
1075
    {
 
1076
      free (yyss);
 
1077
      free (yyvs);
 
1078
#ifdef YYLSP_NEEDED
 
1079
      free (yyls);
 
1080
#endif
 
1081
    }
 
1082
  return 0;
 
1083
 
 
1084
 yyabortlab:
 
1085
  /* YYABORT comes here.  */
 
1086
  if (yyfree_stacks)
 
1087
    {
 
1088
      free (yyss);
 
1089
      free (yyvs);
 
1090
#ifdef YYLSP_NEEDED
 
1091
      free (yyls);
 
1092
#endif
 
1093
    }
 
1094
  return 1;
 
1095
}
 
1096
#line 187 "adsmcoutput.y"
 
1097
 
 
1098
 
 
1099