Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /* A Bison parser, made by GNU Bison 3.0.4. */ |
2 | |||
3 | /* Bison implementation for Yacc-like parsers in C |
||
4 | |||
5 | Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. |
||
6 | |||
7 | This program is free software: you can redistribute it and/or modify |
||
8 | it under the terms of the GNU General Public License as published by |
||
9 | the Free Software Foundation, either version 3 of the License, or |
||
10 | (at your option) any later version. |
||
11 | |||
12 | This program is distributed in the hope that it will be useful, |
||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
15 | GNU General Public License for more details. |
||
16 | |||
17 | You should have received a copy of the GNU General Public License |
||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
||
19 | |||
20 | /* As a special exception, you may create a larger work that contains |
||
21 | part or all of the Bison parser skeleton and distribute that work |
||
22 | under terms of your choice, so long as that work isn't itself a |
||
23 | parser generator using the skeleton or a modified version thereof |
||
24 | as a parser skeleton. Alternatively, if you modify or redistribute |
||
25 | the parser skeleton itself, you may (at your option) remove this |
||
26 | special exception, which will cause the skeleton and the resulting |
||
27 | Bison output files to be licensed under the GNU General Public |
||
28 | License without this special exception. |
||
29 | |||
30 | This special exception was added by the Free Software Foundation in |
||
31 | version 2.2 of Bison. */ |
||
32 | |||
33 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
||
34 | simplifying the original so-called "semantic" parser. */ |
||
35 | |||
36 | /* All symbols defined below should begin with yy or YY, to avoid |
||
37 | infringing on user name space. This should be done even for local |
||
38 | variables, as they might otherwise be expanded by user macros. |
||
39 | There are some unavoidable exceptions within include files to |
||
40 | define necessary library symbols; they are noted "INFRINGES ON |
||
41 | USER NAME SPACE" below. */ |
||
42 | |||
43 | /* Identify Bison output. */ |
||
44 | #define YYBISON 1 |
||
45 | |||
46 | /* Bison version. */ |
||
47 | #define YYBISON_VERSION "3.0.4" |
||
48 | |||
49 | /* Skeleton name. */ |
||
50 | #define YYSKELETON_NAME "yacc.c" |
||
51 | |||
52 | /* Pure parsers. */ |
||
53 | #define YYPURE 0 |
||
54 | |||
55 | /* Push parsers. */ |
||
56 | #define YYPUSH 0 |
||
57 | |||
58 | /* Pull parsers. */ |
||
59 | #define YYPULL 1 |
||
60 | |||
61 | /* Copy the first part of user declarations. */ |
||
62 | #line 1 "net_yacc.y" /* yacc.c:339 */ |
||
63 | |||
64 | /* |
||
65 | * $Id: net_yacc.y,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $ |
||
66 | * |
||
67 | * $Log: net_yacc.y,v $ |
||
68 | * Revision 1.1.1.1 2003/11/04 23:34:59 mjames |
||
69 | * Imported into local repositrory |
||
70 | * |
||
71 | * Revision 1.8 2002/10/02 19:37:28 MJAMES |
||
72 | * Moved dummy functions to a separate support file. |
||
73 | * |
||
74 | * Used correct number of arguments to define_pin |
||
75 | * |
||
76 | * Revision 1.7 2002/09/09 10:36:20 mjames |
||
77 | * Checkpoint checkin |
||
78 | * |
||
79 | * Revision 1.6 2001/10/31 22:20:09 mjames |
||
80 | * Tidying up problematical comments caused by CVS |
||
81 | * 'intelligent' comment guessing |
||
82 | * |
||
83 | * Revision 1.5 2001/10/02 20:53:27 mjames |
||
84 | * Moved documentation about code to main program module. |
||
85 | * |
||
86 | * Revision 1.4 2001/09/16 19:55:42 mjames |
||
87 | * tidying |
||
88 | * |
||
89 | * Revision 1.3 2001/06/06 12:10:20 mjames |
||
90 | * Move from HPUX |
||
91 | * |
||
92 | * Revision 1.2 2000/12/04 13:14:03 mjames |
||
93 | * Imported all of the PCB syntax readers. |
||
94 | * |
||
95 | * Converted "a/b" to mean "a" divided by "b" insted of a single string |
||
96 | * "a/b" in Verilog |
||
97 | * |
||
98 | * Revision 1.1.1.1 2000/10/19 21:58:38 mjames |
||
99 | * Mike put it here |
||
100 | * |
||
101 | * |
||
102 | * Revision 1.27 2000/10/04 10:37:07 10:37:07 mjames (Mike James) |
||
103 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
||
104 | * |
||
105 | * Revision 1.24 2000/09/27 10:58:04 10:58:04 mjames (Mike James) |
||
106 | * Using correct return code from yyparse() |
||
107 | * |
||
108 | * Revision 1.13 2000/03/08 16:19:19 16:19:19 mjames (Mike James) |
||
109 | * New version including PC |
||
110 | * |
||
111 | * Revision 1.10 2000/01/20 15:58:46 15:58:46 mjames (Mike James) |
||
112 | * Part of Release R22 |
||
113 | * |
||
114 | * Revision 1.9 99/12/22 11:15:27 11:15:27 mjames (Mike James) |
||
115 | * Part of Release Dec_22_1999 |
||
116 | * |
||
117 | * Revision 1.8 99/06/25 14:35:45 14:35:45 mjames (Mike James) |
||
118 | * Added in reference to expression.h, but no changes made |
||
119 | * to the function of acfread yet. |
||
120 | * |
||
121 | * Revision 1.7 99/05/04 09:52:32 09:52:32 mjames (Mike James) |
||
122 | * General checkin |
||
123 | * |
||
124 | * Revision 1.5 98/07/14 13:24:51 13:24:51 mjames (Mike James) |
||
125 | * Altered calling of some database functions |
||
126 | * |
||
127 | * Revision 1.4 98/02/11 11:26:46 11:26:46 mjames (Mike James) |
||
128 | * Checked in for version 6.2a |
||
129 | * |
||
130 | * Revision 1.3 97/04/23 08:45:10 08:45:10 mjames (Mike James) |
||
131 | * CHecked in for release rel23041997 |
||
132 | * |
||
133 | * Revision 1.2 96/12/23 15:16:50 15:16:50 mjames (Mike James) |
||
134 | * Altered because find_socket takes a reference |
||
135 | * to the head-of-list-pointer noth the pointer itself. |
||
136 | * |
||
137 | * Revision 1.1 96/12/13 08:43:46 08:43:46 mjames (Mike James) |
||
138 | * Initial revision |
||
139 | * |
||
140 | * |
||
141 | * */ |
||
142 | |||
143 | #include "database.h" |
||
144 | #include "expression.h" |
||
145 | #include "generic.h" |
||
146 | |||
147 | #include <stdio.h> |
||
148 | #include <stdlib.h> |
||
149 | #include <string.h> |
||
150 | |||
151 | #ident \ |
||
152 | "@(#)$Header: C:/cvsroot/Vert03/net_src/net_yacc.y,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $" |
||
153 | |||
154 | static socket_t *current_chip; |
||
155 | static char curr_net_nam[MAXIDLEN]; |
||
156 | int inside_block; |
||
157 | |||
158 | #line 165 "net_yacc.c" /* yacc.c:339 */ |
||
159 | |||
160 | #ifndef YY_NULLPTR |
||
161 | #if defined __cplusplus && 201103L <= __cplusplus |
||
162 | #define YY_NULLPTR nullptr |
||
163 | #else |
||
164 | #define YY_NULLPTR 0 |
||
165 | #endif |
||
166 | #endif |
||
167 | |||
168 | /* Enabling verbose error messages. */ |
||
169 | #ifdef YYERROR_VERBOSE |
||
170 | #undef YYERROR_VERBOSE |
||
171 | #define YYERROR_VERBOSE 1 |
||
172 | #else |
||
173 | #define YYERROR_VERBOSE 0 |
||
174 | #endif |
||
175 | |||
176 | /* Debug traces. */ |
||
177 | #ifndef YYDEBUG |
||
178 | #define YYDEBUG 0 |
||
179 | #endif |
||
180 | #if YYDEBUG |
||
181 | extern int yydebug; |
||
182 | #endif |
||
183 | |||
184 | /* Token type. */ |
||
185 | #ifndef YYTOKENTYPE |
||
186 | #define YYTOKENTYPE |
||
187 | enum yytokentype |
||
188 | { |
||
189 | PACKAGES = 258, |
||
190 | NETS = 259, |
||
191 | END = 260, |
||
192 | NL = 261, |
||
193 | PLING = 262, |
||
194 | SEMI = 263, |
||
195 | DOT = 264, |
||
196 | COMMA = 265, |
||
197 | ASTRING = 266 |
||
198 | }; |
||
199 | #endif |
||
200 | /* Tokens. */ |
||
201 | #define PACKAGES 258 |
||
202 | #define NETS 259 |
||
203 | #define END 260 |
||
204 | #define NL 261 |
||
205 | #define PLING 262 |
||
206 | #define SEMI 263 |
||
207 | #define DOT 264 |
||
208 | #define COMMA 265 |
||
209 | #define ASTRING 266 |
||
210 | |||
211 | /* Value type. */ |
||
212 | #if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED |
||
213 | |||
214 | union YYSTYPE |
||
215 | { |
||
216 | #line 99 "net_yacc.y" /* yacc.c:355 */ |
||
217 | char *string; |
||
218 | |||
219 | #line 227 "net_yacc.c" /* yacc.c:355 */ |
||
220 | }; |
||
221 | |||
222 | typedef union YYSTYPE YYSTYPE; |
||
223 | #define YYSTYPE_IS_TRIVIAL 1 |
||
224 | #define YYSTYPE_IS_DECLARED 1 |
||
225 | #endif |
||
226 | |||
227 | extern YYSTYPE yylval; |
||
228 | |||
229 | int yyparse (void); |
||
230 | |||
231 | /* Copy the second part of user declarations. */ |
||
232 | |||
233 | #line 244 "net_yacc.c" /* yacc.c:358 */ |
||
234 | |||
235 | #ifdef short |
||
236 | #undef short |
||
237 | #endif |
||
238 | |||
239 | #ifdef YYTYPE_UINT8 |
||
240 | typedef YYTYPE_UINT8 yytype_uint8; |
||
241 | #else |
||
242 | typedef unsigned char yytype_uint8; |
||
243 | #endif |
||
244 | |||
245 | #ifdef YYTYPE_INT8 |
||
246 | typedef YYTYPE_INT8 yytype_int8; |
||
247 | #else |
||
248 | typedef signed char yytype_int8; |
||
249 | #endif |
||
250 | |||
251 | #ifdef YYTYPE_UINT16 |
||
252 | typedef YYTYPE_UINT16 yytype_uint16; |
||
253 | #else |
||
254 | typedef unsigned short int yytype_uint16; |
||
255 | #endif |
||
256 | |||
257 | #ifdef YYTYPE_INT16 |
||
258 | typedef YYTYPE_INT16 yytype_int16; |
||
259 | #else |
||
260 | typedef short int yytype_int16; |
||
261 | #endif |
||
262 | |||
263 | #ifndef YYSIZE_T |
||
264 | #ifdef __SIZE_TYPE__ |
||
265 | #define YYSIZE_T __SIZE_TYPE__ |
||
266 | #elif defined size_t |
||
267 | #define YYSIZE_T size_t |
||
268 | #elif !defined YYSIZE_T |
||
269 | #include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
||
270 | #define YYSIZE_T size_t |
||
271 | #else |
||
272 | #define YYSIZE_T unsigned int |
||
273 | #endif |
||
274 | #endif |
||
275 | |||
276 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
||
277 | |||
278 | #ifndef YY_ |
||
279 | #if defined YYENABLE_NLS && YYENABLE_NLS |
||
280 | #if ENABLE_NLS |
||
281 | #include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
||
282 | #define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
||
283 | #endif |
||
284 | #endif |
||
285 | #ifndef YY_ |
||
286 | #define YY_(Msgid) Msgid |
||
287 | #endif |
||
288 | #endif |
||
289 | |||
290 | #ifndef YY_ATTRIBUTE |
||
291 | #if (defined __GNUC__ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) || \ |
||
292 | defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
||
293 | #define YY_ATTRIBUTE(Spec) __attribute__ (Spec) |
||
294 | #else |
||
295 | #define YY_ATTRIBUTE(Spec) /* empty */ |
||
296 | #endif |
||
297 | #endif |
||
298 | |||
299 | #ifndef YY_ATTRIBUTE_PURE |
||
300 | #define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
||
301 | #endif |
||
302 | |||
303 | #ifndef YY_ATTRIBUTE_UNUSED |
||
304 | #define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
||
305 | #endif |
||
306 | |||
307 | #if !defined _Noreturn && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) |
||
308 | #if defined _MSC_VER && 1200 <= _MSC_VER |
||
309 | #define _Noreturn __declspec(noreturn) |
||
310 | #else |
||
311 | #define _Noreturn YY_ATTRIBUTE((__noreturn__)) |
||
312 | #endif |
||
313 | #endif |
||
314 | |||
315 | /* Suppress unused-variable warnings by "using" E. */ |
||
316 | #if !defined lint || defined __GNUC__ |
||
317 | #define YYUSE(E) ((void) (E)) |
||
318 | #else |
||
319 | #define YYUSE(E) /* empty */ |
||
320 | #endif |
||
321 | |||
322 | #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
||
323 | /* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
||
324 | #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
||
325 | _Pragma ("GCC diagnostic push") _Pragma ("GCC diagnostic ignored " \ |
||
326 | "\"-Wuninitialized\"") \ |
||
327 | _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
||
328 | #define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma ("GCC diagnostic pop") |
||
329 | #else |
||
330 | #define YY_INITIAL_VALUE(Value) Value |
||
331 | #endif |
||
332 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
333 | #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
334 | #define YY_IGNORE_MAYBE_UNINITIALIZED_END |
||
335 | #endif |
||
336 | #ifndef YY_INITIAL_VALUE |
||
337 | #define YY_INITIAL_VALUE(Value) /* Nothing. */ |
||
338 | #endif |
||
339 | |||
340 | #if !defined yyoverflow || YYERROR_VERBOSE |
||
341 | |||
342 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
||
343 | |||
344 | #ifdef YYSTACK_USE_ALLOCA |
||
345 | #if YYSTACK_USE_ALLOCA |
||
346 | #ifdef __GNUC__ |
||
347 | #define YYSTACK_ALLOC __builtin_alloca |
||
348 | #elif defined __BUILTIN_VA_ARG_INCR |
||
349 | #include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
||
350 | #elif defined _AIX |
||
351 | #define YYSTACK_ALLOC __alloca |
||
352 | #elif defined _MSC_VER |
||
353 | #include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
||
354 | #define alloca _alloca |
||
355 | #else |
||
356 | #define YYSTACK_ALLOC alloca |
||
357 | #if !defined _ALLOCA_H && !defined EXIT_SUCCESS |
||
358 | #include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
||
359 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
||
360 | #ifndef EXIT_SUCCESS |
||
361 | #define EXIT_SUCCESS 0 |
||
362 | #endif |
||
363 | #endif |
||
364 | #endif |
||
365 | #endif |
||
366 | #endif |
||
367 | |||
368 | #ifdef YYSTACK_ALLOC |
||
369 | /* Pacify GCC's 'empty if-body' warning. */ |
||
370 | #define YYSTACK_FREE(Ptr) \ |
||
371 | do \ |
||
372 | { /* empty */ \ |
||
373 | ; \ |
||
374 | } while (0) |
||
375 | #ifndef YYSTACK_ALLOC_MAXIMUM |
||
376 | /* The OS might guarantee only one guard page at the bottom of the stack, |
||
377 | and a page size can be as small as 4096 bytes. So we cannot safely |
||
378 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
||
379 | to allow for a few compiler-allocated temporary stack slots. */ |
||
380 | #define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
||
381 | #endif |
||
382 | #else |
||
383 | #define YYSTACK_ALLOC YYMALLOC |
||
384 | #define YYSTACK_FREE YYFREE |
||
385 | #ifndef YYSTACK_ALLOC_MAXIMUM |
||
386 | #define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
||
387 | #endif |
||
388 | #if ( \ |
||
389 | defined __cplusplus && !defined EXIT_SUCCESS && \ |
||
390 | !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) |
||
391 | #include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
||
392 | #ifndef EXIT_SUCCESS |
||
393 | #define EXIT_SUCCESS 0 |
||
394 | #endif |
||
395 | #endif |
||
396 | #ifndef YYMALLOC |
||
397 | #define YYMALLOC malloc |
||
398 | #if !defined malloc && !defined EXIT_SUCCESS |
||
399 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
||
400 | #endif |
||
401 | #endif |
||
402 | #ifndef YYFREE |
||
403 | #define YYFREE free |
||
404 | #if !defined free && !defined EXIT_SUCCESS |
||
405 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
||
406 | #endif |
||
407 | #endif |
||
408 | #endif |
||
409 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
||
410 | |||
411 | #if ( \ |
||
412 | !defined yyoverflow && \ |
||
413 | (!defined __cplusplus || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
||
414 | |||
415 | /* A type that is properly aligned for any stack member. */ |
||
416 | union yyalloc |
||
417 | { |
||
418 | yytype_int16 yyss_alloc; |
||
419 | YYSTYPE yyvs_alloc; |
||
420 | }; |
||
421 | |||
422 | /* The size of the maximum gap between one aligned stack and the next. */ |
||
423 | #define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
||
424 | |||
425 | /* The size of an array large to enough to hold all stacks, each with |
||
426 | N elements. */ |
||
427 | #define YYSTACK_BYTES(N) \ |
||
428 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + YYSTACK_GAP_MAXIMUM) |
||
429 | |||
430 | #define YYCOPY_NEEDED 1 |
||
431 | |||
432 | /* Relocate STACK from its old location to the new one. The |
||
433 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
||
434 | elements in the stack, and YYPTR gives the new location of the |
||
435 | stack. Advance YYPTR to a properly aligned location for the next |
||
436 | stack. */ |
||
437 | #define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
||
438 | do \ |
||
439 | { \ |
||
440 | YYSIZE_T yynewbytes; \ |
||
441 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
||
442 | Stack = &yyptr->Stack_alloc; \ |
||
443 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
||
444 | yyptr += yynewbytes / sizeof (*yyptr); \ |
||
445 | } while (0) |
||
446 | |||
447 | #endif |
||
448 | |||
449 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
||
450 | /* Copy COUNT objects from SRC to DST. The source and destination do |
||
451 | not overlap. */ |
||
452 | #ifndef YYCOPY |
||
453 | #if defined __GNUC__ && 1 < __GNUC__ |
||
454 | #define YYCOPY(Dst, Src, Count) __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
||
455 | #else |
||
456 | #define YYCOPY(Dst, Src, Count) \ |
||
457 | do \ |
||
458 | { \ |
||
459 | YYSIZE_T yyi; \ |
||
460 | for (yyi = 0; yyi < (Count); yyi++) \ |
||
461 | (Dst)[yyi] = (Src)[yyi]; \ |
||
462 | } while (0) |
||
463 | #endif |
||
464 | #endif |
||
465 | #endif /* !YYCOPY_NEEDED */ |
||
466 | |||
467 | /* YYFINAL -- State number of the termination state. */ |
||
468 | #define YYFINAL 14 |
||
469 | /* YYLAST -- Last index in YYTABLE. */ |
||
470 | #define YYLAST 49 |
||
471 | |||
472 | /* YYNTOKENS -- Number of terminals. */ |
||
473 | #define YYNTOKENS 12 |
||
474 | /* YYNNTS -- Number of nonterminals. */ |
||
475 | #define YYNNTS 13 |
||
476 | /* YYNRULES -- Number of rules. */ |
||
477 | #define YYNRULES 23 |
||
478 | /* YYNSTATES -- Number of states. */ |
||
479 | #define YYNSTATES 43 |
||
480 | |||
481 | /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned |
||
482 | by yylex, with out-of-bounds checking. */ |
||
483 | #define YYUNDEFTOK 2 |
||
484 | #define YYMAXUTOK 266 |
||
485 | |||
486 | #define YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
||
487 | |||
488 | /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
||
489 | as returned by yylex, without out-of-bounds checking. */ |
||
490 | static const yytype_uint8 yytranslate[] = { |
||
491 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
492 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
493 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
494 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
495 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
496 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
497 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
498 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
499 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; |
||
500 | |||
501 | #if YYDEBUG |
||
502 | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
||
503 | static const yytype_uint8 yyrline[] = {0, 108, 108, 109, 113, 114, 115, 116, |
||
504 | 120, 121, 123, 124, 128, 135, 136, 140, |
||
505 | 143, 144, 145, 148, 151, 159, 160, 161}; |
||
506 | #endif |
||
507 | |||
508 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
||
509 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
||
510 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
||
511 | static const char *const yytname[] = {"$end", |
||
512 | "error", |
||
513 | "$undefined", |
||
514 | "PACKAGES", |
||
515 | "NETS", |
||
516 | "END", |
||
517 | "NL", |
||
518 | "PLING", |
||
519 | "SEMI", |
||
520 | "DOT", |
||
521 | "COMMA", |
||
522 | "ASTRING", |
||
523 | "$accept", |
||
524 | "objects", |
||
525 | "object", |
||
526 | "package_list", |
||
527 | "nets_list", |
||
528 | "component_lines", |
||
529 | "component_line", |
||
530 | "nets", |
||
531 | "net", |
||
532 | "pins", |
||
533 | "net_name", |
||
534 | "pin", |
||
535 | "gap", |
||
536 | YY_NULLPTR}; |
||
537 | #endif |
||
538 | |||
539 | #ifdef YYPRINT |
||
540 | /* YYTOKNUM[NUM] -- (External) token number corresponding to the |
||
541 | (internal) symbol number NUM (which must be that of a token). */ |
||
542 | static const yytype_uint16 yytoknum[] = { |
||
543 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266}; |
||
544 | #endif |
||
545 | |||
546 | #define YYPACT_NINF -30 |
||
547 | |||
548 | #define yypact_value_is_default(Yystate) (!!((Yystate) == (-30))) |
||
549 | |||
550 | #define YYTABLE_NINF -1 |
||
551 | |||
552 | #define yytable_value_is_error(Yytable_value) 0 |
||
553 | |||
554 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
||
555 | STATE-NUM. */ |
||
556 | static const yytype_int8 yypact[] = {14, -3, 5, 17, 18, 2, -30, -30, -30, -30, 16, |
||
557 | 19, -30, -30, -30, -30, 21, -2, -30, 23, 18, 19, |
||
558 | 22, 24, -30, -30, -30, -30, -30, 20, 4, -30, 26, |
||
559 | 25, 31, -30, -30, 27, -30, 22, 33, 11, -30}; |
||
560 | |||
561 | /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
||
562 | Performed when YYTABLE does not specify something else to do. Zero |
||
563 | means the default is an error. */ |
||
564 | static const yytype_uint8 yydefact[] = {23, 0, 0, 0, 22, 0, 3, 4, 5, 7, 0, 0, 6, 21, 1, |
||
565 | 2, 0, 23, 11, 0, 23, 14, 0, 0, 10, 8, 19, 9, 13, 0, |
||
566 | 23, 17, 0, 0, 0, 16, 15, 0, 20, 0, 0, 18, 12}; |
||
567 | |||
568 | /* YYPGOTO[NTERM-NUM]. */ |
||
569 | static const yytype_int8 yypgoto[] = { |
||
570 | -30, -30, 35, -30, -30, -30, 8, 28, -30, -7, -30, -29, -4}; |
||
571 | |||
572 | /* YYDEFGOTO[NTERM-NUM]. */ |
||
573 | static const yytype_int8 yydefgoto[] = {-1, 5, 6, 7, 8, 17, 18, 20, 21, 30, 22, 31, 9}; |
||
574 | |||
575 | /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
||
576 | positive, shift that token. If negative, reduce the rule whose |
||
577 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
||
578 | static const yytype_uint8 yytable[] = {13, 35, 14, 10, 4, 1, 2, 3, 4, 16, 4, 11, 35, |
||
579 | 25, 34, 29, 27, 1, 2, 3, 4, 34, 29, 12, 4, 24, |
||
580 | 36, 16, 23, 33, 19, 26, 41, 29, 37, 32, 38, 39, 40, |
||
581 | 42, 15, 0, 0, 0, 0, 0, 0, 0, 0, 28}; |
||
582 | |||
583 | static const yytype_int8 yycheck[] = {4, 30, 0, 6, 6, 3, 4, 5, 6, 11, 6, 6, 41, |
||
584 | 17, 10, 11, 20, 3, 4, 5, 6, 10, 11, 6, 6, 17, |
||
585 | 30, 11, 7, 9, 11, 8, 39, 11, 8, 11, 11, 6, 11, |
||
586 | 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, 21}; |
||
587 | |||
588 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
||
589 | symbol of state STATE-NUM. */ |
||
590 | static const yytype_uint8 yystos[] = { |
||
591 | 0, 3, 4, 5, 6, 13, 14, 15, 16, 24, 6, 6, 6, 24, 0, 14, 11, 17, 18, 11, 19, 20, |
||
592 | 22, 7, 18, 24, 8, 24, 19, 11, 21, 23, 11, 9, 10, 23, 24, 8, 11, 6, 11, 21, 6}; |
||
593 | |||
594 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
||
595 | static const yytype_uint8 yyr1[] = {0, 12, 13, 13, 14, 14, 14, 14, 15, 16, 17, 17, |
||
596 | 18, 19, 19, 20, 21, 21, 21, 22, 23, 24, 24, 24}; |
||
597 | |||
598 | /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
||
599 | static const yytype_uint8 yyr2[] = {0, 2, 2, 1, 1, 1, 2, 1, 4, 4, 2, 1, |
||
600 | 6, 2, 1, 3, 2, 1, 4, 2, 3, 2, 1, 0}; |
||
601 | |||
602 | #define yyerrok (yyerrstatus = 0) |
||
603 | #define yyclearin (yychar = YYEMPTY) |
||
604 | #define YYEMPTY (-2) |
||
605 | #define YYEOF 0 |
||
606 | |||
607 | #define YYACCEPT goto yyacceptlab |
||
608 | #define YYABORT goto yyabortlab |
||
609 | #define YYERROR goto yyerrorlab |
||
610 | |||
611 | #define YYRECOVERING() (!!yyerrstatus) |
||
612 | |||
613 | #define YYBACKUP(Token, Value) \ |
||
614 | do \ |
||
615 | if (yychar == YYEMPTY) \ |
||
616 | { \ |
||
617 | yychar = (Token); \ |
||
618 | yylval = (Value); \ |
||
619 | YYPOPSTACK (yylen); \ |
||
620 | yystate = *yyssp; \ |
||
621 | goto yybackup; \ |
||
622 | } \ |
||
623 | else \ |
||
624 | { \ |
||
625 | yyerror (YY_ ("syntax error: cannot back up")); \ |
||
626 | YYERROR; \ |
||
627 | } \ |
||
628 | while (0) |
||
629 | |||
630 | /* Error token number */ |
||
631 | #define YYTERROR 1 |
||
632 | #define YYERRCODE 256 |
||
633 | |||
634 | /* Enable debugging if requested. */ |
||
635 | #if YYDEBUG |
||
636 | |||
637 | #ifndef YYFPRINTF |
||
638 | #include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
||
639 | #define YYFPRINTF fprintf |
||
640 | #endif |
||
641 | |||
642 | #define YYDPRINTF(Args) \ |
||
643 | do \ |
||
644 | { \ |
||
645 | if (yydebug) \ |
||
646 | YYFPRINTF Args; \ |
||
647 | } while (0) |
||
648 | |||
649 | /* This macro is provided for backward compatibility. */ |
||
650 | #ifndef YY_LOCATION_PRINT |
||
651 | #define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
||
652 | #endif |
||
653 | |||
654 | #define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
||
655 | do \ |
||
656 | { \ |
||
657 | if (yydebug) \ |
||
658 | { \ |
||
659 | YYFPRINTF (stderr, "%s ", Title); \ |
||
660 | yy_symbol_print (stderr, Type, Value); \ |
||
661 | YYFPRINTF (stderr, "\n"); \ |
||
662 | } \ |
||
663 | } while (0) |
||
664 | |||
665 | /*----------------------------------------. |
||
666 | | Print this symbol's value on YYOUTPUT. | |
||
667 | `----------------------------------------*/ |
||
668 | |||
669 | static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep) |
||
670 | { |
||
671 | FILE *yyo = yyoutput; |
||
672 | YYUSE (yyo); |
||
673 | if (!yyvaluep) |
||
674 | return; |
||
675 | #ifdef YYPRINT |
||
676 | if (yytype < YYNTOKENS) |
||
677 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
||
678 | #endif |
||
679 | YYUSE (yytype); |
||
680 | } |
||
681 | |||
682 | /*--------------------------------. |
||
683 | | Print this symbol on YYOUTPUT. | |
||
684 | `--------------------------------*/ |
||
685 | |||
686 | static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep) |
||
687 | { |
||
688 | YYFPRINTF ( |
||
689 | yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
||
690 | |||
691 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
||
692 | YYFPRINTF (yyoutput, ")"); |
||
693 | } |
||
694 | |||
695 | /*------------------------------------------------------------------. |
||
696 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
||
697 | | TOP (included). | |
||
698 | `------------------------------------------------------------------*/ |
||
699 | |||
700 | static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
||
701 | { |
||
702 | YYFPRINTF (stderr, "Stack now"); |
||
703 | for (; yybottom <= yytop; yybottom++) |
||
704 | { |
||
705 | int yybot = *yybottom; |
||
706 | YYFPRINTF (stderr, " %d", yybot); |
||
707 | } |
||
708 | YYFPRINTF (stderr, "\n"); |
||
709 | } |
||
710 | |||
711 | #define YY_STACK_PRINT(Bottom, Top) \ |
||
712 | do \ |
||
713 | { \ |
||
714 | if (yydebug) \ |
||
715 | yy_stack_print ((Bottom), (Top)); \ |
||
716 | } while (0) |
||
717 | |||
718 | /*------------------------------------------------. |
||
719 | | Report that the YYRULE is going to be reduced. | |
||
720 | `------------------------------------------------*/ |
||
721 | |||
722 | static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) |
||
723 | { |
||
724 | unsigned long int yylno = yyrline[yyrule]; |
||
725 | int yynrhs = yyr2[yyrule]; |
||
726 | int yyi; |
||
727 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); |
||
728 | /* The symbols being reduced. */ |
||
729 | for (yyi = 0; yyi < yynrhs; yyi++) |
||
730 | { |
||
731 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
||
732 | yy_symbol_print ( |
||
733 | stderr, yystos[yyssp[yyi + 1 - yynrhs]], &(yyvsp[(yyi + 1) - (yynrhs)])); |
||
734 | YYFPRINTF (stderr, "\n"); |
||
735 | } |
||
736 | } |
||
737 | |||
738 | #define YY_REDUCE_PRINT(Rule) \ |
||
739 | do \ |
||
740 | { \ |
||
741 | if (yydebug) \ |
||
742 | yy_reduce_print (yyssp, yyvsp, Rule); \ |
||
743 | } while (0) |
||
744 | |||
745 | /* Nonzero means print parse trace. It is left uninitialized so that |
||
746 | multiple parsers can coexist. */ |
||
747 | int yydebug; |
||
748 | #else /* !YYDEBUG */ |
||
749 | #define YYDPRINTF(Args) |
||
750 | #define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
||
751 | #define YY_STACK_PRINT(Bottom, Top) |
||
752 | #define YY_REDUCE_PRINT(Rule) |
||
753 | #endif /* !YYDEBUG */ |
||
754 | |||
755 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
||
756 | #ifndef YYINITDEPTH |
||
757 | #define YYINITDEPTH 200 |
||
758 | #endif |
||
759 | |||
760 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
||
761 | if the built-in stack extension method is used). |
||
762 | |||
763 | Do not make this value too large; the results are undefined if |
||
764 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
||
765 | evaluated with infinite-precision integer arithmetic. */ |
||
766 | |||
767 | #ifndef YYMAXDEPTH |
||
768 | #define YYMAXDEPTH 10000 |
||
769 | #endif |
||
770 | |||
771 | #if YYERROR_VERBOSE |
||
772 | |||
773 | #ifndef yystrlen |
||
774 | #if defined __GLIBC__ && defined _STRING_H |
||
775 | #define yystrlen strlen |
||
776 | #else |
||
777 | /* Return the length of YYSTR. */ |
||
778 | static YYSIZE_T yystrlen (const char *yystr) |
||
779 | { |
||
780 | YYSIZE_T yylen; |
||
781 | for (yylen = 0; yystr[yylen]; yylen++) |
||
782 | continue; |
||
783 | return yylen; |
||
784 | } |
||
785 | #endif |
||
786 | #endif |
||
787 | |||
788 | #ifndef yystpcpy |
||
789 | #if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
||
790 | #define yystpcpy stpcpy |
||
791 | #else |
||
792 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
||
793 | YYDEST. */ |
||
794 | static char *yystpcpy (char *yydest, const char *yysrc) |
||
795 | { |
||
796 | char *yyd = yydest; |
||
797 | const char *yys = yysrc; |
||
798 | |||
799 | while ((*yyd++ = *yys++) != '\0') |
||
800 | continue; |
||
801 | |||
802 | return yyd - 1; |
||
803 | } |
||
804 | #endif |
||
805 | #endif |
||
806 | |||
807 | #ifndef yytnamerr |
||
808 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
||
809 | quotes and backslashes, so that it's suitable for yyerror. The |
||
810 | heuristic is that double-quoting is unnecessary unless the string |
||
811 | contains an apostrophe, a comma, or backslash (other than |
||
812 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
||
813 | null, do not copy; instead, return the length of what the result |
||
814 | would have been. */ |
||
815 | static YYSIZE_T yytnamerr (char *yyres, const char *yystr) |
||
816 | { |
||
817 | if (*yystr == '"') |
||
818 | { |
||
819 | YYSIZE_T yyn = 0; |
||
820 | char const *yyp = yystr; |
||
821 | |||
822 | for (;;) |
||
823 | switch (*++yyp) |
||
824 | { |
||
825 | case '\'': |
||
826 | case ',': |
||
827 | goto do_not_strip_quotes; |
||
828 | |||
829 | case '\\': |
||
830 | if (*++yyp != '\\') |
||
831 | goto do_not_strip_quotes; |
||
832 | /* Fall through. */ |
||
833 | default: |
||
834 | if (yyres) |
||
835 | yyres[yyn] = *yyp; |
||
836 | yyn++; |
||
837 | break; |
||
838 | |||
839 | case '"': |
||
840 | if (yyres) |
||
841 | yyres[yyn] = '\0'; |
||
842 | return yyn; |
||
843 | } |
||
844 | do_not_strip_quotes:; |
||
845 | } |
||
846 | |||
847 | if (!yyres) |
||
848 | return yystrlen (yystr); |
||
849 | |||
850 | return yystpcpy (yyres, yystr) - yyres; |
||
851 | } |
||
852 | #endif |
||
853 | |||
854 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
||
855 | about the unexpected token YYTOKEN for the state stack whose top is |
||
856 | YYSSP. |
||
857 | |||
858 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
||
859 | not large enough to hold the message. In that case, also set |
||
860 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
||
861 | required number of bytes is too large to store. */ |
||
862 | static int |
||
863 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) |
||
864 | { |
||
865 | YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
||
866 | YYSIZE_T yysize = yysize0; |
||
867 | enum |
||
868 | { |
||
869 | YYERROR_VERBOSE_ARGS_MAXIMUM = 5 |
||
870 | }; |
||
871 | /* Internationalized format string. */ |
||
872 | const char *yyformat = YY_NULLPTR; |
||
873 | /* Arguments of yyformat. */ |
||
874 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
||
875 | /* Number of reported tokens (one for the "unexpected", one per |
||
876 | "expected"). */ |
||
877 | int yycount = 0; |
||
878 | |||
879 | /* There are many possibilities here to consider: |
||
880 | - If this state is a consistent state with a default action, then |
||
881 | the only way this function was invoked is if the default action |
||
882 | is an error action. In that case, don't check for expected |
||
883 | tokens because there are none. |
||
884 | - The only way there can be no lookahead present (in yychar) is if |
||
885 | this state is a consistent state with a default action. Thus, |
||
886 | detecting the absence of a lookahead is sufficient to determine |
||
887 | that there is no unexpected or expected token to report. In that |
||
888 | case, just report a simple "syntax error". |
||
889 | - Don't assume there isn't a lookahead just because this state is a |
||
890 | consistent state with a default action. There might have been a |
||
891 | previous inconsistent state, consistent state with a non-default |
||
892 | action, or user semantic action that manipulated yychar. |
||
893 | - Of course, the expected token list depends on states to have |
||
894 | correct lookahead information, and it depends on the parser not |
||
895 | to perform extra reductions after fetching a lookahead from the |
||
896 | scanner and before detecting a syntax error. Thus, state merging |
||
897 | (from LALR or IELR) and default reductions corrupt the expected |
||
898 | token list. However, the list is correct for canonical LR with |
||
899 | one exception: it will still contain any token that will not be |
||
900 | accepted due to an error action in a later state. |
||
901 | */ |
||
902 | if (yytoken != YYEMPTY) |
||
903 | { |
||
904 | int yyn = yypact[*yyssp]; |
||
905 | yyarg[yycount++] = yytname[yytoken]; |
||
906 | if (!yypact_value_is_default (yyn)) |
||
907 | { |
||
908 | /* Start YYX at -YYN if negative to avoid negative indexes in |
||
909 | YYCHECK. In other words, skip the first -YYN actions for |
||
910 | this state because they are default actions. */ |
||
911 | int yyxbegin = yyn < 0 ? -yyn : 0; |
||
912 | /* Stay within bounds of both yycheck and yytname. */ |
||
913 | int yychecklim = YYLAST - yyn + 1; |
||
914 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
||
915 | int yyx; |
||
916 | |||
917 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
||
918 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && |
||
919 | !yytable_value_is_error (yytable[yyx + yyn])) |
||
920 | { |
||
921 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
||
922 | { |
||
923 | yycount = 1; |
||
924 | yysize = yysize0; |
||
925 | break; |
||
926 | } |
||
927 | yyarg[yycount++] = yytname[yyx]; |
||
928 | { |
||
929 | YYSIZE_T yysize1 = |
||
930 | yysize + |
||
931 | yytnamerr (YY_NULLPTR, yytname[yyx]); |
||
932 | if (!(yysize <= yysize1 && |
||
933 | yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
||
934 | return 2; |
||
935 | yysize = yysize1; |
||
936 | } |
||
937 | } |
||
938 | } |
||
939 | } |
||
940 | |||
941 | switch (yycount) |
||
942 | { |
||
943 | #define YYCASE_(N, S) \ |
||
944 | case N: \ |
||
945 | yyformat = S; \ |
||
946 | break |
||
947 | YYCASE_ (0, YY_ ("syntax error")); |
||
948 | YYCASE_ (1, YY_ ("syntax error, unexpected %s")); |
||
949 | YYCASE_ (2, YY_ ("syntax error, unexpected %s, expecting %s")); |
||
950 | YYCASE_ (3, YY_ ("syntax error, unexpected %s, expecting %s or %s")); |
||
951 | YYCASE_ (4, YY_ ("syntax error, unexpected %s, expecting %s or %s or %s")); |
||
952 | YYCASE_ ( |
||
953 | 5, YY_ ("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
||
954 | #undef YYCASE_ |
||
955 | } |
||
956 | |||
957 | { |
||
958 | YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
||
959 | if (!(yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
||
960 | return 2; |
||
961 | yysize = yysize1; |
||
962 | } |
||
963 | |||
964 | if (*yymsg_alloc < yysize) |
||
965 | { |
||
966 | *yymsg_alloc = 2 * yysize; |
||
967 | if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
||
968 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
||
969 | return 1; |
||
970 | } |
||
971 | |||
972 | /* Avoid sprintf, as that infringes on the user's name space. |
||
973 | Don't have undefined behavior even if the translation |
||
974 | produced a string with the wrong number of "%s"s. */ |
||
975 | { |
||
976 | char *yyp = *yymsg; |
||
977 | int yyi = 0; |
||
978 | while ((*yyp = *yyformat) != '\0') |
||
979 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
||
980 | { |
||
981 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
||
982 | yyformat += 2; |
||
983 | } |
||
984 | else |
||
985 | { |
||
986 | yyp++; |
||
987 | yyformat++; |
||
988 | } |
||
989 | } |
||
990 | return 0; |
||
991 | } |
||
992 | #endif /* YYERROR_VERBOSE */ |
||
993 | |||
994 | /*-----------------------------------------------. |
||
995 | | Release the memory associated to this symbol. | |
||
996 | `-----------------------------------------------*/ |
||
997 | |||
998 | static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
||
999 | { |
||
1000 | YYUSE (yyvaluep); |
||
1001 | if (!yymsg) |
||
1002 | yymsg = "Deleting"; |
||
1003 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
||
1004 | |||
1005 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
1006 | YYUSE (yytype); |
||
1007 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
||
1008 | } |
||
1009 | |||
1010 | /* The lookahead symbol. */ |
||
1011 | int yychar; |
||
1012 | |||
1013 | /* The semantic value of the lookahead symbol. */ |
||
1014 | YYSTYPE yylval; |
||
1015 | /* Number of syntax errors so far. */ |
||
1016 | int yynerrs; |
||
1017 | |||
1018 | /*----------. |
||
1019 | | yyparse. | |
||
1020 | `----------*/ |
||
1021 | |||
1022 | int yyparse (void) |
||
1023 | { |
||
1024 | int yystate; |
||
1025 | /* Number of tokens to shift before error messages enabled. */ |
||
1026 | int yyerrstatus; |
||
1027 | |||
1028 | /* The stacks and their tools: |
||
1029 | 'yyss': related to states. |
||
1030 | 'yyvs': related to semantic values. |
||
1031 | |||
1032 | Refer to the stacks through separate pointers, to allow yyoverflow |
||
1033 | to reallocate them elsewhere. */ |
||
1034 | |||
1035 | /* The state stack. */ |
||
1036 | yytype_int16 yyssa[YYINITDEPTH]; |
||
1037 | yytype_int16 *yyss; |
||
1038 | yytype_int16 *yyssp; |
||
1039 | |||
1040 | /* The semantic value stack. */ |
||
1041 | YYSTYPE yyvsa[YYINITDEPTH]; |
||
1042 | YYSTYPE *yyvs; |
||
1043 | YYSTYPE *yyvsp; |
||
1044 | |||
1045 | YYSIZE_T yystacksize; |
||
1046 | |||
1047 | int yyn; |
||
1048 | int yyresult; |
||
1049 | /* Lookahead token as an internal (translated) token number. */ |
||
1050 | int yytoken = 0; |
||
1051 | /* The variables used to return semantic value and location from the |
||
1052 | action routines. */ |
||
1053 | YYSTYPE yyval; |
||
1054 | |||
1055 | #if YYERROR_VERBOSE |
||
1056 | /* Buffer for error messages, and its allocated size. */ |
||
1057 | char yymsgbuf[128]; |
||
1058 | char *yymsg = yymsgbuf; |
||
1059 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
||
1060 | #endif |
||
1061 | |||
1062 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
||
1063 | |||
1064 | /* The number of symbols on the RHS of the reduced rule. |
||
1065 | Keep to zero when no symbol should be popped. */ |
||
1066 | int yylen = 0; |
||
1067 | |||
1068 | yyssp = yyss = yyssa; |
||
1069 | yyvsp = yyvs = yyvsa; |
||
1070 | yystacksize = YYINITDEPTH; |
||
1071 | |||
1072 | YYDPRINTF ((stderr, "Starting parse\n")); |
||
1073 | |||
1074 | yystate = 0; |
||
1075 | yyerrstatus = 0; |
||
1076 | yynerrs = 0; |
||
1077 | yychar = YYEMPTY; /* Cause a token to be read. */ |
||
1078 | goto yysetstate; |
||
1079 | |||
1080 | /*------------------------------------------------------------. |
||
1081 | | yynewstate -- Push a new state, which is found in yystate. | |
||
1082 | `------------------------------------------------------------*/ |
||
1083 | yynewstate: |
||
1084 | /* In all cases, when you get here, the value and location stacks |
||
1085 | have just been pushed. So pushing a state here evens the stacks. */ |
||
1086 | yyssp++; |
||
1087 | |||
1088 | yysetstate: |
||
1089 | *yyssp = yystate; |
||
1090 | |||
1091 | if (yyss + yystacksize - 1 <= yyssp) |
||
1092 | { |
||
1093 | /* Get the current used size of the three stacks, in elements. */ |
||
1094 | YYSIZE_T yysize = yyssp - yyss + 1; |
||
1095 | |||
1096 | #ifdef yyoverflow |
||
1097 | { |
||
1098 | /* Give user a chance to reallocate the stack. Use copies of |
||
1099 | these so that the &'s don't force the real ones into |
||
1100 | memory. */ |
||
1101 | YYSTYPE *yyvs1 = yyvs; |
||
1102 | yytype_int16 *yyss1 = yyss; |
||
1103 | |||
1104 | /* Each stack pointer address is followed by the size of the |
||
1105 | data in use in that stack, in bytes. This used to be a |
||
1106 | conditional around just the two extra args, but that might |
||
1107 | be undefined if yyoverflow is a macro. */ |
||
1108 | yyoverflow ( |
||
1109 | YY_ ("memory exhausted"), |
||
1110 | &yyss1, |
||
1111 | yysize * sizeof (*yyssp), |
||
1112 | &yyvs1, |
||
1113 | yysize * sizeof (*yyvsp), |
||
1114 | &yystacksize); |
||
1115 | |||
1116 | yyss = yyss1; |
||
1117 | yyvs = yyvs1; |
||
1118 | } |
||
1119 | #else /* no yyoverflow */ |
||
1120 | #ifndef YYSTACK_RELOCATE |
||
1121 | goto yyexhaustedlab; |
||
1122 | #else |
||
1123 | /* Extend the stack our own way. */ |
||
1124 | if (YYMAXDEPTH <= yystacksize) |
||
1125 | goto yyexhaustedlab; |
||
1126 | yystacksize *= 2; |
||
1127 | if (YYMAXDEPTH < yystacksize) |
||
1128 | yystacksize = YYMAXDEPTH; |
||
1129 | |||
1130 | { |
||
1131 | yytype_int16 *yyss1 = yyss; |
||
1132 | union yyalloc *yyptr = |
||
1133 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
||
1134 | if (!yyptr) |
||
1135 | goto yyexhaustedlab; |
||
1136 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
||
1137 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
||
1138 | #undef YYSTACK_RELOCATE |
||
1139 | if (yyss1 != yyssa) |
||
1140 | YYSTACK_FREE (yyss1); |
||
1141 | } |
||
1142 | #endif |
||
1143 | #endif /* no yyoverflow */ |
||
1144 | |||
1145 | yyssp = yyss + yysize - 1; |
||
1146 | yyvsp = yyvs + yysize - 1; |
||
1147 | |||
1148 | YYDPRINTF (( |
||
1149 | stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); |
||
1150 | |||
1151 | if (yyss + yystacksize - 1 <= yyssp) |
||
1152 | YYABORT; |
||
1153 | } |
||
1154 | |||
1155 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
||
1156 | |||
1157 | if (yystate == YYFINAL) |
||
1158 | YYACCEPT; |
||
1159 | |||
1160 | goto yybackup; |
||
1161 | |||
1162 | /*-----------. |
||
1163 | | yybackup. | |
||
1164 | `-----------*/ |
||
1165 | yybackup: |
||
1166 | |||
1167 | /* Do appropriate processing given the current state. Read a |
||
1168 | lookahead token if we need one and don't already have one. */ |
||
1169 | |||
1170 | /* First try to decide what to do without reference to lookahead token. */ |
||
1171 | yyn = yypact[yystate]; |
||
1172 | if (yypact_value_is_default (yyn)) |
||
1173 | goto yydefault; |
||
1174 | |||
1175 | /* Not known => get a lookahead token if don't already have one. */ |
||
1176 | |||
1177 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
||
1178 | if (yychar == YYEMPTY) |
||
1179 | { |
||
1180 | YYDPRINTF ((stderr, "Reading a token: ")); |
||
1181 | yychar = yylex (); |
||
1182 | } |
||
1183 | |||
1184 | if (yychar <= YYEOF) |
||
1185 | { |
||
1186 | yychar = yytoken = YYEOF; |
||
1187 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
||
1188 | } |
||
1189 | else |
||
1190 | { |
||
1191 | yytoken = YYTRANSLATE (yychar); |
||
1192 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
||
1193 | } |
||
1194 | |||
1195 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
||
1196 | detect an error, take that action. */ |
||
1197 | yyn += yytoken; |
||
1198 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
||
1199 | goto yydefault; |
||
1200 | yyn = yytable[yyn]; |
||
1201 | if (yyn <= 0) |
||
1202 | { |
||
1203 | if (yytable_value_is_error (yyn)) |
||
1204 | goto yyerrlab; |
||
1205 | yyn = -yyn; |
||
1206 | goto yyreduce; |
||
1207 | } |
||
1208 | |||
1209 | /* Count tokens shifted since error; after three, turn off error |
||
1210 | status. */ |
||
1211 | if (yyerrstatus) |
||
1212 | yyerrstatus--; |
||
1213 | |||
1214 | /* Shift the lookahead token. */ |
||
1215 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
||
1216 | |||
1217 | /* Discard the shifted token. */ |
||
1218 | yychar = YYEMPTY; |
||
1219 | |||
1220 | yystate = yyn; |
||
1221 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
1222 | *++yyvsp = yylval; |
||
1223 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
||
1224 | |||
1225 | goto yynewstate; |
||
1226 | |||
1227 | /*-----------------------------------------------------------. |
||
1228 | | yydefault -- do the default action for the current state. | |
||
1229 | `-----------------------------------------------------------*/ |
||
1230 | yydefault: |
||
1231 | yyn = yydefact[yystate]; |
||
1232 | if (yyn == 0) |
||
1233 | goto yyerrlab; |
||
1234 | goto yyreduce; |
||
1235 | |||
1236 | /*-----------------------------. |
||
1237 | | yyreduce -- Do a reduction. | |
||
1238 | `-----------------------------*/ |
||
1239 | yyreduce: |
||
1240 | /* yyn is the number of a rule to reduce with. */ |
||
1241 | yylen = yyr2[yyn]; |
||
1242 | |||
1243 | /* If YYLEN is nonzero, implement the default value of the action: |
||
1244 | '$$ = $1'. |
||
1245 | |||
1246 | Otherwise, the following line sets YYVAL to garbage. |
||
1247 | This behavior is undocumented and Bison |
||
1248 | users should not rely upon it. Assigning to YYVAL |
||
1249 | unconditionally makes the parser a bit smaller, and it avoids a |
||
1250 | GCC warning that YYVAL may be used uninitialized. */ |
||
1251 | yyval = yyvsp[1 - yylen]; |
||
1252 | |||
1253 | YY_REDUCE_PRINT (yyn); |
||
1254 | switch (yyn) |
||
1255 | { |
||
1256 | case 12: |
||
1257 | #line 128 "net_yacc.y" /* yacc.c:1646 */ |
||
1258 | { |
||
1259 | current_chip = find_socket (Ident, (yyvsp[-1].string), Create, &socket_head); |
||
1260 | set_socket (current_chip, Type, (yyvsp[-5].string)); |
||
1261 | set_socket (current_chip, Value, (yyvsp[-3].string)); |
||
1262 | } |
||
1263 | #line 1345 "net_yacc.c" /* yacc.c:1646 */ |
||
1264 | break; |
||
1265 | |||
1266 | case 19: |
||
1267 | #line 148 "net_yacc.y" /* yacc.c:1646 */ |
||
1268 | { |
||
1269 | strcpy (curr_net_nam, (yyvsp[-1].string)); |
||
1270 | } |
||
1271 | #line 1351 "net_yacc.c" /* yacc.c:1646 */ |
||
1272 | break; |
||
1273 | |||
1274 | case 20: |
||
1275 | #line 151 "net_yacc.y" /* yacc.c:1646 */ |
||
1276 | { |
||
1277 | define_pin ( |
||
1278 | &routed_list, |
||
1279 | find_socket (Ident, (yyvsp[-2].string), Create, &socket_head), |
||
1280 | curr_net_nam, |
||
1281 | BIDIR, |
||
1282 | 0, |
||
1283 | (yyvsp[0].string), |
||
1284 | default_vhdl_datatype, |
||
1285 | NULL); |
||
1286 | } |
||
1287 | #line 1360 "net_yacc.c" /* yacc.c:1646 */ |
||
1288 | break; |
||
1289 | |||
1290 | #line 1364 "net_yacc.c" /* yacc.c:1646 */ |
||
1291 | default: |
||
1292 | break; |
||
1293 | } |
||
1294 | /* User semantic actions sometimes alter yychar, and that requires |
||
1295 | that yytoken be updated with the new translation. We take the |
||
1296 | approach of translating immediately before every use of yytoken. |
||
1297 | One alternative is translating here after every semantic action, |
||
1298 | but that translation would be missed if the semantic action invokes |
||
1299 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
||
1300 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
||
1301 | incorrect destructor might then be invoked immediately. In the |
||
1302 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
||
1303 | to an incorrect destructor call or verbose syntax error message |
||
1304 | before the lookahead is translated. */ |
||
1305 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
||
1306 | |||
1307 | YYPOPSTACK (yylen); |
||
1308 | yylen = 0; |
||
1309 | YY_STACK_PRINT (yyss, yyssp); |
||
1310 | |||
1311 | *++yyvsp = yyval; |
||
1312 | |||
1313 | /* Now 'shift' the result of the reduction. Determine what state |
||
1314 | that goes to, based on the state we popped back to and the rule |
||
1315 | number reduced by. */ |
||
1316 | |||
1317 | yyn = yyr1[yyn]; |
||
1318 | |||
1319 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
||
1320 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
||
1321 | yystate = yytable[yystate]; |
||
1322 | else |
||
1323 | yystate = yydefgoto[yyn - YYNTOKENS]; |
||
1324 | |||
1325 | goto yynewstate; |
||
1326 | |||
1327 | /*--------------------------------------. |
||
1328 | | yyerrlab -- here on detecting error. | |
||
1329 | `--------------------------------------*/ |
||
1330 | yyerrlab: |
||
1331 | /* Make sure we have latest lookahead translation. See comments at |
||
1332 | user semantic actions for why this is necessary. */ |
||
1333 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
||
1334 | |||
1335 | /* If not already recovering from an error, report this error. */ |
||
1336 | if (!yyerrstatus) |
||
1337 | { |
||
1338 | ++yynerrs; |
||
1339 | #if !YYERROR_VERBOSE |
||
1340 | yyerror (YY_ ("syntax error")); |
||
1341 | #else |
||
1342 | #define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, yyssp, yytoken) |
||
1343 | { |
||
1344 | char const *yymsgp = YY_ ("syntax error"); |
||
1345 | int yysyntax_error_status; |
||
1346 | yysyntax_error_status = YYSYNTAX_ERROR; |
||
1347 | if (yysyntax_error_status == 0) |
||
1348 | yymsgp = yymsg; |
||
1349 | else if (yysyntax_error_status == 1) |
||
1350 | { |
||
1351 | if (yymsg != yymsgbuf) |
||
1352 | YYSTACK_FREE (yymsg); |
||
1353 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
||
1354 | if (!yymsg) |
||
1355 | { |
||
1356 | yymsg = yymsgbuf; |
||
1357 | yymsg_alloc = sizeof yymsgbuf; |
||
1358 | yysyntax_error_status = 2; |
||
1359 | } |
||
1360 | else |
||
1361 | { |
||
1362 | yysyntax_error_status = YYSYNTAX_ERROR; |
||
1363 | yymsgp = yymsg; |
||
1364 | } |
||
1365 | } |
||
1366 | yyerror (yymsgp); |
||
1367 | if (yysyntax_error_status == 2) |
||
1368 | goto yyexhaustedlab; |
||
1369 | } |
||
1370 | #undef YYSYNTAX_ERROR |
||
1371 | #endif |
||
1372 | } |
||
1373 | |||
1374 | if (yyerrstatus == 3) |
||
1375 | { |
||
1376 | /* If just tried and failed to reuse lookahead token after an |
||
1377 | error, discard it. */ |
||
1378 | |||
1379 | if (yychar <= YYEOF) |
||
1380 | { |
||
1381 | /* Return failure if at end of input. */ |
||
1382 | if (yychar == YYEOF) |
||
1383 | YYABORT; |
||
1384 | } |
||
1385 | else |
||
1386 | { |
||
1387 | yydestruct ("Error: discarding", yytoken, &yylval); |
||
1388 | yychar = YYEMPTY; |
||
1389 | } |
||
1390 | } |
||
1391 | |||
1392 | /* Else will try to reuse lookahead token after shifting the error |
||
1393 | token. */ |
||
1394 | goto yyerrlab1; |
||
1395 | |||
1396 | /*---------------------------------------------------. |
||
1397 | | yyerrorlab -- error raised explicitly by YYERROR. | |
||
1398 | `---------------------------------------------------*/ |
||
1399 | yyerrorlab: |
||
1400 | |||
1401 | /* Pacify compilers like GCC when the user code never invokes |
||
1402 | YYERROR and the label yyerrorlab therefore never appears in user |
||
1403 | code. */ |
||
1404 | if (/*CONSTCOND*/ 0) |
||
1405 | goto yyerrorlab; |
||
1406 | |||
1407 | /* Do not reclaim the symbols of the rule whose action triggered |
||
1408 | this YYERROR. */ |
||
1409 | YYPOPSTACK (yylen); |
||
1410 | yylen = 0; |
||
1411 | YY_STACK_PRINT (yyss, yyssp); |
||
1412 | yystate = *yyssp; |
||
1413 | goto yyerrlab1; |
||
1414 | |||
1415 | /*-------------------------------------------------------------. |
||
1416 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
||
1417 | `-------------------------------------------------------------*/ |
||
1418 | yyerrlab1: |
||
1419 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
||
1420 | |||
1421 | for (;;) |
||
1422 | { |
||
1423 | yyn = yypact[yystate]; |
||
1424 | if (!yypact_value_is_default (yyn)) |
||
1425 | { |
||
1426 | yyn += YYTERROR; |
||
1427 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
||
1428 | { |
||
1429 | yyn = yytable[yyn]; |
||
1430 | if (0 < yyn) |
||
1431 | break; |
||
1432 | } |
||
1433 | } |
||
1434 | |||
1435 | /* Pop the current state because it cannot handle the error token. */ |
||
1436 | if (yyssp == yyss) |
||
1437 | YYABORT; |
||
1438 | |||
1439 | yydestruct ("Error: popping", yystos[yystate], yyvsp); |
||
1440 | YYPOPSTACK (1); |
||
1441 | yystate = *yyssp; |
||
1442 | YY_STACK_PRINT (yyss, yyssp); |
||
1443 | } |
||
1444 | |||
1445 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
1446 | *++yyvsp = yylval; |
||
1447 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
||
1448 | |||
1449 | /* Shift the error token. */ |
||
1450 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
||
1451 | |||
1452 | yystate = yyn; |
||
1453 | goto yynewstate; |
||
1454 | |||
1455 | /*-------------------------------------. |
||
1456 | | yyacceptlab -- YYACCEPT comes here. | |
||
1457 | `-------------------------------------*/ |
||
1458 | yyacceptlab: |
||
1459 | yyresult = 0; |
||
1460 | goto yyreturn; |
||
1461 | |||
1462 | /*-----------------------------------. |
||
1463 | | yyabortlab -- YYABORT comes here. | |
||
1464 | `-----------------------------------*/ |
||
1465 | yyabortlab: |
||
1466 | yyresult = 1; |
||
1467 | goto yyreturn; |
||
1468 | |||
1469 | #if !defined yyoverflow || YYERROR_VERBOSE |
||
1470 | /*-------------------------------------------------. |
||
1471 | | yyexhaustedlab -- memory exhaustion comes here. | |
||
1472 | `-------------------------------------------------*/ |
||
1473 | yyexhaustedlab: |
||
1474 | yyerror (YY_ ("memory exhausted")); |
||
1475 | yyresult = 2; |
||
1476 | /* Fall through. */ |
||
1477 | #endif |
||
1478 | |||
1479 | yyreturn: |
||
1480 | if (yychar != YYEMPTY) |
||
1481 | { |
||
1482 | /* Make sure we have latest lookahead translation. See comments at |
||
1483 | user semantic actions for why this is necessary. */ |
||
1484 | yytoken = YYTRANSLATE (yychar); |
||
1485 | yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); |
||
1486 | } |
||
1487 | /* Do not reclaim the symbols of the rule whose action triggered |
||
1488 | this YYABORT or YYACCEPT. */ |
||
1489 | YYPOPSTACK (yylen); |
||
1490 | YY_STACK_PRINT (yyss, yyssp); |
||
1491 | while (yyssp != yyss) |
||
1492 | { |
||
1493 | yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); |
||
1494 | YYPOPSTACK (1); |
||
1495 | } |
||
1496 | #ifndef yyoverflow |
||
1497 | if (yyss != yyssa) |
||
1498 | YYSTACK_FREE (yyss); |
||
1499 | #endif |
||
1500 | #if YYERROR_VERBOSE |
||
1501 | if (yymsg != yymsgbuf) |
||
1502 | YYSTACK_FREE (yymsg); |
||
1503 | #endif |
||
1504 | return yyresult; |
||
1505 | } |
||
1506 | #line 165 "net_yacc.y" /* yacc.c:1906 */ |
||
1507 | |||
1508 | /* defining lineno here */ |
||
1509 | |||
1510 | int lineno; |
||
1511 | extern char *yytext; |
||
1512 | |||
1513 | int yyerror (char *x) |
||
1514 | { |
||
1515 | int token; |
||
1516 | printf ("Error --> %s near string (%s) at line %d\n", x, yytext, lineno); |
||
1517 | /* for(token = yylex();token >= 0 && token!=NL;token = yylex()); */ |
||
1518 | return 1; |
||
1519 | } |
||
1520 | |||
1521 | int yywrap (void) |
||
1522 | { |
||
1523 | return 1; |
||
1524 | } |