torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::XdlParser Class Reference

A Bison parser. More...

#include <XdlParser.hpp>

+ Collaboration diagram for torc::XdlParser:

Data Structures

struct  token
 Tokens. More...
 

Public Types

typedef YYSTYPE semantic_type
 Symbol semantic values. More...
 
typedef location location_type
 Symbol locations. More...
 
typedef token::yytokentype token_type
 Token type. More...
 
typedef int debug_level_type
 Type for debugging levels. More...
 

Public Member Functions

 XdlParser (class XdlImporter &xdl_yyarg)
 Build a parser object. More...
 
virtual ~XdlParser ()
 
virtual int parse ()
 
std::ostream & debug_stream () const
 The current debugging stream. More...
 
void set_debug_stream (std::ostream &)
 Set the current debugging stream. More...
 
debug_level_type debug_level () const
 The current debugging level. More...
 
void set_debug_level (debug_level_type l)
 Set the current debugging level. More...
 

Private Types

typedef int state_type
 State numbers. More...
 
typedef stack< state_typestate_stack_type
 State stack type. More...
 
typedef stack< semantic_typesemantic_stack_type
 Semantic value stack type. More...
 
typedef stack< location_typelocation_stack_type
 location stack type. More...
 
typedef unsigned char token_number_type
 Internal symbol numbers. More...
 

Private Member Functions

virtual void error (const location_type &loc, const std::string &msg)
 
virtual std::string yysyntax_error_ (int yystate, int tok)
 
virtual std::string yytnamerr_ (const char *n)
 Convert the symbol name n to a form suitable for a diagnostic. More...
 
token_number_type yytranslate_ (int t)
 Convert a scanner token number t to a symbol number. More...
 
void yydestruct_ (const char *yymsg, int yytype, semantic_type *yyvaluep, location_type *yylocationp)
 Reclaim the memory associated to a symbol. More...
 
void yypop_ (unsigned int n=1)
 Pop n symbols the three stacks. More...
 

Private Attributes

state_stack_type yystate_stack_
 The state stack. More...
 
semantic_stack_type yysemantic_stack_
 The semantic value stack. More...
 
location_stack_type yylocation_stack_
 The location stack. More...
 
int yydebug_
 
std::ostream * yycdebug_
 
class XdlImporterxdl
 

Static Private Attributes

static const signed char yypact_ []
 For a state, the index in yytable_ of its portion. More...
 
static const signed char yypact_ninf_ = -81
 
static const unsigned char yydefact_ []
 
static const signed char yypgoto_ []
 
static const short int yydefgoto_ []
 
static const short int yytable_ []
 
static const signed char yytable_ninf_ = -4
 
static const short int yycheck_ []
 
static const unsigned char yystos_ []
 For a state, its accessing symbol. More...
 
static const unsigned char yyr1_ []
 For a rule, its LHS. More...
 
static const unsigned char yyr2_ []
 For a rule, its RHS length. More...
 
static const char *const yytname_ []
 For a symbol, its name in clear. More...
 
static const int yyeof_ = 0
 
static const int yylast_ = 124
 
static const int yynnts_ = 68
 
static const int yyempty_ = -2
 
static const int yyfinal_ = 6
 
static const int yyterror_ = 1
 
static const int yyerrcode_ = 256
 
static const int yyntokens_ = 41
 
static const unsigned int yyuser_token_number_max_ = 291
 
static const token_number_type yyundef_token_ = 2
 

Detailed Description

A Bison parser.

Definition at line 149 of file XdlParser.hpp.

Member Typedef Documentation

Type for debugging levels.

Definition at line 220 of file XdlParser.hpp.

location stack type.

Definition at line 262 of file XdlParser.hpp.

Symbol locations.

Definition at line 159 of file XdlParser.hpp.

Semantic value stack type.

Definition at line 260 of file XdlParser.hpp.

Symbol semantic values.

Definition at line 156 of file XdlParser.hpp.

State stack type.

Definition at line 258 of file XdlParser.hpp.

typedef int torc::XdlParser::state_type
private

State numbers.

Definition at line 256 of file XdlParser.hpp.

typedef unsigned char torc::XdlParser::token_number_type
private

Internal symbol numbers.

Definition at line 272 of file XdlParser.hpp.

Token type.

Definition at line 204 of file XdlParser.hpp.

Constructor & Destructor Documentation

torc::XdlParser::XdlParser ( class XdlImporter xdl_yyarg)

Build a parser object.

Definition at line 147 of file XdlParser.cpp.

148  : yydebug_ (false),
149  yycdebug_ (&std::cerr),
150  xdl (xdl_yyarg)
151  {
152  }
std::ostream * yycdebug_
Definition: XdlParser.hpp:362
class XdlImporter & xdl
Definition: XdlParser.hpp:366
torc::XdlParser::~XdlParser ( )
virtual

Definition at line 154 of file XdlParser.cpp.

155  {
156  }

Member Function Documentation

XdlParser::debug_level_type torc::XdlParser::debug_level ( ) const

The current debugging level.

Definition at line 229 of file XdlParser.cpp.

230  {
231  return yydebug_;
232  }
std::ostream & torc::XdlParser::debug_stream ( ) const

The current debugging stream.

Definition at line 216 of file XdlParser.cpp.

217  {
218  return *yycdebug_;
219  }
std::ostream * yycdebug_
Definition: XdlParser.hpp:362
void torc::XdlParser::error ( const location_type loc,
const std::string &  msg 
)
privatevirtual

Report a syntax error.

Parameters
locwhere the syntax error is found.
msga description of the syntax error.

Definition at line 1525 of file XdlParser.cpp.

1525  {
1526  xdl.error(l, m);
1527 }
void error(const location &l, const string &m)
Error handling with associated line number.
class XdlImporter & xdl
Definition: XdlParser.hpp:366

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int torc::XdlParser::parse ( )
virtual

Parse.

Returns
0 iff parsing succeeded.

Look-ahead and look-ahead in internal form.

Semantic value of the look-ahead.

Location of the look-ahead.

The locations where the error started and ended.

$$.

$.

Definition at line 242 of file XdlParser.cpp.

