Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | /* A Bison parser, made by GNU Bison 3.0.4. */ |
| 2 | |||
| 3 | /* Bison implementation for Yacc-like parsers in C |
||
| 4 | |||
| 5 | Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. |
||
| 6 | |||
| 7 | This program is free software: you can redistribute it and/or modify |
||
| 8 | it under the terms of the GNU General Public License as published by |
||
| 9 | the Free Software Foundation, either version 3 of the License, or |
||
| 10 | (at your option) any later version. |
||
| 11 | |||
| 12 | This program is distributed in the hope that it will be useful, |
||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 15 | GNU General Public License for more details. |
||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License |
||
| 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
||
| 19 | |||
| 20 | /* As a special exception, you may create a larger work that contains |
||
| 21 | part or all of the Bison parser skeleton and distribute that work |
||
| 22 | under terms of your choice, so long as that work isn't itself a |
||
| 23 | parser generator using the skeleton or a modified version thereof |
||
| 24 | as a parser skeleton. Alternatively, if you modify or redistribute |
||
| 25 | the parser skeleton itself, you may (at your option) remove this |
||
| 26 | special exception, which will cause the skeleton and the resulting |
||
| 27 | Bison output files to be licensed under the GNU General Public |
||
| 28 | License without this special exception. |
||
| 29 | |||
| 30 | This special exception was added by the Free Software Foundation in |
||
| 31 | version 2.2 of Bison. */ |
||
| 32 | |||
| 33 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
||
| 34 | simplifying the original so-called "semantic" parser. */ |
||
| 35 | |||
| 36 | /* All symbols defined below should begin with yy or YY, to avoid |
||
| 37 | infringing on user name space. This should be done even for local |
||
| 38 | variables, as they might otherwise be expanded by user macros. |
||
| 39 | There are some unavoidable exceptions within include files to |
||
| 40 | define necessary library symbols; they are noted "INFRINGES ON |
||
| 41 | USER NAME SPACE" below. */ |
||
| 42 | |||
| 43 | /* Identify Bison output. */ |
||
| 44 | #define YYBISON 1 |
||
| 45 | |||
| 46 | /* Bison version. */ |
||
| 47 | #define YYBISON_VERSION "3.0.4" |
||
| 48 | |||
| 49 | /* Skeleton name. */ |
||
| 50 | #define YYSKELETON_NAME "yacc.c" |
||
| 51 | |||
| 52 | /* Pure parsers. */ |
||
| 53 | #define YYPURE 0 |
||
| 54 | |||
| 55 | /* Push parsers. */ |
||
| 56 | #define YYPUSH 0 |
||
| 57 | |||
| 58 | /* Pull parsers. */ |
||
| 59 | #define YYPULL 1 |
||
| 60 | |||
| 61 | /* Copy the first part of user declarations. */ |
||
| 62 | #line 1 "acf_yacc.y" /* yacc.c:339 */ |
||
| 63 | |||
| 64 | /* |
||
| 65 | * $Header: C:/cvsroot/Vert03/acf_src/acf_yacc.y,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $ *//* |
||
| 66 | * |
||
| 67 | * $Log: acf_yacc.y,v $ |
||
| 68 | * Revision 1.1.1.1 2003/11/04 23:34:58 mjames |
||
| 69 | * Imported into local repositrory |
||
| 70 | * |
||
| 71 | * Revision 1.38 2002/12/06 23:28:04 mjames |
||
| 72 | * Corrected locations where GND was being a |
||
| 73 | * reserved word and in fact was legal as pin/port ident |
||
| 74 | * |
||
| 75 | * Also error checked problems of duplicate idents appearing |
||
| 76 | * |
||
| 77 | * Revision 1.37 2002/10/02 18:45:23 MJAMES |
||
| 78 | * use routed_net member in place of net member when jumpers are processed |
||
| 79 | * |
||
| 80 | * Revision 1.36 2002/09/30 13:25:31 MJAMES |
||
| 81 | * Upgraded nets to include 'lhs_expression' being the range on the |
||
| 82 | * left hand side of a signal connection to a port |
||
| 83 | * |
||
| 84 | * std_logic_vector (0) <= std_logic , on a port of a chip |
||
| 85 | * |
||
| 86 | * Revision 1.35 2002/09/16 11:02:44 mjames |
||
| 87 | * Added some of the generic string types to the input parser. |
||
| 88 | * |
||
| 89 | * Revision 1.34 2002/09/09 10:14:58 mjames |
||
| 90 | * Modified expression parser to match CC as previous one was |
||
| 91 | * broken |
||
| 92 | * |
||
| 93 | * Revision 1.33 2002/08/23 14:21:54 mjames |
||
| 94 | * Added the <VHDL> string keyword. |
||
| 95 | * |
||
| 96 | * Revision 1.32 2002/08/19 14:31:26 mjames |
||
| 97 | * Removed an incompatibility with env_string generics where the output |
||
| 98 | * of Vertical caused an error under some circumstances. |
||
| 99 | * |
||
| 100 | * Revision 1.31 2002/08/14 12:00:15 mjames |
||
| 101 | * cleaned up on end of file code |
||
| 102 | * |
||
| 103 | * Revision 1.30 2002/08/06 12:54:14 mjames |
||
| 104 | * Merge in from latest version |
||
| 105 | * |
||
| 106 | * |
||
| 107 | * Revision 1.32 2002/03/22 16:16:28 mjames |
||
| 108 | * Modifications to undo over-zealous checking of |
||
| 109 | * current chip even in incorrect scenarios. |
||
| 110 | * |
||
| 111 | * Revision 1.31 2002/03/19 11:59:34 mjames |
||
| 112 | * Applying paranoid programming to the use of current_chip pointer |
||
| 113 | * as there were some address exceptions created in cases of missing |
||
| 114 | * components being instantiated in VHDL |
||
| 115 | * |
||
| 116 | * Revision 1.30 2002/03/08 11:53:57 mjames |
||
| 117 | * Corrected verilog module instance code |
||
| 118 | * |
||
| 119 | * Revision 1.29 2002/01/16 22:02:36 mjames |
||
| 120 | * Prevented coredumps while reading Verilog file |
||
| 121 | * s.g. Should permit further analysis of added |
||
| 122 | * requirements for complete Verilog reading |
||
| 123 | * |
||
| 124 | * Revision 1.28 2002/01/16 10:06:19 mjames |
||
| 125 | * Added package definitions to VHDL syntax |
||
| 126 | * According to report by John Marquis |
||
| 127 | * |
||
| 128 | * Revision 1.27 2002/01/03 16:39:17 mjames |
||
| 129 | * Removed unused rule causing coredump |
||
| 130 | * |
||
| 131 | * Revision 1.26 2001/12/13 22:12:15 mjames |
||
| 132 | * Vertical now supports nested include database files |
||
| 133 | * This allows wrappers around 'pure' VHDL or Verilog files |
||
| 134 | * |
||
| 135 | * Revision 1.25 2001/12/11 21:29:56 mjames |
||
| 136 | * Verilog syntax now read in by Vertical allows pin templates |
||
| 137 | * defined by Certify to be used. |
||
| 138 | * |
||
| 139 | * Revision 1.24 2001/11/30 22:47:37 mjames |
||
| 140 | * small corrections |
||
| 141 | * |
||
| 142 | * Revision 1.23 2001/11/30 22:21:19 mjames |
||
| 143 | * Modifying Verilog reading syntax to accept valid code. |
||
| 144 | * |
||
| 145 | * Revision 1.22 2001/11/19 09:46:14 mjames |
||
| 146 | * Semicolons missing: caused error with byacc |
||
| 147 | * |
||
| 148 | * Revision 1.21 2001/10/31 22:19:57 mjames |
||
| 149 | * Tidying up problematical comments caused by CVS |
||
| 150 | * 'intelligent' comment guessing |
||
| 151 | * |
||
| 152 | * Revision 1.20 2001/10/31 16:27:25 mjames |
||
| 153 | * Added a datastructure to hide regular expression information from programs. |
||
| 154 | * Changed call to regexec to indicate 0 subexpressions to be matched |
||
| 155 | * rather than a number dependent on strlen(string) which was wrong. |
||
| 156 | * |
||
| 157 | * Revision 1.19 2001/10/02 20:55:37 mjames |
||
| 158 | * Moved documentation about code to main program module. |
||
| 159 | * |
||
| 160 | * Revision 1.18 2001/09/21 14:13:10 mjames |
||
| 161 | * Corrected the creation of chip pinouts from VHDL source so that both |
||
| 162 | * ENTITY and COMPONENT port declarations assign a pin identifier that is |
||
| 163 | * the same as the pin name. Otherwise templating does not work, to create |
||
| 164 | * pin identifiers for a PCB |
||
| 165 | * |
||
| 166 | * Revision 1.17 2001/08/31 09:36:54 mjames |
||
| 167 | * removed DOS line endings |
||
| 168 | * |
||
| 169 | * Revision 1.16 2001/07/09 09:36:30 mjames |
||
| 170 | * Amending the syntax and end of file behaviour to allow Quartus pin fit files |
||
| 171 | * to be read . |
||
| 172 | * They are harder to read because they are not block structured. The end of file is used as a marker. Vertical has been persuaded to handle end of file events properly. |
||
| 173 | * |
||
| 174 | * Revision 1.15 2001/07/06 12:50:36 mjames |
||
| 175 | * Added the ability to read in Quartus pinfit files |
||
| 176 | * |
||
| 177 | * Revision 1.14 2001/07/05 15:12:37 MJAMES |
||
| 178 | * Amended to read Quartus pin files. not fully working |
||
| 179 | * |
||
| 180 | * Revision 1.13 2001/06/07 11:59:05 MJAMES |
||
| 181 | * Strange GCC optimiser error on line 1172. Changed code to trap possible error that |
||
| 182 | * should not happen anyway: probably a PII optimiser bug. |
||
| 183 | * |
||
| 184 | * Revision 1.12 2001/06/06 14:46:03 mjames |
||
| 185 | * Added further Verilog support. |
||
| 186 | * Corrected write ext command to not require additional argument. |
||
| 187 | * Added write quartus for creation of a pinfit file relevant to Quartus |
||
| 188 | * |
||
| 189 | * Revision 1.11 2001/06/06 12:10:26 mjames |
||
| 190 | * Move from HPUX |
||
| 191 | * |
||
| 192 | * Revision 1.10 2001/04/30 13:31:44 Administrator |
||
| 193 | * Started to add in Verilog parsing |
||
| 194 | * |
||
| 195 | * |
||
| 196 | * Revision 1.1 96/01/04 10:18:07 10:18:07 mjames (Mike James) |
||
| 197 | * Initial revision |
||
| 198 | * |
||
| 199 | * */ |
||
| 200 | #include "acf_lex_ext.h" |
||
| 201 | #include "cmdlog.h" |
||
| 202 | #include "cmdparse.h" |
||
| 203 | #include "database.h" |
||
| 204 | #include "equivalent.h" |
||
| 205 | #include "expression.h" |
||
| 206 | #include "generic.h" |
||
| 207 | #include "jumpering.h" |
||
| 208 | #include "lx_support.h" |
||
| 209 | #include "routing.h" |
||
| 210 | #include "unrouted.h" |
||
| 211 | #include "vertcl_main.h" |
||
| 212 | |||
| 213 | #include <ctype.h> |
||
| 214 | #include <stdio.h> |
||
| 215 | #include <stdlib.h> |
||
| 216 | #include <string.h> |
||
| 217 | |||
| 218 | #define YYERROR_VERBOSE |
||
| 219 | |||
| 220 | int lineno; |
||
| 221 | |||
| 222 | /* Structure to hold a set of identifiers for later processing */ |
||
| 223 | |||
| 224 | struct str *y_first = NULL, *y1_first = NULL; |
||
| 225 | struct str *y_last = NULL, *y1_last = NULL; |
||
| 226 | int id_count = 0; |
||
| 227 | |||
| 228 | #ident \ |
||
| 229 | "@(#)$Header: C:/cvsroot/Vert03/acf_src/acf_yacc.y,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $" |
||
| 230 | |||
| 231 | static socket_t *current_chip, *current_comp; |
||
| 232 | static node_t *current_node, *current_comp_node; |
||
| 233 | static net_t *current_net; |
||
| 234 | static net_t **current_list; |
||
| 235 | |||
| 236 | /* used in net joining in the YACC parser */ |
||
| 237 | static net_t **join_context; |
||
| 238 | static JoinMode_t join_mode; |
||
| 239 | static net_t *top_net; |
||
| 240 | |||
| 241 | static vhdl_t *vhdl; |
||
| 242 | static generic_info_t **generic_context; |
||
| 243 | |||
| 244 | static equivalent_node_set_t *curr_equiv_list; |
||
| 245 | |||
| 246 | static char curr_pin_name[MAXIDLEN]; |
||
| 247 | static char curr_pin_ident[MAXIDLEN]; |
||
| 248 | static int curr_pin_dir; |
||
| 249 | static int curr_pin_group; |
||
| 250 | |||
| 251 | static generic_info_t info[1]; /* this is a local scratch area */ |
||
| 252 | |||
| 253 | /* handed back to the command line expression parser */ |
||
| 254 | |||
| 255 | static char *rename_pin_string; |
||
| 256 | |||
| 257 | static char text_buff[MAXIDLEN]; |
||
| 258 | |||
| 259 | void process_tdf_pins (struct str *s); |
||
| 260 | |||
| 261 | int inside_block = 0; |
||
| 262 | |||
| 263 | extern void exit_lex_block (void); /* means to return LEX to initial state */ |
||
| 264 | |||
| 265 | extern void create_pins_or_signals (void); |
||
| 266 | /* is the current component instance running implicit or explicit |
||
| 267 | port mapping ? */ |
||
| 268 | typedef enum |
||
| 269 | { |
||
| 270 | UNKNOWN, |
||
| 271 | IMPLICIT, |
||
| 272 | EXPLICIT |
||
| 273 | } port_map_method; |
||
| 274 | port_map_method curr_comp_port_map; |
||
| 275 | |||
| 276 | #line 281 "acf_yacc.c" /* yacc.c:339 */ |
||
| 277 | |||
| 278 | #ifndef YY_NULLPTR |
||
| 279 | #if defined __cplusplus && 201103L <= __cplusplus |
||
| 280 | #define YY_NULLPTR nullptr |
||
| 281 | #else |
||
| 282 | #define YY_NULLPTR 0 |
||
| 283 | #endif |
||
| 284 | #endif |
||
| 285 | |||
| 286 | /* Enabling verbose error messages. */ |
||
| 287 | #ifdef YYERROR_VERBOSE |
||
| 288 | #undef YYERROR_VERBOSE |
||
| 289 | #define YYERROR_VERBOSE 1 |
||
| 290 | #else |
||
| 291 | #define YYERROR_VERBOSE 0 |
||
| 292 | #endif |
||
| 293 | |||
| 294 | /* Debug traces. */ |
||
| 295 | #ifndef YYDEBUG |
||
| 296 | #define YYDEBUG 0 |
||
| 297 | #endif |
||
| 298 | #if YYDEBUG |
||
| 299 | extern int yydebug; |
||
| 300 | #endif |
||
| 301 | |||
| 302 | /* Token type. */ |
||
| 303 | #ifndef YYTOKENTYPE |
||
| 304 | #define YYTOKENTYPE |
||
| 305 | enum yytokentype |
||
| 306 | { |
||
| 307 | FILEMODE = 258, |
||
| 308 | CMDMODE = 259, |
||
| 309 | CHIP = 260, |
||
| 310 | BEGIN_TOK = 261, |
||
| 311 | END = 262, |
||
| 312 | DEVICE = 263, |
||
| 313 | COMPONENTS = 264, |
||
| 314 | WIRED_NETS = 265, |
||
| 315 | CONN = 266, |
||
| 316 | END_CONN = 267, |
||
| 317 | JOINED_NETS = 268, |
||
| 318 | ALIAS = 269, |
||
| 319 | JUMPER = 270, |
||
| 320 | RENAME_PINS = 271, |
||
| 321 | TEMPLATE = 272, |
||
| 322 | FIX_LOCATION = 273, |
||
| 323 | LOCATION = 274, |
||
| 324 | UNROUTED = 275, |
||
| 325 | ROUTED = 276, |
||
| 326 | NAMED = 277, |
||
| 327 | ASSIGN = 278, |
||
| 328 | SIG_ASSIGN = 279, |
||
| 329 | CONNECTED = 280, |
||
| 330 | ROUTE_FLAGS = 281, |
||
| 331 | DECLARATION = 282, |
||
| 332 | INSTANCE = 283, |
||
| 333 | AHDL = 284, |
||
| 334 | VERILOG = 285, |
||
| 335 | SUBDESIGN = 286, |
||
| 336 | OPEN = 287, |
||
| 337 | BOOLEAN = 288, |
||
| 338 | TRUE = 289, |
||
| 339 | FALSE = 290, |
||
| 340 | TO = 291, |
||
| 341 | DOWNTO = 292, |
||
| 342 | GENERIC = 293, |
||
| 343 | RANGE = 294, |
||
| 344 | INTEGER = 295, |
||
| 345 | NATURAL = 296, |
||
| 346 | SIGNAL = 297, |
||
| 347 | CONSTANT = 298, |
||
| 348 | VHDL = 299, |
||
| 349 | PORT = 300, |
||
| 350 | ENTITY = 301, |
||
| 351 | IS = 302, |
||
| 352 | COMPONENT = 303, |
||
| 353 | MAP = 304, |
||
| 354 | ARCHITECTURE = 305, |
||
| 355 | OF = 306, |
||
| 356 | EQUIVALENT = 307, |
||
| 357 | TO_POW = 308, |
||
| 358 | MODULE = 309, |
||
| 359 | ENDMODULE = 310, |
||
| 360 | LIBRARY = 311, |
||
| 361 | USE = 312, |
||
| 362 | ALL = 313, |
||
| 363 | PACKAGE = 314, |
||
| 364 | FOR = 315, |
||
| 365 | PROCESS = 316, |
||
| 366 | ASSIGNED = 317, |
||
| 367 | AN = 318, |
||
| 368 | WIRE = 319, |
||
| 369 | GND = 320, |
||
| 370 | GND_RES_IO = 321, |
||
| 371 | GND_RES_IN = 322, |
||
| 372 | VCC = 323, |
||
| 373 | ATTRIBUTE = 324, |
||
| 374 | ENV_STRING = 325, |
||
| 375 | STRING = 326, |
||
| 376 | SHL = 327, |
||
| 377 | SHR = 328, |
||
| 378 | EQ_EQ = 329, |
||
| 379 | N_EQ = 330, |
||
| 380 | LOG_AND = 331, |
||
| 381 | LOG_OR = 332, |
||
| 382 | QUOTE = 333, |
||
| 383 | VHDL_CONN = 334, |
||
| 384 | QUOTED_STRING = 335, |
||
| 385 | TXT_STRING = 336, |
||
| 386 | NUM_STRING = 337, |
||
| 387 | PINDIR = 338, |
||
| 388 | UMINUS = 339 |
||
| 389 | }; |
||
| 390 | #endif |
||
| 391 | /* Tokens. */ |
||
| 392 | #define FILEMODE 258 |
||
| 393 | #define CMDMODE 259 |
||
| 394 | #define CHIP 260 |
||
| 395 | #define BEGIN_TOK 261 |
||
| 396 | #define END 262 |
||
| 397 | #define DEVICE 263 |
||
| 398 | #define COMPONENTS 264 |
||
| 399 | #define WIRED_NETS 265 |
||
| 400 | #define CONN 266 |
||
| 401 | #define END_CONN 267 |
||
| 402 | #define JOINED_NETS 268 |
||
| 403 | #define ALIAS 269 |
||
| 404 | #define JUMPER 270 |
||
| 405 | #define RENAME_PINS 271 |
||
| 406 | #define TEMPLATE 272 |
||
| 407 | #define FIX_LOCATION 273 |
||
| 408 | #define LOCATION 274 |
||
| 409 | #define UNROUTED 275 |
||
| 410 | #define ROUTED 276 |
||
| 411 | #define NAMED 277 |
||
| 412 | #define ASSIGN 278 |
||
| 413 | #define SIG_ASSIGN 279 |
||
| 414 | #define CONNECTED 280 |
||
| 415 | #define ROUTE_FLAGS 281 |
||
| 416 | #define DECLARATION 282 |
||
| 417 | #define INSTANCE 283 |
||
| 418 | #define AHDL 284 |
||
| 419 | #define VERILOG 285 |
||
| 420 | #define SUBDESIGN 286 |
||
| 421 | #define OPEN 287 |
||
| 422 | #define BOOLEAN 288 |
||
| 423 | #define TRUE 289 |
||
| 424 | #define FALSE 290 |
||
| 425 | #define TO 291 |
||
| 426 | #define DOWNTO 292 |
||
| 427 | #define GENERIC 293 |
||
| 428 | #define RANGE 294 |
||
| 429 | #define INTEGER 295 |
||
| 430 | #define NATURAL 296 |
||
| 431 | #define SIGNAL 297 |
||
| 432 | #define CONSTANT 298 |
||
| 433 | #define VHDL 299 |
||
| 434 | #define PORT 300 |
||
| 435 | #define ENTITY 301 |
||
| 436 | #define IS 302 |
||
| 437 | #define COMPONENT 303 |
||
| 438 | #define MAP 304 |
||
| 439 | #define ARCHITECTURE 305 |
||
| 440 | #define OF 306 |
||
| 441 | #define EQUIVALENT 307 |
||
| 442 | #define TO_POW 308 |
||
| 443 | #define MODULE 309 |
||
| 444 | #define ENDMODULE 310 |
||
| 445 | #define LIBRARY 311 |
||
| 446 | #define USE 312 |
||
| 447 | #define ALL 313 |
||
| 448 | #define PACKAGE 314 |
||
| 449 | #define FOR 315 |
||
| 450 | #define PROCESS 316 |
||
| 451 | #define ASSIGNED 317 |
||
| 452 | #define AN 318 |
||
| 453 | #define WIRE 319 |
||
| 454 | #define GND 320 |
||
| 455 | #define GND_RES_IO 321 |
||
| 456 | #define GND_RES_IN 322 |
||
| 457 | #define VCC 323 |
||
| 458 | #define ATTRIBUTE 324 |
||
| 459 | #define ENV_STRING 325 |
||
| 460 | #define STRING 326 |
||
| 461 | #define SHL 327 |
||
| 462 | #define SHR 328 |
||
| 463 | #define EQ_EQ 329 |
||
| 464 | #define N_EQ 330 |
||
| 465 | #define LOG_AND 331 |
||
| 466 | #define LOG_OR 332 |
||
| 467 | #define QUOTE 333 |
||
| 468 | #define VHDL_CONN 334 |
||
| 469 | #define QUOTED_STRING 335 |
||
| 470 | #define TXT_STRING 336 |
||
| 471 | #define NUM_STRING 337 |
||
| 472 | #define PINDIR 338 |
||
| 473 | #define UMINUS 339 |
||
| 474 | |||
| 475 | /* Value type. */ |
||
| 476 | #if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED |
||
| 477 | |||
| 478 | union YYSTYPE |
||
| 479 | { |
||
| 480 | #line 219 "acf_yacc.y" /* yacc.c:355 */ |
||
| 481 | char *string; |
||
| 482 | int integer; |
||
| 483 | generic_info_t *range; |
||
| 484 | expression_t *exp; |
||
| 485 | |||
| 486 | #line 492 "acf_yacc.c" /* yacc.c:355 */ |
||
| 487 | }; |
||
| 488 | |||
| 489 | typedef union YYSTYPE YYSTYPE; |
||
| 490 | #define YYSTYPE_IS_TRIVIAL 1 |
||
| 491 | #define YYSTYPE_IS_DECLARED 1 |
||
| 492 | #endif |
||
| 493 | |||
| 494 | extern YYSTYPE yylval; |
||
| 495 | |||
| 496 | int yyparse (void); |
||
| 497 | |||
| 498 | /* Copy the second part of user declarations. */ |
||
| 499 | |||
| 500 | #line 509 "acf_yacc.c" /* yacc.c:358 */ |
||
| 501 | |||
| 502 | #ifdef short |
||
| 503 | #undef short |
||
| 504 | #endif |
||
| 505 | |||
| 506 | #ifdef YYTYPE_UINT8 |
||
| 507 | typedef YYTYPE_UINT8 yytype_uint8; |
||
| 508 | #else |
||
| 509 | typedef unsigned char yytype_uint8; |
||
| 510 | #endif |
||
| 511 | |||
| 512 | #ifdef YYTYPE_INT8 |
||
| 513 | typedef YYTYPE_INT8 yytype_int8; |
||
| 514 | #else |
||
| 515 | typedef signed char yytype_int8; |
||
| 516 | #endif |
||
| 517 | |||
| 518 | #ifdef YYTYPE_UINT16 |
||
| 519 | typedef YYTYPE_UINT16 yytype_uint16; |
||
| 520 | #else |
||
| 521 | typedef unsigned short int yytype_uint16; |
||
| 522 | #endif |
||
| 523 | |||
| 524 | #ifdef YYTYPE_INT16 |
||
| 525 | typedef YYTYPE_INT16 yytype_int16; |
||
| 526 | #else |
||
| 527 | typedef short int yytype_int16; |
||
| 528 | #endif |
||
| 529 | |||
| 530 | #ifndef YYSIZE_T |
||
| 531 | #ifdef __SIZE_TYPE__ |
||
| 532 | #define YYSIZE_T __SIZE_TYPE__ |
||
| 533 | #elif defined size_t |
||
| 534 | #define YYSIZE_T size_t |
||
| 535 | #elif !defined YYSIZE_T |
||
| 536 | #include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
||
| 537 | #define YYSIZE_T size_t |
||
| 538 | #else |
||
| 539 | #define YYSIZE_T unsigned int |
||
| 540 | #endif |
||
| 541 | #endif |
||
| 542 | |||
| 543 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
||
| 544 | |||
| 545 | #ifndef YY_ |
||
| 546 | #if defined YYENABLE_NLS && YYENABLE_NLS |
||
| 547 | #if ENABLE_NLS |
||
| 548 | #include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
||
| 549 | #define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
||
| 550 | #endif |
||
| 551 | #endif |
||
| 552 | #ifndef YY_ |
||
| 553 | #define YY_(Msgid) Msgid |
||
| 554 | #endif |
||
| 555 | #endif |
||
| 556 | |||
| 557 | #ifndef YY_ATTRIBUTE |
||
| 558 | #if (defined __GNUC__ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) || \ |
||
| 559 | defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
||
| 560 | #define YY_ATTRIBUTE(Spec) __attribute__ (Spec) |
||
| 561 | #else |
||
| 562 | #define YY_ATTRIBUTE(Spec) /* empty */ |
||
| 563 | #endif |
||
| 564 | #endif |
||
| 565 | |||
| 566 | #ifndef YY_ATTRIBUTE_PURE |
||
| 567 | #define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
||
| 568 | #endif |
||
| 569 | |||
| 570 | #ifndef YY_ATTRIBUTE_UNUSED |
||
| 571 | #define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
||
| 572 | #endif |
||
| 573 | |||
| 574 | #if !defined _Noreturn && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) |
||
| 575 | #if defined _MSC_VER && 1200 <= _MSC_VER |
||
| 576 | #define _Noreturn __declspec(noreturn) |
||
| 577 | #else |
||
| 578 | #define _Noreturn YY_ATTRIBUTE((__noreturn__)) |
||
| 579 | #endif |
||
| 580 | #endif |
||
| 581 | |||
| 582 | /* Suppress unused-variable warnings by "using" E. */ |
||
| 583 | #if !defined lint || defined __GNUC__ |
||
| 584 | #define YYUSE(E) ((void) (E)) |
||
| 585 | #else |
||
| 586 | #define YYUSE(E) /* empty */ |
||
| 587 | #endif |
||
| 588 | |||
| 589 | #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
||
| 590 | /* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
||
| 591 | #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
||
| 592 | _Pragma ("GCC diagnostic push") _Pragma ("GCC diagnostic ignored " \ |
||
| 593 | "\"-Wuninitialized\"") \ |
||
| 594 | _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
||
| 595 | #define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma ("GCC diagnostic pop") |
||
| 596 | #else |
||
| 597 | #define YY_INITIAL_VALUE(Value) Value |
||
| 598 | #endif |
||
| 599 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
| 600 | #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
| 601 | #define YY_IGNORE_MAYBE_UNINITIALIZED_END |
||
| 602 | #endif |
||
| 603 | #ifndef YY_INITIAL_VALUE |
||
| 604 | #define YY_INITIAL_VALUE(Value) /* Nothing. */ |
||
| 605 | #endif |
||
| 606 | |||
| 607 | #if !defined yyoverflow || YYERROR_VERBOSE |
||
| 608 | |||
| 609 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
||
| 610 | |||
| 611 | #ifdef YYSTACK_USE_ALLOCA |
||
| 612 | #if YYSTACK_USE_ALLOCA |
||
| 613 | #ifdef __GNUC__ |
||
| 614 | #define YYSTACK_ALLOC __builtin_alloca |
||
| 615 | #elif defined __BUILTIN_VA_ARG_INCR |
||
| 616 | #include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
||
| 617 | #elif defined _AIX |
||
| 618 | #define YYSTACK_ALLOC __alloca |
||
| 619 | #elif defined _MSC_VER |
||
| 620 | #include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
||
| 621 | #define alloca _alloca |
||
| 622 | #else |
||
| 623 | #define YYSTACK_ALLOC alloca |
||
| 624 | #if !defined _ALLOCA_H && !defined EXIT_SUCCESS |
||
| 625 | #include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
||
| 626 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
||
| 627 | #ifndef EXIT_SUCCESS |
||
| 628 | #define EXIT_SUCCESS 0 |
||
| 629 | #endif |
||
| 630 | #endif |
||
| 631 | #endif |
||
| 632 | #endif |
||
| 633 | #endif |
||
| 634 | |||
| 635 | #ifdef YYSTACK_ALLOC |
||
| 636 | /* Pacify GCC's 'empty if-body' warning. */ |
||
| 637 | #define YYSTACK_FREE(Ptr) \ |
||
| 638 | do \ |
||
| 639 | { /* empty */ \ |
||
| 640 | ; \ |
||
| 641 | } while (0) |
||
| 642 | #ifndef YYSTACK_ALLOC_MAXIMUM |
||
| 643 | /* The OS might guarantee only one guard page at the bottom of the stack, |
||
| 644 | and a page size can be as small as 4096 bytes. So we cannot safely |
||
| 645 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
||
| 646 | to allow for a few compiler-allocated temporary stack slots. */ |
||
| 647 | #define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
||
| 648 | #endif |
||
| 649 | #else |
||
| 650 | #define YYSTACK_ALLOC YYMALLOC |
||
| 651 | #define YYSTACK_FREE YYFREE |
||
| 652 | #ifndef YYSTACK_ALLOC_MAXIMUM |
||
| 653 | #define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
||
| 654 | #endif |
||
| 655 | #if ( \ |
||
| 656 | defined __cplusplus && !defined EXIT_SUCCESS && \ |
||
| 657 | !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free))) |
||
| 658 | #include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
||
| 659 | #ifndef EXIT_SUCCESS |
||
| 660 | #define EXIT_SUCCESS 0 |
||
| 661 | #endif |
||
| 662 | #endif |
||
| 663 | #ifndef YYMALLOC |
||
| 664 | #define YYMALLOC malloc |
||
| 665 | #if !defined malloc && !defined EXIT_SUCCESS |
||
| 666 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
||
| 667 | #endif |
||
| 668 | #endif |
||
| 669 | #ifndef YYFREE |
||
| 670 | #define YYFREE free |
||
| 671 | #if !defined free && !defined EXIT_SUCCESS |
||
| 672 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
||
| 673 | #endif |
||
| 674 | #endif |
||
| 675 | #endif |
||
| 676 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
||
| 677 | |||
| 678 | #if ( \ |
||
| 679 | !defined yyoverflow && \ |
||
| 680 | (!defined __cplusplus || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
||
| 681 | |||
| 682 | /* A type that is properly aligned for any stack member. */ |
||
| 683 | union yyalloc |
||
| 684 | { |
||
| 685 | yytype_int16 yyss_alloc; |
||
| 686 | YYSTYPE yyvs_alloc; |
||
| 687 | }; |
||
| 688 | |||
| 689 | /* The size of the maximum gap between one aligned stack and the next. */ |
||
| 690 | #define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
||
| 691 | |||
| 692 | /* The size of an array large to enough to hold all stacks, each with |
||
| 693 | N elements. */ |
||
| 694 | #define YYSTACK_BYTES(N) \ |
||
| 695 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + YYSTACK_GAP_MAXIMUM) |
||
| 696 | |||
| 697 | #define YYCOPY_NEEDED 1 |
||
| 698 | |||
| 699 | /* Relocate STACK from its old location to the new one. The |
||
| 700 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
||
| 701 | elements in the stack, and YYPTR gives the new location of the |
||
| 702 | stack. Advance YYPTR to a properly aligned location for the next |
||
| 703 | stack. */ |
||
| 704 | #define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
||
| 705 | do \ |
||
| 706 | { \ |
||
| 707 | YYSIZE_T yynewbytes; \ |
||
| 708 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
||
| 709 | Stack = &yyptr->Stack_alloc; \ |
||
| 710 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
||
| 711 | yyptr += yynewbytes / sizeof (*yyptr); \ |
||
| 712 | } while (0) |
||
| 713 | |||
| 714 | #endif |
||
| 715 | |||
| 716 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
||
| 717 | /* Copy COUNT objects from SRC to DST. The source and destination do |
||
| 718 | not overlap. */ |
||
| 719 | #ifndef YYCOPY |
||
| 720 | #if defined __GNUC__ && 1 < __GNUC__ |
||
| 721 | #define YYCOPY(Dst, Src, Count) __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
||
| 722 | #else |
||
| 723 | #define YYCOPY(Dst, Src, Count) \ |
||
| 724 | do \ |
||
| 725 | { \ |
||
| 726 | YYSIZE_T yyi; \ |
||
| 727 | for (yyi = 0; yyi < (Count); yyi++) \ |
||
| 728 | (Dst)[yyi] = (Src)[yyi]; \ |
||
| 729 | } while (0) |
||
| 730 | #endif |
||
| 731 | #endif |
||
| 732 | #endif /* !YYCOPY_NEEDED */ |
||
| 733 | |||
| 734 | /* YYFINAL -- State number of the termination state. */ |
||
| 735 | #define YYFINAL 55 |
||
| 736 | /* YYLAST -- Last index in YYTABLE. */ |
||
| 737 | #define YYLAST 747 |
||
| 738 | |||
| 739 | /* YYNTOKENS -- Number of terminals. */ |
||
| 740 | #define YYNTOKENS 106 |
||
| 741 | /* YYNNTS -- Number of nonterminals. */ |
||
| 742 | #define YYNNTS 212 |
||
| 743 | /* YYNRULES -- Number of rules. */ |
||
| 744 | #define YYNRULES 395 |
||
| 745 | /* YYNSTATES -- Number of states. */ |
||
| 746 | #define YYNSTATES 700 |
||
| 747 | |||
| 748 | /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned |
||
| 749 | by yylex, with out-of-bounds checking. */ |
||
| 750 | #define YYUNDEFTOK 2 |
||
| 751 | #define YYMAXUTOK 339 |
||
| 752 | |||
| 753 | #define YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
||
| 754 | |||
| 755 | /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
||
| 756 | as returned by yylex, without out-of-bounds checking. */ |
||
| 757 | static const yytype_uint8 yytranslate[] = { |
||
| 758 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 759 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 96, 100, 2, |
||
| 760 | 86, 90, 94, 97, 104, 91, 105, 95, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 89, 88, |
||
| 761 | 99, 87, 98, 103, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 762 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 92, 2, 93, 101, 2, 2, 2, 2, 2, |
||
| 763 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 764 | 2, 2, 2, 2, 102, 2, 85, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 765 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 766 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 767 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 768 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 769 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
||
| 770 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
||
| 771 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
||
| 772 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
||
| 773 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
||
| 774 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84}; |
||
| 775 | |||
| 776 | #if YYDEBUG |
||
| 777 | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
||
| 778 | static const yytype_uint16 yyrline[] = { |
||
| 779 | 0, 282, 282, 283, 289, 290, 293, 302, 303, 306, 307, 308, 309, 310, 311, |
||
| 780 | 312, 313, 314, 315, 316, 322, 323, 324, 329, 331, 332, 338, 347, 372, 373, |
||
| 781 | 374, 377, 378, 379, 380, 382, 387, 388, 389, 398, 400, 404, 407, 415, 416, |
||
| 782 | 417, 420, 426, 437, 438, 439, 442, 445, 446, 448, 452, 455, 460, 471, 474, |
||
| 783 | 475, 477, 478, 479, 480, 481, 482, 483, 492, 505, 506, 514, 515, 522, 533, |
||
| 784 | 548, 559, 571, 582, 594, 606, 607, 613, 614, 618, 621, 625, 630, 634, 642, |
||
| 785 | 646, 650, 655, 659, 663, 666, 671, 675, 679, 683, 687, 694, 698, 702, 708, |
||
| 786 | 712, 716, 723, 727, 731, 738, 742, 746, 753, 757, 764, 768, 775, 779, 786, |
||
| 787 | 790, 796, 800, 807, 814, 819, 823, 834, 834, 840, 841, 842, 845, 855, 860, |
||
| 788 | 861, 865, 866, 867, 868, 869, 870, 876, 876, 887, 906, 907, 911, 911, 922, |
||
| 789 | 923, 926, 928, 929, 930, 937, 942, 943, 948, 964, 965, 973, 979, 980, 981, |
||
| 790 | 984, 985, 986, 987, 993, 997, 1000, 1001, 1002, 1005, 1006, 1007, 1008, 1014, 1022, |
||
| 791 | 1041, 1041, 1049, 1049, 1061, 1062, 1065, 1082, 1092, 1093, 1094, 1097, 1098, 1111, 1135, |
||
| 792 | 1165, 1165, 1175, 1178, 1179, 1183, 1184, 1187, 1200, 1201, 1206, 1243, 1272, 1308, 1335, |
||
| 793 | 1340, 1348, 1392, 1394, 1395, 1398, 1404, 1406, 1407, 1410, 1411, 1415, 1416, 1424, 1429, |
||
| 794 | 1430, 1434, 1435, 1436, 1452, 1456, 1458, 1462, 1462, 1465, 1467, 1468, 1469, 1472, 1474, |
||
| 795 | 1477, 1480, 1486, 1491, 1492, 1493, 1497, 1497, 1505, 1506, 1507, 1511, 1516, 1519, 1525, |
||
| 796 | 1527, 1528, 1529, 1532, 1566, 1566, 1569, 1570, 1573, 1616, 1650, 1650, 1656, 1656, 1663, |
||
| 797 | 1664, 1665, 1669, 1670, 1673, 1674, 1678, 1680, 1681, 1683, 1687, 1702, 1717, 1732, 1732, |
||
| 798 | 1748, 1748, 1762, 1762, 1776, 1776, 1793, 1810, 1811, 1814, 1815, 1822, 1823, 1827, 1828, |
||
| 799 | 1832, 1837, 1844, 1845, 1846, 1849, 1852, 1855, 1858, 1861, 1868, 1874, 1875, 1876, 1883, |
||
| 800 | 1884, 1884, 1889, 1894, 1897, 1898, 1901, 1935, 1936, 1939, 1940, 1943, 1963, 2008, 2015, |
||
| 801 | 2016, 2021, 2023, 2025, 2034, 2035, 2038, 2041, 2051, 2051, 2059, 2060, 2063, 2064, 2065, |
||
| 802 | 2066, 2067, 2071, 2074, 2077, 2082, 2083, 2089, 2087, 2092, 2098, 2102, 2105, 2106, 2107, |
||
| 803 | 2110, 2119, 2128, 2137, 2141, 2148, 2150, 2154, 2155, 2163, 2164, 2165, 2180, 2201, 2203, |
||
| 804 | 2209, 2210, 2213, 2214, 2215, 2219, 2250, 2255, 2256, 2259, 2260, 2261, 2264, 2281, 2283, |
||
| 805 | 2284, 2285, 2292, 2301, 2302, 2305}; |
||
| 806 | #endif |
||
| 807 | |||
| 808 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
||
| 809 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
||
| 810 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
||
| 811 | static const char *const yytname[] = {"$end", |
||
| 812 | "error", |
||
| 813 | "$undefined", |
||
| 814 | "FILEMODE", |
||
| 815 | "CMDMODE", |
||
| 816 | "CHIP", |
||
| 817 | "BEGIN_TOK", |
||
| 818 | "END", |
||
| 819 | "DEVICE", |
||
| 820 | "COMPONENTS", |
||
| 821 | "WIRED_NETS", |
||
| 822 | "CONN", |
||
| 823 | "END_CONN", |
||
| 824 | "JOINED_NETS", |
||
| 825 | "ALIAS", |
||
| 826 | "JUMPER", |
||
| 827 | "RENAME_PINS", |
||
| 828 | "TEMPLATE", |
||
| 829 | "FIX_LOCATION", |
||
| 830 | "LOCATION", |
||
| 831 | "UNROUTED", |
||
| 832 | "ROUTED", |
||
| 833 | "NAMED", |
||
| 834 | "ASSIGN", |
||
| 835 | "SIG_ASSIGN", |
||
| 836 | "CONNECTED", |
||
| 837 | "ROUTE_FLAGS", |
||
| 838 | "DECLARATION", |
||
| 839 | "INSTANCE", |
||
| 840 | "AHDL", |
||
| 841 | "VERILOG", |
||
| 842 | "SUBDESIGN", |
||
| 843 | "OPEN", |
||
| 844 | "BOOLEAN", |
||
| 845 | "TRUE", |
||
| 846 | "FALSE", |
||
| 847 | "TO", |
||
| 848 | "DOWNTO", |
||
| 849 | "GENERIC", |
||
| 850 | "RANGE", |
||
| 851 | "INTEGER", |
||
| 852 | "NATURAL", |
||
| 853 | "SIGNAL", |
||
| 854 | "CONSTANT", |
||
| 855 | "VHDL", |
||
| 856 | "PORT", |
||
| 857 | "ENTITY", |
||
| 858 | "IS", |
||
| 859 | "COMPONENT", |
||
| 860 | "MAP", |
||
| 861 | "ARCHITECTURE", |
||
| 862 | "OF", |
||
| 863 | "EQUIVALENT", |
||
| 864 | "TO_POW", |
||
| 865 | "MODULE", |
||
| 866 | "ENDMODULE", |
||
| 867 | "LIBRARY", |
||
| 868 | "USE", |
||
| 869 | "ALL", |
||
| 870 | "PACKAGE", |
||
| 871 | "FOR", |
||
| 872 | "PROCESS", |
||
| 873 | "ASSIGNED", |
||
| 874 | "AN", |
||
| 875 | "WIRE", |
||
| 876 | "GND", |
||
| 877 | "GND_RES_IO", |
||
| 878 | "GND_RES_IN", |
||
| 879 | "VCC", |
||
| 880 | "ATTRIBUTE", |
||
| 881 | "ENV_STRING", |
||
| 882 | "STRING", |
||
| 883 | "SHL", |
||
| 884 | "SHR", |
||
| 885 | "EQ_EQ", |
||
| 886 | "N_EQ", |
||
| 887 | "LOG_AND", |
||
| 888 | "LOG_OR", |
||
| 889 | "QUOTE", |
||
| 890 | "VHDL_CONN", |
||
| 891 | "QUOTED_STRING", |
||
| 892 | "TXT_STRING", |
||
| 893 | "NUM_STRING", |
||
| 894 | "PINDIR", |
||
| 895 | "UMINUS", |
||
| 896 | "'~'", |
||
| 897 | "'('", |
||
| 898 | "'='", |
||
| 899 | "';'", |
||
| 900 | "':'", |
||
| 901 | "')'", |
||
| 902 | "'-'", |
||
| 903 | "'['", |
||
| 904 | "']'", |
||
| 905 | "'*'", |
||
| 906 | "'/'", |
||
| 907 | "'%'", |
||
| 908 | "'+'", |
||
| 909 | "'>'", |
||
| 910 | "'<'", |
||
| 911 | "'&'", |
||
| 912 | "'^'", |
||
| 913 | "'|'", |
||
| 914 | "'?'", |
||
| 915 | "','", |
||
| 916 | "'.'", |
||
| 917 | "$accept", |
||
| 918 | "file", |
||
| 919 | "cmd_objects", |
||
| 920 | "cmd_object", |
||
| 921 | "objects", |
||
| 922 | "object", |
||
| 923 | "astring", |
||
| 924 | "chip_decl", |
||
| 925 | "chip_body", |
||
| 926 | "flex_chip_body", |
||
| 927 | "chip_id_decl", |
||
| 928 | "chip_info_lines", |
||
| 929 | "chip_info_line", |
||
| 930 | "device_declaration", |
||
| 931 | "pin_equivalences", |
||
| 932 | "end_item", |
||
| 933 | "routing_status", |
||
| 934 | "route_flags_info", |
||
| 935 | "route_flag_value", |
||
| 936 | "pin_declarations", |
||
| 937 | "pin_declaration", |
||
| 938 | "name_part", |
||
| 939 | "pin_rest", |
||
| 940 | "pin_dir", |
||
| 941 | "pin_group", |
||
| 942 | "pin_ident", |
||
| 943 | "apex_chip_body", |
||
| 944 | "apex_device_declaration", |
||
| 945 | "apex_speed_grade", |
||
| 946 | "apex_info_lines", |
||
| 947 | "apex_info_line", |
||
| 948 | "more_colons", |
||
| 949 | "vhdl_type_opt", |
||
| 950 | "vhdl_type", |
||
| 951 | "vhdl_type_default_value_opt", |
||
| 952 | "bus_range", |
||
| 953 | "expr1", |
||
| 954 | "simple_range_expr", |
||
| 955 | "primary_expr", |
||
| 956 | "mult_expr", |
||
| 957 | "add_expr", |
||
| 958 | "shift_expr", |
||
| 959 | "relational_expr", |
||
| 960 | "equality_expr", |
||
| 961 | "and_expr", |
||
| 962 | "exor_expr", |
||
| 963 | "or_expr", |
||
| 964 | "logand_expr", |
||
| 965 | "logor_expr", |
||
| 966 | "cond_expr", |
||
| 967 | "colon_expr", |
||
| 968 | "expr", |
||
| 969 | "pin_equivalence", |
||
| 970 | "$@1", |
||
| 971 | "equivalent_pins", |
||
| 972 | "equivalent_pin", |
||
| 973 | "vhdl_region", |
||
| 974 | "vhdl_blocks", |
||
| 975 | "vhdl_block", |
||
| 976 | "vhdl_chip_decl", |
||
| 977 | "$@2", |
||
| 978 | "hdl_entityname_decl", |
||
| 979 | "vhdl_generic_decl_opt", |
||
| 980 | "vhdl_generic_decl", |
||
| 981 | "$@3", |
||
| 982 | "vhdl_port_decl_opt", |
||
| 983 | "vhdl_port_decl", |
||
| 984 | "vhdl_port_list", |
||
| 985 | "vhdl_port_item", |
||
| 986 | "vhdl_name_list", |
||
| 987 | "hdl_name_part", |
||
| 988 | "vhdl_assign_opt", |
||
| 989 | "vhdl_architecture", |
||
| 990 | "vhdl_architecture_declarations", |
||
| 991 | "vhdl_architecture_decl", |
||
| 992 | "vhdl_package_decl", |
||
| 993 | "package_name", |
||
| 994 | "vhdl_package_declarations", |
||
| 995 | "vhdl_package_decl_item", |
||
| 996 | "vhdl_component_decl", |
||
| 997 | "hdl_compname_decl", |
||
| 998 | "vhdl_constant_decl", |
||
| 999 | "$@4", |
||
| 1000 | "vhdl_signal_decl", |
||
| 1001 | "$@5", |
||
| 1002 | "hdl_signal_names", |
||
| 1003 | "hdl_signal_name", |
||
| 1004 | "vhdl_configuration_decl", |
||
| 1005 | "vhdl_architecture_body_items", |
||
| 1006 | "vhdl_architecture_body_item", |
||
| 1007 | "vhdl_component_instance", |
||
| 1008 | "vhdl_inst_comp_binding", |
||
| 1009 | "vhdl_inst_generic_map", |
||
| 1010 | "$@6", |
||
| 1011 | "vhdl_inst_port_map", |
||
| 1012 | "vhdl_gen_map_list", |
||
| 1013 | "vhdl_gen_map", |
||
| 1014 | "vhdl_port_map_list", |
||
| 1015 | "vhdl_port_map", |
||
| 1016 | "vhdl_port_map_slice_opt", |
||
| 1017 | "vhdl_concurrent_assignment", |
||
| 1018 | "vhdl_library_decl", |
||
| 1019 | "vhdl_library_list", |
||
| 1020 | "vhdl_library_name", |
||
| 1021 | "vhdl_use_decl", |
||
| 1022 | "vhdl_lib_members", |
||
| 1023 | "vhdl_lib_member", |
||
| 1024 | "vhdl_lib_member_select", |
||
| 1025 | "verilog_region", |
||
| 1026 | "verilog_blocks", |
||
| 1027 | "verilog_block", |
||
| 1028 | "verilog_module_header", |
||
| 1029 | "verilog_toplevel_decl", |
||
| 1030 | "verilog_module_decl", |
||
| 1031 | "verilog_port_list", |
||
| 1032 | "$@7", |
||
| 1033 | "verilog_ports", |
||
| 1034 | "verilog_port", |
||
| 1035 | "verilog_bus_expr", |
||
| 1036 | "verilog_module_body", |
||
| 1037 | "verilog_pindir_block", |
||
| 1038 | "verilog_pindir_decl", |
||
| 1039 | "$@8", |
||
| 1040 | "verilog_wires_block", |
||
| 1041 | "verilog_wires_decl", |
||
| 1042 | "verilog_wire_start", |
||
| 1043 | "verilog_wire_end", |
||
| 1044 | "verilog_module_instance_block", |
||
| 1045 | "verilog_module_instances", |
||
| 1046 | "verilog_module_instance", |
||
| 1047 | "verilog_port_map_list", |
||
| 1048 | "verilog_port_maps", |
||
| 1049 | "verilog_port_map", |
||
| 1050 | "global_generic_decl", |
||
| 1051 | "$@9", |
||
| 1052 | "chip_generic_decl", |
||
| 1053 | "$@10", |
||
| 1054 | "generic_defn_lines", |
||
| 1055 | "generic_const_opt", |
||
| 1056 | "generic_pindir_opt", |
||
| 1057 | "generic_defn_text", |
||
| 1058 | "generic_defn_name_list", |
||
| 1059 | "generic_defn_name", |
||
| 1060 | "generic_defn_type", |
||
| 1061 | "$@11", |
||
| 1062 | "$@12", |
||
| 1063 | "$@13", |
||
| 1064 | "$@14", |
||
| 1065 | "opt_integer", |
||
| 1066 | "opt_bus_range", |
||
| 1067 | "assign_words", |
||
| 1068 | "several_words", |
||
| 1069 | "word", |
||
| 1070 | "components_decl", |
||
| 1071 | "comp_defn_lines", |
||
| 1072 | "comp_defn_line", |
||
| 1073 | "chip_ident", |
||
| 1074 | "chip_name", |
||
| 1075 | "chip_type", |
||
| 1076 | "chip_value", |
||
| 1077 | "joined_decl", |
||
| 1078 | "join_decls", |
||
| 1079 | "join_decl", |
||
| 1080 | "$@15", |
||
| 1081 | "alias_part", |
||
| 1082 | "root_net", |
||
| 1083 | "joined_nets", |
||
| 1084 | "joined_net", |
||
| 1085 | "single_net", |
||
| 1086 | "jumper_node", |
||
| 1087 | "rename_pins_block", |
||
| 1088 | "rename_pin_decls", |
||
| 1089 | "rename_pin_decl", |
||
| 1090 | "rename_new_name", |
||
| 1091 | "rename_pin_items", |
||
| 1092 | "rename_pin_item", |
||
| 1093 | "nets_decl", |
||
| 1094 | "$@16", |
||
| 1095 | "connection_block", |
||
| 1096 | "connection_block_item", |
||
| 1097 | "routed_decl", |
||
| 1098 | "unrouted_decl", |
||
| 1099 | "named_decl", |
||
| 1100 | "conn_decls", |
||
| 1101 | "conn_decl", |
||
| 1102 | "$@17", |
||
| 1103 | "conn_ident", |
||
| 1104 | "conn_name", |
||
| 1105 | "last_route_status", |
||
| 1106 | "nodelist", |
||
| 1107 | "net_node", |
||
| 1108 | "force_pin_dir", |
||
| 1109 | "skt_id", |
||
| 1110 | "node_id", |
||
| 1111 | "fix_loc_part", |
||
| 1112 | "node_group", |
||
| 1113 | "netname", |
||
| 1114 | "template_decl", |
||
| 1115 | "template_id_decl", |
||
| 1116 | "template_name", |
||
| 1117 | "template_info_lines", |
||
| 1118 | "template_info_line", |
||
| 1119 | "alias_to_another_template", |
||
| 1120 | "ahdl_region", |
||
| 1121 | "ahdl_chip_decls", |
||
| 1122 | "ahdl_chip_decl", |
||
| 1123 | "ahdl_entityname_decl", |
||
| 1124 | "ahdl_port_decl", |
||
| 1125 | "ahdl_port_list", |
||
| 1126 | "ahdl_port_item", |
||
| 1127 | "ahdl_name_list", |
||
| 1128 | "ahdl_name_part", |
||
| 1129 | YY_NULLPTR}; |
||
| 1130 | #endif |
||
| 1131 | |||
| 1132 | #ifdef YYPRINT |
||
| 1133 | /* YYTOKNUM[NUM] -- (External) token number corresponding to the |
||
| 1134 | (internal) symbol number NUM (which must be that of a token). */ |
||
| 1135 | static const yytype_uint16 yytoknum[] = { |
||
| 1136 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, |
||
| 1137 | 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, |
||
| 1138 | 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, |
||
| 1139 | 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, |
||
| 1140 | 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 126, 40, 61, 59, 58, |
||
| 1141 | 41, 45, 91, 93, 42, 47, 37, 43, 62, 60, 38, 94, 124, 63, 44, 46}; |
||
| 1142 | #endif |
||
| 1143 | |||
| 1144 | #define YYPACT_NINF -626 |
||
| 1145 | |||
| 1146 | #define yypact_value_is_default(Yystate) (!!((Yystate) == (-626))) |
||
| 1147 | |||
| 1148 | #define YYTABLE_NINF -272 |
||
| 1149 | |||
| 1150 | #define yytable_value_is_error(Yytable_value) 0 |
||
| 1151 | |||
| 1152 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
||
| 1153 | STATE-NUM. */ |
||
| 1154 | static const yytype_int16 yypact[] = { |
||
| 1155 | 66, 314, 106, 35, 259, 37, -626, 123, 166, 259, -1, 83, -626, 328, 314, |
||
| 1156 | -626, -626, 19, -626, -626, -626, -626, -626, -626, -626, -626, 190, -626, -626, -626, |
||
| 1157 | 259, -626, -626, -626, 108, 108, 108, 106, -626, -626, -626, -626, -626, 164, 158, |
||
| 1158 | 338, 315, 293, 50, 104, 124, 181, -46, -626, 379, -626, -626, -626, -626, -626, |
||
| 1159 | 259, 291, 36, 281, -626, -626, 194, 259, 311, -1, -626, -626, 241, 29, -626, |
||
| 1160 | 140, -626, -626, 11, 247, 259, 259, 259, 259, 172, -626, -626, -626, -626, -626, |
||
| 1161 | -626, -626, 137, 299, -626, 34, 267, -626, 261, -626, -626, 108, 108, 108, 108, |
||
| 1162 | 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, |
||
| 1163 | 108, -626, 16, -626, 284, 359, 259, -626, -626, 259, 13, -626, 281, -626, -626, |
||
| 1164 | -626, 6, -626, 310, 296, -626, -626, 219, -626, -52, -626, 324, -626, -626, 332, |
||
| 1165 | 324, -626, -626, -626, 365, 259, 362, 331, -626, 12, 259, -626, -626, 382, 383, |
||
| 1166 | -626, 345, 337, 340, 358, 344, -626, 402, 324, -626, 363, 324, 364, -626, -626, |
||
| 1167 | 100, -626, -626, -626, -626, -626, 389, -626, -26, 259, -626, 96, -626, -626, -626, |
||
| 1168 | -626, -626, -626, -626, -626, 164, 164, 158, 158, 338, 338, 315, 315, 293, 50, |
||
| 1169 | 124, 124, 181, -626, 366, -626, -626, 324, -626, 259, 281, -626, -626, -626, 269, |
||
| 1170 | -626, -626, -626, -626, 442, -626, 259, 430, -626, 324, -626, 369, -626, 324, -626, |
||
| 1171 | 371, 106, -626, -626, 259, 375, 259, -626, 281, 375, -626, -626, 259, -626, 259, |
||
| 1172 | -626, -626, 108, 259, 324, 416, -626, 109, -626, -626, 259, -626, 259, 214, -626, |
||
| 1173 | 259, 278, -626, 259, -626, 378, 11, -626, 67, -626, 372, -626, 259, 374, 376, |
||
| 1174 | 377, 381, 152, -26, -626, 324, 67, -626, 108, -626, -626, 259, 259, -626, 324, |
||
| 1175 | -626, -626, -626, 259, -626, 385, -626, 259, 387, -626, -626, -626, -626, -626, 110, |
||
| 1176 | -626, -626, -626, 375, -626, 393, -626, 188, -626, -55, -626, -626, -626, 390, 259, |
||
| 1177 | 437, 421, -626, -626, 384, -626, -626, -626, -626, 241, 214, 159, -626, -626, -626, |
||
| 1178 | -626, -626, 324, -626, 324, 15, -626, 474, -626, 431, 26, 395, 259, 259, 259, |
||
| 1179 | 259, 259, 108, -626, -626, 477, -626, -626, 259, -626, 259, -626, 324, 324, 281, |
||
| 1180 | 386, 252, -626, -626, 399, 281, 331, -626, 388, 108, -626, -626, 259, -626, -626, |
||
| 1181 | 246, -626, 409, 443, -626, 278, 214, 259, 416, 437, -626, 408, 259, -626, -626, |
||
| 1182 | -626, 324, 412, 324, -626, 413, -626, 324, 417, 422, -626, 410, 410, 410, 418, |
||
| 1183 | 419, 423, 324, -626, 324, -626, 324, -626, -626, 220, -626, 324, 324, 420, 259, |
||
| 1184 | 324, -626, -626, -626, 259, 259, 424, 405, -626, 425, -626, -626, -626, 487, 113, |
||
| 1185 | 487, -626, -626, -626, -626, 426, 508, -626, 111, -626, -626, -626, -626, -626, -626, |
||
| 1186 | 119, 324, 443, 259, 324, -626, 259, -626, 259, -626, 435, 432, -626, 410, -626, |
||
| 1187 | -626, -626, 216, -626, 182, -626, 433, -626, -626, 259, 324, -626, -626, -626, 259, |
||
| 1188 | 324, -626, 375, 51, 434, 436, 388, -626, 498, 498, 108, -626, 500, -626, -626, |
||
| 1189 | 498, 498, -22, 281, 444, 295, -626, 129, -626, 519, 471, -626, -626, 440, 324, |
||
| 1190 | -626, 441, 281, -626, -626, 445, 259, -626, 32, -626, 446, -626, 448, -626, 375, |
||
| 1191 | -626, 309, -626, -626, 259, -626, -626, -626, 106, -626, -626, -626, 260, 298, -626, |
||
| 1192 | 141, -626, 324, 452, 25, -626, -626, 495, -626, 512, 135, 144, 30, 324, 494, |
||
| 1193 | 497, 324, 259, -626, 455, -626, 259, 456, -626, -626, 281, -626, -626, 331, -626, |
||
| 1194 | -626, 259, -626, 324, 324, 281, 375, 281, -626, 465, 259, -626, 499, 502, 106, |
||
| 1195 | -626, 108, -626, 108, -626, 106, -626, -626, 324, 259, -626, -626, 129, -626, 460, |
||
| 1196 | 467, 324, 461, -626, 462, -626, -626, -626, -626, 129, -626, -626, 324, -626, 504, |
||
| 1197 | 324, -626, 512, 379, 512, 464, -626, 451, -626, -626, 468, -626, 540, -626, 536, |
||
| 1198 | -626, 475, 476, -626, -626, -626, 512, 259, 259, -626, 480, 108, -626, 259, 171, |
||
| 1199 | -626, 478, 481, -626, 483, -626, 541, 131, -626, -626, 4, 143, -626, 485, 259, |
||
| 1200 | -626, 491, 324, 106, -626, 259, 106, 542, -626, 171, -626, 484, 489, -626, -626, |
||
| 1201 | -626, 490, 202, -626, 493, -626, -626, -626, -626, -626}; |
||
| 1202 | |||
| 1203 | /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
||
| 1204 | Performed when YYTABLE does not specify something else to do. Zero |
||
| 1205 | means the default is an error. */ |
||
| 1206 | static const yytype_uint16 yydefact[] = { |
||
| 1207 | 0, 19, 0, 0, 0, 0, 338, 0, 0, 0, 386, 228, 265, 141, 2, 8, 9, 0, |
||
| 1208 | 16, 17, 15, 10, 12, 14, 13, 11, 0, 18, 94, 95, 0, 85, 93, 92, 0, 0, |
||
| 1209 | 0, 3, 5, 6, 82, 84, 96, 101, 104, 107, 110, 113, 115, 117, 119, 121, 126, 125, |
||
| 1210 | 83, 1, 20, 21, 22, 27, 304, 0, 313, 0, 374, 373, 0, 391, 0, 383, 384, 385, |
||
| 1211 | 0, 0, 225, 250, 227, 226, 273, 0, 0, 0, 0, 0, 0, 135, 136, 137, 138, 139, |
||
| 1212 | 140, 7, 30, 0, 23, 379, 0, 90, 0, 91, 4, 0, 0, 0, 0, 0, 0, 0, |
||
| 1213 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 0, 303, 0, 346, |
||
| 1214 | 0, 318, 319, 0, 320, 312, 0, 370, 369, 371, 0, 330, 0, 332, 387, 395, 0, 390, |
||
| 1215 | 0, 394, 0, 382, 179, 234, 0, 224, 231, 252, 0, 257, 249, 241, 272, 0, 0, 270, |
||
| 1216 | 144, 0, 0, 215, 0, 214, 0, 0, 218, 170, 0, 0, 134, 0, 0, 0, 267, 24, |
||
| 1217 | 45, 29, 31, 33, 32, 34, 0, 25, 0, 0, 377, 45, 376, 378, 86, 89, 100, 97, |
||
| 1218 | 98, 99, 103, 102, 105, 106, 108, 109, 111, 112, 114, 116, 118, 120, 122, 123, 0, 87, |
||
| 1219 | 88, 0, 302, 0, 0, 348, 347, 349, 0, 341, 342, 343, 344, 345, 351, 0, 0, 317, |
||
| 1220 | 0, 311, 0, 321, 0, 329, 0, 0, 39, 388, 0, 0, 0, 381, 237, 245, 223, 230, |
||
| 1221 | 0, 242, 254, 256, 248, 0, 0, 0, 273, 279, 0, 278, 142, 0, 212, 0, 0, 216, |
||
| 1222 | 0, 173, 133, 0, 40, 0, 273, 28, 38, 44, 0, 47, 0, 0, 0, 0, 0, 0, |
||
| 1223 | 55, 60, 0, 38, 375, 0, 301, 307, 0, 0, 354, 0, 340, 350, 315, 0, 310, 0, |
||
| 1224 | 328, 337, 0, 389, 51, 392, 393, 238, 0, 236, 158, 246, 229, 244, 0, 255, 0, 186, |
||
| 1225 | 0, 185, 266, 269, 275, 0, 146, 0, 213, 221, 222, 220, 217, 182, 180, 0, 0, 0, |
||
| 1226 | 172, 174, 175, 176, 177, 0, 42, 0, 0, 127, 0, 43, 37, 0, 58, 0, 0, 0, |
||
| 1227 | 0, 0, 0, 59, 380, 0, 124, 308, 0, 355, 0, 339, 0, 0, 0, 0, 0, 335, |
||
| 1228 | 333, 0, 0, 241, 243, 260, 0, 239, 253, 0, 251, 274, 0, 277, 0, 150, 145, 164, |
||
| 1229 | 0, 0, 273, 146, 222, 0, 0, 171, 35, 41, 0, 0, 0, 36, 0, 49, 0, 53, |
||
| 1230 | 0, 56, 0, 0, 0, 0, 0, 0, 0, 309, 0, 356, 0, 316, 211, 0, 323, 0, |
||
| 1231 | 0, 326, 0, 0, 334, 232, 235, 0, 0, 0, 259, 262, 0, 184, 283, 285, 293, 293, |
||
| 1232 | 293, 289, 287, 276, 147, 0, 0, 149, 0, 163, 165, 166, 167, 168, 219, 0, 0, 150, |
||
| 1233 | 0, 0, 268, 131, 26, 0, 46, 0, 0, 57, 70, 61, 62, 63, 70, 65, 70, 66, |
||
| 1234 | 0, 372, 305, 359, 0, 322, 324, 325, 0, 0, 331, 245, 0, 0, 0, 0, 240, 297, |
||
| 1235 | 297, 0, 281, 295, 280, 291, 297, 297, 273, 154, 0, 190, 162, 0, 181, 0, 0, 169, |
||
| 1236 | 132, 0, 130, 50, 0, 0, 69, 64, 0, 0, 363, 0, 358, 0, 314, 0, 336, 233, |
||
| 1237 | 247, 0, 258, 261, 0, 284, 286, 292, 0, 282, 290, 288, 0, 0, 153, 0, 157, 0, |
||
| 1238 | 21, 0, 189, 192, 197, 191, 81, 81, 81, 81, 0, 0, 0, 0, 131, 52, 72, 54, |
||
| 1239 | 0, 0, 352, 357, 0, 327, 264, 241, 300, 296, 299, 294, 0, 0, 0, 0, 0, 143, |
||
| 1240 | 0, 0, 188, 0, 199, 0, 79, 0, 75, 0, 77, 0, 73, 183, 0, 0, 128, 129, |
||
| 1241 | 0, 48, 0, 0, 0, 0, 364, 0, 298, 148, 151, 152, 0, 156, 194, 0, 195, 0, |
||
| 1242 | 0, 80, 81, 0, 81, 0, 178, 0, 71, 67, 0, 353, 366, 263, 160, 161, 0, 0, |
||
| 1243 | 193, 76, 78, 81, 0, 0, 365, 362, 0, 155, 0, 0, 74, 0, 0, 361, 368, 159, |
||
| 1244 | 0, 0, 201, 208, 371, 0, 204, 210, 0, 68, 0, 0, 0, 196, 0, 0, 0, 198, |
||
| 1245 | 0, 207, 0, 0, 360, 202, 200, 0, 0, 203, 0, 367, 209, 206, 205, 187}; |
||
| 1246 | |||
| 1247 | /* YYPGOTO[NTERM-NUM]. */ |
||
| 1248 | static const yytype_int16 yypgoto[] = { |
||
| 1249 | -626, -626, -626, 538, -626, 563, -4, -626, -626, -626, -626, -626, 403, -626, -233, |
||
| 1250 | 70, -626, -626, -626, 394, -145, -626, -626, -244, -626, -626, -626, -626, -626, -626, |
||
| 1251 | 300, -16, -626, -387, -550, -234, -626, -207, 304, 316, 317, 318, 320, 473, 470, |
||
| 1252 | -626, 322, 472, -626, -626, -626, -25, -626, -626, 18, -626, -626, -626, 503, -626, |
||
| 1253 | -626, -626, 193, -626, -626, 126, -626, -626, 5, -626, -501, -626, -626, -626, 138, |
||
| 1254 | -626, -626, -626, 256, -335, 262, -334, -626, -331, -626, -359, 211, -330, -626, 40, |
||
| 1255 | -626, -626, -626, -626, -626, -626, -80, -626, -82, -70, 482, -626, 339, -626, -626, |
||
| 1256 | 334, -626, -265, -626, -626, 534, -626, -626, -626, -626, -626, -626, 229, -377, -626, |
||
| 1257 | 115, -315, -626, 454, -626, -626, -626, -626, -626, 360, -626, -626, 112, -626, -626, |
||
| 1258 | -87, -626, -274, -626, -626, -254, -626, 286, -626, -626, -626, -626, -626, -10, -626, |
||
| 1259 | -198, 31, -626, -626, -626, 496, -626, -626, -626, -626, -626, -626, 486, -626, -626, |
||
| 1260 | -626, -626, 192, -626, -626, -626, -626, 488, -625, -626, 243, -626, -626, -626, 398, |
||
| 1261 | -626, -626, -626, -626, 396, -626, -626, -626, -626, -626, 93, -626, -626, -626, -626, |
||
| 1262 | -626, -118, -626, -626, -626, -626, 438, -626, -626, 559, -626, -626, -626, -626, 391, |
||
| 1263 | -626, 397}; |
||
| 1264 | |||
| 1265 | /* YYDEFGOTO[NTERM-NUM]. */ |
||
| 1266 | static const yytype_int16 yydefgoto[] = { |
||
| 1267 | -1, 3, 37, 38, 14, 15, 135, 16, 94, 179, 17, 180, 181, 182, 352, 260, 183, 184, |
||
| 1268 | 349, 278, 279, 280, 412, 317, 476, 574, 187, 188, 415, 288, 289, 528, 613, 568, 600, 39, |
||
| 1269 | 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 213, 54, 354, 407, |
||
| 1270 | 523, 524, 18, 84, 85, 86, 330, 163, 393, 394, 512, 456, 457, 553, 554, 555, 313, 657, |
||
| 1271 | 87, 458, 459, 88, 172, 341, 342, 343, 149, 344, 398, 345, 397, 324, 325, 346, 559, 560, |
||
| 1272 | 561, 562, 598, 646, 630, 667, 668, 671, 672, 682, 563, 89, 166, 167, 90, 169, 170, 335, |
||
| 1273 | 19, 73, 74, 75, 76, 77, 249, 497, 314, 315, 258, 154, 318, 319, 381, 155, 156, 157, |
||
| 1274 | 388, 253, 254, 255, 441, 442, 443, 20, 78, 185, 276, 159, 160, 390, 161, 262, 263, 453, |
||
| 1275 | 503, 504, 511, 510, 506, 549, 545, 585, 586, 21, 122, 123, 124, 296, 368, 424, 22, 130, |
||
| 1276 | 131, 372, 132, 236, 429, 430, 431, 432, 23, 136, 137, 138, 376, 377, 24, 61, 224, 225, |
||
| 1277 | 226, 227, 228, 229, 230, 616, 297, 370, 426, 533, 534, 664, 535, 617, 655, 677, 139, 25, |
||
| 1278 | 26, 65, 191, 192, 193, 27, 68, 69, 70, 71, 142, 143, 144, 145}; |
||
| 1279 | |||
| 1280 | /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
||
| 1281 | positive, shift that token. If negative, reduce the rule whose |
||
| 1282 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
||
| 1283 | static const yytype_int16 yytable[] = { |
||
| 1284 | 59, 311, 350, 382, 439, 64, 327, 308, 190, 97, 98, 99, 556, 238, 237, 602, 604, |
||
| 1285 | 606, -271, 259, 234, 158, 406, 217, 126, 92, 96, 127, 128, -210, 66, 117, 595, 386, |
||
| 1286 | 673, 55, 150, 245, 465, 283, 284, 285, 286, 60, 578, 410, 411, 126, 189, 387, 127, |
||
| 1287 | 128, 246, 599, 158, 287, 121, 118, 365, 673, 460, 461, 281, 141, 462, 463, -271, 698, |
||
| 1288 | -271, 1, 2, 133, 178, 281, 134, 401, 164, 165, 168, 171, 498, 93, 649, 72, 650, |
||
| 1289 | 67, 56, 57, 58, 556, 681, 625, 129, 214, 215, 216, 56, 57, 58, -271, 242, 660, |
||
| 1290 | 298, 242, 190, 56, 558, 58, 175, 310, 189, 413, 56, 57, 58, 129, 605, 515, 121, |
||
| 1291 | 351, 176, 409, 231, 460, 461, 232, 177, 462, 463, 62, 316, 464, 133, 353, 178, 134, |
||
| 1292 | 505, 72, 178, 540, 28, 29, 28, 29, 466, 175, 353, 56, 57, 58, 113, 252, 507, |
||
| 1293 | 337, 338, 387, 261, 176, 599, 339, 281, 133, 564, 177, 134, 133, 402, 599, 134, 565, |
||
| 1294 | 566, 340, 63, 281, 601, 178, 56, 57, 58, 173, 56, 57, 58, 603, 30, 290, 31, |
||
| 1295 | 32, 33, 32, 33, 34, 35, 34, 35, 152, 95, 36, 328, 36, 379, 337, 338, 669, |
||
| 1296 | 153, 114, 619, 339, 517, 56, 57, 58, 244, 329, 380, 295, 247, 101, 79, 340, 250, |
||
| 1297 | 679, 80, 387, 382, 638, 115, 302, 81, 82, 591, 83, 322, 683, 697, 680, 133, 644, |
||
| 1298 | 552, 134, 141, 361, 141, 272, 362, 592, 274, 684, 320, 105, 252, 56, 57, 58, 323, |
||
| 1299 | 106, 433, 116, 102, 103, 104, 331, 316, 165, 334, 530, 168, 133, 366, 347, 134, 478, |
||
| 1300 | 333, 446, 447, 140, 299, 384, 356, 448, 220, 385, 56, 57, 58, 133, 449, 294, 134, |
||
| 1301 | 221, 222, 223, 367, 369, 56, 57, 58, 125, 529, 373, 56, 57, 58, 375, 304, 478, |
||
| 1302 | 546, 242, 306, 243, 490, 433, 550, 551, 587, 450, 451, 452, 146, 4, 337, 338, 148, |
||
| 1303 | 5, 6, 261, 339, 7, 162, 326, 8, 9, 56, 57, 58, 186, 400, 421, 340, 56, |
||
| 1304 | 57, 58, 435, 10, 11, 194, 133, 624, 242, 134, 588, 195, 12, 416, 417, 418, 419, |
||
| 1305 | 420, 13, 444, 364, 56, 57, 58, 423, 631, 425, 111, 112, 371, 220, 635, 375, 219, |
||
| 1306 | 79, 56, 558, 58, 80, 221, 222, 223, 241, 323, 81, 82, 242, 83, 589, 56, 57, |
||
| 1307 | 58, 400, 323, 632, 316, 634, 240, 469, 582, 479, 480, 481, 483, 485, 196, 197, 198, |
||
| 1308 | 199, 575, 107, 108, 242, 109, 110, 119, 120, 404, 248, 405, 251, 200, 201, 257, 202, |
||
| 1309 | 203, 153, 204, 205, 264, 495, 206, 207, 266, 265, 323, 499, 210, 211, 508, 509, 267, |
||
| 1310 | 427, 428, 689, 268, 269, 691, 270, 271, 273, 275, 282, 220, 303, 293, 305, 307, 310, |
||
| 1311 | 158, 348, 355, 618, 357, 520, 358, 359, 522, 395, 525, 360, 374, 316, 389, 316, 392, |
||
| 1312 | 470, 378, 472, 383, 547, 408, 474, 351, 422, 532, 414, 437, 455, 396, 537, 434, 487, |
||
| 1313 | 440, 488, 454, 489, 468, 471, 478, 473, 492, 493, 475, 477, 496, 494, 482, 484, 501, |
||
| 1314 | 505, 232, 513, 567, 500, 514, 486, 526, 502, 527, 541, 544, 531, 548, 542, 557, 569, |
||
| 1315 | 577, 570, 532, 571, 573, 580, 597, 576, 599, 518, 583, 581, 521, 584, 594, 608, 609, |
||
| 1316 | 612, 615, 626, 629, 628, 639, 640, 642, 643, 647, 651, 232, 652, 653, 654, 656, 536, |
||
| 1317 | 658, 659, 663, 674, 538, 678, 692, 522, 676, 675, 681, 614, 687, 694, 100, 633, 91, |
||
| 1318 | 633, 695, 696, 699, 584, 277, 209, 291, 208, 174, 363, 212, 611, 627, 467, 519, 572, |
||
| 1319 | 623, 516, 403, 445, 596, 690, 399, 693, 685, 336, 637, 332, 151, 567, 438, 256, 233, |
||
| 1320 | 539, 543, 321, 391, 235, 620, 218, 436, 567, 491, 300, 590, 239, 301, 579, 593, 147, |
||
| 1321 | 292, 0, 665, 0, 0, 0, 309, 0, 0, 607, 0, 0, 610, 0, 312, 0, 0, |
||
| 1322 | 0, 0, 661, 662, 0, 0, 0, 0, 666, 670, 0, 0, 621, 622, 0, 0, 0, |
||
| 1323 | 0, 0, 0, 0, 0, 0, 0, 686, 0, 0, 0, 0, 0, 666, 0, 636, 0, |
||
| 1324 | 670, 0, 0, 0, 0, 0, 641, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
||
| 1325 | 645, 0, 0, 648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
||
| 1326 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
||
| 1327 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 688}; |
||
| 1328 | |||
| 1329 | static const yytype_int16 yycheck[] = { |
||
| 1330 | 4, 245, 276, 318, 381, 9, 260, 241, 95, 34, 35, 36, 513, 7, 132, 565, 566, 567, |
||
| 1331 | 7, 7, 7, 43, 7, 7, 11, 6, 30, 14, 15, 25, 31, 77, 7, 88, 659, 0, |
||
| 1332 | 7, 89, 397, 65, 66, 67, 68, 6, 12, 19, 20, 11, 14, 104, 14, 15, 104, 23, |
||
| 1333 | 43, 81, 60, 103, 291, 684, 395, 395, 180, 67, 395, 395, 88, 692, 90, 3, 4, 65, |
||
| 1334 | 38, 191, 68, 340, 80, 81, 82, 83, 439, 62, 632, 54, 634, 86, 80, 81, 82, 590, |
||
| 1335 | 86, 592, 79, 118, 119, 120, 80, 81, 82, 88, 88, 651, 220, 88, 191, 80, 81, 82, |
||
| 1336 | 8, 83, 14, 355, 80, 81, 82, 79, 86, 6, 122, 52, 20, 354, 126, 458, 458, 129, |
||
| 1337 | 26, 458, 458, 6, 248, 396, 65, 278, 38, 68, 23, 54, 38, 88, 34, 35, 34, 35, |
||
| 1338 | 398, 8, 291, 80, 81, 82, 100, 155, 39, 42, 43, 104, 160, 20, 23, 48, 278, 65, |
||
| 1339 | 33, 26, 68, 65, 7, 23, 68, 40, 41, 60, 6, 291, 39, 38, 80, 81, 82, 7, |
||
| 1340 | 80, 81, 82, 39, 78, 189, 80, 81, 82, 81, 82, 85, 86, 85, 86, 55, 6, 91, |
||
| 1341 | 89, 91, 90, 42, 43, 32, 64, 101, 583, 48, 89, 80, 81, 82, 142, 104, 104, 219, |
||
| 1342 | 146, 53, 46, 60, 150, 90, 50, 104, 539, 612, 102, 231, 56, 57, 89, 59, 257, 90, |
||
| 1343 | 32, 104, 65, 624, 512, 68, 244, 89, 246, 173, 92, 104, 176, 104, 252, 91, 254, 80, |
||
| 1344 | 81, 82, 258, 97, 374, 76, 94, 95, 96, 265, 380, 267, 268, 83, 270, 65, 293, 273, |
||
| 1345 | 68, 89, 58, 27, 28, 81, 7, 89, 282, 33, 11, 93, 80, 81, 82, 65, 40, 217, |
||
| 1346 | 68, 20, 21, 22, 296, 297, 80, 81, 82, 6, 82, 303, 80, 81, 82, 307, 234, 89, |
||
| 1347 | 504, 88, 238, 90, 90, 429, 510, 511, 548, 69, 70, 71, 7, 5, 42, 43, 81, 9, |
||
| 1348 | 10, 329, 48, 13, 81, 259, 16, 17, 80, 81, 82, 36, 340, 362, 60, 80, 81, 82, |
||
| 1349 | 90, 29, 30, 78, 65, 591, 88, 68, 90, 90, 38, 357, 358, 359, 360, 361, 44, 384, |
||
| 1350 | 290, 80, 81, 82, 368, 599, 370, 74, 75, 299, 11, 605, 376, 89, 46, 80, 81, 82, |
||
| 1351 | 50, 20, 21, 22, 86, 387, 56, 57, 88, 59, 90, 80, 81, 82, 396, 397, 601, 513, |
||
| 1352 | 603, 87, 402, 90, 416, 417, 418, 419, 420, 101, 102, 103, 104, 527, 72, 73, 88, 98, |
||
| 1353 | 99, 36, 37, 347, 86, 349, 55, 105, 106, 92, 107, 108, 64, 109, 110, 47, 434, 111, |
||
| 1354 | 112, 88, 51, 439, 440, 115, 116, 449, 450, 104, 372, 373, 678, 105, 88, 681, 104, 47, |
||
| 1355 | 87, 87, 63, 11, 24, 89, 87, 86, 83, 43, 82, 89, 580, 89, 468, 89, 89, 471, |
||
| 1356 | 47, 473, 89, 86, 590, 83, 592, 38, 406, 90, 408, 86, 505, 7, 412, 52, 7, 489, |
||
| 1357 | 91, 88, 45, 105, 494, 105, 422, 105, 424, 86, 426, 89, 86, 89, 87, 431, 432, 86, |
||
| 1358 | 82, 435, 86, 89, 89, 104, 23, 515, 86, 517, 90, 7, 93, 82, 93, 87, 86, 23, |
||
| 1359 | 89, 23, 88, 81, 7, 531, 57, 533, 90, 90, 86, 38, 89, 23, 466, 541, 90, 469, |
||
| 1360 | 544, 89, 48, 46, 89, 89, 81, 45, 49, 89, 83, 90, 90, 49, 90, 559, 105, 89, |
||
| 1361 | 18, 23, 490, 86, 86, 83, 86, 495, 25, 25, 572, 86, 89, 86, 576, 82, 90, 37, |
||
| 1362 | 601, 14, 603, 90, 90, 88, 586, 180, 114, 191, 113, 84, 288, 117, 572, 595, 399, 467, |
||
| 1363 | 524, 590, 458, 341, 387, 559, 680, 339, 684, 673, 270, 609, 267, 73, 612, 380, 156, 129, |
||
| 1364 | 497, 501, 254, 329, 130, 586, 122, 376, 624, 429, 224, 553, 136, 229, 533, 557, 69, 191, |
||
| 1365 | -1, 656, -1, -1, -1, 244, -1, -1, 568, -1, -1, 571, -1, 246, -1, -1, -1, -1, |
||
| 1366 | 652, 653, -1, -1, -1, -1, 658, 659, -1, -1, 588, 589, -1, -1, -1, -1, -1, -1, |
||
| 1367 | -1, -1, -1, -1, 674, -1, -1, -1, -1, -1, 680, -1, 608, -1, 684, -1, -1, -1, |
||
| 1368 | -1, -1, 616, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 627, -1, -1, 630, -1, |
||
| 1369 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
||
| 1370 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
||
| 1371 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 677}; |
||
| 1372 | |||
| 1373 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
||
| 1374 | symbol of state STATE-NUM. */ |
||
| 1375 | static const yytype_uint16 yystos[] = { |
||
| 1376 | 0, 3, 4, 107, 5, 9, 10, 13, 16, 17, 29, 30, 38, 44, 110, 111, 113, 116, |
||
| 1377 | 162, 214, 239, 259, 266, 276, 282, 303, 304, 309, 34, 35, 78, 80, 81, 82, 85, 86, |
||
| 1378 | 91, 108, 109, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, |
||
| 1379 | 157, 0, 80, 81, 82, 112, 6, 283, 6, 6, 112, 305, 31, 86, 310, 311, 312, 313, |
||
| 1380 | 54, 215, 216, 217, 218, 219, 240, 46, 50, 56, 57, 59, 163, 164, 165, 178, 181, 207, |
||
| 1381 | 210, 111, 6, 62, 114, 6, 112, 157, 157, 157, 109, 53, 94, 95, 96, 91, 97, 72, |
||
| 1382 | 73, 98, 99, 74, 75, 100, 101, 102, 76, 77, 103, 36, 37, 112, 260, 261, 262, 6, |
||
| 1383 | 11, 14, 15, 79, 267, 268, 270, 65, 68, 112, 277, 278, 279, 302, 81, 112, 314, 315, |
||
| 1384 | 316, 317, 7, 310, 81, 186, 7, 216, 55, 64, 225, 229, 230, 231, 43, 243, 244, 246, |
||
| 1385 | 81, 167, 112, 112, 208, 209, 112, 211, 212, 112, 182, 7, 164, 8, 20, 26, 38, 115, |
||
| 1386 | 117, 118, 119, 122, 123, 241, 36, 132, 133, 14, 241, 306, 307, 308, 78, 90, 144, 144, |
||
| 1387 | 144, 144, 145, 145, 146, 146, 147, 147, 148, 148, 149, 150, 152, 152, 153, 156, 157, 157, |
||
| 1388 | 157, 7, 261, 89, 11, 20, 21, 22, 284, 285, 286, 287, 288, 289, 290, 112, 112, 206, |
||
| 1389 | 7, 268, 271, 302, 7, 278, 87, 86, 88, 90, 121, 89, 104, 121, 86, 220, 121, 55, |
||
| 1390 | 112, 233, 234, 235, 229, 92, 224, 7, 121, 112, 247, 248, 47, 51, 88, 104, 105, 88, |
||
| 1391 | 104, 47, 121, 87, 121, 87, 242, 118, 125, 126, 127, 302, 63, 65, 66, 67, 68, 81, |
||
| 1392 | 135, 136, 112, 125, 307, 89, 121, 112, 263, 292, 302, 7, 285, 290, 112, 24, 121, 87, |
||
| 1393 | 121, 86, 141, 315, 83, 129, 317, 176, 222, 223, 302, 129, 226, 227, 112, 235, 157, 112, |
||
| 1394 | 191, 192, 121, 246, 89, 104, 166, 112, 208, 58, 112, 213, 211, 42, 43, 48, 60, 183, |
||
| 1395 | 184, 185, 187, 189, 193, 112, 82, 124, 243, 52, 120, 126, 158, 89, 112, 89, 89, 89, |
||
| 1396 | 89, 89, 92, 136, 121, 120, 157, 112, 264, 112, 293, 121, 269, 112, 86, 112, 280, 281, |
||
| 1397 | 90, 90, 104, 228, 227, 86, 89, 93, 88, 104, 232, 83, 245, 248, 38, 168, 169, 47, |
||
| 1398 | 105, 190, 188, 186, 112, 213, 7, 184, 121, 121, 7, 159, 7, 120, 19, 20, 128, 129, |
||
| 1399 | 91, 134, 112, 112, 112, 112, 112, 157, 7, 112, 265, 112, 294, 121, 121, 272, 273, 274, |
||
| 1400 | 275, 302, 105, 90, 281, 88, 223, 224, 105, 236, 237, 238, 157, 192, 27, 28, 33, 40, |
||
| 1401 | 69, 70, 71, 249, 86, 45, 171, 172, 179, 180, 185, 187, 189, 193, 213, 191, 246, 168, |
||
| 1402 | 89, 112, 121, 86, 121, 87, 121, 86, 130, 82, 89, 137, 137, 137, 89, 137, 89, 137, |
||
| 1403 | 93, 121, 121, 121, 90, 273, 121, 121, 86, 112, 121, 221, 191, 112, 90, 104, 93, 250, |
||
| 1404 | 251, 23, 254, 39, 254, 254, 253, 252, 170, 86, 7, 6, 180, 89, 121, 171, 112, 121, |
||
| 1405 | 112, 160, 161, 112, 82, 87, 137, 82, 83, 89, 112, 295, 296, 298, 121, 112, 121, 226, |
||
| 1406 | 88, 86, 88, 238, 23, 256, 256, 157, 23, 255, 256, 256, 243, 173, 174, 175, 176, 81, |
||
| 1407 | 81, 194, 195, 196, 197, 206, 33, 40, 41, 112, 139, 7, 57, 90, 121, 90, 131, 302, |
||
| 1408 | 89, 112, 12, 296, 86, 90, 90, 112, 112, 257, 258, 141, 90, 90, 121, 89, 104, 121, |
||
| 1409 | 89, 7, 195, 38, 198, 23, 140, 39, 140, 39, 140, 86, 140, 121, 48, 46, 121, 160, |
||
| 1410 | 89, 138, 112, 89, 291, 299, 302, 224, 257, 121, 121, 174, 129, 176, 81, 112, 49, 45, |
||
| 1411 | 200, 141, 143, 157, 143, 141, 121, 112, 139, 89, 83, 121, 90, 90, 139, 121, 199, 49, |
||
| 1412 | 121, 140, 140, 90, 105, 89, 18, 300, 23, 177, 86, 86, 140, 112, 112, 83, 297, 157, |
||
| 1413 | 112, 201, 202, 32, 112, 203, 204, 279, 86, 89, 86, 301, 25, 90, 104, 86, 205, 90, |
||
| 1414 | 104, 205, 112, 82, 121, 141, 202, 141, 25, 204, 90, 90, 90, 32, 279, 88}; |
||
| 1415 | |||
| 1416 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
||
| 1417 | static const yytype_uint16 yyr1[] = { |
||
| 1418 | 0, 106, 107, 107, 108, 108, 109, 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, |
||
| 1419 | 111, 111, 112, 112, 112, 113, 114, 114, 115, 116, 117, 117, 117, 118, 118, 118, 118, 119, |
||
| 1420 | 120, 120, 120, 121, 122, 123, 124, 125, 125, 125, 126, 127, 128, 128, 128, 129, 130, 130, |
||
| 1421 | 131, 132, 133, 134, 134, 135, 135, 136, 136, 136, 136, 136, 136, 136, 136, 137, 137, 138, |
||
| 1422 | 138, 139, 139, 139, 139, 139, 139, 139, 140, 140, 141, 141, 142, 142, 142, 143, 143, 144, |
||
| 1423 | 144, 144, 144, 144, 144, 144, 145, 145, 145, 145, 145, 146, 146, 146, 147, 147, 147, 148, |
||
| 1424 | 148, 148, 149, 149, 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, 154, 155, 156, 157, |
||
| 1425 | 157, 159, 158, 160, 160, 160, 161, 162, 163, 163, 164, 164, 164, 164, 164, 164, 166, 165, |
||
| 1426 | 167, 168, 168, 170, 169, 171, 171, 172, 173, 173, 173, 174, 175, 175, 176, 177, 177, 178, |
||
| 1427 | 179, 179, 179, 180, 180, 180, 180, 181, 182, 183, 183, 183, 184, 184, 184, 184, 185, 186, |
||
| 1428 | 188, 187, 190, 189, 191, 191, 192, 193, 194, 194, 194, 195, 195, 196, 197, 199, 198, 198, |
||
| 1429 | 200, 200, 201, 201, 202, 203, 203, 204, 204, 204, 204, 205, 205, 206, 207, 208, 208, 209, |
||
| 1430 | 210, 211, 211, 212, 212, 213, 213, 214, 215, 215, 216, 216, 216, 217, 218, 219, 221, 220, |
||
| 1431 | 220, 222, 222, 222, 223, 224, 224, 224, 225, 226, 226, 226, 228, 227, 229, 229, 229, 230, |
||
| 1432 | 231, 232, 233, 234, 234, 234, 235, 236, 236, 237, 237, 238, 238, 240, 239, 242, 241, 243, |
||
| 1433 | 243, 243, 244, 244, 245, 245, 246, 247, 247, 248, 249, 249, 249, 250, 249, 251, 249, 252, |
||
| 1434 | 249, 253, 249, 249, 254, 254, 255, 255, 256, 256, 257, 257, 258, 259, 260, 260, 260, 261, |
||
| 1435 | 262, 263, 264, 265, 266, 267, 267, 267, 268, 269, 268, 268, 270, 270, 270, 271, 272, 272, |
||
| 1436 | 273, 273, 274, 275, 276, 277, 277, 278, 279, 279, 280, 280, 281, 281, 283, 282, 284, 284, |
||
| 1437 | 285, 285, 285, 285, 285, 286, 287, 288, 289, 289, 291, 290, 292, 293, 294, 295, 295, 295, |
||
| 1438 | 296, 297, 297, 298, 299, 300, 300, 301, 301, 302, 302, 302, 303, 304, 305, 306, 306, 307, |
||
| 1439 | 307, 307, 308, 309, 310, 310, 311, 311, 311, 312, 313, 314, 314, 314, 315, 316, 316, 317}; |
||
| 1440 | |||
| 1441 | /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
||
| 1442 | static const yytype_uint8 yyr2[] = { |
||
| 1443 | 0, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 5, 2, 2, |
||
| 1444 | 1, 0, 1, 1, 1, 1, 4, 2, 1, 0, 1, 2, 4, 1, 2, 1, 0, 4, 1, 5, 1, 3, 1, 3, 0, 1, 2, 4, 2, |
||
| 1445 | 0, 2, 1, 4, 4, 4, 5, 4, 4, 8, 11, 2, 1, 2, 0, 2, 5, 2, 4, 2, 4, 2, 2, 0, 1, 1, 1, 1, 3, |
||
| 1446 | 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 1, |
||
| 1447 | 3, 1, 3, 1, 3, 1, 3, 3, 3, 1, 1, 0, 6, 3, 1, 0, 1, 4, 2, 1, 1, 1, 1, 1, 1, 0, 0, 9, 1, |
||
| 1448 | 1, 0, 0, 6, 1, 0, 5, 3, 1, 0, 5, 3, 1, 1, 2, 0, 11, 2, 1, 0, 1, 1, 1, 1, 7, 1, 2, 1, 0, |
||
| 1449 | 1, 1, 1, 1, 7, 1, 0, 4, 0, 6, 3, 1, 1, 13, 2, 1, 0, 1, 1, 4, 3, 0, 6, 0, 5, 0, 3, 1, 3, |
||
| 1450 | 3, 1, 4, 4, 2, 1, 3, 0, 4, 3, 3, 1, 1, 3, 3, 1, 5, 3, 1, 1, 4, 2, 1, 1, 1, 0, 4, 3, 2, |
||
| 1451 | 0, 6, 0, 3, 1, 0, 1, 3, 5, 0, 2, 2, 1, 0, 0, 5, 2, 1, 0, 4, 1, 1, 1, 2, 1, 0, 6, 1, 0, |
||
| 1452 | 3, 1, 6, 4, 0, 5, 0, 5, 3, 1, 0, 1, 0, 1, 0, 5, 3, 1, 1, 2, 2, 3, 0, 3, 0, 3, 0, 3, 0, |
||
| 1453 | 3, 2, 2, 0, 2, 0, 2, 0, 2, 1, 1, 5, 2, 1, 0, 6, 1, 1, 1, 1, 5, 2, 1, 0, 7, 0, 5, 2, 1, |
||
| 1454 | 1, 0, 1, 2, 1, 2, 2, 1, 4, 5, 2, 1, 6, 1, 4, 2, 1, 4, 0, 0, 6, 2, 1, 1, 1, 1, 1, 0, 1, |
||
| 1455 | 1, 1, 2, 1, 0, 9, 1, 1, 1, 2, 1, 0, 8, 1, 0, 1, 1, 1, 0, 3, 0, 1, 1, 1, 7, 2, 1, 2, 1, |
||
| 1456 | 1, 1, 0, 3, 4, 2, 1, 1, 1, 0, 2, 3, 3, 1, 0, 3, 3, 1, 1}; |
||
| 1457 | |||
| 1458 | #define yyerrok (yyerrstatus = 0) |
||
| 1459 | #define yyclearin (yychar = YYEMPTY) |
||
| 1460 | #define YYEMPTY (-2) |
||
| 1461 | #define YYEOF 0 |
||
| 1462 | |||
| 1463 | #define YYACCEPT goto yyacceptlab |
||
| 1464 | #define YYABORT goto yyabortlab |
||
| 1465 | #define YYERROR goto yyerrorlab |
||
| 1466 | |||
| 1467 | #define YYRECOVERING() (!!yyerrstatus) |
||
| 1468 | |||
| 1469 | #define YYBACKUP(Token, Value) \ |
||
| 1470 | do \ |
||
| 1471 | if (yychar == YYEMPTY) \ |
||
| 1472 | { \ |
||
| 1473 | yychar = (Token); \ |
||
| 1474 | yylval = (Value); \ |
||
| 1475 | YYPOPSTACK (yylen); \ |
||
| 1476 | yystate = *yyssp; \ |
||
| 1477 | goto yybackup; \ |
||
| 1478 | } \ |
||
| 1479 | else \ |
||
| 1480 | { \ |
||
| 1481 | yyerror (YY_ ("syntax error: cannot back up")); \ |
||
| 1482 | YYERROR; \ |
||
| 1483 | } \ |
||
| 1484 | while (0) |
||
| 1485 | |||
| 1486 | /* Error token number */ |
||
| 1487 | #define YYTERROR 1 |
||
| 1488 | #define YYERRCODE 256 |
||
| 1489 | |||
| 1490 | /* Enable debugging if requested. */ |
||
| 1491 | #if YYDEBUG |
||
| 1492 | |||
| 1493 | #ifndef YYFPRINTF |
||
| 1494 | #include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
||
| 1495 | #define YYFPRINTF fprintf |
||
| 1496 | #endif |
||
| 1497 | |||
| 1498 | #define YYDPRINTF(Args) \ |
||
| 1499 | do \ |
||
| 1500 | { \ |
||
| 1501 | if (yydebug) \ |
||
| 1502 | YYFPRINTF Args; \ |
||
| 1503 | } while (0) |
||
| 1504 | |||
| 1505 | /* This macro is provided for backward compatibility. */ |
||
| 1506 | #ifndef YY_LOCATION_PRINT |
||
| 1507 | #define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
||
| 1508 | #endif |
||
| 1509 | |||
| 1510 | #define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
||
| 1511 | do \ |
||
| 1512 | { \ |
||
| 1513 | if (yydebug) \ |
||
| 1514 | { \ |
||
| 1515 | YYFPRINTF (stderr, "%s ", Title); \ |
||
| 1516 | yy_symbol_print (stderr, Type, Value); \ |
||
| 1517 | YYFPRINTF (stderr, "\n"); \ |
||
| 1518 | } \ |
||
| 1519 | } while (0) |
||
| 1520 | |||
| 1521 | /*----------------------------------------. |
||
| 1522 | | Print this symbol's value on YYOUTPUT. | |
||
| 1523 | `----------------------------------------*/ |
||
| 1524 | |||
| 1525 | static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep) |
||
| 1526 | { |
||
| 1527 | FILE *yyo = yyoutput; |
||
| 1528 | YYUSE (yyo); |
||
| 1529 | if (!yyvaluep) |
||
| 1530 | return; |
||
| 1531 | #ifdef YYPRINT |
||
| 1532 | if (yytype < YYNTOKENS) |
||
| 1533 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
||
| 1534 | #endif |
||
| 1535 | YYUSE (yytype); |
||
| 1536 | } |
||
| 1537 | |||
| 1538 | /*--------------------------------. |
||
| 1539 | | Print this symbol on YYOUTPUT. | |
||
| 1540 | `--------------------------------*/ |
||
| 1541 | |||
| 1542 | static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep) |
||
| 1543 | { |
||
| 1544 | YYFPRINTF ( |
||
| 1545 | yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
||
| 1546 | |||
| 1547 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
||
| 1548 | YYFPRINTF (yyoutput, ")"); |
||
| 1549 | } |
||
| 1550 | |||
| 1551 | /*------------------------------------------------------------------. |
||
| 1552 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
||
| 1553 | | TOP (included). | |
||
| 1554 | `------------------------------------------------------------------*/ |
||
| 1555 | |||
| 1556 | static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
||
| 1557 | { |
||
| 1558 | YYFPRINTF (stderr, "Stack now"); |
||
| 1559 | for (; yybottom <= yytop; yybottom++) |
||
| 1560 | { |
||
| 1561 | int yybot = *yybottom; |
||
| 1562 | YYFPRINTF (stderr, " %d", yybot); |
||
| 1563 | } |
||
| 1564 | YYFPRINTF (stderr, "\n"); |
||
| 1565 | } |
||
| 1566 | |||
| 1567 | #define YY_STACK_PRINT(Bottom, Top) \ |
||
| 1568 | do \ |
||
| 1569 | { \ |
||
| 1570 | if (yydebug) \ |
||
| 1571 | yy_stack_print ((Bottom), (Top)); \ |
||
| 1572 | } while (0) |
||
| 1573 | |||
| 1574 | /*------------------------------------------------. |
||
| 1575 | | Report that the YYRULE is going to be reduced. | |
||
| 1576 | `------------------------------------------------*/ |
||
| 1577 | |||
| 1578 | static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) |
||
| 1579 | { |
||
| 1580 | unsigned long int yylno = yyrline[yyrule]; |
||
| 1581 | int yynrhs = yyr2[yyrule]; |
||
| 1582 | int yyi; |
||
| 1583 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); |
||
| 1584 | /* The symbols being reduced. */ |
||
| 1585 | for (yyi = 0; yyi < yynrhs; yyi++) |
||
| 1586 | { |
||
| 1587 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
||
| 1588 | yy_symbol_print ( |
||
| 1589 | stderr, yystos[yyssp[yyi + 1 - yynrhs]], &(yyvsp[(yyi + 1) - (yynrhs)])); |
||
| 1590 | YYFPRINTF (stderr, "\n"); |
||
| 1591 | } |
||
| 1592 | } |
||
| 1593 | |||
| 1594 | #define YY_REDUCE_PRINT(Rule) \ |
||
| 1595 | do \ |
||
| 1596 | { \ |
||
| 1597 | if (yydebug) \ |
||
| 1598 | yy_reduce_print (yyssp, yyvsp, Rule); \ |
||
| 1599 | } while (0) |
||
| 1600 | |||
| 1601 | /* Nonzero means print parse trace. It is left uninitialized so that |
||
| 1602 | multiple parsers can coexist. */ |
||
| 1603 | int yydebug; |
||
| 1604 | #else /* !YYDEBUG */ |
||
| 1605 | #define YYDPRINTF(Args) |
||
| 1606 | #define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
||
| 1607 | #define YY_STACK_PRINT(Bottom, Top) |
||
| 1608 | #define YY_REDUCE_PRINT(Rule) |
||
| 1609 | #endif /* !YYDEBUG */ |
||
| 1610 | |||
| 1611 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
||
| 1612 | #ifndef YYINITDEPTH |
||
| 1613 | #define YYINITDEPTH 200 |
||
| 1614 | #endif |
||
| 1615 | |||
| 1616 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
||
| 1617 | if the built-in stack extension method is used). |
||
| 1618 | |||
| 1619 | Do not make this value too large; the results are undefined if |
||
| 1620 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
||
| 1621 | evaluated with infinite-precision integer arithmetic. */ |
||
| 1622 | |||
| 1623 | #ifndef YYMAXDEPTH |
||
| 1624 | #define YYMAXDEPTH 10000 |
||
| 1625 | #endif |
||
| 1626 | |||
| 1627 | #if YYERROR_VERBOSE |
||
| 1628 | |||
| 1629 | #ifndef yystrlen |
||
| 1630 | #if defined __GLIBC__ && defined _STRING_H |
||
| 1631 | #define yystrlen strlen |
||
| 1632 | #else |
||
| 1633 | /* Return the length of YYSTR. */ |
||
| 1634 | static YYSIZE_T yystrlen (const char *yystr) |
||
| 1635 | { |
||
| 1636 | YYSIZE_T yylen; |
||
| 1637 | for (yylen = 0; yystr[yylen]; yylen++) |
||
| 1638 | continue; |
||
| 1639 | return yylen; |
||
| 1640 | } |
||
| 1641 | #endif |
||
| 1642 | #endif |
||
| 1643 | |||
| 1644 | #ifndef yystpcpy |
||
| 1645 | #if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
||
| 1646 | #define yystpcpy stpcpy |
||
| 1647 | #else |
||
| 1648 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
||
| 1649 | YYDEST. */ |
||
| 1650 | static char *yystpcpy (char *yydest, const char *yysrc) |
||
| 1651 | { |
||
| 1652 | char *yyd = yydest; |
||
| 1653 | const char *yys = yysrc; |
||
| 1654 | |||
| 1655 | while ((*yyd++ = *yys++) != '\0') |
||
| 1656 | continue; |
||
| 1657 | |||
| 1658 | return yyd - 1; |
||
| 1659 | } |
||
| 1660 | #endif |
||
| 1661 | #endif |
||
| 1662 | |||
| 1663 | #ifndef yytnamerr |
||
| 1664 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
||
| 1665 | quotes and backslashes, so that it's suitable for yyerror. The |
||
| 1666 | heuristic is that double-quoting is unnecessary unless the string |
||
| 1667 | contains an apostrophe, a comma, or backslash (other than |
||
| 1668 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
||
| 1669 | null, do not copy; instead, return the length of what the result |
||
| 1670 | would have been. */ |
||
| 1671 | static YYSIZE_T yytnamerr (char *yyres, const char *yystr) |
||
| 1672 | { |
||
| 1673 | if (*yystr == '"') |
||
| 1674 | { |
||
| 1675 | YYSIZE_T yyn = 0; |
||
| 1676 | char const *yyp = yystr; |
||
| 1677 | |||
| 1678 | for (;;) |
||
| 1679 | switch (*++yyp) |
||
| 1680 | { |
||
| 1681 | case '\'': |
||
| 1682 | case ',': |
||
| 1683 | goto do_not_strip_quotes; |
||
| 1684 | |||
| 1685 | case '\\': |
||
| 1686 | if (*++yyp != '\\') |
||
| 1687 | goto do_not_strip_quotes; |
||
| 1688 | /* Fall through. */ |
||
| 1689 | default: |
||
| 1690 | if (yyres) |
||
| 1691 | yyres[yyn] = *yyp; |
||
| 1692 | yyn++; |
||
| 1693 | break; |
||
| 1694 | |||
| 1695 | case '"': |
||
| 1696 | if (yyres) |
||
| 1697 | yyres[yyn] = '\0'; |
||
| 1698 | return yyn; |
||
| 1699 | } |
||
| 1700 | do_not_strip_quotes:; |
||
| 1701 | } |
||
| 1702 | |||
| 1703 | if (!yyres) |
||
| 1704 | return yystrlen (yystr); |
||
| 1705 | |||
| 1706 | return yystpcpy (yyres, yystr) - yyres; |
||
| 1707 | } |
||
| 1708 | #endif |
||
| 1709 | |||
| 1710 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
||
| 1711 | about the unexpected token YYTOKEN for the state stack whose top is |
||
| 1712 | YYSSP. |
||
| 1713 | |||
| 1714 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
||
| 1715 | not large enough to hold the message. In that case, also set |
||
| 1716 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
||
| 1717 | required number of bytes is too large to store. */ |
||
| 1718 | static int |
||
| 1719 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) |
||
| 1720 | { |
||
| 1721 | YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
||
| 1722 | YYSIZE_T yysize = yysize0; |
||
| 1723 | enum |
||
| 1724 | { |
||
| 1725 | YYERROR_VERBOSE_ARGS_MAXIMUM = 5 |
||
| 1726 | }; |
||
| 1727 | /* Internationalized format string. */ |
||
| 1728 | const char *yyformat = YY_NULLPTR; |
||
| 1729 | /* Arguments of yyformat. */ |
||
| 1730 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
||
| 1731 | /* Number of reported tokens (one for the "unexpected", one per |
||
| 1732 | "expected"). */ |
||
| 1733 | int yycount = 0; |
||
| 1734 | |||
| 1735 | /* There are many possibilities here to consider: |
||
| 1736 | - If this state is a consistent state with a default action, then |
||
| 1737 | the only way this function was invoked is if the default action |
||
| 1738 | is an error action. In that case, don't check for expected |
||
| 1739 | tokens because there are none. |
||
| 1740 | - The only way there can be no lookahead present (in yychar) is if |
||
| 1741 | this state is a consistent state with a default action. Thus, |
||
| 1742 | detecting the absence of a lookahead is sufficient to determine |
||
| 1743 | that there is no unexpected or expected token to report. In that |
||
| 1744 | case, just report a simple "syntax error". |
||
| 1745 | - Don't assume there isn't a lookahead just because this state is a |
||
| 1746 | consistent state with a default action. There might have been a |
||
| 1747 | previous inconsistent state, consistent state with a non-default |
||
| 1748 | action, or user semantic action that manipulated yychar. |
||
| 1749 | - Of course, the expected token list depends on states to have |
||
| 1750 | correct lookahead information, and it depends on the parser not |
||
| 1751 | to perform extra reductions after fetching a lookahead from the |
||
| 1752 | scanner and before detecting a syntax error. Thus, state merging |
||
| 1753 | (from LALR or IELR) and default reductions corrupt the expected |
||
| 1754 | token list. However, the list is correct for canonical LR with |
||
| 1755 | one exception: it will still contain any token that will not be |
||
| 1756 | accepted due to an error action in a later state. |
||
| 1757 | */ |
||
| 1758 | if (yytoken != YYEMPTY) |
||
| 1759 | { |
||
| 1760 | int yyn = yypact[*yyssp]; |
||
| 1761 | yyarg[yycount++] = yytname[yytoken]; |
||
| 1762 | if (!yypact_value_is_default (yyn)) |
||
| 1763 | { |
||
| 1764 | /* Start YYX at -YYN if negative to avoid negative indexes in |
||
| 1765 | YYCHECK. In other words, skip the first -YYN actions for |
||
| 1766 | this state because they are default actions. */ |
||
| 1767 | int yyxbegin = yyn < 0 ? -yyn : 0; |
||
| 1768 | /* Stay within bounds of both yycheck and yytname. */ |
||
| 1769 | int yychecklim = YYLAST - yyn + 1; |
||
| 1770 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
||
| 1771 | int yyx; |
||
| 1772 | |||
| 1773 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
||
| 1774 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && |
||
| 1775 | !yytable_value_is_error (yytable[yyx + yyn])) |
||
| 1776 | { |
||
| 1777 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
||
| 1778 | { |
||
| 1779 | yycount = 1; |
||
| 1780 | yysize = yysize0; |
||
| 1781 | break; |
||
| 1782 | } |
||
| 1783 | yyarg[yycount++] = yytname[yyx]; |
||
| 1784 | { |
||
| 1785 | YYSIZE_T yysize1 = |
||
| 1786 | yysize + |
||
| 1787 | yytnamerr (YY_NULLPTR, yytname[yyx]); |
||
| 1788 | if (!(yysize <= yysize1 && |
||
| 1789 | yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
||
| 1790 | return 2; |
||
| 1791 | yysize = yysize1; |
||
| 1792 | } |
||
| 1793 | } |
||
| 1794 | } |
||
| 1795 | } |
||
| 1796 | |||
| 1797 | switch (yycount) |
||
| 1798 | { |
||
| 1799 | #define YYCASE_(N, S) \ |
||
| 1800 | case N: \ |
||
| 1801 | yyformat = S; \ |
||
| 1802 | break |
||
| 1803 | YYCASE_ (0, YY_ ("syntax error")); |
||
| 1804 | YYCASE_ (1, YY_ ("syntax error, unexpected %s")); |
||
| 1805 | YYCASE_ (2, YY_ ("syntax error, unexpected %s, expecting %s")); |
||
| 1806 | YYCASE_ (3, YY_ ("syntax error, unexpected %s, expecting %s or %s")); |
||
| 1807 | YYCASE_ (4, YY_ ("syntax error, unexpected %s, expecting %s or %s or %s")); |
||
| 1808 | YYCASE_ ( |
||
| 1809 | 5, YY_ ("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
||
| 1810 | #undef YYCASE_ |
||
| 1811 | } |
||
| 1812 | |||
| 1813 | { |
||
| 1814 | YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
||
| 1815 | if (!(yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
||
| 1816 | return 2; |
||
| 1817 | yysize = yysize1; |
||
| 1818 | } |
||
| 1819 | |||
| 1820 | if (*yymsg_alloc < yysize) |
||
| 1821 | { |
||
| 1822 | *yymsg_alloc = 2 * yysize; |
||
| 1823 | if (!(yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
||
| 1824 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
||
| 1825 | return 1; |
||
| 1826 | } |
||
| 1827 | |||
| 1828 | /* Avoid sprintf, as that infringes on the user's name space. |
||
| 1829 | Don't have undefined behavior even if the translation |
||
| 1830 | produced a string with the wrong number of "%s"s. */ |
||
| 1831 | { |
||
| 1832 | char *yyp = *yymsg; |
||
| 1833 | int yyi = 0; |
||
| 1834 | while ((*yyp = *yyformat) != '\0') |
||
| 1835 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
||
| 1836 | { |
||
| 1837 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
||
| 1838 | yyformat += 2; |
||
| 1839 | } |
||
| 1840 | else |
||
| 1841 | { |
||
| 1842 | yyp++; |
||
| 1843 | yyformat++; |
||
| 1844 | } |
||
| 1845 | } |
||
| 1846 | return 0; |
||
| 1847 | } |
||
| 1848 | #endif /* YYERROR_VERBOSE */ |
||
| 1849 | |||
| 1850 | /*-----------------------------------------------. |
||
| 1851 | | Release the memory associated to this symbol. | |
||
| 1852 | `-----------------------------------------------*/ |
||
| 1853 | |||
| 1854 | static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
||
| 1855 | { |
||
| 1856 | YYUSE (yyvaluep); |
||
| 1857 | if (!yymsg) |
||
| 1858 | yymsg = "Deleting"; |
||
| 1859 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
||
| 1860 | |||
| 1861 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
| 1862 | YYUSE (yytype); |
||
| 1863 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
||
| 1864 | } |
||
| 1865 | |||
| 1866 | /* The lookahead symbol. */ |
||
| 1867 | int yychar; |
||
| 1868 | |||
| 1869 | /* The semantic value of the lookahead symbol. */ |
||
| 1870 | YYSTYPE yylval; |
||
| 1871 | /* Number of syntax errors so far. */ |
||
| 1872 | int yynerrs; |
||
| 1873 | |||
| 1874 | /*----------. |
||
| 1875 | | yyparse. | |
||
| 1876 | `----------*/ |
||
| 1877 | |||
| 1878 | int yyparse (void) |
||
| 1879 | { |
||
| 1880 | int yystate; |
||
| 1881 | /* Number of tokens to shift before error messages enabled. */ |
||
| 1882 | int yyerrstatus; |
||
| 1883 | |||
| 1884 | /* The stacks and their tools: |
||
| 1885 | 'yyss': related to states. |
||
| 1886 | 'yyvs': related to semantic values. |
||
| 1887 | |||
| 1888 | Refer to the stacks through separate pointers, to allow yyoverflow |
||
| 1889 | to reallocate them elsewhere. */ |
||
| 1890 | |||
| 1891 | /* The state stack. */ |
||
| 1892 | yytype_int16 yyssa[YYINITDEPTH]; |
||
| 1893 | yytype_int16 *yyss; |
||
| 1894 | yytype_int16 *yyssp; |
||
| 1895 | |||
| 1896 | /* The semantic value stack. */ |
||
| 1897 | YYSTYPE yyvsa[YYINITDEPTH]; |
||
| 1898 | YYSTYPE *yyvs; |
||
| 1899 | YYSTYPE *yyvsp; |
||
| 1900 | |||
| 1901 | YYSIZE_T yystacksize; |
||
| 1902 | |||
| 1903 | int yyn; |
||
| 1904 | int yyresult; |
||
| 1905 | /* Lookahead token as an internal (translated) token number. */ |
||
| 1906 | int yytoken = 0; |
||
| 1907 | /* The variables used to return semantic value and location from the |
||
| 1908 | action routines. */ |
||
| 1909 | YYSTYPE yyval; |
||
| 1910 | |||
| 1911 | #if YYERROR_VERBOSE |
||
| 1912 | /* Buffer for error messages, and its allocated size. */ |
||
| 1913 | char yymsgbuf[128]; |
||
| 1914 | char *yymsg = yymsgbuf; |
||
| 1915 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
||
| 1916 | #endif |
||
| 1917 | |||
| 1918 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
||
| 1919 | |||
| 1920 | /* The number of symbols on the RHS of the reduced rule. |
||
| 1921 | Keep to zero when no symbol should be popped. */ |
||
| 1922 | int yylen = 0; |
||
| 1923 | |||
| 1924 | yyssp = yyss = yyssa; |
||
| 1925 | yyvsp = yyvs = yyvsa; |
||
| 1926 | yystacksize = YYINITDEPTH; |
||
| 1927 | |||
| 1928 | YYDPRINTF ((stderr, "Starting parse\n")); |
||
| 1929 | |||
| 1930 | yystate = 0; |
||
| 1931 | yyerrstatus = 0; |
||
| 1932 | yynerrs = 0; |
||
| 1933 | yychar = YYEMPTY; /* Cause a token to be read. */ |
||
| 1934 | goto yysetstate; |
||
| 1935 | |||
| 1936 | /*------------------------------------------------------------. |
||
| 1937 | | yynewstate -- Push a new state, which is found in yystate. | |
||
| 1938 | `------------------------------------------------------------*/ |
||
| 1939 | yynewstate: |
||
| 1940 | /* In all cases, when you get here, the value and location stacks |
||
| 1941 | have just been pushed. So pushing a state here evens the stacks. */ |
||
| 1942 | yyssp++; |
||
| 1943 | |||
| 1944 | yysetstate: |
||
| 1945 | *yyssp = yystate; |
||
| 1946 | |||
| 1947 | if (yyss + yystacksize - 1 <= yyssp) |
||
| 1948 | { |
||
| 1949 | /* Get the current used size of the three stacks, in elements. */ |
||
| 1950 | YYSIZE_T yysize = yyssp - yyss + 1; |
||
| 1951 | |||
| 1952 | #ifdef yyoverflow |
||
| 1953 | { |
||
| 1954 | /* Give user a chance to reallocate the stack. Use copies of |
||
| 1955 | these so that the &'s don't force the real ones into |
||
| 1956 | memory. */ |
||
| 1957 | YYSTYPE *yyvs1 = yyvs; |
||
| 1958 | yytype_int16 *yyss1 = yyss; |
||
| 1959 | |||
| 1960 | /* Each stack pointer address is followed by the size of the |
||
| 1961 | data in use in that stack, in bytes. This used to be a |
||
| 1962 | conditional around just the two extra args, but that might |
||
| 1963 | be undefined if yyoverflow is a macro. */ |
||
| 1964 | yyoverflow ( |
||
| 1965 | YY_ ("memory exhausted"), |
||
| 1966 | &yyss1, |
||
| 1967 | yysize * sizeof (*yyssp), |
||
| 1968 | &yyvs1, |
||
| 1969 | yysize * sizeof (*yyvsp), |
||
| 1970 | &yystacksize); |
||
| 1971 | |||
| 1972 | yyss = yyss1; |
||
| 1973 | yyvs = yyvs1; |
||
| 1974 | } |
||
| 1975 | #else /* no yyoverflow */ |
||
| 1976 | #ifndef YYSTACK_RELOCATE |
||
| 1977 | goto yyexhaustedlab; |
||
| 1978 | #else |
||
| 1979 | /* Extend the stack our own way. */ |
||
| 1980 | if (YYMAXDEPTH <= yystacksize) |
||
| 1981 | goto yyexhaustedlab; |
||
| 1982 | yystacksize *= 2; |
||
| 1983 | if (YYMAXDEPTH < yystacksize) |
||
| 1984 | yystacksize = YYMAXDEPTH; |
||
| 1985 | |||
| 1986 | { |
||
| 1987 | yytype_int16 *yyss1 = yyss; |
||
| 1988 | union yyalloc *yyptr = |
||
| 1989 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
||
| 1990 | if (!yyptr) |
||
| 1991 | goto yyexhaustedlab; |
||
| 1992 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
||
| 1993 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
||
| 1994 | #undef YYSTACK_RELOCATE |
||
| 1995 | if (yyss1 != yyssa) |
||
| 1996 | YYSTACK_FREE (yyss1); |
||
| 1997 | } |
||
| 1998 | #endif |
||
| 1999 | #endif /* no yyoverflow */ |
||
| 2000 | |||
| 2001 | yyssp = yyss + yysize - 1; |
||
| 2002 | yyvsp = yyvs + yysize - 1; |
||
| 2003 | |||
| 2004 | YYDPRINTF (( |
||
| 2005 | stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); |
||
| 2006 | |||
| 2007 | if (yyss + yystacksize - 1 <= yyssp) |
||
| 2008 | YYABORT; |
||
| 2009 | } |
||
| 2010 | |||
| 2011 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
||
| 2012 | |||
| 2013 | if (yystate == YYFINAL) |
||
| 2014 | YYACCEPT; |
||
| 2015 | |||
| 2016 | goto yybackup; |
||
| 2017 | |||
| 2018 | /*-----------. |
||
| 2019 | | yybackup. | |
||
| 2020 | `-----------*/ |
||
| 2021 | yybackup: |
||
| 2022 | |||
| 2023 | /* Do appropriate processing given the current state. Read a |
||
| 2024 | lookahead token if we need one and don't already have one. */ |
||
| 2025 | |||
| 2026 | /* First try to decide what to do without reference to lookahead token. */ |
||
| 2027 | yyn = yypact[yystate]; |
||
| 2028 | if (yypact_value_is_default (yyn)) |
||
| 2029 | goto yydefault; |
||
| 2030 | |||
| 2031 | /* Not known => get a lookahead token if don't already have one. */ |
||
| 2032 | |||
| 2033 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
||
| 2034 | if (yychar == YYEMPTY) |
||
| 2035 | { |
||
| 2036 | YYDPRINTF ((stderr, "Reading a token: ")); |
||
| 2037 | yychar = yylex (); |
||
| 2038 | } |
||
| 2039 | |||
| 2040 | if (yychar <= YYEOF) |
||
| 2041 | { |
||
| 2042 | yychar = yytoken = YYEOF; |
||
| 2043 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
||
| 2044 | } |
||
| 2045 | else |
||
| 2046 | { |
||
| 2047 | yytoken = YYTRANSLATE (yychar); |
||
| 2048 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
||
| 2049 | } |
||
| 2050 | |||
| 2051 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
||
| 2052 | detect an error, take that action. */ |
||
| 2053 | yyn += yytoken; |
||
| 2054 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
||
| 2055 | goto yydefault; |
||
| 2056 | yyn = yytable[yyn]; |
||
| 2057 | if (yyn <= 0) |
||
| 2058 | { |
||
| 2059 | if (yytable_value_is_error (yyn)) |
||
| 2060 | goto yyerrlab; |
||
| 2061 | yyn = -yyn; |
||
| 2062 | goto yyreduce; |
||
| 2063 | } |
||
| 2064 | |||
| 2065 | /* Count tokens shifted since error; after three, turn off error |
||
| 2066 | status. */ |
||
| 2067 | if (yyerrstatus) |
||
| 2068 | yyerrstatus--; |
||
| 2069 | |||
| 2070 | /* Shift the lookahead token. */ |
||
| 2071 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
||
| 2072 | |||
| 2073 | /* Discard the shifted token. */ |
||
| 2074 | yychar = YYEMPTY; |
||
| 2075 | |||
| 2076 | yystate = yyn; |
||
| 2077 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
| 2078 | *++yyvsp = yylval; |
||
| 2079 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
||
| 2080 | |||
| 2081 | goto yynewstate; |
||
| 2082 | |||
| 2083 | /*-----------------------------------------------------------. |
||
| 2084 | | yydefault -- do the default action for the current state. | |
||
| 2085 | `-----------------------------------------------------------*/ |
||
| 2086 | yydefault: |
||
| 2087 | yyn = yydefact[yystate]; |
||
| 2088 | if (yyn == 0) |
||
| 2089 | goto yyerrlab; |
||
| 2090 | goto yyreduce; |
||
| 2091 | |||
| 2092 | /*-----------------------------. |
||
| 2093 | | yyreduce -- Do a reduction. | |
||
| 2094 | `-----------------------------*/ |
||
| 2095 | yyreduce: |
||
| 2096 | /* yyn is the number of a rule to reduce with. */ |
||
| 2097 | yylen = yyr2[yyn]; |
||
| 2098 | |||
| 2099 | /* If YYLEN is nonzero, implement the default value of the action: |
||
| 2100 | '$$ = $1'. |
||
| 2101 | |||
| 2102 | Otherwise, the following line sets YYVAL to garbage. |
||
| 2103 | This behavior is undocumented and Bison |
||
| 2104 | users should not rely upon it. Assigning to YYVAL |
||
| 2105 | unconditionally makes the parser a bit smaller, and it avoids a |
||
| 2106 | GCC warning that YYVAL may be used uninitialized. */ |
||
| 2107 | yyval = yyvsp[1 - yylen]; |
||
| 2108 | |||
| 2109 | YY_REDUCE_PRINT (yyn); |
||
| 2110 | switch (yyn) |
||
| 2111 | { |
||
| 2112 | case 6: |
||
| 2113 | #line 293 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2114 | { |
||
| 2115 | cmd_expression = (yyvsp[0].exp); |
||
| 2116 | } |
||
| 2117 | #line 2177 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2118 | break; |
||
| 2119 | |||
| 2120 | case 20: |
||
| 2121 | #line 322 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2122 | { |
||
| 2123 | (yyval.string) = (yyvsp[0].string); |
||
| 2124 | } |
||
| 2125 | #line 2183 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2126 | break; |
||
| 2127 | |||
| 2128 | case 21: |
||
| 2129 | #line 323 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2130 | { |
||
| 2131 | (yyval.string) = (yyvsp[0].string); |
||
| 2132 | } |
||
| 2133 | #line 2189 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2134 | break; |
||
| 2135 | |||
| 2136 | case 22: |
||
| 2137 | #line 324 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2138 | { |
||
| 2139 | (yyval.string) = (yyvsp[0].string); |
||
| 2140 | } |
||
| 2141 | #line 2195 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2142 | break; |
||
| 2143 | |||
| 2144 | case 26: |
||
| 2145 | #line 341 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2146 | { |
||
| 2147 | free_lex_strings (); |
||
| 2148 | exit_lex_block (); |
||
| 2149 | current_chip = NULL; |
||
| 2150 | } |
||
| 2151 | #line 2204 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2152 | break; |
||
| 2153 | |||
| 2154 | case 27: |
||
| 2155 | #line 348 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2156 | { |
||
| 2157 | id_count = 0; /* used in pin ID lists */ |
||
| 2158 | current_chip = find_socket (Name, (yyvsp[0].string), Create, &socket_head); |
||
| 2159 | /* current_chip is unlikely to be null .. but */ |
||
| 2160 | if (current_chip) |
||
| 2161 | { |
||
| 2162 | current_chip->is_template = 0; |
||
| 2163 | current_chip->parent_template_ref = NULL; |
||
| 2164 | current_chip->route_flags = 0; |
||
| 2165 | /* ensure_socket_ident(current_chip); */ |
||
| 2166 | |||
| 2167 | if (ISNULLSTR (current_chip->identifier)) |
||
| 2168 | { |
||
| 2169 | socket_t *test = find_socket ( |
||
| 2170 | Ident, (yyvsp[0].string), Search, &socket_head); |
||
| 2171 | if (!test) |
||
| 2172 | set_socket (current_chip, Ident, (yyvsp[0].string)); |
||
| 2173 | else |
||
| 2174 | { |
||
| 2175 | Log ( |
||
| 2176 | LOG_ERROR, |
||
| 2177 | "-- ERROR :name '%s' clashes with another ID in " |
||
| 2178 | "CHIP declaration\n", |
||
| 2179 | (yyvsp[0].string)); |
||
| 2180 | set_socket ( |
||
| 2181 | current_chip, |
||
| 2182 | Ident, |
||
| 2183 | "name clashes with another chip ident in CHIP " |
||
| 2184 | "declaration"); |
||
| 2185 | } |
||
| 2186 | } |
||
| 2187 | } |
||
| 2188 | } |
||
| 2189 | #line 2232 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2190 | break; |
||
| 2191 | |||
| 2192 | case 35: |
||
| 2193 | #line 383 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2194 | { |
||
| 2195 | if (current_chip) |
||
| 2196 | set_socket (current_chip, Type, (yyvsp[-1].string)); |
||
| 2197 | } |
||
| 2198 | #line 2240 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2199 | break; |
||
| 2200 | |||
| 2201 | case 42: |
||
| 2202 | #line 407 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2203 | { |
||
| 2204 | if (current_chip) |
||
| 2205 | convert_num ((yyvsp[0].string), ¤t_chip->route_flags); |
||
| 2206 | } |
||
| 2207 | #line 2247 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2208 | break; |
||
| 2209 | |||
| 2210 | case 47: |
||
| 2211 | #line 426 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2212 | { |
||
| 2213 | char *s; |
||
| 2214 | s = make_string ((yyvsp[0].string), &y_first, &y_last); |
||
| 2215 | |||
| 2216 | strcpy (curr_pin_name, "Still_Using_pin_name_somewhere"); |
||
| 2217 | curr_pin_dir = NONE; /* default bidirectional */ |
||
| 2218 | if (ISNULLSTR (s)) /* the null strings tell acfread that the pin exists and */ |
||
| 2219 | current_list = &routed_list; /* available for routing */ |
||
| 2220 | else |
||
| 2221 | current_list = &unrouted_list; |
||
| 2222 | } |
||
| 2223 | #line 2262 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2224 | break; |
||
| 2225 | |||
| 2226 | case 51: |
||
| 2227 | #line 442 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2228 | { |
||
| 2229 | curr_pin_dir = (yyvsp[0].integer); |
||
| 2230 | } |
||
| 2231 | #line 2268 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2232 | break; |
||
| 2233 | |||
| 2234 | case 52: |
||
| 2235 | #line 445 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2236 | { |
||
| 2237 | convert_num ((yyvsp[-1].string), &curr_pin_group); |
||
| 2238 | } |
||
| 2239 | #line 2274 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2240 | break; |
||
| 2241 | |||
| 2242 | case 53: |
||
| 2243 | #line 446 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2244 | { |
||
| 2245 | curr_pin_group = 0; |
||
| 2246 | } |
||
| 2247 | #line 2280 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2248 | break; |
||
| 2249 | |||
| 2250 | case 54: |
||
| 2251 | #line 448 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2252 | { |
||
| 2253 | strcpy (curr_pin_ident, (yyvsp[0].string)); |
||
| 2254 | } |
||
| 2255 | #line 2286 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2256 | break; |
||
| 2257 | |||
| 2258 | case 56: |
||
| 2259 | #line 456 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2260 | { |
||
| 2261 | if (current_chip) |
||
| 2262 | set_socket (current_chip, Type, (yyvsp[-1].string)); |
||
| 2263 | } |
||
| 2264 | #line 2294 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2265 | break; |
||
| 2266 | |||
| 2267 | case 57: |
||
| 2268 | #line 460 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2269 | { |
||
| 2270 | generic_info_t info; |
||
| 2271 | char *sbuff = malloc (strlen ((yyvsp[0].string)) + 2); |
||
| 2272 | sprintf (sbuff, "-%s", (yyvsp[0].string)); |
||
| 2273 | info.expr = compile_string (sbuff); |
||
| 2274 | free (sbuff); |
||
| 2275 | info.name = "speed_grade"; |
||
| 2276 | info.typename = "string"; |
||
| 2277 | info.g_type = IS_DECLARATION_DIRECTIVE; |
||
| 2278 | if (current_chip) |
||
| 2279 | set_generic_value (¤t_chip->generics, &info); |
||
| 2280 | } |
||
| 2281 | #line 2310 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2282 | break; |
||
| 2283 | |||
| 2284 | case 61: |
||
| 2285 | #line 477 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2286 | { /* ground pin .. no op */ |
||
| 2287 | } |
||
| 2288 | #line 2316 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2289 | break; |
||
| 2290 | |||
| 2291 | case 62: |
||
| 2292 | #line 478 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2293 | { /* reserved pin .. no op */ |
||
| 2294 | } |
||
| 2295 | #line 2322 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2296 | break; |
||
| 2297 | |||
| 2298 | case 63: |
||
| 2299 | #line 479 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2300 | { /* reserved pin .. no op */ |
||
| 2301 | } |
||
| 2302 | #line 2328 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2303 | break; |
||
| 2304 | |||
| 2305 | case 64: |
||
| 2306 | #line 480 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2307 | { /* power pin .. no op */ |
||
| 2308 | } |
||
| 2309 | #line 2334 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2310 | break; |
||
| 2311 | |||
| 2312 | case 65: |
||
| 2313 | #line 481 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2314 | { /* as this pattern shows.. power pin .. no op */ |
||
| 2315 | } |
||
| 2316 | #line 2340 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2317 | break; |
||
| 2318 | |||
| 2319 | case 66: |
||
| 2320 | #line 482 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2321 | { /*printf("ignore pin %s at %s\n",$1,$3);*/ /* reserved pin .. no op */ |
||
| 2322 | } |
||
| 2323 | #line 2346 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2324 | break; |
||
| 2325 | |||
| 2326 | case 67: |
||
| 2327 | #line 483 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2328 | { |
||
| 2329 | current_list = &unrouted_list; |
||
| 2330 | make_string ((yyvsp[-7].string), &y_first, &y_last); |
||
| 2331 | /*printf("pin %s at %s\n",$1,$3);*/ |
||
| 2332 | strcpy (curr_pin_ident, (yyvsp[-5].string)); |
||
| 2333 | curr_pin_dir = (yyvsp[-3].integer); |
||
| 2334 | vhdl = default_vhdl_datatype; |
||
| 2335 | create_pins_or_signals (); |
||
| 2336 | } |
||
| 2337 | #line 2359 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2338 | break; |
||
| 2339 | |||
| 2340 | case 68: |
||
| 2341 | #line 492 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2342 | { |
||
| 2343 | current_list = &unrouted_list; |
||
| 2344 | make_string ((yyvsp[-10].string), &y_first, &y_last); |
||
| 2345 | /*printf("pin %s at %s\n",$1,$3);*/ |
||
| 2346 | vhdl = calloc (1, sizeof (vhdl_t)); |
||
| 2347 | vhdl->is_vector = 1; |
||
| 2348 | vhdl->expr = (yyvsp[-8].exp); |
||
| 2349 | strcpy (curr_pin_ident, (yyvsp[-5].string)); |
||
| 2350 | curr_pin_dir = (yyvsp[-3].integer); |
||
| 2351 | /* vhdl = default_vhdl_datatype; */ |
||
| 2352 | create_pins_or_signals (); |
||
| 2353 | } |
||
| 2354 | #line 2375 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2355 | break; |
||
| 2356 | |||
| 2357 | case 72: |
||
| 2358 | #line 515 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2359 | { /* use a default type if none given */ |
||
| 2360 | vhdl = default_vhdl_datatype; |
||
| 2361 | create_pins_or_signals (); |
||
| 2362 | } |
||
| 2363 | #line 2384 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2364 | break; |
||
| 2365 | |||
| 2366 | case 73: |
||
| 2367 | #line 522 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2368 | { /* single bit types */ |
||
| 2369 | vhdl = (vhdl_t *) calloc (1, sizeof (vhdl_t)); |
||
| 2370 | if (vhdl) |
||
| 2371 | { |
||
| 2372 | vhdl->basetype = allocstr ((yyvsp[-1].string)); |
||
| 2373 | vhdl->is_vector = 0; |
||
| 2374 | vhdl->is_downto = 0; |
||
| 2375 | vhdl->expr = NULL; |
||
| 2376 | vhdl->default_expr = |
||
| 2377 | (yyvsp[0].exp); /* added default assignment expression */ |
||
| 2378 | create_pins_or_signals (); |
||
| 2379 | } |
||
| 2380 | } |
||
| 2381 | #line 2400 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2382 | break; |
||
| 2383 | |||
| 2384 | case 74: |
||
| 2385 | #line 533 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2386 | { /* vhdl vector types */ |
||
| 2387 | vhdl = (vhdl_t *) calloc (1, sizeof (vhdl_t)); |
||
| 2388 | if (vhdl) |
||
| 2389 | { |
||
| 2390 | vhdl->basetype = allocstr ((yyvsp[-4].string)); |
||
| 2391 | vhdl->is_vector = 1; /* not known for sure yet */ |
||
| 2392 | vhdl->is_downto = 0; |
||
| 2393 | vhdl->expr = (yyvsp[-2].exp); |
||
| 2394 | vhdl->default_expr = |
||
| 2395 | (yyvsp[0].exp); /* added default assignment expression */ |
||
| 2396 | create_pins_or_signals (); |
||
| 2397 | } |
||
| 2398 | #if defined DEBUG_EXPRESSION |
||
| 2399 | print_msg_expression (stdout, "seen bus ", (yyvsp[-2].exp)); |
||
| 2400 | #endif |
||
| 2401 | } |
||
| 2402 | #line 2420 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2403 | break; |
||
| 2404 | |||
| 2405 | case 75: |
||
| 2406 | #line 548 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2407 | { /* added Nov 2000 */ |
||
| 2408 | vhdl = (vhdl_t *) calloc (1, sizeof (vhdl_t)); |
||
| 2409 | if (vhdl) |
||
| 2410 | { |
||
| 2411 | vhdl->basetype = "integer"; |
||
| 2412 | vhdl->is_vector = 0; /* not known for sure yet */ |
||
| 2413 | vhdl->is_downto = 0; |
||
| 2414 | vhdl->expr = NULL; |
||
| 2415 | vhdl->default_expr = |
||
| 2416 | (yyvsp[0].exp); /* added default assignment expression */ |
||
| 2417 | create_pins_or_signals (); |
||
| 2418 | } |
||
| 2419 | } |
||
| 2420 | #line 2436 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2421 | break; |
||
| 2422 | |||
| 2423 | case 76: |
||
| 2424 | #line 559 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2425 | { /* added Nov 2000 */ |
||
| 2426 | vhdl = (vhdl_t *) calloc (1, sizeof (vhdl_t)); |
||
| 2427 | if (vhdl) |
||
| 2428 | { |
||
| 2429 | vhdl->basetype = "integer range"; |
||
| 2430 | vhdl->decl_expr = (yyvsp[-1].exp); |
||
| 2431 | vhdl->is_vector = 0; /* not known for sure yet */ |
||
| 2432 | vhdl->is_downto = 0; |
||
| 2433 | vhdl->expr = NULL; |
||
| 2434 | vhdl->default_expr = |
||
| 2435 | (yyvsp[0].exp); /* added default assignment expression */ |
||
| 2436 | create_pins_or_signals (); |
||
| 2437 | } |
||
| 2438 | } |
||
| 2439 | #line 2453 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2440 | break; |
||
| 2441 | |||
| 2442 | case 77: |
||
| 2443 | #line 571 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2444 | { /* added Nov 2000 */ |
||
| 2445 | vhdl = (vhdl_t *) calloc (1, sizeof (vhdl_t)); |
||
| 2446 | if (vhdl) |
||
| 2447 | { |
||
| 2448 | vhdl->basetype = "natural"; |
||
| 2449 | vhdl->is_vector = 0; /* not known for sure yet */ |
||
| 2450 | vhdl->is_downto = 0; |
||
| 2451 | vhdl->expr = NULL; |
||
| 2452 | vhdl->default_expr = |
||
| 2453 | (yyvsp[0].exp); /* added default assignment expression */ |
||
| 2454 | create_pins_or_signals (); |
||
| 2455 | } |
||
| 2456 | } |
||
| 2457 | #line 2469 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2458 | break; |
||
| 2459 | |||
| 2460 | case 78: |
||
| 2461 | #line 582 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2462 | { /* added Nov 2000 */ |
||
| 2463 | vhdl = (vhdl_t *) calloc (1, sizeof (vhdl_t)); |
||
| 2464 | if (vhdl) |
||
| 2465 | { |
||
| 2466 | vhdl->basetype = "natural range"; |
||
| 2467 | vhdl->decl_expr = (yyvsp[-1].exp); |
||
| 2468 | vhdl->is_vector = 0; /* not known for sure yet */ |
||
| 2469 | vhdl->is_downto = 0; |
||
| 2470 | vhdl->expr = (yyvsp[-1].exp); |
||
| 2471 | vhdl->default_expr = |
||
| 2472 | (yyvsp[0].exp); /* added default assignment expression */ |
||
| 2473 | create_pins_or_signals (); |
||
| 2474 | } |
||
| 2475 | } |
||
| 2476 | #line 2486 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2477 | break; |
||
| 2478 | |||
| 2479 | case 79: |
||
| 2480 | #line 594 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2481 | { /* added May 2001 */ |
||
| 2482 | vhdl = (vhdl_t *) calloc (1, sizeof (vhdl_t)); |
||
| 2483 | if (vhdl) |
||
| 2484 | { |
||
| 2485 | vhdl->basetype = "boolean"; |
||
| 2486 | vhdl->is_vector = 0; /* not known for sure yet */ |
||
| 2487 | vhdl->is_downto = 0; |
||
| 2488 | vhdl->expr = NULL; |
||
| 2489 | vhdl->default_expr = |
||
| 2490 | (yyvsp[0].exp); /* added default assignment expression */ |
||
| 2491 | create_pins_or_signals (); |
||
| 2492 | } |
||
| 2493 | } |
||
| 2494 | #line 2502 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2495 | break; |
||
| 2496 | |||
| 2497 | case 80: |
||
| 2498 | #line 606 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2499 | { |
||
| 2500 | (yyval.exp) = (yyvsp[0].exp); /* printf("found default assign\n");*/ |
||
| 2501 | } |
||
| 2502 | #line 2508 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2503 | break; |
||
| 2504 | |||
| 2505 | case 81: |
||
| 2506 | #line 607 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2507 | { |
||
| 2508 | (yyval.exp) = NULL; |
||
| 2509 | } |
||
| 2510 | #line 2514 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2511 | break; |
||
| 2512 | |||
| 2513 | case 84: |
||
| 2514 | #line 618 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2515 | { |
||
| 2516 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2517 | } |
||
| 2518 | #line 2522 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2519 | break; |
||
| 2520 | |||
| 2521 | case 85: |
||
| 2522 | #line 621 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2523 | { |
||
| 2524 | (yyval.exp) = compile_string ((yyvsp[0].string)); |
||
| 2525 | } |
||
| 2526 | #line 2530 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2527 | break; |
||
| 2528 | |||
| 2529 | case 86: |
||
| 2530 | #line 625 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2531 | { |
||
| 2532 | (yyval.exp) = compile_char ((yyvsp[-1].string)[0]); |
||
| 2533 | } |
||
| 2534 | #line 2538 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2535 | break; |
||
| 2536 | |||
| 2537 | case 87: |
||
| 2538 | #line 630 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2539 | { |
||
| 2540 | (yyval.exp) = compile_expression (TO, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2541 | } |
||
| 2542 | #line 2547 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2543 | break; |
||
| 2544 | |||
| 2545 | case 88: |
||
| 2546 | #line 634 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2547 | { |
||
| 2548 | (yyval.exp) = compile_expression (DOWNTO, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2549 | } |
||
| 2550 | #line 2555 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2551 | break; |
||
| 2552 | |||
| 2553 | case 89: |
||
| 2554 | #line 643 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2555 | { |
||
| 2556 | (yyval.exp) = compile_expression ('(', (yyvsp[-1].exp), NULL); |
||
| 2557 | } |
||
| 2558 | #line 2563 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2559 | break; |
||
| 2560 | |||
| 2561 | case 90: |
||
| 2562 | #line 647 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2563 | { |
||
| 2564 | (yyval.exp) = compile_expression ('~', (yyvsp[0].exp), NULL); |
||
| 2565 | } |
||
| 2566 | #line 2571 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2567 | break; |
||
| 2568 | |||
| 2569 | case 91: |
||
| 2570 | #line 651 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2571 | { |
||
| 2572 | (yyval.exp) = compile_expression (UMINUS, (yyvsp[0].exp), NULL); |
||
| 2573 | } |
||
| 2574 | #line 2579 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2575 | break; |
||
| 2576 | |||
| 2577 | case 92: |
||
| 2578 | #line 655 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2579 | { |
||
| 2580 | int t; |
||
| 2581 | convert_num ((yyvsp[0].string), &t); |
||
| 2582 | (yyval.exp) = compile_constant_string (t, (yyvsp[0].string)); |
||
| 2583 | } |
||
| 2584 | #line 2588 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2585 | break; |
||
| 2586 | |||
| 2587 | case 93: |
||
| 2588 | #line 660 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2589 | { |
||
| 2590 | (yyval.exp) = compile_reference ((yyvsp[0].string)); |
||
| 2591 | } |
||
| 2592 | #line 2596 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2593 | break; |
||
| 2594 | |||
| 2595 | case 94: |
||
| 2596 | #line 663 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2597 | { |
||
| 2598 | (yyval.exp) = compile_constant_string (1, "true"); /* should really respect |
||
| 2599 | boolean type */ |
||
| 2600 | } |
||
| 2601 | #line 2604 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2602 | break; |
||
| 2603 | |||
| 2604 | case 95: |
||
| 2605 | #line 666 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2606 | { |
||
| 2607 | (yyval.exp) = compile_constant_string (0, "false"); |
||
| 2608 | } |
||
| 2609 | #line 2612 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2610 | break; |
||
| 2611 | |||
| 2612 | case 96: |
||
| 2613 | #line 672 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2614 | { |
||
| 2615 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2616 | } |
||
| 2617 | #line 2620 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2618 | break; |
||
| 2619 | |||
| 2620 | case 97: |
||
| 2621 | #line 676 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2622 | { |
||
| 2623 | (yyval.exp) = compile_expression ('*', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2624 | } |
||
| 2625 | #line 2628 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2626 | break; |
||
| 2627 | |||
| 2628 | case 98: |
||
| 2629 | #line 680 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2630 | { |
||
| 2631 | (yyval.exp) = compile_expression ('/', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2632 | } |
||
| 2633 | #line 2636 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2634 | break; |
||
| 2635 | |||
| 2636 | case 99: |
||
| 2637 | #line 684 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2638 | { |
||
| 2639 | (yyval.exp) = compile_expression ('%', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2640 | } |
||
| 2641 | #line 2644 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2642 | break; |
||
| 2643 | |||
| 2644 | case 100: |
||
| 2645 | #line 687 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2646 | { |
||
| 2647 | (yyval.exp) = compile_expression (TO_POW, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2648 | } |
||
| 2649 | #line 2652 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2650 | break; |
||
| 2651 | |||
| 2652 | case 101: |
||
| 2653 | #line 695 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2654 | { |
||
| 2655 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2656 | } |
||
| 2657 | #line 2660 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2658 | break; |
||
| 2659 | |||
| 2660 | case 102: |
||
| 2661 | #line 699 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2662 | { |
||
| 2663 | (yyval.exp) = compile_expression ('+', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2664 | } |
||
| 2665 | #line 2668 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2666 | break; |
||
| 2667 | |||
| 2668 | case 103: |
||
| 2669 | #line 703 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2670 | { |
||
| 2671 | (yyval.exp) = compile_expression ('-', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2672 | } |
||
| 2673 | #line 2676 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2674 | break; |
||
| 2675 | |||
| 2676 | case 104: |
||
| 2677 | #line 709 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2678 | { |
||
| 2679 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2680 | } |
||
| 2681 | #line 2684 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2682 | break; |
||
| 2683 | |||
| 2684 | case 105: |
||
| 2685 | #line 713 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2686 | { |
||
| 2687 | (yyval.exp) = compile_expression (SHL, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2688 | } |
||
| 2689 | #line 2692 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2690 | break; |
||
| 2691 | |||
| 2692 | case 106: |
||
| 2693 | #line 717 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2694 | { |
||
| 2695 | (yyval.exp) = compile_expression (SHR, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2696 | } |
||
| 2697 | #line 2700 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2698 | break; |
||
| 2699 | |||
| 2700 | case 107: |
||
| 2701 | #line 724 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2702 | { |
||
| 2703 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2704 | } |
||
| 2705 | #line 2708 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2706 | break; |
||
| 2707 | |||
| 2708 | case 108: |
||
| 2709 | #line 728 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2710 | { |
||
| 2711 | (yyval.exp) = compile_expression ('>', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2712 | } |
||
| 2713 | #line 2716 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2714 | break; |
||
| 2715 | |||
| 2716 | case 109: |
||
| 2717 | #line 732 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2718 | { |
||
| 2719 | (yyval.exp) = compile_expression ('<', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2720 | } |
||
| 2721 | #line 2724 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2722 | break; |
||
| 2723 | |||
| 2724 | case 110: |
||
| 2725 | #line 739 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2726 | { |
||
| 2727 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2728 | } |
||
| 2729 | #line 2732 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2730 | break; |
||
| 2731 | |||
| 2732 | case 111: |
||
| 2733 | #line 743 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2734 | { |
||
| 2735 | (yyval.exp) = compile_expression (EQ_EQ, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2736 | } |
||
| 2737 | #line 2740 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2738 | break; |
||
| 2739 | |||
| 2740 | case 112: |
||
| 2741 | #line 747 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2742 | { |
||
| 2743 | (yyval.exp) = compile_expression (N_EQ, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2744 | } |
||
| 2745 | #line 2748 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2746 | break; |
||
| 2747 | |||
| 2748 | case 113: |
||
| 2749 | #line 754 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2750 | { |
||
| 2751 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2752 | } |
||
| 2753 | #line 2756 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2754 | break; |
||
| 2755 | |||
| 2756 | case 114: |
||
| 2757 | #line 758 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2758 | { |
||
| 2759 | (yyval.exp) = compile_expression ('&', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2760 | } |
||
| 2761 | #line 2764 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2762 | break; |
||
| 2763 | |||
| 2764 | case 115: |
||
| 2765 | #line 765 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2766 | { |
||
| 2767 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2768 | } |
||
| 2769 | #line 2772 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2770 | break; |
||
| 2771 | |||
| 2772 | case 116: |
||
| 2773 | #line 769 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2774 | { |
||
| 2775 | (yyval.exp) = compile_expression ('^', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2776 | } |
||
| 2777 | #line 2780 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2778 | break; |
||
| 2779 | |||
| 2780 | case 117: |
||
| 2781 | #line 776 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2782 | { |
||
| 2783 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2784 | } |
||
| 2785 | #line 2788 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2786 | break; |
||
| 2787 | |||
| 2788 | case 118: |
||
| 2789 | #line 780 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2790 | { |
||
| 2791 | (yyval.exp) = compile_expression ('|', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2792 | } |
||
| 2793 | #line 2796 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2794 | break; |
||
| 2795 | |||
| 2796 | case 119: |
||
| 2797 | #line 787 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2798 | { |
||
| 2799 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2800 | } |
||
| 2801 | #line 2804 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2802 | break; |
||
| 2803 | |||
| 2804 | case 120: |
||
| 2805 | #line 791 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2806 | { |
||
| 2807 | (yyval.exp) = compile_expression (LOG_AND, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2808 | } |
||
| 2809 | #line 2812 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2810 | break; |
||
| 2811 | |||
| 2812 | case 121: |
||
| 2813 | #line 797 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2814 | { |
||
| 2815 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2816 | } |
||
| 2817 | #line 2820 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2818 | break; |
||
| 2819 | |||
| 2820 | case 122: |
||
| 2821 | #line 801 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2822 | { |
||
| 2823 | (yyval.exp) = compile_expression (LOG_OR, (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2824 | } |
||
| 2825 | #line 2828 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2826 | break; |
||
| 2827 | |||
| 2828 | case 123: |
||
| 2829 | #line 808 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2830 | { |
||
| 2831 | (yyval.exp) = compile_expression ('?', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2832 | } |
||
| 2833 | #line 2836 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2834 | break; |
||
| 2835 | |||
| 2836 | case 124: |
||
| 2837 | #line 815 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2838 | { /* change from cond_expr on rhs */ |
||
| 2839 | (yyval.exp) = compile_expression (':', (yyvsp[-2].exp), (yyvsp[0].exp)); |
||
| 2840 | } |
||
| 2841 | #line 2844 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2842 | break; |
||
| 2843 | |||
| 2844 | case 125: |
||
| 2845 | #line 820 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2846 | { |
||
| 2847 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2848 | } |
||
| 2849 | #line 2852 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2850 | break; |
||
| 2851 | |||
| 2852 | case 126: |
||
| 2853 | #line 824 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2854 | { |
||
| 2855 | (yyval.exp) = (yyvsp[0].exp); |
||
| 2856 | } |
||
| 2857 | #line 2860 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2858 | break; |
||
| 2859 | |||
| 2860 | case 127: |
||
| 2861 | #line 834 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2862 | { |
||
| 2863 | curr_equiv_list = begin_equivalent_pins (); |
||
| 2864 | } |
||
| 2865 | #line 2866 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2866 | break; |
||
| 2867 | |||
| 2868 | case 128: |
||
| 2869 | #line 836 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2870 | { |
||
| 2871 | if (current_chip) |
||
| 2872 | check_equivalent_pins (current_chip, curr_equiv_list); |
||
| 2873 | } |
||
| 2874 | #line 2873 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2875 | break; |
||
| 2876 | |||
| 2877 | case 132: |
||
| 2878 | #line 845 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2879 | { |
||
| 2880 | if (current_chip) |
||
| 2881 | add_equivalent_pin (current_chip, curr_equiv_list, (yyvsp[0].string)); |
||
| 2882 | } |
||
| 2883 | #line 2880 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2884 | break; |
||
| 2885 | |||
| 2886 | case 133: |
||
| 2887 | #line 857 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2888 | { |
||
| 2889 | exit_lex_block (); |
||
| 2890 | free_lex_strings (); |
||
| 2891 | } |
||
| 2892 | #line 2886 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2893 | break; |
||
| 2894 | |||
| 2895 | case 142: |
||
| 2896 | #line 876 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2897 | { |
||
| 2898 | Log ( |
||
| 2899 | LOG_GENERAL, |
||
| 2900 | "(line %d) Using ENTITY declaration for %s : prefer to use COMPONENT\n", |
||
| 2901 | lineno, |
||
| 2902 | current_chip->type); |
||
| 2903 | } |
||
| 2904 | #line 2895 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2905 | break; |
||
| 2906 | |||
| 2907 | case 143: |
||
| 2908 | #line 882 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2909 | { |
||
| 2910 | current_chip = NULL; |
||
| 2911 | } |
||
| 2912 | #line 2902 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2913 | break; |
||
| 2914 | |||
| 2915 | case 144: |
||
| 2916 | #line 888 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2917 | { |
||
| 2918 | current_chip = find_socket (Name, (yyvsp[0].string), Create, &socket_head); |
||
| 2919 | if (current_chip) |
||
| 2920 | { |
||
| 2921 | current_chip->is_template = 0; |
||
| 2922 | current_chip->parent_template_ref = NULL; |
||
| 2923 | current_chip->route_flags = 0; |
||
| 2924 | |||
| 2925 | set_socket (current_chip, Type, (yyvsp[0].string)); |
||
| 2926 | if (ISNULLSTR (current_chip->identifier)) |
||
| 2927 | set_socket (current_chip, Ident, (yyvsp[0].string)); |
||
| 2928 | if (ISNULLSTR (current_chip->type)) |
||
| 2929 | set_socket (current_chip, Type, (yyvsp[0].string)); |
||
| 2930 | generic_context = ¤t_chip->generics; |
||
| 2931 | curr_pin_ident[0] = |
||
| 2932 | 0; /* use the signal name instead if this string is empty */ |
||
| 2933 | } |
||
| 2934 | } |
||
| 2935 | #line 2924 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2936 | break; |
||
| 2937 | |||
| 2938 | case 147: |
||
| 2939 | #line 911 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2940 | { |
||
| 2941 | if (current_chip) |
||
| 2942 | generic_context = ¤t_chip->generics; |
||
| 2943 | } |
||
| 2944 | #line 2931 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2945 | break; |
||
| 2946 | |||
| 2947 | case 155: |
||
| 2948 | #line 938 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2949 | { |
||
| 2950 | if (current_chip) |
||
| 2951 | create_nodes_from_refs (current_chip, 0); |
||
| 2952 | } |
||
| 2953 | #line 2938 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2954 | break; |
||
| 2955 | |||
| 2956 | case 158: |
||
| 2957 | #line 948 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2958 | { |
||
| 2959 | char *s = make_string ((yyvsp[0].string), &y_first, &y_last); |
||
| 2960 | if (current_chip) |
||
| 2961 | { |
||
| 2962 | curr_pin_dir = NONE; /* default bidirectional */ |
||
| 2963 | if (current_chip->is_template == 1 || |
||
| 2964 | (ISNULLSTR (s) && id_count == 0)) /* the null strings tell acfread |
||
| 2965 | that the pin exists and */ |
||
| 2966 | current_list = &routed_list; /* available for routing */ |
||
| 2967 | else |
||
| 2968 | current_list = &unrouted_list; |
||
| 2969 | id_count++; |
||
| 2970 | } |
||
| 2971 | } |
||
| 2972 | #line 2956 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2973 | break; |
||
| 2974 | |||
| 2975 | case 170: |
||
| 2976 | #line 997 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2977 | { |
||
| 2978 | Log ( |
||
| 2979 | LOG_GENERAL, |
||
| 2980 | "-- (line %d) package %s being read\n", |
||
| 2981 | lineno, |
||
| 2982 | (yyvsp[0].string)); |
||
| 2983 | } |
||
| 2984 | #line 2962 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2985 | break; |
||
| 2986 | |||
| 2987 | case 178: |
||
| 2988 | #line 1019 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2989 | { |
||
| 2990 | if (current_chip) |
||
| 2991 | create_nodes_from_refs (current_chip, 0); |
||
| 2992 | current_chip = NULL; |
||
| 2993 | } |
||
| 2994 | #line 2970 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 2995 | break; |
||
| 2996 | |||
| 2997 | case 179: |
||
| 2998 | #line 1023 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 2999 | { |
||
| 3000 | current_chip = find_socket (Name, (yyvsp[0].string), Create, &template_head); |
||
| 3001 | if (current_chip) |
||
| 3002 | { |
||
| 3003 | current_chip->is_template = 1; /* components look like templates */ |
||
| 3004 | current_chip->parent_template_ref = NULL; |
||
| 3005 | current_chip->route_flags = 0; |
||
| 3006 | ensure_socket_ident (current_chip); |
||
| 3007 | set_socket (current_chip, Type, (yyvsp[0].string)); /* socket name is |
||
| 3008 | also a type */ |
||
| 3009 | generic_context = ¤t_chip->generics; |
||
| 3010 | } |
||
| 3011 | } |
||
| 3012 | #line 2987 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3013 | break; |
||
| 3014 | |||
| 3015 | case 180: |
||
| 3016 | #line 1041 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3017 | { |
||
| 3018 | generic_context = &global_generics; |
||
| 3019 | } |
||
| 3020 | #line 2993 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3021 | break; |
||
| 3022 | |||
| 3023 | case 182: |
||
| 3024 | #line 1049 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3025 | { |
||
| 3026 | id_count = 0; |
||
| 3027 | y_first = NULL; |
||
| 3028 | y_last = NULL; |
||
| 3029 | } |
||
| 3030 | #line 2999 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3031 | break; |
||
| 3032 | |||
| 3033 | case 186: |
||
| 3034 | #line 1065 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3035 | { |
||
| 3036 | /* y_first is defined as null so we do not create any |
||
| 3037 | |||
| 3038 | pins (as they do not belong to any particular chip) */ |
||
| 3039 | #if defined DEBUG_EXPRESSION |
||
| 3040 | printf ("making sig name %s\n", (yyvsp[0].string)); |
||
| 3041 | #endif |
||
| 3042 | make_string ((yyvsp[0].string), &y1_first, &y1_last); |
||
| 3043 | id_count++; |
||
| 3044 | } |
||
| 3045 | #line 3014 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3046 | break; |
||
| 3047 | |||
| 3048 | case 187: |
||
| 3049 | #line 1085 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3050 | { |
||
| 3051 | Log ( |
||
| 3052 | LOG_GENERAL, |
||
| 3053 | "-- (line %d) for %s: %s use entity %s.%s(%s);\n", |
||
| 3054 | lineno, |
||
| 3055 | (yyvsp[-11].string), |
||
| 3056 | (yyvsp[-9].string), |
||
| 3057 | (yyvsp[-6].string), |
||
| 3058 | (yyvsp[-4].string), |
||
| 3059 | (yyvsp[-2].string)); |
||
| 3060 | } |
||
| 3061 | #line 3020 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3062 | break; |
||
| 3063 | |||
| 3064 | case 193: |
||
| 3065 | #line 1113 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3066 | { |
||
| 3067 | if (current_comp && current_chip) |
||
| 3068 | { /* scan for unused nodes */ |
||
| 3069 | current_comp_node = current_comp->nodes; |
||
| 3070 | while (current_comp_node) |
||
| 3071 | { |
||
| 3072 | if (current_comp_node->in_use == 0) |
||
| 3073 | { |
||
| 3074 | /* hookup to an unroutd signal */ |
||
| 3075 | define_pin ( |
||
| 3076 | &unrouted_list, |
||
| 3077 | current_chip, |
||
| 3078 | current_comp_node->name, |
||
| 3079 | current_comp_node->pindir, |
||
| 3080 | current_comp_node->pin_group, |
||
| 3081 | current_comp_node->identifier, |
||
| 3082 | current_comp_node->vhdltype, |
||
| 3083 | NULL); |
||
| 3084 | } |
||
| 3085 | |||
| 3086 | current_comp_node = current_comp_node->sktnext; |
||
| 3087 | } |
||
| 3088 | } |
||
| 3089 | current_chip = NULL; |
||
| 3090 | } |
||
| 3091 | #line 3045 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3092 | break; |
||
| 3093 | |||
| 3094 | case 194: |
||
| 3095 | #line 1135 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3096 | { |
||
| 3097 | current_comp = find_socket (Type, (yyvsp[0].string), Search, &template_head); |
||
| 3098 | if (!current_comp) |
||
| 3099 | { |
||
| 3100 | Log ( |
||
| 3101 | LOG_ERROR, |
||
| 3102 | "-- (line %d) No component of type %s can be found\n", |
||
| 3103 | lineno, |
||
| 3104 | (yyvsp[0].string)); |
||
| 3105 | current_chip = NULL; |
||
| 3106 | } |
||
| 3107 | else |
||
| 3108 | { |
||
| 3109 | current_chip = |
||
| 3110 | find_socket (Ident, (yyvsp[-2].string), Create, &socket_head); |
||
| 3111 | if (current_chip) |
||
| 3112 | { |
||
| 3113 | /* setup the current chip */ |
||
| 3114 | current_chip->is_template = 0; |
||
| 3115 | current_chip->parent_template_ref = NULL; |
||
| 3116 | current_chip->route_flags = 0; |
||
| 3117 | set_socket (current_chip, Name, ""); /* socket has no name */ |
||
| 3118 | |||
| 3119 | set_socket (current_chip, Type, (yyvsp[0].string)); /* socket |
||
| 3120 | has a |
||
| 3121 | type */ |
||
| 3122 | current_comp_node = current_comp->nodes; |
||
| 3123 | while (current_comp_node) |
||
| 3124 | { |
||
| 3125 | current_comp_node->in_use = |
||
| 3126 | 0; /* clear in use/duplicate use flags */ |
||
| 3127 | current_comp_node = current_comp_node->sktnext; |
||
| 3128 | } |
||
| 3129 | current_comp_node = current_comp->nodes; |
||
| 3130 | |||
| 3131 | curr_comp_port_map = UNKNOWN; |
||
| 3132 | } |
||
| 3133 | } |
||
| 3134 | } |
||
| 3135 | #line 3078 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3136 | break; |
||
| 3137 | |||
| 3138 | case 195: |
||
| 3139 | #line 1165 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3140 | { |
||
| 3141 | if (current_chip) |
||
| 3142 | { |
||
| 3143 | generic_context = ¤t_chip->generics; |
||
| 3144 | } |
||
| 3145 | else |
||
| 3146 | { |
||
| 3147 | generic_context = NULL; |
||
| 3148 | } |
||
| 3149 | } |
||
| 3150 | #line 3092 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3151 | break; |
||
| 3152 | |||
| 3153 | case 202: |
||
| 3154 | #line 1187 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3155 | { |
||
| 3156 | info->name = (yyvsp[-2].string); |
||
| 3157 | /* info->valuename = NULL; */ |
||
| 3158 | info->typename = NULL; |
||
| 3159 | info->expr = (yyvsp[0].exp); |
||
| 3160 | info->valid = 0; |
||
| 3161 | set_generic_value (generic_context, info); |
||
| 3162 | } |
||
| 3163 | #line 3105 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3164 | break; |
||
| 3165 | |||
| 3166 | case 205: |
||
| 3167 | #line 1206 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3168 | { |
||
| 3169 | if (current_chip && current_comp) |
||
| 3170 | { |
||
| 3171 | if (curr_comp_port_map == IMPLICIT) |
||
| 3172 | Log ( |
||
| 3173 | LOG_ERROR, |
||
| 3174 | "-- (line %d) Attempting use of mixed explicit and " |
||
| 3175 | "implicit port maps\n", |
||
| 3176 | lineno); |
||
| 3177 | else |
||
| 3178 | { |
||
| 3179 | curr_comp_port_map = EXPLICIT; |
||
| 3180 | current_comp_node = |
||
| 3181 | find_node (current_comp, Name, (yyvsp[-3].string), Search); |
||
| 3182 | if (current_comp_node) |
||
| 3183 | { |
||
| 3184 | current_comp_node->lhs_expr = |
||
| 3185 | (yyvsp[-2].exp); /* try2*/ |
||
| 3186 | if (current_comp_node->in_use == 0) |
||
| 3187 | { |
||
| 3188 | current_comp_node->in_use = 1; |
||
| 3189 | define_pin ( |
||
| 3190 | &unrouted_list, |
||
| 3191 | current_chip, |
||
| 3192 | current_comp_node->name, |
||
| 3193 | current_comp_node->pindir, |
||
| 3194 | current_comp_node->pin_group, |
||
| 3195 | current_comp_node->identifier, |
||
| 3196 | current_comp_node->vhdltype, |
||
| 3197 | current_comp_node->lhs_expr); |
||
| 3198 | rename_unrouted_pin_socket ( |
||
| 3199 | current_chip, |
||
| 3200 | (yyvsp[-3].string), |
||
| 3201 | rename_pin_string, |
||
| 3202 | vhdl); |
||
| 3203 | } |
||
| 3204 | else |
||
| 3205 | Log ( |
||
| 3206 | LOG_ERROR, |
||
| 3207 | "# (line %d) Error, port '%s.%s' already " |
||
| 3208 | "used\n", |
||
| 3209 | lineno, |
||
| 3210 | current_chip->identifier, |
||
| 3211 | (yyvsp[-3].string)); |
||
| 3212 | } |
||
| 3213 | else |
||
| 3214 | Log ( |
||
| 3215 | LOG_ERROR, |
||
| 3216 | "# (line %d) Error : cannot find port '%s.%s' \n", |
||
| 3217 | lineno, |
||
| 3218 | current_chip->identifier, |
||
| 3219 | (yyvsp[-3].string)); |
||
| 3220 | } |
||
| 3221 | } |
||
| 3222 | } |
||
| 3223 | #line 3147 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3224 | break; |
||
| 3225 | |||
| 3226 | case 206: |
||
| 3227 | #line 1243 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3228 | { |
||
| 3229 | if (current_chip && current_comp) |
||
| 3230 | { |
||
| 3231 | if (curr_comp_port_map == IMPLICIT) |
||
| 3232 | Log ( |
||
| 3233 | LOG_ERROR, |
||
| 3234 | "-- (line %d) Attempting use of mixed explicit and " |
||
| 3235 | "implicit port maps\n", |
||
| 3236 | lineno); |
||
| 3237 | else |
||
| 3238 | { |
||
| 3239 | curr_comp_port_map = EXPLICIT; |
||
| 3240 | current_comp_node = |
||
| 3241 | find_node (current_comp, Name, (yyvsp[-3].string), Search); |
||
| 3242 | |||
| 3243 | if (current_comp_node) |
||
| 3244 | { |
||
| 3245 | current_comp_node->lhs_expr = |
||
| 3246 | (yyvsp[-2].exp); /* try2*/ |
||
| 3247 | if (current_comp_node->in_use == 0) |
||
| 3248 | { |
||
| 3249 | current_comp_node->in_use = 1; |
||
| 3250 | } |
||
| 3251 | else |
||
| 3252 | Log ( |
||
| 3253 | LOG_ERROR, |
||
| 3254 | "# (line %d) Error, port '%s.%s' already " |
||
| 3255 | "used\n", |
||
| 3256 | lineno, |
||
| 3257 | current_chip->identifier, |
||
| 3258 | (yyvsp[-3].string)); |
||
| 3259 | } |
||
| 3260 | else |
||
| 3261 | Log ( |
||
| 3262 | LOG_ERROR, |
||
| 3263 | "# (line %d) Error : cannot find port '%s.%s' \n", |
||
| 3264 | lineno, |
||
| 3265 | current_chip->identifier, |
||
| 3266 | (yyvsp[-3].string)); |
||
| 3267 | } |
||
| 3268 | } |
||
| 3269 | } |
||
| 3270 | #line 3181 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3271 | break; |
||
| 3272 | |||
| 3273 | case 207: |
||
| 3274 | #line 1272 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3275 | { |
||
| 3276 | if (current_chip && current_comp) |
||
| 3277 | { |
||
| 3278 | if (curr_comp_port_map == EXPLICIT) |
||
| 3279 | Log ( |
||
| 3280 | LOG_ERROR, |
||
| 3281 | "-- (line %d) Attempting use of mixed explicit and " |
||
| 3282 | "implicit port maps\n", |
||
| 3283 | lineno); |
||
| 3284 | else |
||
| 3285 | { |
||
| 3286 | curr_comp_port_map = IMPLICIT; |
||
| 3287 | if (current_comp_node) |
||
| 3288 | { |
||
| 3289 | current_comp_node->in_use = 1; |
||
| 3290 | |||
| 3291 | current_comp_node->lhs_expr = (yyvsp[0].exp); /* try2*/ |
||
| 3292 | define_pin ( |
||
| 3293 | &unrouted_list, |
||
| 3294 | current_chip, |
||
| 3295 | current_comp_node->name, |
||
| 3296 | current_comp_node->pindir, |
||
| 3297 | current_comp_node->pin_group, |
||
| 3298 | current_comp_node->identifier, |
||
| 3299 | current_comp_node->vhdltype, |
||
| 3300 | current_comp_node->lhs_expr); |
||
| 3301 | |||
| 3302 | rename_unrouted_pin_socket ( |
||
| 3303 | current_chip, |
||
| 3304 | current_comp_node->name, |
||
| 3305 | rename_pin_string, |
||
| 3306 | vhdl); |
||
| 3307 | if (vhdl != default_vhdl_datatype) |
||
| 3308 | { |
||
| 3309 | free (vhdl); |
||
| 3310 | } |
||
| 3311 | current_comp_node = current_comp_node->sktnext; |
||
| 3312 | } |
||
| 3313 | else |
||
| 3314 | Log ( |
||
| 3315 | LOG_ERROR, |
||
| 3316 | "-- (line %d) Run out of pins while attempting " |
||
| 3317 | "implicit port map with '%s'\n", |
||
| 3318 | lineno, |
||
| 3319 | rename_pin_string); |
||
| 3320 | } |
||
| 3321 | } |
||
| 3322 | } |
||
| 3323 | #line 3222 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3324 | break; |
||
| 3325 | |||
| 3326 | case 208: |
||
| 3327 | #line 1308 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3328 | { /* tag open ports */ |
||
| 3329 | if (current_chip && current_comp) |
||
| 3330 | { |
||
| 3331 | if (curr_comp_port_map == EXPLICIT) |
||
| 3332 | Log ( |
||
| 3333 | LOG_ERROR, |
||
| 3334 | "-- (line %d) Attempting use of mixed explicit and " |
||
| 3335 | "implicit port maps\n", |
||
| 3336 | lineno); |
||
| 3337 | else |
||
| 3338 | { |
||
| 3339 | curr_comp_port_map = IMPLICIT; |
||
| 3340 | if (current_comp_node) |
||
| 3341 | { |
||
| 3342 | current_comp_node->in_use = 1; |
||
| 3343 | current_comp_node->lhs_expr = NULL; /* try2*/ |
||
| 3344 | |||
| 3345 | current_comp_node = current_comp_node->sktnext; |
||
| 3346 | } |
||
| 3347 | else |
||
| 3348 | Log ( |
||
| 3349 | LOG_ERROR, |
||
| 3350 | "-- (line %d) Run out of pins while attempting " |
||
| 3351 | "implicit port map with '%s'\n", |
||
| 3352 | lineno, |
||
| 3353 | rename_pin_string); |
||
| 3354 | } |
||
| 3355 | } |
||
| 3356 | } |
||
| 3357 | #line 3249 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3358 | break; |
||
| 3359 | |||
| 3360 | case 209: |
||
| 3361 | #line 1336 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3362 | { /* vhdl vector types */ |
||
| 3363 | (yyval.exp) = (yyvsp[-1].exp); |
||
| 3364 | printf ("Seen a slice of a bus ..\n"); |
||
| 3365 | } |
||
| 3366 | #line 3258 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3367 | break; |
||
| 3368 | |||
| 3369 | case 210: |
||
| 3370 | #line 1340 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3371 | { |
||
| 3372 | (yyval.exp) = NULL; |
||
| 3373 | } |
||
| 3374 | #line 3266 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3375 | break; |
||
| 3376 | |||
| 3377 | case 211: |
||
| 3378 | #line 1349 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3379 | { |
||
| 3380 | /* try using Alias on routed list to represent |
||
| 3381 | signal assignment */ |
||
| 3382 | Log ( |
||
| 3383 | LOG_GENERAL, |
||
| 3384 | "-- (line %d) Seen concurrent assignment %s\n", |
||
| 3385 | lineno, |
||
| 3386 | (yyvsp[-3].string)); |
||
| 3387 | join_context = &unrouted_list; |
||
| 3388 | top_net = find_net (join_context, Ident, (yyvsp[-3].string), Search); |
||
| 3389 | if (!top_net) /* Net cannot be created here , must exist already */ |
||
| 3390 | { |
||
| 3391 | Log ( |
||
| 3392 | LOG_ERROR, |
||
| 3393 | "# (line %d) ERROR : Cannot locate net '%s'\n", |
||
| 3394 | lineno, |
||
| 3395 | (yyvsp[-1].string)); |
||
| 3396 | } |
||
| 3397 | else |
||
| 3398 | { |
||
| 3399 | if (top_net->how_joined != NotJoined) |
||
| 3400 | { |
||
| 3401 | /* trap attempts to jumper extend a non-jumper net */ |
||
| 3402 | Log ( |
||
| 3403 | LOG_ERROR, |
||
| 3404 | "# (line %d) ERROR : Net '%s' already connected, cannot " |
||
| 3405 | "connect to another\n", |
||
| 3406 | lineno, |
||
| 3407 | top_net->identifier); |
||
| 3408 | } |
||
| 3409 | printf (" additional net found '%s'\n", (yyvsp[-1].string)); |
||
| 3410 | current_net = |
||
| 3411 | find_net (join_context, Ident, (yyvsp[-1].string), Search); |
||
| 3412 | if (!current_net) |
||
| 3413 | { |
||
| 3414 | Log ( |
||
| 3415 | LOG_ERROR, |
||
| 3416 | "# (line %d) ERROR : Cannot locate net '%s'\n", |
||
| 3417 | lineno, |
||
| 3418 | (yyvsp[-1].string)); |
||
| 3419 | } |
||
| 3420 | else |
||
| 3421 | { |
||
| 3422 | if (current_net == top_net) |
||
| 3423 | { |
||
| 3424 | Log ( |
||
| 3425 | LOG_ERROR, |
||
| 3426 | "# (line %d) ERROR : Cannot assign '%s' to " |
||
| 3427 | "itself\n", |
||
| 3428 | lineno, |
||
| 3429 | (yyvsp[-3].string)); |
||
| 3430 | } |
||
| 3431 | else |
||
| 3432 | { |
||
| 3433 | /* mark this as a net referred to by net name */ |
||
| 3434 | top_net->vhdl_connect_net = current_net; |
||
| 3435 | } |
||
| 3436 | } |
||
| 3437 | }; |
||
| 3438 | } |
||
| 3439 | #line 3310 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3440 | break; |
||
| 3441 | |||
| 3442 | case 215: |
||
| 3443 | #line 1398 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3444 | { |
||
| 3445 | Log (LOG_GENERAL, "-- (line %d) library %s;\n", lineno, (yyvsp[0].string)); |
||
| 3446 | } |
||
| 3447 | #line 3316 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3448 | break; |
||
| 3449 | |||
| 3450 | case 219: |
||
| 3451 | #line 1410 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3452 | { |
||
| 3453 | Log ( |
||
| 3454 | LOG_GENERAL, |
||
| 3455 | "-- use %s.%s.%s;\n", |
||
| 3456 | (yyvsp[-4].string), |
||
| 3457 | (yyvsp[-2].string), |
||
| 3458 | (yyvsp[0].string)); |
||
| 3459 | } |
||
| 3460 | #line 3322 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3461 | break; |
||
| 3462 | |||
| 3463 | case 220: |
||
| 3464 | #line 1411 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3465 | { |
||
| 3466 | Log (LOG_GENERAL, "-- use %s.%s;\n", (yyvsp[-2].string), (yyvsp[0].string)); |
||
| 3467 | } |
||
| 3468 | #line 3328 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3469 | break; |
||
| 3470 | |||
| 3471 | case 221: |
||
| 3472 | #line 1415 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3473 | { |
||
| 3474 | (yyval.string) = "All"; |
||
| 3475 | } |
||
| 3476 | #line 3334 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3477 | break; |
||
| 3478 | |||
| 3479 | case 222: |
||
| 3480 | #line 1416 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3481 | { |
||
| 3482 | (yyval.string) = (yyvsp[0].string); |
||
| 3483 | } |
||
| 3484 | #line 3340 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3485 | break; |
||
| 3486 | |||
| 3487 | case 223: |
||
| 3488 | #line 1426 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3489 | { |
||
| 3490 | exit_lex_block (); |
||
| 3491 | free_lex_strings (); |
||
| 3492 | } |
||
| 3493 | #line 3346 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3494 | break; |
||
| 3495 | |||
| 3496 | case 230: |
||
| 3497 | #line 1456 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3498 | { |
||
| 3499 | current_chip = NULL; |
||
| 3500 | } |
||
| 3501 | #line 3352 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3502 | break; |
||
| 3503 | |||
| 3504 | case 231: |
||
| 3505 | #line 1458 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3506 | { |
||
| 3507 | current_chip = NULL; |
||
| 3508 | } |
||
| 3509 | #line 3358 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3510 | break; |
||
| 3511 | |||
| 3512 | case 232: |
||
| 3513 | #line 1462 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3514 | { |
||
| 3515 | if (current_chip) |
||
| 3516 | create_nodes_from_refs (current_chip, 0); |
||
| 3517 | } |
||
| 3518 | #line 3365 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3519 | break; |
||
| 3520 | |||
| 3521 | case 238: |
||
| 3522 | #line 1472 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3523 | { |
||
| 3524 | create_pins_or_signals (); |
||
| 3525 | } |
||
| 3526 | #line 3371 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3527 | break; |
||
| 3528 | |||
| 3529 | case 239: |
||
| 3530 | #line 1474 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3531 | { |
||
| 3532 | vhdl = calloc (1, sizeof (vhdl_t)); |
||
| 3533 | vhdl->is_vector = 1; |
||
| 3534 | vhdl->expr = (yyvsp[-1].exp); |
||
| 3535 | } |
||
| 3536 | #line 3379 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3537 | break; |
||
| 3538 | |||
| 3539 | case 240: |
||
| 3540 | #line 1477 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3541 | { |
||
| 3542 | vhdl = calloc (1, sizeof (vhdl_t)); |
||
| 3543 | vhdl->is_vector = 1; |
||
| 3544 | vhdl->expr = compile_expression (DOWNTO, (yyvsp[-3].exp), (yyvsp[-1].exp)); |
||
| 3545 | } |
||
| 3546 | #line 3387 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3547 | break; |
||
| 3548 | |||
| 3549 | case 241: |
||
| 3550 | #line 1480 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3551 | { |
||
| 3552 | vhdl = calloc (1, sizeof (vhdl_t)); |
||
| 3553 | *vhdl = *default_vhdl_datatype; |
||
| 3554 | } |
||
| 3555 | #line 3393 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3556 | break; |
||
| 3557 | |||
| 3558 | case 246: |
||
| 3559 | #line 1497 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3560 | { |
||
| 3561 | id_count = 0; |
||
| 3562 | y1_first = NULL; |
||
| 3563 | y1_last = NULL; |
||
| 3564 | } |
||
| 3565 | #line 3400 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3566 | break; |
||
| 3567 | |||
| 3568 | case 247: |
||
| 3569 | #line 1499 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3570 | { |
||
| 3571 | if (current_chip) |
||
| 3572 | create_nodes_from_refs (current_chip, 0); |
||
| 3573 | } |
||
| 3574 | #line 3407 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3575 | break; |
||
| 3576 | |||
| 3577 | case 252: |
||
| 3578 | #line 1516 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3579 | { |
||
| 3580 | id_count = 0; |
||
| 3581 | y_first = NULL; |
||
| 3582 | y_last = NULL; |
||
| 3583 | } |
||
| 3584 | #line 3413 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3585 | break; |
||
| 3586 | |||
| 3587 | case 253: |
||
| 3588 | #line 1519 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3589 | { |
||
| 3590 | if (current_chip) |
||
| 3591 | create_nodes_from_refs (current_chip, 0); |
||
| 3592 | } |
||
| 3593 | #line 3420 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3594 | break; |
||
| 3595 | |||
| 3596 | case 258: |
||
| 3597 | #line 1532 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3598 | { |
||
| 3599 | current_comp = find_socket (Type, (yyvsp[-5].string), Search, &template_head); |
||
| 3600 | |||
| 3601 | if (!current_comp) |
||
| 3602 | { |
||
| 3603 | Log ( |
||
| 3604 | LOG_ERROR, |
||
| 3605 | "-- (line %d) No component of type %s can be found : creating an " |
||
| 3606 | "instance\n", |
||
| 3607 | lineno, |
||
| 3608 | (yyvsp[-5].string)); |
||
| 3609 | current_chip = NULL; |
||
| 3610 | } |
||
| 3611 | else |
||
| 3612 | { |
||
| 3613 | current_chip = |
||
| 3614 | find_socket (Ident, (yyvsp[-4].string), Create, &socket_head); |
||
| 3615 | if (current_chip) |
||
| 3616 | { |
||
| 3617 | /* setup the current chip */ |
||
| 3618 | current_chip->template_socket = current_comp; |
||
| 3619 | current_chip->is_template = 0; |
||
| 3620 | current_chip->parent_template_ref = NULL; |
||
| 3621 | current_chip->route_flags = 0; |
||
| 3622 | set_socket (current_chip, Name, ""); /* socket has no name */ |
||
| 3623 | |||
| 3624 | set_socket (current_chip, Type, (yyvsp[-5].string)); /* socket |
||
| 3625 | has a |
||
| 3626 | type */ |
||
| 3627 | current_comp_node = current_comp->nodes; |
||
| 3628 | while (current_comp_node) |
||
| 3629 | { |
||
| 3630 | current_comp_node->in_use = |
||
| 3631 | 0; /* clear in use/duplicate use flags */ |
||
| 3632 | current_comp_node = current_comp_node->sktnext; |
||
| 3633 | } |
||
| 3634 | current_comp_node = current_comp->nodes; |
||
| 3635 | |||
| 3636 | curr_comp_port_map = UNKNOWN; |
||
| 3637 | } |
||
| 3638 | } |
||
| 3639 | } |
||
| 3640 | #line 3454 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3641 | break; |
||
| 3642 | |||
| 3643 | case 263: |
||
| 3644 | #line 1573 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3645 | { |
||
| 3646 | /* strip off the pin_ prefix */ |
||
| 3647 | if (current_comp) |
||
| 3648 | { |
||
| 3649 | current_comp_node = find_node ( |
||
| 3650 | current_comp, Name, (yyvsp[-4].string), Create); /* was 'search' */ |
||
| 3651 | } |
||
| 3652 | |||
| 3653 | if (current_chip && current_comp_node) |
||
| 3654 | { |
||
| 3655 | if (current_comp_node->in_use == 0) |
||
| 3656 | { |
||
| 3657 | current_comp_node->in_use = 1; |
||
| 3658 | current_comp_node->lhs_expr = NULL; |
||
| 3659 | define_pin ( |
||
| 3660 | &unrouted_list, |
||
| 3661 | current_chip, |
||
| 3662 | current_comp_node->name, |
||
| 3663 | current_comp_node->pindir, |
||
| 3664 | current_comp_node->pin_group, |
||
| 3665 | current_comp_node->identifier, |
||
| 3666 | current_comp_node->vhdltype, |
||
| 3667 | current_comp_node->lhs_expr); |
||
| 3668 | rename_unrouted_pin_socket ( |
||
| 3669 | current_chip, (yyvsp[-4].string), rename_pin_string, vhdl); |
||
| 3670 | } |
||
| 3671 | else |
||
| 3672 | Log ( |
||
| 3673 | LOG_ERROR, |
||
| 3674 | "# (line %d) Error, port '%s.%s' already used\n", |
||
| 3675 | lineno, |
||
| 3676 | current_chip->identifier, |
||
| 3677 | (yyvsp[-4].string)); |
||
| 3678 | } |
||
| 3679 | else |
||
| 3680 | { |
||
| 3681 | if (!current_chip) |
||
| 3682 | { |
||
| 3683 | Log ( |
||
| 3684 | LOG_ERROR, |
||
| 3685 | "# (line %d) Error no chip in context for port '%s'\n", |
||
| 3686 | lineno, |
||
| 3687 | (yyvsp[-4].string)); |
||
| 3688 | } |
||
| 3689 | else |
||
| 3690 | { |
||
| 3691 | Log ( |
||
| 3692 | LOG_ERROR, |
||
| 3693 | "# (line %d) Error : cannot find port '%s.%s' \n", |
||
| 3694 | lineno, |
||
| 3695 | current_chip->identifier, |
||
| 3696 | (yyvsp[-4].string)); |
||
| 3697 | } |
||
| 3698 | } |
||
| 3699 | } |
||
| 3700 | #line 3501 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3701 | break; |
||
| 3702 | |||
| 3703 | case 264: |
||
| 3704 | #line 1616 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3705 | { |
||
| 3706 | current_comp_node = find_node (current_comp, Name, (yyvsp[-2].string), Search); |
||
| 3707 | if (current_chip && current_comp_node) |
||
| 3708 | { |
||
| 3709 | if (current_comp_node->in_use == 0) |
||
| 3710 | { |
||
| 3711 | current_comp_node->in_use = 1; |
||
| 3712 | } |
||
| 3713 | else |
||
| 3714 | Log ( |
||
| 3715 | LOG_ERROR, |
||
| 3716 | "# (line %d) Error, port '%s.%s' already used\n", |
||
| 3717 | lineno, |
||
| 3718 | current_chip->identifier, |
||
| 3719 | (yyvsp[-2].string)); |
||
| 3720 | } |
||
| 3721 | else |
||
| 3722 | { |
||
| 3723 | if (!current_chip) |
||
| 3724 | { |
||
| 3725 | Log ( |
||
| 3726 | LOG_ERROR, |
||
| 3727 | "# (line %d) Error no chip in context for port '%s'\n", |
||
| 3728 | lineno, |
||
| 3729 | (yyvsp[-2].string)); |
||
| 3730 | } |
||
| 3731 | else |
||
| 3732 | { |
||
| 3733 | Log ( |
||
| 3734 | LOG_ERROR, |
||
| 3735 | "# (line %d) Error : cannot find port '%s.%s' \n", |
||
| 3736 | lineno, |
||
| 3737 | current_chip->identifier, |
||
| 3738 | (yyvsp[-2].string)); |
||
| 3739 | } |
||
| 3740 | } |
||
| 3741 | } |
||
| 3742 | #line 3534 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3743 | break; |
||
| 3744 | |||
| 3745 | case 265: |
||
| 3746 | #line 1650 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3747 | { |
||
| 3748 | generic_context = &global_generics; |
||
| 3749 | } |
||
| 3750 | #line 3540 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3751 | break; |
||
| 3752 | |||
| 3753 | case 266: |
||
| 3754 | #line 1652 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3755 | { |
||
| 3756 | exit_lex_block (); |
||
| 3757 | free_lex_strings (); |
||
| 3758 | } |
||
| 3759 | #line 3546 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3760 | break; |
||
| 3761 | |||
| 3762 | case 267: |
||
| 3763 | #line 1656 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3764 | { |
||
| 3765 | if (current_chip) |
||
| 3766 | generic_context = ¤t_chip->generics; |
||
| 3767 | } |
||
| 3768 | #line 3553 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3769 | break; |
||
| 3770 | |||
| 3771 | case 274: |
||
| 3772 | #line 1673 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3773 | { |
||
| 3774 | (yyval.integer) = (yyvsp[0].integer); |
||
| 3775 | } |
||
| 3776 | #line 3559 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3777 | break; |
||
| 3778 | |||
| 3779 | case 275: |
||
| 3780 | #line 1674 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3781 | { |
||
| 3782 | (yyval.integer) = INPUT; |
||
| 3783 | } |
||
| 3784 | #line 3565 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3785 | break; |
||
| 3786 | |||
| 3787 | case 279: |
||
| 3788 | #line 1683 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3789 | { |
||
| 3790 | make_string ((yyvsp[0].string), &y_first, &y_last); |
||
| 3791 | } |
||
| 3792 | #line 3571 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3793 | break; |
||
| 3794 | |||
| 3795 | case 280: |
||
| 3796 | #line 1687 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3797 | { |
||
| 3798 | struct str *s; |
||
| 3799 | s = y_first; |
||
| 3800 | while (s) |
||
| 3801 | { |
||
| 3802 | info->name = s->dat; |
||
| 3803 | info->typename = NULL; |
||
| 3804 | info->g_type = IS_INTEGER; |
||
| 3805 | info->expr = copy_expression ( |
||
| 3806 | (yyvsp[0].exp), current_chip); /* ok allocated elsewhere */ |
||
| 3807 | info->valid = 0; |
||
| 3808 | /* generic is tagged for elaboration */ |
||
| 3809 | info->is_component_generic = |
||
| 3810 | current_chip ? current_chip->is_template : 0; |
||
| 3811 | set_generic_value (generic_context, info); |
||
| 3812 | s = s ? s->next : s; /* bizarre gcc 2.95 problem */ |
||
| 3813 | } |
||
| 3814 | free_strings (&y_first, &y_last); |
||
| 3815 | } |
||
| 3816 | #line 3591 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3817 | break; |
||
| 3818 | |||
| 3819 | case 281: |
||
| 3820 | #line 1702 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3821 | { |
||
| 3822 | struct str *s; |
||
| 3823 | s = y_first; |
||
| 3824 | while (s) |
||
| 3825 | { |
||
| 3826 | info->name = s->dat; |
||
| 3827 | info->typename = NULL; |
||
| 3828 | info->g_type = IS_BOOLEAN; |
||
| 3829 | info->expr = copy_expression ( |
||
| 3830 | (yyvsp[0].exp), current_chip); /* ok allocated elsewhere */ |
||
| 3831 | info->valid = 0; |
||
| 3832 | /* generic is tagged for elaboration */ |
||
| 3833 | info->is_component_generic = |
||
| 3834 | current_chip ? current_chip->is_template : 0; |
||
| 3835 | set_generic_value (generic_context, info); |
||
| 3836 | s = s ? s->next : s; /* bizarre gcc 2.95 problem */ |
||
| 3837 | } |
||
| 3838 | free_strings (&y_first, &y_last); |
||
| 3839 | } |
||
| 3840 | #line 3611 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3841 | break; |
||
| 3842 | |||
| 3843 | case 282: |
||
| 3844 | #line 1717 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3845 | { |
||
| 3846 | struct str *s; |
||
| 3847 | s = y_first; |
||
| 3848 | while (s) |
||
| 3849 | { |
||
| 3850 | info->name = s->dat; |
||
| 3851 | info->g_type = (yyvsp[0].exp)->opcode; |
||
| 3852 | info->typename = NULL; |
||
| 3853 | info->expr = copy_expression ((yyvsp[0].exp), current_chip); |
||
| 3854 | info->valid = 0; |
||
| 3855 | info->is_component_generic = |
||
| 3856 | current_chip ? current_chip->is_template : 0; |
||
| 3857 | set_generic_value (generic_context, info); |
||
| 3858 | s = s->next; |
||
| 3859 | } |
||
| 3860 | free_strings (&y_first, &y_last); |
||
| 3861 | } |
||
| 3862 | #line 3631 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3863 | break; |
||
| 3864 | |||
| 3865 | case 283: |
||
| 3866 | #line 1732 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3867 | { |
||
| 3868 | text_buff[0] = '\0'; |
||
| 3869 | } |
||
| 3870 | #line 3637 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3871 | break; |
||
| 3872 | |||
| 3873 | case 284: |
||
| 3874 | #line 1733 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3875 | { |
||
| 3876 | struct str *s; |
||
| 3877 | s = y_first; |
||
| 3878 | while (s) |
||
| 3879 | { |
||
| 3880 | info->name = s->dat; |
||
| 3881 | info->typename = "declaration"; |
||
| 3882 | info->g_type = IS_DECLARATION_DIRECTIVE; |
||
| 3883 | info->expr = compile_string (text_buff); |
||
| 3884 | set_generic_value (generic_context, info); |
||
| 3885 | s = s->next; |
||
| 3886 | } |
||
| 3887 | free_strings (&y_first, &y_last); |
||
| 3888 | } |
||
| 3889 | #line 3656 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3890 | break; |
||
| 3891 | |||
| 3892 | case 285: |
||
| 3893 | #line 1748 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3894 | { |
||
| 3895 | text_buff[0] = '\0'; |
||
| 3896 | } |
||
| 3897 | #line 3662 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3898 | break; |
||
| 3899 | |||
| 3900 | case 286: |
||
| 3901 | #line 1749 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3902 | { |
||
| 3903 | struct str *s; |
||
| 3904 | s = y_first; |
||
| 3905 | while (s) |
||
| 3906 | { |
||
| 3907 | info->name = s->dat; |
||
| 3908 | info->typename = "instance"; |
||
| 3909 | info->g_type = IS_INSTANCE_DIRECTIVE; |
||
| 3910 | info->expr = compile_string (text_buff); |
||
| 3911 | set_generic_value (generic_context, info); |
||
| 3912 | s = s->next; |
||
| 3913 | } |
||
| 3914 | free_strings (&y_first, &y_last); |
||
| 3915 | } |
||
| 3916 | #line 3680 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3917 | break; |
||
| 3918 | |||
| 3919 | case 287: |
||
| 3920 | #line 1762 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3921 | { |
||
| 3922 | text_buff[0] = '\0'; |
||
| 3923 | } |
||
| 3924 | #line 3686 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3925 | break; |
||
| 3926 | |||
| 3927 | case 288: |
||
| 3928 | #line 1763 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3929 | { |
||
| 3930 | struct str *s; |
||
| 3931 | s = y_first; |
||
| 3932 | while (s) |
||
| 3933 | { |
||
| 3934 | info->name = s->dat; |
||
| 3935 | info->typename = "string"; |
||
| 3936 | info->g_type = IS_STRING; /* environment value : string */ |
||
| 3937 | info->expr = compile_string (text_buff); |
||
| 3938 | set_generic_value (generic_context, info); |
||
| 3939 | s = s->next; |
||
| 3940 | } |
||
| 3941 | free_strings (&y_first, &y_last); |
||
| 3942 | } |
||
| 3943 | #line 3704 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3944 | break; |
||
| 3945 | |||
| 3946 | case 289: |
||
| 3947 | #line 1776 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3948 | { |
||
| 3949 | text_buff[0] = '\0'; |
||
| 3950 | } |
||
| 3951 | #line 3710 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3952 | break; |
||
| 3953 | |||
| 3954 | case 290: |
||
| 3955 | #line 1777 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3956 | { |
||
| 3957 | struct str *s; |
||
| 3958 | s = y_first; |
||
| 3959 | while (s) |
||
| 3960 | { |
||
| 3961 | info->name = s->dat; |
||
| 3962 | info->typename = "env_string"; |
||
| 3963 | info->g_type = IS_ENV_VAL; /* environment value : string */ |
||
| 3964 | info->expr = compile_string (text_buff); |
||
| 3965 | set_generic_value (generic_context, info); |
||
| 3966 | s = s->next; |
||
| 3967 | } |
||
| 3968 | free_strings (&y_first, &y_last); |
||
| 3969 | } |
||
| 3970 | #line 3728 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3971 | break; |
||
| 3972 | |||
| 3973 | case 291: |
||
| 3974 | #line 1793 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3975 | { |
||
| 3976 | struct str *s; |
||
| 3977 | s = y_first; |
||
| 3978 | while (s) |
||
| 3979 | { |
||
| 3980 | info->name = s->dat; |
||
| 3981 | info->typename = NULL; |
||
| 3982 | info->g_type = IS_ATTRIBUTE; |
||
| 3983 | info->expr = copy_expression ( |
||
| 3984 | (yyvsp[0].exp), current_chip); /* ok allocated elsewhere */ |
||
| 3985 | info->valid = 0; |
||
| 3986 | /* generic is tagged for elaboration */ |
||
| 3987 | info->is_component_generic = |
||
| 3988 | current_chip ? current_chip->is_template : 0; |
||
| 3989 | set_generic_value (generic_context, info); |
||
| 3990 | s = s->next; |
||
| 3991 | } |
||
| 3992 | free_strings (&y_first, &y_last); |
||
| 3993 | } |
||
| 3994 | #line 3748 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 3995 | break; |
||
| 3996 | |||
| 3997 | case 292: |
||
| 3998 | #line 1810 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 3999 | { |
||
| 4000 | info->g_class = DEFINED; |
||
| 4001 | (yyval.exp) = (yyvsp[0].exp); |
||
| 4002 | } |
||
| 4003 | #line 3754 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4004 | break; |
||
| 4005 | |||
| 4006 | case 293: |
||
| 4007 | #line 1811 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4008 | { |
||
| 4009 | info->g_class = DEFAULT; |
||
| 4010 | (yyval.exp) = compile_constant (0); |
||
| 4011 | } |
||
| 4012 | #line 3760 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4013 | break; |
||
| 4014 | |||
| 4015 | case 294: |
||
| 4016 | #line 1814 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4017 | { |
||
| 4018 | info->g_class = DEFINED; |
||
| 4019 | (yyval.exp) = (yyvsp[0].exp); |
||
| 4020 | } |
||
| 4021 | #line 3766 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4022 | break; |
||
| 4023 | |||
| 4024 | case 295: |
||
| 4025 | #line 1815 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4026 | { |
||
| 4027 | expression_t *tmp; |
||
| 4028 | info->g_class = DEFAULT; |
||
| 4029 | tmp = compile_constant (0); |
||
| 4030 | (yyval.exp) = compile_expression (TO, tmp, tmp); |
||
| 4031 | } |
||
| 4032 | #line 3775 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4033 | break; |
||
| 4034 | |||
| 4035 | case 300: |
||
| 4036 | #line 1832 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4037 | { |
||
| 4038 | if (text_buff[0]) |
||
| 4039 | strcat (text_buff, " "); |
||
| 4040 | strcat (text_buff, (yyvsp[0].string)); |
||
| 4041 | } |
||
| 4042 | #line 3781 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4043 | break; |
||
| 4044 | |||
| 4045 | case 301: |
||
| 4046 | #line 1840 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4047 | { |
||
| 4048 | exit_lex_block (); |
||
| 4049 | free_lex_strings (); |
||
| 4050 | } |
||
| 4051 | #line 3787 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4052 | break; |
||
| 4053 | |||
| 4054 | case 306: |
||
| 4055 | #line 1852 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4056 | { |
||
| 4057 | current_chip = find_socket (Ident, (yyvsp[0].string), Create, &socket_head); |
||
| 4058 | } |
||
| 4059 | #line 3794 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4060 | break; |
||
| 4061 | |||
| 4062 | case 307: |
||
| 4063 | #line 1855 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4064 | { |
||
| 4065 | if (current_chip) |
||
| 4066 | set_socket (current_chip, Name, (yyvsp[0].string)); |
||
| 4067 | } |
||
| 4068 | #line 3801 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4069 | break; |
||
| 4070 | |||
| 4071 | case 308: |
||
| 4072 | #line 1858 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4073 | { |
||
| 4074 | if (current_chip) |
||
| 4075 | set_socket (current_chip, Type, (yyvsp[0].string)); |
||
| 4076 | } |
||
| 4077 | #line 3808 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4078 | break; |
||
| 4079 | |||
| 4080 | case 309: |
||
| 4081 | #line 1861 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4082 | { |
||
| 4083 | if (current_chip) |
||
| 4084 | set_socket (current_chip, Value, (yyvsp[0].string)); |
||
| 4085 | /* printf("Set up id %s \n",current_chip->identifier); */ |
||
| 4086 | } |
||
| 4087 | #line 3817 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4088 | break; |
||
| 4089 | |||
| 4090 | case 310: |
||
| 4091 | #line 1871 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4092 | { |
||
| 4093 | exit_lex_block (); |
||
| 4094 | free_lex_strings (); |
||
| 4095 | } |
||
| 4096 | #line 3823 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4097 | break; |
||
| 4098 | |||
| 4099 | case 315: |
||
| 4100 | #line 1884 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4101 | { |
||
| 4102 | Log ( |
||
| 4103 | LOG_GENERAL, |
||
| 4104 | "# (line %d) Connecting all nodes on SOckets '%s' and '%s'\n", |
||
| 4105 | lineno, |
||
| 4106 | (yyvsp[-1].string), |
||
| 4107 | (yyvsp[0].string)); /* this creates all possible connections between two |
||
| 4108 | ID's */ |
||
| 4109 | create_all_jumpers ((yyvsp[-1].string), (yyvsp[0].string)); |
||
| 4110 | } |
||
| 4111 | #line 3833 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4112 | break; |
||
| 4113 | |||
| 4114 | case 318: |
||
| 4115 | #line 1894 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4116 | { |
||
| 4117 | join_context = &unrouted_list; |
||
| 4118 | join_mode = Aliased; |
||
| 4119 | create_unrouted_list (); |
||
| 4120 | } |
||
| 4121 | #line 3841 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4122 | break; |
||
| 4123 | |||
| 4124 | case 319: |
||
| 4125 | #line 1897 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4126 | { |
||
| 4127 | join_context = &routed_list; |
||
| 4128 | join_mode = Jumpered; |
||
| 4129 | } |
||
| 4130 | #line 3847 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4131 | break; |
||
| 4132 | |||
| 4133 | case 320: |
||
| 4134 | #line 1898 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4135 | { |
||
| 4136 | join_context = &routed_list; |
||
| 4137 | join_mode = Jumpered; |
||
| 4138 | } |
||
| 4139 | #line 3853 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4140 | break; |
||
| 4141 | |||
| 4142 | case 321: |
||
| 4143 | #line 1901 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4144 | { /* printf("root net found '%s'\n",$1); */ |
||
| 4145 | top_net = find_net (join_context, Ident, (yyvsp[0].string), Search); |
||
| 4146 | if (top_net) |
||
| 4147 | { |
||
| 4148 | if (top_net->how_joined == NotJoined) |
||
| 4149 | { |
||
| 4150 | /* trap attempts to jumper extend a non-jumper net */ |
||
| 4151 | Log ( |
||
| 4152 | LOG_ERROR, |
||
| 4153 | "# (line %d) ERROR : Net '%s' already exists, cannot " |
||
| 4154 | "create jumper\n", |
||
| 4155 | lineno, |
||
| 4156 | top_net->identifier); |
||
| 4157 | top_net = NULL; |
||
| 4158 | } |
||
| 4159 | else |
||
| 4160 | { |
||
| 4161 | Log ( |
||
| 4162 | LOG_ERROR, |
||
| 4163 | "# Warning : %s net '%s' already exists, net is being " |
||
| 4164 | "extended from %d nodes\n", |
||
| 4165 | lineno, |
||
| 4166 | top_net->how_joined == Jumpered ? "Jumpered" : "Aliased", |
||
| 4167 | top_net->identifier, |
||
| 4168 | top_net->nodecount); |
||
| 4169 | /* if the net is already in existence, it will have nodes */ |
||
| 4170 | } |
||
| 4171 | } |
||
| 4172 | else |
||
| 4173 | { |
||
| 4174 | top_net = find_net (join_context, Ident, (yyvsp[0].string), Create); |
||
| 4175 | top_net->how_joined = join_mode; |
||
| 4176 | top_net->vhdltype = default_vhdl_datatype; |
||
| 4177 | /* printf(" Join mode - %d\n",join_mode); */ |
||
| 4178 | } |
||
| 4179 | /* top_net->name = top_net->identifier; */ |
||
| 4180 | |||
| 4181 | printf ("TOP NET = %s \n", top_net->identifier); |
||
| 4182 | } |
||
| 4183 | #line 3889 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4184 | break; |
||
| 4185 | |||
| 4186 | case 326: |
||
| 4187 | #line 1943 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4188 | { /* printf(" additional net found '%s'\n",$1); */ |
||
| 4189 | if (top_net) |
||
| 4190 | { |
||
| 4191 | current_net = |
||
| 4192 | find_net (join_context, Ident, (yyvsp[0].string), Search); |
||
| 4193 | if (!current_net) |
||
| 4194 | Log ( |
||
| 4195 | LOG_ERROR, |
||
| 4196 | "# (line %d) ERROR : Cannot locate net '%s'\n", |
||
| 4197 | lineno, |
||
| 4198 | (yyvsp[0].string)); |
||
| 4199 | else |
||
| 4200 | { |
||
| 4201 | if (current_net == top_net) |
||
| 4202 | Log ( |
||
| 4203 | LOG_ERROR, |
||
| 4204 | "# (line %d) ERROR : Cannot jumper '%s' to " |
||
| 4205 | "itself\n", |
||
| 4206 | lineno, |
||
| 4207 | (yyvsp[0].string)); |
||
| 4208 | else |
||
| 4209 | { |
||
| 4210 | /* mark this as a net referred to by net name */ |
||
| 4211 | current_net->external_node = NULL; |
||
| 4212 | transfer_net_to_subnet ( |
||
| 4213 | join_context, top_net, current_net); |
||
| 4214 | } |
||
| 4215 | } |
||
| 4216 | }; |
||
| 4217 | } |
||
| 4218 | #line 3912 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4219 | break; |
||
| 4220 | |||
| 4221 | case 327: |
||
| 4222 | #line 1963 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4223 | { |
||
| 4224 | if (top_net) |
||
| 4225 | { |
||
| 4226 | /* find socket that node is connected to*/ |
||
| 4227 | current_chip = |
||
| 4228 | find_socket (Ident, (yyvsp[-3].string), Search, &socket_head); |
||
| 4229 | if (!current_chip) |
||
| 4230 | Log ( |
||
| 4231 | LOG_ERROR, |
||
| 4232 | "-- (line %d) Cannot locate socket '%s'\n", |
||
| 4233 | lineno, |
||
| 4234 | (yyvsp[-3].string)); |
||
| 4235 | else |
||
| 4236 | { |
||
| 4237 | /* find node itself */ |
||
| 4238 | current_node = find_node ( |
||
| 4239 | current_chip, Ident, (yyvsp[-1].string), Search); |
||
| 4240 | if (!current_node) |
||
| 4241 | Log ( |
||
| 4242 | LOG_ERROR, |
||
| 4243 | "-- (line %d) Cannot locate node '%s(%s)'\n", |
||
| 4244 | lineno, |
||
| 4245 | (yyvsp[-3].string), |
||
| 4246 | (yyvsp[-1].string)); |
||
| 4247 | else |
||
| 4248 | { |
||
| 4249 | /* use net that node is on */ |
||
| 4250 | if (!current_node->routed_net) |
||
| 4251 | Log ( |
||
| 4252 | LOG_ERROR, |
||
| 4253 | "-- (line %d) Cannot locate net for node " |
||
| 4254 | "'%s(%s)'\n", |
||
| 4255 | lineno, |
||
| 4256 | (yyvsp[-3].string), |
||
| 4257 | (yyvsp[-1].string)); |
||
| 4258 | else if ( |
||
| 4259 | current_node->routed_net->list_ref == &routed_list) |
||
| 4260 | { |
||
| 4261 | /* mark this as a net referred to by node ID |
||
| 4262 | * not net name */ |
||
| 4263 | /* printf("Current net |
||
| 4264 | * is %s : node is |
||
| 4265 | * %s(%s)\n",current_node->routed_net->identifier,current_chip->identifier,current_node->identifier); |
||
| 4266 | */ |
||
| 4267 | if (transfer_net_to_subnet ( |
||
| 4268 | join_context, |
||
| 4269 | top_net, |
||
| 4270 | current_node->routed_net)) |
||
| 4271 | { |
||
| 4272 | current_node->routed_net |
||
| 4273 | ->external_node = current_node; |
||
| 4274 | } |
||
| 4275 | else |
||
| 4276 | { |
||
| 4277 | Log ( |
||
| 4278 | LOG_ERROR, |
||
| 4279 | "-- (line %d) jumper foulup with " |
||
| 4280 | "net referred to by %s(%s)\n", |
||
| 4281 | lineno, |
||
| 4282 | (yyvsp[-3].string), |
||
| 4283 | (yyvsp[-1].string)); |
||
| 4284 | } |
||
| 4285 | } |
||
| 4286 | else |
||
| 4287 | Log ( |
||
| 4288 | LOG_ERROR, |
||
| 4289 | "-- (line %d) node '%s(%s)' is on %s: not " |
||
| 4290 | "routed list\n", |
||
| 4291 | lineno, |
||
| 4292 | (yyvsp[-3].string), |
||
| 4293 | (yyvsp[-1].string), |
||
| 4294 | decode_which_list ( |
||
| 4295 | current_node->routed_net->list_ref)); |
||
| 4296 | } |
||
| 4297 | } |
||
| 4298 | } |
||
| 4299 | } |
||
| 4300 | #line 3957 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4301 | break; |
||
| 4302 | |||
| 4303 | case 328: |
||
| 4304 | #line 2011 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4305 | { |
||
| 4306 | exit_lex_block (); |
||
| 4307 | free_lex_strings (); |
||
| 4308 | } |
||
| 4309 | #line 3963 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4310 | break; |
||
| 4311 | |||
| 4312 | case 332: |
||
| 4313 | #line 2023 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4314 | { |
||
| 4315 | rename_pin_string = (yyvsp[0].string); |
||
| 4316 | vhdl = default_vhdl_datatype; |
||
| 4317 | } |
||
| 4318 | #line 3970 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4319 | break; |
||
| 4320 | |||
| 4321 | case 333: |
||
| 4322 | #line 2025 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4323 | { |
||
| 4324 | rename_pin_string = (yyvsp[-3].string); |
||
| 4325 | vhdl = calloc (1, sizeof (vhdl_t)); |
||
| 4326 | /* acquire datatype later */ |
||
| 4327 | vhdl->expr = (yyvsp[-1].exp); |
||
| 4328 | vhdl->is_vector = 1; |
||
| 4329 | vhdl->valid = 0; |
||
| 4330 | } |
||
| 4331 | #line 3982 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4332 | break; |
||
| 4333 | |||
| 4334 | case 336: |
||
| 4335 | #line 2038 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4336 | { |
||
| 4337 | rename_unrouted_pin ( |
||
| 4338 | (yyvsp[-3].string), (yyvsp[-1].string), rename_pin_string, vhdl); |
||
| 4339 | } |
||
| 4340 | #line 3990 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4341 | break; |
||
| 4342 | |||
| 4343 | case 338: |
||
| 4344 | #line 2051 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4345 | { |
||
| 4346 | current_list = &routed_list; |
||
| 4347 | } |
||
| 4348 | #line 3996 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4349 | break; |
||
| 4350 | |||
| 4351 | case 339: |
||
| 4352 | #line 2054 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4353 | { |
||
| 4354 | exit_lex_block (); |
||
| 4355 | } |
||
| 4356 | #line 4002 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4357 | break; |
||
| 4358 | |||
| 4359 | case 347: |
||
| 4360 | #line 2071 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4361 | { |
||
| 4362 | current_list = &routed_list; |
||
| 4363 | } |
||
| 4364 | #line 4008 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4365 | break; |
||
| 4366 | |||
| 4367 | case 348: |
||
| 4368 | #line 2074 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4369 | { |
||
| 4370 | current_list = &unrouted_list; |
||
| 4371 | } |
||
| 4372 | #line 4014 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4373 | break; |
||
| 4374 | |||
| 4375 | case 349: |
||
| 4376 | #line 2077 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4377 | { |
||
| 4378 | Log ( |
||
| 4379 | LOG_GENERAL, |
||
| 4380 | "-- (line %d) Netlist contains NAMED block,converting signals to ROUTED " |
||
| 4381 | "as its more useful\n", |
||
| 4382 | lineno); |
||
| 4383 | current_list = &routed_list; |
||
| 4384 | } |
||
| 4385 | #line 4021 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4386 | break; |
||
| 4387 | |||
| 4388 | case 352: |
||
| 4389 | #line 2089 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4390 | { |
||
| 4391 | free_lex_strings (); |
||
| 4392 | } |
||
| 4393 | #line 4027 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4394 | break; |
||
| 4395 | |||
| 4396 | case 354: |
||
| 4397 | #line 2092 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4398 | { |
||
| 4399 | current_net = find_net (current_list, Ident, (yyvsp[0].string), Create); |
||
| 4400 | } |
||
| 4401 | #line 4034 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4402 | break; |
||
| 4403 | |||
| 4404 | case 355: |
||
| 4405 | #line 2098 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4406 | { |
||
| 4407 | set_net (current_net, Name, (yyvsp[0].string)); |
||
| 4408 | } |
||
| 4409 | #line 4041 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4410 | break; |
||
| 4411 | |||
| 4412 | case 356: |
||
| 4413 | #line 2102 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4414 | { |
||
| 4415 | set_net (current_net, How_Routed, (yyvsp[0].string)); |
||
| 4416 | } |
||
| 4417 | #line 4048 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4418 | break; |
||
| 4419 | |||
| 4420 | case 361: |
||
| 4421 | #line 2119 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4422 | { |
||
| 4423 | connect_node_net ( |
||
| 4424 | NULL, |
||
| 4425 | current_node, |
||
| 4426 | current_net, |
||
| 4427 | (yyvsp[0].integer), |
||
| 4428 | default_vhdl_datatype, |
||
| 4429 | NULL, |
||
| 4430 | NULL); |
||
| 4431 | /* these set the actual pin up */ |
||
| 4432 | current_node->fixed_pin = ((yyvsp[0].integer) != BIDIR); |
||
| 4433 | current_node->pindir = (yyvsp[0].integer); |
||
| 4434 | if (current_list == &routed_list) |
||
| 4435 | current_node->routed_net = current_net; |
||
| 4436 | } |
||
| 4437 | #line 4060 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4438 | break; |
||
| 4439 | |||
| 4440 | case 362: |
||
| 4441 | #line 2128 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4442 | { |
||
| 4443 | connect_node_net ( |
||
| 4444 | NULL, current_node, current_net, BIDIR, default_vhdl_datatype, NULL, NULL); |
||
| 4445 | /* this sets the actual pin up */ |
||
| 4446 | current_node->fixed_pin = 0; |
||
| 4447 | current_node->pindir = BIDIR; |
||
| 4448 | if (current_list == &routed_list) |
||
| 4449 | current_node->routed_net = current_net; |
||
| 4450 | } |
||
| 4451 | #line 4071 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4452 | break; |
||
| 4453 | |||
| 4454 | case 363: |
||
| 4455 | #line 2137 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4456 | { |
||
| 4457 | current_chip = find_socket (Ident, (yyvsp[0].string), Create, &socket_head); |
||
| 4458 | } |
||
| 4459 | #line 4079 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4460 | break; |
||
| 4461 | |||
| 4462 | case 364: |
||
| 4463 | #line 2141 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4464 | { |
||
| 4465 | if (current_chip) |
||
| 4466 | current_node = |
||
| 4467 | find_node (current_chip, Ident, (yyvsp[0].string), Create); |
||
| 4468 | } |
||
| 4469 | #line 4086 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4470 | break; |
||
| 4471 | |||
| 4472 | case 365: |
||
| 4473 | #line 2148 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4474 | { |
||
| 4475 | current_node->fix_location = 1; |
||
| 4476 | current_net->has_fix_location = 1; |
||
| 4477 | } |
||
| 4478 | #line 4093 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4479 | break; |
||
| 4480 | |||
| 4481 | case 366: |
||
| 4482 | #line 2150 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4483 | { |
||
| 4484 | current_node->fix_location = 0; |
||
| 4485 | } |
||
| 4486 | #line 4099 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4487 | break; |
||
| 4488 | |||
| 4489 | case 367: |
||
| 4490 | #line 2154 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4491 | { |
||
| 4492 | convert_num ((yyvsp[-1].string), ¤t_node->pin_group); |
||
| 4493 | } |
||
| 4494 | #line 4105 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4495 | break; |
||
| 4496 | |||
| 4497 | case 369: |
||
| 4498 | #line 2163 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4499 | { |
||
| 4500 | (yyval.string) = (yyvsp[0].string); |
||
| 4501 | } |
||
| 4502 | #line 4111 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4503 | break; |
||
| 4504 | |||
| 4505 | case 370: |
||
| 4506 | #line 2164 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4507 | { |
||
| 4508 | (yyval.string) = (yyvsp[0].string); |
||
| 4509 | } |
||
| 4510 | #line 4117 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4511 | break; |
||
| 4512 | |||
| 4513 | case 371: |
||
| 4514 | #line 2165 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4515 | { |
||
| 4516 | (yyval.string) = (yyvsp[0].string); |
||
| 4517 | } |
||
| 4518 | #line 4123 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4519 | break; |
||
| 4520 | |||
| 4521 | case 372: |
||
| 4522 | #line 2186 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4523 | { |
||
| 4524 | if (current_chip) |
||
| 4525 | { |
||
| 4526 | create_nodes_from_refs (current_chip, 0); |
||
| 4527 | Log ( |
||
| 4528 | LOG_GENERAL, |
||
| 4529 | "-- (line %d) Template '%s' created\n", |
||
| 4530 | lineno, |
||
| 4531 | current_chip->type); |
||
| 4532 | if (current_chip->parent_template_ref) |
||
| 4533 | Log ( |
||
| 4534 | LOG_GENERAL, |
||
| 4535 | "-- as alias to '%s'\n", |
||
| 4536 | current_chip->parent_template_ref->type); |
||
| 4537 | exit_lex_block (); |
||
| 4538 | free_lex_strings (); |
||
| 4539 | } |
||
| 4540 | } |
||
| 4541 | #line 4141 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4542 | break; |
||
| 4543 | |||
| 4544 | case 374: |
||
| 4545 | #line 2203 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4546 | { |
||
| 4547 | current_chip = find_socket (Type, (yyvsp[0].string), Create, &template_head); |
||
| 4548 | if (current_chip) |
||
| 4549 | current_chip->is_template = 1; |
||
| 4550 | } |
||
| 4551 | #line 4150 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4552 | break; |
||
| 4553 | |||
| 4554 | case 380: |
||
| 4555 | #line 2219 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4556 | { |
||
| 4557 | if (current_chip && current_chip->parent_template_ref) |
||
| 4558 | { |
||
| 4559 | Log ( |
||
| 4560 | LOG_ERROR, |
||
| 4561 | "-- (line %d) chip '%s' already alias of '%s'\n", |
||
| 4562 | lineno, |
||
| 4563 | (yyvsp[-1].string), |
||
| 4564 | current_chip->parent_template_ref->type); |
||
| 4565 | } |
||
| 4566 | else |
||
| 4567 | { |
||
| 4568 | socket_t *original_chip = |
||
| 4569 | find_socket (Type, (yyvsp[-1].string), Search, &template_head); |
||
| 4570 | if (!original_chip) |
||
| 4571 | { |
||
| 4572 | Log ( |
||
| 4573 | LOG_ERROR, |
||
| 4574 | "-- (line %d) Cannot find original template for alias " |
||
| 4575 | "'%s'\n", |
||
| 4576 | lineno, |
||
| 4577 | (yyvsp[-1].string)); |
||
| 4578 | } |
||
| 4579 | else |
||
| 4580 | { |
||
| 4581 | if (current_chip) |
||
| 4582 | { |
||
| 4583 | current_chip->parent_template_ref = original_chip; |
||
| 4584 | current_chip->nodes = original_chip->nodes; |
||
| 4585 | current_chip->lastnode = original_chip->lastnode; |
||
| 4586 | current_chip->equivalent_node_set = |
||
| 4587 | original_chip->equivalent_node_set; |
||
| 4588 | } |
||
| 4589 | } |
||
| 4590 | } |
||
| 4591 | } |
||
| 4592 | #line 4180 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4593 | break; |
||
| 4594 | |||
| 4595 | case 381: |
||
| 4596 | #line 2252 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4597 | { |
||
| 4598 | exit_lex_block (); |
||
| 4599 | free_lex_strings (); |
||
| 4600 | } |
||
| 4601 | #line 4186 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4602 | break; |
||
| 4603 | |||
| 4604 | case 387: |
||
| 4605 | #line 2265 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4606 | { |
||
| 4607 | current_chip = find_socket (Name, (yyvsp[0].string), Create, &socket_head); |
||
| 4608 | if (current_chip) |
||
| 4609 | { |
||
| 4610 | current_chip->is_template = 0; |
||
| 4611 | current_chip->parent_template_ref = NULL; |
||
| 4612 | current_chip->route_flags = 0; |
||
| 4613 | ensure_socket_ident (current_chip); |
||
| 4614 | set_socket (current_chip, Type, "AHDL"); |
||
| 4615 | generic_context = ¤t_chip->generics; |
||
| 4616 | } |
||
| 4617 | } |
||
| 4618 | #line 4203 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4619 | break; |
||
| 4620 | |||
| 4621 | case 392: |
||
| 4622 | #line 2292 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4623 | { |
||
| 4624 | process_tdf_pins (y_first); |
||
| 4625 | free_strings (&y_first, &y_last); |
||
| 4626 | } |
||
| 4627 | #line 4212 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4628 | break; |
||
| 4629 | |||
| 4630 | case 395: |
||
| 4631 | #line 2305 "acf_yacc.y" /* yacc.c:1646 */ |
||
| 4632 | { |
||
| 4633 | char *s = make_string ((yyvsp[0].string), &y_first, &y_last); |
||
| 4634 | curr_pin_ident[0] = '\0'; |
||
| 4635 | curr_pin_dir = NONE; /* default bidirectional */ |
||
| 4636 | if (ISNULLSTR (s) && id_count == 0) /* the null strings tell acfread that the |
||
| 4637 | pin exists and */ |
||
| 4638 | current_list = &routed_list; /* available for routing */ |
||
| 4639 | else |
||
| 4640 | current_list = &unrouted_list; |
||
| 4641 | id_count++; |
||
| 4642 | } |
||
| 4643 | #line 4227 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4644 | break; |
||
| 4645 | |||
| 4646 | #line 4231 "acf_yacc.c" /* yacc.c:1646 */ |
||
| 4647 | default: |
||
| 4648 | break; |
||
| 4649 | } |
||
| 4650 | /* User semantic actions sometimes alter yychar, and that requires |
||
| 4651 | that yytoken be updated with the new translation. We take the |
||
| 4652 | approach of translating immediately before every use of yytoken. |
||
| 4653 | One alternative is translating here after every semantic action, |
||
| 4654 | but that translation would be missed if the semantic action invokes |
||
| 4655 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
||
| 4656 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
||
| 4657 | incorrect destructor might then be invoked immediately. In the |
||
| 4658 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
||
| 4659 | to an incorrect destructor call or verbose syntax error message |
||
| 4660 | before the lookahead is translated. */ |
||
| 4661 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
||
| 4662 | |||
| 4663 | YYPOPSTACK (yylen); |
||
| 4664 | yylen = 0; |
||
| 4665 | YY_STACK_PRINT (yyss, yyssp); |
||
| 4666 | |||
| 4667 | *++yyvsp = yyval; |
||
| 4668 | |||
| 4669 | /* Now 'shift' the result of the reduction. Determine what state |
||
| 4670 | that goes to, based on the state we popped back to and the rule |
||
| 4671 | number reduced by. */ |
||
| 4672 | |||
| 4673 | yyn = yyr1[yyn]; |
||
| 4674 | |||
| 4675 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
||
| 4676 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
||
| 4677 | yystate = yytable[yystate]; |
||
| 4678 | else |
||
| 4679 | yystate = yydefgoto[yyn - YYNTOKENS]; |
||
| 4680 | |||
| 4681 | goto yynewstate; |
||
| 4682 | |||
| 4683 | /*--------------------------------------. |
||
| 4684 | | yyerrlab -- here on detecting error. | |
||
| 4685 | `--------------------------------------*/ |
||
| 4686 | yyerrlab: |
||
| 4687 | /* Make sure we have latest lookahead translation. See comments at |
||
| 4688 | user semantic actions for why this is necessary. */ |
||
| 4689 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
||
| 4690 | |||
| 4691 | /* If not already recovering from an error, report this error. */ |
||
| 4692 | if (!yyerrstatus) |
||
| 4693 | { |
||
| 4694 | ++yynerrs; |
||
| 4695 | #if !YYERROR_VERBOSE |
||
| 4696 | yyerror (YY_ ("syntax error")); |
||
| 4697 | #else |
||
| 4698 | #define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, yyssp, yytoken) |
||
| 4699 | { |
||
| 4700 | char const *yymsgp = YY_ ("syntax error"); |
||
| 4701 | int yysyntax_error_status; |
||
| 4702 | yysyntax_error_status = YYSYNTAX_ERROR; |
||
| 4703 | if (yysyntax_error_status == 0) |
||
| 4704 | yymsgp = yymsg; |
||
| 4705 | else if (yysyntax_error_status == 1) |
||
| 4706 | { |
||
| 4707 | if (yymsg != yymsgbuf) |
||
| 4708 | YYSTACK_FREE (yymsg); |
||
| 4709 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
||
| 4710 | if (!yymsg) |
||
| 4711 | { |
||
| 4712 | yymsg = yymsgbuf; |
||
| 4713 | yymsg_alloc = sizeof yymsgbuf; |
||
| 4714 | yysyntax_error_status = 2; |
||
| 4715 | } |
||
| 4716 | else |
||
| 4717 | { |
||
| 4718 | yysyntax_error_status = YYSYNTAX_ERROR; |
||
| 4719 | yymsgp = yymsg; |
||
| 4720 | } |
||
| 4721 | } |
||
| 4722 | yyerror (yymsgp); |
||
| 4723 | if (yysyntax_error_status == 2) |
||
| 4724 | goto yyexhaustedlab; |
||
| 4725 | } |
||
| 4726 | #undef YYSYNTAX_ERROR |
||
| 4727 | #endif |
||
| 4728 | } |
||
| 4729 | |||
| 4730 | if (yyerrstatus == 3) |
||
| 4731 | { |
||
| 4732 | /* If just tried and failed to reuse lookahead token after an |
||
| 4733 | error, discard it. */ |
||
| 4734 | |||
| 4735 | if (yychar <= YYEOF) |
||
| 4736 | { |
||
| 4737 | /* Return failure if at end of input. */ |
||
| 4738 | if (yychar == YYEOF) |
||
| 4739 | YYABORT; |
||
| 4740 | } |
||
| 4741 | else |
||
| 4742 | { |
||
| 4743 | yydestruct ("Error: discarding", yytoken, &yylval); |
||
| 4744 | yychar = YYEMPTY; |
||
| 4745 | } |
||
| 4746 | } |
||
| 4747 | |||
| 4748 | /* Else will try to reuse lookahead token after shifting the error |
||
| 4749 | token. */ |
||
| 4750 | goto yyerrlab1; |
||
| 4751 | |||
| 4752 | /*---------------------------------------------------. |
||
| 4753 | | yyerrorlab -- error raised explicitly by YYERROR. | |
||
| 4754 | `---------------------------------------------------*/ |
||
| 4755 | yyerrorlab: |
||
| 4756 | |||
| 4757 | /* Pacify compilers like GCC when the user code never invokes |
||
| 4758 | YYERROR and the label yyerrorlab therefore never appears in user |
||
| 4759 | code. */ |
||
| 4760 | if (/*CONSTCOND*/ 0) |
||
| 4761 | goto yyerrorlab; |
||
| 4762 | |||
| 4763 | /* Do not reclaim the symbols of the rule whose action triggered |
||
| 4764 | this YYERROR. */ |
||
| 4765 | YYPOPSTACK (yylen); |
||
| 4766 | yylen = 0; |
||
| 4767 | YY_STACK_PRINT (yyss, yyssp); |
||
| 4768 | yystate = *yyssp; |
||
| 4769 | goto yyerrlab1; |
||
| 4770 | |||
| 4771 | /*-------------------------------------------------------------. |
||
| 4772 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
||
| 4773 | `-------------------------------------------------------------*/ |
||
| 4774 | yyerrlab1: |
||
| 4775 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
||
| 4776 | |||
| 4777 | for (;;) |
||
| 4778 | { |
||
| 4779 | yyn = yypact[yystate]; |
||
| 4780 | if (!yypact_value_is_default (yyn)) |
||
| 4781 | { |
||
| 4782 | yyn += YYTERROR; |
||
| 4783 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
||
| 4784 | { |
||
| 4785 | yyn = yytable[yyn]; |
||
| 4786 | if (0 < yyn) |
||
| 4787 | break; |
||
| 4788 | } |
||
| 4789 | } |
||
| 4790 | |||
| 4791 | /* Pop the current state because it cannot handle the error token. */ |
||
| 4792 | if (yyssp == yyss) |
||
| 4793 | YYABORT; |
||
| 4794 | |||
| 4795 | yydestruct ("Error: popping", yystos[yystate], yyvsp); |
||
| 4796 | YYPOPSTACK (1); |
||
| 4797 | yystate = *yyssp; |
||
| 4798 | YY_STACK_PRINT (yyss, yyssp); |
||
| 4799 | } |
||
| 4800 | |||
| 4801 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
||
| 4802 | *++yyvsp = yylval; |
||
| 4803 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
||
| 4804 | |||
| 4805 | /* Shift the error token. */ |
||
| 4806 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
||
| 4807 | |||
| 4808 | yystate = yyn; |
||
| 4809 | goto yynewstate; |
||
| 4810 | |||
| 4811 | /*-------------------------------------. |
||
| 4812 | | yyacceptlab -- YYACCEPT comes here. | |
||
| 4813 | `-------------------------------------*/ |
||
| 4814 | yyacceptlab: |
||
| 4815 | yyresult = 0; |
||
| 4816 | goto yyreturn; |
||
| 4817 | |||
| 4818 | /*-----------------------------------. |
||
| 4819 | | yyabortlab -- YYABORT comes here. | |
||
| 4820 | `-----------------------------------*/ |
||
| 4821 | yyabortlab: |
||
| 4822 | yyresult = 1; |
||
| 4823 | goto yyreturn; |
||
| 4824 | |||
| 4825 | #if !defined yyoverflow || YYERROR_VERBOSE |
||
| 4826 | /*-------------------------------------------------. |
||
| 4827 | | yyexhaustedlab -- memory exhaustion comes here. | |
||
| 4828 | `-------------------------------------------------*/ |
||
| 4829 | yyexhaustedlab: |
||
| 4830 | yyerror (YY_ ("memory exhausted")); |
||
| 4831 | yyresult = 2; |
||
| 4832 | /* Fall through. */ |
||
| 4833 | #endif |
||
| 4834 | |||
| 4835 | yyreturn: |
||
| 4836 | if (yychar != YYEMPTY) |
||
| 4837 | { |
||
| 4838 | /* Make sure we have latest lookahead translation. See comments at |
||
| 4839 | user semantic actions for why this is necessary. */ |
||
| 4840 | yytoken = YYTRANSLATE (yychar); |
||
| 4841 | yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); |
||
| 4842 | } |
||
| 4843 | /* Do not reclaim the symbols of the rule whose action triggered |
||
| 4844 | this YYABORT or YYACCEPT. */ |
||
| 4845 | YYPOPSTACK (yylen); |
||
| 4846 | YY_STACK_PRINT (yyss, yyssp); |
||
| 4847 | while (yyssp != yyss) |
||
| 4848 | { |
||
| 4849 | yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); |
||
| 4850 | YYPOPSTACK (1); |
||
| 4851 | } |
||
| 4852 | #ifndef yyoverflow |
||
| 4853 | if (yyss != yyssa) |
||
| 4854 | YYSTACK_FREE (yyss); |
||
| 4855 | #endif |
||
| 4856 | #if YYERROR_VERBOSE |
||
| 4857 | if (yymsg != yymsgbuf) |
||
| 4858 | YYSTACK_FREE (yymsg); |
||
| 4859 | #endif |
||
| 4860 | return yyresult; |
||
| 4861 | } |
||
| 4862 | #line 2319 "acf_yacc.y" /* yacc.c:1906 */ |
||
| 4863 | |||
| 4864 | /* defining lineno at top of code so it is in scope */ |
||
| 4865 | |||
| 4866 | int errorseen = 0; |
||
| 4867 | |||
| 4868 | #if defined IS_HPUX |
||
| 4869 | extern unsigned char *yytext[]; |
||
| 4870 | #else |
||
| 4871 | extern char *yytext; |
||
| 4872 | #endif |
||
| 4873 | |||
| 4874 | extern FILE *yyin; |
||
| 4875 | |||
| 4876 | void process_tdf_pins (struct str *s) |
||
| 4877 | { |
||
| 4878 | char *basename; |
||
| 4879 | vhdl_t *defvhdl; |
||
| 4880 | int is_vec, idx = 0, l, hi = 0, lo = 0; |
||
| 4881 | int numeric; |
||
| 4882 | |||
| 4883 | basename = NULL; |
||
| 4884 | is_vec = 0; |
||
| 4885 | while (s) |
||
| 4886 | { |
||
| 4887 | l = strlen (s->dat); |
||
| 4888 | if (l) |
||
| 4889 | { |
||
| 4890 | /* name ends in underscore, this forces mapping |
||
| 4891 | name_nn_ --> vector entry name(nn) */ |
||
| 4892 | numeric = 0; |
||
| 4893 | |||
| 4894 | l--; |
||
| 4895 | if (s->dat[l] == '_') |
||
| 4896 | { |
||
| 4897 | l--; |
||
| 4898 | numeric = 1; |
||
| 4899 | while (l >= 0 && s->dat[l] != '_') |
||
| 4900 | if (!isdigit (s->dat[l--])) |
||
| 4901 | numeric = 0; |
||
| 4902 | if (l >= 0 && s->dat[l] == '_' && numeric) |
||
| 4903 | /* we have found a valid vector element entry */ |
||
| 4904 | idx = atoi (s->dat + l + 1); |
||
| 4905 | } |
||
| 4906 | /* we know if its numeric it is probably a vector element */ |
||
| 4907 | |||
| 4908 | if (numeric && (!basename || strncmp (basename, s->dat, l) == 0)) |
||
| 4909 | { |
||
| 4910 | if (!is_vec) |
||
| 4911 | { |
||
| 4912 | /* if it is the first one then save a reference */ |
||
| 4913 | hi = idx; |
||
| 4914 | lo = idx; |
||
| 4915 | basename = s->dat; |
||
| 4916 | basename[l] = 0; |
||
| 4917 | is_vec = 1; |
||
| 4918 | } |
||
| 4919 | else |
||
| 4920 | { |
||
| 4921 | if (idx > hi) |
||
| 4922 | hi = idx; |
||
| 4923 | if (idx < lo) |
||
| 4924 | lo = idx; |
||
| 4925 | } |
||
| 4926 | } |
||
| 4927 | else |
||
| 4928 | { |
||
| 4929 | if (is_vec) |
||
| 4930 | { |
||
| 4931 | defvhdl = calloc (1, sizeof (vhdl_t)); |
||
| 4932 | *defvhdl = *default_vhdl_bustype; |
||
| 4933 | defvhdl->expr = compile_expression ( |
||
| 4934 | DOWNTO, |
||
| 4935 | compile_constant (hi), |
||
| 4936 | compile_constant (lo)); |
||
| 4937 | #if defined DEBUG_EXPRESSION |
||
| 4938 | printf ("Data bus '%s' h=%d l=%d\n", basename, hi, lo); |
||
| 4939 | #endif |
||
| 4940 | /* defvhdl.is_vector = |
||
| 4941 | * defvhdl.low!=defvhdl.high; */ |
||
| 4942 | /* single bit or bus */ |
||
| 4943 | define_pin ( |
||
| 4944 | current_list, |
||
| 4945 | current_chip, |
||
| 4946 | basename, |
||
| 4947 | curr_pin_dir, |
||
| 4948 | curr_pin_group, |
||
| 4949 | curr_pin_ident, |
||
| 4950 | defvhdl, |
||
| 4951 | NULL); |
||
| 4952 | basename = NULL; |
||
| 4953 | is_vec = 0; |
||
| 4954 | } |
||
| 4955 | else |
||
| 4956 | { |
||
| 4957 | #if defined DEBUG_EXPRESSION |
||
| 4958 | printf ("Pin '%s'\n", s->dat); |
||
| 4959 | #endif |
||
| 4960 | define_pin ( |
||
| 4961 | current_list, |
||
| 4962 | current_chip, |
||
| 4963 | s->dat, |
||
| 4964 | curr_pin_dir, |
||
| 4965 | curr_pin_group, |
||
| 4966 | curr_pin_ident, |
||
| 4967 | default_vhdl_datatype, |
||
| 4968 | NULL); |
||
| 4969 | } |
||
| 4970 | } |
||
| 4971 | |||
| 4972 | } /* if l */ |
||
| 4973 | s = s->next; |
||
| 4974 | } /* while s */ |
||
| 4975 | } |
||
| 4976 | |||
| 4977 | /* function used in definition of ports or signals of a |
||
| 4978 | particular type */ |
||
| 4979 | |||
| 4980 | void create_pins_or_signals (void) |
||
| 4981 | { |
||
| 4982 | struct str *s; |
||
| 4983 | s = y_first; |
||
| 4984 | |||
| 4985 | /* function called in define_pin context */ |
||
| 4986 | |||
| 4987 | while (s) |
||
| 4988 | { |
||
| 4989 | #if defined DEBUG_EXPRESSION |
||
| 4990 | printf ("define pin %s,", s->dat); |
||
| 4991 | #endif |
||
| 4992 | define_pin ( |
||
| 4993 | current_list, |
||
| 4994 | current_chip, |
||
| 4995 | s->dat, |
||
| 4996 | curr_pin_dir, |
||
| 4997 | curr_pin_group, |
||
| 4998 | /* if known use curr_pin_ident */ |
||
| 4999 | curr_pin_ident[0] ? curr_pin_ident : s->dat, |
||
| 5000 | copy_vhdl (vhdl, current_chip), |
||
| 5001 | NULL); |
||
| 5002 | s = s->next; |
||
| 5003 | } |
||
| 5004 | #if defined DEBUG_EXPRESSION |
||
| 5005 | printf ("\n"); |
||
| 5006 | #endif |
||
| 5007 | /* function is called in define signal context. */ |
||
| 5008 | s = y1_first; |
||
| 5009 | while (s) |
||
| 5010 | { |
||
| 5011 | net_t *net; |
||
| 5012 | #if defined DEBUG_EXPRESSION |
||
| 5013 | printf ("define signal %s\n", s->dat); |
||
| 5014 | #endif |
||
| 5015 | net = find_net (&unrouted_list, Ident, s->dat, Create); |
||
| 5016 | if (net) |
||
| 5017 | { |
||
| 5018 | net->type_defined = 1; /* we have defined the correct datatype */ |
||
| 5019 | net->vhdltype = |
||
| 5020 | copy_vhdl (vhdl, NULL); /* ???? do we need malloc/copy here */ |
||
| 5021 | /* as all signals defined at the same time share the memory for |
||
| 5022 | type declaration */ |
||
| 5023 | } |
||
| 5024 | s = s->next; |
||
| 5025 | } |
||
| 5026 | #if defined DEBUG_EXPRESSION |
||
| 5027 | printf ("\n"); |
||
| 5028 | #endif |
||
| 5029 | |||
| 5030 | if (y1_first) |
||
| 5031 | free_strings (&y1_first, &y1_last); |
||
| 5032 | |||
| 5033 | if (y_first) |
||
| 5034 | free_strings (&y_first, &y_last); |
||
| 5035 | id_count = 0; |
||
| 5036 | } |