00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef PARSER_HEADER_H
00038 # define PARSER_HEADER_H
00039
00040
00041
00042 #include <string>
00043 #include <iostream>
00044 #include "torc/generic/parser/stack.hh"
00045
00046
00047
00048 #line 58 "Parser.yy"
00049 namespace torc { namespace generic {
00050
00051
00052 #line 53 "Parser.h"
00053 class position;
00054 class location;
00055
00056
00057 #line 58 "Parser.yy"
00058 } }
00059
00060
00061 #line 62 "Parser.h"
00062
00063 #include "torc/generic/parser/location.hh"
00064
00065
00066 #ifndef YYDEBUG
00067 # define YYDEBUG 1
00068 #endif
00069
00070
00071 #ifdef YYERROR_VERBOSE
00072 # undef YYERROR_VERBOSE
00073 # define YYERROR_VERBOSE 1
00074 #else
00075 # define YYERROR_VERBOSE 1
00076 #endif
00077
00078
00079 #ifndef YYTOKEN_TABLE
00080 # define YYTOKEN_TABLE 0
00081 #endif
00082
00083
00084
00085
00086
00087 #ifndef YYLLOC_DEFAULT
00088 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00089 do { \
00090 if (N) \
00091 { \
00092 (Current).begin = (Rhs)[1].begin; \
00093 (Current).end = (Rhs)[N].end; \
00094 } \
00095 else \
00096 { \
00097 (Current).begin = (Current).end = (Rhs)[0].end; \
00098 } \
00099 } while (false)
00100 #endif
00101
00102
00103
00104 #line 58 "Parser.yy"
00105 namespace torc { namespace generic {
00106
00107
00108 #line 109 "Parser.h"
00109
00110
00111 class Parser
00112 {
00113 public:
00114
00115 #ifndef YYSTYPE
00116 union semantic_type
00117 {
00118
00119
00120 #line 81 "Parser.yy"
00121
00122 int integerVal;
00123 double doubleVal;
00124 std::string *stringVal;
00125 torc::generic::NameData *nameData;
00126 torc::generic::ViewRefData *viewRefData;
00127 torc::generic::CellRefData *cellRefData;
00128 torc::generic::PortRefData *portRefData;
00129 torc::generic::InstanceRefData *instanceRef;
00130 torc::generic::PortListData *portListData;
00131 torc::generic::InstanceInfo *instanceInfo;
00132 std::vector<size_t> *arrayDimensions;
00133 torc::generic::VersionData *edifVersion;
00134 torc::generic::ValueData *valueData;
00135 torc::generic::PairData *pairData;
00136 torc::generic::ParamAssignInfo *paramAssignInfo;
00137 torc::generic::PortAttributes *portAttributes;
00138 torc::generic::NetAttributes *netAttributes;
00139 torc::generic::PortDelay *portDelay;
00140 torc::generic::NetDelay *netDelay;
00141 torc::generic::PortInstData *portInst;
00142 torc::generic::TimeStamp *timeStamp;
00143 torc::generic::PairStrData *pairStrData;
00144 torc::generic::InterfaceAttributes *interfaceAttributes;
00145 torc::generic::LogicValueAttributes *logicValueAttributes;
00146 torc::generic::LogicListData *logicListData;
00147 torc::generic::LogicRefData *logicRefData;
00148 torc::generic::NetRefData *netRefData;
00149
00150
00151
00152
00153 #line 154 "Parser.h"
00154 };
00155 #else
00156 typedef YYSTYPE semantic_type;
00157 #endif
00158
00159 typedef location location_type;
00160
00161 struct token
00162 {
00163
00164 enum yytokentype {
00165 END = 0,
00166 EOL = 258,
00167 IDENTIFIER = 259,
00168 INTEGER = 260,
00169 DOUBLE = 261,
00170 STRING = 262,
00171 ANGLE = 263,
00172 BEHAVIOR = 264,
00173 CALCULATED = 265,
00174 CAPACITANCE = 266,
00175 CENTERCENTER = 267,
00176 CENTERLEFT = 268,
00177 CENTERRIGHT = 269,
00178 CHARGE = 270,
00179 CONDUCTANCE = 271,
00180 CURRENT = 272,
00181 DISTANCE = 273,
00182 DOCUMENT = 274,
00183 ENERGY = 275,
00184 EXTEND = 276,
00185 FLUX = 277,
00186 FREQUENCY = 278,
00187 GENERIC = 279,
00188 GRAPHIC = 280,
00189 INDUCTANCE = 281,
00190 INOUT = 282,
00191 INPUT = 283,
00192 LOGICMODEL = 284,
00193 LOWERCENTER = 285,
00194 LOWERLEFT = 286,
00195 LOWERRIGHT = 287,
00196 MASKLAYOUT = 288,
00197 MASS = 289,
00198 MEASURED = 290,
00199 MX = 291,
00200 MXR90 = 292,
00201 MY = 293,
00202 MYR90 = 294,
00203 NETLIST = 295,
00204 OUTPUT = 296,
00205 PCBLAYOUT = 297,
00206 POWER = 298,
00207 R0 = 299,
00208 R180 = 300,
00209 R270 = 301,
00210 R90 = 302,
00211 REQUIRED = 303,
00212 RESISTANCE = 304,
00213 RIPPER = 305,
00214 ROUND = 306,
00215 SCHEMATIC = 307,
00216 STRANGER = 308,
00217 SYMBOLIC = 309,
00218 TEMPERATURE = 310,
00219 TIE = 311,
00220 TIME = 312,
00221 TRUNCATE = 313,
00222 UPPERCENTER = 314,
00223 UPPERLEFT = 315,
00224 UPPERRIGHT = 316,
00225 VOLTAGE = 317,
00226 ACLOAD = 318,
00227 AFTER = 319,
00228 ANNOTATE = 320,
00229 APPLY = 321,
00230 ARC = 322,
00231 ARRAY = 323,
00232 ARRAYMACRO = 324,
00233 ARRAYRELATEDINFO = 325,
00234 ARRAYSITE = 326,
00235 ATLEAST = 327,
00236 ATMOST = 328,
00237 AUTHOR = 329,
00238 BASEARRAY = 330,
00239 BECOMES = 331,
00240 BETWEEN = 332,
00241 BOOLEAN = 333,
00242 BOOLEANDISPLAY = 334,
00243 BOOLEANMAP = 335,
00244 BORDERPATTERN = 336,
00245 BORDERWIDTH = 337,
00246 BOUNDINGBOX = 338,
00247 CELL = 339,
00248 CELLREF = 340,
00249 CELLTYPE = 341,
00250 CHANGE = 342,
00251 CIRCLE = 343,
00252 COLOR = 344,
00253 COMMENT = 345,
00254 COMMENTGRAPHICS = 346,
00255 COMPOUND = 347,
00256 CONNECTLOCATION = 348,
00257 CONTENTS = 349,
00258 CORNERTYPE = 350,
00259 CRITICALITY = 351,
00260 CURRENTMAP = 352,
00261 CURVE = 353,
00262 CYCLE = 354,
00263 DATAORIGIN = 355,
00264 DCFANINLOAD = 356,
00265 DCFANOUTLOAD = 357,
00266 DCMAXFANIN = 358,
00267 DCMAXFANOUT = 359,
00268 DELAY = 360,
00269 DELTA = 361,
00270 DERIVATION = 362,
00271 DESIGN = 363,
00272 DESIGNATOR = 364,
00273 DIFFERENCE = 365,
00274 DIRECTION = 366,
00275 DISPLAY = 367,
00276 DOMINATES = 368,
00277 DOT = 369,
00278 DURATION = 370,
00279 E = 371,
00280 EDIF = 372,
00281 EDIFLEVEL = 373,
00282 EDIFVERSION = 374,
00283 ENCLOSUREDISTANCE = 375,
00284 ENDTYPE = 376,
00285 ENTRY = 377,
00286 EVENT = 378,
00287 EXACTLY = 379,
00288 EXTERNAL = 380,
00289 FABRICATE = 381,
00290 FALSE = 382,
00291 FIGURE = 383,
00292 FIGUREAREA = 384,
00293 FIGUREGROUP = 385,
00294 FIGUREGROUPOBJECT = 386,
00295 FIGUREGROUPOVERRIDE = 387,
00296 FIGUREGROUPREF = 388,
00297 FIGUREPERIMETER = 389,
00298 FIGUREWIDTH = 390,
00299 FILLPATTERN = 391,
00300 FOLLOW = 392,
00301 FORBIDDENEVENT = 393,
00302 GLOBALPORTREF = 394,
00303 GREATERTHAN = 395,
00304 GRIDMAP = 396,
00305 IGNORE = 397,
00306 INCLUDEFIGUREGROUP = 398,
00307 INITIAL_KW = 399,
00308 INSTANCE = 400,
00309 INSTANCEBACKANNOTATE = 401,
00310 INSTANCEGROUP = 402,
00311 INSTANCEMAP = 403,
00312 INSTANCEREF = 404,
00313 INTEGERDISPLAY = 405,
00314 INTERFACE = 406,
00315 INTERFIGUREGROUPSPACING = 407,
00316 INTERSECTION = 408,
00317 INTRAFIGUREGROUPSPACING = 409,
00318 INVERSE = 410,
00319 ISOLATED = 411,
00320 JOINED = 412,
00321 JUSTIFY = 413,
00322 KEYWORDDISPLAY = 414,
00323 KEYWORDLEVEL = 415,
00324 KEYWORDMAP = 416,
00325 LESSTHAN = 417,
00326 LIBRARY = 418,
00327 LIBRARYREF = 419,
00328 LISTOFNETS = 420,
00329 LISTOFPORTS = 421,
00330 LOADDELAY = 422,
00331 LOGICASSIGN = 423,
00332 LOGICINPUT = 424,
00333 LOGICLIST = 425,
00334 LOGICMAPINPUT = 426,
00335 LOGICMAPOUTPUT = 427,
00336 LOGICONEOF = 428,
00337 LOGICOUTPUT = 429,
00338 LOGICPORT = 430,
00339 LOGICREF = 431,
00340 LOGICVALUE = 432,
00341 LOGICWAVEFORM = 433,
00342 MAINTAIN = 434,
00343 MATCH = 435,
00344 MEMBER = 436,
00345 MINOMAX = 437,
00346 MINOMAXDISPLAY = 438,
00347 MNM = 439,
00348 MULTIPLEVALUESET = 440,
00349 MUSTJOIN = 441,
00350 NAME = 442,
00351 NET = 443,
00352 NETBACKANNOTATE = 444,
00353 NETBUNDLE = 445,
00354 NETDELAY = 446,
00355 NETGROUP = 447,
00356 NETMAP = 448,
00357 NETREF = 449,
00358 NOCHANGE = 450,
00359 NONPERMUTABLE = 451,
00360 NOTALLOWED = 452,
00361 NOTCHSPACING = 453,
00362 NUMBER = 454,
00363 NUMBERDEFINITION = 455,
00364 NUMBERDISPLAY = 456,
00365 OFFPAGECONNECTOR = 457,
00366 OFFSETEVENT = 458,
00367 OPENSHAPE = 459,
00368 ORIENTATION = 460,
00369 ORIGIN = 461,
00370 OVERHANGDISTANCE = 462,
00371 OVERLAPDISTANCE = 463,
00372 OVERSIZE = 464,
00373 OWNER = 465,
00374 PAGE = 466,
00375 PAGESIZE_EDIF = 467,
00376 PARAMETER = 468,
00377 PARAMETERASSIGN = 469,
00378 PARAMETERDISPLAY = 470,
00379 PATH = 471,
00380 PATHDELAY = 472,
00381 PATHWIDTH = 473,
00382 PERMUTABLE = 474,
00383 PHYSICALDESIGNRULE = 475,
00384 PLUG = 476,
00385 POINT = 477,
00386 POINTDISPLAY = 478,
00387 POINTLIST = 479,
00388 POLYGON = 480,
00389 PORT = 481,
00390 PORTBACKANNOTATE = 482,
00391 PORTBUNDLE = 483,
00392 PORTDELAY = 484,
00393 PORTGROUP = 485,
00394 PORTIMPLEMENTATION = 486,
00395 PORTINSTANCE = 487,
00396 PORTLIST = 488,
00397 PORTLISTALIAS = 489,
00398 PORTMAP = 490,
00399 PORTREF = 491,
00400 PROGRAM = 492,
00401 PROPERTY = 493,
00402 PROPERTYDISPLAY = 494,
00403 PROTECTIONFRAME = 495,
00404 PT = 496,
00405 RANGEVECTOR = 497,
00406 RECTANGLE = 498,
00407 RECTANGLESIZE = 499,
00408 RENAME = 500,
00409 RESOLVES = 501,
00410 SCALE = 502,
00411 SCALEX = 503,
00412 SCALEY = 504,
00413 SECTION = 505,
00414 SHAPE = 506,
00415 SIMULATE = 507,
00416 SIMULATIONINFO = 508,
00417 SINGLEVALUESET = 509,
00418 SITE = 510,
00419 SOCKET = 511,
00420 SOCKETSET = 512,
00421 STATUS = 513,
00422 STEADY = 514,
00423 STRINGDISPLAY = 515,
00424 STRONG = 516,
00425 SYMBOL = 517,
00426 SYMMETRY = 518,
00427 TABLE = 519,
00428 TABLEDEFAULT = 520,
00429 TECHNOLOGY = 521,
00430 TEXTHEIGHT = 522,
00431 TIMEINTERVAL = 523,
00432 TIMESTAMP = 524,
00433 TIMING = 525,
00434 TRANSFORM = 526,
00435 TRANSITION = 527,
00436 TRIGGER = 528,
00437 TRUE = 529,
00438 UNCONSTRAINED = 530,
00439 UNDEFINED = 531,
00440 UNION = 532,
00441 UNIT = 533,
00442 UNUSED = 534,
00443 USERDATA = 535,
00444 VERSION = 536,
00445 VIEW = 537,
00446 VIEWLIST = 538,
00447 VIEWMAP = 539,
00448 VIEWREF = 540,
00449 VIEWTYPE = 541,
00450 VISIBLE = 542,
00451 VOLTAGEMAP = 543,
00452 WAVEVALUE = 544,
00453 WEAK = 545,
00454 WEAKJOINED = 546,
00455 WHEN = 547,
00456 WRITTEN = 548,
00457 LBKT = 549,
00458 RBKT = 550
00459 };
00460
00461 };
00462
00463 typedef token::yytokentype token_type;
00464
00465
00466 Parser (class Driver& inDriver_yyarg);
00467 virtual ~Parser ();
00468
00469
00470
00471 virtual int parse ();
00472
00473 #if YYDEBUG
00474
00475 std::ostream& debug_stream () const;
00476
00477 void set_debug_stream (std::ostream &);
00478
00479
00480 typedef int debug_level_type;
00481
00482 debug_level_type debug_level () const;
00483
00484 void set_debug_level (debug_level_type l);
00485 #endif
00486
00487 private:
00488
00489
00490
00491 virtual void error (const location_type& loc, const std::string& msg);
00492
00493
00494
00495
00496 virtual std::string yysyntax_error_ (int yystate, int tok);
00497
00498 #if YYDEBUG
00499
00500
00501
00502
00503 virtual void yy_symbol_value_print_ (int yytype,
00504 const semantic_type* yyvaluep,
00505 const location_type* yylocationp);
00506
00507
00508
00509
00510 virtual void yy_symbol_print_ (int yytype,
00511 const semantic_type* yyvaluep,
00512 const location_type* yylocationp);
00513 #endif
00514
00515
00516
00517 typedef int state_type;
00518
00519 typedef stack<state_type> state_stack_type;
00520
00521 typedef stack<semantic_type> semantic_stack_type;
00522
00523 typedef stack<location_type> location_stack_type;
00524
00525
00526 state_stack_type yystate_stack_;
00527
00528 semantic_stack_type yysemantic_stack_;
00529
00530 location_stack_type yylocation_stack_;
00531
00532
00533 typedef unsigned short int token_number_type;
00534
00535
00536 static const short int yypact_[];
00537 static const short int yypact_ninf_;
00538
00539
00540
00541
00542 static const unsigned short int yydefact_[];
00543
00544 static const short int yypgoto_[];
00545 static const short int yydefgoto_[];
00546
00547
00548
00549
00550
00551
00552 static const unsigned short int yytable_[];
00553 static const signed char yytable_ninf_;
00554
00555 static const short int yycheck_[];
00556
00557
00558 static const unsigned short int yystos_[];
00559
00560
00561 static const unsigned short int yyr1_[];
00562
00563 static const unsigned char yyr2_[];
00564
00565 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00566
00567 static const char* const yytname_[];
00568 #endif
00569
00570 #if YYERROR_VERBOSE
00571
00572 virtual std::string yytnamerr_ (const char *n);
00573 #endif
00574
00575 #if YYDEBUG
00576
00577 typedef short int rhs_number_type;
00578
00579 static const rhs_number_type yyrhs_[];
00580
00581 static const unsigned short int yyprhs_[];
00582
00583 static const unsigned short int yyrline_[];
00584
00585 static const unsigned short int yytoken_number_[];
00586
00587 virtual void yy_reduce_print_ (int r);
00588
00589 virtual void yystack_print_ ();
00590
00591
00592 int yydebug_;
00593 std::ostream* yycdebug_;
00594 #endif
00595
00596
00597 token_number_type yytranslate_ (int t);
00598
00599
00600
00601
00602
00603
00604 inline void yydestruct_ (const char* yymsg,
00605 int yytype,
00606 semantic_type* yyvaluep,
00607 location_type* yylocationp);
00608
00609
00610 inline void yypop_ (unsigned int n = 1);
00611
00612
00613 static const int yyeof_;
00614
00615 static const int yylast_;
00616 static const int yynnts_;
00617 static const int yyempty_;
00618 static const int yyfinal_;
00619 static const int yyterror_;
00620 static const int yyerrcode_;
00621 static const int yyntokens_;
00622 static const unsigned int yyuser_token_number_max_;
00623 static const token_number_type yyundef_token_;
00624
00625
00626 class Driver& inDriver;
00627 };
00628
00629
00630 #line 58 "Parser.yy"
00631 } }
00632
00633
00634 #line 635 "Parser.h"
00635
00636
00637
00638 #endif