pcb 4.1.1
An interactive printed circuit board layout editor.
|
00001 00002 /* A Bison parser, made by GNU Bison 2.4.1. */ 00003 00004 /* Skeleton implementation for Bison's Yacc-like parsers in C 00005 00006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 00007 Free Software Foundation, Inc. 00008 00009 This program is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00021 00022 /* As a special exception, you may create a larger work that contains 00023 part or all of the Bison parser skeleton and distribute that work 00024 under terms of your choice, so long as that work isn't itself a 00025 parser generator using the skeleton or a modified version thereof 00026 as a parser skeleton. Alternatively, if you modify or redistribute 00027 the parser skeleton itself, you may (at your option) remove this 00028 special exception, which will cause the skeleton and the resulting 00029 Bison output files to be licensed under the GNU General Public 00030 License without this special exception. 00031 00032 This special exception was added by the Free Software Foundation in 00033 version 2.2 of Bison. */ 00034 00035 /* C LALR(1) parser skeleton written by Richard Stallman, by 00036 simplifying the original so-called "semantic" parser. */ 00037 00038 /* All symbols defined below should begin with yy or YY, to avoid 00039 infringing on user name space. This should be done even for local 00040 variables, as they might otherwise be expanded by user macros. 00041 There are some unavoidable exceptions within include files to 00042 define necessary library symbols; they are noted "INFRINGES ON 00043 USER NAME SPACE" below. */ 00044 00045 /* Identify Bison output. */ 00046 #define YYBISON 1 00047 00048 /* Bison version. */ 00049 #define YYBISON_VERSION "2.4.1" 00050 00051 /* Skeleton name. */ 00052 #define YYSKELETON_NAME "yacc.c" 00053 00054 /* Pure parsers. */ 00055 #define YYPURE 0 00056 00057 /* Push parsers. */ 00058 #define YYPUSH 0 00059 00060 /* Pull parsers. */ 00061 #define YYPULL 1 00062 00063 /* Using locations. */ 00064 #define YYLSP_NEEDED 0 00065 00066 00067 00068 /* Copy the first part of user declarations. */ 00069 00070 /* Line 189 of yacc.c */ 00071 #line 10 "parse_y.y" 00072 00073 /* 00074 * COPYRIGHT 00075 * 00076 * PCB, interactive printed circuit board design 00077 * Copyright (C) 1994,1995,1996 Thomas Nau 00078 * 00079 * This program is free software; you can redistribute it and/or modify 00080 * it under the terms of the GNU General Public License as published by 00081 * the Free Software Foundation; either version 2 of the License, or 00082 * (at your option) any later version. 00083 * 00084 * This program is distributed in the hope that it will be useful, 00085 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00086 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00087 * GNU General Public License for more details. 00088 * 00089 * You should have received a copy of the GNU General Public License along 00090 * with this program; if not, write to the Free Software Foundation, Inc., 00091 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00092 * 00093 * Contact addresses for paper mail and Email: 00094 * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany 00095 * Thomas.Nau@rz.uni-ulm.de 00096 * 00097 */ 00098 00099 /* grammar to parse ASCII input of PCB description 00100 */ 00101 00102 #ifdef HAVE_CONFIG_H 00103 #include "config.h" 00104 #endif 00105 00106 #include "global.h" 00107 #include "create.h" 00108 #include "data.h" 00109 #include "error.h" 00110 #include "file.h" 00111 #include "layerflags.h" 00112 #include "mymem.h" 00113 #include "misc.h" 00114 #include "parse_l.h" 00115 #include "polygon.h" 00116 #include "remove.h" 00117 #include "rtree.h" 00118 #include "strflags.h" 00119 #include "thermal.h" 00120 #include "move.h" 00121 00122 #ifdef HAVE_LIBDMALLOC 00123 # include <dmalloc.h> /* see http://dmalloc.com */ 00124 #endif 00125 00126 static LayerType *Layer; 00127 static PolygonType *Polygon; 00128 static SymbolType *Symbol; 00129 static int pin_num; 00130 static LibraryMenuType *Menu; 00131 static bool LayerFlag[MAX_ALL_LAYER]; 00132 00133 extern char *yytext; /* defined by LEX */ 00134 extern PCBType *yyPCB; 00135 extern DataType *yyData; 00136 extern ElementType *yyElement; 00137 extern FontType *yyFont; 00138 extern int yylineno; /* linenumber */ 00139 extern char *yyfilename; /* in this file */ 00140 00141 static AttributeListType *attr_list; 00142 00143 int yyerror(const char *s); 00144 int yylex(); 00145 static int check_file_version (int); 00146 00147 static void do_measure (PLMeasure *m, Coord i, double d, int u); 00148 #define M(r,f,d) do_measure (&(r), f, d, 1) 00149 00150 /* Macros for interpreting what "measure" means - integer value only, 00151 old units (mil), or new units (cmil). */ 00152 #define IV(m) integer_value (m) 00153 #define OU(m) old_units (m) 00154 #define NU(m) new_units (m) 00155 00156 static int integer_value (PLMeasure m); 00157 static Coord old_units (PLMeasure m); 00158 static Coord new_units (PLMeasure m); 00159 00160 #define YYDEBUG 1 00161 #define YYERROR_VERBOSE 1 00162 00163 #include "parse_y.h" 00164 00165 00166 00167 /* Line 189 of yacc.c */ 00168 #line 169 "parse_y.c" 00169 00170 /* Enabling traces. */ 00171 #ifndef YYDEBUG 00172 # define YYDEBUG 0 00173 #endif 00174 00175 /* Enabling verbose error messages. */ 00176 #ifdef YYERROR_VERBOSE 00177 # undef YYERROR_VERBOSE 00178 # define YYERROR_VERBOSE 1 00179 #else 00180 # define YYERROR_VERBOSE 0 00181 #endif 00182 00183 /* Enabling the token table. */ 00184 #ifndef YYTOKEN_TABLE 00185 # define YYTOKEN_TABLE 0 00186 #endif 00187 00188 00189 /* Tokens. */ 00190 #ifndef YYTOKENTYPE 00191 # define YYTOKENTYPE 00192 /* Put the tokens into the symbol table, so that GDB and other debuggers 00193 know about them. */ 00194 enum yytokentype { 00195 FLOATING = 258, 00196 INTEGER = 259, 00197 CHAR_CONST = 260, 00198 STRING = 261, 00199 T_FILEVERSION = 262, 00200 T_PCB = 263, 00201 T_LAYER = 264, 00202 T_VIA = 265, 00203 T_RAT = 266, 00204 T_LINE = 267, 00205 T_ARC = 268, 00206 T_RECTANGLE = 269, 00207 T_TEXT = 270, 00208 T_ELEMENTLINE = 271, 00209 T_ELEMENT = 272, 00210 T_PIN = 273, 00211 T_PAD = 274, 00212 T_GRID = 275, 00213 T_FLAGS = 276, 00214 T_SYMBOL = 277, 00215 T_SYMBOLLINE = 278, 00216 T_CURSOR = 279, 00217 T_ELEMENTARC = 280, 00218 T_MARK = 281, 00219 T_GROUPS = 282, 00220 T_STYLES = 283, 00221 T_POLYGON = 284, 00222 T_POLYGON_HOLE = 285, 00223 T_NETLIST = 286, 00224 T_NET = 287, 00225 T_CONN = 288, 00226 T_AREA = 289, 00227 T_THERMAL = 290, 00228 T_DRC = 291, 00229 T_ATTRIBUTE = 292, 00230 T_UMIL = 293, 00231 T_CMIL = 294, 00232 T_MIL = 295, 00233 T_IN = 296, 00234 T_NM = 297, 00235 T_UM = 298, 00236 T_MM = 299, 00237 T_M = 300, 00238 T_KM = 301, 00239 T_PX = 302 00240 }; 00241 #endif 00242 /* Tokens. */ 00243 #define FLOATING 258 00244 #define INTEGER 259 00245 #define CHAR_CONST 260 00246 #define STRING 261 00247 #define T_FILEVERSION 262 00248 #define T_PCB 263 00249 #define T_LAYER 264 00250 #define T_VIA 265 00251 #define T_RAT 266 00252 #define T_LINE 267 00253 #define T_ARC 268 00254 #define T_RECTANGLE 269 00255 #define T_TEXT 270 00256 #define T_ELEMENTLINE 271 00257 #define T_ELEMENT 272 00258 #define T_PIN 273 00259 #define T_PAD 274 00260 #define T_GRID 275 00261 #define T_FLAGS 276 00262 #define T_SYMBOL 277 00263 #define T_SYMBOLLINE 278 00264 #define T_CURSOR 279 00265 #define T_ELEMENTARC 280 00266 #define T_MARK 281 00267 #define T_GROUPS 282 00268 #define T_STYLES 283 00269 #define T_POLYGON 284 00270 #define T_POLYGON_HOLE 285 00271 #define T_NETLIST 286 00272 #define T_NET 287 00273 #define T_CONN 288 00274 #define T_AREA 289 00275 #define T_THERMAL 290 00276 #define T_DRC 291 00277 #define T_ATTRIBUTE 292 00278 #define T_UMIL 293 00279 #define T_CMIL 294 00280 #define T_MIL 295 00281 #define T_IN 296 00282 #define T_NM 297 00283 #define T_UM 298 00284 #define T_MM 299 00285 #define T_M 300 00286 #define T_KM 301 00287 #define T_PX 302 00288 00289 00290 00291 00292 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00293 typedef union YYSTYPE 00294 { 00295 00296 /* Line 214 of yacc.c */ 00297 #line 108 "parse_y.y" 00298 00299 int integer; 00300 double number; 00301 char *string; 00302 FlagType flagtype; 00303 PLMeasure measure; 00304 00305 00306 00307 /* Line 214 of yacc.c */ 00308 #line 309 "parse_y.c" 00309 } YYSTYPE; 00310 # define YYSTYPE_IS_TRIVIAL 1 00311 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00312 # define YYSTYPE_IS_DECLARED 1 00313 #endif 00314 00315 00316 /* Copy the second part of user declarations. */ 00317 00318 00319 /* Line 264 of yacc.c */ 00320 #line 321 "parse_y.c" 00321 00322 #ifdef short 00323 # undef short 00324 #endif 00325 00326 #ifdef YYTYPE_UINT8 00327 typedef YYTYPE_UINT8 yytype_uint8; 00328 #else 00329 typedef unsigned char yytype_uint8; 00330 #endif 00331 00332 #ifdef YYTYPE_INT8 00333 typedef YYTYPE_INT8 yytype_int8; 00334 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00335 || defined __cplusplus || defined _MSC_VER) 00336 typedef signed char yytype_int8; 00337 #else 00338 typedef short int yytype_int8; 00339 #endif 00340 00341 #ifdef YYTYPE_UINT16 00342 typedef YYTYPE_UINT16 yytype_uint16; 00343 #else 00344 typedef unsigned short int yytype_uint16; 00345 #endif 00346 00347 #ifdef YYTYPE_INT16 00348 typedef YYTYPE_INT16 yytype_int16; 00349 #else 00350 typedef short int yytype_int16; 00351 #endif 00352 00353 #ifndef YYSIZE_T 00354 # ifdef __SIZE_TYPE__ 00355 # define YYSIZE_T __SIZE_TYPE__ 00356 # elif defined size_t 00357 # define YYSIZE_T size_t 00358 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00359 || defined __cplusplus || defined _MSC_VER) 00360 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00361 # define YYSIZE_T size_t 00362 # else 00363 # define YYSIZE_T unsigned int 00364 # endif 00365 #endif 00366 00367 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00368 00369 #ifndef YY_ 00370 # if YYENABLE_NLS 00371 # if ENABLE_NLS 00372 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00373 # define YY_(msgid) dgettext ("bison-runtime", msgid) 00374 # endif 00375 # endif 00376 # ifndef YY_ 00377 # define YY_(msgid) msgid 00378 # endif 00379 #endif 00380 00381 /* Suppress unused-variable warnings by "using" E. */ 00382 #if ! defined lint || defined __GNUC__ 00383 # define YYUSE(e) ((void) (e)) 00384 #else 00385 # define YYUSE(e) /* empty */ 00386 #endif 00387 00388 /* Identity function, used to suppress warnings about constant conditions. */ 00389 #ifndef lint 00390 # define YYID(n) (n) 00391 #else 00392 #if (defined __STDC__ || defined __C99__FUNC__ \ 00393 || defined __cplusplus || defined _MSC_VER) 00394 static int 00395 YYID (int yyi) 00396 #else 00397 static int 00398 YYID (yyi) 00399 int yyi; 00400 #endif 00401 { 00402 return yyi; 00403 } 00404 #endif 00405 00406 #if ! defined yyoverflow || YYERROR_VERBOSE 00407 00408 /* The parser invokes alloca or malloc; define the necessary symbols. */ 00409 00410 # ifdef YYSTACK_USE_ALLOCA 00411 # if YYSTACK_USE_ALLOCA 00412 # ifdef __GNUC__ 00413 # define YYSTACK_ALLOC __builtin_alloca 00414 # elif defined __BUILTIN_VA_ARG_INCR 00415 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 00416 # elif defined _AIX 00417 # define YYSTACK_ALLOC __alloca 00418 # elif defined _MSC_VER 00419 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 00420 # define alloca _alloca 00421 # else 00422 # define YYSTACK_ALLOC alloca 00423 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00424 || defined __cplusplus || defined _MSC_VER) 00425 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00426 # ifndef _STDLIB_H 00427 # define _STDLIB_H 1 00428 # endif 00429 # endif 00430 # endif 00431 # endif 00432 # endif 00433 00434 # ifdef YYSTACK_ALLOC 00435 /* Pacify GCC's `empty if-body' warning. */ 00436 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 00437 # ifndef YYSTACK_ALLOC_MAXIMUM 00438 /* The OS might guarantee only one guard page at the bottom of the stack, 00439 and a page size can be as small as 4096 bytes. So we cannot safely 00440 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 00441 to allow for a few compiler-allocated temporary stack slots. */ 00442 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 00443 # endif 00444 # else 00445 # define YYSTACK_ALLOC YYMALLOC 00446 # define YYSTACK_FREE YYFREE 00447 # ifndef YYSTACK_ALLOC_MAXIMUM 00448 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 00449 # endif 00450 # if (defined __cplusplus && ! defined _STDLIB_H \ 00451 && ! ((defined YYMALLOC || defined malloc) \ 00452 && (defined YYFREE || defined free))) 00453 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00454 # ifndef _STDLIB_H 00455 # define _STDLIB_H 1 00456 # endif 00457 # endif 00458 # ifndef YYMALLOC 00459 # define YYMALLOC malloc 00460 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00461 || defined __cplusplus || defined _MSC_VER) 00462 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 00463 # endif 00464 # endif 00465 # ifndef YYFREE 00466 # define YYFREE free 00467 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00468 || defined __cplusplus || defined _MSC_VER) 00469 void free (void *); /* INFRINGES ON USER NAME SPACE */ 00470 # endif 00471 # endif 00472 # endif 00473 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 00474 00475 00476 #if (! defined yyoverflow \ 00477 && (! defined __cplusplus \ 00478 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 00479 00480 /* A type that is properly aligned for any stack member. */ 00481 union yyalloc 00482 { 00483 yytype_int16 yyss_alloc; 00484 YYSTYPE yyvs_alloc; 00485 }; 00486 00487 /* The size of the maximum gap between one aligned stack and the next. */ 00488 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 00489 00490 /* The size of an array large to enough to hold all stacks, each with 00491 N elements. */ 00492 # define YYSTACK_BYTES(N) \ 00493 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 00494 + YYSTACK_GAP_MAXIMUM) 00495 00496 /* Copy COUNT objects from FROM to TO. The source and destination do 00497 not overlap. */ 00498 # ifndef YYCOPY 00499 # if defined __GNUC__ && 1 < __GNUC__ 00500 # define YYCOPY(To, From, Count) \ 00501 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 00502 # else 00503 # define YYCOPY(To, From, Count) \ 00504 do \ 00505 { \ 00506 YYSIZE_T yyi; \ 00507 for (yyi = 0; yyi < (Count); yyi++) \ 00508 (To)[yyi] = (From)[yyi]; \ 00509 } \ 00510 while (YYID (0)) 00511 # endif 00512 # endif 00513 00514 /* Relocate STACK from its old location to the new one. The 00515 local variables YYSIZE and YYSTACKSIZE give the old and new number of 00516 elements in the stack, and YYPTR gives the new location of the 00517 stack. Advance YYPTR to a properly aligned location for the next 00518 stack. */ 00519 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 00520 do \ 00521 { \ 00522 YYSIZE_T yynewbytes; \ 00523 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 00524 Stack = &yyptr->Stack_alloc; \ 00525 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 00526 yyptr += yynewbytes / sizeof (*yyptr); \ 00527 } \ 00528 while (YYID (0)) 00529 00530 #endif 00531 00532 /* YYFINAL -- State number of the termination state. */ 00533 #define YYFINAL 10 00534 /* YYLAST -- Last index in YYTABLE. */ 00535 #define YYLAST 673 00536 00537 /* YYNTOKENS -- Number of terminals. */ 00538 #define YYNTOKENS 52 00539 /* YYNNTS -- Number of nonterminals. */ 00540 #define YYNNTS 107 00541 /* YYNRULES -- Number of rules. */ 00542 #define YYNRULES 206 00543 /* YYNRULES -- Number of states. */ 00544 #define YYNSTATES 622 00545 00546 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 00547 #define YYUNDEFTOK 2 00548 #define YYMAXUTOK 302 00549 00550 #define YYTRANSLATE(YYX) \ 00551 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 00552 00553 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 00554 static const yytype_uint8 yytranslate[] = 00555 { 00556 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00560 50, 51, 2, 2, 2, 2, 2, 2, 2, 2, 00561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00565 2, 48, 2, 49, 2, 2, 2, 2, 2, 2, 00566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00571 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00572 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00573 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00574 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00575 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00581 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 00582 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 00583 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 00584 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 00585 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 00586 45, 46, 47 00587 }; 00588 00589 #if YYDEBUG 00590 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 00591 YYRHS. */ 00592 static const yytype_uint16 yyprhs[] = 00593 { 00594 0, 0, 3, 5, 7, 9, 11, 12, 27, 28, 00595 31, 32, 35, 37, 38, 39, 42, 43, 48, 53, 00596 60, 67, 69, 71, 73, 80, 88, 96, 103, 110, 00597 111, 112, 117, 118, 123, 124, 126, 128, 130, 137, 00598 145, 155, 160, 165, 166, 171, 172, 177, 182, 183, 00599 185, 186, 188, 191, 193, 194, 197, 199, 201, 203, 00600 205, 207, 209, 211, 213, 215, 217, 231, 243, 255, 00601 266, 276, 285, 296, 307, 308, 319, 321, 322, 324, 00602 327, 329, 331, 333, 335, 337, 339, 348, 350, 352, 00603 354, 355, 358, 360, 371, 382, 392, 405, 418, 430, 00604 439, 449, 459, 460, 470, 471, 474, 475, 481, 482, 00605 485, 490, 495, 497, 499, 501, 503, 505, 506, 519, 00606 520, 536, 537, 554, 555, 574, 575, 594, 596, 599, 00607 601, 603, 605, 607, 609, 618, 627, 638, 649, 655, 00608 661, 662, 665, 667, 670, 672, 674, 676, 678, 687, 00609 696, 707, 718, 719, 722, 735, 748, 759, 769, 778, 00610 792, 806, 818, 829, 831, 833, 835, 838, 842, 849, 00611 856, 858, 860, 861, 864, 867, 876, 885, 887, 888, 00612 895, 897, 898, 900, 903, 904, 914, 916, 917, 919, 00613 922, 927, 933, 935, 936, 938, 940, 942, 945, 948, 00614 951, 954, 957, 960, 963, 966, 969 00615 }; 00616 00617 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 00618 static const yytype_int16 yyrhs[] = 00619 { 00620 53, 0, -1, 54, -1, 57, -1, 60, -1, 1, 00621 -1, -1, 55, 62, 63, 64, 68, 69, 70, 71, 00622 75, 76, 77, 59, 78, 146, -1, -1, 56, 112, 00623 -1, -1, 58, 78, -1, 60, -1, -1, -1, 61, 00624 139, -1, -1, 7, 48, 4, 49, -1, 8, 50, 00625 6, 51, -1, 8, 50, 6, 158, 158, 51, -1, 00626 8, 48, 6, 158, 158, 49, -1, 65, -1, 66, 00627 -1, 67, -1, 20, 50, 158, 158, 158, 51, -1, 00628 20, 50, 158, 158, 158, 4, 51, -1, 20, 48, 00629 158, 158, 158, 4, 49, -1, 24, 50, 158, 158, 00630 157, 51, -1, 24, 48, 158, 158, 157, 49, -1, 00631 -1, -1, 34, 48, 157, 49, -1, -1, 35, 48, 00632 157, 49, -1, -1, 72, -1, 73, -1, 74, -1, 00633 36, 48, 158, 158, 158, 49, -1, 36, 48, 158, 00634 158, 158, 158, 49, -1, 36, 48, 158, 158, 158, 00635 158, 158, 158, 49, -1, 21, 50, 4, 51, -1, 00636 21, 50, 6, 51, -1, -1, 27, 50, 6, 51, 00637 -1, -1, 28, 50, 6, 51, -1, 28, 48, 6, 00638 49, -1, -1, 79, -1, -1, 80, -1, 79, 80, 00639 -1, 82, -1, -1, 81, 155, -1, 89, -1, 90, 00640 -1, 112, -1, 1, -1, 83, -1, 84, -1, 85, 00641 -1, 86, -1, 87, -1, 88, -1, 10, 48, 158, 00642 158, 158, 158, 158, 158, 4, 4, 6, 138, 49, 00643 -1, 10, 48, 158, 158, 158, 158, 158, 158, 6, 00644 138, 49, -1, 10, 50, 158, 158, 158, 158, 158, 00645 158, 6, 4, 51, -1, 10, 50, 158, 158, 158, 00646 158, 158, 6, 4, 51, -1, 10, 50, 158, 158, 00647 158, 158, 6, 4, 51, -1, 10, 50, 158, 158, 00648 158, 6, 4, 51, -1, 11, 48, 158, 158, 4, 00649 158, 158, 4, 138, 49, -1, 11, 50, 158, 158, 00650 4, 158, 158, 4, 4, 51, -1, -1, 9, 50, 00651 4, 6, 156, 51, 50, 91, 92, 51, -1, 93, 00652 -1, -1, 94, -1, 93, 94, -1, 96, -1, 97, 00653 -1, 98, -1, 99, -1, 100, -1, 101, -1, 14, 00654 50, 158, 158, 158, 158, 4, 51, -1, 104, -1, 00655 103, -1, 102, -1, -1, 95, 155, -1, 105, -1, 00656 12, 48, 158, 158, 158, 158, 158, 158, 138, 49, 00657 -1, 12, 50, 158, 158, 158, 158, 158, 158, 4, 00658 51, -1, 12, 50, 158, 158, 158, 158, 158, 158, 00659 51, -1, 13, 48, 158, 158, 158, 158, 158, 158, 00660 157, 157, 138, 49, -1, 13, 50, 158, 158, 158, 00661 158, 158, 158, 157, 157, 4, 51, -1, 13, 50, 00662 158, 158, 158, 158, 158, 158, 157, 4, 51, -1, 00663 15, 50, 158, 158, 157, 6, 4, 51, -1, 15, 00664 50, 158, 158, 157, 157, 6, 4, 51, -1, 15, 00665 48, 158, 158, 157, 157, 6, 138, 49, -1, -1, 00666 29, 50, 138, 51, 50, 106, 110, 107, 51, -1, 00667 -1, 107, 108, -1, -1, 30, 50, 109, 110, 51, 00668 -1, -1, 111, 110, -1, 50, 158, 158, 51, -1, 00669 48, 158, 158, 49, -1, 113, -1, 115, -1, 117, 00670 -1, 119, -1, 121, -1, -1, 17, 50, 6, 6, 00671 158, 158, 4, 51, 50, 114, 123, 51, -1, -1, 00672 17, 50, 4, 6, 6, 158, 158, 158, 158, 4, 00673 51, 50, 116, 123, 51, -1, -1, 17, 50, 4, 00674 6, 6, 6, 158, 158, 158, 158, 4, 51, 50, 00675 118, 123, 51, -1, -1, 17, 50, 4, 6, 6, 00676 6, 158, 158, 158, 158, 157, 157, 4, 51, 50, 00677 120, 126, 51, -1, -1, 17, 48, 138, 6, 6, 00678 6, 158, 158, 158, 158, 157, 157, 138, 49, 50, 00679 122, 126, 51, -1, 124, -1, 123, 124, -1, 131, 00680 -1, 132, -1, 133, -1, 136, -1, 137, -1, 16, 00681 48, 158, 158, 158, 158, 158, 49, -1, 16, 50, 00682 158, 158, 158, 158, 158, 51, -1, 25, 48, 158, 00683 158, 158, 158, 157, 157, 158, 49, -1, 25, 50, 00684 158, 158, 158, 158, 157, 157, 158, 51, -1, 26, 00685 48, 158, 158, 49, -1, 26, 50, 158, 158, 51, 00686 -1, -1, 125, 155, -1, 127, -1, 126, 127, -1, 00687 130, -1, 129, -1, 135, -1, 134, -1, 16, 48, 00688 158, 158, 158, 158, 158, 49, -1, 16, 50, 158, 00689 158, 158, 158, 158, 51, -1, 25, 48, 158, 158, 00690 158, 158, 157, 157, 158, 49, -1, 25, 50, 158, 00691 158, 158, 158, 157, 157, 158, 51, -1, -1, 128, 00692 155, -1, 18, 48, 158, 158, 158, 158, 158, 158, 00693 6, 6, 138, 49, -1, 18, 50, 158, 158, 158, 00694 158, 158, 158, 6, 6, 4, 51, -1, 18, 50, 00695 158, 158, 158, 158, 6, 6, 4, 51, -1, 18, 00696 50, 158, 158, 158, 158, 6, 4, 51, -1, 18, 00697 50, 158, 158, 158, 6, 4, 51, -1, 19, 48, 00698 158, 158, 158, 158, 158, 158, 158, 6, 6, 138, 00699 49, -1, 19, 50, 158, 158, 158, 158, 158, 158, 00700 158, 6, 6, 4, 51, -1, 19, 50, 158, 158, 00701 158, 158, 158, 6, 6, 4, 51, -1, 19, 50, 00702 158, 158, 158, 158, 158, 6, 4, 51, -1, 4, 00703 -1, 6, -1, 140, -1, 139, 140, -1, 141, 143, 00704 51, -1, 22, 48, 142, 158, 49, 50, -1, 22, 00705 50, 142, 158, 51, 50, -1, 4, -1, 5, -1, 00706 -1, 143, 144, -1, 143, 145, -1, 23, 50, 158, 00707 158, 158, 158, 158, 51, -1, 23, 48, 158, 158, 00708 158, 158, 158, 49, -1, 147, -1, -1, 31, 50, 00709 51, 50, 148, 51, -1, 149, -1, -1, 150, -1, 00710 149, 150, -1, -1, 32, 50, 6, 6, 51, 50, 00711 151, 152, 51, -1, 153, -1, -1, 154, -1, 153, 00712 154, -1, 33, 50, 6, 51, -1, 37, 50, 6, 00713 6, 51, -1, 6, -1, -1, 3, -1, 4, -1, 00714 157, -1, 157, 38, -1, 157, 39, -1, 157, 40, 00715 -1, 157, 41, -1, 157, 42, -1, 157, 47, -1, 00716 157, 43, -1, 157, 44, -1, 157, 45, -1, 157, 00717 46, -1 00718 }; 00719 00720 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 00721 static const yytype_uint16 yyrline[] = 00722 { 00723 0, 134, 134, 135, 136, 137, 172, 172, 225, 225, 00724 256, 256, 275, 276, 281, 281, 321, 323, 362, 368, 00725 374, 412, 413, 414, 417, 425, 438, 477, 482, 487, 00726 503, 505, 530, 532, 563, 565, 566, 567, 571, 581, 00727 592, 619, 623, 628, 656, 665, 718, 727, 736, 740, 00728 741, 745, 746, 750, 751, 751, 752, 753, 754, 755, 00729 759, 760, 761, 762, 763, 764, 826, 836, 846, 857, 00730 867, 877, 922, 927, 971, 970, 1000, 1001, 1005, 1006, 00731 1010, 1011, 1012, 1013, 1014, 1015, 1017, 1022, 1023, 1024, 00732 1025, 1025, 1026, 1065, 1074, 1083, 1140, 1149, 1158, 1204, 00733 1214, 1232, 1296, 1295, 1335, 1337, 1342, 1341, 1348, 1350, 00734 1355, 1359, 1430, 1431, 1432, 1433, 1434, 1442, 1441, 1460, 00735 1459, 1478, 1477, 1498, 1496, 1520, 1518, 1620, 1621, 1625, 00736 1626, 1627, 1628, 1629, 1631, 1636, 1641, 1646, 1651, 1656, 00737 1661, 1661, 1665, 1666, 1670, 1671, 1672, 1673, 1675, 1681, 00738 1688, 1693, 1698, 1698, 1748, 1760, 1772, 1783, 1799, 1862, 00739 1876, 1889, 1900, 1911, 1912, 1916, 1917, 1950, 1952, 1968, 00740 1987, 1988, 1991, 1993, 1994, 2024, 2031, 2047, 2048, 2052, 00741 2057, 2058, 2062, 2063, 2086, 2085, 2095, 2096, 2100, 2101, 00742 2120, 2179, 2187, 2188, 2192, 2193, 2198, 2199, 2200, 2201, 00743 2202, 2203, 2204, 2205, 2206, 2207, 2208 00744 }; 00745 #endif 00746 00747 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 00748 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 00749 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 00750 static const char *const yytname[] = 00751 { 00752 "$end", "error", "$undefined", "FLOATING", "INTEGER", "CHAR_CONST", 00753 "STRING", "T_FILEVERSION", "T_PCB", "T_LAYER", "T_VIA", "T_RAT", 00754 "T_LINE", "T_ARC", "T_RECTANGLE", "T_TEXT", "T_ELEMENTLINE", "T_ELEMENT", 00755 "T_PIN", "T_PAD", "T_GRID", "T_FLAGS", "T_SYMBOL", "T_SYMBOLLINE", 00756 "T_CURSOR", "T_ELEMENTARC", "T_MARK", "T_GROUPS", "T_STYLES", 00757 "T_POLYGON", "T_POLYGON_HOLE", "T_NETLIST", "T_NET", "T_CONN", "T_AREA", 00758 "T_THERMAL", "T_DRC", "T_ATTRIBUTE", "T_UMIL", "T_CMIL", "T_MIL", "T_IN", 00759 "T_NM", "T_UM", "T_MM", "T_M", "T_KM", "T_PX", "'['", "']'", "'('", 00760 "')'", "$accept", "parse", "parsepcb", "$@1", "$@2", "parsedata", "$@3", 00761 "pcbfont", "parsefont", "$@4", "pcbfileversion", "pcbname", "pcbgrid", 00762 "pcbgridold", "pcbgridnew", "pcbhigrid", "pcbcursor", "polyarea", 00763 "pcbthermal", "pcbdrc", "pcbdrc1", "pcbdrc2", "pcbdrc3", "pcbflags", 00764 "pcbgroups", "pcbstyles", "pcbdata", "pcbdefinitions", "pcbdefinition", 00765 "$@5", "via", "via_ehi_format", "via_hi_format", "via_2.0_format", 00766 "via_1.7_format", "via_newformat", "via_oldformat", "rats", "layer", 00767 "$@6", "layerdata", "layerdefinitions", "layerdefinition", "$@7", 00768 "line_hi_format", "line_1.7_format", "line_oldformat", "arc_hi_format", 00769 "arc_1.7_format", "arc_oldformat", "text_oldformat", "text_newformat", 00770 "text_hi_format", "polygon_format", "$@8", "polygonholes", "polygonhole", 00771 "$@9", "polygonpoints", "polygonpoint", "element", "element_oldformat", 00772 "$@10", "element_1.3.4_format", "$@11", "element_newformat", "$@12", 00773 "element_1.7_format", "$@13", "element_hi_format", "$@14", 00774 "elementdefinitions", "elementdefinition", "$@15", "relementdefs", 00775 "relementdef", "$@16", "pin_hi_format", "pin_1.7_format", 00776 "pin_1.6.3_format", "pin_newformat", "pin_oldformat", "pad_hi_format", 00777 "pad_1.7_format", "pad_newformat", "pad", "flags", "symbols", "symbol", 00778 "symbolhead", "symbolid", "symboldata", "symboldefinition", 00779 "hiressymbol", "pcbnetlist", "pcbnetdef", "nets", "netdefs", "net", 00780 "$@17", "connections", "conndefs", "conn", "attribute", "opt_string", 00781 "number", "measure", 0 00782 }; 00783 #endif 00784 00785 # ifdef YYPRINT 00786 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 00787 token YYLEX-NUM. */ 00788 static const yytype_uint16 yytoknum[] = 00789 { 00790 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 00791 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 00792 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 00793 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 00794 295, 296, 297, 298, 299, 300, 301, 302, 91, 93, 00795 40, 41 00796 }; 00797 # endif 00798 00799 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 00800 static const yytype_uint8 yyr1[] = 00801 { 00802 0, 52, 53, 53, 53, 53, 55, 54, 56, 54, 00803 58, 57, 59, 59, 61, 60, 62, 62, 63, 63, 00804 63, 64, 64, 64, 65, 66, 67, 68, 68, 68, 00805 69, 69, 70, 70, 71, 71, 71, 71, 72, 73, 00806 74, 75, 75, 75, 76, 76, 77, 77, 77, 78, 00807 78, 79, 79, 80, 81, 80, 80, 80, 80, 80, 00808 82, 82, 82, 82, 82, 82, 83, 84, 85, 86, 00809 87, 88, 89, 89, 91, 90, 92, 92, 93, 93, 00810 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 00811 95, 94, 94, 96, 97, 98, 99, 100, 101, 102, 00812 103, 104, 106, 105, 107, 107, 109, 108, 110, 110, 00813 111, 111, 112, 112, 112, 112, 112, 114, 113, 116, 00814 115, 118, 117, 120, 119, 122, 121, 123, 123, 124, 00815 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 00816 125, 124, 126, 126, 127, 127, 127, 127, 127, 127, 00817 127, 127, 128, 127, 129, 130, 131, 132, 133, 134, 00818 135, 136, 137, 138, 138, 139, 139, 140, 141, 141, 00819 142, 142, 143, 143, 143, 144, 145, 146, 146, 147, 00820 148, 148, 149, 149, 151, 150, 152, 152, 153, 153, 00821 154, 155, 156, 156, 157, 157, 158, 158, 158, 158, 00822 158, 158, 158, 158, 158, 158, 158 00823 }; 00824 00825 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 00826 static const yytype_uint8 yyr2[] = 00827 { 00828 0, 2, 1, 1, 1, 1, 0, 14, 0, 2, 00829 0, 2, 1, 0, 0, 2, 0, 4, 4, 6, 00830 6, 1, 1, 1, 6, 7, 7, 6, 6, 0, 00831 0, 4, 0, 4, 0, 1, 1, 1, 6, 7, 00832 9, 4, 4, 0, 4, 0, 4, 4, 0, 1, 00833 0, 1, 2, 1, 0, 2, 1, 1, 1, 1, 00834 1, 1, 1, 1, 1, 1, 13, 11, 11, 10, 00835 9, 8, 10, 10, 0, 10, 1, 0, 1, 2, 00836 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 00837 0, 2, 1, 10, 10, 9, 12, 12, 11, 8, 00838 9, 9, 0, 9, 0, 2, 0, 5, 0, 2, 00839 4, 4, 1, 1, 1, 1, 1, 0, 12, 0, 00840 15, 0, 16, 0, 18, 0, 18, 1, 2, 1, 00841 1, 1, 1, 1, 8, 8, 10, 10, 5, 5, 00842 0, 2, 1, 2, 1, 1, 1, 1, 8, 8, 00843 10, 10, 0, 2, 12, 12, 10, 9, 8, 13, 00844 13, 11, 10, 1, 1, 1, 2, 3, 6, 6, 00845 1, 1, 0, 2, 2, 8, 8, 1, 0, 6, 00846 1, 0, 1, 2, 0, 9, 1, 0, 1, 2, 00847 4, 5, 1, 0, 1, 1, 1, 2, 2, 2, 00848 2, 2, 2, 2, 2, 2, 2 00849 }; 00850 00851 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 00852 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 00853 means the default is an error. */ 00854 static const yytype_uint8 yydefact[] = 00855 { 00856 0, 5, 0, 2, 16, 0, 3, 0, 4, 0, 00857 1, 0, 0, 0, 9, 112, 113, 114, 115, 116, 00858 59, 0, 0, 0, 11, 0, 51, 0, 53, 60, 00859 61, 62, 63, 64, 65, 56, 57, 58, 0, 15, 00860 165, 172, 0, 0, 0, 0, 0, 0, 0, 0, 00861 0, 0, 52, 0, 55, 0, 0, 166, 0, 0, 00862 0, 0, 0, 29, 21, 22, 23, 163, 164, 0, 00863 0, 0, 0, 194, 195, 196, 0, 0, 0, 0, 00864 0, 170, 171, 0, 0, 0, 167, 173, 174, 17, 00865 0, 0, 0, 0, 0, 30, 0, 0, 0, 193, 00866 197, 198, 199, 200, 201, 203, 204, 205, 206, 202, 00867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00868 18, 0, 0, 0, 0, 0, 0, 32, 0, 0, 00869 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 00870 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00871 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00872 0, 191, 168, 169, 0, 0, 20, 19, 0, 0, 00873 0, 0, 0, 0, 0, 43, 35, 36, 37, 0, 00874 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 00875 0, 0, 0, 0, 24, 0, 0, 31, 0, 0, 00876 0, 45, 0, 0, 0, 0, 77, 0, 71, 0, 00877 0, 0, 0, 0, 0, 0, 26, 25, 28, 27, 00878 33, 0, 0, 0, 48, 0, 0, 0, 117, 0, 00879 0, 0, 0, 0, 0, 76, 78, 0, 80, 81, 00880 82, 83, 84, 85, 89, 88, 87, 92, 0, 0, 00881 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00882 0, 0, 13, 0, 0, 0, 140, 0, 0, 0, 00883 0, 0, 0, 0, 0, 75, 79, 91, 0, 0, 00884 69, 0, 72, 73, 176, 175, 0, 41, 42, 0, 00885 0, 0, 0, 12, 0, 195, 0, 0, 0, 0, 00886 0, 0, 0, 140, 127, 0, 129, 130, 131, 132, 00887 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00888 67, 68, 38, 0, 44, 0, 0, 178, 0, 0, 00889 0, 119, 0, 0, 0, 0, 0, 0, 0, 0, 00890 118, 128, 141, 0, 0, 0, 0, 0, 0, 0, 00891 0, 0, 39, 0, 47, 46, 0, 7, 177, 0, 00892 121, 0, 140, 0, 0, 0, 0, 0, 0, 0, 00893 0, 0, 0, 0, 0, 0, 0, 0, 102, 66, 00894 0, 0, 0, 140, 0, 140, 0, 0, 0, 0, 00895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00896 0, 0, 108, 40, 0, 125, 140, 123, 120, 0, 00897 0, 0, 0, 0, 0, 138, 139, 0, 0, 0, 00898 0, 0, 0, 0, 0, 0, 0, 104, 108, 181, 00899 152, 122, 152, 0, 0, 0, 0, 0, 0, 0, 00900 0, 0, 0, 0, 86, 0, 99, 0, 0, 0, 00901 0, 109, 0, 0, 180, 182, 0, 0, 0, 0, 00902 152, 142, 0, 145, 144, 147, 146, 152, 0, 0, 00903 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, 00904 101, 100, 0, 0, 0, 103, 105, 0, 179, 183, 00905 0, 0, 0, 0, 0, 0, 0, 0, 126, 143, 00906 153, 124, 134, 135, 158, 0, 0, 0, 0, 0, 00907 93, 94, 0, 195, 0, 111, 110, 106, 0, 0, 00908 0, 0, 0, 0, 0, 0, 0, 157, 0, 0, 00909 0, 0, 0, 0, 98, 0, 108, 0, 0, 0, 00910 0, 0, 0, 0, 0, 0, 156, 162, 0, 136, 00911 137, 96, 97, 0, 0, 0, 0, 0, 0, 0, 00912 0, 0, 0, 161, 107, 184, 0, 0, 0, 0, 00913 0, 0, 0, 0, 187, 0, 0, 0, 0, 0, 00914 0, 0, 0, 0, 0, 186, 188, 148, 149, 0, 00915 0, 0, 0, 0, 0, 0, 185, 189, 0, 0, 00916 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 00917 151, 190, 0, 0, 0, 0, 154, 155, 0, 0, 00918 159, 160 00919 }; 00920 00921 /* YYDEFGOTO[NTERM-NUM]. */ 00922 static const yytype_int16 yydefgoto[] = 00923 { 00924 -1, 2, 3, 4, 5, 6, 7, 292, 8, 9, 00925 12, 44, 63, 64, 65, 66, 95, 127, 150, 175, 00926 176, 177, 178, 201, 224, 262, 24, 25, 26, 27, 00927 28, 29, 30, 31, 32, 33, 34, 35, 36, 206, 00928 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 00929 244, 245, 246, 247, 402, 450, 486, 536, 427, 428, 00930 37, 15, 266, 16, 362, 17, 383, 18, 432, 19, 00931 430, 303, 304, 305, 460, 461, 462, 463, 464, 306, 00932 307, 308, 465, 466, 309, 310, 69, 39, 40, 41, 00933 83, 58, 87, 88, 357, 358, 453, 454, 455, 574, 00934 584, 585, 586, 54, 132, 75, 76 00935 }; 00936 00937 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 00938 STATE-NUM. */ 00939 #define YYPACT_NINF -425 00940 static const yytype_int16 yypact[] = 00941 { 00942 151, -425, 10, -425, 71, 19, -425, 22, -425, 67, 00943 -425, 65, 86, -2, -425, -425, -425, -425, -425, -425, 00944 -425, 68, 17, 29, -425, 169, -425, 84, -425, -425, 00945 -425, -425, -425, -425, -425, -425, -425, -425, 40, 67, 00946 -425, -425, 120, 51, 113, 46, 183, 135, 53, 53, 00947 53, 53, -425, 90, -425, 16, 16, -425, -14, 95, 00948 139, 150, 191, 133, -425, -425, -425, -425, -425, 158, 00949 161, 175, 184, -425, -425, 213, 53, 53, 53, 53, 00950 187, -425, -425, 53, 53, 197, -425, -425, -425, -425, 00951 53, 2, 53, 53, 228, 148, 192, 198, 53, 201, 00952 -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, 00953 53, 53, 199, 209, 208, 168, 180, 53, 53, 53, 00954 -425, 53, 53, 53, 53, 53, 177, 200, 220, 60, 00955 53, -425, 210, 53, 102, 53, 53, 218, 188, 194, 00956 53, 53, 232, 241, 53, 53, 53, 53, 53, 229, 00957 266, 53, 53, 53, 295, 253, 53, 323, 193, 53, 00958 53, -425, -425, -425, 53, 53, -425, -425, 327, 3, 00959 53, 53, 257, 53, 296, 314, -425, -425, -425, 53, 00960 53, 53, 292, -425, 53, 307, 362, 206, 363, 369, 00961 53, 53, 330, 335, -425, 334, 338, -425, 343, 53, 00962 347, 366, 53, 53, 53, 355, 134, 276, -425, 357, 00963 402, 403, 46, 406, 53, 53, -425, -425, -425, -425, 00964 -425, 53, 287, 361, 384, 53, 53, 409, -425, 259, 00965 262, 364, 263, 365, 367, 134, -425, 84, -425, -425, 00966 -425, -425, -425, -425, -425, -425, -425, -425, 412, 46, 00967 -425, 368, 413, 371, 370, 373, 372, 53, 376, 377, 00968 418, 282, 407, 53, 79, 381, 101, 53, 53, 53, 00969 53, 53, 53, 53, 46, -425, -425, -425, 427, 385, 00970 -425, 386, -425, -425, -425, -425, 9, -425, -425, 387, 00971 429, 430, 174, -425, 53, 388, 53, 390, 286, 399, 00972 400, 301, 302, 0, -425, 84, -425, -425, -425, -425, 00973 -425, 53, 53, 53, 53, 53, 53, 53, 401, 46, 00974 -425, -425, -425, 11, -425, 404, 405, 420, 46, 408, 00975 450, -425, 53, 53, 53, 53, 53, 53, 53, 53, 00976 -425, -425, -425, 53, 53, 53, 53, 53, 53, 53, 00977 411, 414, -425, 53, -425, -425, 415, -425, -425, 417, 00978 -425, 416, 101, 53, 53, 53, 53, 53, 53, 53, 00979 53, 53, 53, 53, 53, 53, 53, 226, -425, -425, 00980 419, 428, 432, 101, 433, 176, 53, 53, 53, 53, 00981 53, 53, 431, 434, 53, 53, 53, 53, 451, 456, 00982 453, 458, 305, -425, 436, -425, 224, -425, -425, 53, 00983 53, 230, 53, 53, 53, -425, -425, 53, 53, 53, 00984 53, 437, 46, 446, 465, 53, 53, -425, 305, 452, 00985 118, -425, 118, 53, 53, 474, 481, 53, 53, 53, 00986 46, 4, 53, 53, -425, 449, -425, 454, 53, 53, 00987 -13, -425, 464, 472, 452, -425, 306, 309, 332, 348, 00988 254, -425, 84, -425, -425, -425, -425, 356, 455, 475, 00989 476, 397, 494, 53, 53, 466, 484, -425, 53, 125, 00990 -425, -425, 467, 485, 482, -425, -425, 495, -425, -425, 00991 53, 53, 53, 53, 53, 53, 53, 53, -425, -425, 00992 -425, -425, -425, -425, -425, 486, 498, 398, 53, 53, 00993 -425, -425, 46, 487, 499, -425, -425, -425, 533, 53, 00994 53, 53, 53, 53, 53, 53, 53, -425, 489, 490, 00995 542, 500, 496, 501, -425, 497, 305, 502, 53, 53, 00996 53, 53, 53, 53, 53, 53, -425, -425, 503, -425, 00997 -425, -425, -425, 504, 506, 53, 53, 53, 53, 53, 00998 53, 53, 53, -425, -425, -425, 53, 53, 53, 53, 00999 53, 53, 53, 53, 518, 508, 507, 53, 53, 53, 01000 53, 53, 53, 509, 510, 518, -425, -425, -425, 546, 01001 554, 53, 53, 53, 53, 556, -425, -425, 557, 558, 01002 559, 560, 519, 516, 521, 46, 565, 564, 567, -425, 01003 -425, -425, 525, 524, 46, 572, -425, -425, 528, 527, 01004 -425, -425 01005 }; 01006 01007 /* YYPGOTO[NTERM-NUM]. */ 01008 static const yytype_int16 yypgoto[] = 01009 { 01010 -425, -425, -425, -425, -425, -425, -425, -425, 317, -425, 01011 -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, 01012 -425, -425, -425, -425, -425, -425, 288, -425, 561, -425, 01013 -425, -425, -425, -425, -425, -425, -425, -425, -425, -425, 01014 -425, -425, 346, -425, -425, -425, -425, -425, -425, -425, 01015 -425, -425, -425, -425, -425, -425, -425, -425, -424, -425, 01016 577, -425, -425, -425, -425, -425, -425, -425, -425, -425, 01017 -425, -338, -292, -425, 152, -420, -425, -425, -425, -425, 01018 -425, -425, -425, -425, -425, -425, 59, -425, 544, -425, 01019 529, -425, -425, -425, -425, -425, -425, -425, 136, -425, 01020 -425, -425, 6, -234, -425, -48, -49 01021 }; 01022 01023 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 01024 positive, shift that token. If negative, reduce the rule which 01025 number is the opposite. If zero, do what YYDEFACT says. 01026 If YYTABLE_NINF, syntax error. */ 01027 #define YYTABLE_NINF -91 01028 static const yytype_int16 yytable[] = 01029 { 01030 77, 78, 79, 277, 451, 73, 74, 193, 476, 85, 01031 10, 341, 73, 74, 73, 74, 298, 484, 299, 300, 01032 81, 82, -50, 20, 385, 301, 302, 110, 111, 112, 01033 113, 21, 22, 23, 115, 116, 13, 86, 485, 13, 01034 499, 119, 121, 122, 123, 406, 45, 499, 46, 130, 01035 67, 340, 68, 120, 194, 477, 73, 74, 322, -54, 01036 352, 133, 134, 73, 74, 48, 152, 49, 140, 141, 01037 142, 342, 143, 144, 145, 146, 147, 50, 11, 51, 01038 153, 154, 73, 295, 156, 158, 159, 160, 55, 38, 01039 56, 164, 165, 341, 43, 168, 169, 170, 171, 60, 01040 172, 61, 179, 180, 181, 73, 74, 184, 157, 187, 01041 188, 189, 553, 42, 341, 190, 191, 298, 47, 299, 01042 300, 53, 195, 196, 59, 198, 301, 302, 73, 513, 01043 202, 203, 204, 62, 456, 207, 457, 458, 211, 72, 01044 80, 214, 215, 459, 89, 90, 229, 230, 231, 232, 01045 221, -10, 1, 225, 226, 227, 91, 94, -6, -6, 01046 -10, -10, -10, 233, 96, 255, 256, 97, -8, -49, 01047 20, -90, 257, -14, -50, 20, 263, 264, 21, 22, 01048 23, 98, 126, 21, 22, 23, 13, 70, -10, 71, 01049 99, 13, 298, 114, 299, 300, 73, 74, 128, 186, 01050 -49, 301, 302, 135, 129, -50, -54, 131, 286, 73, 01051 74, -54, 210, 136, 137, 294, 296, 138, 311, 312, 01052 313, 314, 315, 316, 317, 148, 151, 408, 500, 73, 01053 74, 139, 400, 73, 74, 149, 435, 323, 162, 92, 01054 298, 93, 299, 300, 163, 117, 328, 118, 330, 301, 01055 302, 100, 101, 102, 103, 104, 105, 106, 107, 108, 01056 109, 155, 343, 344, 345, 346, 347, 348, 349, 161, 01057 456, 253, 457, 458, 353, 431, 124, 173, 125, 459, 01058 248, 166, 249, 363, 364, 365, 366, 367, 368, 369, 01059 370, 258, 167, 259, 371, 372, 373, 374, 375, 182, 01060 376, 377, 174, 183, 380, 498, 197, 267, 279, 268, 01061 269, 272, 270, 273, 386, 387, 388, 389, 390, 391, 01062 392, 393, 394, 395, 396, 397, 398, 185, 399, 401, 01063 290, 192, 291, 318, 332, 200, 333, 409, 410, 411, 01064 412, 413, 414, 205, 199, 417, 418, 419, 420, 336, 01065 338, 337, 339, 425, 490, 426, 491, 492, 208, 493, 01066 433, 434, 436, 437, 438, 439, 209, 212, 440, 441, 01067 442, 443, 456, 213, 457, 458, 448, 449, 351, 216, 01068 494, 459, 495, 218, 468, 469, 217, 359, 472, 219, 01069 473, 474, 220, 223, 478, 479, 496, 222, 497, 482, 01070 483, 505, 529, 506, 530, 228, 251, 501, 250, 252, 01071 254, 260, 261, 265, 271, 274, 278, 281, 275, 280, 01072 282, 283, 284, 285, 289, 508, 509, 287, 288, -14, 01073 512, 514, 297, 319, 320, 325, 326, 321, 324, 329, 01074 331, 519, 520, 521, 522, 523, 524, 525, 526, 334, 01075 335, 356, 350, 354, 361, 421, 355, 423, 360, 531, 01076 532, 378, 422, 379, 424, 381, 382, 384, 403, 447, 01077 538, 539, 540, 541, 542, 543, 544, 545, 470, 404, 01078 415, 445, 405, 407, 452, 416, 429, 471, 444, 555, 01079 556, 557, 558, 559, 560, 561, 562, 446, 480, 475, 01080 507, 518, 528, 535, 502, 481, 566, 567, 568, 569, 01081 570, 571, 572, 573, 487, 510, 515, 575, 576, 577, 01082 578, 579, 580, 488, 581, 582, 503, 504, 589, 590, 01083 591, 592, 517, 593, 594, 511, 516, 527, 534, 537, 01084 546, 547, 600, 601, 602, 603, 548, 550, 552, 549, 01085 551, 583, 598, 554, 563, 564, 565, 587, 588, 595, 01086 599, 596, 604, 605, 606, 607, 608, 610, 609, 613, 01087 614, 533, 611, 615, 616, 617, 619, 620, 621, 293, 01088 327, 276, 14, 57, 467, 84, 52, 0, 0, 0, 01089 489, 597, 0, 0, 0, 0, 0, 0, 0, 0, 01090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01092 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01093 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01094 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01096 0, 0, 0, 0, 612, 0, 0, 0, 0, 0, 01097 0, 0, 0, 618 01098 }; 01099 01100 static const yytype_int16 yycheck[] = 01101 { 01102 49, 50, 51, 237, 428, 3, 4, 4, 4, 23, 01103 0, 303, 3, 4, 3, 4, 16, 30, 18, 19, 01104 4, 5, 0, 1, 362, 25, 26, 76, 77, 78, 01105 79, 9, 10, 11, 83, 84, 17, 51, 51, 17, 01106 460, 90, 91, 92, 93, 383, 48, 467, 50, 98, 01107 4, 51, 6, 51, 51, 51, 3, 4, 49, 37, 01108 49, 110, 111, 3, 4, 48, 6, 50, 117, 118, 01109 119, 305, 121, 122, 123, 124, 125, 48, 7, 50, 01110 129, 130, 3, 4, 133, 134, 135, 136, 48, 22, 01111 50, 140, 141, 385, 8, 144, 145, 146, 147, 48, 01112 148, 50, 151, 152, 153, 3, 4, 156, 6, 158, 01113 159, 160, 536, 48, 406, 164, 165, 16, 50, 18, 01114 19, 37, 170, 171, 4, 173, 25, 26, 3, 4, 01115 179, 180, 181, 20, 16, 184, 18, 19, 187, 4, 01116 50, 190, 191, 25, 49, 6, 12, 13, 14, 15, 01117 199, 0, 1, 202, 203, 204, 6, 24, 7, 8, 01118 9, 10, 11, 29, 6, 214, 215, 6, 17, 0, 01119 1, 37, 221, 22, 0, 1, 225, 226, 9, 10, 01120 11, 6, 34, 9, 10, 11, 17, 4, 37, 6, 01121 6, 17, 16, 6, 18, 19, 3, 4, 6, 6, 01122 31, 25, 26, 4, 6, 31, 37, 6, 257, 3, 01123 4, 37, 6, 4, 6, 263, 264, 49, 267, 268, 01124 269, 270, 271, 272, 273, 48, 6, 51, 462, 3, 01125 4, 51, 6, 3, 4, 35, 6, 286, 50, 48, 01126 16, 50, 18, 19, 50, 48, 294, 50, 296, 25, 01127 26, 38, 39, 40, 41, 42, 43, 44, 45, 46, 01128 47, 51, 311, 312, 313, 314, 315, 316, 317, 51, 01129 16, 212, 18, 19, 323, 51, 48, 48, 50, 25, 01130 4, 49, 6, 332, 333, 334, 335, 336, 337, 338, 01131 339, 4, 51, 6, 343, 344, 345, 346, 347, 4, 01132 348, 349, 36, 50, 353, 51, 49, 48, 249, 50, 01133 48, 48, 50, 50, 363, 364, 365, 366, 367, 368, 01134 369, 370, 371, 372, 373, 374, 375, 4, 376, 377, 01135 48, 4, 50, 274, 48, 21, 50, 386, 387, 388, 01136 389, 390, 391, 51, 48, 394, 395, 396, 397, 48, 01137 48, 50, 50, 48, 48, 50, 50, 48, 51, 50, 01138 409, 410, 411, 412, 413, 414, 4, 4, 417, 418, 01139 419, 420, 16, 4, 18, 19, 425, 426, 319, 49, 01140 48, 25, 50, 49, 433, 434, 51, 328, 437, 51, 01141 438, 439, 49, 27, 442, 443, 48, 50, 50, 448, 01142 449, 4, 4, 6, 6, 50, 4, 51, 51, 6, 01143 4, 50, 28, 4, 50, 50, 4, 4, 51, 51, 01144 49, 51, 49, 51, 6, 473, 474, 51, 51, 22, 01145 478, 479, 51, 6, 49, 6, 6, 51, 51, 51, 01146 50, 490, 491, 492, 493, 494, 495, 496, 497, 50, 01147 50, 31, 51, 49, 4, 4, 51, 4, 50, 508, 01148 509, 50, 6, 49, 6, 50, 49, 51, 49, 4, 01149 519, 520, 521, 522, 523, 524, 525, 526, 4, 51, 01150 49, 422, 50, 50, 32, 51, 50, 6, 51, 538, 01151 539, 540, 541, 542, 543, 544, 545, 51, 49, 440, 01152 6, 6, 4, 4, 49, 51, 555, 556, 557, 558, 01153 559, 560, 561, 562, 50, 49, 49, 566, 567, 568, 01154 569, 570, 571, 51, 572, 573, 51, 51, 577, 578, 01155 579, 580, 50, 581, 582, 51, 51, 51, 51, 6, 01156 51, 51, 591, 592, 593, 594, 4, 51, 51, 49, 01157 49, 33, 6, 51, 51, 51, 50, 49, 51, 50, 01158 6, 51, 6, 6, 6, 6, 6, 51, 49, 4, 01159 6, 512, 51, 6, 49, 51, 4, 49, 51, 262, 01160 292, 235, 5, 39, 432, 56, 25, -1, -1, -1, 01161 454, 585, -1, -1, -1, -1, -1, -1, -1, -1, 01162 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01163 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01164 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01165 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01167 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01168 -1, -1, -1, -1, 605, -1, -1, -1, -1, -1, 01169 -1, -1, -1, 614 01170 }; 01171 01172 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 01173 symbol of state STATE-NUM. */ 01174 static const yytype_uint8 yystos[] = 01175 { 01176 0, 1, 53, 54, 55, 56, 57, 58, 60, 61, 01177 0, 7, 62, 17, 112, 113, 115, 117, 119, 121, 01178 1, 9, 10, 11, 78, 79, 80, 81, 82, 83, 01179 84, 85, 86, 87, 88, 89, 90, 112, 22, 139, 01180 140, 141, 48, 8, 63, 48, 50, 50, 48, 50, 01181 48, 50, 80, 37, 155, 48, 50, 140, 143, 4, 01182 48, 50, 20, 64, 65, 66, 67, 4, 6, 138, 01183 4, 6, 4, 3, 4, 157, 158, 158, 158, 158, 01184 50, 4, 5, 142, 142, 23, 51, 144, 145, 49, 01185 6, 6, 48, 50, 24, 68, 6, 6, 6, 6, 01186 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 01187 158, 158, 158, 158, 6, 158, 158, 48, 50, 158, 01188 51, 158, 158, 158, 48, 50, 34, 69, 6, 6, 01189 158, 6, 156, 158, 158, 4, 4, 6, 49, 51, 01190 158, 158, 158, 158, 158, 158, 158, 158, 48, 35, 01191 70, 6, 6, 158, 158, 51, 158, 6, 158, 158, 01192 158, 51, 50, 50, 158, 158, 49, 51, 158, 158, 01193 158, 158, 157, 48, 36, 71, 72, 73, 74, 158, 01194 158, 158, 4, 50, 158, 4, 6, 158, 158, 158, 01195 158, 158, 4, 4, 51, 157, 157, 49, 157, 48, 01196 21, 75, 158, 158, 158, 51, 91, 158, 51, 4, 01197 6, 158, 4, 4, 158, 158, 49, 51, 49, 51, 01198 49, 158, 50, 27, 76, 158, 158, 158, 50, 12, 01199 13, 14, 15, 29, 92, 93, 94, 95, 96, 97, 01200 98, 99, 100, 101, 102, 103, 104, 105, 4, 6, 01201 51, 4, 6, 138, 4, 158, 158, 158, 4, 6, 01202 50, 28, 77, 158, 158, 4, 114, 48, 50, 48, 01203 50, 50, 48, 50, 50, 51, 94, 155, 4, 138, 01204 51, 4, 49, 51, 49, 51, 158, 51, 51, 6, 01205 48, 50, 59, 60, 157, 4, 157, 51, 16, 18, 01206 19, 25, 26, 123, 124, 125, 131, 132, 133, 136, 01207 137, 158, 158, 158, 158, 158, 158, 158, 138, 6, 01208 49, 51, 49, 158, 51, 6, 6, 78, 157, 51, 01209 157, 50, 48, 50, 50, 50, 48, 50, 48, 50, 01210 51, 124, 155, 158, 158, 158, 158, 158, 158, 158, 01211 51, 138, 49, 158, 49, 51, 31, 146, 147, 138, 01212 50, 4, 116, 158, 158, 158, 158, 158, 158, 158, 01213 158, 158, 158, 158, 158, 158, 157, 157, 50, 49, 01214 158, 50, 49, 118, 51, 123, 158, 158, 158, 158, 01215 158, 158, 158, 158, 158, 158, 158, 158, 158, 157, 01216 6, 157, 106, 49, 51, 50, 123, 50, 51, 158, 01217 158, 158, 158, 158, 158, 49, 51, 158, 158, 158, 01218 158, 4, 6, 4, 6, 48, 50, 110, 111, 50, 01219 122, 51, 120, 158, 158, 6, 158, 158, 158, 158, 01220 158, 158, 158, 158, 51, 138, 51, 4, 158, 158, 01221 107, 110, 32, 148, 149, 150, 16, 18, 19, 25, 01222 126, 127, 128, 129, 130, 134, 135, 126, 158, 158, 01223 4, 6, 158, 157, 157, 138, 4, 51, 157, 157, 01224 49, 51, 158, 158, 30, 51, 108, 50, 51, 150, 01225 48, 50, 48, 50, 48, 50, 48, 50, 51, 127, 01226 155, 51, 49, 51, 51, 4, 6, 6, 157, 157, 01227 49, 51, 157, 4, 157, 49, 51, 50, 6, 158, 01228 158, 158, 158, 158, 158, 158, 158, 51, 4, 4, 01229 6, 158, 158, 138, 51, 4, 109, 6, 158, 158, 01230 158, 158, 158, 158, 158, 158, 51, 51, 4, 49, 01231 51, 49, 51, 110, 51, 158, 158, 158, 158, 158, 01232 158, 158, 158, 51, 51, 50, 158, 158, 158, 158, 01233 158, 158, 158, 158, 151, 158, 158, 158, 158, 158, 01234 158, 157, 157, 33, 152, 153, 154, 49, 51, 158, 01235 158, 158, 158, 157, 157, 50, 51, 154, 6, 6, 01236 158, 158, 158, 158, 6, 6, 6, 6, 6, 49, 01237 51, 51, 138, 4, 6, 6, 49, 51, 138, 4, 01238 49, 51 01239 }; 01240 01241 #define yyerrok (yyerrstatus = 0) 01242 #define yyclearin (yychar = YYEMPTY) 01243 #define YYEMPTY (-2) 01244 #define YYEOF 0 01245 01246 #define YYACCEPT goto yyacceptlab 01247 #define YYABORT goto yyabortlab 01248 #define YYERROR goto yyerrorlab 01249 01250 01251 /* Like YYERROR except do call yyerror. This remains here temporarily 01252 to ease the transition to the new meaning of YYERROR, for GCC. 01253 Once GCC version 2 has supplanted version 1, this can go. */ 01254 01255 #define YYFAIL goto yyerrlab 01256 01257 #define YYRECOVERING() (!!yyerrstatus) 01258 01259 #define YYBACKUP(Token, Value) \ 01260 do \ 01261 if (yychar == YYEMPTY && yylen == 1) \ 01262 { \ 01263 yychar = (Token); \ 01264 yylval = (Value); \ 01265 yytoken = YYTRANSLATE (yychar); \ 01266 YYPOPSTACK (1); \ 01267 goto yybackup; \ 01268 } \ 01269 else \ 01270 { \ 01271 yyerror (YY_("syntax error: cannot back up")); \ 01272 YYERROR; \ 01273 } \ 01274 while (YYID (0)) 01275 01276 01277 #define YYTERROR 1 01278 #define YYERRCODE 256 01279 01280 01281 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 01282 If N is 0, then set CURRENT to the empty location which ends 01283 the previous symbol: RHS[0] (always defined). */ 01284 01285 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 01286 #ifndef YYLLOC_DEFAULT 01287 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 01288 do \ 01289 if (YYID (N)) \ 01290 { \ 01291 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 01292 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 01293 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 01294 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 01295 } \ 01296 else \ 01297 { \ 01298 (Current).first_line = (Current).last_line = \ 01299 YYRHSLOC (Rhs, 0).last_line; \ 01300 (Current).first_column = (Current).last_column = \ 01301 YYRHSLOC (Rhs, 0).last_column; \ 01302 } \ 01303 while (YYID (0)) 01304 #endif 01305 01306 01307 /* YY_LOCATION_PRINT -- Print the location on the stream. 01308 This macro was not mandated originally: define only if we know 01309 we won't break user code: when these are the locations we know. */ 01310 01311 #ifndef YY_LOCATION_PRINT 01312 # if YYLTYPE_IS_TRIVIAL 01313 # define YY_LOCATION_PRINT(File, Loc) \ 01314 fprintf (File, "%d.%d-%d.%d", \ 01315 (Loc).first_line, (Loc).first_column, \ 01316 (Loc).last_line, (Loc).last_column) 01317 # else 01318 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 01319 # endif 01320 #endif 01321 01322 01323 /* YYLEX -- calling `yylex' with the right arguments. */ 01324 01325 #ifdef YYLEX_PARAM 01326 # define YYLEX yylex (YYLEX_PARAM) 01327 #else 01328 # define YYLEX yylex () 01329 #endif 01330 01331 /* Enable debugging if requested. */ 01332 #if YYDEBUG 01333 01334 # ifndef YYFPRINTF 01335 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 01336 # define YYFPRINTF fprintf 01337 # endif 01338 01339 # define YYDPRINTF(Args) \ 01340 do { \ 01341 if (yydebug) \ 01342 YYFPRINTF Args; \ 01343 } while (YYID (0)) 01344 01345 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 01346 do { \ 01347 if (yydebug) \ 01348 { \ 01349 YYFPRINTF (stderr, "%s ", Title); \ 01350 yy_symbol_print (stderr, \ 01351 Type, Value); \ 01352 YYFPRINTF (stderr, "\n"); \ 01353 } \ 01354 } while (YYID (0)) 01355 01356 01357 /*--------------------------------. 01358 | Print this symbol on YYOUTPUT. | 01359 `--------------------------------*/ 01360 01361 /*ARGSUSED*/ 01362 #if (defined __STDC__ || defined __C99__FUNC__ \ 01363 || defined __cplusplus || defined _MSC_VER) 01364 static void 01365 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 01366 #else 01367 static void 01368 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 01369 FILE *yyoutput; 01370 int yytype; 01371 YYSTYPE const * const yyvaluep; 01372 #endif 01373 { 01374 if (!yyvaluep) 01375 return; 01376 # ifdef YYPRINT 01377 if (yytype < YYNTOKENS) 01378 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 01379 # else 01380 YYUSE (yyoutput); 01381 # endif 01382 switch (yytype) 01383 { 01384 default: 01385 break; 01386 } 01387 } 01388 01389 01390 /*--------------------------------. 01391 | Print this symbol on YYOUTPUT. | 01392 `--------------------------------*/ 01393 01394 #if (defined __STDC__ || defined __C99__FUNC__ \ 01395 || defined __cplusplus || defined _MSC_VER) 01396 static void 01397 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 01398 #else 01399 static void 01400 yy_symbol_print (yyoutput, yytype, yyvaluep) 01401 FILE *yyoutput; 01402 int yytype; 01403 YYSTYPE const * const yyvaluep; 01404 #endif 01405 { 01406 if (yytype < YYNTOKENS) 01407 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 01408 else 01409 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 01410 01411 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 01412 YYFPRINTF (yyoutput, ")"); 01413 } 01414 01415 /*------------------------------------------------------------------. 01416 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 01417 | TOP (included). | 01418 `------------------------------------------------------------------*/ 01419 01420 #if (defined __STDC__ || defined __C99__FUNC__ \ 01421 || defined __cplusplus || defined _MSC_VER) 01422 static void 01423 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 01424 #else 01425 static void 01426 yy_stack_print (yybottom, yytop) 01427 yytype_int16 *yybottom; 01428 yytype_int16 *yytop; 01429 #endif 01430 { 01431 YYFPRINTF (stderr, "Stack now"); 01432 for (; yybottom <= yytop; yybottom++) 01433 { 01434 int yybot = *yybottom; 01435 YYFPRINTF (stderr, " %d", yybot); 01436 } 01437 YYFPRINTF (stderr, "\n"); 01438 } 01439 01440 # define YY_STACK_PRINT(Bottom, Top) \ 01441 do { \ 01442 if (yydebug) \ 01443 yy_stack_print ((Bottom), (Top)); \ 01444 } while (YYID (0)) 01445 01446 01447 /*------------------------------------------------. 01448 | Report that the YYRULE is going to be reduced. | 01449 `------------------------------------------------*/ 01450 01451 #if (defined __STDC__ || defined __C99__FUNC__ \ 01452 || defined __cplusplus || defined _MSC_VER) 01453 static void 01454 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 01455 #else 01456 static void 01457 yy_reduce_print (yyvsp, yyrule) 01458 YYSTYPE *yyvsp; 01459 int yyrule; 01460 #endif 01461 { 01462 int yynrhs = yyr2[yyrule]; 01463 int yyi; 01464 unsigned long int yylno = yyrline[yyrule]; 01465 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 01466 yyrule - 1, yylno); 01467 /* The symbols being reduced. */ 01468 for (yyi = 0; yyi < yynrhs; yyi++) 01469 { 01470 YYFPRINTF (stderr, " $%d = ", yyi + 1); 01471 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 01472 &(yyvsp[(yyi + 1) - (yynrhs)]) 01473 ); 01474 YYFPRINTF (stderr, "\n"); 01475 } 01476 } 01477 01478 # define YY_REDUCE_PRINT(Rule) \ 01479 do { \ 01480 if (yydebug) \ 01481 yy_reduce_print (yyvsp, Rule); \ 01482 } while (YYID (0)) 01483 01484 /* Nonzero means print parse trace. It is left uninitialized so that 01485 multiple parsers can coexist. */ 01486 int yydebug; 01487 #else /* !YYDEBUG */ 01488 # define YYDPRINTF(Args) 01489 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 01490 # define YY_STACK_PRINT(Bottom, Top) 01491 # define YY_REDUCE_PRINT(Rule) 01492 #endif /* !YYDEBUG */ 01493 01494 01495 /* YYINITDEPTH -- initial size of the parser's stacks. */ 01496 #ifndef YYINITDEPTH 01497 # define YYINITDEPTH 200 01498 #endif 01499 01500 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 01501 if the built-in stack extension method is used). 01502 01503 Do not make this value too large; the results are undefined if 01504 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 01505 evaluated with infinite-precision integer arithmetic. */ 01506 01507 #ifndef YYMAXDEPTH 01508 # define YYMAXDEPTH 10000 01509 #endif 01510 01511 01512 01513 #if YYERROR_VERBOSE 01514 01515 # ifndef yystrlen 01516 # if defined __GLIBC__ && defined _STRING_H 01517 # define yystrlen strlen 01518 # else 01519 /* Return the length of YYSTR. */ 01520 #if (defined __STDC__ || defined __C99__FUNC__ \ 01521 || defined __cplusplus || defined _MSC_VER) 01522 static YYSIZE_T 01523 yystrlen (const char *yystr) 01524 #else 01525 static YYSIZE_T 01526 yystrlen (yystr) 01527 const char *yystr; 01528 #endif 01529 { 01530 YYSIZE_T yylen; 01531 for (yylen = 0; yystr[yylen]; yylen++) 01532 continue; 01533 return yylen; 01534 } 01535 # endif 01536 # endif 01537 01538 # ifndef yystpcpy 01539 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 01540 # define yystpcpy stpcpy 01541 # else 01542 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 01543 YYDEST. */ 01544 #if (defined __STDC__ || defined __C99__FUNC__ \ 01545 || defined __cplusplus || defined _MSC_VER) 01546 static char * 01547 yystpcpy (char *yydest, const char *yysrc) 01548 #else 01549 static char * 01550 yystpcpy (yydest, yysrc) 01551 char *yydest; 01552 const char *yysrc; 01553 #endif 01554 { 01555 char *yyd = yydest; 01556 const char *yys = yysrc; 01557 01558 while ((*yyd++ = *yys++) != '\0') 01559 continue; 01560 01561 return yyd - 1; 01562 } 01563 # endif 01564 # endif 01565 01566 # ifndef yytnamerr 01567 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 01568 quotes and backslashes, so that it's suitable for yyerror. The 01569 heuristic is that double-quoting is unnecessary unless the string 01570 contains an apostrophe, a comma, or backslash (other than 01571 backslash-backslash). YYSTR is taken from yytname. If YYRES is 01572 null, do not copy; instead, return the length of what the result 01573 would have been. */ 01574 static YYSIZE_T 01575 yytnamerr (char *yyres, const char *yystr) 01576 { 01577 if (*yystr == '"') 01578 { 01579 YYSIZE_T yyn = 0; 01580 char const *yyp = yystr; 01581 01582 for (;;) 01583 switch (*++yyp) 01584 { 01585 case '\'': 01586 case ',': 01587 goto do_not_strip_quotes; 01588 01589 case '\\': 01590 if (*++yyp != '\\') 01591 goto do_not_strip_quotes; 01592 /* Fall through. */ 01593 default: 01594 if (yyres) 01595 yyres[yyn] = *yyp; 01596 yyn++; 01597 break; 01598 01599 case '"': 01600 if (yyres) 01601 yyres[yyn] = '\0'; 01602 return yyn; 01603 } 01604 do_not_strip_quotes: ; 01605 } 01606 01607 if (! yyres) 01608 return yystrlen (yystr); 01609 01610 return yystpcpy (yyres, yystr) - yyres; 01611 } 01612 # endif 01613 01614 /* Copy into YYRESULT an error message about the unexpected token 01615 YYCHAR while in state YYSTATE. Return the number of bytes copied, 01616 including the terminating null byte. If YYRESULT is null, do not 01617 copy anything; just return the number of bytes that would be 01618 copied. As a special case, return 0 if an ordinary "syntax error" 01619 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 01620 size calculation. */ 01621 static YYSIZE_T 01622 yysyntax_error (char *yyresult, int yystate, int yychar) 01623 { 01624 int yyn = yypact[yystate]; 01625 01626 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 01627 return 0; 01628 else 01629 { 01630 int yytype = YYTRANSLATE (yychar); 01631 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 01632 YYSIZE_T yysize = yysize0; 01633 YYSIZE_T yysize1; 01634 int yysize_overflow = 0; 01635 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 01636 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 01637 int yyx; 01638 01639 # if 0 01640 /* This is so xgettext sees the translatable formats that are 01641 constructed on the fly. */ 01642 YY_("syntax error, unexpected %s"); 01643 YY_("syntax error, unexpected %s, expecting %s"); 01644 YY_("syntax error, unexpected %s, expecting %s or %s"); 01645 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 01646 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 01647 # endif 01648 char *yyfmt; 01649 char const *yyf; 01650 static char const yyunexpected[] = "syntax error, unexpected %s"; 01651 static char const yyexpecting[] = ", expecting %s"; 01652 static char const yyor[] = " or %s"; 01653 char yyformat[sizeof yyunexpected 01654 + sizeof yyexpecting - 1 01655 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 01656 * (sizeof yyor - 1))]; 01657 char const *yyprefix = yyexpecting; 01658 01659 /* Start YYX at -YYN if negative to avoid negative indexes in 01660 YYCHECK. */ 01661 int yyxbegin = yyn < 0 ? -yyn : 0; 01662 01663 /* Stay within bounds of both yycheck and yytname. */ 01664 int yychecklim = YYLAST - yyn + 1; 01665 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 01666 int yycount = 1; 01667 01668 yyarg[0] = yytname[yytype]; 01669 yyfmt = yystpcpy (yyformat, yyunexpected); 01670 01671 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 01672 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 01673 { 01674 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 01675 { 01676 yycount = 1; 01677 yysize = yysize0; 01678 yyformat[sizeof yyunexpected - 1] = '\0'; 01679 break; 01680 } 01681 yyarg[yycount++] = yytname[yyx]; 01682 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 01683 yysize_overflow |= (yysize1 < yysize); 01684 yysize = yysize1; 01685 yyfmt = yystpcpy (yyfmt, yyprefix); 01686 yyprefix = yyor; 01687 } 01688 01689 yyf = YY_(yyformat); 01690 yysize1 = yysize + yystrlen (yyf); 01691 yysize_overflow |= (yysize1 < yysize); 01692 yysize = yysize1; 01693 01694 if (yysize_overflow) 01695 return YYSIZE_MAXIMUM; 01696 01697 if (yyresult) 01698 { 01699 /* Avoid sprintf, as that infringes on the user's name space. 01700 Don't have undefined behavior even if the translation 01701 produced a string with the wrong number of "%s"s. */ 01702 char *yyp = yyresult; 01703 int yyi = 0; 01704 while ((*yyp = *yyf) != '\0') 01705 { 01706 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 01707 { 01708 yyp += yytnamerr (yyp, yyarg[yyi++]); 01709 yyf += 2; 01710 } 01711 else 01712 { 01713 yyp++; 01714 yyf++; 01715 } 01716 } 01717 } 01718 return yysize; 01719 } 01720 } 01721 #endif /* YYERROR_VERBOSE */ 01722 01723 01724 /*-----------------------------------------------. 01725 | Release the memory associated to this symbol. | 01726 `-----------------------------------------------*/ 01727 01728 /*ARGSUSED*/ 01729 #if (defined __STDC__ || defined __C99__FUNC__ \ 01730 || defined __cplusplus || defined _MSC_VER) 01731 static void 01732 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 01733 #else 01734 static void 01735 yydestruct (yymsg, yytype, yyvaluep) 01736 const char *yymsg; 01737 int yytype; 01738 YYSTYPE *yyvaluep; 01739 #endif 01740 { 01741 YYUSE (yyvaluep); 01742 01743 if (!yymsg) 01744 yymsg = "Deleting"; 01745 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 01746 01747 switch (yytype) 01748 { 01749 01750 default: 01751 break; 01752 } 01753 } 01754 01755 /* Prevent warnings from -Wmissing-prototypes. */ 01756 #ifdef YYPARSE_PARAM 01757 #if defined __STDC__ || defined __cplusplus 01758 int yyparse (void *YYPARSE_PARAM); 01759 #else 01760 int yyparse (); 01761 #endif 01762 #else /* ! YYPARSE_PARAM */ 01763 #if defined __STDC__ || defined __cplusplus 01764 int yyparse (void); 01765 #else 01766 int yyparse (); 01767 #endif 01768 #endif /* ! YYPARSE_PARAM */ 01769 01770 01771 /* The lookahead symbol. */ 01772 int yychar; 01773 01774 /* The semantic value of the lookahead symbol. */ 01775 YYSTYPE yylval; 01776 01777 /* Number of syntax errors so far. */ 01778 int yynerrs; 01779 01780 01781 01782 /*-------------------------. 01783 | yyparse or yypush_parse. | 01784 `-------------------------*/ 01785 01786 #ifdef YYPARSE_PARAM 01787 #if (defined __STDC__ || defined __C99__FUNC__ \ 01788 || defined __cplusplus || defined _MSC_VER) 01789 int 01790 yyparse (void *YYPARSE_PARAM) 01791 #else 01792 int 01793 yyparse (YYPARSE_PARAM) 01794 void *YYPARSE_PARAM; 01795 #endif 01796 #else /* ! YYPARSE_PARAM */ 01797 #if (defined __STDC__ || defined __C99__FUNC__ \ 01798 || defined __cplusplus || defined _MSC_VER) 01799 int 01800 yyparse (void) 01801 #else 01802 int 01803 yyparse () 01804 01805 #endif 01806 #endif 01807 { 01808 01809 01810 int yystate; 01811 /* Number of tokens to shift before error messages enabled. */ 01812 int yyerrstatus; 01813 01814 /* The stacks and their tools: 01815 `yyss': related to states. 01816 `yyvs': related to semantic values. 01817 01818 Refer to the stacks thru separate pointers, to allow yyoverflow 01819 to reallocate them elsewhere. */ 01820 01821 /* The state stack. */ 01822 yytype_int16 yyssa[YYINITDEPTH]; 01823 yytype_int16 *yyss; 01824 yytype_int16 *yyssp; 01825 01826 /* The semantic value stack. */ 01827 YYSTYPE yyvsa[YYINITDEPTH]; 01828 YYSTYPE *yyvs; 01829 YYSTYPE *yyvsp; 01830 01831 YYSIZE_T yystacksize; 01832 01833 int yyn; 01834 int yyresult; 01835 /* Lookahead token as an internal (translated) token number. */ 01836 int yytoken; 01837 /* The variables used to return semantic value and location from the 01838 action routines. */ 01839 YYSTYPE yyval; 01840 01841 #if YYERROR_VERBOSE 01842 /* Buffer for error messages, and its allocated size. */ 01843 char yymsgbuf[128]; 01844 char *yymsg = yymsgbuf; 01845 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 01846 #endif 01847 01848 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 01849 01850 /* The number of symbols on the RHS of the reduced rule. 01851 Keep to zero when no symbol should be popped. */ 01852 int yylen = 0; 01853 01854 yytoken = 0; 01855 yyss = yyssa; 01856 yyvs = yyvsa; 01857 yystacksize = YYINITDEPTH; 01858 01859 YYDPRINTF ((stderr, "Starting parse\n")); 01860 01861 yystate = 0; 01862 yyerrstatus = 0; 01863 yynerrs = 0; 01864 yychar = YYEMPTY; /* Cause a token to be read. */ 01865 01866 /* Initialize stack pointers. 01867 Waste one element of value and location stack 01868 so that they stay on the same level as the state stack. 01869 The wasted elements are never initialized. */ 01870 yyssp = yyss; 01871 yyvsp = yyvs; 01872 01873 goto yysetstate; 01874 01875 /*------------------------------------------------------------. 01876 | yynewstate -- Push a new state, which is found in yystate. | 01877 `------------------------------------------------------------*/ 01878 yynewstate: 01879 /* In all cases, when you get here, the value and location stacks 01880 have just been pushed. So pushing a state here evens the stacks. */ 01881 yyssp++; 01882 01883 yysetstate: 01884 *yyssp = yystate; 01885 01886 if (yyss + yystacksize - 1 <= yyssp) 01887 { 01888 /* Get the current used size of the three stacks, in elements. */ 01889 YYSIZE_T yysize = yyssp - yyss + 1; 01890 01891 #ifdef yyoverflow 01892 { 01893 /* Give user a chance to reallocate the stack. Use copies of 01894 these so that the &'s don't force the real ones into 01895 memory. */ 01896 YYSTYPE *yyvs1 = yyvs; 01897 yytype_int16 *yyss1 = yyss; 01898 01899 /* Each stack pointer address is followed by the size of the 01900 data in use in that stack, in bytes. This used to be a 01901 conditional around just the two extra args, but that might 01902 be undefined if yyoverflow is a macro. */ 01903 yyoverflow (YY_("memory exhausted"), 01904 &yyss1, yysize * sizeof (*yyssp), 01905 &yyvs1, yysize * sizeof (*yyvsp), 01906 &yystacksize); 01907 01908 yyss = yyss1; 01909 yyvs = yyvs1; 01910 } 01911 #else /* no yyoverflow */ 01912 # ifndef YYSTACK_RELOCATE 01913 goto yyexhaustedlab; 01914 # else 01915 /* Extend the stack our own way. */ 01916 if (YYMAXDEPTH <= yystacksize) 01917 goto yyexhaustedlab; 01918 yystacksize *= 2; 01919 if (YYMAXDEPTH < yystacksize) 01920 yystacksize = YYMAXDEPTH; 01921 01922 { 01923 yytype_int16 *yyss1 = yyss; 01924 union yyalloc *yyptr = 01925 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 01926 if (! yyptr) 01927 goto yyexhaustedlab; 01928 YYSTACK_RELOCATE (yyss_alloc, yyss); 01929 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 01930 # undef YYSTACK_RELOCATE 01931 if (yyss1 != yyssa) 01932 YYSTACK_FREE (yyss1); 01933 } 01934 # endif 01935 #endif /* no yyoverflow */ 01936 01937 yyssp = yyss + yysize - 1; 01938 yyvsp = yyvs + yysize - 1; 01939 01940 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 01941 (unsigned long int) yystacksize)); 01942 01943 if (yyss + yystacksize - 1 <= yyssp) 01944 YYABORT; 01945 } 01946 01947 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 01948 01949 if (yystate == YYFINAL) 01950 YYACCEPT; 01951 01952 goto yybackup; 01953 01954 /*-----------. 01955 | yybackup. | 01956 `-----------*/ 01957 yybackup: 01958 01959 /* Do appropriate processing given the current state. Read a 01960 lookahead token if we need one and don't already have one. */ 01961 01962 /* First try to decide what to do without reference to lookahead token. */ 01963 yyn = yypact[yystate]; 01964 if (yyn == YYPACT_NINF) 01965 goto yydefault; 01966 01967 /* Not known => get a lookahead token if don't already have one. */ 01968 01969 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 01970 if (yychar == YYEMPTY) 01971 { 01972 YYDPRINTF ((stderr, "Reading a token: ")); 01973 yychar = YYLEX; 01974 } 01975 01976 if (yychar <= YYEOF) 01977 { 01978 yychar = yytoken = YYEOF; 01979 YYDPRINTF ((stderr, "Now at end of input.\n")); 01980 } 01981 else 01982 { 01983 yytoken = YYTRANSLATE (yychar); 01984 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 01985 } 01986 01987 /* If the proper action on seeing token YYTOKEN is to reduce or to 01988 detect an error, take that action. */ 01989 yyn += yytoken; 01990 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 01991 goto yydefault; 01992 yyn = yytable[yyn]; 01993 if (yyn <= 0) 01994 { 01995 if (yyn == 0 || yyn == YYTABLE_NINF) 01996 goto yyerrlab; 01997 yyn = -yyn; 01998 goto yyreduce; 01999 } 02000 02001 /* Count tokens shifted since error; after three, turn off error 02002 status. */ 02003 if (yyerrstatus) 02004 yyerrstatus--; 02005 02006 /* Shift the lookahead token. */ 02007 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 02008 02009 /* Discard the shifted token. */ 02010 yychar = YYEMPTY; 02011 02012 yystate = yyn; 02013 *++yyvsp = yylval; 02014 02015 goto yynewstate; 02016 02017 02018 /*-----------------------------------------------------------. 02019 | yydefault -- do the default action for the current state. | 02020 `-----------------------------------------------------------*/ 02021 yydefault: 02022 yyn = yydefact[yystate]; 02023 if (yyn == 0) 02024 goto yyerrlab; 02025 goto yyreduce; 02026 02027 02028 /*-----------------------------. 02029 | yyreduce -- Do a reduction. | 02030 `-----------------------------*/ 02031 yyreduce: 02032 /* yyn is the number of a rule to reduce with. */ 02033 yylen = yyr2[yyn]; 02034 02035 /* If YYLEN is nonzero, implement the default value of the action: 02036 `$$ = $1'. 02037 02038 Otherwise, the following line sets YYVAL to garbage. 02039 This behavior is undocumented and Bison 02040 users should not rely upon it. Assigning to YYVAL 02041 unconditionally makes the parser a bit smaller, and it avoids a 02042 GCC warning that YYVAL may be used uninitialized. */ 02043 yyval = yyvsp[1-yylen]; 02044 02045 02046 YY_REDUCE_PRINT (yyn); 02047 switch (yyn) 02048 { 02049 case 5: 02050 02051 /* Line 1455 of yacc.c */ 02052 #line 137 "parse_y.y" 02053 { YYABORT; } 02054 break; 02055 02056 case 6: 02057 02058 /* Line 1455 of yacc.c */ 02059 #line 172 "parse_y.y" 02060 { 02061 /* reset flags for 'used layers'; 02062 * init font and data pointers 02063 */ 02064 int i; 02065 02066 if (!yyPCB) 02067 { 02068 Message(_("illegal fileformat\n")); 02069 YYABORT; 02070 } 02071 for (i = 0; i < MAX_ALL_LAYER; i++) 02072 LayerFlag[i] = false; 02073 yyFont = &yyPCB->Font; 02074 yyData = yyPCB->Data; 02075 yyData->pcb = yyPCB; 02076 yyData->LayerN = 0; 02077 /* Parse the default layer group string, just in case the file doesn't have one */ 02078 if (ParseGroupString (Settings.Groups, &yyPCB->LayerGroups, &yyData->LayerN)) 02079 { 02080 Message(_("illegal default layer-group string\n")); 02081 YYABORT; 02082 } 02083 } 02084 break; 02085 02086 case 7: 02087 02088 /* Line 1455 of yacc.c */ 02089 #line 209 "parse_y.y" 02090 { 02091 PCBType *pcb_save = PCB; 02092 02093 CreateNewPCBPost (yyPCB, 0); 02094 /* initialize the polygon clipping now since 02095 * we didn't know the layer grouping before. 02096 */ 02097 PCB = yyPCB; 02098 ALLPOLYGON_LOOP (yyData); 02099 { 02100 InitClip (yyData, layer, polygon); 02101 } 02102 ENDALL_LOOP; 02103 PCB = pcb_save; 02104 } 02105 break; 02106 02107 case 8: 02108 02109 /* Line 1455 of yacc.c */ 02110 #line 225 "parse_y.y" 02111 { 02112 if (yyPCB != NULL) 02113 { 02114 /* This case is when we load a footprint with file->open, or from the command line */ 02115 yyFont = &yyPCB->Font; 02116 yyData = yyPCB->Data; 02117 yyData->pcb = yyPCB; 02118 yyData->LayerN = 0; 02119 } 02120 } 02121 break; 02122 02123 case 9: 02124 02125 /* Line 1455 of yacc.c */ 02126 #line 236 "parse_y.y" 02127 { 02128 PCBType *pcb_save = PCB; 02129 ElementType *e; 02130 if (yyPCB != NULL) 02131 { 02132 /* This case is when we load a footprint with file->open, or from the command line */ 02133 CreateNewPCBPost (yyPCB, 0); 02134 ParseGroupString("1,c:2,s", &yyPCB->LayerGroups, &yyData->LayerN); 02135 e = yyPCB->Data->Element->data; /* we know there's only one */ 02136 PCB = yyPCB; 02137 MoveElementLowLevel (yyPCB->Data, e, -e->BoundingBox.X1, -e->BoundingBox.Y1); 02138 PCB = pcb_save; 02139 yyPCB->MaxWidth = e->BoundingBox.X2; 02140 yyPCB->MaxHeight = e->BoundingBox.Y2; 02141 yyPCB->is_footprint = 1; 02142 } 02143 } 02144 break; 02145 02146 case 10: 02147 02148 /* Line 1455 of yacc.c */ 02149 #line 256 "parse_y.y" 02150 { 02151 /* reset flags for 'used layers'; 02152 * init font and data pointers 02153 */ 02154 int i; 02155 02156 if (!yyData || !yyFont) 02157 { 02158 Message(_("illegal fileformat\n")); 02159 YYABORT; 02160 } 02161 for (i = 0; i < MAX_ALL_LAYER; i++) 02162 LayerFlag[i] = false; 02163 yyData->LayerN = 0; 02164 } 02165 break; 02166 02167 case 14: 02168 02169 /* Line 1455 of yacc.c */ 02170 #line 281 "parse_y.y" 02171 { 02172 /* mark all symbols invalid */ 02173 int i; 02174 02175 if (!yyFont) 02176 { 02177 Message(_("illegal fileformat\n")); 02178 YYABORT; 02179 } 02180 yyFont->Valid = false; 02181 for (i = 0; i <= MAX_FONTPOSITION; i++) 02182 free (yyFont->Symbol[i].Line); 02183 bzero(yyFont->Symbol, sizeof(yyFont->Symbol)); 02184 } 02185 break; 02186 02187 case 15: 02188 02189 /* Line 1455 of yacc.c */ 02190 #line 296 "parse_y.y" 02191 { 02192 yyFont->Valid = true; 02193 SetFontInfo(yyFont); 02194 } 02195 break; 02196 02197 case 17: 02198 02199 /* Line 1455 of yacc.c */ 02200 #line 324 "parse_y.y" 02201 { 02202 if (check_file_version ((yyvsp[(3) - (4)].integer)) != 0) 02203 { 02204 YYABORT; 02205 } 02206 } 02207 break; 02208 02209 case 18: 02210 02211 /* Line 1455 of yacc.c */ 02212 #line 363 "parse_y.y" 02213 { 02214 yyPCB->Name = (yyvsp[(3) - (4)].string); 02215 yyPCB->MaxWidth = MAX_COORD; 02216 yyPCB->MaxHeight = MAX_COORD; 02217 } 02218 break; 02219 02220 case 19: 02221 02222 /* Line 1455 of yacc.c */ 02223 #line 369 "parse_y.y" 02224 { 02225 yyPCB->Name = (yyvsp[(3) - (6)].string); 02226 yyPCB->MaxWidth = OU ((yyvsp[(4) - (6)].measure)); 02227 yyPCB->MaxHeight = OU ((yyvsp[(5) - (6)].measure)); 02228 } 02229 break; 02230 02231 case 20: 02232 02233 /* Line 1455 of yacc.c */ 02234 #line 375 "parse_y.y" 02235 { 02236 yyPCB->Name = (yyvsp[(3) - (6)].string); 02237 yyPCB->MaxWidth = NU ((yyvsp[(4) - (6)].measure)); 02238 yyPCB->MaxHeight = NU ((yyvsp[(5) - (6)].measure)); 02239 } 02240 break; 02241 02242 case 24: 02243 02244 /* Line 1455 of yacc.c */ 02245 #line 418 "parse_y.y" 02246 { 02247 yyPCB->Grid = OU ((yyvsp[(3) - (6)].measure)); 02248 yyPCB->GridOffsetX = OU ((yyvsp[(4) - (6)].measure)); 02249 yyPCB->GridOffsetY = OU ((yyvsp[(5) - (6)].measure)); 02250 } 02251 break; 02252 02253 case 25: 02254 02255 /* Line 1455 of yacc.c */ 02256 #line 426 "parse_y.y" 02257 { 02258 yyPCB->Grid = OU ((yyvsp[(3) - (7)].measure)); 02259 yyPCB->GridOffsetX = OU ((yyvsp[(4) - (7)].measure)); 02260 yyPCB->GridOffsetY = OU ((yyvsp[(5) - (7)].measure)); 02261 if ((yyvsp[(6) - (7)].integer)) 02262 Settings.DrawGrid = true; 02263 else 02264 Settings.DrawGrid = false; 02265 } 02266 break; 02267 02268 case 26: 02269 02270 /* Line 1455 of yacc.c */ 02271 #line 439 "parse_y.y" 02272 { 02273 yyPCB->Grid = NU ((yyvsp[(3) - (7)].measure)); 02274 yyPCB->GridOffsetX = NU ((yyvsp[(4) - (7)].measure)); 02275 yyPCB->GridOffsetY = NU ((yyvsp[(5) - (7)].measure)); 02276 if ((yyvsp[(6) - (7)].integer)) 02277 Settings.DrawGrid = true; 02278 else 02279 Settings.DrawGrid = false; 02280 } 02281 break; 02282 02283 case 27: 02284 02285 /* Line 1455 of yacc.c */ 02286 #line 478 "parse_y.y" 02287 { 02288 yyPCB->CursorX = OU ((yyvsp[(3) - (6)].measure)); 02289 yyPCB->CursorY = OU ((yyvsp[(4) - (6)].measure)); 02290 } 02291 break; 02292 02293 case 28: 02294 02295 /* Line 1455 of yacc.c */ 02296 #line 483 "parse_y.y" 02297 { 02298 yyPCB->CursorX = NU ((yyvsp[(3) - (6)].measure)); 02299 yyPCB->CursorY = NU ((yyvsp[(4) - (6)].measure)); 02300 } 02301 break; 02302 02303 case 31: 02304 02305 /* Line 1455 of yacc.c */ 02306 #line 506 "parse_y.y" 02307 { 02308 /* Read in cmil^2 for now; in future this should be a noop. */ 02309 yyPCB->IsleArea = MIL_TO_COORD (MIL_TO_COORD ((yyvsp[(3) - (4)].number)) / 100.0) / 100.0; 02310 } 02311 break; 02312 02313 case 33: 02314 02315 /* Line 1455 of yacc.c */ 02316 #line 533 "parse_y.y" 02317 { 02318 yyPCB->ThermScale = (yyvsp[(3) - (4)].number); 02319 } 02320 break; 02321 02322 case 38: 02323 02324 /* Line 1455 of yacc.c */ 02325 #line 572 "parse_y.y" 02326 { 02327 yyPCB->Bloat = NU ((yyvsp[(3) - (6)].measure)); 02328 yyPCB->Shrink = NU ((yyvsp[(4) - (6)].measure)); 02329 yyPCB->minWid = NU ((yyvsp[(5) - (6)].measure)); 02330 yyPCB->minRing = NU ((yyvsp[(5) - (6)].measure)); 02331 } 02332 break; 02333 02334 case 39: 02335 02336 /* Line 1455 of yacc.c */ 02337 #line 582 "parse_y.y" 02338 { 02339 yyPCB->Bloat = NU ((yyvsp[(3) - (7)].measure)); 02340 yyPCB->Shrink = NU ((yyvsp[(4) - (7)].measure)); 02341 yyPCB->minWid = NU ((yyvsp[(5) - (7)].measure)); 02342 yyPCB->minSlk = NU ((yyvsp[(6) - (7)].measure)); 02343 yyPCB->minRing = NU ((yyvsp[(5) - (7)].measure)); 02344 } 02345 break; 02346 02347 case 40: 02348 02349 /* Line 1455 of yacc.c */ 02350 #line 593 "parse_y.y" 02351 { 02352 yyPCB->Bloat = NU ((yyvsp[(3) - (9)].measure)); 02353 yyPCB->Shrink = NU ((yyvsp[(4) - (9)].measure)); 02354 yyPCB->minWid = NU ((yyvsp[(5) - (9)].measure)); 02355 yyPCB->minSlk = NU ((yyvsp[(6) - (9)].measure)); 02356 yyPCB->minDrill = NU ((yyvsp[(7) - (9)].measure)); 02357 yyPCB->minRing = NU ((yyvsp[(8) - (9)].measure)); 02358 } 02359 break; 02360 02361 case 41: 02362 02363 /* Line 1455 of yacc.c */ 02364 #line 620 "parse_y.y" 02365 { 02366 yyPCB->Flags = MakeFlags ((yyvsp[(3) - (4)].integer) & PCB_FLAGS); 02367 } 02368 break; 02369 02370 case 42: 02371 02372 /* Line 1455 of yacc.c */ 02373 #line 624 "parse_y.y" 02374 { 02375 yyPCB->Flags = string_to_pcbflags ((yyvsp[(3) - (4)].string), yyerror); 02376 free ((yyvsp[(3) - (4)].string)); 02377 } 02378 break; 02379 02380 case 44: 02381 02382 /* Line 1455 of yacc.c */ 02383 #line 657 "parse_y.y" 02384 { 02385 if (ParseGroupString ((yyvsp[(3) - (4)].string), &yyPCB->LayerGroups, &yyData->LayerN)) 02386 { 02387 Message(_("illegal layer-group string\n")); 02388 YYABORT; 02389 } 02390 free ((yyvsp[(3) - (4)].string)); 02391 } 02392 break; 02393 02394 case 46: 02395 02396 /* Line 1455 of yacc.c */ 02397 #line 719 "parse_y.y" 02398 { 02399 if (ParseRouteString(((yyvsp[(3) - (4)].string) == NULL ? "" : (yyvsp[(3) - (4)].string)), &yyPCB->RouteStyle[0], "mil")) 02400 { 02401 Message(_("illegal route-style string\n")); 02402 YYABORT; 02403 } 02404 free ((yyvsp[(3) - (4)].string)); 02405 } 02406 break; 02407 02408 case 47: 02409 02410 /* Line 1455 of yacc.c */ 02411 #line 728 "parse_y.y" 02412 { 02413 if (ParseRouteString(((yyvsp[(3) - (4)].string) == NULL ? "" : (yyvsp[(3) - (4)].string)), &yyPCB->RouteStyle[0], "cmil")) 02414 { 02415 Message(_("illegal route-style string\n")); 02416 YYABORT; 02417 } 02418 free ((yyvsp[(3) - (4)].string)); 02419 } 02420 break; 02421 02422 case 54: 02423 02424 /* Line 1455 of yacc.c */ 02425 #line 751 "parse_y.y" 02426 { attr_list = & yyPCB->Attributes; } 02427 break; 02428 02429 case 59: 02430 02431 /* Line 1455 of yacc.c */ 02432 #line 755 "parse_y.y" 02433 { YYABORT; } 02434 break; 02435 02436 case 66: 02437 02438 /* Line 1455 of yacc.c */ 02439 #line 827 "parse_y.y" 02440 { 02441 CreateNewViaEx (yyData, NU ((yyvsp[(3) - (13)].measure)), NU ((yyvsp[(4) - (13)].measure)), NU ((yyvsp[(5) - (13)].measure)), NU ((yyvsp[(6) - (13)].measure)), NU ((yyvsp[(7) - (13)].measure)), 02442 NU ((yyvsp[(8) - (13)].measure)), (yyvsp[(11) - (13)].string), (yyvsp[(12) - (13)].flagtype), (yyvsp[(9) - (13)].integer), (yyvsp[(10) - (13)].integer)); 02443 free ((yyvsp[(11) - (13)].string)); 02444 } 02445 break; 02446 02447 case 67: 02448 02449 /* Line 1455 of yacc.c */ 02450 #line 837 "parse_y.y" 02451 { 02452 CreateNewVia(yyData, NU ((yyvsp[(3) - (11)].measure)), NU ((yyvsp[(4) - (11)].measure)), NU ((yyvsp[(5) - (11)].measure)), NU ((yyvsp[(6) - (11)].measure)), NU ((yyvsp[(7) - (11)].measure)), 02453 NU ((yyvsp[(8) - (11)].measure)), (yyvsp[(9) - (11)].string), (yyvsp[(10) - (11)].flagtype)); 02454 free ((yyvsp[(9) - (11)].string)); 02455 } 02456 break; 02457 02458 case 68: 02459 02460 /* Line 1455 of yacc.c */ 02461 #line 847 "parse_y.y" 02462 { 02463 CreateNewVia(yyData, OU ((yyvsp[(3) - (11)].measure)), OU ((yyvsp[(4) - (11)].measure)), OU ((yyvsp[(5) - (11)].measure)), OU ((yyvsp[(6) - (11)].measure)), OU ((yyvsp[(7) - (11)].measure)), OU ((yyvsp[(8) - (11)].measure)), (yyvsp[(9) - (11)].string), 02464 OldFlags((yyvsp[(10) - (11)].integer))); 02465 free ((yyvsp[(9) - (11)].string)); 02466 } 02467 break; 02468 02469 case 69: 02470 02471 /* Line 1455 of yacc.c */ 02472 #line 858 "parse_y.y" 02473 { 02474 CreateNewVia(yyData, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(5) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)), 02475 OU ((yyvsp[(5) - (10)].measure)) + OU((yyvsp[(6) - (10)].measure)), OU ((yyvsp[(7) - (10)].measure)), (yyvsp[(8) - (10)].string), OldFlags((yyvsp[(9) - (10)].integer))); 02476 free ((yyvsp[(8) - (10)].string)); 02477 } 02478 break; 02479 02480 case 70: 02481 02482 /* Line 1455 of yacc.c */ 02483 #line 868 "parse_y.y" 02484 { 02485 CreateNewVia(yyData, OU ((yyvsp[(3) - (9)].measure)), OU ((yyvsp[(4) - (9)].measure)), OU ((yyvsp[(5) - (9)].measure)), 2*GROUNDPLANEFRAME, 02486 OU((yyvsp[(5) - (9)].measure)) + 2*MASKFRAME, OU ((yyvsp[(6) - (9)].measure)), (yyvsp[(7) - (9)].string), OldFlags((yyvsp[(8) - (9)].integer))); 02487 free ((yyvsp[(7) - (9)].string)); 02488 } 02489 break; 02490 02491 case 71: 02492 02493 /* Line 1455 of yacc.c */ 02494 #line 878 "parse_y.y" 02495 { 02496 Coord hole = (OU((yyvsp[(5) - (8)].measure)) * DEFAULT_DRILLINGHOLE); 02497 02498 /* make sure that there's enough copper left */ 02499 if (OU((yyvsp[(5) - (8)].measure)) - hole < MIN_PINORVIACOPPER && 02500 OU((yyvsp[(5) - (8)].measure)) > MIN_PINORVIACOPPER) 02501 hole = OU((yyvsp[(5) - (8)].measure)) - MIN_PINORVIACOPPER; 02502 02503 CreateNewVia(yyData, OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), OU ((yyvsp[(5) - (8)].measure)), 2*GROUNDPLANEFRAME, 02504 OU((yyvsp[(5) - (8)].measure)) + 2*MASKFRAME, hole, (yyvsp[(6) - (8)].string), OldFlags((yyvsp[(7) - (8)].integer))); 02505 free ((yyvsp[(6) - (8)].string)); 02506 } 02507 break; 02508 02509 case 72: 02510 02511 /* Line 1455 of yacc.c */ 02512 #line 923 "parse_y.y" 02513 { 02514 CreateNewRat(yyData, NU ((yyvsp[(3) - (10)].measure)), NU ((yyvsp[(4) - (10)].measure)), NU ((yyvsp[(6) - (10)].measure)), NU ((yyvsp[(7) - (10)].measure)), (yyvsp[(5) - (10)].integer), (yyvsp[(8) - (10)].integer), 02515 Settings.RatThickness, (yyvsp[(9) - (10)].flagtype)); 02516 } 02517 break; 02518 02519 case 73: 02520 02521 /* Line 1455 of yacc.c */ 02522 #line 928 "parse_y.y" 02523 { 02524 CreateNewRat(yyData, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)), OU ((yyvsp[(7) - (10)].measure)), (yyvsp[(5) - (10)].integer), (yyvsp[(8) - (10)].integer), 02525 Settings.RatThickness, OldFlags((yyvsp[(9) - (10)].integer))); 02526 } 02527 break; 02528 02529 case 74: 02530 02531 /* Line 1455 of yacc.c */ 02532 #line 971 "parse_y.y" 02533 { 02534 if ((yyvsp[(3) - (7)].integer) <= 0 || (yyvsp[(3) - (7)].integer) > MAX_ALL_LAYER) 02535 { 02536 yyerror("Layernumber out of range"); 02537 YYABORT; 02538 } 02539 if (LayerFlag[(yyvsp[(3) - (7)].integer)-1]) 02540 { 02541 yyerror("Layernumber used twice"); 02542 YYABORT; 02543 } 02544 Layer = &yyData->Layer[(yyvsp[(3) - (7)].integer)-1]; 02545 02546 /* memory for name is already allocated */ 02547 Layer->Name = (yyvsp[(4) - (7)].string); 02548 if (Layer->Name == NULL) 02549 Layer->Name = strdup(""); 02550 LayerFlag[(yyvsp[(3) - (7)].integer)-1] = true; 02551 if ((yyvsp[(5) - (7)].string)) 02552 Layer->Type = string_to_layertype ((yyvsp[(5) - (7)].string), yyerror); 02553 else 02554 Layer->Type = guess_layertype ((yyvsp[(4) - (7)].string), (yyvsp[(3) - (7)].integer), yyData); 02555 if ((yyvsp[(5) - (7)].string) != NULL) 02556 free ((yyvsp[(5) - (7)].string)); 02557 } 02558 break; 02559 02560 case 86: 02561 02562 /* Line 1455 of yacc.c */ 02563 #line 1018 "parse_y.y" 02564 { 02565 CreateNewPolygonFromRectangle(Layer, 02566 OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), OU ((yyvsp[(3) - (8)].measure)) + OU ((yyvsp[(5) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)) + OU ((yyvsp[(6) - (8)].measure)), OldFlags((yyvsp[(7) - (8)].integer))); 02567 } 02568 break; 02569 02570 case 90: 02571 02572 /* Line 1455 of yacc.c */ 02573 #line 1025 "parse_y.y" 02574 { attr_list = & Layer->Attributes; } 02575 break; 02576 02577 case 93: 02578 02579 /* Line 1455 of yacc.c */ 02580 #line 1066 "parse_y.y" 02581 { 02582 CreateNewLineOnLayer(Layer, NU ((yyvsp[(3) - (10)].measure)), NU ((yyvsp[(4) - (10)].measure)), NU ((yyvsp[(5) - (10)].measure)), NU ((yyvsp[(6) - (10)].measure)), 02583 NU ((yyvsp[(7) - (10)].measure)), NU ((yyvsp[(8) - (10)].measure)), (yyvsp[(9) - (10)].flagtype)); 02584 } 02585 break; 02586 02587 case 94: 02588 02589 /* Line 1455 of yacc.c */ 02590 #line 1075 "parse_y.y" 02591 { 02592 CreateNewLineOnLayer(Layer, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(5) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)), 02593 OU ((yyvsp[(7) - (10)].measure)), OU ((yyvsp[(8) - (10)].measure)), OldFlags((yyvsp[(9) - (10)].integer))); 02594 } 02595 break; 02596 02597 case 95: 02598 02599 /* Line 1455 of yacc.c */ 02600 #line 1084 "parse_y.y" 02601 { 02602 /* eliminate old-style rat-lines */ 02603 if ((IV ((yyvsp[(8) - (9)].measure)) & RATFLAG) == 0) 02604 CreateNewLineOnLayer(Layer, OU ((yyvsp[(3) - (9)].measure)), OU ((yyvsp[(4) - (9)].measure)), OU ((yyvsp[(5) - (9)].measure)), OU ((yyvsp[(6) - (9)].measure)), OU ((yyvsp[(7) - (9)].measure)), 02605 200*GROUNDPLANEFRAME, OldFlags(IV ((yyvsp[(8) - (9)].measure)))); 02606 } 02607 break; 02608 02609 case 96: 02610 02611 /* Line 1455 of yacc.c */ 02612 #line 1141 "parse_y.y" 02613 { 02614 CreateNewArcOnLayer(Layer, NU ((yyvsp[(3) - (12)].measure)), NU ((yyvsp[(4) - (12)].measure)), NU ((yyvsp[(5) - (12)].measure)), NU ((yyvsp[(6) - (12)].measure)), (yyvsp[(9) - (12)].number), (yyvsp[(10) - (12)].number), 02615 NU ((yyvsp[(7) - (12)].measure)), NU ((yyvsp[(8) - (12)].measure)), (yyvsp[(11) - (12)].flagtype)); 02616 } 02617 break; 02618 02619 case 97: 02620 02621 /* Line 1455 of yacc.c */ 02622 #line 1150 "parse_y.y" 02623 { 02624 CreateNewArcOnLayer(Layer, OU ((yyvsp[(3) - (12)].measure)), OU ((yyvsp[(4) - (12)].measure)), OU ((yyvsp[(5) - (12)].measure)), OU ((yyvsp[(6) - (12)].measure)), (yyvsp[(9) - (12)].number), (yyvsp[(10) - (12)].number), 02625 OU ((yyvsp[(7) - (12)].measure)), OU ((yyvsp[(8) - (12)].measure)), OldFlags((yyvsp[(11) - (12)].integer))); 02626 } 02627 break; 02628 02629 case 98: 02630 02631 /* Line 1455 of yacc.c */ 02632 #line 1159 "parse_y.y" 02633 { 02634 CreateNewArcOnLayer(Layer, OU ((yyvsp[(3) - (11)].measure)), OU ((yyvsp[(4) - (11)].measure)), OU ((yyvsp[(5) - (11)].measure)), OU ((yyvsp[(5) - (11)].measure)), IV ((yyvsp[(8) - (11)].measure)), (yyvsp[(9) - (11)].number), 02635 OU ((yyvsp[(7) - (11)].measure)), 200*GROUNDPLANEFRAME, OldFlags((yyvsp[(10) - (11)].integer))); 02636 } 02637 break; 02638 02639 case 99: 02640 02641 /* Line 1455 of yacc.c */ 02642 #line 1205 "parse_y.y" 02643 { 02644 /* use a default scale of 100% */ 02645 CreateNewText(Layer,yyFont,OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), (yyvsp[(5) - (8)].number), 100, (yyvsp[(6) - (8)].string), OldFlags((yyvsp[(7) - (8)].integer))); 02646 free ((yyvsp[(6) - (8)].string)); 02647 } 02648 break; 02649 02650 case 100: 02651 02652 /* Line 1455 of yacc.c */ 02653 #line 1215 "parse_y.y" 02654 { 02655 if ((yyvsp[(8) - (9)].integer) & ONSILKFLAG) 02656 { 02657 LayerType *lay = &yyData->Layer[yyData->LayerN + 02658 (((yyvsp[(8) - (9)].integer) & ONSOLDERFLAG) ? BOTTOM_SILK_LAYER : TOP_SILK_LAYER)]; 02659 02660 CreateNewText(lay ,yyFont, OU ((yyvsp[(3) - (9)].measure)), OU ((yyvsp[(4) - (9)].measure)), (yyvsp[(5) - (9)].number), (yyvsp[(6) - (9)].number), (yyvsp[(7) - (9)].string), 02661 OldFlags((yyvsp[(8) - (9)].integer))); 02662 } 02663 else 02664 CreateNewText(Layer, yyFont, OU ((yyvsp[(3) - (9)].measure)), OU ((yyvsp[(4) - (9)].measure)), (yyvsp[(5) - (9)].number), (yyvsp[(6) - (9)].number), (yyvsp[(7) - (9)].string), 02665 OldFlags((yyvsp[(8) - (9)].integer))); 02666 free ((yyvsp[(7) - (9)].string)); 02667 } 02668 break; 02669 02670 case 101: 02671 02672 /* Line 1455 of yacc.c */ 02673 #line 1233 "parse_y.y" 02674 { 02675 /* FIXME: shouldn't know about .f */ 02676 /* I don't think this matters because anything with hi_format 02677 * will have the silk on its own layer in the file rather 02678 * than using the ONSILKFLAG and having it in a copper layer. 02679 * Thus there is no need for anything besides the 'else' 02680 * part of this code. 02681 */ 02682 if ((yyvsp[(8) - (9)].flagtype).f & ONSILKFLAG) 02683 { 02684 LayerType *lay = &yyData->Layer[yyData->LayerN + 02685 (((yyvsp[(8) - (9)].flagtype).f & ONSOLDERFLAG) ? BOTTOM_SILK_LAYER : TOP_SILK_LAYER)]; 02686 02687 CreateNewText(lay, yyFont, NU ((yyvsp[(3) - (9)].measure)), NU ((yyvsp[(4) - (9)].measure)), (yyvsp[(5) - (9)].number), (yyvsp[(6) - (9)].number), (yyvsp[(7) - (9)].string), (yyvsp[(8) - (9)].flagtype)); 02688 } 02689 else 02690 CreateNewText(Layer, yyFont, NU ((yyvsp[(3) - (9)].measure)), NU ((yyvsp[(4) - (9)].measure)), (yyvsp[(5) - (9)].number), (yyvsp[(6) - (9)].number), (yyvsp[(7) - (9)].string), (yyvsp[(8) - (9)].flagtype)); 02691 free ((yyvsp[(7) - (9)].string)); 02692 } 02693 break; 02694 02695 case 102: 02696 02697 /* Line 1455 of yacc.c */ 02698 #line 1296 "parse_y.y" 02699 { 02700 Polygon = CreateNewPolygon(Layer, (yyvsp[(3) - (5)].flagtype)); 02701 } 02702 break; 02703 02704 case 103: 02705 02706 /* Line 1455 of yacc.c */ 02707 #line 1301 "parse_y.y" 02708 { 02709 Cardinal contour, contour_start, contour_end; 02710 bool bad_contour_found = false; 02711 /* ignore junk */ 02712 for (contour = 0; contour <= Polygon->HoleIndexN; contour++) 02713 { 02714 contour_start = (contour == 0) ? 02715 0 : Polygon->HoleIndex[contour - 1]; 02716 contour_end = (contour == Polygon->HoleIndexN) ? 02717 Polygon->PointN : 02718 Polygon->HoleIndex[contour]; 02719 if (contour_end - contour_start < 3) 02720 bad_contour_found = true; 02721 } 02722 02723 if (bad_contour_found) 02724 { 02725 Message(_("WARNING parsing file '%s'\n" 02726 " line: %i\n" 02727 " description: 'ignored polygon " 02728 "(< 3 points in a contour)'\n"), 02729 yyfilename, yylineno); 02730 DestroyObject(yyData, POLYGON_TYPE, Layer, Polygon, Polygon); 02731 } 02732 else 02733 { 02734 SetPolygonBoundingBox (Polygon); 02735 if (!Layer->polygon_tree) 02736 Layer->polygon_tree = r_create_tree (NULL, 0, 0); 02737 r_insert_entry (Layer->polygon_tree, (BoxType *) Polygon, 0); 02738 } 02739 } 02740 break; 02741 02742 case 106: 02743 02744 /* Line 1455 of yacc.c */ 02745 #line 1342 "parse_y.y" 02746 { 02747 CreateNewHoleInPolygon (Polygon); 02748 } 02749 break; 02750 02751 case 110: 02752 02753 /* Line 1455 of yacc.c */ 02754 #line 1356 "parse_y.y" 02755 { 02756 CreateNewPointInPolygon(Polygon, OU ((yyvsp[(2) - (4)].measure)), OU ((yyvsp[(3) - (4)].measure))); 02757 } 02758 break; 02759 02760 case 111: 02761 02762 /* Line 1455 of yacc.c */ 02763 #line 1360 "parse_y.y" 02764 { 02765 CreateNewPointInPolygon(Polygon, NU ((yyvsp[(2) - (4)].measure)), NU ((yyvsp[(3) - (4)].measure))); 02766 } 02767 break; 02768 02769 case 117: 02770 02771 /* Line 1455 of yacc.c */ 02772 #line 1442 "parse_y.y" 02773 { 02774 yyElement = CreateNewElement(yyData, yyFont, NoFlags(), 02775 (yyvsp[(3) - (9)].string), (yyvsp[(4) - (9)].string), NULL, OU ((yyvsp[(5) - (9)].measure)), OU ((yyvsp[(6) - (9)].measure)), (yyvsp[(7) - (9)].integer), 100, NoFlags(), false); 02776 free ((yyvsp[(3) - (9)].string)); 02777 free ((yyvsp[(4) - (9)].string)); 02778 pin_num = 1; 02779 } 02780 break; 02781 02782 case 118: 02783 02784 /* Line 1455 of yacc.c */ 02785 #line 1450 "parse_y.y" 02786 { 02787 SetElementBoundingBox(yyData, yyElement, yyFont); 02788 } 02789 break; 02790 02791 case 119: 02792 02793 /* Line 1455 of yacc.c */ 02794 #line 1460 "parse_y.y" 02795 { 02796 yyElement = CreateNewElement(yyData, yyFont, OldFlags((yyvsp[(3) - (12)].integer)), 02797 (yyvsp[(4) - (12)].string), (yyvsp[(5) - (12)].string), NULL, OU ((yyvsp[(6) - (12)].measure)), OU ((yyvsp[(7) - (12)].measure)), IV ((yyvsp[(8) - (12)].measure)), IV ((yyvsp[(9) - (12)].measure)), OldFlags((yyvsp[(10) - (12)].integer)), false); 02798 free ((yyvsp[(4) - (12)].string)); 02799 free ((yyvsp[(5) - (12)].string)); 02800 pin_num = 1; 02801 } 02802 break; 02803 02804 case 120: 02805 02806 /* Line 1455 of yacc.c */ 02807 #line 1468 "parse_y.y" 02808 { 02809 SetElementBoundingBox(yyData, yyElement, yyFont); 02810 } 02811 break; 02812 02813 case 121: 02814 02815 /* Line 1455 of yacc.c */ 02816 #line 1478 "parse_y.y" 02817 { 02818 yyElement = CreateNewElement(yyData, yyFont, OldFlags((yyvsp[(3) - (13)].integer)), 02819 (yyvsp[(4) - (13)].string), (yyvsp[(5) - (13)].string), (yyvsp[(6) - (13)].string), OU ((yyvsp[(7) - (13)].measure)), OU ((yyvsp[(8) - (13)].measure)), IV ((yyvsp[(9) - (13)].measure)), IV ((yyvsp[(10) - (13)].measure)), OldFlags((yyvsp[(11) - (13)].integer)), false); 02820 free ((yyvsp[(4) - (13)].string)); 02821 free ((yyvsp[(5) - (13)].string)); 02822 free ((yyvsp[(6) - (13)].string)); 02823 pin_num = 1; 02824 } 02825 break; 02826 02827 case 122: 02828 02829 /* Line 1455 of yacc.c */ 02830 #line 1487 "parse_y.y" 02831 { 02832 SetElementBoundingBox(yyData, yyElement, yyFont); 02833 } 02834 break; 02835 02836 case 123: 02837 02838 /* Line 1455 of yacc.c */ 02839 #line 1498 "parse_y.y" 02840 { 02841 yyElement = CreateNewElement(yyData, yyFont, OldFlags((yyvsp[(3) - (15)].integer)), 02842 (yyvsp[(4) - (15)].string), (yyvsp[(5) - (15)].string), (yyvsp[(6) - (15)].string), OU ((yyvsp[(7) - (15)].measure)) + OU ((yyvsp[(9) - (15)].measure)), OU ((yyvsp[(8) - (15)].measure)) + OU ((yyvsp[(10) - (15)].measure)), 02843 (yyvsp[(11) - (15)].number), (yyvsp[(12) - (15)].number), OldFlags((yyvsp[(13) - (15)].integer)), false); 02844 yyElement->MarkX = OU ((yyvsp[(7) - (15)].measure)); 02845 yyElement->MarkY = OU ((yyvsp[(8) - (15)].measure)); 02846 free ((yyvsp[(4) - (15)].string)); 02847 free ((yyvsp[(5) - (15)].string)); 02848 free ((yyvsp[(6) - (15)].string)); 02849 } 02850 break; 02851 02852 case 124: 02853 02854 /* Line 1455 of yacc.c */ 02855 #line 1509 "parse_y.y" 02856 { 02857 SetElementBoundingBox(yyData, yyElement, yyFont); 02858 } 02859 break; 02860 02861 case 125: 02862 02863 /* Line 1455 of yacc.c */ 02864 #line 1520 "parse_y.y" 02865 { 02866 yyElement = CreateNewElement(yyData, yyFont, (yyvsp[(3) - (15)].flagtype), 02867 (yyvsp[(4) - (15)].string), (yyvsp[(5) - (15)].string), (yyvsp[(6) - (15)].string), NU ((yyvsp[(7) - (15)].measure)) + NU ((yyvsp[(9) - (15)].measure)), NU ((yyvsp[(8) - (15)].measure)) + NU ((yyvsp[(10) - (15)].measure)), 02868 (yyvsp[(11) - (15)].number), (yyvsp[(12) - (15)].number), (yyvsp[(13) - (15)].flagtype), false); 02869 yyElement->MarkX = NU ((yyvsp[(7) - (15)].measure)); 02870 yyElement->MarkY = NU ((yyvsp[(8) - (15)].measure)); 02871 free ((yyvsp[(4) - (15)].string)); 02872 free ((yyvsp[(5) - (15)].string)); 02873 free ((yyvsp[(6) - (15)].string)); 02874 } 02875 break; 02876 02877 case 126: 02878 02879 /* Line 1455 of yacc.c */ 02880 #line 1531 "parse_y.y" 02881 { 02882 SetElementBoundingBox(yyData, yyElement, yyFont); 02883 } 02884 break; 02885 02886 case 134: 02887 02888 /* Line 1455 of yacc.c */ 02889 #line 1632 "parse_y.y" 02890 { 02891 CreateNewLineInElement(yyElement, NU ((yyvsp[(3) - (8)].measure)), NU ((yyvsp[(4) - (8)].measure)), NU ((yyvsp[(5) - (8)].measure)), NU ((yyvsp[(6) - (8)].measure)), NU ((yyvsp[(7) - (8)].measure))); 02892 } 02893 break; 02894 02895 case 135: 02896 02897 /* Line 1455 of yacc.c */ 02898 #line 1637 "parse_y.y" 02899 { 02900 CreateNewLineInElement(yyElement, OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), OU ((yyvsp[(5) - (8)].measure)), OU ((yyvsp[(6) - (8)].measure)), OU ((yyvsp[(7) - (8)].measure))); 02901 } 02902 break; 02903 02904 case 136: 02905 02906 /* Line 1455 of yacc.c */ 02907 #line 1642 "parse_y.y" 02908 { 02909 CreateNewArcInElement(yyElement, NU ((yyvsp[(3) - (10)].measure)), NU ((yyvsp[(4) - (10)].measure)), NU ((yyvsp[(5) - (10)].measure)), NU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].number), (yyvsp[(8) - (10)].number), NU ((yyvsp[(9) - (10)].measure))); 02910 } 02911 break; 02912 02913 case 137: 02914 02915 /* Line 1455 of yacc.c */ 02916 #line 1647 "parse_y.y" 02917 { 02918 CreateNewArcInElement(yyElement, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(5) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].number), (yyvsp[(8) - (10)].number), OU ((yyvsp[(9) - (10)].measure))); 02919 } 02920 break; 02921 02922 case 138: 02923 02924 /* Line 1455 of yacc.c */ 02925 #line 1652 "parse_y.y" 02926 { 02927 yyElement->MarkX = NU ((yyvsp[(3) - (5)].measure)); 02928 yyElement->MarkY = NU ((yyvsp[(4) - (5)].measure)); 02929 } 02930 break; 02931 02932 case 139: 02933 02934 /* Line 1455 of yacc.c */ 02935 #line 1657 "parse_y.y" 02936 { 02937 yyElement->MarkX = OU ((yyvsp[(3) - (5)].measure)); 02938 yyElement->MarkY = OU ((yyvsp[(4) - (5)].measure)); 02939 } 02940 break; 02941 02942 case 140: 02943 02944 /* Line 1455 of yacc.c */ 02945 #line 1661 "parse_y.y" 02946 { attr_list = & yyElement->Attributes; } 02947 break; 02948 02949 case 148: 02950 02951 /* Line 1455 of yacc.c */ 02952 #line 1676 "parse_y.y" 02953 { 02954 CreateNewLineInElement(yyElement, NU ((yyvsp[(3) - (8)].measure)) + yyElement->MarkX, 02955 NU ((yyvsp[(4) - (8)].measure)) + yyElement->MarkY, NU ((yyvsp[(5) - (8)].measure)) + yyElement->MarkX, 02956 NU ((yyvsp[(6) - (8)].measure)) + yyElement->MarkY, NU ((yyvsp[(7) - (8)].measure))); 02957 } 02958 break; 02959 02960 case 149: 02961 02962 /* Line 1455 of yacc.c */ 02963 #line 1682 "parse_y.y" 02964 { 02965 CreateNewLineInElement(yyElement, OU ((yyvsp[(3) - (8)].measure)) + yyElement->MarkX, 02966 OU ((yyvsp[(4) - (8)].measure)) + yyElement->MarkY, OU ((yyvsp[(5) - (8)].measure)) + yyElement->MarkX, 02967 OU ((yyvsp[(6) - (8)].measure)) + yyElement->MarkY, OU ((yyvsp[(7) - (8)].measure))); 02968 } 02969 break; 02970 02971 case 150: 02972 02973 /* Line 1455 of yacc.c */ 02974 #line 1689 "parse_y.y" 02975 { 02976 CreateNewArcInElement(yyElement, NU ((yyvsp[(3) - (10)].measure)) + yyElement->MarkX, 02977 NU ((yyvsp[(4) - (10)].measure)) + yyElement->MarkY, NU ((yyvsp[(5) - (10)].measure)), NU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].number), (yyvsp[(8) - (10)].number), NU ((yyvsp[(9) - (10)].measure))); 02978 } 02979 break; 02980 02981 case 151: 02982 02983 /* Line 1455 of yacc.c */ 02984 #line 1694 "parse_y.y" 02985 { 02986 CreateNewArcInElement(yyElement, OU ((yyvsp[(3) - (10)].measure)) + yyElement->MarkX, 02987 OU ((yyvsp[(4) - (10)].measure)) + yyElement->MarkY, OU ((yyvsp[(5) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].number), (yyvsp[(8) - (10)].number), OU ((yyvsp[(9) - (10)].measure))); 02988 } 02989 break; 02990 02991 case 152: 02992 02993 /* Line 1455 of yacc.c */ 02994 #line 1698 "parse_y.y" 02995 { attr_list = & yyElement->Attributes; } 02996 break; 02997 02998 case 154: 02999 03000 /* Line 1455 of yacc.c */ 03001 #line 1749 "parse_y.y" 03002 { 03003 CreateNewPin(yyElement, NU ((yyvsp[(3) - (12)].measure)) + yyElement->MarkX, 03004 NU ((yyvsp[(4) - (12)].measure)) + yyElement->MarkY, NU ((yyvsp[(5) - (12)].measure)), NU ((yyvsp[(6) - (12)].measure)), NU ((yyvsp[(7) - (12)].measure)), NU ((yyvsp[(8) - (12)].measure)), (yyvsp[(9) - (12)].string), 03005 (yyvsp[(10) - (12)].string), (yyvsp[(11) - (12)].flagtype)); 03006 free ((yyvsp[(9) - (12)].string)); 03007 free ((yyvsp[(10) - (12)].string)); 03008 } 03009 break; 03010 03011 case 155: 03012 03013 /* Line 1455 of yacc.c */ 03014 #line 1761 "parse_y.y" 03015 { 03016 CreateNewPin(yyElement, OU ((yyvsp[(3) - (12)].measure)) + yyElement->MarkX, 03017 OU ((yyvsp[(4) - (12)].measure)) + yyElement->MarkY, OU ((yyvsp[(5) - (12)].measure)), OU ((yyvsp[(6) - (12)].measure)), OU ((yyvsp[(7) - (12)].measure)), OU ((yyvsp[(8) - (12)].measure)), (yyvsp[(9) - (12)].string), 03018 (yyvsp[(10) - (12)].string), OldFlags((yyvsp[(11) - (12)].integer))); 03019 free ((yyvsp[(9) - (12)].string)); 03020 free ((yyvsp[(10) - (12)].string)); 03021 } 03022 break; 03023 03024 case 156: 03025 03026 /* Line 1455 of yacc.c */ 03027 #line 1773 "parse_y.y" 03028 { 03029 CreateNewPin(yyElement, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(5) - (10)].measure)), 2*GROUNDPLANEFRAME, 03030 OU ((yyvsp[(5) - (10)].measure)) + 2*MASKFRAME, OU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].string), (yyvsp[(8) - (10)].string), OldFlags((yyvsp[(9) - (10)].integer))); 03031 free ((yyvsp[(7) - (10)].string)); 03032 free ((yyvsp[(8) - (10)].string)); 03033 } 03034 break; 03035 03036 case 157: 03037 03038 /* Line 1455 of yacc.c */ 03039 #line 1784 "parse_y.y" 03040 { 03041 char p_number[8]; 03042 03043 sprintf(p_number, "%d", pin_num++); 03044 CreateNewPin(yyElement, OU ((yyvsp[(3) - (9)].measure)), OU ((yyvsp[(4) - (9)].measure)), OU ((yyvsp[(5) - (9)].measure)), 2*GROUNDPLANEFRAME, 03045 OU ((yyvsp[(5) - (9)].measure)) + 2*MASKFRAME, OU ((yyvsp[(6) - (9)].measure)), (yyvsp[(7) - (9)].string), p_number, OldFlags((yyvsp[(8) - (9)].integer))); 03046 03047 free ((yyvsp[(7) - (9)].string)); 03048 } 03049 break; 03050 03051 case 158: 03052 03053 /* Line 1455 of yacc.c */ 03054 #line 1800 "parse_y.y" 03055 { 03056 Coord hole = OU ((yyvsp[(5) - (8)].measure)) * DEFAULT_DRILLINGHOLE; 03057 char p_number[8]; 03058 03059 /* make sure that there's enough copper left */ 03060 if (OU ((yyvsp[(5) - (8)].measure)) - hole < MIN_PINORVIACOPPER && 03061 OU ((yyvsp[(5) - (8)].measure)) > MIN_PINORVIACOPPER) 03062 hole = OU ((yyvsp[(5) - (8)].measure)) - MIN_PINORVIACOPPER; 03063 03064 sprintf(p_number, "%d", pin_num++); 03065 CreateNewPin(yyElement, OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), OU ((yyvsp[(5) - (8)].measure)), 2*GROUNDPLANEFRAME, 03066 OU ((yyvsp[(5) - (8)].measure)) + 2*MASKFRAME, hole, (yyvsp[(6) - (8)].string), p_number, OldFlags((yyvsp[(7) - (8)].integer))); 03067 free ((yyvsp[(6) - (8)].string)); 03068 } 03069 break; 03070 03071 case 159: 03072 03073 /* Line 1455 of yacc.c */ 03074 #line 1863 "parse_y.y" 03075 { 03076 CreateNewPad(yyElement, NU ((yyvsp[(3) - (13)].measure)) + yyElement->MarkX, 03077 NU ((yyvsp[(4) - (13)].measure)) + yyElement->MarkY, 03078 NU ((yyvsp[(5) - (13)].measure)) + yyElement->MarkX, 03079 NU ((yyvsp[(6) - (13)].measure)) + yyElement->MarkY, NU ((yyvsp[(7) - (13)].measure)), NU ((yyvsp[(8) - (13)].measure)), NU ((yyvsp[(9) - (13)].measure)), 03080 (yyvsp[(10) - (13)].string), (yyvsp[(11) - (13)].string), (yyvsp[(12) - (13)].flagtype)); 03081 free ((yyvsp[(10) - (13)].string)); 03082 free ((yyvsp[(11) - (13)].string)); 03083 } 03084 break; 03085 03086 case 160: 03087 03088 /* Line 1455 of yacc.c */ 03089 #line 1877 "parse_y.y" 03090 { 03091 CreateNewPad(yyElement,OU ((yyvsp[(3) - (13)].measure)) + yyElement->MarkX, 03092 OU ((yyvsp[(4) - (13)].measure)) + yyElement->MarkY, OU ((yyvsp[(5) - (13)].measure)) + yyElement->MarkX, 03093 OU ((yyvsp[(6) - (13)].measure)) + yyElement->MarkY, OU ((yyvsp[(7) - (13)].measure)), OU ((yyvsp[(8) - (13)].measure)), OU ((yyvsp[(9) - (13)].measure)), 03094 (yyvsp[(10) - (13)].string), (yyvsp[(11) - (13)].string), OldFlags((yyvsp[(12) - (13)].integer))); 03095 free ((yyvsp[(10) - (13)].string)); 03096 free ((yyvsp[(11) - (13)].string)); 03097 } 03098 break; 03099 03100 case 161: 03101 03102 /* Line 1455 of yacc.c */ 03103 #line 1890 "parse_y.y" 03104 { 03105 CreateNewPad(yyElement,OU ((yyvsp[(3) - (11)].measure)),OU ((yyvsp[(4) - (11)].measure)),OU ((yyvsp[(5) - (11)].measure)),OU ((yyvsp[(6) - (11)].measure)),OU ((yyvsp[(7) - (11)].measure)), 2*GROUNDPLANEFRAME, 03106 OU ((yyvsp[(7) - (11)].measure)) + 2*MASKFRAME, (yyvsp[(8) - (11)].string), (yyvsp[(9) - (11)].string), OldFlags((yyvsp[(10) - (11)].integer))); 03107 free ((yyvsp[(8) - (11)].string)); 03108 free ((yyvsp[(9) - (11)].string)); 03109 } 03110 break; 03111 03112 case 162: 03113 03114 /* Line 1455 of yacc.c */ 03115 #line 1901 "parse_y.y" 03116 { 03117 char p_number[8]; 03118 03119 sprintf(p_number, "%d", pin_num++); 03120 CreateNewPad(yyElement,OU ((yyvsp[(3) - (10)].measure)),OU ((yyvsp[(4) - (10)].measure)),OU ((yyvsp[(5) - (10)].measure)),OU ((yyvsp[(6) - (10)].measure)),OU ((yyvsp[(7) - (10)].measure)), 2*GROUNDPLANEFRAME, 03121 OU ((yyvsp[(7) - (10)].measure)) + 2*MASKFRAME, (yyvsp[(8) - (10)].string),p_number, OldFlags((yyvsp[(9) - (10)].integer))); 03122 free ((yyvsp[(8) - (10)].string)); 03123 } 03124 break; 03125 03126 case 163: 03127 03128 /* Line 1455 of yacc.c */ 03129 #line 1911 "parse_y.y" 03130 { (yyval.flagtype) = OldFlags((yyvsp[(1) - (1)].integer)); } 03131 break; 03132 03133 case 164: 03134 03135 /* Line 1455 of yacc.c */ 03136 #line 1912 "parse_y.y" 03137 { (yyval.flagtype) = string_to_flags ((yyvsp[(1) - (1)].string), yyerror); free((yyvsp[(1) - (1)].string)); } 03138 break; 03139 03140 case 168: 03141 03142 /* Line 1455 of yacc.c */ 03143 #line 1953 "parse_y.y" 03144 { 03145 if ((yyvsp[(3) - (6)].integer) <= 0 || (yyvsp[(3) - (6)].integer) > MAX_FONTPOSITION) 03146 { 03147 yyerror("fontposition out of range"); 03148 YYABORT; 03149 } 03150 Symbol = &yyFont->Symbol[(yyvsp[(3) - (6)].integer)]; 03151 if (Symbol->Valid) 03152 { 03153 yyerror("symbol ID used twice"); 03154 YYABORT; 03155 } 03156 Symbol->Valid = true; 03157 Symbol->Delta = NU ((yyvsp[(4) - (6)].measure)); 03158 } 03159 break; 03160 03161 case 169: 03162 03163 /* Line 1455 of yacc.c */ 03164 #line 1969 "parse_y.y" 03165 { 03166 if ((yyvsp[(3) - (6)].integer) <= 0 || (yyvsp[(3) - (6)].integer) > MAX_FONTPOSITION) 03167 { 03168 yyerror("fontposition out of range"); 03169 YYABORT; 03170 } 03171 Symbol = &yyFont->Symbol[(yyvsp[(3) - (6)].integer)]; 03172 if (Symbol->Valid) 03173 { 03174 yyerror("symbol ID used twice"); 03175 YYABORT; 03176 } 03177 Symbol->Valid = true; 03178 Symbol->Delta = OU ((yyvsp[(4) - (6)].measure)); 03179 } 03180 break; 03181 03182 case 175: 03183 03184 /* Line 1455 of yacc.c */ 03185 #line 2025 "parse_y.y" 03186 { 03187 CreateNewLineInSymbol(Symbol, OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), OU ((yyvsp[(5) - (8)].measure)), OU ((yyvsp[(6) - (8)].measure)), OU ((yyvsp[(7) - (8)].measure))); 03188 } 03189 break; 03190 03191 case 176: 03192 03193 /* Line 1455 of yacc.c */ 03194 #line 2032 "parse_y.y" 03195 { 03196 CreateNewLineInSymbol(Symbol, NU ((yyvsp[(3) - (8)].measure)), NU ((yyvsp[(4) - (8)].measure)), NU ((yyvsp[(5) - (8)].measure)), NU ((yyvsp[(6) - (8)].measure)), NU ((yyvsp[(7) - (8)].measure))); 03197 } 03198 break; 03199 03200 case 184: 03201 03202 /* Line 1455 of yacc.c */ 03203 #line 2086 "parse_y.y" 03204 { 03205 Menu = CreateNewNet(&yyPCB->NetlistLib, (yyvsp[(3) - (6)].string), (yyvsp[(4) - (6)].string)); 03206 free ((yyvsp[(3) - (6)].string)); 03207 free ((yyvsp[(4) - (6)].string)); 03208 } 03209 break; 03210 03211 case 190: 03212 03213 /* Line 1455 of yacc.c */ 03214 #line 2121 "parse_y.y" 03215 { 03216 CreateNewConnection(Menu, (yyvsp[(3) - (4)].string)); 03217 free ((yyvsp[(3) - (4)].string)); 03218 } 03219 break; 03220 03221 case 191: 03222 03223 /* Line 1455 of yacc.c */ 03224 #line 2180 "parse_y.y" 03225 { 03226 CreateNewAttribute (attr_list, (yyvsp[(3) - (5)].string), (yyvsp[(4) - (5)].string) ? (yyvsp[(4) - (5)].string) : (char *)""); 03227 free ((yyvsp[(3) - (5)].string)); 03228 free ((yyvsp[(4) - (5)].string)); 03229 } 03230 break; 03231 03232 case 192: 03233 03234 /* Line 1455 of yacc.c */ 03235 #line 2187 "parse_y.y" 03236 { (yyval.string) = (yyvsp[(1) - (1)].string); } 03237 break; 03238 03239 case 193: 03240 03241 /* Line 1455 of yacc.c */ 03242 #line 2188 "parse_y.y" 03243 { (yyval.string) = 0; } 03244 break; 03245 03246 case 194: 03247 03248 /* Line 1455 of yacc.c */ 03249 #line 2192 "parse_y.y" 03250 { (yyval.number) = (yyvsp[(1) - (1)].number); } 03251 break; 03252 03253 case 195: 03254 03255 /* Line 1455 of yacc.c */ 03256 #line 2193 "parse_y.y" 03257 { (yyval.number) = (yyvsp[(1) - (1)].integer); } 03258 break; 03259 03260 case 196: 03261 03262 /* Line 1455 of yacc.c */ 03263 #line 2198 "parse_y.y" 03264 { do_measure(&(yyval.measure), (yyvsp[(1) - (1)].number), MIL_TO_COORD ((yyvsp[(1) - (1)].number)) / 100.0, 0); } 03265 break; 03266 03267 case 197: 03268 03269 /* Line 1455 of yacc.c */ 03270 #line 2199 "parse_y.y" 03271 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number)) / 1000000.0); } 03272 break; 03273 03274 case 198: 03275 03276 /* Line 1455 of yacc.c */ 03277 #line 2200 "parse_y.y" 03278 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number)) / 100.0); } 03279 break; 03280 03281 case 199: 03282 03283 /* Line 1455 of yacc.c */ 03284 #line 2201 "parse_y.y" 03285 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number))); } 03286 break; 03287 03288 case 200: 03289 03290 /* Line 1455 of yacc.c */ 03291 #line 2202 "parse_y.y" 03292 { M ((yyval.measure), (yyvsp[(1) - (2)].number), INCH_TO_COORD ((yyvsp[(1) - (2)].number))); } 03293 break; 03294 03295 case 201: 03296 03297 /* Line 1455 of yacc.c */ 03298 #line 2203 "parse_y.y" 03299 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) / 1000000.0); } 03300 break; 03301 03302 case 202: 03303 03304 /* Line 1455 of yacc.c */ 03305 #line 2204 "parse_y.y" 03306 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) / 1000000.0); } 03307 break; 03308 03309 case 203: 03310 03311 /* Line 1455 of yacc.c */ 03312 #line 2205 "parse_y.y" 03313 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) / 1000.0); } 03314 break; 03315 03316 case 204: 03317 03318 /* Line 1455 of yacc.c */ 03319 #line 2206 "parse_y.y" 03320 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number))); } 03321 break; 03322 03323 case 205: 03324 03325 /* Line 1455 of yacc.c */ 03326 #line 2207 "parse_y.y" 03327 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) * 1000.0); } 03328 break; 03329 03330 case 206: 03331 03332 /* Line 1455 of yacc.c */ 03333 #line 2208 "parse_y.y" 03334 { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) * 1000000.0); } 03335 break; 03336 03337 03338 03339 /* Line 1455 of yacc.c */ 03340 #line 3341 "parse_y.c" 03341 default: break; 03342 } 03343 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 03344 03345 YYPOPSTACK (yylen); 03346 yylen = 0; 03347 YY_STACK_PRINT (yyss, yyssp); 03348 03349 *++yyvsp = yyval; 03350 03351 /* Now `shift' the result of the reduction. Determine what state 03352 that goes to, based on the state we popped back to and the rule 03353 number reduced by. */ 03354 03355 yyn = yyr1[yyn]; 03356 03357 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 03358 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 03359 yystate = yytable[yystate]; 03360 else 03361 yystate = yydefgoto[yyn - YYNTOKENS]; 03362 03363 goto yynewstate; 03364 03365 03366 /*------------------------------------. 03367 | yyerrlab -- here on detecting error | 03368 `------------------------------------*/ 03369 yyerrlab: 03370 /* If not already recovering from an error, report this error. */ 03371 if (!yyerrstatus) 03372 { 03373 ++yynerrs; 03374 #if ! YYERROR_VERBOSE 03375 yyerror (YY_("syntax error")); 03376 #else 03377 { 03378 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 03379 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 03380 { 03381 YYSIZE_T yyalloc = 2 * yysize; 03382 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 03383 yyalloc = YYSTACK_ALLOC_MAXIMUM; 03384 if (yymsg != yymsgbuf) 03385 YYSTACK_FREE (yymsg); 03386 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 03387 if (yymsg) 03388 yymsg_alloc = yyalloc; 03389 else 03390 { 03391 yymsg = yymsgbuf; 03392 yymsg_alloc = sizeof yymsgbuf; 03393 } 03394 } 03395 03396 if (0 < yysize && yysize <= yymsg_alloc) 03397 { 03398 (void) yysyntax_error (yymsg, yystate, yychar); 03399 yyerror (yymsg); 03400 } 03401 else 03402 { 03403 yyerror (YY_("syntax error")); 03404 if (yysize != 0) 03405 goto yyexhaustedlab; 03406 } 03407 } 03408 #endif 03409 } 03410 03411 03412 03413 if (yyerrstatus == 3) 03414 { 03415 /* If just tried and failed to reuse lookahead token after an 03416 error, discard it. */ 03417 03418 if (yychar <= YYEOF) 03419 { 03420 /* Return failure if at end of input. */ 03421 if (yychar == YYEOF) 03422 YYABORT; 03423 } 03424 else 03425 { 03426 yydestruct ("Error: discarding", 03427 yytoken, &yylval); 03428 yychar = YYEMPTY; 03429 } 03430 } 03431 03432 /* Else will try to reuse lookahead token after shifting the error 03433 token. */ 03434 goto yyerrlab1; 03435 03436 03437 /*---------------------------------------------------. 03438 | yyerrorlab -- error raised explicitly by YYERROR. | 03439 `---------------------------------------------------*/ 03440 yyerrorlab: 03441 03442 /* Pacify compilers like GCC when the user code never invokes 03443 YYERROR and the label yyerrorlab therefore never appears in user 03444 code. */ 03445 if (/*CONSTCOND*/ 0) 03446 goto yyerrorlab; 03447 03448 /* Do not reclaim the symbols of the rule which action triggered 03449 this YYERROR. */ 03450 YYPOPSTACK (yylen); 03451 yylen = 0; 03452 YY_STACK_PRINT (yyss, yyssp); 03453 yystate = *yyssp; 03454 goto yyerrlab1; 03455 03456 03457 /*-------------------------------------------------------------. 03458 | yyerrlab1 -- common code for both syntax error and YYERROR. | 03459 `-------------------------------------------------------------*/ 03460 yyerrlab1: 03461 yyerrstatus = 3; /* Each real token shifted decrements this. */ 03462 03463 for (;;) 03464 { 03465 yyn = yypact[yystate]; 03466 if (yyn != YYPACT_NINF) 03467 { 03468 yyn += YYTERROR; 03469 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 03470 { 03471 yyn = yytable[yyn]; 03472 if (0 < yyn) 03473 break; 03474 } 03475 } 03476 03477 /* Pop the current state because it cannot handle the error token. */ 03478 if (yyssp == yyss) 03479 YYABORT; 03480 03481 03482 yydestruct ("Error: popping", 03483 yystos[yystate], yyvsp); 03484 YYPOPSTACK (1); 03485 yystate = *yyssp; 03486 YY_STACK_PRINT (yyss, yyssp); 03487 } 03488 03489 *++yyvsp = yylval; 03490 03491 03492 /* Shift the error token. */ 03493 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 03494 03495 yystate = yyn; 03496 goto yynewstate; 03497 03498 03499 /*-------------------------------------. 03500 | yyacceptlab -- YYACCEPT comes here. | 03501 `-------------------------------------*/ 03502 yyacceptlab: 03503 yyresult = 0; 03504 goto yyreturn; 03505 03506 /*-----------------------------------. 03507 | yyabortlab -- YYABORT comes here. | 03508 `-----------------------------------*/ 03509 yyabortlab: 03510 yyresult = 1; 03511 goto yyreturn; 03512 03513 #if !defined(yyoverflow) || YYERROR_VERBOSE 03514 /*-------------------------------------------------. 03515 | yyexhaustedlab -- memory exhaustion comes here. | 03516 `-------------------------------------------------*/ 03517 yyexhaustedlab: 03518 yyerror (YY_("memory exhausted")); 03519 yyresult = 2; 03520 /* Fall through. */ 03521 #endif 03522 03523 yyreturn: 03524 if (yychar != YYEMPTY) 03525 yydestruct ("Cleanup: discarding lookahead", 03526 yytoken, &yylval); 03527 /* Do not reclaim the symbols of the rule which action triggered 03528 this YYABORT or YYACCEPT. */ 03529 YYPOPSTACK (yylen); 03530 YY_STACK_PRINT (yyss, yyssp); 03531 while (yyssp != yyss) 03532 { 03533 yydestruct ("Cleanup: popping", 03534 yystos[*yyssp], yyvsp); 03535 YYPOPSTACK (1); 03536 } 03537 #ifndef yyoverflow 03538 if (yyss != yyssa) 03539 YYSTACK_FREE (yyss); 03540 #endif 03541 #if YYERROR_VERBOSE 03542 if (yymsg != yymsgbuf) 03543 YYSTACK_FREE (yymsg); 03544 #endif 03545 /* Make sure YYID is used. */ 03546 return YYID (yyresult); 03547 } 03548 03549 03550 03551 /* Line 1675 of yacc.c */ 03552 #line 2211 "parse_y.y" 03553 03554 03555 /* --------------------------------------------------------------------------- 03556 * error routine called by parser library 03557 */ 03558 int yyerror(const char * s) 03559 { 03560 Message(_("ERROR parsing file '%s'\n" 03561 " line: %i\n" 03562 " description: '%s'\n"), 03563 yyfilename, yylineno, s); 03564 return(0); 03565 } 03566 03567 int yywrap() 03568 { 03569 return 1; 03570 } 03571 03572 static int 03573 check_file_version (int ver) 03574 { 03575 if ( ver > PCB_FILE_VERSION ) { 03576 Message (_("ERROR: The file you are attempting to load is in a format\n" 03577 "which is too new for this version of pcb. To load this file\n" 03578 "you need a version of pcb which is >= %d. If you are\n" 03579 "using a version built from git source, the source date\n" 03580 "must be >= %d. This copy of pcb can only read files\n" 03581 "up to file version %d.\n"), ver, ver, PCB_FILE_VERSION); 03582 return 1; 03583 } 03584 03585 return 0; 03586 } 03587 03588 static void 03589 do_measure (PLMeasure *m, Coord i, double d, int u) 03590 { 03591 m->ival = i; 03592 m->bval = round (d); 03593 m->dval = d; 03594 m->has_units = u; 03595 } 03596 03597 static int 03598 integer_value (PLMeasure m) 03599 { 03600 if (m.has_units) 03601 yyerror("units ignored here"); 03602 return m.ival; 03603 } 03604 03605 static Coord 03606 old_units (PLMeasure m) 03607 { 03608 if (m.has_units) 03609 return m.bval; 03610 return round (MIL_TO_COORD (m.ival)); 03611 } 03612 03613 static Coord 03614 new_units (PLMeasure m) 03615 { 03616 if (m.has_units) 03617 return m.bval; 03618 return round (MIL_TO_COORD (m.ival) / 100.0); 03619 } 03620