torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Parser.h
Go to the documentation of this file.
1 
2 /* A Bison parser, made by GNU Bison 2.4. */
3 
4 /* Skeleton interface for Bison LALR(1) parsers in C++
5 
6  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
7  Foundation, Inc.
8 
9  This program is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 
22 /* As a special exception, you may create a larger work that contains
23  part or all of the Bison parser skeleton and distribute that work
24  under terms of your choice, so long as that work isn't itself a
25  parser generator using the skeleton or a modified version thereof
26  as a parser skeleton. Alternatively, if you modify or redistribute
27  the parser skeleton itself, you may (at your option) remove this
28  special exception, which will cause the skeleton and the resulting
29  Bison output files to be licensed under the GNU General Public
30  License without this special exception.
31 
32  This special exception was added by the Free Software Foundation in
33  version 2.2 of Bison. */
34 
35 /* C++ LALR(1) parser skeleton written by Akim Demaille. */
36 
37 #ifndef PARSER_HEADER_H
38 # define PARSER_HEADER_H
39 
40 
41 
42 #include <string>
43 #include <iostream>
45 
46 
47 /* Line 35 of lalr1.cc */
48 #line 58 "Parser.yy"
49 namespace torc { namespace generic {
50 
51 /* Line 35 of lalr1.cc */
52 #line 53 "Parser.h"
53  class position;
54  class location;
55 
56 /* Line 35 of lalr1.cc */
57 #line 58 "Parser.yy"
58 } } // torc::generic
59 
60 /* Line 35 of lalr1.cc */
61 #line 62 "Parser.h"
62 
64 
65 /* Enabling traces. */
66 #ifndef YYDEBUG
67 # define YYDEBUG 1
68 #endif
69 
70 /* Enabling verbose error messages. */
71 #ifdef YYERROR_VERBOSE
72 # undef YYERROR_VERBOSE
73 # define YYERROR_VERBOSE 1
74 #else
75 # define YYERROR_VERBOSE 1
76 #endif
77 
78 /* Enabling the token table. */
79 #ifndef YYTOKEN_TABLE
80 # define YYTOKEN_TABLE 0
81 #endif
82 
83 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
84  If N is 0, then set CURRENT to the empty location which ends
85  the previous symbol: RHS[0] (always defined). */
86 
87 #ifndef YYLLOC_DEFAULT
88 # define YYLLOC_DEFAULT(Current, Rhs, N) \
89 do { \
90  if (N) \
91  { \
92  (Current).begin = (Rhs)[1].begin; \
93  (Current).end = (Rhs)[N].end; \
94  } \
95  else \
96  { \
97  (Current).begin = (Current).end = (Rhs)[0].end; \
98  } \
99 } while (false)
100 #endif
101 
102 
103 /* Line 35 of lalr1.cc */
104 #line 58 "Parser.yy"
105 namespace torc { namespace generic {
106 
107 /* Line 35 of lalr1.cc */
108 #line 109 "Parser.h"
109 
110  /// A Bison parser.
111  class Parser
112  {
113  public:
114  /// Symbol semantic values.
115 #ifndef YYSTYPE
117  {
118 
119 /* Line 35 of lalr1.cc */
120 #line 81 "Parser.yy"
121 
123  double doubleVal;
132  std::vector<size_t> *arrayDimensions;
149 
150 
151 
152 /* Line 35 of lalr1.cc */
153 #line 154 "Parser.h"
154  };
155 #else
156  typedef YYSTYPE semantic_type;
157 #endif
158  /// Symbol locations.
160  /// Tokens.
161  struct token
162  {
163  /* Tokens. */
164  enum yytokentype {
165  END = 0,
166  EOL = 258,
167  IDENTIFIER = 259,
168  INTEGER = 260,
169  DOUBLE = 261,
170  STRING = 262,
171  ANGLE = 263,
172  BEHAVIOR = 264,
173  CALCULATED = 265,
174  CAPACITANCE = 266,
176  CENTERLEFT = 268,
177  CENTERRIGHT = 269,
178  CHARGE = 270,
179  CONDUCTANCE = 271,
180  CURRENT = 272,
181  DISTANCE = 273,
182  DOCUMENT = 274,
183  ENERGY = 275,
184  EXTEND = 276,
185  FLUX = 277,
186  FREQUENCY = 278,
187  GENERIC = 279,
188  GRAPHIC = 280,
189  INDUCTANCE = 281,
190  INOUT = 282,
191  INPUT = 283,
192  LOGICMODEL = 284,
193  LOWERCENTER = 285,
194  LOWERLEFT = 286,
195  LOWERRIGHT = 287,
196  MASKLAYOUT = 288,
197  MASS = 289,
198  MEASURED = 290,
199  MX = 291,
200  MXR90 = 292,
201  MY = 293,
202  MYR90 = 294,
203  NETLIST = 295,
204  OUTPUT = 296,
205  PCBLAYOUT = 297,
206  POWER = 298,
207  R0 = 299,
208  R180 = 300,
209  R270 = 301,
210  R90 = 302,
211  REQUIRED = 303,
212  RESISTANCE = 304,
213  RIPPER = 305,
214  ROUND = 306,
215  SCHEMATIC = 307,
216  STRANGER = 308,
217  SYMBOLIC = 309,
218  TEMPERATURE = 310,
219  TIE = 311,
220  TIME = 312,
221  TRUNCATE = 313,
222  UPPERCENTER = 314,
223  UPPERLEFT = 315,
224  UPPERRIGHT = 316,
225  VOLTAGE = 317,
226  ACLOAD = 318,
227  AFTER = 319,
228  ANNOTATE = 320,
229  APPLY = 321,
230  ARC = 322,
231  ARRAY = 323,
232  ARRAYMACRO = 324,
234  ARRAYSITE = 326,
235  ATLEAST = 327,
236  ATMOST = 328,
237  AUTHOR = 329,
238  BASEARRAY = 330,
239  BECOMES = 331,
240  BETWEEN = 332,
241  BOOLEAN = 333,
243  BOOLEANMAP = 335,
245  BORDERWIDTH = 337,
246  BOUNDINGBOX = 338,
247  CELL = 339,
248  CELLREF = 340,
249  CELLTYPE = 341,
250  CHANGE = 342,
251  CIRCLE = 343,
252  COLOR = 344,
253  COMMENT = 345,
255  COMPOUND = 347,
257  CONTENTS = 349,
258  CORNERTYPE = 350,
259  CRITICALITY = 351,
260  CURRENTMAP = 352,
261  CURVE = 353,
262  CYCLE = 354,
263  DATAORIGIN = 355,
264  DCFANINLOAD = 356,
266  DCMAXFANIN = 358,
267  DCMAXFANOUT = 359,
268  DELAY = 360,
269  DELTA = 361,
270  DERIVATION = 362,
271  DESIGN = 363,
272  DESIGNATOR = 364,
273  DIFFERENCE = 365,
274  DIRECTION = 366,
275  DISPLAY = 367,
276  DOMINATES = 368,
277  DOT = 369,
278  DURATION = 370,
279  E = 371,
280  EDIF = 372,
281  EDIFLEVEL = 373,
282  EDIFVERSION = 374,
284  ENDTYPE = 376,
285  ENTRY = 377,
286  EVENT = 378,
287  EXACTLY = 379,
288  EXTERNAL = 380,
289  FABRICATE = 381,
290  FALSE = 382,
291  FIGURE = 383,
292  FIGUREAREA = 384,
293  FIGUREGROUP = 385,
298  FIGUREWIDTH = 390,
299  FILLPATTERN = 391,
300  FOLLOW = 392,
303  GREATERTHAN = 395,
304  GRIDMAP = 396,
305  IGNORE = 397,
307  INITIAL_KW = 399,
308  INSTANCE = 400,
311  INSTANCEMAP = 403,
312  INSTANCEREF = 404,
314  INTERFACE = 406,
318  INVERSE = 410,
319  ISOLATED = 411,
320  JOINED = 412,
321  JUSTIFY = 413,
324  KEYWORDMAP = 416,
325  LESSTHAN = 417,
326  LIBRARY = 418,
327  LIBRARYREF = 419,
328  LISTOFNETS = 420,
329  LISTOFPORTS = 421,
330  LOADDELAY = 422,
331  LOGICASSIGN = 423,
332  LOGICINPUT = 424,
333  LOGICLIST = 425,
336  LOGICONEOF = 428,
337  LOGICOUTPUT = 429,
338  LOGICPORT = 430,
339  LOGICREF = 431,
340  LOGICVALUE = 432,
342  MAINTAIN = 434,
343  MATCH = 435,
344  MEMBER = 436,
345  MINOMAX = 437,
347  MNM = 439,
349  MUSTJOIN = 441,
350  NAME = 442,
351  NET = 443,
353  NETBUNDLE = 445,
354  NETDELAY = 446,
355  NETGROUP = 447,
356  NETMAP = 448,
357  NETREF = 449,
358  NOCHANGE = 450,
360  NOTALLOWED = 452,
362  NUMBER = 454,
366  OFFSETEVENT = 458,
367  OPENSHAPE = 459,
368  ORIENTATION = 460,
369  ORIGIN = 461,
372  OVERSIZE = 464,
373  OWNER = 465,
374  PAGE = 466,
376  PARAMETER = 468,
379  PATH = 471,
380  PATHDELAY = 472,
381  PATHWIDTH = 473,
382  PERMUTABLE = 474,
384  PLUG = 476,
385  POINT = 477,
387  POINTLIST = 479,
388  POLYGON = 480,
389  PORT = 481,
391  PORTBUNDLE = 483,
392  PORTDELAY = 484,
393  PORTGROUP = 485,
396  PORTLIST = 488,
398  PORTMAP = 490,
399  PORTREF = 491,
400  PROGRAM = 492,
401  PROPERTY = 493,
404  PT = 496,
405  RANGEVECTOR = 497,
406  RECTANGLE = 498,
408  RENAME = 500,
409  RESOLVES = 501,
410  SCALE = 502,
411  SCALEX = 503,
412  SCALEY = 504,
413  SECTION = 505,
414  SHAPE = 506,
415  SIMULATE = 507,
418  SITE = 510,
419  SOCKET = 511,
420  SOCKETSET = 512,
421  STATUS = 513,
422  STEADY = 514,
424  STRONG = 516,
425  SYMBOL = 517,
426  SYMMETRY = 518,
427  TABLE = 519,
429  TECHNOLOGY = 521,
430  TEXTHEIGHT = 522,
432  TIMESTAMP = 524,
433  TIMING = 525,
434  TRANSFORM = 526,
435  TRANSITION = 527,
436  TRIGGER = 528,
437  TRUE = 529,
439  UNDEFINED = 531,
440  UNION = 532,
441  UNIT = 533,
442  UNUSED = 534,
443  USERDATA = 535,
444  VERSION = 536,
445  VIEW = 537,
446  VIEWLIST = 538,
447  VIEWMAP = 539,
448  VIEWREF = 540,
449  VIEWTYPE = 541,
450  VISIBLE = 542,
451  VOLTAGEMAP = 543,
452  WAVEVALUE = 544,
453  WEAK = 545,
454  WEAKJOINED = 546,
455  WHEN = 547,
456  WRITTEN = 548,
457  LBKT = 549,
458  RBKT = 550
459  };
460 
461  };
462  /// Token type.
464 
465  /// Build a parser object.
466  Parser (class Driver& inDriver_yyarg);
467  virtual ~Parser ();
468 
469  /// Parse.
470  /// \returns 0 iff parsing succeeded.
471  virtual int parse ();
472 
473 #if YYDEBUG
474  /// The current debugging stream.
475  std::ostream& debug_stream () const;
476  /// Set the current debugging stream.
477  void set_debug_stream (std::ostream &);
478 
479  /// Type for debugging levels.
480  typedef int debug_level_type;
481  /// The current debugging level.
482  debug_level_type debug_level () const;
483  /// Set the current debugging level.
485 #endif
486 
487  private:
488  /// Report a syntax error.
489  /// \param loc where the syntax error is found.
490  /// \param msg a description of the syntax error.
491  virtual void error (const location_type& loc, const std::string& msg);
492 
493  /// Generate an error message.
494  /// \param state the state where the error occurred.
495  /// \param tok the lookahead token.
496  virtual std::string yysyntax_error_ (int yystate, int tok);
497 
498 #if YYDEBUG
499  /// \brief Report a symbol value on the debug stream.
500  /// \param yytype The token type.
501  /// \param yyvaluep Its semantic value.
502  /// \param yylocationp Its location.
503  virtual void yy_symbol_value_print_ (int yytype,
504  const semantic_type* yyvaluep,
505  const location_type* yylocationp);
506  /// \brief Report a symbol on the debug stream.
507  /// \param yytype The token type.
508  /// \param yyvaluep Its semantic value.
509  /// \param yylocationp Its location.
510  virtual void yy_symbol_print_ (int yytype,
511  const semantic_type* yyvaluep,
512  const location_type* yylocationp);
513 #endif
514 
515 
516  /// State numbers.
517  typedef int state_type;
518  /// State stack type.
520  /// Semantic value stack type.
522  /// location stack type.
524 
525  /// The state stack.
527  /// The semantic value stack.
529  /// The location stack.
531 
532  /// Internal symbol numbers.
533  typedef unsigned short int token_number_type;
534  /* Tables. */
535  /// For a state, the index in \a yytable_ of its portion.
536  static const short int yypact_[];
537  static const short int yypact_ninf_;
538 
539  /// For a state, default rule to reduce.
540  /// Unless\a yytable_ specifies something else to do.
541  /// Zero means the default is an error.
542  static const unsigned short int yydefact_[];
543 
544  static const short int yypgoto_[];
545  static const short int yydefgoto_[];
546 
547  /// What to do in a state.
548  /// \a yytable_[yypact_[s]]: what to do in state \a s.
549  /// - if positive, shift that token.
550  /// - if negative, reduce the rule which number is the opposite.
551  /// - if zero, do what YYDEFACT says.
552  static const unsigned short int yytable_[];
553  static const signed char yytable_ninf_;
554 
555  static const short int yycheck_[];
556 
557  /// For a state, its accessing symbol.
558  static const unsigned short int yystos_[];
559 
560  /// For a rule, its LHS.
561  static const unsigned short int yyr1_[];
562  /// For a rule, its RHS length.
563  static const unsigned char yyr2_[];
564 
565 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
566  /// For a symbol, its name in clear.
567  static const char* const yytname_[];
568 #endif
569 
570 #if YYERROR_VERBOSE
571  /// Convert the symbol name \a n to a form suitable for a diagnostic.
572  virtual std::string yytnamerr_ (const char *n);
573 #endif
574 
575 #if YYDEBUG
576  /// A type to store symbol numbers and -1.
577  typedef short int rhs_number_type;
578  /// A `-1'-separated list of the rules' RHS.
579  static const rhs_number_type yyrhs_[];
580  /// For each rule, the index of the first RHS symbol in \a yyrhs_.
581  static const unsigned short int yyprhs_[];
582  /// For each rule, its source line number.
583  static const unsigned short int yyrline_[];
584  /// For each scanner token number, its symbol number.
585  static const unsigned short int yytoken_number_[];
586  /// Report on the debug stream that the rule \a r is going to be reduced.
587  virtual void yy_reduce_print_ (int r);
588  /// Print the state stack on the debug stream.
589  virtual void yystack_print_ ();
590 
591  /* Debugging. */
592  int yydebug_;
593  std::ostream* yycdebug_;
594 #endif
595 
596  /// Convert a scanner token number \a t to a symbol number.
598 
599  /// \brief Reclaim the memory associated to a symbol.
600  /// \param yymsg Why this token is reclaimed.
601  /// \param yytype The symbol type.
602  /// \param yyvaluep Its semantic value.
603  /// \param yylocationp Its location.
604  inline void yydestruct_ (const char* yymsg,
605  int yytype,
606  semantic_type* yyvaluep,
607  location_type* yylocationp);
608 
609  /// Pop \a n symbols the three stacks.
610  inline void yypop_ (unsigned int n = 1);
611 
612  /* Constants. */
613  static const int yyeof_;
614  /* LAST_ -- Last index in TABLE_. */
615  static const int yylast_;
616  static const int yynnts_;
617  static const int yyempty_;
618  static const int yyfinal_;
619  static const int yyterror_;
620  static const int yyerrcode_;
621  static const int yyntokens_;
622  static const unsigned int yyuser_token_number_max_;
624 
625  /* User arguments. */
626  class Driver& inDriver;
627  };
628 
629 /* Line 35 of lalr1.cc */
630 #line 58 "Parser.yy"
631 } } // torc::generic
632 
633 /* Line 35 of lalr1.cc */
634 #line 635 "Parser.h"
635 
636 
637 
638 #endif /* ! defined PARSER_HEADER_H */
static const unsigned short int yytable_[]
Definition: Parser.h:552
Represents attributes of a Port or PortReference object.
stack< location_type > location_stack_type
location stack type.
Definition: Parser.h:523
static const short int yypact_ninf_
Definition: Parser.h:537
location location_type
Symbol locations.
Definition: Parser.h:159
torc::generic::TimeStamp * timeStamp
Definition: Parser.h:142
Represents attributes of a Net object.
void set_debug_stream(std::ostream &)
Set the current debugging stream.
void set_debug_level(debug_level_type l)
Set the current debugging level.
torc::generic::InstanceInfo * instanceInfo
Definition: Parser.h:131
A Bison parser.
Definition: Parser.h:111
debug_level_type debug_level() const
The current debugging level.
torc::generic::NetAttributes * netAttributes
Definition: Parser.h:138
static const unsigned short int yytoken_number_[]
For each scanner token number, its symbol number.
Definition: Parser.h:585
static const int yyterror_
Definition: Parser.h:619
int state_type
State numbers.
Definition: Parser.h:517
token::yytokentype token_type
Token type.
Definition: Parser.h:463
class Driver & inDriver
Definition: Parser.h:626
static const unsigned short int yyrline_[]
For each rule, its source line number.
Definition: Parser.h:583
Represents the portDelay attribute on Port or PortReference.
Definition: PortDelay.hpp:36
virtual void error(const location_type &loc, const std::string &msg)
Definition: Parser.cc:16544
virtual ~Parser()
Definition: Parser.cc:555
torc::generic::LogicListData * logicListData
Definition: Parser.h:146
stack< semantic_type > semantic_stack_type
Semantic value stack type.
Definition: Parser.h:521
torc::generic::VersionData * edifVersion
Definition: Parser.h:133
Represents the netDelay attribute of Net.
Definition: NetDelay.hpp:32
state_stack_type yystate_stack_
The state stack.
Definition: Parser.h:526
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
static const unsigned short int yydefact_[]
Definition: Parser.h:542
torc::generic::PortListData * portListData
Definition: Parser.h:130
static const unsigned short int yystos_[]
For a state, its accessing symbol.
Definition: Parser.h:558
static const short int yycheck_[]
Definition: Parser.h:555
std::string string
virtual void yy_symbol_value_print_(int yytype, const semantic_type *yyvaluep, const location_type *yylocationp)
Report a symbol value on the debug stream.
stack< state_type > state_stack_type
State stack type.
Definition: Parser.h:519
static const unsigned short int yyr1_[]
For a rule, its LHS.
Definition: Parser.h:561
location_stack_type yylocation_stack_
The location stack.
Definition: Parser.h:530
torc::generic::LogicValueAttributes * logicValueAttributes
Definition: Parser.h:145
static const int yyfinal_
Definition: Parser.h:618
Represents the time in Universal Time Coordinate (year, month, day, hour, minute, second) ...
Definition: TimeStamp.hpp:29
Parser(class Driver &inDriver_yyarg)
Build a parser object.
Definition: Parser.cc:545
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
Definition: Parser.cc:2085
torc::generic::PairStrData * pairStrData
Definition: Parser.h:143
static const short int yypgoto_[]
Definition: Parser.h:544
torc::generic::ParamAssignInfo * paramAssignInfo
Definition: Parser.h:136
static const int yynnts_
Definition: Parser.h:616
static const unsigned int yyuser_token_number_max_
Definition: Parser.h:622
Represents attributes of a view interface.
torc::generic::PortAttributes * portAttributes
Definition: Parser.h:137
virtual std::string yysyntax_error_(int yystate, int tok)
Definition: Parser.cc:14056
torc::generic::InstanceRefData * instanceRef
Definition: Parser.h:129
static const short int yydefgoto_[]
Definition: Parser.h:545
torc::generic::ValueData * valueData
Definition: Parser.h:134
virtual std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
virtual void yy_symbol_print_(int yytype, const semantic_type *yyvaluep, const location_type *yylocationp)
Report a symbol on the debug stream.
std::ostream * yycdebug_
Definition: Parser.h:593
This class is used within simulationInfo construct to define a logic value to use for modeling...
std::vector< size_t > * arrayDimensions
Definition: Parser.h:132
static const int yyeof_
Definition: Parser.h:613
Symbol semantic values.
Definition: Parser.h:116
semantic_stack_type yysemantic_stack_
The semantic value stack.
Definition: Parser.h:528
torc::generic::PortInstData * portInst
Definition: Parser.h:141
std::ostream & debug_stream() const
The current debugging stream.
static const int yyempty_
Definition: Parser.h:617
static const short int yypact_[]
For a state, the index in yytable_ of its portion.
Definition: Parser.h:536
static const signed char yytable_ninf_
Definition: Parser.h:553
torc::generic::PortDelay * portDelay
Definition: Parser.h:139
torc::generic::NetDelay * netDelay
Definition: Parser.h:140
void yydestruct_(const char *yymsg, int yytype, semantic_type *yyvaluep, location_type *yylocationp)
Reclaim the memory associated to a symbol.
Definition: Parser.cc:591
static const int yyerrcode_
Definition: Parser.h:620
token_number_type yytranslate_(int t)
Convert a scanner token number t to a symbol number.
Definition: Parser.cc:16449
virtual int parse()
Definition: Parser.cc:2120
static const int yyntokens_
Definition: Parser.h:621
torc::generic::NameData * nameData
Definition: Parser.h:125
static const char *const yytname_[]
For a symbol, its name in clear.
Definition: Parser.h:567
torc::generic::ViewRefData * viewRefData
Definition: Parser.h:126
torc::generic::PairData * pairData
Definition: Parser.h:135
static const token_number_type yyundef_token_
Definition: Parser.h:623
static const int yylast_
Definition: Parser.h:615
static const unsigned short int yyprhs_[]
For each rule, the index of the first RHS symbol in yyrhs_.
Definition: Parser.h:581
#define YYSTYPE
Definition: LutParser.hpp:84
static const rhs_number_type yyrhs_[]
A `-1'-separated list of the rules' RHS.
Definition: Parser.h:579
short int rhs_number_type
A type to store symbol numbers and -1.
Definition: Parser.h:577
virtual void yystack_print_()
Print the state stack on the debug stream.
torc::generic::PortRefData * portRefData
Definition: Parser.h:128
int debug_level_type
Type for debugging levels.
Definition: Parser.h:480
torc::generic::CellRefData * cellRefData
Definition: Parser.h:127
unsigned short int token_number_type
Internal symbol numbers.
Definition: Parser.h:533
torc::generic::InterfaceAttributes * interfaceAttributes
Definition: Parser.h:144
torc::generic::LogicRefData * logicRefData
Definition: Parser.h:147
static const unsigned char yyr2_[]
For a rule, its RHS length.
Definition: Parser.h:563
torc::generic::NetRefData * netRefData
Definition: Parser.h:148