My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
parse_spice.cpp
Go to the documentation of this file.
1 
2 /* A Bison parser, made by GNU Bison 2.4.1. */
3 
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 
6  Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7  Free Software Foundation, Inc.
8 
9  This program is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 
22 /* As a special exception, you may create a larger work that contains
23  part or all of the Bison parser skeleton and distribute that work
24  under terms of your choice, so long as that work isn't itself a
25  parser generator using the skeleton or a modified version thereof
26  as a parser skeleton. Alternatively, if you modify or redistribute
27  the parser skeleton itself, you may (at your option) remove this
28  special exception, which will cause the skeleton and the resulting
29  Bison output files to be licensed under the GNU General Public
30  License without this special exception.
31 
32  This special exception was added by the Free Software Foundation in
33  version 2.2 of Bison. */
34 
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36  simplifying the original so-called "semantic" parser. */
37 
38 /* All symbols defined below should begin with yy or YY, to avoid
39  infringing on user name space. This should be done even for local
40  variables, as they might otherwise be expanded by user macros.
41  There are some unavoidable exceptions within include files to
42  define necessary library symbols; they are noted "INFRINGES ON
43  USER NAME SPACE" below. */
44 
45 /* Identify Bison output. */
46 #define YYBISON 1
47 
48 /* Bison version. */
49 #define YYBISON_VERSION "2.4.1"
50 
51 /* Skeleton name. */
52 #define YYSKELETON_NAME "yacc.c"
53 
54 /* Pure parsers. */
55 #define YYPURE 0
56 
57 /* Push parsers. */
58 #define YYPUSH 0
59 
60 /* Pull parsers. */
61 #define YYPULL 1
62 
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
65 
66 /* Substitute the variable and function names. */
67 #define yyparse spice_parse
68 #define yylex spice_lex
69 #define yyerror spice_error
70 #define yylval spice_lval
71 #define yychar spice_char
72 #define yydebug spice_debug
73 #define yynerrs spice_nerrs
74 
75 
76 /* Copy the first part of user declarations. */
77 
78 /* Line 189 of yacc.c */
79 #line 3 "parse_spice.y"
80 
81 /*
82  * parse_spice.y - parser for a Spice netlist
83  *
84  * Copyright (C) 2004, 2005, 2006, 2007, 2009 Stefan Jahn <stefan@lkcc.org>
85  *
86  * This is free software; you can redistribute it and/or modify
87  * it under the terms of the GNU General Public License as published by
88  * the Free Software Foundation; either version 2, or (at your option)
89  * any later version.
90  *
91  * This software is distributed in the hope that it will be useful,
92  * but WITHOUT ANY WARRANTY; without even the implied warranty of
93  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94  * GNU General Public License for more details.
95  *
96  * You should have received a copy of the GNU General Public License
97  * along with this package; see the file COPYING. If not, write to
98  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
99  * Boston, MA 02110-1301, USA.
100  *
101  * $Id: parse_spice.y 1825 2011-03-11 20:42:14Z ela $
102  *
103  */
104 
105 #if HAVE_CONFIG_H
106 # include <config.h>
107 #endif
108 
109 #include <stdio.h>
110 #include <stdlib.h>
111 #include <string.h>
112 #include <ctype.h>
113 
114 #ifdef __MINGW32__
115 #define strcasecmp stricmp
116 #endif
117 
118 #define YYERROR_VERBOSE 42
119 #define YYDEBUG 1
120 #define YYMAXDEPTH 1000000
121 
122 #include "check_spice.h"
123 
124 // Converts the given string into upper case.
125 static char * spice_toupper (char * str) {
126  for (unsigned int i = 0; i < strlen (str); i++) {
127  if (str[i] >= 'a' && str[i] <= 'z') str[i] = toupper (str[i]);
128  }
129  return str;
130 }
131 
132 // Creates a device instance.
133 static struct definition_t * spice_create_device (char * instance) {
134  struct definition_t * def = create_definition ();
135  def->action = PROP_COMPONENT;
136  def->instance = spice_toupper (instance);
137  def->type = (char *) calloc (2, 1);
138  def->type[0] = def->instance[0];
139  def->line = spice_lineno;
140  return def;
141 }
142 
143 // Creates an action instance.
144 static struct definition_t * spice_create_action (char * type,
145  char * instance) {
146  struct definition_t * def = create_definition ();
147  def->action = PROP_ACTION;
148  def->instance = spice_toupper (instance);
149  def->type = spice_toupper (type);
150  def->line = spice_lineno;
151  return def;
152 }
153 
154 // Create a string value.
155 static struct value_t * spice_create_str_value (char * value, int hint) {
156  struct value_t * val = create_value ();
157  val->ident = spice_toupper (value);
158  val->hint |= hint;
159  return val;
160 }
161 
162 // Create a real value.
163 static struct value_t * spice_create_val_value (char * value, int hint) {
164  struct value_t * val = create_value ();
165  val->ident = value;
166  val->value = strtod (value, NULL);
167  val->hint |= hint;
168  return val;
169 }
170 
171 // Create a key/value pair.
172 static struct value_t * spice_create_par_value (char * key, char * value) {
173  struct value_t * val = spice_create_str_value (key, HINT_PAIR);
174  val->unit = value;
175  return val;
176 }
177 
178 // Append a string value to the definition.
179 static void spice_append_str_value (struct definition_t * def,
180  char * value, int hint) {
181  struct value_t * val = spice_create_str_value (value, hint);
182  def->values = netlist_append_values (def->values, val);
183 }
184 
185 // Append a string value to the given values.
186 static struct value_t * spice_append_str_values (struct value_t * values,
187  char * value, int hint) {
188  struct value_t * val = spice_create_str_value (value, hint);
189  return netlist_append_values (values, val);
190 }
191 
192 // Append a real value to the definition.
193 static void spice_append_val_value (struct definition_t * def,
194  char * value, int hint) {
195  struct value_t * val = spice_create_val_value (value, hint);
196  def->values = netlist_append_values (def->values, val);
197 }
198 
199 // Append a real value to the given values.
200 static struct value_t * spice_append_val_values (struct value_t * values,
201  char * value, int hint) {
202  struct value_t * val = spice_create_val_value (value, hint);
203  return netlist_append_values (values, val);
204 }
205 
206 
207 
208 /* Line 189 of yacc.c */
209 #line 210 "parse_spice.cpp"
210 
211 /* Enabling traces. */
212 #ifndef YYDEBUG
213 # define YYDEBUG 0
214 #endif
215 
216 /* Enabling verbose error messages. */
217 #ifdef YYERROR_VERBOSE
218 # undef YYERROR_VERBOSE
219 # define YYERROR_VERBOSE 1
220 #else
221 # define YYERROR_VERBOSE 0
222 #endif
223 
224 /* Enabling the token table. */
225 #ifndef YYTOKEN_TABLE
226 # define YYTOKEN_TABLE 0
227 #endif
228 
229 
230 /* Tokens. */
231 #ifndef YYTOKENTYPE
232 # define YYTOKENTYPE
233  /* Put the tokens into the symbol table, so that GDB and other debuggers
234  know about them. */
235  enum yytokentype {
236  TitleLine = 258,
238  End = 260,
239  Eol = 261,
240  Identifier = 262,
241  Digits = 263,
242  Floats = 264,
243  Nodes = 265,
244  Options = 266,
245  Function = 267,
247  ENDS_Action = 269,
248  AC_Action = 270,
249  OP_Action = 271,
250  I_Source = 272,
251  SAVE_Action = 273,
252  RLC_Device = 274,
253  L_Device = 275,
254  K_Device = 276,
255  IV_Source = 277,
256  GE_Source = 278,
257  FH_Source = 279,
258  V_Source = 280,
261  JFET_Device = 283,
265  MODEL_Spec = 287,
266  TRAN_Action = 288,
267  PLOT_Action = 289,
268  VoltFunc = 290,
269  CurrFunc = 291,
270  DC_Action = 292,
275  PZ_Action = 297,
276  CurVol = 298,
277  PoleZero = 299,
278  ALL_Special = 300,
279  X_Device = 301,
280  O_Device = 302,
281  ModelProps = 303,
282  OFF_Special = 304,
283  IC_Special = 305,
284  SIM_Type = 306,
286  MOS_Special = 308,
287  B_Source = 309,
290  File = 312,
291  BranchFunc = 313,
293  T_Device = 315,
294  U_Device = 316,
295  S_Device = 317,
296  W_Device = 318,
297  ON_Special = 319,
298  TF_Action = 320,
299  SENS_Action = 321,
300  FOUR_Action = 322,
301  OpFunc = 323,
302  Behave = 324,
303  TC_Special = 325,
305  };
306 #endif
307 /* Tokens. */
308 #define TitleLine 258
309 #define InvalidCharacter 259
310 #define End 260
311 #define Eol 261
312 #define Identifier 262
313 #define Digits 263
314 #define Floats 264
315 #define Nodes 265
316 #define Options 266
317 #define Function 267
318 #define SUBCKT_Action 268
319 #define ENDS_Action 269
320 #define AC_Action 270
321 #define OP_Action 271
322 #define I_Source 272
323 #define SAVE_Action 273
324 #define RLC_Device 274
325 #define L_Device 275
326 #define K_Device 276
327 #define IV_Source 277
328 #define GE_Source 278
329 #define FH_Source 279
330 #define V_Source 280
331 #define Diode_Device 281
332 #define Bipolar_Device 282
333 #define JFET_Device 283
334 #define MOSFET_Device 284
335 #define MESFET_Device 285
336 #define MODEL_Action 286
337 #define MODEL_Spec 287
338 #define TRAN_Action 288
339 #define PLOT_Action 289
340 #define VoltFunc 290
341 #define CurrFunc 291
342 #define DC_Action 292
343 #define PRINT_Action 293
344 #define OPTIONS_Action 294
345 #define WIDTH_Action 295
346 #define NOISE_Action 296
347 #define PZ_Action 297
348 #define CurVol 298
349 #define PoleZero 299
350 #define ALL_Special 300
351 #define X_Device 301
352 #define O_Device 302
353 #define ModelProps 303
354 #define OFF_Special 304
355 #define IC_Special 305
356 #define SIM_Type 306
357 #define TEMP_Special 307
358 #define MOS_Special 308
359 #define B_Source 309
360 #define DISTO_Action 310
361 #define INCLUDE_Action 311
362 #define File 312
363 #define BranchFunc 313
364 #define NODESET_Action 314
365 #define T_Device 315
366 #define U_Device 316
367 #define S_Device 317
368 #define W_Device 318
369 #define ON_Special 319
370 #define TF_Action 320
371 #define SENS_Action 321
372 #define FOUR_Action 322
373 #define OpFunc 323
374 #define Behave 324
375 #define TC_Special 325
376 #define TEMP_Action 326
377 
378 
379 
380 
381 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
382 typedef union YYSTYPE
383 {
384 
385 /* Line 214 of yacc.c */
386 #line 146 "parse_spice.y"
387 
388  char * ident;
389  char * str;
390  double d;
393  struct value_t * value;
394 
395 
396 
397 /* Line 214 of yacc.c */
398 #line 399 "parse_spice.cpp"
399 } YYSTYPE;
400 # define YYSTYPE_IS_TRIVIAL 1
401 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
402 # define YYSTYPE_IS_DECLARED 1
403 #endif
404 
405 
406 /* Copy the second part of user declarations. */
407 
408 
409 /* Line 264 of yacc.c */
410 #line 411 "parse_spice.cpp"
411 
412 #ifdef short
413 # undef short
414 #endif
415 
416 #ifdef YYTYPE_UINT8
417 typedef YYTYPE_UINT8 yytype_uint8;
418 #else
419 typedef unsigned char yytype_uint8;
420 #endif
421 
422 #ifdef YYTYPE_INT8
423 typedef YYTYPE_INT8 yytype_int8;
424 #elif (defined __STDC__ || defined __C99__FUNC__ \
425  || defined __cplusplus || defined _MSC_VER)
426 typedef signed char yytype_int8;
427 #else
428 typedef short int yytype_int8;
429 #endif
430 
431 #ifdef YYTYPE_UINT16
432 typedef YYTYPE_UINT16 yytype_uint16;
433 #else
434 typedef unsigned short int yytype_uint16;
435 #endif
436 
437 #ifdef YYTYPE_INT16
438 typedef YYTYPE_INT16 yytype_int16;
439 #else
440 typedef short int yytype_int16;
441 #endif
442 
443 #ifndef YYSIZE_T
444 # ifdef __SIZE_TYPE__
445 # define YYSIZE_T __SIZE_TYPE__
446 # elif defined size_t
447 # define YYSIZE_T size_t
448 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
449  || defined __cplusplus || defined _MSC_VER)
450 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
451 # define YYSIZE_T size_t
452 # else
453 # define YYSIZE_T unsigned int
454 # endif
455 #endif
456 
457 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
458 
459 #ifndef YY_
460 # if YYENABLE_NLS
461 # if ENABLE_NLS
462 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
463 # define YY_(msgid) dgettext ("bison-runtime", msgid)
464 # endif
465 # endif
466 # ifndef YY_
467 # define YY_(msgid) msgid
468 # endif
469 #endif
470 
471 /* Suppress unused-variable warnings by "using" E. */
472 #if ! defined lint || defined __GNUC__
473 # define YYUSE(e) ((void) (e))
474 #else
475 # define YYUSE(e) /* empty */
476 #endif
477 
478 /* Identity function, used to suppress warnings about constant conditions. */
479 #ifndef lint
480 # define YYID(n) (n)
481 #else
482 #if (defined __STDC__ || defined __C99__FUNC__ \
483  || defined __cplusplus || defined _MSC_VER)
484 static int
485 YYID (int yyi)
486 #else
487 static int
488 YYID (yyi)
489  int yyi;
490 #endif
491 {
492  return yyi;
493 }
494 #endif
495 
496 #if ! defined yyoverflow || YYERROR_VERBOSE
497 
498 /* The parser invokes alloca or malloc; define the necessary symbols. */
499 
500 # ifdef YYSTACK_USE_ALLOCA
501 # if YYSTACK_USE_ALLOCA
502 # ifdef __GNUC__
503 # define YYSTACK_ALLOC __builtin_alloca
504 # elif defined __BUILTIN_VA_ARG_INCR
505 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
506 # elif defined _AIX
507 # define YYSTACK_ALLOC __alloca
508 # elif defined _MSC_VER
509 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
510 # define alloca _alloca
511 # else
512 # define YYSTACK_ALLOC alloca
513 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
514  || defined __cplusplus || defined _MSC_VER)
515 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
516 # ifndef _STDLIB_H
517 # define _STDLIB_H 1
518 # endif
519 # endif
520 # endif
521 # endif
522 # endif
523 
524 # ifdef YYSTACK_ALLOC
525  /* Pacify GCC's `empty if-body' warning. */
526 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
527 # ifndef YYSTACK_ALLOC_MAXIMUM
528  /* The OS might guarantee only one guard page at the bottom of the stack,
529  and a page size can be as small as 4096 bytes. So we cannot safely
530  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
531  to allow for a few compiler-allocated temporary stack slots. */
532 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
533 # endif
534 # else
535 # define YYSTACK_ALLOC YYMALLOC
536 # define YYSTACK_FREE YYFREE
537 # ifndef YYSTACK_ALLOC_MAXIMUM
538 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
539 # endif
540 # if (defined __cplusplus && ! defined _STDLIB_H \
541  && ! ((defined YYMALLOC || defined malloc) \
542  && (defined YYFREE || defined free)))
543 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
544 # ifndef _STDLIB_H
545 # define _STDLIB_H 1
546 # endif
547 # endif
548 # ifndef YYMALLOC
549 # define YYMALLOC malloc
550 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
551  || defined __cplusplus || defined _MSC_VER)
552 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
553 # endif
554 # endif
555 # ifndef YYFREE
556 # define YYFREE free
557 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
558  || defined __cplusplus || defined _MSC_VER)
559 void free (void *); /* INFRINGES ON USER NAME SPACE */
560 # endif
561 # endif
562 # endif
563 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
564 
565 
566 #if (! defined yyoverflow \
567  && (! defined __cplusplus \
568  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
569 
570 /* A type that is properly aligned for any stack member. */
571 union yyalloc
572 {
573  yytype_int16 yyss_alloc;
575 };
576 
577 /* The size of the maximum gap between one aligned stack and the next. */
578 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
579 
580 /* The size of an array large to enough to hold all stacks, each with
581  N elements. */
582 # define YYSTACK_BYTES(N) \
583  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
584  + YYSTACK_GAP_MAXIMUM)
585 
586 /* Copy COUNT objects from FROM to TO. The source and destination do
587  not overlap. */
588 # ifndef YYCOPY
589 # if defined __GNUC__ && 1 < __GNUC__
590 # define YYCOPY(To, From, Count) \
591  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
592 # else
593 # define YYCOPY(To, From, Count) \
594  do \
595  { \
596  YYSIZE_T yyi; \
597  for (yyi = 0; yyi < (Count); yyi++) \
598  (To)[yyi] = (From)[yyi]; \
599  } \
600  while (YYID (0))
601 # endif
602 # endif
603 
604 /* Relocate STACK from its old location to the new one. The
605  local variables YYSIZE and YYSTACKSIZE give the old and new number of
606  elements in the stack, and YYPTR gives the new location of the
607  stack. Advance YYPTR to a properly aligned location for the next
608  stack. */
609 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
610  do \
611  { \
612  YYSIZE_T yynewbytes; \
613  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
614  Stack = &yyptr->Stack_alloc; \
615  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
616  yyptr += yynewbytes / sizeof (*yyptr); \
617  } \
618  while (YYID (0))
619 
620 #endif
621 
622 /* YYFINAL -- State number of the termination state. */
623 #define YYFINAL 113
624 /* YYLAST -- Last index in YYTABLE. */
625 #define YYLAST 679
626 
627 /* YYNTOKENS -- Number of terminals. */
628 #define YYNTOKENS 72
629 /* YYNNTS -- Number of nonterminals. */
630 #define YYNNTS 42
631 /* YYNRULES -- Number of rules. */
632 #define YYNRULES 148
633 /* YYNRULES -- Number of states. */
634 #define YYNSTATES 355
635 
636 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
637 #define YYUNDEFTOK 2
638 #define YYMAXUTOK 326
639 
640 #define YYTRANSLATE(YYX) \
641  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
642 
643 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
644 static const yytype_uint8 yytranslate[] =
645 {
646  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
647  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
648  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
649  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
650  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
651  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
652  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
653  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
654  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
655  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
656  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
657  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
658  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
659  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
660  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
661  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
662  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
663  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
664  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
665  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
666  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
667  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
668  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
669  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
670  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
671  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
672  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
673  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
674  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
675  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
676  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
677  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
678  65, 66, 67, 68, 69, 70, 71
679 };
680 
681 #if YYDEBUG
682 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
683  YYRHS. */
684 static const yytype_uint16 yyprhs[] =
685 {
686  0, 0, 3, 6, 10, 12, 15, 16, 19, 21,
687  23, 25, 32, 40, 47, 54, 61, 68, 76, 82,
688  88, 95, 103, 109, 117, 126, 132, 139, 145, 151,
689  158, 165, 173, 181, 188, 192, 197, 201, 204, 208,
690  213, 218, 222, 227, 231, 235, 239, 245, 254, 258,
691  267, 275, 283, 291, 299, 308, 311, 314, 317, 320,
692  323, 326, 330, 334, 338, 341, 345, 348, 352, 357,
693  363, 366, 368, 371, 375, 377, 379, 382, 384, 386,
694  387, 390, 394, 397, 401, 402, 404, 406, 407, 410,
695  413, 414, 417, 421, 422, 425, 429, 430, 435, 436,
696  440, 443, 446, 449, 450, 454, 457, 460, 463, 467,
697  468, 472, 476, 479, 482, 485, 487, 489, 494, 496,
698  498, 500, 502, 504, 506, 508, 509, 513, 514, 517,
699  518, 521, 524, 525, 528, 529, 532, 535, 536, 539,
700  543, 548, 549, 552, 554, 556, 559, 561, 563
701 };
702 
703 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
704 static const yytype_int8 yyrhs[] =
705 {
706  73, 0, -1, 74, 5, -1, 3, 74, 5, -1,
707  74, -1, 3, 74, -1, -1, 75, 74, -1, 108,
708  -1, 76, -1, 6, -1, 19, 99, 99, 98, 101,
709  6, -1, 19, 99, 99, 98, 96, 101, 6, -1,
710  19, 99, 99, 96, 98, 6, -1, 19, 99, 99,
711  96, 101, 6, -1, 19, 99, 99, 98, 77, 6,
712  -1, 19, 99, 99, 98, 78, 6, -1, 19, 99,
713  99, 98, 69, 103, 6, -1, 21, 20, 20, 98,
714  6, -1, 22, 99, 99, 107, 6, -1, 22, 99,
715  99, 98, 107, 6, -1, 23, 99, 99, 69, 8,
716  103, 6, -1, 23, 99, 99, 69, 6, -1, 23,
717  99, 99, 99, 99, 98, 6, -1, 24, 100, 100,
718  69, 8, 105, 103, 6, -1, 24, 100, 100, 69,
719  6, -1, 24, 100, 100, 25, 98, 6, -1, 31,
720  96, 32, 91, 6, -1, 26, 99, 99, 96, 93,
721  -1, 28, 99, 99, 99, 96, 94, -1, 27, 99,
722  99, 99, 96, 94, -1, 27, 99, 99, 99, 99,
723  96, 94, -1, 29, 99, 99, 99, 99, 96, 95,
724  -1, 30, 99, 99, 99, 96, 94, -1, 33, 102,
725  6, -1, 34, 51, 87, 6, -1, 15, 106, 6,
726  -1, 37, 6, -1, 37, 97, 6, -1, 37, 97,
727  97, 6, -1, 38, 51, 89, 6, -1, 38, 89,
728  6, -1, 38, 51, 45, 6, -1, 39, 90, 6,
729  -1, 71, 102, 6, -1, 40, 101, 6, -1, 41,
730  84, 85, 106, 6, -1, 42, 99, 99, 99, 99,
731  43, 44, 6, -1, 46, 104, 6, -1, 62, 99,
732  99, 99, 99, 96, 88, 6, -1, 63, 99, 99,
733  25, 96, 88, 6, -1, 47, 99, 99, 99, 99,
734  96, 6, -1, 61, 99, 99, 99, 96, 101, 6,
735  -1, 60, 99, 99, 99, 99, 101, 6, -1, 60,
736  99, 99, 99, 99, 101, 82, 6, -1, 16, 6,
737  -1, 18, 6, -1, 66, 6, -1, 65, 6, -1,
738  67, 6, -1, 54, 6, -1, 55, 106, 6, -1,
739  56, 57, 6, -1, 59, 92, 6, -1, 70, 98,
740  -1, 70, 98, 98, -1, 50, 98, -1, 50, 98,
741  98, -1, 50, 98, 98, 98, -1, 50, 98, 98,
742  98, 98, -1, 98, 98, -1, 99, -1, 35, 99,
743  -1, 35, 99, 99, -1, 17, -1, 25, -1, 36,
744  25, -1, 58, -1, 68, -1, -1, 84, 87, -1,
745  84, 83, 87, -1, 86, 87, -1, 86, 83, 87,
746  -1, -1, 64, -1, 49, -1, -1, 84, 87, -1,
747  86, 87, -1, -1, 11, 90, -1, 7, 98, 90,
748  -1, -1, 48, 91, -1, 7, 98, 91, -1, -1,
749  35, 99, 98, 92, -1, -1, 52, 98, 93, -1,
750  98, 93, -1, 49, 93, -1, 79, 93, -1, -1,
751  52, 98, 94, -1, 98, 94, -1, 49, 94, -1,
752  80, 94, -1, 53, 98, 94, -1, -1, 52, 98,
753  95, -1, 53, 98, 95, -1, 98, 95, -1, 49,
754  95, -1, 81, 95, -1, 7, -1, 32, -1, 85,
755  98, 98, 98, -1, 8, -1, 9, -1, 8, -1,
756  10, -1, 7, -1, 99, -1, 25, -1, -1, 7,
757  98, 101, -1, -1, 98, 102, -1, -1, 99, 103,
758  -1, 9, 103, -1, -1, 99, 104, -1, -1, 25,
759  105, -1, 12, 102, -1, -1, 106, 107, -1, 109,
760  110, 112, -1, 13, 111, 104, 6, -1, -1, 113,
761  110, -1, 7, -1, 14, -1, 14, 111, -1, 76,
762  -1, 108, -1, 6, -1
763 };
764 
765 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
766 static const yytype_uint16 yyrline[] =
767 {
768  0, 182, 182, 184, 187, 190, 196, 197, 201, 206,
769  213, 217, 225, 234, 242, 250, 258, 266, 275, 282,
770  289, 297, 312, 317, 326, 342, 347, 355, 362, 370,
771  379, 388, 398, 408, 417, 422, 428, 433, 437, 442,
772  447, 453, 458, 464, 469, 474, 479, 486, 496, 502,
773  512, 521, 530, 539, 548, 558, 562, 566, 570, 574,
774  578, 582, 587, 595, 603, 610, 618, 626, 634, 644,
775  655, 663, 669, 675, 685, 685, 688, 694, 700, 708,
776  709, 712, 716, 719, 725, 726, 729, 734, 735, 738,
777  743, 744, 748, 754, 755, 759, 765, 766, 775, 776,
778  780, 784, 788, 793, 794, 798, 802, 806, 809, 815,
779  816, 820, 824, 828, 832, 837, 837, 840, 850, 850,
780  852, 852, 852, 854, 854, 856, 857, 863, 864, 870,
781  871, 875, 881, 882, 888, 889, 896, 903, 904, 910,
782  918, 924, 925, 936, 939, 940, 944, 950, 951
783 };
784 #endif
785 
786 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
787 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
788  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
789 static const char *const yytname[] =
790 {
791  "$end", "error", "$undefined", "TitleLine", "InvalidCharacter", "End",
792  "Eol", "Identifier", "Digits", "Floats", "Nodes", "Options", "Function",
793  "SUBCKT_Action", "ENDS_Action", "AC_Action", "OP_Action", "I_Source",
794  "SAVE_Action", "RLC_Device", "L_Device", "K_Device", "IV_Source",
795  "GE_Source", "FH_Source", "V_Source", "Diode_Device", "Bipolar_Device",
796  "JFET_Device", "MOSFET_Device", "MESFET_Device", "MODEL_Action",
797  "MODEL_Spec", "TRAN_Action", "PLOT_Action", "VoltFunc", "CurrFunc",
798  "DC_Action", "PRINT_Action", "OPTIONS_Action", "WIDTH_Action",
799  "NOISE_Action", "PZ_Action", "CurVol", "PoleZero", "ALL_Special",
800  "X_Device", "O_Device", "ModelProps", "OFF_Special", "IC_Special",
801  "SIM_Type", "TEMP_Special", "MOS_Special", "B_Source", "DISTO_Action",
802  "INCLUDE_Action", "File", "BranchFunc", "NODESET_Action", "T_Device",
803  "U_Device", "S_Device", "W_Device", "ON_Special", "TF_Action",
804  "SENS_Action", "FOUR_Action", "OpFunc", "Behave", "TC_Special",
805  "TEMP_Action", "$accept", "Input", "InputList", "InputLine",
806  "DefinitionLine", "TC_Value_1", "TC_Value_2", "IC_Condition_1",
807  "IC_Condition_2", "IC_Condition_3", "IC_Condition_4", "Output_Range",
808  "VOLTAGE_Output", "IV_Reference", "CURRENT_Output", "PLOT_List",
809  "SWITCH_State", "PRINT_List", "OPTIONS_List", "MODEL_List",
810  "NODESET_List", "DEVICE_List_1", "DEVICE_List_2", "DEVICE_List_3",
811  "MODEL_Ident", "DC_List", "Value", "Node", "FH_Node", "PairList",
812  "ValueList", "NodeValueList", "NodeList", "VSourceList", "Expr",
813  "ExprList", "Subcircuit", "BeginSub", "SubBody", "SubCkt_Ident",
814  "EndSub", "SubBodyLine", 0
815 };
816 #endif
817 
818 # ifdef YYPRINT
819 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
820  token YYLEX-NUM. */
821 static const yytype_uint16 yytoknum[] =
822 {
823  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
824  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
825  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
826  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
827  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
828  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
829  315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
830  325, 326
831 };
832 # endif
833 
834 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
835 static const yytype_uint8 yyr1[] =
836 {
837  0, 72, 73, 73, 73, 73, 74, 74, 75, 75,
838  75, 76, 76, 76, 76, 76, 76, 76, 76, 76,
839  76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
840  76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
841  76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
842  76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
843  76, 76, 76, 76, 77, 78, 79, 80, 81, 82,
844  83, 84, 84, 84, 85, 85, 86, 86, 86, 87,
845  87, 87, 87, 87, 88, 88, 88, 89, 89, 89,
846  90, 90, 90, 91, 91, 91, 92, 92, 93, 93,
847  93, 93, 93, 94, 94, 94, 94, 94, 94, 95,
848  95, 95, 95, 95, 95, 96, 96, 97, 98, 98,
849  99, 99, 99, 100, 100, 101, 101, 102, 102, 103,
850  103, 103, 104, 104, 105, 105, 106, 107, 107, 108,
851  109, 110, 110, 111, 112, 112, 113, 113, 113
852 };
853 
854 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
855 static const yytype_uint8 yyr2[] =
856 {
857  0, 2, 2, 3, 1, 2, 0, 2, 1, 1,
858  1, 6, 7, 6, 6, 6, 6, 7, 5, 5,
859  6, 7, 5, 7, 8, 5, 6, 5, 5, 6,
860  6, 7, 7, 6, 3, 4, 3, 2, 3, 4,
861  4, 3, 4, 3, 3, 3, 5, 8, 3, 8,
862  7, 7, 7, 7, 8, 2, 2, 2, 2, 2,
863  2, 3, 3, 3, 2, 3, 2, 3, 4, 5,
864  2, 1, 2, 3, 1, 1, 2, 1, 1, 0,
865  2, 3, 2, 3, 0, 1, 1, 0, 2, 2,
866  0, 2, 3, 0, 2, 3, 0, 4, 0, 3,
867  2, 2, 2, 0, 3, 2, 2, 2, 3, 0,
868  3, 3, 2, 2, 2, 1, 1, 4, 1, 1,
869  1, 1, 1, 1, 1, 0, 3, 0, 2, 0,
870  2, 2, 0, 2, 0, 2, 2, 0, 2, 3,
871  4, 0, 2, 1, 1, 2, 1, 1, 1
872 };
873 
874 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
875  STATE-NUM when YYTABLE doesn't specify something else to do. Zero
876  means the default is an error. */
877 static const yytype_uint8 yydefact[] =
878 {
879  6, 6, 10, 0, 0, 0, 0, 0, 0, 0,
880  0, 0, 0, 0, 0, 0, 0, 0, 127, 0,
881  0, 87, 90, 125, 0, 0, 132, 0, 0, 0,
882  0, 96, 0, 0, 0, 0, 0, 0, 0, 127,
883  0, 4, 6, 9, 8, 141, 5, 143, 132, 127,
884  0, 55, 56, 122, 120, 121, 0, 0, 0, 0,
885  124, 123, 0, 0, 0, 0, 0, 0, 115, 116,
886  0, 118, 119, 127, 0, 79, 37, 74, 75, 0,
887  0, 0, 0, 87, 77, 78, 79, 79, 0, 71,
888  0, 90, 0, 0, 0, 0, 0, 132, 0, 0,
889  60, 0, 0, 0, 0, 0, 0, 0, 0, 58,
890  57, 59, 0, 1, 2, 7, 148, 146, 147, 0,
891  141, 3, 0, 136, 36, 0, 0, 137, 0, 0,
892  0, 0, 0, 0, 0, 93, 128, 34, 79, 79,
893  0, 0, 38, 0, 72, 76, 0, 0, 88, 89,
894  41, 90, 91, 43, 125, 45, 0, 0, 133, 48,
895  0, 61, 62, 0, 63, 0, 0, 0, 0, 44,
896  144, 139, 142, 140, 125, 125, 0, 137, 137, 0,
897  0, 0, 0, 0, 98, 0, 0, 0, 0, 0,
898  93, 0, 120, 79, 80, 0, 79, 82, 35, 0,
899  39, 73, 42, 40, 92, 126, 0, 0, 0, 96,
900  0, 0, 0, 0, 145, 0, 0, 115, 129, 0,
901  0, 0, 125, 0, 18, 0, 138, 19, 22, 129,
902  0, 0, 25, 134, 98, 0, 0, 98, 28, 98,
903  115, 103, 0, 103, 0, 103, 93, 94, 27, 81,
904  70, 83, 117, 46, 0, 0, 97, 125, 125, 0,
905  84, 13, 14, 129, 129, 0, 64, 15, 16, 0,
906  11, 20, 0, 0, 26, 134, 129, 101, 66, 98,
907  102, 100, 103, 0, 0, 0, 103, 30, 103, 103,
908  29, 109, 33, 95, 0, 0, 0, 0, 84, 86,
909  85, 0, 131, 130, 17, 65, 12, 21, 23, 135,
910  0, 99, 106, 0, 103, 103, 107, 105, 31, 109,
911  0, 0, 0, 109, 32, 109, 0, 51, 53, 0,
912  0, 52, 0, 50, 24, 67, 104, 108, 113, 0,
913  109, 109, 114, 112, 47, 0, 54, 49, 0, 110,
914  111, 0, 68, 0, 69
915 };
916 
917 /* YYDEFGOTO[NTERM-NUM]. */
918 static const yytype_int16 yydefgoto[] =
919 {
920  -1, 40, 41, 42, 43, 220, 221, 237, 286, 323,
921  330, 193, 138, 79, 139, 140, 301, 88, 92, 191,
922  104, 238, 287, 324, 70, 80, 288, 89, 62, 94,
923  74, 265, 98, 276, 178, 179, 44, 45, 119, 48,
924  171, 120
925 };
926 
927 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
928  STATE-NUM. */
929 #define YYPACT_NINF -227
930 static const yytype_int16 yypact[] =
931 {
932  546, 216, -227, 41, 4, 17, 47, 278, 62, 278,
933  278, 198, 278, 278, 278, 278, 278, 13, 159, 64,
934  33, 92, 30, 91, 168, 278, 278, 278, 116, 4,
935  76, 103, 278, 278, 278, 278, 136, 138, 140, 159,
936  152, 156, 216, -227, -227, 608, 158, -227, 278, 159,
937  173, -227, -227, -227, -227, -227, 278, 145, 278, 278,
938  -227, -227, 198, 278, 278, 278, 278, 278, -227, -227,
939  154, -227, -227, 159, 178, 122, -227, -227, -227, 159,
940  88, 278, 162, 104, -227, -227, 122, 122, 191, -227,
941  159, 30, 194, 159, 196, 19, 278, 278, 203, 278,
942  -227, 209, 214, 278, 222, 278, 278, 278, 278, -227,
943  -227, -227, 224, -227, -227, -227, -227, -227, -227, 190,
944  608, -227, 227, -227, -227, 78, 159, 34, 22, -17,
945  13, 278, 278, 278, 278, 3, -227, -227, 289, 289,
946  230, 159, -227, 235, 278, -227, 245, 246, -227, -227,
947  -227, 30, -227, -227, 91, -227, 4, 278, -227, -227,
948  278, -227, -227, 159, -227, 278, 278, 278, 234, -227,
949  41, -227, -227, -227, 282, -5, 254, 4, 4, 258,
950  84, 278, 159, 98, 146, 175, 13, 278, 13, 159,
951  3, 262, 165, 122, -227, 159, 122, -227, -227, 159,
952  -227, -227, -227, -227, -227, -227, 263, 278, 278, 103,
953  278, 13, 278, 13, -227, 268, 274, 159, 217, 159,
954  286, 287, 91, 288, -227, 294, -227, -227, -227, 217,
955  159, 300, -227, 259, 146, 159, 159, 146, -227, 146,
956  15, 139, 13, 139, 13, 139, 3, -227, -227, -227,
957  -227, -227, -227, -227, 265, 13, -227, 91, 91, 13,
958  87, -227, -227, 217, 217, 303, 159, -227, -227, 304,
959  -227, -227, 306, 307, -227, 259, 217, -227, -227, 146,
960  -227, -227, 139, 159, 159, 159, 139, -227, 139, 139,
961  -227, 161, -227, -227, 270, 309, 9, 310, 87, -227,
962  -227, 311, -227, -227, -227, -227, -227, -227, -227, -227,
963  312, -227, -227, 159, 139, 139, -227, -227, -227, 161,
964  159, 159, 159, 161, -227, 161, 313, -227, -227, 159,
965  314, -227, 320, -227, -227, -227, -227, -227, -227, 159,
966  161, 161, -227, -227, -227, 159, -227, -227, 159, -227,
967  -227, 159, -227, 159, -227
968 };
969 
970 /* YYPGOTO[NTERM-NUM]. */
971 static const yytype_int16 yypgoto[] =
972 {
973  -227, -227, 27, -227, -42, -227, -227, -227, -227, -227,
974  -227, 189, -10, 236, -12, -62, 31, 249, -85, -172,
975  135, -199, -226, -222, -118, 266, -18, 327, 283, -141,
976  86, -180, -43, 73, -3, 16, -41, -227, 229, 180,
977  -227, -227
978 };
979 
980 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
981  positive, shift that token. If negative, reduce the rule which
982  number is the opposite. If zero, do what YYDEFACT says.
983  If YYTABLE_NINF, syntax error. */
984 #define YYTABLE_NINF -123
985 static const yytype_int16 yytable[] =
986 {
987  73, 50, 217, 117, 118, 122, 152, 174, 182, 87,
988  189, 86, 184, 205, 95, 328, 49, 290, 247, 292,
989  68, 73, -122, 51, 148, 149, 101, 69, 46, 53,
990  54, 73, 55, 216, 223, 277, 77, 90, 280, 76,
991  281, 91, 71, 72, 78, 69, 49, -122, 47, 272,
992  77, 190, 183, 52, 158, 73, 312, 222, 78, 329,
993  316, 141, 317, 318, 218, 219, 204, 241, 243, 115,
994  245, 87, 151, 86, 293, 154, 194, 197, 117, 118,
995  311, 269, 57, 302, 303, 68, 71, 72, 336, 337,
996  228, 180, 229, 258, 142, 260, 310, 338, 93, 53,
997  54, 342, 55, 343, 232, 77, 233, 175, 176, 177,
998  69, 53, 54, 78, 55, 75, 296, 297, 349, 350,
999  195, 195, 100, 199, 289, 112, 291, 81, 82, 53,
1000  54, 249, 55, 102, 251, 123, 299, 295, 103, 81,
1001  82, 298, 109, 83, 110, 209, 111, 71, 72, 146,
1002  84, 300, 113, 206, 71, 72, 215, 81, 82, 136,
1003  85, 114, 84, 121, 231, 126, 239, 71, 72, 71,
1004  72, 246, 85, -118, -118, 53, 54, 250, 55, 124,
1005  84, 252, 240, 54, 137, 55, 135, 145, 282, 283,
1006  85, 284, 285, 225, 226, 234, 235, 150, 236, 154,
1007  153, 266, 155, 81, 170, 53, 54, 69, 55, 159,
1008  319, 320, 273, 321, 322, 161, 239, 278, 279, 239,
1009  162, 239, 2, 60, 53, 54, 263, 55, 164, 3,
1010  169, 4, 5, 173, 6, 7, 198, 8, 9, 10,
1011  11, 200, 12, 13, 14, 15, 16, 17, 305, 18,
1012  19, 202, 203, 20, 21, 22, 23, 24, 25, 213,
1013  224, 239, 26, 27, 227, 313, 314, 315, 248, 253,
1014  28, 29, 30, 325, 261, 31, 32, 33, 34, 35,
1015  262, 36, 37, 38, 275, 53, 54, 39, 55, 93,
1016  71, 72, 267, 268, 270, 335, 53, 192, 72, 55,
1017  271, 325, 339, 340, 341, 325, 274, 325, 294, 304,
1018  306, 345, 307, 308, 326, 327, 331, 333, 334, 344,
1019  346, 348, 325, 325, 81, 82, 347, 351, 196, 332,
1020  352, 156, 147, 353, 56, 354, 58, 59, 61, 63,
1021  64, 65, 66, 67, 256, 129, 143, 84, 309, 172,
1022  214, 0, 96, 97, 99, 0, 0, 85, 0, 105,
1023  106, 107, 108, 0, 0, 0, 0, 0, 0, 0,
1024  0, 0, 0, 0, 0, 97, 0, 0, 0, 0,
1025  0, 0, 0, 125, 0, 127, 128, 0, 0, 61,
1026  130, 131, 132, 133, 134, 0, 0, 0, 0, 0,
1027  0, 0, 0, 0, 0, 0, 0, 0, 144, 0,
1028  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1029  0, 0, 0, 157, 97, 0, 160, 0, 0, 0,
1030  163, 0, 165, 166, 167, 168, 0, 0, 0, 0,
1031  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1032  0, 0, 0, 0, 0, 181, 0, 0, 185, 186,
1033  187, 188, 0, 0, 0, 0, 0, 0, 0, 0,
1034  0, 201, 0, 0, 0, 0, 0, 0, 0, 0,
1035  0, 0, 0, 0, 207, 0, 0, 208, 0, 0,
1036  0, 0, 210, 211, 212, 0, 0, 0, 0, 0,
1037  0, 0, 0, 0, 0, 0, 0, 0, 230, 0,
1038  0, 0, 242, 0, 244, 0, 0, 0, 0, 0,
1039  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1040  0, 0, 0, 0, 254, 255, 0, 257, 0, 259,
1041  0, 0, 0, 0, 0, 264, 0, 0, 0, 1,
1042  0, 0, 2, 0, 0, 0, 264, 0, 0, 3,
1043  0, 4, 5, 0, 6, 7, 0, 8, 9, 10,
1044  11, 0, 12, 13, 14, 15, 16, 17, 0, 18,
1045  19, 0, 0, 20, 21, 22, 23, 24, 25, 0,
1046  264, 264, 26, 27, 0, 0, 0, 0, 0, 0,
1047  28, 29, 30, 264, 0, 31, 32, 33, 34, 35,
1048  0, 36, 37, 38, 116, 0, 0, 39, 0, 0,
1049  0, 3, 0, 4, 5, 0, 6, 7, 0, 8,
1050  9, 10, 11, 0, 12, 13, 14, 15, 16, 17,
1051  0, 18, 19, 0, 0, 20, 21, 22, 23, 24,
1052  25, 0, 0, 0, 26, 27, 0, 0, 0, 0,
1053  0, 0, 28, 29, 30, 0, 0, 31, 32, 33,
1054  34, 35, 0, 36, 37, 38, 0, 0, 0, 39
1055 };
1056 
1057 static const yytype_int16 yycheck[] =
1058 {
1059  18, 4, 7, 45, 45, 48, 91, 125, 25, 21,
1060  7, 21, 130, 154, 24, 6, 12, 243, 190, 245,
1061  7, 39, 7, 6, 86, 87, 29, 32, 1, 7,
1062  8, 49, 10, 174, 175, 234, 17, 7, 237, 6,
1063  239, 11, 8, 9, 25, 32, 12, 32, 7, 229,
1064  17, 48, 69, 6, 97, 73, 282, 175, 25, 50,
1065  286, 79, 288, 289, 69, 70, 151, 185, 186, 42,
1066  188, 83, 90, 83, 246, 93, 138, 139, 120, 120,
1067  279, 222, 20, 263, 264, 7, 8, 9, 314, 315,
1068  6, 69, 8, 211, 6, 213, 276, 319, 7, 7,
1069  8, 323, 10, 325, 6, 17, 8, 125, 126, 127,
1070  32, 7, 8, 25, 10, 51, 257, 258, 340, 341,
1071  138, 139, 6, 141, 242, 39, 244, 35, 36, 7,
1072  8, 193, 10, 57, 196, 49, 49, 255, 35, 35,
1073  36, 259, 6, 51, 6, 163, 6, 8, 9, 45,
1074  58, 64, 0, 156, 8, 9, 174, 35, 36, 73,
1075  68, 5, 58, 5, 182, 20, 184, 8, 9, 8,
1076  9, 189, 68, 8, 9, 7, 8, 195, 10, 6,
1077  58, 199, 7, 8, 6, 10, 32, 25, 49, 50,
1078  68, 52, 53, 177, 178, 49, 50, 6, 52, 217,
1079  6, 219, 6, 35, 14, 7, 8, 32, 10, 6,
1080  49, 50, 230, 52, 53, 6, 234, 235, 236, 237,
1081  6, 239, 6, 25, 7, 8, 9, 10, 6, 13,
1082  6, 15, 16, 6, 18, 19, 6, 21, 22, 23,
1083  24, 6, 26, 27, 28, 29, 30, 31, 266, 33,
1084  34, 6, 6, 37, 38, 39, 40, 41, 42, 25,
1085  6, 279, 46, 47, 6, 283, 284, 285, 6, 6,
1086  54, 55, 56, 291, 6, 59, 60, 61, 62, 63,
1087  6, 65, 66, 67, 25, 7, 8, 71, 10, 7,
1088  8, 9, 6, 6, 6, 313, 7, 8, 9, 10,
1089  6, 319, 320, 321, 322, 323, 6, 325, 43, 6,
1090  6, 329, 6, 6, 44, 6, 6, 6, 6, 6,
1091  6, 339, 340, 341, 35, 36, 6, 345, 139, 298,
1092  348, 95, 83, 351, 7, 353, 9, 10, 11, 12,
1093  13, 14, 15, 16, 209, 62, 80, 58, 275, 120,
1094  170, -1, 25, 26, 27, -1, -1, 68, -1, 32,
1095  33, 34, 35, -1, -1, -1, -1, -1, -1, -1,
1096  -1, -1, -1, -1, -1, 48, -1, -1, -1, -1,
1097  -1, -1, -1, 56, -1, 58, 59, -1, -1, 62,
1098  63, 64, 65, 66, 67, -1, -1, -1, -1, -1,
1099  -1, -1, -1, -1, -1, -1, -1, -1, 81, -1,
1100  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1101  -1, -1, -1, 96, 97, -1, 99, -1, -1, -1,
1102  103, -1, 105, 106, 107, 108, -1, -1, -1, -1,
1103  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1104  -1, -1, -1, -1, -1, 128, -1, -1, 131, 132,
1105  133, 134, -1, -1, -1, -1, -1, -1, -1, -1,
1106  -1, 144, -1, -1, -1, -1, -1, -1, -1, -1,
1107  -1, -1, -1, -1, 157, -1, -1, 160, -1, -1,
1108  -1, -1, 165, 166, 167, -1, -1, -1, -1, -1,
1109  -1, -1, -1, -1, -1, -1, -1, -1, 181, -1,
1110  -1, -1, 185, -1, 187, -1, -1, -1, -1, -1,
1111  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1112  -1, -1, -1, -1, 207, 208, -1, 210, -1, 212,
1113  -1, -1, -1, -1, -1, 218, -1, -1, -1, 3,
1114  -1, -1, 6, -1, -1, -1, 229, -1, -1, 13,
1115  -1, 15, 16, -1, 18, 19, -1, 21, 22, 23,
1116  24, -1, 26, 27, 28, 29, 30, 31, -1, 33,
1117  34, -1, -1, 37, 38, 39, 40, 41, 42, -1,
1118  263, 264, 46, 47, -1, -1, -1, -1, -1, -1,
1119  54, 55, 56, 276, -1, 59, 60, 61, 62, 63,
1120  -1, 65, 66, 67, 6, -1, -1, 71, -1, -1,
1121  -1, 13, -1, 15, 16, -1, 18, 19, -1, 21,
1122  22, 23, 24, -1, 26, 27, 28, 29, 30, 31,
1123  -1, 33, 34, -1, -1, 37, 38, 39, 40, 41,
1124  42, -1, -1, -1, 46, 47, -1, -1, -1, -1,
1125  -1, -1, 54, 55, 56, -1, -1, 59, 60, 61,
1126  62, 63, -1, 65, 66, 67, -1, -1, -1, 71
1127 };
1128 
1129 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1130  symbol of state STATE-NUM. */
1131 static const yytype_uint8 yystos[] =
1132 {
1133  0, 3, 6, 13, 15, 16, 18, 19, 21, 22,
1134  23, 24, 26, 27, 28, 29, 30, 31, 33, 34,
1135  37, 38, 39, 40, 41, 42, 46, 47, 54, 55,
1136  56, 59, 60, 61, 62, 63, 65, 66, 67, 71,
1137  73, 74, 75, 76, 108, 109, 74, 7, 111, 12,
1138  106, 6, 6, 7, 8, 10, 99, 20, 99, 99,
1139  25, 99, 100, 99, 99, 99, 99, 99, 7, 32,
1140  96, 8, 9, 98, 102, 51, 6, 17, 25, 85,
1141  97, 35, 36, 51, 58, 68, 84, 86, 89, 99,
1142  7, 11, 90, 7, 101, 84, 99, 99, 104, 99,
1143  6, 106, 57, 35, 92, 99, 99, 99, 99, 6,
1144  6, 6, 102, 0, 5, 74, 6, 76, 108, 110,
1145  113, 5, 104, 102, 6, 99, 20, 99, 99, 100,
1146  99, 99, 99, 99, 99, 32, 102, 6, 84, 86,
1147  87, 98, 6, 97, 99, 25, 45, 89, 87, 87,
1148  6, 98, 90, 6, 98, 6, 85, 99, 104, 6,
1149  99, 6, 6, 99, 6, 99, 99, 99, 99, 6,
1150  14, 112, 110, 6, 96, 98, 98, 98, 106, 107,
1151  69, 99, 25, 69, 96, 99, 99, 99, 99, 7,
1152  48, 91, 8, 83, 87, 98, 83, 87, 6, 98,
1153  6, 99, 6, 6, 90, 101, 106, 99, 99, 98,
1154  99, 99, 99, 25, 111, 98, 101, 7, 69, 70,
1155  77, 78, 96, 101, 6, 107, 107, 6, 6, 8,
1156  99, 98, 6, 8, 49, 50, 52, 79, 93, 98,
1157  7, 96, 99, 96, 99, 96, 98, 91, 6, 87,
1158  98, 87, 98, 6, 99, 99, 92, 99, 96, 99,
1159  96, 6, 6, 9, 99, 103, 98, 6, 6, 101,
1160  6, 6, 103, 98, 6, 25, 105, 93, 98, 98,
1161  93, 93, 49, 50, 52, 53, 80, 94, 98, 96,
1162  94, 96, 94, 91, 43, 96, 101, 101, 96, 49,
1163  64, 88, 103, 103, 6, 98, 6, 6, 6, 105,
1164  103, 93, 94, 98, 98, 98, 94, 94, 94, 49,
1165  50, 52, 53, 81, 95, 98, 44, 6, 6, 50,
1166  82, 6, 88, 6, 6, 98, 94, 94, 95, 98,
1167  98, 98, 95, 95, 6, 98, 6, 6, 98, 95,
1168  95, 98, 98, 98, 98
1169 };
1170 
1171 #define yyerrok (yyerrstatus = 0)
1172 #define yyclearin (yychar = YYEMPTY)
1173 #define YYEMPTY (-2)
1174 #define YYEOF 0
1175 
1176 #define YYACCEPT goto yyacceptlab
1177 #define YYABORT goto yyabortlab
1178 #define YYERROR goto yyerrorlab
1179 
1180 
1181 /* Like YYERROR except do call yyerror. This remains here temporarily
1182  to ease the transition to the new meaning of YYERROR, for GCC.
1183  Once GCC version 2 has supplanted version 1, this can go. */
1184 
1185 #define YYFAIL goto yyerrlab
1186 
1187 #define YYRECOVERING() (!!yyerrstatus)
1188 
1189 #define YYBACKUP(Token, Value) \
1190 do \
1191  if (yychar == YYEMPTY && yylen == 1) \
1192  { \
1193  yychar = (Token); \
1194  yylval = (Value); \
1195  yytoken = YYTRANSLATE (yychar); \
1196  YYPOPSTACK (1); \
1197  goto yybackup; \
1198  } \
1199  else \
1200  { \
1201  yyerror (YY_("syntax error: cannot back up")); \
1202  YYERROR; \
1203  } \
1204 while (YYID (0))
1205 
1206 
1207 #define YYTERROR 1
1208 #define YYERRCODE 256
1209 
1210 
1211 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1212  If N is 0, then set CURRENT to the empty location which ends
1213  the previous symbol: RHS[0] (always defined). */
1214 
1215 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1216 #ifndef YYLLOC_DEFAULT
1217 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1218  do \
1219  if (YYID (N)) \
1220  { \
1221  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1222  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1223  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1224  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1225  } \
1226  else \
1227  { \
1228  (Current).first_line = (Current).last_line = \
1229  YYRHSLOC (Rhs, 0).last_line; \
1230  (Current).first_column = (Current).last_column = \
1231  YYRHSLOC (Rhs, 0).last_column; \
1232  } \
1233  while (YYID (0))
1234 #endif
1235 
1236 
1237 /* YY_LOCATION_PRINT -- Print the location on the stream.
1238  This macro was not mandated originally: define only if we know
1239  we won't break user code: when these are the locations we know. */
1240 
1241 #ifndef YY_LOCATION_PRINT
1242 # if YYLTYPE_IS_TRIVIAL
1243 # define YY_LOCATION_PRINT(File, Loc) \
1244  fprintf (File, "%d.%d-%d.%d", \
1245  (Loc).first_line, (Loc).first_column, \
1246  (Loc).last_line, (Loc).last_column)
1247 # else
1248 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1249 # endif
1250 #endif
1251 
1252 
1253 /* YYLEX -- calling `yylex' with the right arguments. */
1254 
1255 #ifdef YYLEX_PARAM
1256 # define YYLEX yylex (YYLEX_PARAM)
1257 #else
1258 # define YYLEX yylex ()
1259 #endif
1260 
1261 /* Enable debugging if requested. */
1262 #if YYDEBUG
1263 
1264 # ifndef YYFPRINTF
1265 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1266 # define YYFPRINTF fprintf
1267 # endif
1268 
1269 # define YYDPRINTF(Args) \
1270 do { \
1271  if (yydebug) \
1272  YYFPRINTF Args; \
1273 } while (YYID (0))
1274 
1275 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1276 do { \
1277  if (yydebug) \
1278  { \
1279  YYFPRINTF (stderr, "%s ", Title); \
1280  yy_symbol_print (stderr, \
1281  Type, Value); \
1282  YYFPRINTF (stderr, "\n"); \
1283  } \
1284 } while (YYID (0))
1285 
1286 
1287 /*--------------------------------.
1288 | Print this symbol on YYOUTPUT. |
1289 `--------------------------------*/
1290 
1291 /*ARGSUSED*/
1292 #if (defined __STDC__ || defined __C99__FUNC__ \
1293  || defined __cplusplus || defined _MSC_VER)
1294 static void
1295 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1296 #else
1297 static void
1298 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1299  FILE *yyoutput;
1300  int yytype;
1301  YYSTYPE const * const yyvaluep;
1302 #endif
1303 {
1304  if (!yyvaluep)
1305  return;
1306 # ifdef YYPRINT
1307  if (yytype < YYNTOKENS)
1308  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1309 # else
1310  YYUSE (yyoutput);
1311 # endif
1312  switch (yytype)
1313  {
1314  default:
1315  break;
1316  }
1317 }
1318 
1319 
1320 /*--------------------------------.
1321 | Print this symbol on YYOUTPUT. |
1322 `--------------------------------*/
1323 
1324 #if (defined __STDC__ || defined __C99__FUNC__ \
1325  || defined __cplusplus || defined _MSC_VER)
1326 static void
1327 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1328 #else
1329 static void
1330 yy_symbol_print (yyoutput, yytype, yyvaluep)
1331  FILE *yyoutput;
1332  int yytype;
1333  YYSTYPE const * const yyvaluep;
1334 #endif
1335 {
1336  if (yytype < YYNTOKENS)
1337  YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1338  else
1339  YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1340 
1341  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1342  YYFPRINTF (yyoutput, ")");
1343 }
1344 
1345 /*------------------------------------------------------------------.
1346 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1347 | TOP (included). |
1348 `------------------------------------------------------------------*/
1349 
1350 #if (defined __STDC__ || defined __C99__FUNC__ \
1351  || defined __cplusplus || defined _MSC_VER)
1352 static void
1353 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1354 #else
1355 static void
1356 yy_stack_print (yybottom, yytop)
1357  yytype_int16 *yybottom;
1358  yytype_int16 *yytop;
1359 #endif
1360 {
1361  YYFPRINTF (stderr, "Stack now");
1362  for (; yybottom <= yytop; yybottom++)
1363  {
1364  int yybot = *yybottom;
1365  YYFPRINTF (stderr, " %d", yybot);
1366  }
1367  YYFPRINTF (stderr, "\n");
1368 }
1369 
1370 # define YY_STACK_PRINT(Bottom, Top) \
1371 do { \
1372  if (yydebug) \
1373  yy_stack_print ((Bottom), (Top)); \
1374 } while (YYID (0))
1375 
1376 
1377 /*------------------------------------------------.
1378 | Report that the YYRULE is going to be reduced. |
1379 `------------------------------------------------*/
1380 
1381 #if (defined __STDC__ || defined __C99__FUNC__ \
1382  || defined __cplusplus || defined _MSC_VER)
1383 static void
1384 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1385 #else
1386 static void
1387 yy_reduce_print (yyvsp, yyrule)
1388  YYSTYPE *yyvsp;
1389  int yyrule;
1390 #endif
1392  int yynrhs = yyr2[yyrule];
1393  int yyi;
1394  unsigned long int yylno = yyrline[yyrule];
1395  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1396  yyrule - 1, yylno);
1397  /* The symbols being reduced. */
1398  for (yyi = 0; yyi < yynrhs; yyi++)
1399  {
1400  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1401  yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1402  &(yyvsp[(yyi + 1) - (yynrhs)])
1403  );
1404  YYFPRINTF (stderr, "\n");
1405  }
1406 }
1407 
1408 # define YY_REDUCE_PRINT(Rule) \
1409 do { \
1410  if (yydebug) \
1411  yy_reduce_print (yyvsp, Rule); \
1412 } while (YYID (0))
1413 
1414 /* Nonzero means print parse trace. It is left uninitialized so that
1415  multiple parsers can coexist. */
1417 #else /* !YYDEBUG */
1418 # define YYDPRINTF(Args)
1419 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1420 # define YY_STACK_PRINT(Bottom, Top)
1421 # define YY_REDUCE_PRINT(Rule)
1422 #endif /* !YYDEBUG */
1423 
1424 
1425 /* YYINITDEPTH -- initial size of the parser's stacks. */
1426 #ifndef YYINITDEPTH
1427 # define YYINITDEPTH 200
1428 #endif
1429 
1430 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1431  if the built-in stack extension method is used).
1432 
1433  Do not make this value too large; the results are undefined if
1434  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1435  evaluated with infinite-precision integer arithmetic. */
1436 
1437 #ifndef YYMAXDEPTH
1438 # define YYMAXDEPTH 10000
1439 #endif
1440 
1441 
1442 
1443 #if YYERROR_VERBOSE
1444 
1445 # ifndef yystrlen
1446 # if defined __GLIBC__ && defined _STRING_H
1447 # define yystrlen strlen
1448 # else
1449 /* Return the length of YYSTR. */
1450 #if (defined __STDC__ || defined __C99__FUNC__ \
1451  || defined __cplusplus || defined _MSC_VER)
1452 static YYSIZE_T
1453 yystrlen (const char *yystr)
1454 #else
1455 static YYSIZE_T
1456 yystrlen (yystr)
1457  const char *yystr;
1458 #endif
1459 {
1460  YYSIZE_T yylen;
1461  for (yylen = 0; yystr[yylen]; yylen++)
1462  continue;
1463  return yylen;
1464 }
1465 # endif
1466 # endif
1467 
1468 # ifndef yystpcpy
1469 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1470 # define yystpcpy stpcpy
1471 # else
1472 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1473  YYDEST. */
1474 #if (defined __STDC__ || defined __C99__FUNC__ \
1475  || defined __cplusplus || defined _MSC_VER)
1476 static char *
1477 yystpcpy (char *yydest, const char *yysrc)
1478 #else
1479 static char *
1480 yystpcpy (yydest, yysrc)
1481  char *yydest;
1482  const char *yysrc;
1483 #endif
1484 {
1485  char *yyd = yydest;
1486  const char *yys = yysrc;
1487 
1488  while ((*yyd++ = *yys++) != '\0')
1489  continue;
1490 
1491  return yyd - 1;
1492 }
1493 # endif
1494 # endif
1495 
1496 # ifndef yytnamerr
1497 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1498  quotes and backslashes, so that it's suitable for yyerror. The
1499  heuristic is that double-quoting is unnecessary unless the string
1500  contains an apostrophe, a comma, or backslash (other than
1501  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1502  null, do not copy; instead, return the length of what the result
1503  would have been. */
1504 static YYSIZE_T
1505 yytnamerr (char *yyres, const char *yystr)
1506 {
1507  if (*yystr == '"')
1508  {
1509  YYSIZE_T yyn = 0;
1510  char const *yyp = yystr;
1511 
1512  for (;;)
1513  switch (*++yyp)
1514  {
1515  case '\'':
1516  case ',':
1517  goto do_not_strip_quotes;
1518 
1519  case '\\':
1520  if (*++yyp != '\\')
1521  goto do_not_strip_quotes;
1522  /* Fall through. */
1523  default:
1524  if (yyres)
1525  yyres[yyn] = *yyp;
1526  yyn++;
1527  break;
1528 
1529  case '"':
1530  if (yyres)
1531  yyres[yyn] = '\0';
1532  return yyn;
1533  }
1534  do_not_strip_quotes: ;
1535  }
1536 
1537  if (! yyres)
1538  return yystrlen (yystr);
1539 
1540  return yystpcpy (yyres, yystr) - yyres;
1541 }
1542 # endif
1543 
1544 /* Copy into YYRESULT an error message about the unexpected token
1545  YYCHAR while in state YYSTATE. Return the number of bytes copied,
1546  including the terminating null byte. If YYRESULT is null, do not
1547  copy anything; just return the number of bytes that would be
1548  copied. As a special case, return 0 if an ordinary "syntax error"
1549  message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1550  size calculation. */
1551 static YYSIZE_T
1552 yysyntax_error (char *yyresult, int yystate, int yychar)
1553 {
1554  int yyn = yypact[yystate];
1555 
1556  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1557  return 0;
1558  else
1559  {
1560  int yytype = YYTRANSLATE (yychar);
1561  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1562  YYSIZE_T yysize = yysize0;
1563  YYSIZE_T yysize1;
1564  int yysize_overflow = 0;
1565  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1566  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1567  int yyx;
1568 
1569 # if 0
1570  /* This is so xgettext sees the translatable formats that are
1571  constructed on the fly. */
1572  YY_("syntax error, unexpected %s");
1573  YY_("syntax error, unexpected %s, expecting %s");
1574  YY_("syntax error, unexpected %s, expecting %s or %s");
1575  YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1576  YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1577 # endif
1578  char *yyfmt;
1579  char const *yyf;
1580  static char const yyunexpected[] = "syntax error, unexpected %s";
1581  static char const yyexpecting[] = ", expecting %s";
1582  static char const yyor[] = " or %s";
1583  char yyformat[sizeof yyunexpected
1584  + sizeof yyexpecting - 1
1585  + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1586  * (sizeof yyor - 1))];
1587  char const *yyprefix = yyexpecting;
1588 
1589  /* Start YYX at -YYN if negative to avoid negative indexes in
1590  YYCHECK. */
1591  int yyxbegin = yyn < 0 ? -yyn : 0;
1592 
1593  /* Stay within bounds of both yycheck and yytname. */
1594  int yychecklim = YYLAST - yyn + 1;
1595  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1596  int yycount = 1;
1597 
1598  yyarg[0] = yytname[yytype];
1599  yyfmt = yystpcpy (yyformat, yyunexpected);
1600 
1601  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1602  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1603  {
1604  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1605  {
1606  yycount = 1;
1607  yysize = yysize0;
1608  yyformat[sizeof yyunexpected - 1] = '\0';
1609  break;
1610  }
1611  yyarg[yycount++] = yytname[yyx];
1612  yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1613  yysize_overflow |= (yysize1 < yysize);
1614  yysize = yysize1;
1615  yyfmt = yystpcpy (yyfmt, yyprefix);
1616  yyprefix = yyor;
1617  }
1618 
1619  yyf = YY_(yyformat);
1620  yysize1 = yysize + yystrlen (yyf);
1621  yysize_overflow |= (yysize1 < yysize);
1622  yysize = yysize1;
1623 
1624  if (yysize_overflow)
1625  return YYSIZE_MAXIMUM;
1626 
1627  if (yyresult)
1628  {
1629  /* Avoid sprintf, as that infringes on the user's name space.
1630  Don't have undefined behavior even if the translation
1631  produced a string with the wrong number of "%s"s. */
1632  char *yyp = yyresult;
1633  int yyi = 0;
1634  while ((*yyp = *yyf) != '\0')
1635  {
1636  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1637  {
1638  yyp += yytnamerr (yyp, yyarg[yyi++]);
1639  yyf += 2;
1640  }
1641  else
1642  {
1643  yyp++;
1644  yyf++;
1645  }
1646  }
1647  }
1648  return yysize;
1649  }
1650 }
1651 #endif /* YYERROR_VERBOSE */
1652 
1653 
1654 /*-----------------------------------------------.
1655 | Release the memory associated to this symbol. |
1656 `-----------------------------------------------*/
1657 
1658 /*ARGSUSED*/
1659 #if (defined __STDC__ || defined __C99__FUNC__ \
1660  || defined __cplusplus || defined _MSC_VER)
1661 static void
1662 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1663 #else
1664 static void
1665 yydestruct (yymsg, yytype, yyvaluep)
1666  const char *yymsg;
1667  int yytype;
1668  YYSTYPE *yyvaluep;
1669 #endif
1670 {
1671  YYUSE (yyvaluep);
1672 
1673  if (!yymsg)
1674  yymsg = "Deleting";
1675  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1676 
1677  switch (yytype)
1678  {
1679 
1680  default:
1681  break;
1682  }
1683 }
1684 
1685 /* Prevent warnings from -Wmissing-prototypes. */
1686 #ifdef YYPARSE_PARAM
1687 #if defined __STDC__ || defined __cplusplus
1688 int yyparse (void *YYPARSE_PARAM);
1689 #else
1690 int yyparse ();
1691 #endif
1692 #else /* ! YYPARSE_PARAM */
1693 #if defined __STDC__ || defined __cplusplus
1694 int yyparse (void);
1695 #else
1696 int yyparse ();
1697 #endif
1698 #endif /* ! YYPARSE_PARAM */
1699 
1700 
1701 /* The lookahead symbol. */
1703 
1704 /* The semantic value of the lookahead symbol. */
1706 
1707 /* Number of syntax errors so far. */
1709 
1710 
1711 
1712 /*-------------------------.
1713 | yyparse or yypush_parse. |
1714 `-------------------------*/
1715 
1716 #ifdef YYPARSE_PARAM
1717 #if (defined __STDC__ || defined __C99__FUNC__ \
1718  || defined __cplusplus || defined _MSC_VER)
1719 int
1720 yyparse (void *YYPARSE_PARAM)
1721 #else
1722 int
1723 yyparse (YYPARSE_PARAM)
1724  void *YYPARSE_PARAM;
1725 #endif
1726 #else /* ! YYPARSE_PARAM */
1727 #if (defined __STDC__ || defined __C99__FUNC__ \
1728  || defined __cplusplus || defined _MSC_VER)
1729 int
1730 yyparse (void)
1731 #else
1732 int
1733 yyparse ()
1734 
1735 #endif
1736 #endif
1737 {
1738 
1739 
1740  int yystate;
1741  /* Number of tokens to shift before error messages enabled. */
1742  int yyerrstatus;
1743 
1744  /* The stacks and their tools:
1745  `yyss': related to states.
1746  `yyvs': related to semantic values.
1747 
1748  Refer to the stacks thru separate pointers, to allow yyoverflow
1749  to reallocate them elsewhere. */
1750 
1751  /* The state stack. */
1752  yytype_int16 yyssa[YYINITDEPTH];
1753  yytype_int16 *yyss;
1754  yytype_int16 *yyssp;
1755 
1756  /* The semantic value stack. */
1757  YYSTYPE yyvsa[YYINITDEPTH];
1758  YYSTYPE *yyvs;
1759  YYSTYPE *yyvsp;
1760 
1761  YYSIZE_T yystacksize;
1762 
1763  int yyn;
1764  int yyresult;
1765  /* Lookahead token as an internal (translated) token number. */
1766  int yytoken;
1767  /* The variables used to return semantic value and location from the
1768  action routines. */
1769  YYSTYPE yyval;
1770 
1771 #if YYERROR_VERBOSE
1772  /* Buffer for error messages, and its allocated size. */
1773  char yymsgbuf[128];
1774  char *yymsg = yymsgbuf;
1775  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1776 #endif
1777 
1778 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1779 
1780  /* The number of symbols on the RHS of the reduced rule.
1781  Keep to zero when no symbol should be popped. */
1782  int yylen = 0;
1783 
1784  yytoken = 0;
1785  yyss = yyssa;
1786  yyvs = yyvsa;
1787  yystacksize = YYINITDEPTH;
1788 
1789  YYDPRINTF ((stderr, "Starting parse\n"));
1790 
1791  yystate = 0;
1792  yyerrstatus = 0;
1793  yynerrs = 0;
1794  yychar = YYEMPTY; /* Cause a token to be read. */
1795 
1796  /* Initialize stack pointers.
1797  Waste one element of value and location stack
1798  so that they stay on the same level as the state stack.
1799  The wasted elements are never initialized. */
1800  yyssp = yyss;
1801  yyvsp = yyvs;
1802 
1803  goto yysetstate;
1804 
1805 /*------------------------------------------------------------.
1806 | yynewstate -- Push a new state, which is found in yystate. |
1807 `------------------------------------------------------------*/
1808  yynewstate:
1809  /* In all cases, when you get here, the value and location stacks
1810  have just been pushed. So pushing a state here evens the stacks. */
1811  yyssp++;
1812 
1813  yysetstate:
1814  *yyssp = yystate;
1815 
1816  if (yyss + yystacksize - 1 <= yyssp)
1817  {
1818  /* Get the current used size of the three stacks, in elements. */
1819  YYSIZE_T yysize = yyssp - yyss + 1;
1820 
1821 #ifdef yyoverflow
1822  {
1823  /* Give user a chance to reallocate the stack. Use copies of
1824  these so that the &'s don't force the real ones into
1825  memory. */
1826  YYSTYPE *yyvs1 = yyvs;
1827  yytype_int16 *yyss1 = yyss;
1828 
1829  /* Each stack pointer address is followed by the size of the
1830  data in use in that stack, in bytes. This used to be a
1831  conditional around just the two extra args, but that might
1832  be undefined if yyoverflow is a macro. */
1833  yyoverflow (YY_("memory exhausted"),
1834  &yyss1, yysize * sizeof (*yyssp),
1835  &yyvs1, yysize * sizeof (*yyvsp),
1836  &yystacksize);
1837 
1838  yyss = yyss1;
1839  yyvs = yyvs1;
1840  }
1841 #else /* no yyoverflow */
1842 # ifndef YYSTACK_RELOCATE
1843  goto yyexhaustedlab;
1844 # else
1845  /* Extend the stack our own way. */
1846  if (YYMAXDEPTH <= yystacksize)
1847  goto yyexhaustedlab;
1848  yystacksize *= 2;
1849  if (YYMAXDEPTH < yystacksize)
1850  yystacksize = YYMAXDEPTH;
1851 
1852  {
1853  yytype_int16 *yyss1 = yyss;
1854  union yyalloc *yyptr =
1855  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1856  if (! yyptr)
1857  goto yyexhaustedlab;
1858  YYSTACK_RELOCATE (yyss_alloc, yyss);
1859  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1860 # undef YYSTACK_RELOCATE
1861  if (yyss1 != yyssa)
1862  YYSTACK_FREE (yyss1);
1863  }
1864 # endif
1865 #endif /* no yyoverflow */
1866 
1867  yyssp = yyss + yysize - 1;
1868  yyvsp = yyvs + yysize - 1;
1869 
1870  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1871  (unsigned long int) yystacksize));
1872 
1873  if (yyss + yystacksize - 1 <= yyssp)
1874  YYABORT;
1875  }
1876 
1877  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1878 
1879  if (yystate == YYFINAL)
1880  YYACCEPT;
1881 
1882  goto yybackup;
1883 
1884 /*-----------.
1885 | yybackup. |
1886 `-----------*/
1887 yybackup:
1888 
1889  /* Do appropriate processing given the current state. Read a
1890  lookahead token if we need one and don't already have one. */
1891 
1892  /* First try to decide what to do without reference to lookahead token. */
1893  yyn = yypact[yystate];
1894  if (yyn == YYPACT_NINF)
1895  goto yydefault;
1896 
1897  /* Not known => get a lookahead token if don't already have one. */
1898 
1899  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1900  if (yychar == YYEMPTY)
1901  {
1902  YYDPRINTF ((stderr, "Reading a token: "));
1903  yychar = YYLEX;
1904  }
1905 
1906  if (yychar <= YYEOF)
1907  {
1908  yychar = yytoken = YYEOF;
1909  YYDPRINTF ((stderr, "Now at end of input.\n"));
1910  }
1911  else
1912  {
1913  yytoken = YYTRANSLATE (yychar);
1914  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1915  }
1916 
1917  /* If the proper action on seeing token YYTOKEN is to reduce or to
1918  detect an error, take that action. */
1919  yyn += yytoken;
1920  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1921  goto yydefault;
1922  yyn = yytable[yyn];
1923  if (yyn <= 0)
1924  {
1925  if (yyn == 0 || yyn == YYTABLE_NINF)
1926  goto yyerrlab;
1927  yyn = -yyn;
1928  goto yyreduce;
1929  }
1930 
1931  /* Count tokens shifted since error; after three, turn off error
1932  status. */
1933  if (yyerrstatus)
1934  yyerrstatus--;
1935 
1936  /* Shift the lookahead token. */
1937  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1938 
1939  /* Discard the shifted token. */
1940  yychar = YYEMPTY;
1941 
1942  yystate = yyn;
1943  *++yyvsp = yylval;
1944 
1945  goto yynewstate;
1946 
1947 
1948 /*-----------------------------------------------------------.
1949 | yydefault -- do the default action for the current state. |
1950 `-----------------------------------------------------------*/
1951 yydefault:
1952  yyn = yydefact[yystate];
1953  if (yyn == 0)
1954  goto yyerrlab;
1955  goto yyreduce;
1956 
1957 
1958 /*-----------------------------.
1959 | yyreduce -- Do a reduction. |
1960 `-----------------------------*/
1961 yyreduce:
1962  /* yyn is the number of a rule to reduce with. */
1963  yylen = yyr2[yyn];
1964 
1965  /* If YYLEN is nonzero, implement the default value of the action:
1966  `$$ = $1'.
1967 
1968  Otherwise, the following line sets YYVAL to garbage.
1969  This behavior is undocumented and Bison
1970  users should not rely upon it. Assigning to YYVAL
1971  unconditionally makes the parser a bit smaller, and it avoids a
1972  GCC warning that YYVAL may be used uninitialized. */
1973  yyval = yyvsp[1-yylen];
1974 
1975 
1976  YY_REDUCE_PRINT (yyn);
1977  switch (yyn)
1978  {
1979  case 2:
1980 
1981 /* Line 1455 of yacc.c */
1982 #line 182 "parse_spice.y"
1983  {
1984  }
1985  break;
1986 
1987  case 3:
1988 
1989 /* Line 1455 of yacc.c */
1990 #line 184 "parse_spice.y"
1991  {
1992  spice_title = (yyvsp[(1) - (3)].str);
1993  }
1994  break;
1995 
1996  case 4:
1997 
1998 /* Line 1455 of yacc.c */
1999 #line 187 "parse_spice.y"
2000  {
2001  fprintf (stderr, "spice notice, no .END directive found, continuing\n");
2002  }
2003  break;
2004 
2005  case 5:
2006 
2007 /* Line 1455 of yacc.c */
2008 #line 190 "parse_spice.y"
2009  {
2010  spice_title = (yyvsp[(1) - (2)].str);
2011  fprintf (stderr, "spice notice, no .END directive found, continuing\n");
2012  }
2013  break;
2014 
2015  case 8:
2016 
2017 /* Line 1455 of yacc.c */
2018 #line 201 "parse_spice.y"
2019  {
2020  /* chain definition root */
2021  (yyvsp[(1) - (1)].definition)->next = definition_root;
2022  definition_root = (yyvsp[(1) - (1)].definition);
2023  }
2024  break;
2025 
2026  case 9:
2027 
2028 /* Line 1455 of yacc.c */
2029 #line 206 "parse_spice.y"
2030  {
2031  /* chain definition root */
2032  if ((yyvsp[(1) - (1)].definition)) {
2033  (yyvsp[(1) - (1)].definition)->next = definition_root;
2034  definition_root = (yyvsp[(1) - (1)].definition);
2035  }
2036  }
2037  break;
2038 
2039  case 10:
2040 
2041 /* Line 1455 of yacc.c */
2042 #line 213 "parse_spice.y"
2043  { /* nothing to do here */ }
2044  break;
2045 
2046  case 11:
2047 
2048 /* Line 1455 of yacc.c */
2049 #line 217 "parse_spice.y"
2050  {
2051  /* R, L and C definitions */
2052  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2053  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2054  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2055  spice_append_val_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NUMBER);
2056  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(5) - (6)].value));
2057  }
2058  break;
2059 
2060  case 12:
2061 
2062 /* Line 1455 of yacc.c */
2063 #line 225 "parse_spice.y"
2064  {
2065  /* R, L and C definitions specified by a Model */
2066  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2067  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2068  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2069  spice_append_val_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NUMBER);
2070  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NAME);
2071  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (7)].value));
2072  }
2073  break;
2074 
2075  case 13:
2076 
2077 /* Line 1455 of yacc.c */
2078 #line 234 "parse_spice.y"
2079  {
2080  /* R, L and C definitions specified by a Model, a variant */
2081  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2082  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2083  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2084  spice_append_val_value ((yyval.definition), (yyvsp[(5) - (6)].ident), HINT_NUMBER);
2085  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NAME);
2086  }
2087  break;
2088 
2089  case 14:
2090 
2091 /* Line 1455 of yacc.c */
2092 #line 242 "parse_spice.y"
2093  {
2094  /* R definitions specified by a Model, yet another variant */
2095  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2096  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2097  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2098  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NAME);
2099  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(5) - (6)].value));
2100  }
2101  break;
2102 
2103  case 15:
2104 
2105 /* Line 1455 of yacc.c */
2106 #line 250 "parse_spice.y"
2107  {
2108  /* R definitions including TC1 */
2109  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2110  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2111  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2112  spice_append_val_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NUMBER);
2113  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(5) - (6)].value));
2114  }
2115  break;
2116 
2117  case 16:
2118 
2119 /* Line 1455 of yacc.c */
2120 #line 258 "parse_spice.y"
2121  {
2122  /* R definitions including TC1/TC2 */
2123  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2124  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2125  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2126  spice_append_val_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NUMBER);
2127  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(5) - (6)].value));
2128  }
2129  break;
2130 
2131  case 17:
2132 
2133 /* Line 1455 of yacc.c */
2134 #line 266 "parse_spice.y"
2135  {
2136  /* non-linear C and L poly definitions */
2137  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2138  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2139  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2140  spice_append_val_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NUMBER);
2141  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NAME);
2142  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (7)].value));
2143  }
2144  break;
2145 
2146  case 18:
2147 
2148 /* Line 1455 of yacc.c */
2149 #line 275 "parse_spice.y"
2150  {
2151  /* Mutual inductors */
2152  (yyval.definition) = spice_create_device ((yyvsp[(1) - (5)].ident));
2153  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (5)].ident), HINT_NAME);
2154  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (5)].ident), HINT_NAME);
2155  spice_append_val_value ((yyval.definition), (yyvsp[(4) - (5)].ident), HINT_NUMBER);
2156  }
2157  break;
2158 
2159  case 19:
2160 
2161 /* Line 1455 of yacc.c */
2162 #line 282 "parse_spice.y"
2163  {
2164  /* independent current/voltage sources */
2165  (yyval.definition) = spice_create_device ((yyvsp[(1) - (5)].ident));
2166  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (5)].ident), HINT_NODE);
2167  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (5)].ident), HINT_NODE);
2168  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(4) - (5)].value));
2169  }
2170  break;
2171 
2172  case 20:
2173 
2174 /* Line 1455 of yacc.c */
2175 #line 289 "parse_spice.y"
2176  {
2177  /* independent current/voltage sources given the value */
2178  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2179  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2180  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2181  spice_append_val_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NUMBER);
2182  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(5) - (6)].value));
2183  }
2184  break;
2185 
2186  case 21:
2187 
2188 /* Line 1455 of yacc.c */
2189 #line 297 "parse_spice.y"
2190  {
2191  /* voltage controlled source POLY */
2192  if (!strcasecmp ((yyvsp[(4) - (7)].ident), "POLY")) {
2193  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2194  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2195  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2196  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NAME);
2197  spice_append_val_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NUMBER);
2198  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (7)].value));
2199  }
2200  else {
2201  fprintf (stderr, "spice notice, behavioural %s source ignored\n", (yyvsp[(1) - (7)].ident));
2202  (yyval.definition) = NULL;
2203  }
2204  }
2205  break;
2206 
2207  case 22:
2208 
2209 /* Line 1455 of yacc.c */
2210 #line 312 "parse_spice.y"
2211  {
2212  /* voltage controlled sources OTHER behavioural */
2213  fprintf (stderr, "spice notice, behavioural %s source ignored\n", (yyvsp[(1) - (5)].ident));
2214  (yyval.definition) = NULL;
2215  }
2216  break;
2217 
2218  case 23:
2219 
2220 /* Line 1455 of yacc.c */
2221 #line 317 "parse_spice.y"
2222  {
2223  /* voltage controlled sources */
2224  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2225  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2226  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2227  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NODE);
2228  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NODE);
2229  spice_append_val_value ((yyval.definition), (yyvsp[(6) - (7)].ident), HINT_NUMBER);
2230  }
2231  break;
2232 
2233  case 24:
2234 
2235 /* Line 1455 of yacc.c */
2236 #line 326 "parse_spice.y"
2237  {
2238  /* current controlled source POLY */
2239  if (!strcasecmp ((yyvsp[(4) - (8)].ident), "POLY")) {
2240  (yyval.definition) = spice_create_device ((yyvsp[(1) - (8)].ident));
2241  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (8)].ident), HINT_NODE);
2242  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (8)].ident), HINT_NODE);
2243  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (8)].ident), HINT_NAME);
2244  spice_append_val_value ((yyval.definition), (yyvsp[(5) - (8)].ident), HINT_NUMBER);
2245  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (8)].value));
2246  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(7) - (8)].value));
2247  }
2248  else {
2249  fprintf (stderr, "spice notice, behavioural %s source ignored\n", (yyvsp[(1) - (8)].ident));
2250  (yyval.definition) = NULL;
2251  }
2252  }
2253  break;
2254 
2255  case 25:
2256 
2257 /* Line 1455 of yacc.c */
2258 #line 342 "parse_spice.y"
2259  {
2260  /* current controlled sources OTHER behavioural */
2261  fprintf (stderr, "spice notice, behavioural %s source ignored\n", (yyvsp[(1) - (5)].ident));
2262  (yyval.definition) = NULL;
2263  }
2264  break;
2265 
2266  case 26:
2267 
2268 /* Line 1455 of yacc.c */
2269 #line 347 "parse_spice.y"
2270  {
2271  /* current controlled sources */
2272  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2273  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2274  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2275  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NAME);
2276  spice_append_val_value ((yyval.definition), (yyvsp[(5) - (6)].ident), HINT_NUMBER);
2277  }
2278  break;
2279 
2280  case 27:
2281 
2282 /* Line 1455 of yacc.c */
2283 #line 355 "parse_spice.y"
2284  {
2285  /* device specification */
2286  (yyval.definition) = spice_create_action ((yyvsp[(1) - (5)].ident), (yyvsp[(2) - (5)].ident));
2287  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (5)].ident), HINT_NAME | HINT_MSTART);
2288  spice_add_last_hint ((yyvsp[(4) - (5)].value), HINT_MSTOP);
2289  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(4) - (5)].value));
2290  }
2291  break;
2292 
2293  case 28:
2294 
2295 /* Line 1455 of yacc.c */
2296 #line 362 "parse_spice.y"
2297  {
2298  /* diode */
2299  (yyval.definition) = spice_create_device ((yyvsp[(1) - (5)].ident));
2300  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (5)].ident), HINT_NODE);
2301  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (5)].ident), HINT_NODE);
2302  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (5)].ident), HINT_NAME);
2303  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(5) - (5)].value));
2304  }
2305  break;
2306 
2307  case 29:
2308 
2309 /* Line 1455 of yacc.c */
2310 #line 370 "parse_spice.y"
2311  {
2312  /* JFET */
2313  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2314  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2315  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2316  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NODE);
2317  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (6)].ident), HINT_NAME);
2318  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (6)].value));
2319  }
2320  break;
2321 
2322  case 30:
2323 
2324 /* Line 1455 of yacc.c */
2325 #line 379 "parse_spice.y"
2326  {
2327  /* 3 node BJT */
2328  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2329  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2330  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2331  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NODE);
2332  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (6)].ident), HINT_NAME);
2333  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (6)].value));
2334  }
2335  break;
2336 
2337  case 31:
2338 
2339 /* Line 1455 of yacc.c */
2340 #line 388 "parse_spice.y"
2341  {
2342  /* 4 node BJT */
2343  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2344  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2345  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2346  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NODE);
2347  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NODE);
2348  spice_append_str_value ((yyval.definition), (yyvsp[(6) - (7)].ident), HINT_NAME);
2349  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(7) - (7)].value));
2350  }
2351  break;
2352 
2353  case 32:
2354 
2355 /* Line 1455 of yacc.c */
2356 #line 398 "parse_spice.y"
2357  {
2358  /* MOS */
2359  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2360  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2361  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2362  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NODE);
2363  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NODE);
2364  spice_append_str_value ((yyval.definition), (yyvsp[(6) - (7)].ident), HINT_NAME);
2365  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(7) - (7)].value));
2366  }
2367  break;
2368 
2369  case 33:
2370 
2371 /* Line 1455 of yacc.c */
2372 #line 408 "parse_spice.y"
2373  {
2374  /* MES */
2375  (yyval.definition) = spice_create_device ((yyvsp[(1) - (6)].ident));
2376  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (6)].ident), HINT_NODE);
2377  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (6)].ident), HINT_NODE);
2378  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (6)].ident), HINT_NODE);
2379  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (6)].ident), HINT_NAME);
2380  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (6)].value));
2381  }
2382  break;
2383 
2384  case 34:
2385 
2386 /* Line 1455 of yacc.c */
2387 #line 417 "parse_spice.y"
2388  {
2389  /* transient analysis */
2390  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2391  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2392  }
2393  break;
2394 
2395  case 35:
2396 
2397 /* Line 1455 of yacc.c */
2398 #line 422 "parse_spice.y"
2399  {
2400  /* plotting */
2401  (yyval.definition) = spice_create_action ((yyvsp[(1) - (4)].ident), strdup ((yyvsp[(1) - (4)].ident)));
2402  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (4)].ident), HINT_NAME);
2403  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(3) - (4)].value));
2404  }
2405  break;
2406 
2407  case 36:
2408 
2409 /* Line 1455 of yacc.c */
2410 #line 428 "parse_spice.y"
2411  {
2412  /* AC analysis */
2413  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2414  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2415  }
2416  break;
2417 
2418  case 37:
2419 
2420 /* Line 1455 of yacc.c */
2421 #line 433 "parse_spice.y"
2422  {
2423  /* single DC analysis */
2424  (yyval.definition) = spice_create_action ((yyvsp[(1) - (2)].ident), strdup ((yyvsp[(1) - (2)].ident)));
2425  }
2426  break;
2427 
2428  case 38:
2429 
2430 /* Line 1455 of yacc.c */
2431 #line 437 "parse_spice.y"
2432  {
2433  /* DC analysis first order */
2434  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2435  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2436  }
2437  break;
2438 
2439  case 39:
2440 
2441 /* Line 1455 of yacc.c */
2442 #line 442 "parse_spice.y"
2443  {
2444  /* DC analysis second order */
2445  (yyval.definition) = spice_create_action ((yyvsp[(1) - (4)].ident), strdup ((yyvsp[(1) - (4)].ident)));
2446  (yyval.definition)->values = netlist_append_values ((yyvsp[(2) - (4)].value), (yyvsp[(3) - (4)].value));
2447  }
2448  break;
2449 
2450  case 40:
2451 
2452 /* Line 1455 of yacc.c */
2453 #line 447 "parse_spice.y"
2454  {
2455  /* printing specifying the analysis type */
2456  (yyval.definition) = spice_create_action ((yyvsp[(1) - (4)].ident), strdup ((yyvsp[(1) - (4)].ident)));
2457  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (4)].ident), HINT_NAME);
2458  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(3) - (4)].value));
2459  }
2460  break;
2461 
2462  case 41:
2463 
2464 /* Line 1455 of yacc.c */
2465 #line 453 "parse_spice.y"
2466  {
2467  /* printing */
2468  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2469  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2470  }
2471  break;
2472 
2473  case 42:
2474 
2475 /* Line 1455 of yacc.c */
2476 #line 458 "parse_spice.y"
2477  {
2478  /* printing */
2479  (yyval.definition) = spice_create_action ((yyvsp[(1) - (4)].ident), strdup ((yyvsp[(1) - (4)].ident)));
2480  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (4)].ident), HINT_NAME);
2481  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (4)].ident), HINT_NAME);
2482  }
2483  break;
2484 
2485  case 43:
2486 
2487 /* Line 1455 of yacc.c */
2488 #line 464 "parse_spice.y"
2489  {
2490  /* general analysis options */
2491  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2492  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2493  }
2494  break;
2495 
2496  case 44:
2497 
2498 /* Line 1455 of yacc.c */
2499 #line 469 "parse_spice.y"
2500  {
2501  /* temperatur analysis (Spice 2g6) */
2502  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2503  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2504  }
2505  break;
2506 
2507  case 45:
2508 
2509 /* Line 1455 of yacc.c */
2510 #line 474 "parse_spice.y"
2511  {
2512  /* TODO: default width of ??? */
2513  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2514  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2515  }
2516  break;
2517 
2518  case 46:
2519 
2520 /* Line 1455 of yacc.c */
2521 #line 479 "parse_spice.y"
2522  {
2523  /* noise analysis */
2524  (yyval.definition) = spice_create_action ((yyvsp[(1) - (5)].ident), strdup ((yyvsp[(1) - (5)].ident)));
2525  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(2) - (5)].value));
2526  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (5)].ident), HINT_NAME);
2527  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(4) - (5)].value));
2528  }
2529  break;
2530 
2531  case 47:
2532 
2533 /* Line 1455 of yacc.c */
2534 #line 486 "parse_spice.y"
2535  {
2536  /* pole-zero analysis */
2537  (yyval.definition) = spice_create_action ((yyvsp[(1) - (8)].ident), strdup ((yyvsp[(1) - (8)].ident)));
2538  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (8)].ident), HINT_NODE);
2539  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (8)].ident), HINT_NODE);
2540  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (8)].ident), HINT_NODE);
2541  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (8)].ident), HINT_NODE);
2542  spice_append_str_value ((yyval.definition), (yyvsp[(6) - (8)].ident), HINT_NAME);
2543  spice_append_str_value ((yyval.definition), (yyvsp[(7) - (8)].ident), HINT_NAME);
2544  }
2545  break;
2546 
2547  case 48:
2548 
2549 /* Line 1455 of yacc.c */
2550 #line 496 "parse_spice.y"
2551  {
2552  /* subcircuit call */
2553  (yyval.definition) = spice_create_device ((yyvsp[(1) - (3)].ident));
2554  spice_set_last_hint ((yyvsp[(2) - (3)].value), HINT_NAME);
2555  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2556  }
2557  break;
2558 
2559  case 49:
2560 
2561 /* Line 1455 of yacc.c */
2562 #line 502 "parse_spice.y"
2563  {
2564  /* voltage controlled switch */
2565  (yyval.definition) = spice_create_device ((yyvsp[(1) - (8)].ident));
2566  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (8)].ident), HINT_NODE);
2567  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (8)].ident), HINT_NODE);
2568  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (8)].ident), HINT_NODE);
2569  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (8)].ident), HINT_NODE);
2570  spice_append_str_value ((yyval.definition), (yyvsp[(6) - (8)].ident), HINT_NAME);
2571  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(7) - (8)].value));
2572  }
2573  break;
2574 
2575  case 50:
2576 
2577 /* Line 1455 of yacc.c */
2578 #line 512 "parse_spice.y"
2579  {
2580  /* current controlled switch */
2581  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2582  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2583  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2584  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NAME);
2585  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NAME);
2586  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (7)].value));
2587  }
2588  break;
2589 
2590  case 51:
2591 
2592 /* Line 1455 of yacc.c */
2593 #line 521 "parse_spice.y"
2594  {
2595  /* lossy transline */
2596  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2597  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2598  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2599  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NODE);
2600  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NODE);
2601  spice_append_str_value ((yyval.definition), (yyvsp[(6) - (7)].ident), HINT_NAME);
2602  }
2603  break;
2604 
2605  case 52:
2606 
2607 /* Line 1455 of yacc.c */
2608 #line 530 "parse_spice.y"
2609  {
2610  /* distributed lossy transline */
2611  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2612  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2613  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2614  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NODE);
2615  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NAME);
2616  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (7)].value));
2617  }
2618  break;
2619 
2620  case 53:
2621 
2622 /* Line 1455 of yacc.c */
2623 #line 539 "parse_spice.y"
2624  {
2625  /* lossless transline */
2626  (yyval.definition) = spice_create_device ((yyvsp[(1) - (7)].ident));
2627  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (7)].ident), HINT_NODE);
2628  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (7)].ident), HINT_NODE);
2629  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (7)].ident), HINT_NODE);
2630  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (7)].ident), HINT_NODE);
2631  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (7)].value));
2632  }
2633  break;
2634 
2635  case 54:
2636 
2637 /* Line 1455 of yacc.c */
2638 #line 548 "parse_spice.y"
2639  {
2640  /* lossless transline and initial condition */
2641  (yyval.definition) = spice_create_device ((yyvsp[(1) - (8)].ident));
2642  spice_append_str_value ((yyval.definition), (yyvsp[(2) - (8)].ident), HINT_NODE);
2643  spice_append_str_value ((yyval.definition), (yyvsp[(3) - (8)].ident), HINT_NODE);
2644  spice_append_str_value ((yyval.definition), (yyvsp[(4) - (8)].ident), HINT_NODE);
2645  spice_append_str_value ((yyval.definition), (yyvsp[(5) - (8)].ident), HINT_NODE);
2646  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(6) - (8)].value));
2647  (yyval.definition)->values = netlist_append_values ((yyval.definition)->values, (yyvsp[(7) - (8)].value));
2648  }
2649  break;
2650 
2651  case 55:
2652 
2653 /* Line 1455 of yacc.c */
2654 #line 558 "parse_spice.y"
2655  {
2656  /* operating point analysis */
2657  (yyval.definition) = spice_create_action ((yyvsp[(1) - (2)].ident), strdup ((yyvsp[(1) - (2)].ident)));
2658  }
2659  break;
2660 
2661  case 56:
2662 
2663 /* Line 1455 of yacc.c */
2664 #line 562 "parse_spice.y"
2665  {
2666  /* saving action */
2667  (yyval.definition) = spice_create_action ((yyvsp[(1) - (2)].ident), strdup ((yyvsp[(1) - (2)].ident)));
2668  }
2669  break;
2670 
2671  case 57:
2672 
2673 /* Line 1455 of yacc.c */
2674 #line 566 "parse_spice.y"
2675  {
2676  /* sensitivity analysis */
2677  (yyval.definition) = spice_create_action ((yyvsp[(1) - (2)].ident), strdup ((yyvsp[(1) - (2)].ident)));
2678  }
2679  break;
2680 
2681  case 58:
2682 
2683 /* Line 1455 of yacc.c */
2684 #line 570 "parse_spice.y"
2685  {
2686  /* transfer function analysis */
2687  (yyval.definition) = spice_create_action ((yyvsp[(1) - (2)].ident), strdup ((yyvsp[(1) - (2)].ident)));
2688  }
2689  break;
2690 
2691  case 59:
2692 
2693 /* Line 1455 of yacc.c */
2694 #line 574 "parse_spice.y"
2695  {
2696  /* fourier analysis */
2697  (yyval.definition) = spice_create_action ((yyvsp[(1) - (2)].ident), strdup ((yyvsp[(1) - (2)].ident)));
2698  }
2699  break;
2700 
2701  case 60:
2702 
2703 /* Line 1455 of yacc.c */
2704 #line 578 "parse_spice.y"
2705  {
2706  /* non-linear dependent sources */
2707  (yyval.definition) = spice_create_device ((yyvsp[(1) - (2)].ident));
2708  }
2709  break;
2710 
2711  case 61:
2712 
2713 /* Line 1455 of yacc.c */
2714 #line 582 "parse_spice.y"
2715  {
2716  /* distortion analysis */
2717  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2718  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2719  }
2720  break;
2721 
2722  case 62:
2723 
2724 /* Line 1455 of yacc.c */
2725 #line 587 "parse_spice.y"
2726  {
2727  /* file include */
2728  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2729  struct value_t * file = create_value ();
2730  file->ident = (yyvsp[(2) - (3)].ident);
2731  file->hint = HINT_NAME;
2732  (yyval.definition)->values = file;
2733  }
2734  break;
2735 
2736  case 63:
2737 
2738 /* Line 1455 of yacc.c */
2739 #line 595 "parse_spice.y"
2740  {
2741  /* nodeset functionality */
2742  (yyval.definition) = spice_create_action ((yyvsp[(1) - (3)].ident), strdup ((yyvsp[(1) - (3)].ident)));
2743  (yyval.definition)->values = (yyvsp[(2) - (3)].value);
2744  }
2745  break;
2746 
2747  case 64:
2748 
2749 /* Line 1455 of yacc.c */
2750 #line 603 "parse_spice.y"
2751  {
2752  (yyval.value) = NULL;
2753  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].ident));
2754  }
2755  break;
2756 
2757  case 65:
2758 
2759 /* Line 1455 of yacc.c */
2760 #line 610 "parse_spice.y"
2761  {
2762  (yyval.value) = NULL;
2763  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
2764  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(3) - (3)].ident), HINT_NUMBER);
2765  }
2766  break;
2767 
2768  case 66:
2769 
2770 /* Line 1455 of yacc.c */
2771 #line 618 "parse_spice.y"
2772  {
2773  (yyval.value) = NULL;
2774  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (2)].ident), HINT_NAME);
2775  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(2) - (2)].ident), HINT_NUMBER);
2776  }
2777  break;
2778 
2779  case 67:
2780 
2781 /* Line 1455 of yacc.c */
2782 #line 626 "parse_spice.y"
2783  {
2784  (yyval.value) = NULL;
2785  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (3)].ident), HINT_NAME);
2786  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(2) - (3)].ident), HINT_NUMBER);
2787  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(3) - (3)].ident), HINT_NUMBER);
2788  }
2789  break;
2790 
2791  case 68:
2792 
2793 /* Line 1455 of yacc.c */
2794 #line 634 "parse_spice.y"
2795  {
2796  (yyval.value) = NULL;
2797  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (4)].ident), HINT_NAME);
2798  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(2) - (4)].ident), HINT_NUMBER);
2799  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(3) - (4)].ident), HINT_NUMBER);
2800  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(4) - (4)].ident), HINT_NUMBER);
2801  }
2802  break;
2803 
2804  case 69:
2805 
2806 /* Line 1455 of yacc.c */
2807 #line 644 "parse_spice.y"
2808  {
2809  (yyval.value) = NULL;
2810  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (5)].ident), HINT_NAME);
2811  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(2) - (5)].ident), HINT_NUMBER);
2812  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(3) - (5)].ident), HINT_NUMBER);
2813  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(4) - (5)].ident), HINT_NUMBER);
2814  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(5) - (5)].ident), HINT_NUMBER);
2815  }
2816  break;
2817 
2818  case 70:
2819 
2820 /* Line 1455 of yacc.c */
2821 #line 655 "parse_spice.y"
2822  { /* range specification during plotting */
2823  (yyval.value) = NULL;
2824  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(1) - (2)].ident), HINT_NUMBER);
2825  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(2) - (2)].ident), HINT_NUMBER);
2826  }
2827  break;
2828 
2829  case 71:
2830 
2831 /* Line 1455 of yacc.c */
2832 #line 663 "parse_spice.y"
2833  { // TODO: 2 reduce/reduce, 2 shift/reduce
2834  /* print/plot specification of node voltage */
2835  (yyval.value) = NULL;
2836  (yyval.value) = spice_append_str_values ((yyval.value), strdup ("V"), HINT_NAME | HINT_MSTART);
2837  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (1)].ident), HINT_NODE | HINT_MSTOP);
2838  }
2839  break;
2840 
2841  case 72:
2842 
2843 /* Line 1455 of yacc.c */
2844 #line 669 "parse_spice.y"
2845  { // TODO: 2 reduce/reduce
2846  /* print/plot specification of node voltage */
2847  (yyval.value) = NULL;
2848  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (2)].ident), HINT_NAME | HINT_MSTART);
2849  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(2) - (2)].ident), HINT_NODE | HINT_MSTOP);
2850  }
2851  break;
2852 
2853  case 73:
2854 
2855 /* Line 1455 of yacc.c */
2856 #line 675 "parse_spice.y"
2857  {
2858  /* print/plot specification of differential node voltages */
2859  (yyval.value) = NULL;
2860  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (3)].ident), HINT_NAME | HINT_MSTART);
2861  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(2) - (3)].ident), HINT_NODE);
2862  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(3) - (3)].ident), HINT_NODE | HINT_MSTOP);
2863  }
2864  break;
2865 
2866  case 76:
2867 
2868 /* Line 1455 of yacc.c */
2869 #line 688 "parse_spice.y"
2870  {
2871  /* print/plot specification of branch current */
2872  (yyval.value) = NULL;
2873  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (2)].ident), HINT_NAME | HINT_MSTART);
2874  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(2) - (2)].ident), HINT_NAME | HINT_MSTOP);
2875  }
2876  break;
2877 
2878  case 77:
2879 
2880 /* Line 1455 of yacc.c */
2881 #line 694 "parse_spice.y"
2882  {
2883  /* print/plot specification of branch current */
2884  (yyval.value) = NULL;
2885  (yyval.value) = spice_append_str_values ((yyval.value), strdup ("I"), HINT_NAME | HINT_MSTART);
2886  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (1)].ident), HINT_NAME | HINT_MSTOP);
2887  }
2888  break;
2889 
2890  case 78:
2891 
2892 /* Line 1455 of yacc.c */
2893 #line 700 "parse_spice.y"
2894  {
2895  /* print/plot specification of operating point */
2896  (yyval.value) = NULL;
2897  (yyval.value) = spice_append_str_values ((yyval.value), strdup ("OP"), HINT_NAME | HINT_MSTART);
2898  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (1)].ident), HINT_NAME | HINT_MSTOP);
2899  }
2900  break;
2901 
2902  case 79:
2903 
2904 /* Line 1455 of yacc.c */
2905 #line 708 "parse_spice.y"
2906  { (yyval.value) = NULL; }
2907  break;
2908 
2909  case 80:
2910 
2911 /* Line 1455 of yacc.c */
2912 #line 709 "parse_spice.y"
2913  {
2914  (yyval.value) = netlist_append_values ((yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
2915  }
2916  break;
2917 
2918  case 81:
2919 
2920 /* Line 1455 of yacc.c */
2921 #line 712 "parse_spice.y"
2922  {
2923  (yyval.value) = netlist_append_values ((yyvsp[(1) - (3)].value), (yyvsp[(2) - (3)].value));
2924  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
2925  }
2926  break;
2927 
2928  case 82:
2929 
2930 /* Line 1455 of yacc.c */
2931 #line 716 "parse_spice.y"
2932  {
2933  (yyval.value) = netlist_append_values ((yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
2934  }
2935  break;
2936 
2937  case 83:
2938 
2939 /* Line 1455 of yacc.c */
2940 #line 719 "parse_spice.y"
2941  {
2942  (yyval.value) = netlist_append_values ((yyvsp[(1) - (3)].value), (yyvsp[(2) - (3)].value));
2943  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
2944  }
2945  break;
2946 
2947  case 84:
2948 
2949 /* Line 1455 of yacc.c */
2950 #line 725 "parse_spice.y"
2951  { (yyval.value) = NULL; }
2952  break;
2953 
2954  case 85:
2955 
2956 /* Line 1455 of yacc.c */
2957 #line 726 "parse_spice.y"
2958  {
2959  (yyval.value) = spice_create_str_value ((yyvsp[(1) - (1)].ident), HINT_NAME);
2960  }
2961  break;
2962 
2963  case 86:
2964 
2965 /* Line 1455 of yacc.c */
2966 #line 729 "parse_spice.y"
2967  {
2968  (yyval.value) = spice_create_str_value ((yyvsp[(1) - (1)].ident), HINT_NAME);
2969  }
2970  break;
2971 
2972  case 87:
2973 
2974 /* Line 1455 of yacc.c */
2975 #line 734 "parse_spice.y"
2976  { (yyval.value) = NULL; }
2977  break;
2978 
2979  case 88:
2980 
2981 /* Line 1455 of yacc.c */
2982 #line 735 "parse_spice.y"
2983  {
2984  (yyval.value) = netlist_append_values ((yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
2985  }
2986  break;
2987 
2988  case 89:
2989 
2990 /* Line 1455 of yacc.c */
2991 #line 738 "parse_spice.y"
2992  {
2993  (yyval.value) = netlist_append_values ((yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
2994  }
2995  break;
2996 
2997  case 90:
2998 
2999 /* Line 1455 of yacc.c */
3000 #line 743 "parse_spice.y"
3001  { (yyval.value) = NULL; }
3002  break;
3003 
3004  case 91:
3005 
3006 /* Line 1455 of yacc.c */
3007 #line 744 "parse_spice.y"
3008  {
3009  (yyval.value) = spice_create_str_value ((yyvsp[(1) - (2)].ident), HINT_NAME);
3010  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(2) - (2)].value));
3011  }
3012  break;
3013 
3014  case 92:
3015 
3016 /* Line 1455 of yacc.c */
3017 #line 748 "parse_spice.y"
3018  {
3019  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
3020  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
3021  }
3022  break;
3023 
3024  case 93:
3025 
3026 /* Line 1455 of yacc.c */
3027 #line 754 "parse_spice.y"
3028  { (yyval.value) = NULL; }
3029  break;
3030 
3031  case 94:
3032 
3033 /* Line 1455 of yacc.c */
3034 #line 755 "parse_spice.y"
3035  {
3036  (yyval.value) = spice_create_str_value ((yyvsp[(1) - (2)].ident), HINT_NAME);
3037  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(2) - (2)].value));
3038  }
3039  break;
3040 
3041  case 95:
3042 
3043 /* Line 1455 of yacc.c */
3044 #line 759 "parse_spice.y"
3045  {
3046  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
3047  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
3048  }
3049  break;
3050 
3051  case 96:
3052 
3053 /* Line 1455 of yacc.c */
3054 #line 765 "parse_spice.y"
3055  { (yyval.value) = NULL; }
3056  break;
3057 
3058  case 97:
3059 
3060 /* Line 1455 of yacc.c */
3061 #line 766 "parse_spice.y"
3062  {
3063  (yyval.value) = NULL;
3064  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (4)].ident), HINT_NAME | HINT_MSTART);
3065  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(2) - (4)].ident), HINT_NODE | HINT_MSTOP);
3066  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(3) - (4)].ident), HINT_NUMBER);
3067  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(4) - (4)].value));
3068  }
3069  break;
3070 
3071  case 98:
3072 
3073 /* Line 1455 of yacc.c */
3074 #line 775 "parse_spice.y"
3075  { (yyval.value) = NULL; }
3076  break;
3077 
3078  case 99:
3079 
3080 /* Line 1455 of yacc.c */
3081 #line 776 "parse_spice.y"
3082  {
3083  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
3084  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
3085  }
3086  break;
3087 
3088  case 100:
3089 
3090 /* Line 1455 of yacc.c */
3091 #line 780 "parse_spice.y"
3092  {
3093  (yyval.value) = spice_create_par_value (strdup ("Area"), (yyvsp[(1) - (2)].ident));
3094  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(2) - (2)].value));
3095  }
3096  break;
3097 
3098  case 101:
3099 
3100 /* Line 1455 of yacc.c */
3101 #line 784 "parse_spice.y"
3102  {
3103  (yyval.value) = spice_create_val_value ((yyvsp[(1) - (2)].ident), HINT_NAME);
3104  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(2) - (2)].value));
3105  }
3106  break;
3107 
3108  case 102:
3109 
3110 /* Line 1455 of yacc.c */
3111 #line 788 "parse_spice.y"
3112  {
3113  (yyval.value) = netlist_append_values ((yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
3114  }
3115  break;
3116 
3117  case 103:
3118 
3119 /* Line 1455 of yacc.c */
3120 #line 793 "parse_spice.y"
3121  { (yyval.value) = NULL; }
3122  break;
3123 
3124  case 104:
3125 
3126 /* Line 1455 of yacc.c */
3127 #line 794 "parse_spice.y"
3128  {
3129  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
3130  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
3131  }
3132  break;
3133 
3134  case 105:
3135 
3136 /* Line 1455 of yacc.c */
3137 #line 798 "parse_spice.y"
3138  {
3139  (yyval.value) = spice_create_par_value (strdup ("Area"), (yyvsp[(1) - (2)].ident));
3140  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(2) - (2)].value));
3141  }
3142  break;
3143 
3144  case 106:
3145 
3146 /* Line 1455 of yacc.c */
3147 #line 802 "parse_spice.y"
3148  {
3149  (yyval.value) = spice_create_val_value ((yyvsp[(1) - (2)].ident), HINT_NAME);
3150  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(2) - (2)].value));
3151  }
3152  break;
3153 
3154  case 107:
3155 
3156 /* Line 1455 of yacc.c */
3157 #line 806 "parse_spice.y"
3158  {
3159  (yyval.value) = netlist_append_values ((yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
3160  }
3161  break;
3162 
3163  case 108:
3164 
3165 /* Line 1455 of yacc.c */
3166 #line 809 "parse_spice.y"
3167  {
3168  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
3169  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
3170  }
3171  break;
3172 
3173  case 109:
3174 
3175 /* Line 1455 of yacc.c */
3176 #line 815 "parse_spice.y"
3177  { (yyval.value) = NULL; }
3178  break;
3179 
3180  case 110:
3181 
3182 /* Line 1455 of yacc.c */
3183 #line 816 "parse_spice.y"
3184  {
3185  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
3186  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
3187  }
3188  break;
3189 
3190  case 111:
3191 
3192 /* Line 1455 of yacc.c */
3193 #line 820 "parse_spice.y"
3194  {
3195  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
3196  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(3) - (3)].value));
3197  }
3198  break;
3199 
3200  case 112:
3201 
3202 /* Line 1455 of yacc.c */
3203 #line 824 "parse_spice.y"
3204  {
3205  (yyval.value) = spice_create_val_value ((yyvsp[(1) - (2)].ident), HINT_NUMBER);
3206  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(2) - (2)].value));
3207  }
3208  break;
3209 
3210  case 113:
3211 
3212 /* Line 1455 of yacc.c */
3213 #line 828 "parse_spice.y"
3214  {
3215  (yyval.value) = spice_create_val_value ((yyvsp[(1) - (2)].ident), HINT_NAME);
3216  (yyval.value) = netlist_append_values ((yyval.value), (yyvsp[(2) - (2)].value));
3217  }
3218  break;
3219 
3220  case 114:
3221 
3222 /* Line 1455 of yacc.c */
3223 #line 832 "parse_spice.y"
3224  {
3225  (yyval.value) = netlist_append_values ((yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
3226  }
3227  break;
3228 
3229  case 117:
3230 
3231 /* Line 1455 of yacc.c */
3232 #line 840 "parse_spice.y"
3233  {
3234  /* identification of a DC sweep */
3235  (yyval.value) = NULL;
3236  (yyval.value) = spice_append_str_values ((yyval.value), (yyvsp[(1) - (4)].ident), HINT_NAME | HINT_MSTART);
3237  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(2) - (4)].ident), HINT_NUMBER);
3238  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(3) - (4)].ident), HINT_NUMBER);
3239  (yyval.value) = spice_append_val_values ((yyval.value), (yyvsp[(4) - (4)].ident), HINT_NUMBER | HINT_MSTOP);
3240  }
3241  break;
3242 
3243  case 125:
3244 
3245 /* Line 1455 of yacc.c */
3246 #line 856 "parse_spice.y"
3247  { (yyval.value) = NULL; }
3248  break;
3249 
3250  case 126:
3251 
3252 /* Line 1455 of yacc.c */
3253 #line 857 "parse_spice.y"
3254  {
3255  (yyval.value) = spice_create_par_value ((yyvsp[(1) - (3)].ident), (yyvsp[(2) - (3)].ident));
3256  (yyval.value)->next = (yyvsp[(3) - (3)].value);
3257  }
3258  break;
3259 
3260  case 127:
3261 
3262 /* Line 1455 of yacc.c */
3263 #line 863 "parse_spice.y"
3264  { (yyval.value) = NULL; }
3265  break;
3266 
3267  case 128:
3268 
3269 /* Line 1455 of yacc.c */
3270 #line 864 "parse_spice.y"
3271  {
3272  (yyval.value) = spice_create_val_value ((yyvsp[(1) - (2)].ident), HINT_NUMBER);
3273  (yyval.value)->next = (yyvsp[(2) - (2)].value);
3274  }
3275  break;
3276 
3277  case 129:
3278 
3279 /* Line 1455 of yacc.c */
3280 #line 870 "parse_spice.y"
3281  { (yyval.value) = NULL; }
3282  break;
3283 
3284  case 130:
3285 
3286 /* Line 1455 of yacc.c */
3287 #line 871 "parse_spice.y"
3288  {
3289  (yyval.value) = spice_create_str_value ((yyvsp[(1) - (2)].ident), HINT_NODE);
3290  (yyval.value)->next = (yyvsp[(2) - (2)].value);
3291  }
3292  break;
3293 
3294  case 131:
3295 
3296 /* Line 1455 of yacc.c */
3297 #line 875 "parse_spice.y"
3298  {
3299  (yyval.value) = spice_create_val_value ((yyvsp[(1) - (2)].ident), HINT_NUMBER);
3300  (yyval.value)->next = (yyvsp[(2) - (2)].value);
3301  }
3302  break;
3303 
3304  case 132:
3305 
3306 /* Line 1455 of yacc.c */
3307 #line 881 "parse_spice.y"
3308  { (yyval.value) = NULL; }
3309  break;
3310 
3311  case 133:
3312 
3313 /* Line 1455 of yacc.c */
3314 #line 882 "parse_spice.y"
3315  {
3316  (yyval.value) = spice_create_str_value ((yyvsp[(1) - (2)].ident), HINT_NODE);
3317  (yyval.value)->next = (yyvsp[(2) - (2)].value);
3318  }
3319  break;
3320 
3321  case 134:
3322 
3323 /* Line 1455 of yacc.c */
3324 #line 888 "parse_spice.y"
3325  { (yyval.value) = NULL; }
3326  break;
3327 
3328  case 135:
3329 
3330 /* Line 1455 of yacc.c */
3331 #line 889 "parse_spice.y"
3332  {
3333  (yyval.value) = spice_create_str_value ((yyvsp[(1) - (2)].ident), HINT_NAME);
3334  (yyval.value)->next = (yyvsp[(2) - (2)].value);
3335  }
3336  break;
3337 
3338  case 136:
3339 
3340 /* Line 1455 of yacc.c */
3341 #line 896 "parse_spice.y"
3342  {
3343  (yyval.value) = spice_create_str_value ((yyvsp[(1) - (2)].ident), HINT_NAME | HINT_MSTART);
3344  spice_add_last_hint ((yyvsp[(2) - (2)].value), HINT_MSTOP);
3345  (yyval.value)->next = (yyvsp[(2) - (2)].value);
3346  }
3347  break;
3348 
3349  case 137:
3350 
3351 /* Line 1455 of yacc.c */
3352 #line 903 "parse_spice.y"
3353  { (yyval.value) = NULL; }
3354  break;
3355 
3356  case 138:
3357 
3358 /* Line 1455 of yacc.c */
3359 #line 904 "parse_spice.y"
3360  {
3361  (yyval.value) = netlist_append_values ((yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
3362  }
3363  break;
3364 
3365  case 139:
3366 
3367 /* Line 1455 of yacc.c */
3368 #line 910 "parse_spice.y"
3369  {
3370  (yyvsp[(1) - (3)].definition)->sub = (yyvsp[(2) - (3)].definition);
3371  (yyval.definition) = (yyvsp[(1) - (3)].definition);
3372  (yyvsp[(2) - (3)].definition) = NULL;
3373  }
3374  break;
3375 
3376  case 140:
3377 
3378 /* Line 1455 of yacc.c */
3379 #line 918 "parse_spice.y"
3380  {
3381  (yyval.definition) = spice_create_action ((yyvsp[(1) - (4)].ident), (yyvsp[(2) - (4)].ident));
3382  (yyval.definition)->values = (yyvsp[(3) - (4)].value);
3383  }
3384  break;
3385 
3386  case 141:
3387 
3388 /* Line 1455 of yacc.c */
3389 #line 924 "parse_spice.y"
3390  { (yyval.definition) = NULL; }
3391  break;
3392 
3393  case 142:
3394 
3395 /* Line 1455 of yacc.c */
3396 #line 925 "parse_spice.y"
3397  { /* chain definitions here */
3398  if ((yyvsp[(1) - (2)].definition)) {
3399  (yyvsp[(1) - (2)].definition)->next = (yyvsp[(2) - (2)].definition);
3400  (yyval.definition) = (yyvsp[(1) - (2)].definition);
3401  }
3402  else {
3403  (yyval.definition) = (yyvsp[(2) - (2)].definition);
3404  }
3405  }
3406  break;
3407 
3408  case 144:
3409 
3410 /* Line 1455 of yacc.c */
3411 #line 939 "parse_spice.y"
3412  { /* nothing to do */ }
3413  break;
3414 
3415  case 145:
3416 
3417 /* Line 1455 of yacc.c */
3418 #line 940 "parse_spice.y"
3419  { free ((yyvsp[(2) - (2)].ident)); /* nothing to do */ }
3420  break;
3421 
3422  case 146:
3423 
3424 /* Line 1455 of yacc.c */
3425 #line 944 "parse_spice.y"
3426  { /* chain definitions here */
3427  if ((yyvsp[(1) - (1)].definition)) {
3428  (yyvsp[(1) - (1)].definition)->next = (yyval.definition);
3429  (yyval.definition) = (yyvsp[(1) - (1)].definition);
3430  }
3431  }
3432  break;
3433 
3434  case 147:
3435 
3436 /* Line 1455 of yacc.c */
3437 #line 950 "parse_spice.y"
3438  { /* do nothing here, see subcircuit rule */ }
3439  break;
3440 
3441  case 148:
3442 
3443 /* Line 1455 of yacc.c */
3444 #line 951 "parse_spice.y"
3445  {
3446  (yyval.definition) = NULL;
3447  }
3448  break;
3449 
3450 
3451 
3452 /* Line 1455 of yacc.c */
3453 #line 3454 "parse_spice.cpp"
3454  default: break;
3455  }
3456  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3457 
3458  YYPOPSTACK (yylen);
3459  yylen = 0;
3460  YY_STACK_PRINT (yyss, yyssp);
3461 
3462  *++yyvsp = yyval;
3463 
3464  /* Now `shift' the result of the reduction. Determine what state
3465  that goes to, based on the state we popped back to and the rule
3466  number reduced by. */
3467 
3468  yyn = yyr1[yyn];
3469 
3470  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3471  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3472  yystate = yytable[yystate];
3473  else
3474  yystate = yydefgoto[yyn - YYNTOKENS];
3475 
3476  goto yynewstate;
3477 
3478 
3479 /*------------------------------------.
3480 | yyerrlab -- here on detecting error |
3481 `------------------------------------*/
3482 yyerrlab:
3483  /* If not already recovering from an error, report this error. */
3484  if (!yyerrstatus)
3485  {
3486  ++yynerrs;
3487 #if ! YYERROR_VERBOSE
3488  yyerror (YY_("syntax error"));
3489 #else
3490  {
3491  YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3492  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3493  {
3494  YYSIZE_T yyalloc = 2 * yysize;
3495  if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3496  yyalloc = YYSTACK_ALLOC_MAXIMUM;
3497  if (yymsg != yymsgbuf)
3498  YYSTACK_FREE (yymsg);
3499  yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3500  if (yymsg)
3501  yymsg_alloc = yyalloc;
3502  else
3503  {
3504  yymsg = yymsgbuf;
3505  yymsg_alloc = sizeof yymsgbuf;
3506  }
3507  }
3508 
3509  if (0 < yysize && yysize <= yymsg_alloc)
3510  {
3511  (void) yysyntax_error (yymsg, yystate, yychar);
3512  yyerror (yymsg);
3513  }
3514  else
3515  {
3516  yyerror (YY_("syntax error"));
3517  if (yysize != 0)
3518  goto yyexhaustedlab;
3519  }
3520  }
3521 #endif
3522  }
3523 
3524 
3525 
3526  if (yyerrstatus == 3)
3527  {
3528  /* If just tried and failed to reuse lookahead token after an
3529  error, discard it. */
3530 
3531  if (yychar <= YYEOF)
3532  {
3533  /* Return failure if at end of input. */
3534  if (yychar == YYEOF)
3535  YYABORT;
3536  }
3537  else
3538  {
3539  yydestruct ("Error: discarding",
3540  yytoken, &yylval);
3541  yychar = YYEMPTY;
3542  }
3543  }
3544 
3545  /* Else will try to reuse lookahead token after shifting the error
3546  token. */
3547  goto yyerrlab1;
3548 
3549 
3550 /*---------------------------------------------------.
3551 | yyerrorlab -- error raised explicitly by YYERROR. |
3552 `---------------------------------------------------*/
3553 yyerrorlab:
3554 
3555  /* Pacify compilers like GCC when the user code never invokes
3556  YYERROR and the label yyerrorlab therefore never appears in user
3557  code. */
3558  if (/*CONSTCOND*/ 0)
3559  goto yyerrorlab;
3560 
3561  /* Do not reclaim the symbols of the rule which action triggered
3562  this YYERROR. */
3563  YYPOPSTACK (yylen);
3564  yylen = 0;
3565  YY_STACK_PRINT (yyss, yyssp);
3566  yystate = *yyssp;
3567  goto yyerrlab1;
3568 
3569 
3570 /*-------------------------------------------------------------.
3571 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3572 `-------------------------------------------------------------*/
3573 yyerrlab1:
3574  yyerrstatus = 3; /* Each real token shifted decrements this. */
3575 
3576  for (;;)
3577  {
3578  yyn = yypact[yystate];
3579  if (yyn != YYPACT_NINF)
3580  {
3581  yyn += YYTERROR;
3582  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3583  {
3584  yyn = yytable[yyn];
3585  if (0 < yyn)
3586  break;
3587  }
3588  }
3589 
3590  /* Pop the current state because it cannot handle the error token. */
3591  if (yyssp == yyss)
3592  YYABORT;
3593 
3594 
3595  yydestruct ("Error: popping",
3596  yystos[yystate], yyvsp);
3597  YYPOPSTACK (1);
3598  yystate = *yyssp;
3599  YY_STACK_PRINT (yyss, yyssp);
3600  }
3601 
3602  *++yyvsp = yylval;
3603 
3604 
3605  /* Shift the error token. */
3606  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3607 
3608  yystate = yyn;
3609  goto yynewstate;
3610 
3611 
3612 /*-------------------------------------.
3613 | yyacceptlab -- YYACCEPT comes here. |
3614 `-------------------------------------*/
3615 yyacceptlab:
3616  yyresult = 0;
3617  goto yyreturn;
3618 
3619 /*-----------------------------------.
3620 | yyabortlab -- YYABORT comes here. |
3621 `-----------------------------------*/
3622 yyabortlab:
3623  yyresult = 1;
3624  goto yyreturn;
3625 
3626 #if !defined(yyoverflow) || YYERROR_VERBOSE
3627 /*-------------------------------------------------.
3628 | yyexhaustedlab -- memory exhaustion comes here. |
3629 `-------------------------------------------------*/
3630 yyexhaustedlab:
3631  yyerror (YY_("memory exhausted"));
3632  yyresult = 2;
3633  /* Fall through. */
3634 #endif
3635 
3636 yyreturn:
3637  if (yychar != YYEMPTY)
3638  yydestruct ("Cleanup: discarding lookahead",
3639  yytoken, &yylval);
3640  /* Do not reclaim the symbols of the rule which action triggered
3641  this YYABORT or YYACCEPT. */
3642  YYPOPSTACK (yylen);
3643  YY_STACK_PRINT (yyss, yyssp);
3644  while (yyssp != yyss)
3645  {
3646  yydestruct ("Cleanup: popping",
3647  yystos[*yyssp], yyvsp);
3648  YYPOPSTACK (1);
3649  }
3650 #ifndef yyoverflow
3651  if (yyss != yyssa)
3652  YYSTACK_FREE (yyss);
3653 #endif
3654 #if YYERROR_VERBOSE
3655  if (yymsg != yymsgbuf)
3656  YYSTACK_FREE (yymsg);
3657 #endif
3658  /* Make sure YYID is used. */
3659  return YYID (yyresult);
3660 }
3661 
3662 
3663 
3664 /* Line 1675 of yacc.c */
3665 #line 956 "parse_spice.y"
3666 
3667 
3668 int spice_error (char * error) {
3669  fprintf (stderr, "line %d: %s\n", spice_lineno, error);
3670  return 0;
3671 }
3672