243  {
244  /// Look-ahead and look-ahead in internal form.
245  int yychar = yyempty_;
246  int yytoken = 0;
247 
248  /* State. */
249  int yyn;
250  int yylen = 0;
251  int yystate = 0;
252 
253  /* Error handling. */
254  int yynerrs_ = 0;
255  int yyerrstatus_ = 0;
256 
257  /// Semantic value of the look-ahead.
258  semantic_type yylval;
259  /// Location of the look-ahead.
260  location_type yylloc;
261  /// The locations where the error started and ended.
262  location yyerror_range[2];
263 
264  /// $$.
265  semantic_type yyval;
266  /// @$.
267  location_type yyloc;
268 
269  int yyresult;
270 
271  YYCDEBUG << "Starting parse" << std::endl;
272 
273 
274  /* User initialization code. */
275  #line 93 "/Volumes/project/dev/torc/trunk/src/torc/physical/xdl/parser.yy"
276 {
277  // initialize the initial location object
278  yylloc.begin.filename = yylloc.end.filename = &xdl.mStreamName;
279 }
280  /* Line 555 of yacc.c. */
281 #line 282 "XdlParser.cpp"
282  /* Initialize the stacks. The initial state will be pushed in
283  yynewstate, since the latter expects the semantical and the
284  location values to have been already stored, initialize these
285  stacks with a primary value. */
289  yysemantic_stack_.push (yylval);
290  yylocation_stack_.push (yylloc);
291 
292  /* New state. */
293  yynewstate:
294  yystate_stack_.push (yystate);
295  YYCDEBUG << "Entering state " << yystate << std::endl;
296  goto yybackup;
297 
298  /* Backup. */
299  yybackup:
300 
301  /* Try to take a decision without look-ahead. */
302  yyn = yypact_[yystate];
303  if (yyn == yypact_ninf_)
304  goto yydefault;
305 
306  /* Read a look-ahead token. */
307  if (yychar == yyempty_)
308  {
309  YYCDEBUG << "Reading a token: ";
310  yychar = yylex (&yylval, &yylloc);
311  }
312 
313 
314  /* Convert token to internal form. */
315  if (yychar <= yyeof_)
316  {
317  yychar = yytoken = yyeof_;
318  YYCDEBUG << "Now at end of input." << std::endl;
319  }
320  else
321  {
322  yytoken = yytranslate_ (yychar);
323  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
324  }
325 
326  /* If the proper action on seeing token YYTOKEN is to reduce or to
327  detect an error, take that action. */
328  yyn += yytoken;
329  if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
330  goto yydefault;
331 
332  /* Reduce or error. */
333  yyn = yytable_[yyn];
334  if (yyn <= 0)
335  {
336  if (yyn == 0 || yyn == yytable_ninf_)
337  goto yyerrlab;
338  yyn = -yyn;
339  goto yyreduce;
340  }
341 
342  /* Accept? */
343  if (yyn == yyfinal_)
344  goto yyacceptlab;
345 
346  /* Shift the look-ahead token. */
347  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
348 
349  /* Discard the token being shifted unless it is eof. */
350  if (yychar != yyeof_)
351  yychar = yyempty_;
352 
353  yysemantic_stack_.push (yylval);
354  yylocation_stack_.push (yylloc);
355 
356  /* Count tokens shifted since error; after three, turn off error
357  status. */
358  if (yyerrstatus_)
359  --yyerrstatus_;
360 
361  yystate = yyn;
362  goto yynewstate;
363 
364  /*-----------------------------------------------------------.
365  | yydefault -- do the default action for the current state. |
366  `-----------------------------------------------------------*/
367  yydefault:
368  yyn = yydefact_[yystate];
369  if (yyn == 0)
370  goto yyerrlab;
371  goto yyreduce;
372 
373  /*-----------------------------.
374  | yyreduce -- Do a reduction. |
375  `-----------------------------*/
376  yyreduce:
377  yylen = yyr2_[yyn];
378  /* If YYLEN is nonzero, implement the default value of the action:
379  `$$ = $1'. Otherwise, use the top of the stack.
380 
381  Otherwise, the following line sets YYVAL to garbage.
382  This behavior is undocumented and Bison
383  users should not rely upon it. */
384  if (yylen)
385  yyval = yysemantic_stack_[yylen - 1];
386  else
387  yyval = yysemantic_stack_[0];
388 
389  {
391  YYLLOC_DEFAULT (yyloc, slice, yylen);
392  }
393  YY_REDUCE_PRINT (yyn);
394  switch (yyn)
395  {
396  case 3:
397 #line 177 "parser.yy"
398  {
399  std::clog << "INFO: Parsed " << xdl.mInstanceCount << " instances, "
400  << xdl.mNetCount << " nets, " << xdl.mConfigCount << " settings"
401  << std::endl;
402  }
403  break;
404 
405  case 9:
406 #line 192 "parser.yy"
407  { /*std::clog << "ERROR at " << yylval << std::endl;*/ }
408  break;
409 
410  case 11:
411 #line 201 "parser.yy"
412  { xdl.mConfigMap.clearConfig(); }
413  break;
414 
415  case 12:
416 #line 202 "parser.yy"
417  {
418  if(true) std::clog << "INFO: design \"" << xdl.mDesignName << "\" "
420  << std::endl;
421  // create the design
422  xdl.mDesignPtr = Factory::newDesignPtr(xdl.mDesignName,
425  // add the design configs
426  xdl.mDesignPtr->addConfigs(xdl.mConfigMap);
427  // the design is the de facto circuit for instances and nets encountered
429  // construct and initialize the device database if applicable
431  }
432  break;
433 
434  case 13:
435 #line 220 "parser.yy"
436  {
438  xdl.lexer->last_string.clear();
439  }
440  break;
441 
442  case 16:
443 #line 232 "parser.yy"
444  {
445  torc::common::DeviceDesignator designator((yysemantic_stack_[(2) - (1)]));
446  xdl.mDesignDevice = designator.getDeviceName();
447  xdl.mDesignPackage = designator.getDevicePackage();
448  xdl.mDesignSpeedGrade = (yysemantic_stack_[(2) - (2)]);
449  }
450  break;
451 
452  case 17:
453 #line 240 "parser.yy"
454  { xdl.mDesignDevice = (yysemantic_stack_[(1) - (1)]); }
455  break;
456 
457  case 18:
458 #line 243 "parser.yy"
459  { xdl.mDesignPackage = (yysemantic_stack_[(1) - (1)]); }
460  break;
461 
462  case 19:
463 #line 246 "parser.yy"
464  { xdl.mDesignSpeedGrade = (yysemantic_stack_[(1) - (1)]); }
465  break;
466 
467  case 21:
468 #line 251 "parser.yy"
469  { xdl.mDesignXdlVersion = (yysemantic_stack_[(1) - (1)]); }
470  break;
471 
472  case 28:
473 #line 284 "parser.yy"
475  break;
476 
477  case 29:
478 #line 285 "parser.yy"
480  break;
481 
482  case 30:
483 #line 286 "parser.yy"
485  break;
486 
487  case 31:
488 #line 287 "parser.yy"
489  {
490  xdl.mModuleCount++;
491  if(false) std::clog << "INFO: module \"" << xdl.mModuleName
492  << "\" @ \"" << xdl.mModuleAnchor << std::endl;
493  // create the module
494  xdl.mModulePtr = Factory::newModulePtr(xdl.mModuleName,
496  // add the instance to the design
497  xdl.mDesignPtr->addModule(xdl.mModulePtr);
498  xdl.mModulePtr->setParentWeakPtr(xdl.mDesignPtr);
499  // add the module configs
500  xdl.mModulePtr->addConfigs(xdl.mConfigMap);
501  // set this module as the current circuit
503  }
504  break;
505 
506  case 32:
507 #line 305 "parser.yy"
508  {
509  if(false) std::clog << "INFO: endmodule" << std::endl;
510  // iterate through the ports and instantiate them
511  PortTempVector::const_iterator p = xdl.mPortTempVector.begin();
512  PortTempVector::const_iterator e = xdl.mPortTempVector.end();
513  while(p < e) {
514  // get the port fields
515  const string& name = p->getName();
516  const string& instance = p->getInstance();
517  const string& pin = p->getPin();
518  // try to look up the instance in this module
519  // we should normally be more careful with lock(), but who else is
520  // going to discard our pointer targets if the parser hasn't even
521  // exposed the design to the world yet?
522  Circuit::InstanceSharedPtrIterator instanceIterator
523  = xdl.mCircuitPtr.lock()->findInstance(instance);
525  xdl.mCircuitPtr.lock()->instancesEnd();
526  // catch references to undeclared instances
527  if(instanceIterator == end) {
528  std::stringstream ss;
529  ss << "Error: unknown instance \"" << xdl.mInstanceName
530  << "\" for port \"" << xdl.mPortName << "\" in module \""
531  << xdl.mModuleName << "\".";
532  xdl.error(ss.str()); //YYERROR;
533  xdl.failure();
534  } else {
535  if(false) std::clog << "INFO: port \"" << name << "\" "
536  << instance << "." << pin << std::endl;
537  PortSharedPtr portPtr = Factory::newPortPtr(name,
538  *instanceIterator, pin);
539  xdl.mModulePtr->addPort(portPtr);
540  }
541  // proceed to the next port
542  p++;
543  }
544  // the design is the de facto circuit for instances and nets
545  // encountered outside of this module
547  }
548  break;
549 
550  case 33:
551 #line 351 "parser.yy"
553  break;
554 
555  case 34:
556 #line 352 "parser.yy"
558  break;
559 
560  case 35:
561 #line 353 "parser.yy"
563  break;
564 
565  case 36:
566 #line 353 "parser.yy"
567  {
569  xdl.mPortPin));
570  }
571  break;
572 
573  case 37:
574 #line 367 "parser.yy"
576  break;
577 
578  case 38:
579 #line 368 "parser.yy"
581  break;
582 
583  case 39:
584 #line 369 "parser.yy"
586  break;
587 
588  case 40:
589 #line 372 "parser.yy"
590  {
592  if(false) std::clog << "INFO: inst " << xdl.mInstanceType << " \""
593  << xdl.mInstanceName << "\"" << " @ " << xdl.mInstanceSite << " ("
594  << xdl.mInstanceTile << ")" << std::endl;
595  // create the instance
596  xdl.mInstancePtr = Factory::newInstancePtr(xdl.mInstanceName,
599  // add the instance to the current circuit
600  xdl.mCircuitPtr.lock()->addInstance(xdl.mInstancePtr);
601  xdl.mInstancePtr->setParentWeakPtr(xdl.mCircuitPtr);
602  // add the instance configs
603  xdl.mInstancePtr->addConfigs(xdl.mConfigMap);
604  }
605  break;
606 
607  case 41:
608 #line 390 "parser.yy"
609  {
610  xdl.mInstanceSite.clear(); xdl.mInstanceTile.clear();
612  }
613  break;
614 
615  case 42:
616 #line 394 "parser.yy"
617  {
618  xdl.mInstanceTile = (yysemantic_stack_[(4) - (2)]); xdl.mInstanceSite = (yysemantic_stack_[(4) - (3)]);
619  if(false) std::clog << "INFO: " << xdl.mInstanceTile << " " <<
620  xdl.mInstanceSite << " " << xdl.mInstanceBonding << std::endl;
621  }
622  break;
623 
624  case 43:
625 #line 402 "parser.yy"
627  break;
628 
629  case 44:
630 #line 403 "parser.yy"
632  break;
633 
634  case 45:
635 #line 404 "parser.yy"
637  break;
638 
639  case 50:
640 #line 415 "parser.yy"
641  { xdl.mReferenceModulePtr.reset(); xdl.mReferenceInstancePtr.reset(); }
642  break;
643 
644  case 51:
645 #line 416 "parser.yy"
647  = xdl.lexer->last_string; }
648  break;
649 
650  case 52:
651 #line 418 "parser.yy"
652  {
654  // look up the module
655  Design::ModuleSharedPtrIterator moduleIterator
656  = xdl.mDesignPtr->findModule(xdl.mReferenceModule);
657  Design::ModuleSharedPtrIterator end = xdl.mDesignPtr->modulesEnd();
658  if(moduleIterator == end) {
659  std::stringstream ss;
660  ss << "Error: unknown module \"" << xdl.mReferenceModule
661  << "\" referenced by instance \"" << xdl.mInstanceName << "\".";
662  xdl.error(ss.str()); YYERROR;
663  }
664  xdl.mReferenceModulePtr = *moduleIterator;
665  }
666  break;
667 
668  case 53:
669 #line 432 "parser.yy"
670  {
672  // look up the instance
673  Circuit::InstanceSharedPtrIterator instanceIterator
676  = xdl.mReferenceModulePtr->instancesEnd();
677  if(instanceIterator == end) {
678  std::stringstream ss;
679  ss << "Error: unknown instance \"" << xdl.mReferenceInstance
680  << "\" in module \"" << xdl.mReferenceModule
681  << "\" referenced by instance \"" << xdl.mInstanceName << "\".";
682  xdl.error(ss.str()); YYERROR;
683  }
684  xdl.mReferenceInstancePtr = *instanceIterator;
685  // create an instance reference
686  InstanceReferenceSharedPtr instanceReferencePtr
687  = Factory::newInstanceReferencePtr(xdl.mReferenceInstantiation,
689  xdl.mInstanceReferencePtr = instanceReferencePtr;
690  }
691  break;
692 
693  case 54:
694 #line 470 "parser.yy"
695  { xdl.mConfigMap.clearConfig(); }
696  break;
697 
698  case 55:
699 #line 471 "parser.yy"
701  break;
702 
703  case 56:
704 #line 472 "parser.yy"
705  {
706  xdl.mNetCount++;
707  // create the net
708  xdl.mNetPtr = Factory::newNetPtr(xdl.mNetName, xdl.mNetType);
709  }
710  break;
711 
712  case 57:
713 #line 476 "parser.yy"
714  {
715  // add the net to the current circuit
716  CircuitSharedPtr circuitPtr = xdl.mCircuitPtr.lock();
717  circuitPtr->addNet(xdl.mNetPtr);
718  // add the net configs
719  xdl.mNetPtr->addConfigs(xdl.mConfigMap);
720  if(false) std::clog << "INFO: net " << xdl.mNetName << std::endl;
721  }
722  break;
723 
724  case 58:
725 #line 487 "parser.yy"
727  break;
728 
729  case 59:
730 #line 488 "parser.yy"
731  { xdl.mNetType = eNetTypePower; }
732  break;
733 
734  case 60:
735 #line 489 "parser.yy"
737  break;
738 
739  case 70:
740 #line 513 "parser.yy"
741  {
743  xdl.mPinName = yylval;
744  CircuitSharedPtr circuitPtr = xdl.mCircuitPtr.lock();
745  Circuit::InstanceSharedPtrIterator instanceIterator
746  = circuitPtr->findInstance(xdl.mInstanceName);
747  Circuit::InstanceSharedPtrIterator end = circuitPtr->instancesEnd();
748  // catch references to undeclared instances
749  if(instanceIterator == end) {
750  std::stringstream ss;
751  ss << "Error: unknown instance \"" << xdl.mInstanceName
752  << "\" for pin \"" << xdl.mInstanceName << "."
753  << xdl.mPinName << "\".";
754  xdl.error(ss.str()); YYERROR;
755  }
756  // proceed with the instance pin creation
757  InstanceSharedPtr instancePtr = *instanceIterator;
758  InstancePinSharedPtr instancePinPtr
759  = Factory::newInstancePinPtr(instancePtr, xdl.mPinName);
760  xdl.bind(instancePinPtr);
761  switch(xdl.mPinDirection) {
762  case ePinDirectionInpin:
763  xdl.mNetPtr->addSink(instancePinPtr);
764  break;
765  case ePinDirectionOutpin:
766  xdl.mNetPtr->addSource(instancePinPtr);
767  break;
768  default:
769  break;
770  }
771  }
772  break;
773 
774  case 71:
775 #line 547 "parser.yy"
777  break;
778 
779  case 72:
780 #line 548 "parser.yy"
782  break;
783 
784  case 73:
785 #line 554 "parser.yy"
786  { xdl.mPipTile = yylval; }
787  break;
788 
789  case 74:
790 #line 555 "parser.yy"
791  { xdl.mPipSource = yylval; }
792  break;
793 
794  case 75:
795 #line 557 "parser.yy"
796  { xdl.mPipSink = yylval; }
797  break;
798 
799  case 76:
800 #line 562 "parser.yy"
802  break;
803 
804  case 77:
805 #line 564 "parser.yy"
807  break;
808 
809  case 78:
810 #line 566 "parser.yy"
812  break;
813 
814  case 79:
815 #line 568 "parser.yy"
817  break;
818 
819  case 80:
820 #line 572 "parser.yy"
821  {
822  Pip pip = Factory::newPip(xdl.mPipTile, xdl.mPipSource, xdl.mPipSink,
824  xdl.mNetPtr->addPip(pip);
825  xdl.bind(pip, XdlImporter::ePipTypeRegular);
826  }
827  break;
828 
829  case 81:
830 #line 578 "parser.yy"
831  { xdl.mRoutethroughConfigSetting = yylval; }
832  break;
833 
834  case 82:
835 #line 579 "parser.yy"
836  { xdl.mRoutethroughConfigName = yylval; }
837  break;
838 
839  case 83:
840 #line 580 "parser.yy"
841  { xdl.mRoutethroughConfigValue = yylval; }
842  break;
843 
844  case 84:
845 #line 581 "parser.yy"
847  break;
848 
849  case 85:
850 #line 582 "parser.yy"
851  { xdl.mRoutethroughSource = yylval; }
852  break;
853 
854  case 86:
855 #line 583 "parser.yy"
856  {
857  xdl.mRoutethroughSink = yylval;
858  // look up the routethrough instance
859  CircuitSharedPtr circuitPtr = xdl.mCircuitPtr.lock();
861  = circuitPtr->findInstance(xdl.mRoutethroughInstance);
863  = circuitPtr->instancesEnd();
864  // catch references to undeclared instances
865  if(instanceIterator == end) {
866  PipVector::const_iterator pipIter = --(xdl.mNetPtr->pipsEnd());
867  std::stringstream ss;
868  ss << "Error: unknown routhethrough instance \""
869  << xdl.mRoutethroughInstance << "\" for pip \"" << *pipIter
870  << "\".";
871  xdl.error(ss.str()); YYERROR;
872  }
873  // proceed with the routethrough creation
874  const InstanceWeakPtr instancePtr = *instanceIterator;
875  // create a routethrough
876  RoutethroughSharedPtr routethroughPtr
877  = Factory::newRoutethroughPtr(xdl.mRoutethroughConfigSetting,
880  Pip pip = Factory::newPip(xdl.mPipTile, xdl.mPipSource, xdl.mPipSink,
881  xdl.mPipDirection, routethroughPtr);
882  xdl.mNetPtr->addPip(pip);
883  xdl.bind(pip, XdlImporter::ePipTypeRoutethrough);
884  }
885  break;
886 
887  case 89:
888 #line 622 "parser.yy"
889  { xdl.mConfigMap.clearConfig(); }
890  break;
891 
892  case 93:
893 #line 631 "parser.yy"
894  {
895  if(xdl.mConfigValue.compare("#OFF")) {
897  xdl.mConfigValue);
898  if(false) std::clog << "INFO: " << xdl.mConfigSetting << ":"
899  << xdl.mConfigName << ":" << xdl.mConfigValue << std::endl;
900  xdl.mConfigCount++;
901  }
902  }
903  break;
904 
905  case 94:
906 #line 643 "parser.yy"
907  { xdl.mConfigSetting = (yysemantic_stack_[(1) - (1)]); }
908  break;
909 
910  case 95:
911 #line 647 "parser.yy"
912  { xdl.mConfigName.clear(); }
913  break;
914 
915  case 96:
916 #line 648 "parser.yy"
917  { xdl.mConfigName = (yysemantic_stack_[(1) - (1)]); }
918  break;
919 
920  case 97:
921 #line 652 "parser.yy"
922  { xdl.mConfigValue.clear(); }
923  break;
924 
925  case 98:
926 #line 653 "parser.yy"
927  { xdl.mConfigValue = (yysemantic_stack_[(1) - (1)]); }
928  break;
929 
930  case 99:
931 #line 659 "parser.yy"
932  {
933  if(false) std::clog << "STRING: \"" << xdl.lexer->last_string << "\""
934  << std::endl;
935  }
936  break;
937 
938 
939  /* Line 675 of lalr1.cc. */
940 #line 941 "XdlParser.cpp"
941  default: break;
942  }
943  YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
944 
945  yypop_ (yylen);
946  yylen = 0;
947  YY_STACK_PRINT ();
948 
949  yysemantic_stack_.push (yyval);
950  yylocation_stack_.push (yyloc);
951 
952  /* Shift the result of the reduction. */
953  yyn = yyr1_[yyn];
954  yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
955  if (0 <= yystate && yystate <= yylast_
956  && yycheck_[yystate] == yystate_stack_[0])
957  yystate = yytable_[yystate];
958  else
959  yystate = yydefgoto_[yyn - yyntokens_];
960  goto yynewstate;
961 
962  /*------------------------------------.
963  | yyerrlab -- here on detecting error |
964  `------------------------------------*/
965  yyerrlab:
966  /* If not already recovering from an error, report this error. */
967  if (!yyerrstatus_)
968  {
969  ++yynerrs_;
970  error (yylloc, yysyntax_error_ (yystate, yytoken));
971  }
972 
973  yyerror_range[0] = yylloc;
974  if (yyerrstatus_ == 3)
975  {
976  /* If just tried and failed to reuse look-ahead token after an
977  error, discard it. */
978 
979  if (yychar <= yyeof_)
980  {
981  /* Return failure if at end of input. */
982  if (yychar == yyeof_)
983  YYABORT;
984  }
985  else
986  {
987  yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc);
988  yychar = yyempty_;
989  }
990  }
991 
992  /* Else will try to reuse look-ahead token after shifting the error
993  token. */
994  goto yyerrlab1;
995 
996 
997  /*---------------------------------------------------.
998  | yyerrorlab -- error raised explicitly by YYERROR. |
999  `---------------------------------------------------*/
1000  yyerrorlab:
1001 
1002  /* Pacify compilers like GCC when the user code never invokes
1003  YYERROR and the label yyerrorlab therefore never appears in user
1004  code. */
1005  if (false)
1006  goto yyerrorlab;
1007 
1008  yyerror_range[0] = yylocation_stack_[yylen - 1];
1009  /* Do not reclaim the symbols of the rule which action triggered
1010  this YYERROR. */
1011  yypop_ (yylen);
1012  yylen = 0;
1013  yystate = yystate_stack_[0];
1014  goto yyerrlab1;
1015 
1016  /*-------------------------------------------------------------.
1017  | yyerrlab1 -- common code for both syntax error and YYERROR. |
1018  `-------------------------------------------------------------*/
1019  yyerrlab1:
1020  yyerrstatus_ = 3; /* Each real token shifted decrements this. */
1021 
1022  for (;;)
1023  {
1024  yyn = yypact_[yystate];
1025  if (yyn != yypact_ninf_)
1026  {
1027  yyn += yyterror_;
1028  if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
1029  {
1030  yyn = yytable_[yyn];
1031  if (0 < yyn)
1032  break;
1033  }
1034  }
1035 
1036  /* Pop the current state because it cannot handle the error token. */
1037  if (yystate_stack_.height () == 1)
1038  YYABORT;
1039 
1040  yyerror_range[0] = yylocation_stack_[0];
1041  yydestruct_ ("Error: popping",
1042  yystos_[yystate],
1044  yypop_ ();
1045  yystate = yystate_stack_[0];
1046  YY_STACK_PRINT ();
1047  }
1048 
1049  if (yyn == yyfinal_)
1050  goto yyacceptlab;
1051 
1052  yyerror_range[1] = yylloc;
1053  // Using YYLLOC is tempting, but would change the location of
1054  // the look-ahead. YYLOC is available though.
1055  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
1056  yysemantic_stack_.push (yylval);
1057  yylocation_stack_.push (yyloc);
1058 
1059  /* Shift the error token. */
1060  YY_SYMBOL_PRINT ("Shifting", yystos_[yyn],
1062 
1063  yystate = yyn;
1064  goto yynewstate;
1065 
1066  /* Accept. */
1067  yyacceptlab:
1068  yyresult = 0;
1069  goto yyreturn;
1070 
1071  /* Abort. */
1072  yyabortlab:
1073  yyresult = 1;
1074  goto yyreturn;
1075 
1076  yyreturn:
1077  if (yychar != yyeof_ && yychar != yyempty_)
1078  yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
1079 
1080  /* Do not reclaim the symbols of the rule which action triggered
1081  this YYABORT or YYACCEPT. */
1082  yypop_ (yylen);
1083  while (yystate_stack_.height () != 1)
1084  {
1085  yydestruct_ ("Cleanup: popping",
1086  yystos_[yystate_stack_[0]],
1087  &yysemantic_stack_[0],
1088  &yylocation_stack_[0]);
1089  yypop_ ();
1090  }
1091 
1092  return yyresult;
1093  }
std::string last_string
Last double-quoted string that we saw.
Definition: XdlScanner.hpp:74
torc::physical::ENetType mNetType
Current net type.
void failure(void)
Signals a parsing failure by deasserting the success flag.
static const signed char yypact_ninf_
Definition: XdlParser.hpp:276
string mDesignPackage
Package specified for the design.
static const int yyfinal_
Definition: XdlParser.hpp:353
static const signed char yypact_[]
For a state, the index in yytable_ of its portion.
Definition: XdlParser.hpp:275
void clearConfig(void)
Clears the configuration map.
Definition: ConfigMap.hpp:67
void setConfig(const string &inSetting, const Config &inConfig)
Sets the configuration for the given setting.
Definition: ConfigMap.hpp:119
#define YY_REDUCE_PRINT(Rule)
Definition: XdlParser.cpp:94
SiteName mInstanceSite
Current instance site name.
string mReferenceModule
Name of the referenced module.
InstanceSharedPtr mReferenceInstancePtr
Shared pointer to the referenced instance.
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: XdlParser.cpp:93
static const unsigned char yystos_[]
For a state, its accessing symbol.
Definition: XdlParser.hpp:297
Encapsulation of a device designator and its constituent elements.
string mDesignXdlVersion
XDL version read in by the design.
boost::uint32_t mInstanceCount
Number of instances read for the design.
ModuleSharedPtr mReferenceModulePtr
Shared pointer to the referenced module.
void yydestruct_(const char *yymsg, int yytype, semantic_type *yyvaluep, location_type *yylocationp)
Reclaim the memory associated to a symbol.
Definition: XdlParser.cpp:190
static const int yyterror_
Definition: XdlParser.hpp:354
#define yylex
Definition: XdlParser.cpp:36
string mDesignDevice
Device specified for the design.
string mPortName
Name of the port.
torc::physical::EInstanceBonding mInstanceBonding
Current instance bonding.
stack< location_type > location_stack_type
location stack type.
Definition: XdlParser.hpp:262
static const short int yycheck_[]
Definition: XdlParser.hpp:294
string mRoutethroughConfigSetting
Current routethrough config setting.
string mDesignSpeedGrade
Speed grade specified for the design.
string mInstanceName
Current instance name.
boost::shared_ptr< Port > PortSharedPtr
Shared pointer encapsulation of a Port.
Present a slice of the top of a stack.
string mPortPin
Current port pin name.
static const int yyntokens_
Definition: XdlParser.hpp:356
static const int yyempty_
Definition: XdlParser.hpp:352
InstanceSharedPtrVector::const_iterator InstanceSharedPtrConstIterator
Constant iterator to Instance shared pointers.
Definition: Circuit.hpp:72
virtual std::string yysyntax_error_(int yystate, int tok)
Definition: XdlParser.cpp:1097
PinName mPinName
Current pin name.
stack< semantic_type > semantic_stack_type
Semantic value stack type.
Definition: XdlParser.hpp:260
#define YY_STACK_PRINT()
Definition: XdlParser.cpp:95
stack< state_type > state_stack_type
State stack type.
Definition: XdlParser.hpp:258
TileName mPipTile
Current pip tile name.
ModuleSharedPtr mModulePtr
Shared pointer to the current module.
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
Definition: XdlParser.cpp:208
ConfigMap mConfigMap
Current config map.
TileName mInstanceTile
Current instance tile name.
virtual void error(const location_type &loc, const std::string &msg)
Definition: XdlParser.cpp:1525
WireName mRoutethroughSource
Current routethrough source wire name.
boost::shared_ptr< class InstancePin > InstancePinSharedPtr
Shared pointer encapsulation of an InstancePin.
boost::uint32_t mConfigCount
Number of configurations read for the design.
#define YYABORT
Definition: XdlParser.cpp:100
string mReferenceInstance
Name of the referenced instance.
void error(const location &l, const string &m)
Error handling with associated line number.
InstanceReferenceSharedPtr mInstanceReferencePtr
Shared pointer to instance reference.
YYSTYPE semantic_type
Symbol semantic values.
Definition: XdlParser.hpp:156
static const unsigned char yydefact_[]
Definition: XdlParser.hpp:281
class torc::XdlScanner * lexer
Pointer to the current lexer instance.
static const int yyeof_
Definition: XdlParser.hpp:348
#define YYCDEBUG
Definition: XdlParser.cpp:62
string mConfigName
Current config name.
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: LutParser.hpp:126
void push(const T &t)
Bison undocumented.
boost::uint32_t mModuleCount
Number of modules read for the design.
state_stack_type yystate_stack_
The state stack.
Definition: XdlParser.hpp:265
CircuitWeakPtr mCircuitPtr
Weak pointer to the circuit.
TileTypeName mInstanceType
Current instance type.
boost::shared_ptr< Circuit > CircuitSharedPtr
Shared pointer encapsulation of a Circuit.
Definition: Circuit.hpp:219
string mRoutethroughInstance
Current routethrough Instance name.
string mStreamName
Name of file or input stream for error messages.
static const unsigned char yyr1_[]
For a rule, its LHS.
Definition: XdlParser.hpp:300
static const short int yydefgoto_[]
Definition: XdlParser.hpp:284
DesignSharedPtr mDesignPtr
Shared pointer to the design.
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
virtual void bind(torc::physical::InstancePinSharedPtr &)
Bind the given instance pin to its database Tilewire if applicable.
static const unsigned char yyr2_[]
For a rule, its RHS length.
Definition: XdlParser.hpp:302
PortTempVector mPortTempVector
Vector of ports not yet mapped to instances.
location_stack_type yylocation_stack_
The location stack.
Definition: XdlParser.hpp:269
NetSharedPtr mNetPtr
Shared pointer to the current net.
location location_type
Symbol locations.
Definition: XdlParser.hpp:159
static const short int yytable_[]
Definition: XdlParser.hpp:291
Physical design programmable interconnect point.
Definition: Pip.hpp:34
string mNetName
Current net name.
boost::shared_ptr< Routethrough > RoutethroughSharedPtr
Shared pointer encapsulation of a Routethrough.
WireName mPipSink
Current pip sink wire name.
string mReferenceInstantiation
Name under which the module was instantiated.
WireName mPipSource
Current pip source wire name.
virtual void initializeDatabase(void)
Initialize the database if applicable.
token_number_type yytranslate_(int t)
Convert a scanner token number t to a symbol number.
Definition: XdlParser.cpp:1459
boost::uint32_t mNetCount
Number of nets read for the design.
torc::physical::EPipDirection mPipDirection
Current pip directionality.
ModuleSharedPtrVector::iterator ModuleSharedPtrIterator
Non-constant iterator for Module shared pointers.
Temporary module port.
string mModuleAnchor
Module anchor instance name.
static const int yylast_
Definition: XdlParser.hpp:350
static const signed char yypgoto_[]
Definition: XdlParser.hpp:283
string mModuleName
Name of the module.
class XdlImporter & xdl
Definition: XdlParser.hpp:366
string mDesignName
Name of the design.
boost::weak_ptr< Instance > InstanceWeakPtr
Weak pointer encapsulation of an Instance.
string mRoutethroughConfigName
Current routethrough config name.
string mConfigValue
Current config value.
boost::shared_ptr< InstanceReference > InstanceReferenceSharedPtr
Shared pointer encapsulation of an InstanceReference.
semantic_stack_type yysemantic_stack_
The semantic value stack.
Definition: XdlParser.hpp:267
static const signed char yytable_ninf_
Definition: XdlParser.hpp:292
torc::physical::EPinDirection mPinDirection
Current pin direction.
InstanceSharedPtr mInstancePtr
Shared pointer to the current instance.
string mConfigSetting
Current config setting.
string mRoutethroughConfigValue
Current routethrough config value.
string mPortInstance
Current port instance name.
InstanceSharedPtrVector::iterator InstanceSharedPtrIterator
Non-constant iterator to Instance shared pointers.
Definition: Circuit.hpp:74
#define YYERROR
Definition: XdlParser.cpp:101
WireName mRoutethroughSink
Current routethrough sink wire name.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::XdlParser::set_debug_level ( debug_level_type  l)

Set the current debugging level.

Definition at line 235 of file XdlParser.cpp.

236  {
237  yydebug_ = l;
238  }

+ Here is the caller graph for this function:

void torc::XdlParser::set_debug_stream ( std::ostream &  o)

Set the current debugging stream.

Definition at line 222 of file XdlParser.cpp.

223  {
224  yycdebug_ = &o;
225  }
std::ostream * yycdebug_
Definition: XdlParser.hpp:362
void torc::XdlParser::yydestruct_ ( const char *  yymsg,
int  yytype,
semantic_type yyvaluep,
location_type yylocationp 
)
inlineprivate

Reclaim the memory associated to a symbol.

Parameters
yymsgWhy this token is reclaimed.
yytypeThe symbol type.
yyvaluepIts semantic value.
yylocationpIts location.

Definition at line 190 of file XdlParser.cpp.

192  {
193  YYUSE (yylocationp);
194  YYUSE (yymsg);
195  YYUSE (yyvaluep);
196 
197  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
198 
199  switch (yytype)
200  {
201 
202  default:
203  break;
204  }
205  }
#define YYUSE(e)
Definition: XdlParser.cpp:59
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: XdlParser.cpp:93

+ Here is the caller graph for this function:

void torc::XdlParser::yypop_ ( unsigned int  n = 1)
inlineprivate

Pop n symbols the three stacks.

Definition at line 208 of file XdlParser.cpp.

209  {
210  yystate_stack_.pop (n);
213  }
state_stack_type yystate_stack_
The state stack.
Definition: XdlParser.hpp:265
location_stack_type yylocation_stack_
The location stack.
Definition: XdlParser.hpp:269
void pop(unsigned int n=1)
Bison undocumented.
semantic_stack_type yysemantic_stack_
The semantic value stack.
Definition: XdlParser.hpp:267

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string torc::XdlParser::yysyntax_error_ ( int  yystate,
int  tok 
)
privatevirtual

Generate an error message.

Parameters
statethe state where the error occurred.
tokthe look-ahead token.

Definition at line 1097 of file XdlParser.cpp.

1098  {
1099  std::string res;
1100  YYUSE (yystate);
1101 #if YYERROR_VERBOSE
1102  int yyn = yypact_[yystate];
1103  if (yypact_ninf_ < yyn && yyn <= yylast_)
1104  {
1105  /* Start YYX at -YYN if negative to avoid negative indexes in
1106  YYCHECK. */
1107  int yyxbegin = yyn < 0 ? -yyn : 0;
1108 
1109  /* Stay within bounds of both yycheck and yytname. */
1110  int yychecklim = yylast_ - yyn + 1;
1111  int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
1112  int count = 0;
1113  for (int x = yyxbegin; x < yyxend; ++x)
1114  if (yycheck_[x + yyn] == x && x != yyterror_)
1115  ++count;
1116 
1117  // FIXME: This method of building the message is not compatible
1118  // with internationalization. It should work like yacc.c does it.
1119  // That is, first build a string that looks like this:
1120  // "syntax error, unexpected %s or %s or %s"
1121  // Then, invoke YY_ on this string.
1122  // Finally, use the string as a format to output
1123  // yytname_[tok], etc.
1124  // Until this gets fixed, this message appears in English only.
1125  res = "syntax error, unexpected ";
1126  res += yytnamerr_ (yytname_[tok]);
1127  if (count < 5)
1128  {
1129  count = 0;
1130  for (int x = yyxbegin; x < yyxend; ++x)
1131  if (yycheck_[x + yyn] == x && x != yyterror_)
1132  {
1133  res += (!count++) ? ", expecting " : " or ";
1134  res += yytnamerr_ (yytname_[x]);
1135  }
1136  }
1137  }
1138  else
1139 #endif
1140  res = YY_("syntax error");
1141  return res;
1142  }
static const signed char yypact_ninf_
Definition: XdlParser.hpp:276
static const signed char yypact_[]
For a state, the index in yytable_ of its portion.
Definition: XdlParser.hpp:275
#define YYUSE(e)
Definition: XdlParser.cpp:59
static const int yyterror_
Definition: XdlParser.hpp:354
static const char *const yytname_[]
For a symbol, its name in clear.
Definition: XdlParser.hpp:306
static const short int yycheck_[]
Definition: XdlParser.hpp:294
static const int yyntokens_
Definition: XdlParser.hpp:356
std::string string
virtual std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
#define YY_(msgid)
Definition: XdlParser.cpp:54
static const int yylast_
Definition: XdlParser.hpp:350

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual std::string torc::XdlParser::yytnamerr_ ( const char *  n)
privatevirtual

Convert the symbol name n to a form suitable for a diagnostic.

+ Here is the caller graph for this function:

XdlParser::token_number_type torc::XdlParser::yytranslate_ ( int  t)
private

Convert a scanner token number t to a symbol number.

Definition at line 1459 of file XdlParser.cpp.

1460  {
1461  static
1462  const token_number_type
1463  translate_table[] =
1464  {
1465  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1466  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1467  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1468  2, 2, 2, 2, 40, 2, 2, 2, 2, 2,
1469  2, 2, 2, 2, 38, 2, 2, 2, 2, 2,
1470  2, 2, 2, 2, 2, 2, 2, 2, 39, 37,
1471  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1472  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1473  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1474  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1475  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1476  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1477  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1478  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1479  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1480  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1481  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1482  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1483  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1484  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1485  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1486  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1487  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1488  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1489  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1490  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1491  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1492  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1493  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1494  35, 36
1495  };
1496  if ((unsigned int) t <= yyuser_token_number_max_)
1497  return translate_table[t];
1498  else
1499  return yyundef_token_;
1500  }
static const unsigned int yyuser_token_number_max_
Definition: XdlParser.hpp:357
unsigned char token_number_type
Internal symbol numbers.
Definition: XdlParser.hpp:272
static const token_number_type yyundef_token_
Definition: XdlParser.hpp:358

+ Here is the caller graph for this function:

Field Documentation

class XdlImporter& torc::XdlParser::xdl
private

Definition at line 366 of file XdlParser.hpp.

std::ostream* torc::XdlParser::yycdebug_
private

Definition at line 362 of file XdlParser.hpp.

const short int torc::XdlParser::yycheck_
staticprivate
Initial value:
=
{
27, 28, 29, 83, 21, 5, 22, 20, 15, 16,
10, 10, 0, 93, 11, 12, 43, 44, 17, 18,
19, 13, 14, 40, 40, 38, 53, 54, 0, 1,
4, 40, 21, 5, 25, 25, 8, 9, 37, 26,
67, 27, 37, 10, 124, 6, 7, 8, 9, 20,
77, 28, 29, 30, 31, 38, 37, 37, 40, 38,
38, 37, 25, 38, 23, 25, 39, 37, 25, 38,
38, 37, 25, 38, 25, 102, 24, 39, 25, 25,
25, 39, 25, 39, 25, 107, 38, 155, 30, 117,
30, -1, -1, -1, -1, -1, 123, -1, -1, -1,
-1, -1, -1, -1, -1, 69, -1, -1, -1, 136,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 146,
-1, -1, -1, -1, 151
}

Definition at line 294 of file XdlParser.hpp.

int torc::XdlParser::yydebug_
private

Definition at line 361 of file XdlParser.hpp.

const unsigned char torc::XdlParser::yydefact_
staticprivate
Initial value:
=
{
0, 11, 0, 2, 4, 0, 1, 0, 0, 0,
13, 9, 28, 37, 54, 5, 6, 23, 7, 8,
100, 0, 17, 20, 14, 0, 0, 0, 0, 0,
0, 101, 99, 19, 16, 21, 87, 18, 0, 10,
29, 38, 55, 0, 0, 24, 22, 25, 26, 27,
0, 0, 15, 0, 0, 58, 0, 33, 89, 88,
12, 30, 39, 59, 60, 0, 32, 0, 0, 87,
0, 56, 34, 91, 0, 0, 61, 0, 0, 31,
0, 43, 46, 0, 35, 94, 90, 92, 0, 0,
44, 45, 41, 0, 0, 71, 72, 0, 57, 62,
68, 64, 0, 80, 69, 0, 95, 43, 50, 48,
47, 40, 73, 67, 63, 0, 81, 80, 66, 36,
96, 0, 42, 0, 0, 0, 70, 0, 65, 97,
51, 49, 74, 0, 98, 93, 0, 0, 82, 52,
76, 77, 78, 79, 0, 0, 0, 75, 0, 53,
83, 0, 84, 0, 85, 0, 0, 86
}

For a state, default rule to reduce. Unlessyytable_ specifies something else to do. Zero means the default is an error.

Definition at line 281 of file XdlParser.hpp.

const short int torc::XdlParser::yydefgoto_
staticprivate
Initial value:
=
{
-1, 2, 3, 7, 15, 26, 4, 5, 9, 23,
24, 25, 38, 34, 36, 16, 30, 45, 17, 27,
53, 69, 46, 47, 67, 77, 105, 18, 28, 54,
70, 82, 92, 94, 109, 123, 136, 146, 19, 29,
55, 76, 65, 83, 99, 100, 101, 102, 103, 125,
137, 144, 118, 127, 145, 151, 153, 155, 51, 59,
68, 78, 87, 88, 121, 135, 10, 21
}

Definition at line 284 of file XdlParser.hpp.

const int torc::XdlParser::yyempty_ = -2
staticprivate

Definition at line 352 of file XdlParser.hpp.

const int torc::XdlParser::yyeof_ = 0
staticprivate

Definition at line 348 of file XdlParser.hpp.

const int torc::XdlParser::yyerrcode_ = 256
staticprivate

Definition at line 355 of file XdlParser.hpp.

const int torc::XdlParser::yyfinal_ = 6
staticprivate

Definition at line 353 of file XdlParser.hpp.

const int torc::XdlParser::yylast_ = 124
staticprivate

Definition at line 350 of file XdlParser.hpp.

location_stack_type torc::XdlParser::yylocation_stack_
private

The location stack.

Definition at line 269 of file XdlParser.hpp.

const int torc::XdlParser::yynnts_ = 68
staticprivate

Definition at line 351 of file XdlParser.hpp.

const int torc::XdlParser::yyntokens_ = 41
staticprivate

Definition at line 356 of file XdlParser.hpp.

const signed char torc::XdlParser::yypact_
staticprivate
Initial value:
=
{
26, -81, 12, -81, -81, -9, -81, 28, 11, 9,
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
-81, -17, 13, 14, -81, 10, 5, -9, -9, -9,
39, -81, -81, -81, -81, -81, 17, -81, 13, -81,
-81, -81, -81, -9, -9, -81, -81, -81, -81, -81,
33, 19, -81, -9, -9, -7, 20, -81, -81, -81,
-81, -81, -81, -81, -81, 21, -81, -9, 18, 17,
22, -81, -81, -81, 24, 3, -81, -9, -16, -81,
37, 8, 25, 1, -81, -81, -81, -81, 27, 40,
-81, -81, -81, 0, 30, -81, -81, 43, -81, -81,
31, 32, -9, -13, -81, 34, 41, 8, -81, 35,
-81, -81, -81, -81, -81, 47, -81, 29, -81, -81,
-81, 38, -81, -9, 33, 49, -81, 42, -81, 52,
-81, -81, -81, 53, -81, -81, -9, 23, -81, -81,
-81, -81, -81, -81, 54, 44, -9, -81, 55, -81,
-81, -9, -81, 57, -81, 23, 59, -81
}

For a state, the index in yytable_ of its portion.

Definition at line 275 of file XdlParser.hpp.

const signed char torc::XdlParser::yypact_ninf_ = -81
staticprivate

Definition at line 276 of file XdlParser.hpp.

const signed char torc::XdlParser::yypgoto_
staticprivate
Initial value:
=
{
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
-81, -81, -81, 48, -81, -81, -81, -81, -81, -81,
-81, -81, -81, -81, -81, -81, -81, 58, -81, -81,
-81, -81, -22, -81, -81, -81, -81, -81, 60, -81,
-81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
-81, -68, -28, -81, -81, -81, -81, -81, 36, -80,
-81, -81, -81, -81, -81, -81, -27, -81
}

Definition at line 283 of file XdlParser.hpp.

const unsigned char torc::XdlParser::yyr1_
staticprivate
Initial value:
=
{
0, 41, 42, 43, 44, 44, 45, 45, 45, 46,
45, 48, 47, 49, 50, 50, 51, 52, 53, 54,
55, 55, 56, 57, 57, 58, 58, 58, 60, 61,
62, 59, 63, 65, 66, 67, 64, 69, 70, 71,
68, 72, 72, 73, 73, 73, 74, 74, 74, 74,
76, 77, 78, 75, 80, 81, 82, 79, 83, 83,
83, 84, 84, 85, 85, 85, 85, 85, 85, 86,
87, 88, 88, 90, 91, 89, 92, 92, 92, 92,
93, 94, 95, 96, 97, 98, 93, 99, 99, 101,
100, 102, 102, 103, 104, 105, 105, 106, 106, 107,
108, 108
}

For a rule, its LHS.

Definition at line 300 of file XdlParser.hpp.

const unsigned char torc::XdlParser::yyr2_
staticprivate
Initial value:
=
{
0, 2, 1, 2, 0, 2, 1, 1, 1, 0,
3, 0, 7, 1, 1, 3, 2, 1, 1, 1,
0, 1, 3, 0, 2, 1, 1, 1, 0, 0,
0, 8, 3, 0, 0, 0, 8, 0, 0, 0,
10, 2, 4, 0, 1, 1, 0, 2, 2, 4,
0, 0, 0, 7, 0, 0, 0, 9, 0, 1,
1, 0, 2, 2, 1, 3, 2, 2, 1, 1,
3, 1, 1, 0, 0, 7, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 14, 0, 2, 0,
5, 0, 2, 5, 1, 0, 1, 0, 1, 3,
1, 2
}

For a rule, its RHS length.

Definition at line 302 of file XdlParser.hpp.

semantic_stack_type torc::XdlParser::yysemantic_stack_
private

The semantic value stack.

Definition at line 267 of file XdlParser.hpp.

state_stack_type torc::XdlParser::yystate_stack_
private

The state stack.

Definition at line 265 of file XdlParser.hpp.

const unsigned char torc::XdlParser::yystos_
staticprivate
Initial value:
=
{
0, 4, 42, 43, 47, 48, 0, 44, 40, 49,
107, 1, 5, 8, 9, 45, 56, 59, 68, 79,
21, 108, 25, 50, 51, 52, 46, 60, 69, 80,
57, 21, 40, 26, 54, 27, 55, 25, 53, 37,
107, 107, 107, 6, 7, 58, 63, 64, 68, 79,
38, 99, 54, 61, 70, 81, 107, 107, 10, 100,
37, 107, 107, 15, 16, 83, 37, 65, 101, 62,
71, 38, 107, 40, 99, 38, 82, 66, 102, 37,
11, 12, 72, 84, 107, 22, 40, 103, 104, 25,
13, 14, 73, 38, 74, 17, 18, 19, 37, 85,
86, 87, 88, 89, 100, 67, 39, 25, 5, 75,
100, 37, 25, 38, 38, 107, 20, 38, 93, 37,
23, 105, 73, 76, 38, 90, 25, 94, 93, 39,
107, 100, 25, 39, 24, 106, 77, 91, 25, 107,
28, 29, 30, 31, 92, 95, 78, 25, 39, 107,
25, 96, 107, 97, 25, 98, 92, 25
}

For a state, its accessing symbol.

Definition at line 297 of file XdlParser.hpp.

const short int torc::XdlParser::yytable_
staticprivate
Initial value:
=
{
40, 41, 42, 104, 31, 108, 85, 116, 63, 64,
58, 58, 6, 110, 80, 81, 56, 57, 95, 96,
97, 90, 91, 32, 86, 117, 61, 62, -3, 11,
1, 8, 20, 12, 22, 37, 13, 14, 98, 33,
72, 35, 39, 58, 131, 43, 44, 13, 14, 116,
84, 140, 141, 142, 143, 50, 60, 66, 73, 71,
75, 79, 89, 93, 120, 107, 106, 111, 112, 113,
114, 119, 126, 124, 132, 115, 134, 129, 138, 147,
150, 133, 154, 148, 157, 122, 52, 156, 48, 128,
49, 0, 0, 0, 0, 0, 130, 0, 0, 0,
0, 0, 0, 0, 0, 74, 0, 0, 0, 139,
0, 0, 0, 0, 0, 0, 0, 0, 0, 149,
0, 0, 0, 0, 152
}

What to do in a state. yytable_[yypact_[s]]: what to do in state s.

  • if positive, shift that token.
  • if negative, reduce the rule which number is the opposite.
  • if zero, do what YYDEFACT says.

Definition at line 291 of file XdlParser.hpp.

const signed char torc::XdlParser::yytable_ninf_ = -4
staticprivate

Definition at line 292 of file XdlParser.hpp.

const int torc::XdlParser::yyterror_ = 1
staticprivate

Definition at line 354 of file XdlParser.hpp.

const char* const torc::XdlParser::yytname_[]
staticprivate

For a symbol, its name in clear.

Definition at line 306 of file XdlParser.hpp.

const XdlParser::token_number_type torc::XdlParser::yyundef_token_ = 2
staticprivate

Definition at line 358 of file XdlParser.hpp.

const unsigned int torc::XdlParser::yyuser_token_number_max_ = 291
staticprivate

Definition at line 357 of file XdlParser.hpp.


The documentation for this class was generated from the following files: