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

A Bison parser. More...

#include <Parser.h>

+ Collaboration diagram for torc::generic::Parser:

Data Structures

union  semantic_type
 Symbol semantic values. More...
 
struct  token
 Tokens. More...
 

Public Types

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

 Parser (class Driver &inDriver_yyarg)
 Build a parser object. More...
 
virtual ~Parser ()
 
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 short int token_number_type
 Internal symbol numbers. More...
 
typedef short int rhs_number_type
 A type to store symbol numbers and -1. 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 void yy_symbol_value_print_ (int yytype, const semantic_type *yyvaluep, const location_type *yylocationp)
 Report a symbol value on the debug stream. More...
 
virtual void yy_symbol_print_ (int yytype, const semantic_type *yyvaluep, const location_type *yylocationp)
 Report a symbol on the debug stream. More...
 
virtual std::string yytnamerr_ (const char *n)
 Convert the symbol name n to a form suitable for a diagnostic. More...
 
virtual void yy_reduce_print_ (int r)
 Report on the debug stream that the rule r is going to be reduced. More...
 
virtual void yystack_print_ ()
 Print the state stack on the debug stream. 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 DriverinDriver
 

Static Private Attributes

static const short int yypact_ []
 For a state, the index in yytable_ of its portion. More...
 
static const short int yypact_ninf_ = -1561
 
static const unsigned short int yydefact_ []
 
static const short int yypgoto_ []
 
static const short int yydefgoto_ []
 
static const unsigned short int yytable_ []
 
static const signed char yytable_ninf_ = -1
 
static const short int yycheck_ []
 
static const unsigned short int yystos_ []
 For a state, its accessing symbol. More...
 
static const unsigned short int 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 rhs_number_type yyrhs_ []
 A `-1'-separated list of the rules' RHS. More...
 
static const unsigned short int yyprhs_ []
 For each rule, the index of the first RHS symbol in yyrhs_. More...
 
static const unsigned short int yyrline_ []
 For each rule, its source line number. More...
 
static const unsigned short int yytoken_number_ []
 For each scanner token number, its symbol number. More...
 
static const int yyeof_ = 0
 
static const int yylast_ = 2272
 
static const int yynnts_ = 553
 
static const int yyempty_ = -2
 
static const int yyfinal_ = 4
 
static const int yyterror_ = 1
 
static const int yyerrcode_ = 256
 
static const int yyntokens_ = 296
 
static const unsigned int yyuser_token_number_max_ = 550
 
static const token_number_type yyundef_token_ = 2
 

Detailed Description

A Bison parser.

Definition at line 111 of file Parser.h.

Member Typedef Documentation

Type for debugging levels.

Definition at line 480 of file Parser.h.

location stack type.

Definition at line 523 of file Parser.h.

Symbol locations.

Definition at line 159 of file Parser.h.

typedef short int torc::generic::Parser::rhs_number_type
private

A type to store symbol numbers and -1.

Definition at line 577 of file Parser.h.

Semantic value stack type.

Definition at line 521 of file Parser.h.

State stack type.

Definition at line 519 of file Parser.h.

typedef int torc::generic::Parser::state_type
private

State numbers.

Definition at line 517 of file Parser.h.

typedef unsigned short int torc::generic::Parser::token_number_type
private

Internal symbol numbers.

Definition at line 533 of file Parser.h.

Token type.

Definition at line 463 of file Parser.h.

Constructor & Destructor Documentation

torc::generic::Parser::Parser ( class Driver inDriver_yyarg)

Build a parser object.

Definition at line 545 of file Parser.cc.

546  :
547 #if YYDEBUG
548  yydebug_ (false),
549  yycdebug_ (&std::cerr),
550 #endif
551  inDriver (inDriver_yyarg)
552  {
553  }
class Driver & inDriver
Definition: Parser.h:626
std::ostream * yycdebug_
Definition: Parser.h:593
torc::generic::Parser::~Parser ( )
virtual

Definition at line 555 of file Parser.cc.

556  {
557  }

Member Function Documentation

debug_level_type torc::generic::Parser::debug_level ( ) const

The current debugging level.

std::ostream& torc::generic::Parser::debug_stream ( ) const

The current debugging stream.

void torc::generic::Parser::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 16544 of file Parser.cc.

16546 {
16548  {
16550  __FUNCTION__, __FILE__, __LINE__ );
16551  e.saveContextData("Parser error message", m);
16552  e.saveContextData("Filename", l.begin.filename);
16553  e.saveContextData("StartLine", l.begin.line);
16554  e.saveContextData("EndLine", l.end.line);
16556  log("Synthetic parser error created\n");
16557  }
16558  inDriver.error(l, m);
16559 }
void log(const char *fmt,...)
Definition: Log.cpp:89
class Driver & inDriver
Definition: Parser.h:626
The Error object thrown by different methods of EdifOM.
Definition: Error.hpp:41
void error(const class location &inLocation, const std::string &inMessage)
void setParserError(const Error &inSource)
Definition: Driver.cpp:85
bool getIsParserErrorSet() const
Definition: Driver.hpp:135

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int torc::generic::Parser::parse ( )
virtual

Parse.

Returns
0 iff parsing succeeded.

Lookahead and lookahead in internal form.

Semantic value of the lookahead.

Location of the lookahead.

The locations where the error started and ended.

$$.

$.

Definition at line 2120 of file Parser.cc.

2121  {
2122  /// Lookahead and lookahead in internal form.
2123  int yychar = yyempty_;
2124  int yytoken = 0;
2125 
2126  /* State. */
2127  int yyn;
2128  int yylen = 0;
2129  int yystate = 0;
2130 
2131  /* Error handling. */
2132  int yynerrs_ = 0;
2133  int yyerrstatus_ = 0;
2134 
2135  /// Semantic value of the lookahead.
2136  semantic_type yylval;
2137  /// Location of the lookahead.
2138  location_type yylloc;
2139  /// The locations where the error started and ended.
2140  location_type yyerror_range[2];
2141 
2142  /// $$.
2143  semantic_type yyval;
2144  /// @$.
2145  location_type yyloc;
2146 
2147  int yyresult;
2148 
2149  YYCDEBUG << "Starting parse" << std::endl;
2150 
2151 
2152  /* User initialization code. */
2153 
2154 /* Line 553 of lalr1.cc */
2155 #line 66 "Parser.yy"
2156 {
2157  // initialize the initial location object
2158  yylloc.begin.filename = yylloc.end.filename = &inDriver.getStreamName();
2159 }
2160 
2161 /* Line 553 of lalr1.cc */
2162 #line 2163 "Parser.cc"
2163 
2164  /* Initialize the stacks. The initial state will be pushed in
2165  yynewstate, since the latter expects the semantical and the
2166  location values to have been already stored, initialize these
2167  stacks with a primary value. */
2171  yysemantic_stack_.push (yylval);
2172  yylocation_stack_.push (yylloc);
2173 
2174  /* New state. */
2175  yynewstate:
2176  yystate_stack_.push (yystate);
2177  YYCDEBUG << "Entering state " << yystate << std::endl;
2178 
2179  /* Accept? */
2180  if (yystate == yyfinal_)
2181  goto yyacceptlab;
2182 
2183  goto yybackup;
2184 
2185  /* Backup. */
2186  yybackup:
2187 
2188  /* Try to take a decision without lookahead. */
2189  yyn = yypact_[yystate];
2190  if (yyn == yypact_ninf_)
2191  goto yydefault;
2192 
2193  /* Read a lookahead token. */
2194  if (yychar == yyempty_)
2195  {
2196  YYCDEBUG << "Reading a token: ";
2197  yychar = yylex (&yylval, &yylloc);
2198  }
2199 
2200 
2201  /* Convert token to internal form. */
2202  if (yychar <= yyeof_)
2203  {
2204  yychar = yytoken = yyeof_;
2205  YYCDEBUG << "Now at end of input." << std::endl;
2206  }
2207  else
2208  {
2209  yytoken = yytranslate_ (yychar);
2210  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2211  }
2212 
2213  /* If the proper action on seeing token YYTOKEN is to reduce or to
2214  detect an error, take that action. */
2215  yyn += yytoken;
2216  if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
2217  goto yydefault;
2218 
2219  /* Reduce or error. */
2220  yyn = yytable_[yyn];
2221  if (yyn <= 0)
2222  {
2223  if (yyn == 0 || yyn == yytable_ninf_)
2224  goto yyerrlab;
2225  yyn = -yyn;
2226  goto yyreduce;
2227  }
2228 
2229  /* Shift the lookahead token. */
2230  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2231 
2232  /* Discard the token being shifted. */
2233  yychar = yyempty_;
2234 
2235  yysemantic_stack_.push (yylval);
2236  yylocation_stack_.push (yylloc);
2237 
2238  /* Count tokens shifted since error; after three, turn off error
2239  status. */
2240  if (yyerrstatus_)
2241  --yyerrstatus_;
2242 
2243  yystate = yyn;
2244  goto yynewstate;
2245 
2246  /*-----------------------------------------------------------.
2247  | yydefault -- do the default action for the current state. |
2248  `-----------------------------------------------------------*/
2249  yydefault:
2250  yyn = yydefact_[yystate];
2251  if (yyn == 0)
2252  goto yyerrlab;
2253  goto yyreduce;
2254 
2255  /*-----------------------------.
2256  | yyreduce -- Do a reduction. |
2257  `-----------------------------*/
2258  yyreduce:
2259  yylen = yyr2_[yyn];
2260  /* If YYLEN is nonzero, implement the default value of the action:
2261  `$$ = $1'. Otherwise, use the top of the stack.
2262 
2263  Otherwise, the following line sets YYVAL to garbage.
2264  This behavior is undocumented and Bison
2265  users should not rely upon it. */
2266  if (yylen)
2267  yyval = yysemantic_stack_[yylen - 1];
2268  else
2269  yyval = yysemantic_stack_[0];
2270 
2271  {
2273  YYLLOC_DEFAULT (yyloc, slice, yylen);
2274  }
2275  YY_REDUCE_PRINT (yyn);
2276  switch (yyn)
2277  {
2278  case 2:
2279 
2280 /* Line 678 of lalr1.cc */
2281 #line 945 "Parser.yy"
2282  {
2283  boost::scoped_ptr<NameData> fileName((yysemantic_stack_[(6) - (3)].nameData));
2284  boost::scoped_ptr<VersionData> versionData((yysemantic_stack_[(6) - (4)].edifVersion));
2286  RootSharedPtr root = ctx->getRoot();
2287  root->setName(fileName->mName);
2288  if(!fileName->mOriginalName.empty())
2289  {
2290  root->setOriginalName(fileName->mOriginalName);
2291  }
2292  EdifVersion version;
2293  version.mFirst = versionData->mFirst;
2294  version.mSecond = versionData->mSecond;
2295  version.mThird = versionData->mThird;
2296  root->setVersion(version);
2297  root->setLevel(static_cast<EdifLevel>((yysemantic_stack_[(6) - (5)].integerVal)) );
2298  ctx->pushStatusContainer(root);
2299  }
2300  break;
2301 
2302  case 3:
2303 
2304 /* Line 678 of lalr1.cc */
2305 #line 963 "Parser.yy"
2306  {
2307  inDriver.getContext()->popStatusContainer();
2308  }
2309  break;
2310 
2311  case 9:
2312 
2313 /* Line 678 of lalr1.cc */
2314 #line 974 "Parser.yy"
2315  {
2317  RootSharedPtr root = ctx->getRoot();
2318  root->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
2319  delete (yysemantic_stack_[(2) - (2)].stringVal);
2320  }
2321  break;
2322 
2323  case 10:
2324 
2325 /* Line 678 of lalr1.cc */
2326 #line 981 "Parser.yy"
2327  {
2329  RootSharedPtr root = ctx->getRoot();
2330  root->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
2331  delete (yysemantic_stack_[(2) - (2)].stringVal);
2332  }
2333  break;
2334 
2335  case 12:
2336 
2337 /* Line 678 of lalr1.cc */
2338 #line 993 "Parser.yy"
2339  {
2340  (yyval.integerVal) = (yysemantic_stack_[(4) - (3)].integerVal);
2341  }
2342  break;
2343 
2344  case 13:
2345 
2346 /* Line 678 of lalr1.cc */
2347 #line 999 "Parser.yy"
2348  {
2349  (yyval.edifVersion) = new VersionData();
2350  (yyval.edifVersion)->mFirst = (yysemantic_stack_[(6) - (3)].integerVal);
2351  (yyval.edifVersion)->mSecond = (yysemantic_stack_[(6) - (4)].integerVal);
2352  (yyval.edifVersion)->mThird = (yysemantic_stack_[(6) - (5)].integerVal);
2353  }
2354  break;
2355 
2356  case 14:
2357 
2358 /* Line 678 of lalr1.cc */
2359 #line 1008 "Parser.yy"
2360  {
2361  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
2362  }
2363  break;
2364 
2365  case 22:
2366 
2367 /* Line 678 of lalr1.cc */
2368 #line 1025 "Parser.yy"
2369  {
2370  delete (yysemantic_stack_[(2) - (2)].stringVal);
2371  }
2372  break;
2373 
2374  case 23:
2375 
2376 /* Line 678 of lalr1.cc */
2377 #line 1029 "Parser.yy"
2378  {
2379  delete (yysemantic_stack_[(2) - (2)].stringVal);
2380  }
2381  break;
2382 
2383  case 25:
2384 
2385 /* Line 678 of lalr1.cc */
2386 #line 1038 "Parser.yy"
2387  {
2388  delete (yysemantic_stack_[(1) - (1)].stringVal);
2389  }
2390  break;
2391 
2392  case 26:
2393 
2394 /* Line 678 of lalr1.cc */
2395 #line 1042 "Parser.yy"
2396  {
2397  delete (yysemantic_stack_[(1) - (1)].stringVal);
2398  }
2399  break;
2400 
2401  case 27:
2402 
2403 /* Line 678 of lalr1.cc */
2404 #line 1048 "Parser.yy"
2405  {
2406  ApplySharedPtr apply;
2408  = inDriver.getContext();
2409  try
2410  {
2411  ctx->getFactory()->create(apply);
2412  }
2413  catch(Error &e)
2414  {
2415  std::string message = constructErrorMessage(
2416  "Unable to create apply" );
2417  log("%s\n", message.c_str());
2418  e.setCurrentLocation( __FUNCTION__,
2419  __FILE__, __LINE__ );
2420  e.saveContextData("Parser error message", message);
2421  e.saveContextData("Filename", yyloc.begin.filename);
2422  e.saveContextData("StartLine", yyloc.begin.line);
2423  e.saveContextData("EndLine", yyloc.end.line);
2425  error(yyloc, message);
2426  YYABORT;
2427  }
2428  ctx->setCurrentApply(apply);
2429  SimulateSharedPtr simulate
2430  = ctx->getCurrentSimulate();
2431  simulate->addApply(apply);
2432  }
2433  break;
2434 
2435  case 28:
2436 
2437 /* Line 678 of lalr1.cc */
2438 #line 1076 "Parser.yy"
2439  {
2441  ctx->setCurrentApply(ApplySharedPtr());
2442  }
2443  break;
2444 
2445  case 32:
2446 
2447 /* Line 678 of lalr1.cc */
2448 #line 1086 "Parser.yy"
2449  {
2451  ApplySharedPtr apply = ctx->getCurrentApply();
2452  apply->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
2453  delete (yysemantic_stack_[(2) - (2)].stringVal);
2454  }
2455  break;
2456 
2457  case 33:
2458 
2459 /* Line 678 of lalr1.cc */
2460 #line 1093 "Parser.yy"
2461  {
2463  ApplySharedPtr apply = ctx->getCurrentApply();
2464  apply->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
2465  delete (yysemantic_stack_[(2) - (2)].stringVal);
2466  }
2467  break;
2468 
2469  case 34:
2470 
2471 /* Line 678 of lalr1.cc */
2472 #line 1102 "Parser.yy"
2473  {
2474  delete (yysemantic_stack_[(6) - (3)].pairData);
2475  delete (yysemantic_stack_[(6) - (4)].pairData);
2476  delete (yysemantic_stack_[(6) - (5)].pairData);
2477  }
2478  break;
2479 
2480  case 35:
2481 
2482 /* Line 678 of lalr1.cc */
2483 #line 1110 "Parser.yy"
2484  {
2485  (yyval.nameData) = (yysemantic_stack_[(6) - (3)].nameData);
2486  (yyval.nameData)->mIndices.push_back((yysemantic_stack_[(6) - (4)].integerVal));
2487  if((yysemantic_stack_[(6) - (5)].arrayDimensions))
2488  {
2489  (yyval.nameData)->mIndices.insert((yyval.nameData)->mIndices.end(),
2490  (yysemantic_stack_[(6) - (5)].arrayDimensions)->begin(), (yysemantic_stack_[(6) - (5)].arrayDimensions)->end() );
2491  delete (yysemantic_stack_[(6) - (5)].arrayDimensions);
2492  }
2493  }
2494  break;
2495 
2496  case 36:
2497 
2498 /* Line 678 of lalr1.cc */
2499 #line 1123 "Parser.yy"
2500  {
2501  (yyval.arrayDimensions) = NULL;
2502  }
2503  break;
2504 
2505  case 38:
2506 
2507 /* Line 678 of lalr1.cc */
2508 #line 1130 "Parser.yy"
2509  {
2510  (yyval.arrayDimensions) = new std::vector<size_t>();
2511  (yyval.arrayDimensions)->push_back((yysemantic_stack_[(2) - (1)].integerVal));
2512  if((yysemantic_stack_[(2) - (2)].arrayDimensions))
2513  {
2514  (yyval.arrayDimensions)->insert((yyval.arrayDimensions)->end(), (yysemantic_stack_[(2) - (2)].arrayDimensions)->begin(), (yysemantic_stack_[(2) - (2)].arrayDimensions)->end());
2515  delete (yysemantic_stack_[(2) - (2)].arrayDimensions);
2516  }
2517  }
2518  break;
2519 
2520  case 39:
2521 
2522 /* Line 678 of lalr1.cc */
2523 #line 1140 "Parser.yy"
2524  {
2525  (yyval.arrayDimensions) = new std::vector<size_t>();
2526  (yyval.arrayDimensions)->push_back((yysemantic_stack_[(1) - (1)].integerVal));
2527  }
2528  break;
2529 
2530  case 45:
2531 
2532 /* Line 678 of lalr1.cc */
2533 #line 1156 "Parser.yy"
2534  {
2535  delete (yysemantic_stack_[(2) - (2)].stringVal);
2536  }
2537  break;
2538 
2539  case 46:
2540 
2541 /* Line 678 of lalr1.cc */
2542 #line 1160 "Parser.yy"
2543  {
2544  delete (yysemantic_stack_[(2) - (2)].stringVal);
2545  }
2546  break;
2547 
2548  case 48:
2549 
2550 /* Line 678 of lalr1.cc */
2551 #line 1169 "Parser.yy"
2552  {
2553  delete (yysemantic_stack_[(4) - (3)].pairData);
2554  }
2555  break;
2556 
2557  case 49:
2558 
2559 /* Line 678 of lalr1.cc */
2560 #line 1175 "Parser.yy"
2561  {
2562  delete (yysemantic_stack_[(4) - (3)].pairData);
2563  }
2564  break;
2565 
2566  case 50:
2567 
2568 /* Line 678 of lalr1.cc */
2569 #line 1181 "Parser.yy"
2570  {
2571  (yyval.stringVal) = (yysemantic_stack_[(4) - (3)].stringVal);
2572  }
2573  break;
2574 
2575  case 52:
2576 
2577 /* Line 678 of lalr1.cc */
2578 #line 1190 "Parser.yy"
2579  {
2581  = inDriver.getContext();
2582  LogicElementSharedPtr logicElem;
2583  try
2584  {
2585  ctx->getFactory()->create(logicElem);
2586  logicElem->setType(LogicElement::eTypeBecomes);
2587  }
2588  catch(Error &e)
2589  {
2590  std::string message = constructErrorMessage(
2591  "Unable to create becomes" );
2592  log("%s\n", message.c_str());
2593  e.setCurrentLocation( __FUNCTION__,
2594  __FILE__, __LINE__ );
2595  e.saveContextData("Parser error message", message);
2596  e.saveContextData("Filename", yyloc.begin.filename);
2597  e.saveContextData("StartLine", yyloc.begin.line);
2598  e.saveContextData("EndLine", yyloc.end.line);
2600  error(yyloc, message);
2601  YYABORT;
2602  }
2603  ctx->pushLogicElement(logicElem);
2604  ctx->incrementLogicElementDepth();
2605  }
2606  break;
2607 
2608  case 62:
2609 
2610 /* Line 678 of lalr1.cc */
2611 #line 1236 "Parser.yy"
2612  {
2613  if(NULL == (yysemantic_stack_[(4) - (3)].valueData))
2614  {
2615  (yyval.valueData) = new ValueData();
2616  (yyval.valueData)->mValues.push_back( Value(
2618  }
2619  else
2620  {
2621  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
2622  }
2623  }
2624  break;
2625 
2626  case 63:
2627 
2628 /* Line 678 of lalr1.cc */
2629 #line 1251 "Parser.yy"
2630  {
2631  (yyval.valueData) = NULL;
2632  }
2633  break;
2634 
2635  case 64:
2636 
2637 /* Line 678 of lalr1.cc */
2638 #line 1255 "Parser.yy"
2639  {
2640  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
2641  bool val = (yysemantic_stack_[(2) - (2)].integerVal);
2642  (yyval.valueData)->mValues.push_back( Value(
2643  Value::eValueTypeBoolean, val ) );
2644  }
2645  break;
2646 
2647  case 65:
2648 
2649 /* Line 678 of lalr1.cc */
2650 #line 1262 "Parser.yy"
2651  {
2652  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
2653  bool val = (yysemantic_stack_[(2) - (2)].integerVal);
2654  (yyval.valueData)->mValues.push_back( Value(
2655  Value::eValueTypeBoolean, val ) );
2656  }
2657  break;
2658 
2659  case 66:
2660 
2661 /* Line 678 of lalr1.cc */
2662 #line 1269 "Parser.yy"
2663  {
2664  (yyval.valueData) = (yysemantic_stack_[(2) - (2)].valueData);
2665  if((yysemantic_stack_[(2) - (1)].valueData))
2666  {
2667  (yysemantic_stack_[(2) - (1)].valueData)->mValues.insert((yysemantic_stack_[(2) - (1)].valueData)->mValues.end(),
2668  (yyval.valueData)->mValues.begin(), (yyval.valueData)->mValues.end() );
2669  (yyval.valueData)->mValues = (yysemantic_stack_[(2) - (1)].valueData)->mValues;
2670  delete (yysemantic_stack_[(2) - (1)].valueData);
2671  }
2672  }
2673  break;
2674 
2675  case 67:
2676 
2677 /* Line 678 of lalr1.cc */
2678 #line 1282 "Parser.yy"
2679  {
2680  (yyval.integerVal) = (yysemantic_stack_[(4) - (3)].integerVal);
2681  }
2682  break;
2683 
2684  case 68:
2685 
2686 /* Line 678 of lalr1.cc */
2687 #line 1288 "Parser.yy"
2688  {
2689  (yyval.integerVal) = (yysemantic_stack_[(1) - (1)].integerVal);
2690  }
2691  break;
2692 
2693  case 69:
2694 
2695 /* Line 678 of lalr1.cc */
2696 #line 1292 "Parser.yy"
2697  {
2698  (yyval.integerVal) = (yysemantic_stack_[(2) - (1)].integerVal);
2699  }
2700  break;
2701 
2702  case 70:
2703 
2704 /* Line 678 of lalr1.cc */
2705 #line 1298 "Parser.yy"
2706  {
2707  if((yysemantic_stack_[(4) - (3)].integerVal));
2708  (yyval.integerVal) = (yysemantic_stack_[(4) - (3)].integerVal);
2709  }
2710  break;
2711 
2712  case 71:
2713 
2714 /* Line 678 of lalr1.cc */
2715 #line 1305 "Parser.yy"
2716  {
2717  (yyval.integerVal) = 1;
2718  }
2719  break;
2720 
2721  case 72:
2722 
2723 /* Line 678 of lalr1.cc */
2724 #line 1309 "Parser.yy"
2725  {
2726  (yyval.integerVal) = 0;
2727  }
2728  break;
2729 
2730  case 73:
2731 
2732 /* Line 678 of lalr1.cc */
2733 #line 1315 "Parser.yy"
2734  {
2735  if((yysemantic_stack_[(6) - (3)].integerVal));
2736  if((yysemantic_stack_[(6) - (4)].integerVal));
2737  delete (yysemantic_stack_[(6) - (5)].valueData);
2738  }
2739  break;
2740 
2741  case 74:
2742 
2743 /* Line 678 of lalr1.cc */
2744 #line 1323 "Parser.yy"
2745  {
2746  if((yysemantic_stack_[(4) - (3)].integerVal));
2747  }
2748  break;
2749 
2750  case 76:
2751 
2752 /* Line 678 of lalr1.cc */
2753 #line 1332 "Parser.yy"
2754  {
2755  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(3) - (3)].nameData));
2756  std::string name = nameData->mName;
2758  CellSharedPtr cell;
2759  LibrarySharedPtr lib = ctx->getCurrentLibrary();
2760  cell = lib->findCell(name);
2761  if(cell)
2762  {
2763  log("Found existing cell\n");
2764  if(lib->getIsExtern())
2765  {
2766  if(!cell->getIsExtern())
2767  {
2768  std::string message = constructErrorMessage(
2769  "Cell %s already exists in lib %s\n",
2770  name.c_str(), lib->getName().c_str() );
2771  log("%s\n", message.c_str());
2773  __FUNCTION__, __FILE__, __LINE__ );
2774  e.setCurrentLocation( __FUNCTION__,
2775  __FILE__, __LINE__ );
2776  e.saveContextData("Parser error message", message);
2777  e.saveContextData("Filename", yyloc.begin.filename);
2778  e.saveContextData("StartLine", yyloc.begin.line);
2779  e.saveContextData("EndLine", yyloc.end.line);
2781  error(yyloc, message);
2782  YYABORT;
2783  }
2784  else
2785  {
2786  log( "Extern cell %s already exists in %s\n",
2787  name.c_str(), lib->getName().c_str() );
2788  }
2789  }
2790  else
2791  {
2792  if(cell->getIsExtern())
2793  {
2794  log("Found extern cell of this name\n");
2795  cell->setIsExtern(false);
2796  }
2797  else
2798  {
2799  //TBD::WARN
2800  log("Concrete cell %s already found... Ignoring\n",
2801  name.c_str());
2802 #if 0
2803  std::string message = constructErrorMessage(
2804  "Cell %s already exists in lib %s\n",
2805  name.c_str(), lib->getName().c_str() );
2806  log("%s\n", message.c_str());
2808  __FUNCTION__, __FILE__, __LINE__ );
2809  e.saveContextData("Parser error message", message);
2810  e.saveContextData("Filename", yyloc.begin.filename);
2811  e.saveContextData("StartLine", yyloc.begin.line);
2812  e.saveContextData("EndLine", yyloc.end.line);
2814  error(yyloc, message);
2815  YYABORT;
2816 #endif
2817  }
2818  }
2819  }
2820  else
2821  {
2822  try
2823  {
2824  ctx->getFactory()->create(cell);
2825  }
2826  catch(Error &e)
2827  {
2828  std::string message = constructErrorMessage(
2829  "Unable to create Cell : %s", cell->getName().c_str());
2830  log("%s\n", message.c_str());
2831  e.setCurrentLocation( __FUNCTION__,
2832  __FILE__, __LINE__ );
2833  e.saveContextData("Parser error message", message);
2834  e.saveContextData("Filename", yyloc.begin.filename);
2835  e.saveContextData("StartLine", yyloc.begin.line);
2836  e.saveContextData("EndLine", yyloc.end.line);
2838  error(yyloc, message);
2839  YYABORT;
2840  }
2841  cell->setName(name);
2842  if(!(yysemantic_stack_[(3) - (3)].nameData)->mOriginalName.empty())
2843  {
2844  cell->setOriginalName((yysemantic_stack_[(3) - (3)].nameData)->mOriginalName);
2845  }
2846  cell->setIsExtern(lib->getIsExtern());
2847  cell->setParent(lib);
2848  lib->addCell(cell);
2849  log("Created cell %s\n", cell->getName().c_str());
2850  }
2851  ctx->setCurrentCell(cell);
2852  ctx->pushPropertyContainer(cell);
2853  ctx->pushStatusContainer(cell);
2854  }
2855  break;
2856 
2857  case 77:
2858 
2859 /* Line 678 of lalr1.cc */
2860 #line 1433 "Parser.yy"
2861  {
2862  inDriver.getContext()->setCurrentCell(
2863  CellSharedPtr() );
2864  inDriver.getContext()->popPropertyContainer();
2865  inDriver.getContext()->popStatusContainer();
2866  }
2867  break;
2868 
2869  case 82:
2870 
2871 /* Line 678 of lalr1.cc */
2872 #line 1446 "Parser.yy"
2873  {
2875  CellSharedPtr cell = ctx->getCurrentCell();
2876  cell->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
2877  delete (yysemantic_stack_[(2) - (2)].stringVal);
2878  }
2879  break;
2880 
2881  case 83:
2882 
2883 /* Line 678 of lalr1.cc */
2884 #line 1453 "Parser.yy"
2885  {
2887  CellSharedPtr cell = ctx->getCurrentCell();
2888  cell->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
2889  delete (yysemantic_stack_[(2) - (2)].stringVal);
2890  }
2891  break;
2892 
2893  case 86:
2894 
2895 /* Line 678 of lalr1.cc */
2896 #line 1467 "Parser.yy"
2897  {
2898  if(NULL == (yysemantic_stack_[(5) - (4)].cellRefData))
2899  {
2900  (yyval.cellRefData) = new CellRefData();
2901  }
2902  else
2903  {
2904  (yyval.cellRefData) = (yysemantic_stack_[(5) - (4)].cellRefData);
2905  }
2906  (yyval.cellRefData)->mCellName = (yysemantic_stack_[(5) - (3)].nameData);
2907  }
2908  break;
2909 
2910  case 87:
2911 
2912 /* Line 678 of lalr1.cc */
2913 #line 1481 "Parser.yy"
2914  {
2915  (yyval.cellRefData) = NULL;
2916  }
2917  break;
2918 
2919  case 88:
2920 
2921 /* Line 678 of lalr1.cc */
2922 #line 1485 "Parser.yy"
2923  {
2924  (yyval.cellRefData) = new CellRefData();
2925  (yyval.cellRefData)->mLibraryName = (yysemantic_stack_[(1) - (1)].nameData);
2926  }
2927  break;
2928 
2929  case 89:
2930 
2931 /* Line 678 of lalr1.cc */
2932 #line 1492 "Parser.yy"
2933  {
2934  if(NULL == (yysemantic_stack_[(5) - (4)].viewRefData))
2935  {
2936  (yyval.viewRefData) = new ViewRefData();
2937  }
2938  else
2939  {
2940  (yyval.viewRefData) = (yysemantic_stack_[(5) - (4)].viewRefData);
2941  }
2942  (yyval.viewRefData)->mCellName = (yysemantic_stack_[(5) - (3)].nameData);
2943  }
2944  break;
2945 
2946  case 90:
2947 
2948 /* Line 678 of lalr1.cc */
2949 #line 1506 "Parser.yy"
2950  {
2951  (yyval.viewRefData) = NULL;
2952  }
2953  break;
2954 
2955  case 91:
2956 
2957 /* Line 678 of lalr1.cc */
2958 #line 1510 "Parser.yy"
2959  {
2960  (yyval.viewRefData) = new ViewRefData();
2961  (yyval.viewRefData)->mLibraryName = (yysemantic_stack_[(1) - (1)].nameData);
2962  }
2963  break;
2964 
2965  case 92:
2966 
2967 /* Line 678 of lalr1.cc */
2968 #line 1517 "Parser.yy"
2969  {
2970  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
2971  }
2972  break;
2973 
2974  case 93:
2975 
2976 /* Line 678 of lalr1.cc */
2977 #line 1523 "Parser.yy"
2978  {
2979  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
2980  }
2981  break;
2982 
2983  case 94:
2984 
2985 /* Line 678 of lalr1.cc */
2986 #line 1529 "Parser.yy"
2987  {
2988  inDriver.getContext()->getCurrentCell()->setType(
2989  static_cast<Cell::Type>((yysemantic_stack_[(4) - (3)].integerVal)) );
2990  }
2991  break;
2992 
2993  case 95:
2994 
2995 /* Line 678 of lalr1.cc */
2996 #line 1536 "Parser.yy"
2997  {
2998  (yyval.integerVal) = Cell::eTypeTie;
2999  }
3000  break;
3001 
3002  case 96:
3003 
3004 /* Line 678 of lalr1.cc */
3005 #line 1540 "Parser.yy"
3006  {
3007  (yyval.integerVal) = Cell::eTypeRipper;
3008  }
3009  break;
3010 
3011  case 97:
3012 
3013 /* Line 678 of lalr1.cc */
3014 #line 1544 "Parser.yy"
3015  {
3016  (yyval.integerVal) = Cell::eTypeGeneric;
3017  }
3018  break;
3019 
3020  case 105:
3021 
3022 /* Line 678 of lalr1.cc */
3023 #line 1563 "Parser.yy"
3024  {
3025  delete (yysemantic_stack_[(6) - (3)].pairData);
3026  delete (yysemantic_stack_[(6) - (4)].pairData);
3027  }
3028  break;
3029 
3030  case 108:
3031 
3032 /* Line 678 of lalr1.cc */
3033 #line 1574 "Parser.yy"
3034  {
3035  delete (yysemantic_stack_[(6) - (3)].pairData);
3036  delete (yysemantic_stack_[(6) - (4)].pairData);
3037  delete (yysemantic_stack_[(6) - (5)].pairData);
3038  }
3039  break;
3040 
3041  case 109:
3042 
3043 /* Line 678 of lalr1.cc */
3044 #line 1582 "Parser.yy"
3045  {
3046  (yyval.stringVal) = (yysemantic_stack_[(4) - (3)].stringVal);
3047  }
3048  break;
3049 
3050  case 110:
3051 
3052 /* Line 678 of lalr1.cc */
3053 #line 1587 "Parser.yy"
3054  {
3055  (yyval.stringVal) = NULL;
3056  }
3057  break;
3058 
3059  case 111:
3060 
3061 /* Line 678 of lalr1.cc */
3062 #line 1591 "Parser.yy"
3063  {
3064  (yyval.stringVal) = ((yysemantic_stack_[(2) - (1)].stringVal)) ? (yysemantic_stack_[(2) - (1)].stringVal) : (yysemantic_stack_[(2) - (2)].stringVal);
3065  }
3066  break;
3067 
3068  case 119:
3069 
3070 /* Line 678 of lalr1.cc */
3071 #line 1606 "Parser.yy"
3072  {
3073  delete (yysemantic_stack_[(2) - (2)].stringVal);
3074  }
3075  break;
3076 
3077  case 120:
3078 
3079 /* Line 678 of lalr1.cc */
3080 #line 1610 "Parser.yy"
3081  {
3082  delete (yysemantic_stack_[(2) - (2)].stringVal);
3083  }
3084  break;
3085 
3086  case 121:
3087 
3088 /* Line 678 of lalr1.cc */
3089 #line 1616 "Parser.yy"
3090  {
3091  (yyval.logicListData) = (yysemantic_stack_[(4) - (3)].logicListData);
3092  }
3093  break;
3094 
3095  case 122:
3096 
3097 /* Line 678 of lalr1.cc */
3098 #line 1622 "Parser.yy"
3099  {
3100  (yyval.logicListData) = NULL;
3101  }
3102  break;
3103 
3104  case 123:
3105 
3106 /* Line 678 of lalr1.cc */
3107 #line 1626 "Parser.yy"
3108  {
3109  (yyval.logicListData) = ((yysemantic_stack_[(2) - (1)].logicListData))?(yysemantic_stack_[(2) - (1)].logicListData):new LogicListData();
3110  (yyval.logicListData)->mNameDataList.push_back((yysemantic_stack_[(2) - (2)].nameData));
3111  }
3112  break;
3113 
3114  case 135:
3115 
3116 /* Line 678 of lalr1.cc */
3117 #line 1646 "Parser.yy"
3118  {
3120  = inDriver.getContext();
3121  ViewSharedPtr view
3122  = ctx->getCurrentView();
3123  TimingSharedPtr timing
3124  = ctx->getCurrentTiming();
3125  view->setTiming(timing);
3126  ctx->setCurrentTiming(TimingSharedPtr());
3127  }
3128  break;
3129 
3130  case 136:
3131 
3132 /* Line 678 of lalr1.cc */
3133 #line 1657 "Parser.yy"
3134  {
3136  = inDriver.getContext();
3137  ViewSharedPtr view
3138  = ctx->getCurrentView();
3139  SimulateSharedPtr simulate
3140  = ctx->getCurrentSimulate();
3141  view->setSimulate(simulate);
3142  ctx->setCurrentSimulate(SimulateSharedPtr());
3143  }
3144  break;
3145 
3146  case 141:
3147 
3148 /* Line 678 of lalr1.cc */
3149 #line 1672 "Parser.yy"
3150  {
3151  delete (yysemantic_stack_[(2) - (2)].stringVal);
3152  }
3153  break;
3154 
3155  case 142:
3156 
3157 /* Line 678 of lalr1.cc */
3158 #line 1676 "Parser.yy"
3159  {
3160  delete (yysemantic_stack_[(2) - (2)].stringVal);
3161  }
3162  break;
3163 
3164  case 150:
3165 
3166 /* Line 678 of lalr1.cc */
3167 #line 1697 "Parser.yy"
3168  {
3169  (yyval.integerVal) = (yysemantic_stack_[(4) - (3)].integerVal);
3170  }
3171  break;
3172 
3173  case 151:
3174 
3175 /* Line 678 of lalr1.cc */
3176 #line 1703 "Parser.yy"
3177  {
3178  if((yysemantic_stack_[(1) - (1)].integerVal));
3179  (yyval.integerVal) = (yysemantic_stack_[(1) - (1)].integerVal);
3180  }
3181  break;
3182 
3183  case 152:
3184 
3185 /* Line 678 of lalr1.cc */
3186 #line 1708 "Parser.yy"
3187  {
3188  if((yysemantic_stack_[(1) - (1)].integerVal));
3189  (yyval.integerVal) = (yysemantic_stack_[(1) - (1)].integerVal);
3190  }
3191  break;
3192 
3193  case 153:
3194 
3195 /* Line 678 of lalr1.cc */
3196 #line 1715 "Parser.yy"
3197  {
3198  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
3199  }
3200  break;
3201 
3202  case 157:
3203 
3204 /* Line 678 of lalr1.cc */
3205 #line 1726 "Parser.yy"
3206  {
3207  delete (yysemantic_stack_[(2) - (2)].pairData);
3208  }
3209  break;
3210 
3211  case 158:
3212 
3213 /* Line 678 of lalr1.cc */
3214 #line 1732 "Parser.yy"
3215  {
3216  if((yysemantic_stack_[(5) - (3)].integerVal))
3217  {
3219  ApplySharedPtr apply = ctx->getCurrentApply();
3220  apply->setNoOfCycle((yysemantic_stack_[(5) - (3)].integerVal));
3221 
3222  boost::scoped_ptr<PairData> data((yysemantic_stack_[(5) - (4)].pairData));
3223  Value::Number num(data->mX, data->mY);
3224  Value val(Value::eValueTypeNumber, num);
3225  apply->setCycleDuration(val);
3226  }
3227  }
3228  break;
3229 
3230  case 159:
3231 
3232 /* Line 678 of lalr1.cc */
3233 #line 1748 "Parser.yy"
3234  {
3235  (yyval.pairData) = new PairData();
3236  }
3237  break;
3238 
3239  case 160:
3240 
3241 /* Line 678 of lalr1.cc */
3242 #line 1752 "Parser.yy"
3243  {
3244  (yyval.pairData) = (yysemantic_stack_[(1) - (1)].pairData);
3245  }
3246  break;
3247 
3248  case 161:
3249 
3250 /* Line 678 of lalr1.cc */
3251 #line 1758 "Parser.yy"
3252  {
3253  (yyval.pairStrData) = new PairStrData(*(yysemantic_stack_[(5) - (3)].stringVal), *(yysemantic_stack_[(5) - (4)].stringVal));
3254  }
3255  break;
3256 
3257  case 162:
3258 
3259 /* Line 678 of lalr1.cc */
3260 #line 1763 "Parser.yy"
3261  {
3262  (yyval.stringVal) = new std::string();
3263  }
3264  break;
3265 
3266  case 163:
3267 
3268 /* Line 678 of lalr1.cc */
3269 #line 1767 "Parser.yy"
3270  {
3271  (yyval.stringVal) = (yysemantic_stack_[(1) - (1)].stringVal);
3272  }
3273  break;
3274 
3275  case 164:
3276 
3277 /* Line 678 of lalr1.cc */
3278 #line 1773 "Parser.yy"
3279  {
3280  (yyval.pairData) = (yysemantic_stack_[(4) - (3)].pairData);
3281  }
3282  break;
3283 
3284  case 167:
3285 
3286 /* Line 678 of lalr1.cc */
3287 #line 1783 "Parser.yy"
3288  {
3289  (yyval.pairData) = (yysemantic_stack_[(4) - (3)].pairData);
3290  }
3291  break;
3292 
3293  case 170:
3294 
3295 /* Line 678 of lalr1.cc */
3296 #line 1793 "Parser.yy"
3297  {
3298  (yyval.pairData) = (yysemantic_stack_[(4) - (3)].pairData);
3299  }
3300  break;
3301 
3302  case 173:
3303 
3304 /* Line 678 of lalr1.cc */
3305 #line 1803 "Parser.yy"
3306  {
3307  (yyval.pairData) = (yysemantic_stack_[(4) - (3)].pairData);
3308  }
3309  break;
3310 
3311  case 176:
3312 
3313 /* Line 678 of lalr1.cc */
3314 #line 1813 "Parser.yy"
3315  {
3316  (yyval.portDelay) = (yysemantic_stack_[(4) - (3)].portDelay);
3317  }
3318  break;
3319 
3320  case 177:
3321 
3322 /* Line 678 of lalr1.cc */
3323 #line 1819 "Parser.yy"
3324  {
3325  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(1) - (1)].valueData));
3326  (yyval.portDelay) = new PortDelay();
3327  (yyval.portDelay)->setType(PortDelay::eTypeDelay);
3328  (yyval.portDelay)->setDelay(data->mValues[0].get<Value::MiNoMax>());
3329  }
3330  break;
3331 
3332  case 178:
3333 
3334 /* Line 678 of lalr1.cc */
3335 #line 1826 "Parser.yy"
3336  {
3337  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(1) - (1)].valueData));
3338  (yyval.portDelay) = new PortDelay();
3339  (yyval.portDelay)->setType(PortDelay::eTypeDelay);
3340  (yyval.portDelay)->setDelay(data->mValues[0].get<Value::MiNoMax>());
3341  }
3342  break;
3343 
3344  case 180:
3345 
3346 /* Line 678 of lalr1.cc */
3347 #line 1838 "Parser.yy"
3348  {
3349  delete (yysemantic_stack_[(1) - (1)].valueData);
3350  }
3351  break;
3352 
3353  case 181:
3354 
3355 /* Line 678 of lalr1.cc */
3356 #line 1842 "Parser.yy"
3357  {
3358  delete (yysemantic_stack_[(1) - (1)].valueData);
3359  }
3360  break;
3361 
3362  case 184:
3363 
3364 /* Line 678 of lalr1.cc */
3365 #line 1852 "Parser.yy"
3366  {
3367  delete (yysemantic_stack_[(2) - (2)].pairData);
3368  }
3369  break;
3370 
3371  case 185:
3372 
3373 /* Line 678 of lalr1.cc */
3374 #line 1858 "Parser.yy"
3375  {
3376  (yyval.integerVal) = (yysemantic_stack_[(4) - (3)].integerVal);
3377  }
3378  break;
3379 
3380  case 186:
3381 
3382 /* Line 678 of lalr1.cc */
3383 #line 1864 "Parser.yy"
3384  {
3385  (yyval.integerVal) = eDerivationCalculated;
3386  }
3387  break;
3388 
3389  case 187:
3390 
3391 /* Line 678 of lalr1.cc */
3392 #line 1868 "Parser.yy"
3393  {
3394  (yyval.integerVal) = eDerivationMeasured;
3395  }
3396  break;
3397 
3398  case 188:
3399 
3400 /* Line 678 of lalr1.cc */
3401 #line 1872 "Parser.yy"
3402  {
3403  (yyval.integerVal) = eDerivationRequired;
3404  }
3405  break;
3406 
3407  case 189:
3408 
3409 /* Line 678 of lalr1.cc */
3410 #line 1878 "Parser.yy"
3411  {
3412  if((yysemantic_stack_[(3) - (3)].nameData))
3413  {
3415  = inDriver.getContext();
3416  RootSharedPtr root = ctx->getRoot();
3417  DesignSharedPtr design;
3418  design = root->findDesign((yysemantic_stack_[(3) - (3)].nameData)->mName);
3419  if(design)
3420  {
3421  log("Skipped creation of existing design.\n");
3422  }
3423  else
3424  {
3425  try
3426  {
3427  ctx->getFactory()->create(design);
3428  }
3429  catch(Error &e)
3430  {
3431  std::string message = constructErrorMessage(
3432  "Unable to create design : %s",
3433  design->getName().c_str());
3434  log("%s\n", message.c_str());
3435  e.setCurrentLocation( __FUNCTION__,
3436  __FILE__, __LINE__ );
3437  e.saveContextData("Parser error message", message);
3438  e.saveContextData("Filename", yyloc.begin.filename);
3439  e.saveContextData("StartLine", yyloc.begin.line);
3440  e.saveContextData("EndLine", yyloc.end.line);
3442  error(yyloc, message);
3443  YYABORT;
3444  }
3445  design->setName((yysemantic_stack_[(3) - (3)].nameData)->mName);
3446  if(!(yysemantic_stack_[(3) - (3)].nameData)->mOriginalName.empty())
3447  {
3448  design->setOriginalName((yysemantic_stack_[(3) - (3)].nameData)->mOriginalName);
3449  }
3450  design->setParent(root);
3451  root->addDesign(design);
3452  }
3453  ctx->setCurrentDesign(design);
3454  ctx->pushPropertyContainer(design);
3455  ctx->pushStatusContainer(design);
3456  delete (yysemantic_stack_[(3) - (3)].nameData);
3457  }
3458  }
3459  break;
3460 
3461  case 190:
3462 
3463 /* Line 678 of lalr1.cc */
3464 #line 1926 "Parser.yy"
3465  {
3467  ctx->popPropertyContainer();
3468  ctx->popStatusContainer();
3469 
3470  boost::scoped_ptr<CellRefData> cellRefData((yysemantic_stack_[(6) - (5)].cellRefData));
3471  std::string cellName = cellRefData->mCellName->mName;
3472  std::string libName = cellRefData->mLibraryName->mName;
3473  LibrarySharedPtr library
3474  = ctx->getRoot()->findLibrary(libName) ;
3475  if(!library)
3476  {
3477  std::string message = constructErrorMessage(
3478  "Library %s not found",
3479  libName.c_str() );
3480  log("%s\n", message.c_str());
3482  __FUNCTION__, __FILE__, __LINE__ );
3483  e.saveContextData("Parser error message", message);
3484  e.saveContextData("Filename", yyloc.begin.filename);
3485  e.saveContextData("StartLine", yyloc.begin.line);
3486  e.saveContextData("EndLine", yyloc.end.line);
3488  error(yyloc, message);
3489  YYABORT;
3490  }
3491 
3492  CellSharedPtr cell
3493  = library->findCell(cellName);
3494  if(!cell)
3495  {
3496  std::string message = constructErrorMessage(
3497  "Cell %s not found",
3498  cellName.c_str() );
3499  log("%s\n", message.c_str());
3501  __FUNCTION__, __FILE__, __LINE__ );
3502  e.saveContextData("Parser error message", message);
3503  e.saveContextData("Filename", yyloc.begin.filename);
3504  e.saveContextData("StartLine", yyloc.begin.line);
3505  e.saveContextData("EndLine", yyloc.end.line);
3507  error(yyloc, message);
3508  YYABORT;
3509  }
3510  DesignSharedPtr design = ctx->getCurrentDesign();
3511  design->setCellRefName(cellName);
3512  design->setLibraryRefName(libName);
3513  ctx->setCurrentDesign(DesignSharedPtr());
3514  }
3515  break;
3516 
3517  case 191:
3518 
3519 /* Line 678 of lalr1.cc */
3520 #line 1979 "Parser.yy"
3521  {
3522  (yyval.cellRefData) = new CellRefData();
3523  (yyval.cellRefData) = (yysemantic_stack_[(1) - (1)].cellRefData);
3524  }
3525  break;
3526 
3527  case 192:
3528 
3529 /* Line 678 of lalr1.cc */
3530 #line 1984 "Parser.yy"
3531  {
3532  (yyval.cellRefData) = (yysemantic_stack_[(2) - (1)].cellRefData);
3533  }
3534  break;
3535 
3536  case 193:
3537 
3538 /* Line 678 of lalr1.cc */
3539 #line 1988 "Parser.yy"
3540  {
3541  (yyval.cellRefData) = (yysemantic_stack_[(2) - (1)].cellRefData);
3543  DesignSharedPtr design = ctx->getCurrentDesign();
3544  design->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
3545  delete (yysemantic_stack_[(2) - (2)].stringVal);
3546  }
3547  break;
3548 
3549  case 194:
3550 
3551 /* Line 678 of lalr1.cc */
3552 #line 1996 "Parser.yy"
3553  {
3554  (yyval.cellRefData) = (yysemantic_stack_[(2) - (1)].cellRefData);
3555  }
3556  break;
3557 
3558  case 195:
3559 
3560 /* Line 678 of lalr1.cc */
3561 #line 2000 "Parser.yy"
3562  {
3563  (yyval.cellRefData) = (yysemantic_stack_[(2) - (1)].cellRefData);
3565  DesignSharedPtr design = ctx->getCurrentDesign();
3566  design->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
3567  delete (yysemantic_stack_[(2) - (2)].stringVal);
3568  }
3569  break;
3570 
3571  case 197:
3572 
3573 /* Line 678 of lalr1.cc */
3574 #line 2013 "Parser.yy"
3575  {
3576  delete (yysemantic_stack_[(1) - (1)].stringVal);
3577  }
3578  break;
3579 
3580  case 198:
3581 
3582 /* Line 678 of lalr1.cc */
3583 #line 2017 "Parser.yy"
3584  {
3585  delete (yysemantic_stack_[(1) - (1)].stringVal);
3586  }
3587  break;
3588 
3589  case 199:
3590 
3591 /* Line 678 of lalr1.cc */
3592 #line 2023 "Parser.yy"
3593  {
3594  (yyval.stringVal) = (yysemantic_stack_[(4) - (3)].stringVal);
3595  }
3596  break;
3597 
3598  case 217:
3599 
3600 /* Line 678 of lalr1.cc */
3601 #line 2052 "Parser.yy"
3602  {
3603  delete (yysemantic_stack_[(2) - (2)].stringVal);
3604  }
3605  break;
3606 
3607  case 218:
3608 
3609 /* Line 678 of lalr1.cc */
3610 #line 2056 "Parser.yy"
3611  {
3612  delete (yysemantic_stack_[(2) - (2)].stringVal);
3613  }
3614  break;
3615 
3616  case 224:
3617 
3618 /* Line 678 of lalr1.cc */
3619 #line 2071 "Parser.yy"
3620  {
3621  inDriver.getContext()->getCurrentPort()->setDirection(
3622  static_cast<EPortDirection>((yysemantic_stack_[(4) - (3)].integerVal)) );
3623  }
3624  break;
3625 
3626  case 225:
3627 
3628 /* Line 678 of lalr1.cc */
3629 #line 2078 "Parser.yy"
3630  {
3631  (yyval.integerVal) = 0;
3632  }
3633  break;
3634 
3635  case 226:
3636 
3637 /* Line 678 of lalr1.cc */
3638 #line 2082 "Parser.yy"
3639  {
3640  (yyval.integerVal) = 1;
3641  }
3642  break;
3643 
3644  case 227:
3645 
3646 /* Line 678 of lalr1.cc */
3647 #line 2086 "Parser.yy"
3648  {
3649  (yyval.integerVal) = 2;
3650  }
3651  break;
3652 
3653  case 235:
3654 
3655 /* Line 678 of lalr1.cc */
3656 #line 2105 "Parser.yy"
3657  {
3658  (yyval.logicListData) = (yysemantic_stack_[(4) - (3)].logicListData);
3659  }
3660  break;
3661 
3662  case 236:
3663 
3664 /* Line 678 of lalr1.cc */
3665 #line 2111 "Parser.yy"
3666  {
3667  (yyval.logicListData) = NULL;
3668  }
3669  break;
3670 
3671  case 237:
3672 
3673 /* Line 678 of lalr1.cc */
3674 #line 2115 "Parser.yy"
3675  {
3676  (yyval.logicListData) = ((yysemantic_stack_[(2) - (1)].logicListData))?(yysemantic_stack_[(2) - (1)].logicListData):new LogicListData();
3677  (yyval.logicListData)->mNameDataList.push_back((yysemantic_stack_[(2) - (2)].nameData));
3678  }
3679  break;
3680 
3681  case 239:
3682 
3683 /* Line 678 of lalr1.cc */
3684 #line 2125 "Parser.yy"
3685  {
3686  delete (yysemantic_stack_[(1) - (1)].pairData);
3687  }
3688  break;
3689 
3690  case 241:
3691 
3692 /* Line 678 of lalr1.cc */
3693 #line 2132 "Parser.yy"
3694  {
3695  (yyval.pairData) = (yysemantic_stack_[(4) - (3)].pairData);
3696  }
3697  break;
3698 
3699  case 245:
3700 
3701 /* Line 678 of lalr1.cc */
3702 #line 2143 "Parser.yy"
3703  {
3704  delete (yysemantic_stack_[(2) - (2)].stringVal);
3705  }
3706  break;
3707 
3708  case 246:
3709 
3710 /* Line 678 of lalr1.cc */
3711 #line 2147 "Parser.yy"
3712  {
3713  delete (yysemantic_stack_[(2) - (2)].stringVal);
3714  }
3715  break;
3716 
3717  case 255:
3718 
3719 /* Line 678 of lalr1.cc */
3720 #line 2169 "Parser.yy"
3721  {
3722  delete (yysemantic_stack_[(1) - (1)].logicRefData);
3723  }
3724  break;
3725 
3726  case 262:
3727 
3728 /* Line 678 of lalr1.cc */
3729 #line 2183 "Parser.yy"
3730  {
3731  EventSharedPtr event;
3733  = inDriver.getContext();
3734  try
3735  {
3736  ctx->getFactory()->create(event);
3737  }
3738  catch(Error &e)
3739  {
3740  std::string message = constructErrorMessage(
3741  "Unable to create event" );
3742  log("%s\n", message.c_str());
3743  e.setCurrentLocation( __FUNCTION__,
3744  __FILE__, __LINE__ );
3745  e.saveContextData("Parser error message", message);
3746  e.saveContextData("Filename", yyloc.begin.filename);
3747  e.saveContextData("StartLine", yyloc.begin.line);
3748  e.saveContextData("EndLine", yyloc.end.line);
3750  error(yyloc, message);
3751  YYABORT;
3752  }
3753  ctx->setCurrentEvent(event);
3754  }
3755  break;
3756 
3757  case 263:
3758 
3759 /* Line 678 of lalr1.cc */
3760 #line 2208 "Parser.yy"
3761  {
3762  // Note : Need to do the followings, from where Event called
3763  //EdifContextSharedPtr ctx = inDriver.getContext();
3764  //ctx->setCurrentEvent(EventSharedPtr());
3765  }
3766  break;
3767 
3768  case 269:
3769 
3770 /* Line 678 of lalr1.cc */
3771 #line 2221 "Parser.yy"
3772  {
3774  = inDriver.getContext();
3775  EventSharedPtr event
3776  = ctx->getCurrentEvent();
3777  LogicElementSharedPtr logicElem
3778  = ctx->getCurrentLogicElement();
3779  if(event)
3780  {
3781  if(logicElem)
3782  {
3783  event->setTransition(logicElem);
3784  }
3785  }
3786  }
3787  break;
3788 
3789  case 270:
3790 
3791 /* Line 678 of lalr1.cc */
3792 #line 2237 "Parser.yy"
3793  {
3795  = inDriver.getContext();
3796  EventSharedPtr event
3797  = ctx->getCurrentEvent();
3798  LogicElementSharedPtr logicElem
3799  = ctx->getCurrentLogicElement();
3800  if(event)
3801  {
3802  if(logicElem)
3803  {
3804  event->setTransition(logicElem);
3805  }
3806  }
3807  }
3808  break;
3809 
3810  case 271:
3811 
3812 /* Line 678 of lalr1.cc */
3813 #line 2255 "Parser.yy"
3814  {
3815  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(1) - (1)].portRefData));
3817  = inDriver.getContext();
3818  ViewSharedPtr view
3819  = ctx->getCurrentView();
3820  std::vector< std::string > nestedNames;
3821  PortRefData *currPortRef = (yysemantic_stack_[(1) - (1)].portRefData);
3822  PortRefData *nextPortRef = portData->mParentPort;
3823  nestedNames.push_back(currPortRef->mPortName->mName);
3824  while(nextPortRef)
3825  {
3826  currPortRef = nextPortRef;
3827  nestedNames.push_back(nextPortRef->mPortName->mName);
3828  nextPortRef = currPortRef->mParentPort;
3829  }
3830  bool isPort = (NULL == currPortRef->mInstanceName);
3831  NameData *portNameData = currPortRef->mPortName;
3832  std::string topName = *(nestedNames.rbegin());
3833  if(isPort)
3834  {
3835  PortSharedPtr port = view->findPort(topName);
3836  if(!port)
3837  {
3838  std::string message = constructErrorMessage(
3839  "No port %s found",
3840  portNameData->mName.c_str());
3841  log("%s\n", message.c_str());
3843  __FUNCTION__, __FILE__, __LINE__ );
3844  e.saveContextData("Parser error message", message);
3845  e.saveContextData("Filename", yyloc.begin.filename);
3846  e.saveContextData("StartLine", yyloc.begin.line);
3847  e.saveContextData("EndLine", yyloc.end.line);
3849  error(yyloc, message);
3850  YYABORT;
3851  }
3852  try
3853  {
3854  connectibleFinder(nestedNames, port);
3855  if(!portData->mPortName->mIndices.empty())
3856  {
3857  port = port->get(portData->mPortName->mIndices);
3858  }
3859  EventSharedPtr event
3860  = ctx->getCurrentEvent();
3861  event->addPort(port);
3862  }
3863  catch(Error &e)
3864  {
3866  __FUNCTION__, __FILE__, __LINE__ );
3867  throw;
3868  }
3869  }
3870  else
3871  {
3872  NameData *instanceName
3873  = currPortRef->mInstanceName;
3874  InstanceSharedPtr instance
3875  = view->findInstance(
3876  instanceName->mName );
3877  if(!instance)
3878  {
3879  std::string message = constructErrorMessage(
3880  "Instance %s not known",
3881  instanceName->mName.c_str() );
3882  log("%s\n", message.c_str());
3884  __FUNCTION__, __FILE__, __LINE__ );
3885  e.saveContextData("Parser error message", message);
3886  e.saveContextData("Filename", yyloc.begin.filename);
3887  e.saveContextData("StartLine", yyloc.begin.line);
3888  e.saveContextData("EndLine", yyloc.end.line);
3890  error(yyloc, message);
3891  YYABORT;
3892  }
3893  if(!instanceName->mIndices.empty())
3894  {
3895  InstanceSharedPtr bit
3896  = instance->get(instanceName->mIndices);
3897  instance = bit;
3898  }
3899  PortReferenceSharedPtr portRef
3900  = instance->findPortReference(topName);
3901  if(!portRef)
3902  {
3903  std::string message = constructErrorMessage(
3904  "No port ref %s found",
3905  portNameData->mName.c_str());
3906  log("%s\n", message.c_str());
3908  __FUNCTION__, __FILE__, __LINE__ );
3909  e.saveContextData("Parser error message", message);
3910  e.saveContextData("Filename", yyloc.begin.filename);
3911  e.saveContextData("StartLine", yyloc.begin.line);
3912  e.saveContextData("EndLine", yyloc.end.line);
3914  error(yyloc, message);
3915  YYABORT;
3916  }
3917  try
3918  {
3919  connectibleFinder(nestedNames, portRef);
3920  if(!portData->mPortName->mIndices.empty())
3921  {
3922  portRef = portRef->get(
3923  portData->mPortName->mIndices );
3924  }
3925  EventSharedPtr event
3926  = ctx->getCurrentEvent();
3927  event->addPortReference(portRef);
3928  }
3929  catch(Error &e)
3930  {
3931  std::string message = constructErrorMessage(
3932  "Unable to connect port ref : %s",
3933  portRef->getName().c_str());
3934  log("%s\n", message.c_str());
3935  e.setCurrentLocation( __FUNCTION__,
3936  __FILE__, __LINE__ );
3937  e.saveContextData("Parser error message", message);
3938  e.saveContextData("Filename", yyloc.begin.filename);
3939  e.saveContextData("StartLine", yyloc.begin.line);
3940  e.saveContextData("EndLine", yyloc.end.line);
3942  error(yyloc, message);
3943  YYABORT;
3944  }
3945  }
3946  }
3947  break;
3948 
3949  case 272:
3950 
3951 /* Line 678 of lalr1.cc */
3952 #line 2391 "Parser.yy"
3953  {
3954  if(NULL != (yysemantic_stack_[(1) - (1)].portListData) && !(yysemantic_stack_[(1) - (1)].portListData)->mPortRefs.empty())
3955  {
3956  boost::scoped_ptr<PortListData> portListData((yysemantic_stack_[(1) - (1)].portListData));
3957  std::string message;
3958 
3960 
3961  PortListSharedPtr portList;
3962  ctx->getFactory()->create(portList);
3963 
3964  for( std::vector<PortRefData *>::iterator it
3965  = portListData->mPortRefs.begin();
3966  it != portListData->mPortRefs.end(); ++it )
3967  {
3968  PortRefData *portData = *it;
3969  std::vector< std::string > nestedNames;
3970  PortRefData *currPortRef = *it;
3971  PortRefData *nextPortRef = portData->mParentPort;
3972  nestedNames.push_back(currPortRef->mPortName->mName);
3973  while(nextPortRef)
3974  {
3975  currPortRef = nextPortRef;
3976  nestedNames.push_back(nextPortRef->mPortName->mName);
3977  nextPortRef = currPortRef->mParentPort;
3978  }
3979  bool isPort = (NULL == currPortRef->mInstanceName);
3980  NameData *portNameData = currPortRef->mPortName;
3981  std::string topName = *(nestedNames.rbegin());
3982  ViewSharedPtr view = ctx->getCurrentView();
3983  if(isPort)
3984  {
3985  PortSharedPtr port = view->findPort(topName);
3986  if(!port)
3987  {
3988  SimulateSharedPtr simulate
3989  = ctx->getCurrentSimulate();
3990  if(simulate)
3991  {
3992  PortListAliasSharedPtr portList
3993  = simulate->findPortListAlias(topName);
3994  if(!portList)
3995  {
3996  std::string message = constructErrorMessage(
3997  "No port %s found in portListAlias\n",
3998  portNameData->mName.c_str());
3999  log("%s\n", message.c_str());
4001  __FUNCTION__, __FILE__, __LINE__ );
4002  e.saveContextData("Parser error message", message);
4003  e.saveContextData("Filename", yyloc.begin.filename);
4004  e.saveContextData("StartLine", yyloc.begin.line);
4005  e.saveContextData("EndLine", yyloc.end.line);
4007  error(yyloc, message);
4008  YYABORT;
4009  }
4010  }
4011  else
4012  {
4013  std::string message = constructErrorMessage(
4014  "No port %s found in view %s",
4015  portNameData->mName.c_str(),
4016  view->getName().c_str() );
4017  log("%s\n", message.c_str());
4019  __FUNCTION__, __FILE__, __LINE__ );
4020  e.saveContextData("Parser error message", message);
4021  e.saveContextData("Filename", yyloc.begin.filename);
4022  e.saveContextData("StartLine", yyloc.begin.line);
4023  e.saveContextData("EndLine", yyloc.end.line);
4025  error(yyloc, message);
4026  YYABORT;
4027  }
4028  }
4029  try
4030  {
4031  connectibleFinder(nestedNames, port);
4032  if(!portData->mPortName->mIndices.empty())
4033  {
4034  port = port->get(portData->mPortName->mIndices);
4035  }
4036  portList->addChildPort(port);
4037  }
4038  catch(Error &e)
4039  {
4040  std::string message = constructErrorMessage(
4041  "Unable to connect port : %s",
4042  port->getName().c_str());
4043  log("%s\n", message.c_str());
4044  e.setCurrentLocation( __FUNCTION__,
4045  __FILE__, __LINE__ );
4046  e.saveContextData("Parser error message", message);
4047  e.saveContextData("Filename", yyloc.begin.filename);
4048  e.saveContextData("StartLine", yyloc.begin.line);
4049  e.saveContextData("EndLine", yyloc.end.line);
4051  error(yyloc, message);
4052  YYABORT;
4053  }
4054  }
4055  else
4056  {
4057  NameData *instanceName
4058  = currPortRef->mInstanceName;
4059  InstanceSharedPtr instance
4060  = view->findInstance(
4061  instanceName->mName );
4062  if(!instance)
4063  {
4064  std::string message = constructErrorMessage(
4065  "Instance %s not known",
4066  instanceName->mName.c_str() );
4067  log("%s\n", message.c_str());
4069  __FUNCTION__, __FILE__, __LINE__ );
4070  e.saveContextData("Parser error message", message);
4071  e.saveContextData("Filename", yyloc.begin.filename);
4072  e.saveContextData("StartLine", yyloc.begin.line);
4073  e.saveContextData("EndLine", yyloc.end.line);
4075  error(yyloc, message);
4076  YYABORT;
4077  }
4078  if(!instanceName->mIndices.empty())
4079  {
4080  InstanceSharedPtr bit
4081  = instance->get(instanceName->mIndices);
4082  instance = bit;
4083  }
4084  PortReferenceSharedPtr portRef
4085  = instance->findPortReference(topName);
4086  if(!portRef)
4087  {
4088  std::string message = constructErrorMessage(
4089  "No port ref %s found",
4090  portNameData->mName.c_str());
4091  log("%s\n", message.c_str());
4093  __FUNCTION__, __FILE__, __LINE__ );
4094  e.saveContextData("Parser error message", message);
4095  e.saveContextData("Filename", yyloc.begin.filename);
4096  e.saveContextData("StartLine", yyloc.begin.line);
4097  e.saveContextData("EndLine", yyloc.end.line);
4099  error(yyloc, message);
4100  YYABORT;
4101  }
4102  try
4103  {
4104  connectibleFinder(nestedNames, portRef);
4105  if(!portData->mPortName->mIndices.empty())
4106  {
4107  portRef = portRef->get(
4108  portData->mPortName->mIndices );
4109  }
4110  portList->addChildPortReference(portRef);
4111  }
4112  catch(Error &e)
4113  {
4114  std::string message = constructErrorMessage(
4115  "Unable to connect port ref : %s",
4116  portRef->getName().c_str());
4117  log("%s\n", message.c_str());
4118  e.setCurrentLocation( __FUNCTION__,
4119  __FILE__, __LINE__ );
4120  e.saveContextData("Parser error message", message);
4121  e.saveContextData("Filename", yyloc.begin.filename);
4122  e.saveContextData("StartLine", yyloc.begin.line);
4123  e.saveContextData("EndLine", yyloc.end.line);
4125  error(yyloc, message);
4126  YYABORT;
4127  }
4128  }
4129  }
4130  EventSharedPtr event
4131  = ctx->getCurrentEvent();
4132  event->setPortList(portList);
4133  }
4134  }
4135  break;
4136 
4137  case 273:
4138 
4139 /* Line 678 of lalr1.cc */
4140 #line 2576 "Parser.yy"
4141  {
4142  boost::scoped_ptr<NetRefData> netData((yysemantic_stack_[(1) - (1)].netRefData));
4144  = inDriver.getContext();
4145  ViewSharedPtr view
4146  = ctx->getCurrentView();
4147  std::vector< std::string > nestedNames;
4148  NetRefData *currNetRef = (yysemantic_stack_[(1) - (1)].netRefData);
4149  NetRefData *nextNetRef = netData->mParentNet;
4150  nestedNames.push_back(currNetRef->mNetName->mName);
4151  while(nextNetRef)
4152  {
4153  currNetRef = nextNetRef;
4154  nestedNames.push_back(nextNetRef->mNetName->mName);
4155  nextNetRef = currNetRef->mParentNet;
4156  }
4157  bool isNet = (NULL == currNetRef->mInstanceName);
4158  NameData *netNameData = currNetRef->mNetName;
4159  std::string topName = *(nestedNames.rbegin());
4160  if(isNet)
4161  {
4162  NetSharedPtr net = view->findNet(topName);
4163  if(!net)
4164  {
4165  std::string message = constructErrorMessage(
4166  "No Net %s found",
4167  netNameData->mName.c_str());
4168  log("%s\n", message.c_str());
4170  __FUNCTION__, __FILE__, __LINE__ );
4171  e.saveContextData("Parser error message", message);
4172  e.saveContextData("Filename", yyloc.begin.filename);
4173  e.saveContextData("StartLine", yyloc.begin.line);
4174  e.saveContextData("EndLine", yyloc.end.line);
4176  error(yyloc, message);
4177  YYABORT;
4178  }
4179  try
4180  {
4181  connectibleFinder(nestedNames, net);
4182  if(!netData->mNetName->mIndices.empty())
4183  {
4184  net = net->get(netData->mNetName->mIndices);
4185  }
4186  EventSharedPtr event
4187  = ctx->getCurrentEvent();
4188  event->addNet(net);
4189  }
4190  catch(Error &e)
4191  {
4193  __FUNCTION__, __FILE__, __LINE__ );
4194  throw;
4195  }
4196  }
4197  else
4198  {
4199  NameData *instanceName
4200  = currNetRef->mInstanceName;
4201  InstanceSharedPtr instance
4202  = view->findInstance(
4203  instanceName->mName );
4204  if(!instance)
4205  {
4206  std::string message = constructErrorMessage(
4207  "Instance %s not known",
4208  instanceName->mName.c_str() );
4209  log("%s\n", message.c_str());
4211  __FUNCTION__, __FILE__, __LINE__ );
4212  e.saveContextData("Parser error message", message);
4213  e.saveContextData("Filename", yyloc.begin.filename);
4214  e.saveContextData("StartLine", yyloc.begin.line);
4215  e.saveContextData("EndLine", yyloc.end.line);
4217  error(yyloc, message);
4218  YYABORT;
4219  }
4220  if(!instanceName->mIndices.empty())
4221  {
4222  InstanceSharedPtr bit
4223  = instance->get(instanceName->mIndices);
4224  instance = bit;
4225  }
4226  NetSharedPtr net = view->findNet(topName);
4227  if(!net)
4228  {
4229  std::string message = constructErrorMessage(
4230  "No Net ref %s found",
4231  netNameData->mName.c_str());
4232  log("%s\n", message.c_str());
4234  __FUNCTION__, __FILE__, __LINE__ );
4235  e.saveContextData("Parser error message", message);
4236  e.saveContextData("Filename", yyloc.begin.filename);
4237  e.saveContextData("StartLine", yyloc.begin.line);
4238  e.saveContextData("EndLine", yyloc.end.line);
4240  error(yyloc, message);
4241  YYABORT;
4242  }
4243  try
4244  {
4245  connectibleFinder(nestedNames, net);
4246  if(!netData->mNetName->mIndices.empty())
4247  {
4248  net = net->get(netData->mNetName->mIndices);
4249  }
4250  EventSharedPtr event
4251  = ctx->getCurrentEvent();
4252  event->addNet(net);
4253  }
4254  catch(Error &e)
4255  {
4257  __FUNCTION__, __FILE__, __LINE__ );
4258  throw;
4259  }
4260  }
4261  }
4262  break;
4263 
4264  case 274:
4265 
4266 /* Line 678 of lalr1.cc */
4267 #line 2700 "Parser.yy"
4268  {
4269  delete (yysemantic_stack_[(4) - (3)].pairData);
4270  }
4271  break;
4272 
4273  case 275:
4274 
4275 /* Line 678 of lalr1.cc */
4276 #line 2706 "Parser.yy"
4277  {
4278  boost::scoped_ptr<NameData> name((yysemantic_stack_[(4) - (3)].nameData));
4279  if(name && !name->mName.empty())
4280  {
4282  = inDriver.getContext();
4283  RootSharedPtr root = ctx->getRoot();
4284  LibrarySharedPtr lib;
4285  // We do not create a new extern lib when one
4286  // exists already
4287  lib = root->findLibrary(name->mName);
4288  if(lib)
4289  {
4290  log("Skipped creation of existing lib.\n");
4291  }
4292  EdifLevel level;
4293  switch((yysemantic_stack_[(4) - (4)].integerVal))
4294  {
4295  case 0:
4296  {
4297  level = eEdifLevel0;
4298  break;
4299  }
4300  case 1:
4301  {
4302  level = eEdifLevel1;
4303  break;
4304  }
4305  case 2:
4306  {
4307  level = eEdifLevel2;
4308  break;
4309  }
4310  default:
4311  {
4312  std::string message = constructErrorMessage(
4313  "Edif level %s is not supported", (yysemantic_stack_[(4) - (4)].integerVal) );
4314  log("%s\n", message.c_str());
4316  __FUNCTION__, __FILE__, __LINE__ );
4317  e.saveContextData("Parser error message", message);
4318  e.saveContextData("Filename", yyloc.begin.filename);
4319  e.saveContextData("StartLine", yyloc.begin.line);
4320  e.saveContextData("EndLine", yyloc.end.line);
4322  error(yyloc, message);
4323  YYABORT;
4324  }
4325  }
4326  if(lib)
4327  {
4328  if(lib->getLevel() != level)
4329  {
4330  std::string message = constructErrorMessage(
4331  "Level mismatch - old %d new %d\n",
4332  lib->getLevel(), level );
4333  log("%s\n", message.c_str());
4335  __FUNCTION__, __FILE__, __LINE__ );
4336  e.saveContextData("Parser error message", message);
4337  e.saveContextData("Filename", yyloc.begin.filename);
4338  e.saveContextData("StartLine", yyloc.begin.line);
4339  e.saveContextData("EndLine", yyloc.end.line);
4341  error(yyloc, message);
4342  YYABORT;
4343  }
4344  else
4345  {
4346  log("We have found the actual lib corresponding to this lib\n");
4347  }
4348  }
4349  else
4350  {
4351  ctx->getFactory()->create(lib);
4352  lib->setName(name->mName);
4353  if(! name->mOriginalName.empty())
4354  {
4355  lib->setOriginalName(name->mOriginalName);
4356  }
4357  lib->setLevel(level);
4358  lib->setParent(root);
4359  lib->setIsExtern(true);
4360  root->addLibrary(lib);
4361  log("Created extern lib %s level %d\n",
4362  lib->getName().c_str(), level );
4363  }
4364  ctx->setCurrentLibrary(lib);
4365  ctx->pushStatusContainer(lib);
4366  }
4367  else
4368  {
4369  //TBD::POSSIBLE?
4370  }
4371  }
4372  break;
4373 
4374  case 276:
4375 
4376 /* Line 678 of lalr1.cc */
4377 #line 2801 "Parser.yy"
4378  {
4379  inDriver.getContext()->setCurrentLibrary(
4380  LibrarySharedPtr() );
4381  inDriver.getContext()->popStatusContainer();
4382  }
4383  break;
4384 
4385  case 280:
4386 
4387 /* Line 678 of lalr1.cc */
4388 #line 2813 "Parser.yy"
4389  {
4391  LibrarySharedPtr lib = ctx->getCurrentLibrary();
4392  lib->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
4393  delete (yysemantic_stack_[(2) - (2)].stringVal);
4394  }
4395  break;
4396 
4397  case 281:
4398 
4399 /* Line 678 of lalr1.cc */
4400 #line 2820 "Parser.yy"
4401  {
4403  LibrarySharedPtr lib = ctx->getCurrentLibrary();
4404  lib->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
4405  delete (yysemantic_stack_[(2) - (2)].stringVal);
4406  }
4407  break;
4408 
4409  case 295:
4410 
4411 /* Line 678 of lalr1.cc */
4412 #line 2848 "Parser.yy"
4413  {
4414  delete (yysemantic_stack_[(2) - (2)].stringVal);
4415  }
4416  break;
4417 
4418  case 297:
4419 
4420 /* Line 678 of lalr1.cc */
4421 #line 2853 "Parser.yy"
4422  {
4423  delete (yysemantic_stack_[(2) - (2)].stringVal);
4424  }
4425  break;
4426 
4427  case 316:
4428 
4429 /* Line 678 of lalr1.cc */
4430 #line 2887 "Parser.yy"
4431  {
4432  delete (yysemantic_stack_[(2) - (2)].stringVal);
4433  }
4434  break;
4435 
4436  case 318:
4437 
4438 /* Line 678 of lalr1.cc */
4439 #line 2892 "Parser.yy"
4440  {
4441  delete (yysemantic_stack_[(2) - (2)].stringVal);
4442  }
4443  break;
4444 
4445  case 332:
4446 
4447 /* Line 678 of lalr1.cc */
4448 #line 2917 "Parser.yy"
4449  {
4450  delete (yysemantic_stack_[(2) - (2)].stringVal);
4451  }
4452  break;
4453 
4454  case 333:
4455 
4456 /* Line 678 of lalr1.cc */
4457 #line 2921 "Parser.yy"
4458  {
4459  delete (yysemantic_stack_[(2) - (2)].stringVal);
4460  }
4461  break;
4462 
4463  case 337:
4464 
4465 /* Line 678 of lalr1.cc */
4466 #line 2932 "Parser.yy"
4467  {
4468  delete (yysemantic_stack_[(2) - (2)].stringVal);
4469  }
4470  break;
4471 
4472  case 338:
4473 
4474 /* Line 678 of lalr1.cc */
4475 #line 2936 "Parser.yy"
4476  {
4477  delete (yysemantic_stack_[(2) - (2)].stringVal);
4478  }
4479  break;
4480 
4481  case 347:
4482 
4483 /* Line 678 of lalr1.cc */
4484 #line 2955 "Parser.yy"
4485  {
4486  delete (yysemantic_stack_[(2) - (2)].stringVal);
4487  }
4488  break;
4489 
4490  case 348:
4491 
4492 /* Line 678 of lalr1.cc */
4493 #line 2959 "Parser.yy"
4494  {
4495  delete (yysemantic_stack_[(2) - (2)].stringVal);
4496  }
4497  break;
4498 
4499  case 352:
4500 
4501 /* Line 678 of lalr1.cc */
4502 #line 2970 "Parser.yy"
4503  {
4504  delete (yysemantic_stack_[(2) - (2)].stringVal);
4505  }
4506  break;
4507 
4508  case 353:
4509 
4510 /* Line 678 of lalr1.cc */
4511 #line 2974 "Parser.yy"
4512  {
4513  delete (yysemantic_stack_[(2) - (2)].stringVal);
4514  }
4515  break;
4516 
4517  case 354:
4518 
4519 /* Line 678 of lalr1.cc */
4520 #line 2980 "Parser.yy"
4521  {
4522  if((yysemantic_stack_[(6) - (3)].integerVal));
4523  if((yysemantic_stack_[(6) - (4)].integerVal));
4524  delete (yysemantic_stack_[(6) - (5)].valueData);
4525  }
4526  break;
4527 
4528  case 362:
4529 
4530 /* Line 678 of lalr1.cc */
4531 #line 3001 "Parser.yy"
4532  {
4533  ForbiddenEventSharedPtr forbiddenEvent;
4535  = inDriver.getContext();
4536  try
4537  {
4538  ctx->getFactory()->create(forbiddenEvent);
4539  }
4540  catch(Error &e)
4541  {
4542  std::string message = constructErrorMessage(
4543  "Unable to create forbiddenEvent" );
4544  log("%s\n", message.c_str());
4545  e.setCurrentLocation( __FUNCTION__,
4546  __FILE__, __LINE__ );
4547  e.saveContextData("Parser error message", message);
4548  e.saveContextData("Filename", yyloc.begin.filename);
4549  e.saveContextData("StartLine", yyloc.begin.line);
4550  e.saveContextData("EndLine", yyloc.end.line);
4552  error(yyloc, message);
4553  YYABORT;
4554  }
4555  ctx->setCurrentForbiddenEvent(forbiddenEvent);
4556  TimingSharedPtr timing = ctx->getCurrentTiming();
4557  timing->addForbiddenEvent(forbiddenEvent);
4558  }
4559  break;
4560 
4561  case 363:
4562 
4563 /* Line 678 of lalr1.cc */
4564 #line 3028 "Parser.yy"
4565  {
4567  ctx->setCurrentForbiddenEvent(ForbiddenEventSharedPtr());
4568  }
4569  break;
4570 
4571  case 365:
4572 
4573 /* Line 678 of lalr1.cc */
4574 #line 3036 "Parser.yy"
4575  {
4577  ForbiddenEventSharedPtr forbiddenEvent
4578  = ctx->getCurrentForbiddenEvent();
4579  EventSharedPtr event
4580  = ctx->getCurrentEvent();
4581  event->setType(Event::eTypeEvent);
4582  forbiddenEvent->addEvent(event);
4583  ctx->setCurrentEvent(EventSharedPtr());
4584  }
4585  break;
4586 
4587  case 366:
4588 
4589 /* Line 678 of lalr1.cc */
4590 #line 3049 "Parser.yy"
4591  {
4592  inDriver.getLexer()->setIsIdContext(true);
4593  }
4594  break;
4595 
4596  case 369:
4597 
4598 /* Line 678 of lalr1.cc */
4599 #line 3057 "Parser.yy"
4600  {
4601  if((yysemantic_stack_[(2) - (2)].integerVal));
4602  }
4603  break;
4604 
4605  case 370:
4606 
4607 /* Line 678 of lalr1.cc */
4608 #line 3061 "Parser.yy"
4609  {
4610  delete (yysemantic_stack_[(2) - (2)].stringVal);
4611  }
4612  break;
4613 
4614  case 371:
4615 
4616 /* Line 678 of lalr1.cc */
4617 #line 3065 "Parser.yy"
4618  {
4619  delete (yysemantic_stack_[(2) - (2)].stringVal);
4620  }
4621  break;
4622 
4623  case 373:
4624 
4625 /* Line 678 of lalr1.cc */
4626 #line 3072 "Parser.yy"
4627  {
4628  (yyval.nameData) = (yysemantic_stack_[(4) - (3)].nameData);
4629  }
4630  break;
4631 
4632  case 374:
4633 
4634 /* Line 678 of lalr1.cc */
4635 #line 3078 "Parser.yy"
4636  {
4637  delete (yysemantic_stack_[(4) - (3)].pairData);
4638  }
4639  break;
4640 
4641  case 375:
4642 
4643 /* Line 678 of lalr1.cc */
4644 #line 3084 "Parser.yy"
4645  {
4646  delete (yysemantic_stack_[(5) - (3)].pairData);
4647  delete (yysemantic_stack_[(5) - (4)].pairData);
4648  }
4649  break;
4650 
4651  case 376:
4652 
4653 /* Line 678 of lalr1.cc */
4654 #line 3091 "Parser.yy"
4655  {
4656  LogicElementSharedPtr ignoreLogicElem;
4658  = inDriver.getContext();
4659  try
4660  {
4661  ctx->getFactory()->create(ignoreLogicElem);
4662  ignoreLogicElem->setType(LogicElement::eTypeIgnored);
4663  }
4664  catch(Error &e)
4665  {
4666  std::string message = constructErrorMessage(
4667  "Unable to create Ignore" );
4668  log("%s\n", message.c_str());
4669  e.setCurrentLocation( __FUNCTION__,
4670  __FILE__, __LINE__ );
4671  e.saveContextData("Parser error message", message);
4672  e.saveContextData("Filename", yyloc.begin.filename);
4673  e.saveContextData("StartLine", yyloc.begin.line);
4674  e.saveContextData("EndLine", yyloc.end.line);
4676  error(yyloc, message);
4677  YYABORT;
4678  }
4679  LogicElementSharedPtr logicElem
4680  = ctx->getCurrentLogicElement();
4681  logicElem->addChildLogicElement(ignoreLogicElem);
4682  }
4683  break;
4684 
4685  case 381:
4686 
4687 /* Line 678 of lalr1.cc */
4688 #line 3132 "Parser.yy"
4689  {
4690  inDriver.getContext()->setIsInInstance(true);
4691  }
4692  break;
4693 
4694  case 382:
4695 
4696 /* Line 678 of lalr1.cc */
4697 #line 3135 "Parser.yy"
4698  {
4699  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(6) - (3)].nameData));
4701  boost::scoped_ptr<InstanceInfo> info((yysemantic_stack_[(6) - (5)].instanceInfo));
4702  ViewRefData *viewData = info->mViewRefData;
4703  std::string cellName
4704  = viewData->mCellName->mName;
4705  std::string viewName
4706  = viewData->mViewName->mName;
4707  LibrarySharedPtr library;
4708  std::string libraryName;
4709  if(!viewData->mLibraryName)
4710  {
4711  library = ctx->getCurrentLibrary();
4712  }
4713  else
4714  {
4715  libraryName = viewData->mLibraryName->mName;
4716  library = ctx->getRoot()->findLibrary(libraryName);
4717  }
4718  if(!library)
4719  {
4720  std::string message = constructErrorMessage(
4721  "Library %s not found",
4722  libraryName.c_str() );
4723  log("%s\n", message.c_str());
4725  __FUNCTION__, __FILE__, __LINE__ );
4726  e.saveContextData("Parser error message", message);
4727  e.saveContextData("Filename", yyloc.begin.filename);
4728  e.saveContextData("StartLine", yyloc.begin.line);
4729  e.saveContextData("EndLine", yyloc.end.line);
4731  error(yyloc, message);
4732  YYABORT;
4733  }
4734  libraryName = library->getName();
4735  ViewSharedPtr masterView;
4736  bool masterIsExtern = false;
4737  LinkerSharedPtr linker = ctx->getLinker();
4738  Linker::NameSpec viewNameSpec(
4739  libraryName, cellName, viewName );
4740  if(!libraryName.empty())
4741  {
4742  masterView
4743  = linker->findExternView(viewNameSpec);
4744  if(!masterView)
4745  {
4746  //View is not extern
4747  library = ctx->getRoot()->findLibrary(
4748  libraryName );
4749  }
4750  else
4751  {
4752  masterIsExtern = true;
4753  }
4754  }
4755  else
4756  {
4757  library = ctx->getCurrentLibrary();
4758  }
4759 
4760  if(!masterIsExtern) //View is not extern
4761  {
4762  CellSharedPtr cell;
4763  cell = library->findCell(cellName);
4764  if(!cell)
4765  {
4766  std::string message = constructErrorMessage(
4767  "Cell %s not found",
4768  cellName.c_str() );
4769  log("%s\n", message.c_str());
4771  __FUNCTION__, __FILE__, __LINE__ );
4772  e.saveContextData("Parser error message", message);
4773  e.saveContextData("Filename", yyloc.begin.filename);
4774  e.saveContextData("StartLine", yyloc.begin.line);
4775  e.saveContextData("EndLine", yyloc.end.line);
4777  error(yyloc, message);
4778  YYABORT;
4779  }
4780  masterView = cell->findView(viewName);
4781  if(!masterView)
4782  {
4783  std::string message = constructErrorMessage(
4784  "View %s not found",
4785  viewName.c_str() );
4786  log("%s\n", message.c_str());
4788  __FUNCTION__, __FILE__, __LINE__ );
4789  e.saveContextData("Parser error message", message);
4790  e.saveContextData("Filename", yyloc.begin.filename);
4791  e.saveContextData("StartLine", yyloc.begin.line);
4792  e.saveContextData("EndLine", yyloc.end.line);
4794  error(yyloc, message);
4795  YYABORT;
4796  }
4797  }
4798  InstanceSharedPtr instance;
4799  if(nameData->mIndices.empty())
4800  {
4801  try
4802  {
4803  SingleInstanceSharedPtr singleInst;
4804  ctx->getFactory()->create(singleInst);
4805  instance = singleInst;
4806  instance->setName(nameData->mName);
4807  if(!nameData->mOriginalName.empty())
4808  {
4809  instance->setOriginalName(nameData->mOriginalName);
4810  }
4811  }
4812  catch(Error &e)
4813  {
4814  std::string message = constructErrorMessage(
4815  "Unable to create Instance : %s",
4816  instance->getName().c_str());
4817  log("%s\n", message.c_str());
4818  e.setCurrentLocation( __FUNCTION__,
4819  __FILE__, __LINE__ );
4820  e.saveContextData("Parser error message", message);
4821  e.saveContextData("Filename", yyloc.begin.filename);
4822  e.saveContextData("StartLine", yyloc.begin.line);
4823  e.saveContextData("EndLine", yyloc.end.line);
4825  error(yyloc, message);
4826  YYABORT;
4827  }
4828  }
4829  else
4830  {
4831  try
4832  {
4833  InstanceArraySharedPtr instArray;
4834  ctx->getFactory()->create(instArray);
4835  instArray->setName(nameData->mName);
4836  if(!nameData->mOriginalName.empty())
4837  {
4838  instArray->setOriginalName(nameData->mOriginalName);
4839  }
4840  instArray->constructChildren(
4841  ctx->getFactory(),
4842  nameData->mIndices );
4843  instance = instArray;
4844  }
4845  catch(Error &e)
4846  {
4847  std::string message = constructErrorMessage(
4848  "Unable to create Instance Array : %s",
4849  instance->getName().c_str());
4850  log("%s\n", message.c_str());
4851  e.setCurrentLocation( __FUNCTION__,
4852  __FILE__, __LINE__ );
4853  e.saveContextData("Parser error message", message);
4854  e.saveContextData("Filename", yyloc.begin.filename);
4855  e.saveContextData("StartLine", yyloc.begin.line);
4856  e.saveContextData("EndLine", yyloc.end.line);
4858  error(yyloc, message);
4859  YYABORT;
4860  }
4861  }
4862  ctx->setCurrentInstance(instance);
4863  try
4864  {
4865  instance->bindToMasterView(masterView);
4867  == instance->getCompositionType() )
4868  {
4869  std::vector< InstanceSharedPtr > children;
4870  instance->getChildren(children);
4871  std::vector< InstanceSharedPtr >::iterator inst
4872  = children.begin();
4873  std::vector< InstanceSharedPtr >::iterator end
4874  = children.end();
4875  for(;inst != end; ++inst)
4876  {
4877  //Create Port references now
4879  ctx->getFactory(), *inst );
4880  masterView->applyOnAllPorts(
4882  }
4883  }
4884  else
4885  {
4886  //Create Port references now
4888  creator(ctx->getFactory(), instance);
4889  masterView->applyOnAllPorts(
4891  }
4892  }
4893  catch(Error &e)
4894  {
4895  std::string message = constructErrorMessage(
4896  "Unable to create Port ref");
4897  log("%s\n", message.c_str());
4898  e.setCurrentLocation( __FUNCTION__,
4899  __FILE__, __LINE__ );
4900  e.saveContextData("Parser error message", message);
4901  e.saveContextData("Filename", yyloc.begin.filename);
4902  e.saveContextData("StartLine", yyloc.begin.line);
4903  e.saveContextData("EndLine", yyloc.end.line);
4905  error(yyloc, message);
4906  YYABORT;
4907  }
4908  if(masterIsExtern)
4909  {
4910  linker->registerUnresolvedInstance(
4911  viewNameSpec, instance );
4912  }
4913  instance->setParent(ctx->getCurrentView());
4914  ctx->getCurrentView()->addInstance(instance);
4915  log("Instance for lib %s, cell %s, view %s\n",
4916  libraryName.c_str(), cellName.c_str(),
4917  viewName.c_str());
4918  log("Added instance to view %s \n",
4919  ctx->getCurrentView()->getName().c_str());
4920 
4921  //Parameter assignment
4922  ParameterContext context
4923  = instance->getParameterContext();
4924  ParameterSharedPtr chkP;
4925  std::vector<ParamAssignInfo *>::iterator it
4926  = info->mParamAssign.begin();
4927  std::vector<ParamAssignInfo *>::iterator end
4928  = info->mParamAssign.end();
4929  for(; it != end; ++it )
4930  {
4931  ParamAssignInfo *pA = *it;
4932  chkP = instance->getParameters()->get(
4933  context, pA->mNameData->mName );
4934  if(!chkP)
4935  {
4936  //CAN ONLY OVERRIDE EXISTING PARAMS
4937  std::string message = constructErrorMessage(
4938  "Can only override existing params");
4939  log("%s\n", message.c_str());
4941  __FUNCTION__, __FILE__, __LINE__ );
4942  e.saveContextData("Parser error message", message);
4943  e.saveContextData("Filename", yyloc.begin.filename);
4944  e.saveContextData("StartLine", yyloc.begin.line);
4945  e.saveContextData("EndLine", yyloc.end.line);
4947  error(yyloc, message);
4948  YYABORT;
4949  }
4950  if(pA->mValueData->mValues.size()
4951  != chkP->getSize() )
4952  {
4953  //SIZE MISMATCH
4954  std::string message = constructErrorMessage(
4955  "Params size mismatch : %d with %d",
4956  pA->mValueData->mValues.size(),
4957  chkP->getSize());
4958  log("%s\n", message.c_str());
4960  __FUNCTION__, __FILE__, __LINE__ );
4961  e.saveContextData("Parser error message", message);
4962  e.saveContextData("Filename", yyloc.begin.filename);
4963  e.saveContextData("StartLine", yyloc.begin.line);
4964  e.saveContextData("EndLine", yyloc.end.line);
4966  error(yyloc, message);
4967  YYABORT;
4968  }
4969 #if 0
4970  if(pA->mValueData->mValues[0].getType()
4971  != chkP->getValue().getType() )
4972  {
4973  std::string message
4974  = constructErrorMessage(
4975  "Type mismatch during assignment for param %s",
4976  pA->mNameData->mName.c_str() );
4977  log("%s\n", message.c_str());
4979  __FUNCTION__, __FILE__, __LINE__ );
4980  e.saveContextData("Parser error message", message);
4981  e.saveContextData("Filename", yyloc.begin.filename);
4982  e.saveContextData("StartLine", yyloc.begin.line);
4983  e.saveContextData("EndLine", yyloc.end.line);
4985  error(yyloc, message);
4986  YYABORT;
4987  }
4988 #endif
4989  AssignedParamCreator creator(
4990  instance, instance->getParameterContext(),
4991  instance->getParameters(), ctx->getFactory(),
4992  pA->mValueData->mValues );
4993  try
4994  {
4995  if(!pA->mNameData->mIndices.empty())
4996  {
4997  //ASSIGNMENT TO A BIT
4998  chkP = chkP->get(
4999  pA->mNameData->mIndices );
5000  }
5001  chkP->accept(creator);
5002  }
5003  catch(Error &e)
5004  {
5005  std::string message = constructErrorMessage(
5006  "Unable to assign param: %s",
5007  chkP->getName().c_str());
5008  log("%s\n", message.c_str());
5009  e.setCurrentLocation( __FUNCTION__,
5010  __FILE__, __LINE__ );
5011  e.saveContextData("Parser error message", message);
5012  e.saveContextData("Filename", yyloc.begin.filename);
5013  e.saveContextData("StartLine", yyloc.begin.line);
5014  e.saveContextData("EndLine", yyloc.end.line);
5016  error(yyloc, message);
5017  YYABORT;
5018  }
5019  log("Param %s overridden at context %lu\n",
5020  pA->mNameData->mName.c_str(),
5021  context);
5022  ctx->setIsInInstance(false);
5023  }
5024 
5025  //Properties
5026  std::vector<PropertySharedPtr> props;
5027  PropertySharedPtr property
5028  = ctx->getCurrentProperty();
5029  while(property)
5030  {
5031  props.push_back(property);
5032  ctx->popProperty();
5033  property = ctx->getCurrentProperty();
5034  }
5035  for( std::vector<PropertySharedPtr>::reverse_iterator
5036  it = props.rbegin(); it != props.rend(); ++it )
5037  {
5038  PropertySharedPtr property = *it;
5039  instance->setProperty(
5040  property->getName(), property );
5041  }
5042  inDriver.getContext()->setIsInInstance(false);
5043  //Handle PortInst
5044  for( std::vector<PortInstData *>::iterator it
5045  = info->mPortInst.begin();
5046  it != info->mPortInst.end(); ++it )
5047  {
5048  PortInstData *instData = *it;
5049  std::vector< std::string > nestedNames;
5050  PortRefData *portData = instData->mRefData;
5051  PortRefData *currPortRef = portData;
5052  PortRefData *nextPortRef
5053  = currPortRef->mParentPort;
5054  nestedNames.push_back(
5055  currPortRef->mPortName->mName);
5056  while(nextPortRef)
5057  {
5058  currPortRef = nextPortRef;
5059  nestedNames.push_back(nextPortRef->mPortName->mName);
5060  nextPortRef = currPortRef->mParentPort;
5061  }
5062  NameData *portNameData = currPortRef->mPortName;
5063  std::string topName = *(nestedNames.rbegin());
5064  PortReferenceSharedPtr portRef
5065  = instance->findPortReference(topName);
5066  if(!portRef)
5067  {
5068  std::string message = constructErrorMessage(
5069  "No port ref %s found",
5070  portNameData->mName.c_str());
5071  log("%s\n", message.c_str());
5073  __FUNCTION__, __FILE__, __LINE__ );
5074  e.saveContextData("Parser error message", message);
5075  e.saveContextData("Filename", yyloc.begin.filename);
5076  e.saveContextData("StartLine", yyloc.begin.line);
5077  e.saveContextData("EndLine", yyloc.end.line);
5079  error(yyloc, message);
5080  YYABORT;
5081  }
5082  try
5083  {
5084  connectibleFinder(nestedNames, portRef);
5085  if(!portData->mPortName->mIndices.empty())
5086  {
5087  portRef = portRef->get(
5088  portData->mPortName->mIndices );
5089  }
5090  portRef->setAttributes(
5092  instData->mAttribute) );
5093  }
5094  catch(Error &e)
5095  {
5096  std::string message = constructErrorMessage(
5097  "Unable to connect port ref : %s",
5098  portRef->getName().c_str());
5099  log("%s\n", message.c_str());
5100  e.setCurrentLocation( __FUNCTION__,
5101  __FILE__, __LINE__ );
5102  e.saveContextData("Parser error message", message);
5103  e.saveContextData("Filename", yyloc.begin.filename);
5104  e.saveContextData("StartLine", yyloc.begin.line);
5105  e.saveContextData("EndLine", yyloc.end.line);
5107  error(yyloc, message);
5108  YYABORT;
5109  }
5110  }
5111  //Handle UserData
5112  for( std::vector< std::string >::iterator it
5113  = info->mUserData.begin();
5114  it != info->mUserData.end(); ++it )
5115  {
5116  std::string val = *it;
5117  instance->addUserData(val);
5118  }
5119  //Handle Comment
5120  for( std::vector< std::string >::iterator it
5121  = info->mComment.begin();
5122  it != info->mComment.end(); ++it )
5123  {
5124  std::string val = *it;
5125  instance->addComment(val);
5126  }
5127  //Handle Designator
5128  instance->setDesignator(info->mDesignator);
5129 
5130  //Handle Timing
5131  instance->setTiming(info->mTiming);
5132 
5133  inDriver.getContext()->setCurrentInstance(
5134  InstanceSharedPtr() );
5135  }
5136  break;
5137 
5138  case 383:
5139 
5140 /* Line 678 of lalr1.cc */
5141 #line 3576 "Parser.yy"
5142  {
5143  (yyval.instanceInfo) = new InstanceInfo();
5144  (yyval.instanceInfo)->mViewRefData = (yysemantic_stack_[(1) - (1)].viewRefData);
5145  }
5146  break;
5147 
5148  case 384:
5149 
5150 /* Line 678 of lalr1.cc */
5151 #line 3581 "Parser.yy"
5152  {
5153  (yyval.instanceInfo) = NULL;
5154  }
5155  break;
5156 
5157  case 385:
5158 
5159 /* Line 678 of lalr1.cc */
5160 #line 3585 "Parser.yy"
5161  {
5162  (yyval.instanceInfo) = (yysemantic_stack_[(2) - (1)].instanceInfo);
5163  }
5164  break;
5165 
5166  case 386:
5167 
5168 /* Line 678 of lalr1.cc */
5169 #line 3589 "Parser.yy"
5170  {
5171  (yyval.instanceInfo) = ((yysemantic_stack_[(2) - (1)].instanceInfo))?(yysemantic_stack_[(2) - (1)].instanceInfo):new InstanceInfo();
5172  (yyval.instanceInfo)->mParamAssign.push_back((yysemantic_stack_[(2) - (2)].paramAssignInfo));
5173  }
5174  break;
5175 
5176  case 387:
5177 
5178 /* Line 678 of lalr1.cc */
5179 #line 3594 "Parser.yy"
5180  {
5181  (yyval.instanceInfo) = ((yysemantic_stack_[(2) - (1)].instanceInfo))?(yysemantic_stack_[(2) - (1)].instanceInfo):new InstanceInfo();
5182  (yyval.instanceInfo)->mPortInst.push_back((yysemantic_stack_[(2) - (2)].portInst));
5183  }
5184  break;
5185 
5186  case 388:
5187 
5188 /* Line 678 of lalr1.cc */
5189 #line 3599 "Parser.yy"
5190  {
5191  (yyval.instanceInfo) = ((yysemantic_stack_[(2) - (1)].instanceInfo))?(yysemantic_stack_[(2) - (1)].instanceInfo):new InstanceInfo();
5193  = inDriver.getContext();
5194  TimingSharedPtr timing
5195  = ctx->getCurrentTiming();
5196  (yyval.instanceInfo)->mTiming = timing;
5197  }
5198  break;
5199 
5200  case 389:
5201 
5202 /* Line 678 of lalr1.cc */
5203 #line 3608 "Parser.yy"
5204  {
5205  (yyval.instanceInfo) = ((yysemantic_stack_[(2) - (1)].instanceInfo))?(yysemantic_stack_[(2) - (1)].instanceInfo):new InstanceInfo();
5206  (yyval.instanceInfo)->mDesignator = *(yysemantic_stack_[(2) - (2)].stringVal);
5207  }
5208  break;
5209 
5210  case 390:
5211 
5212 /* Line 678 of lalr1.cc */
5213 #line 3613 "Parser.yy"
5214  {
5215  (yyval.instanceInfo) = (yysemantic_stack_[(2) - (1)].instanceInfo);
5216  }
5217  break;
5218 
5219  case 391:
5220 
5221 /* Line 678 of lalr1.cc */
5222 #line 3617 "Parser.yy"
5223  {
5224  (yyval.instanceInfo) = ((yysemantic_stack_[(2) - (1)].instanceInfo))?(yysemantic_stack_[(2) - (1)].instanceInfo):new InstanceInfo();
5225  (yyval.instanceInfo)->mComment.push_back(*(yysemantic_stack_[(2) - (2)].stringVal));
5226  }
5227  break;
5228 
5229  case 392:
5230 
5231 /* Line 678 of lalr1.cc */
5232 #line 3622 "Parser.yy"
5233  {
5234  (yyval.instanceInfo) = ((yysemantic_stack_[(2) - (1)].instanceInfo))?(yysemantic_stack_[(2) - (1)].instanceInfo):new InstanceInfo();
5235  (yyval.instanceInfo)->mUserData.push_back(*(yysemantic_stack_[(2) - (2)].stringVal));
5236  }
5237  break;
5238 
5239  case 397:
5240 
5241 /* Line 678 of lalr1.cc */
5242 #line 3636 "Parser.yy"
5243  {
5244  (yyval.instanceRef) = ((yysemantic_stack_[(5) - (4)].instanceRef)) ? (yysemantic_stack_[(5) - (4)].instanceRef) : new InstanceRefData();
5245  (yyval.instanceRef)->mName = (yysemantic_stack_[(5) - (3)].nameData);
5246  }
5247  break;
5248 
5249  case 398:
5250 
5251 /* Line 678 of lalr1.cc */
5252 #line 3643 "Parser.yy"
5253  {
5254  (yyval.instanceRef) = NULL;
5255  }
5256  break;
5257 
5258  case 399:
5259 
5260 /* Line 678 of lalr1.cc */
5261 #line 3647 "Parser.yy"
5262  {
5263  (yyval.instanceRef) = NULL;
5264  }
5265  break;
5266 
5267  case 400:
5268 
5269 /* Line 678 of lalr1.cc */
5270 #line 3651 "Parser.yy"
5271  {
5272  (yyval.instanceRef) = new InstanceRefData();
5273  (yyval.instanceRef)->mView = (yysemantic_stack_[(1) - (1)].viewRefData);
5274  }
5275  break;
5276 
5277  case 406:
5278 
5279 /* Line 678 of lalr1.cc */
5280 #line 3665 "Parser.yy"
5281  {
5282  delete (yysemantic_stack_[(2) - (2)].stringVal);
5283  }
5284  break;
5285 
5286  case 414:
5287 
5288 /* Line 678 of lalr1.cc */
5289 #line 3684 "Parser.yy"
5290  {
5291  delete (yysemantic_stack_[(2) - (2)].stringVal);
5292  }
5293  break;
5294 
5295  case 415:
5296 
5297 /* Line 678 of lalr1.cc */
5298 #line 3688 "Parser.yy"
5299  {
5300  delete (yysemantic_stack_[(2) - (2)].stringVal);
5301  }
5302  break;
5303 
5304  case 422:
5305 
5306 /* Line 678 of lalr1.cc */
5307 #line 3706 "Parser.yy"
5308  {
5309  (yyval.integerVal) = (yysemantic_stack_[(4) - (3)].integerVal);
5310  }
5311  break;
5312 
5313  case 423:
5314 
5315 /* Line 678 of lalr1.cc */
5316 #line 3712 "Parser.yy"
5317  {
5318  (yyval.integerVal) = (yysemantic_stack_[(1) - (1)].integerVal);
5319  }
5320  break;
5321 
5322  case 424:
5323 
5324 /* Line 678 of lalr1.cc */
5325 #line 3716 "Parser.yy"
5326  {
5327  (yyval.integerVal) = (yysemantic_stack_[(2) - (1)].integerVal);
5328  }
5329  break;
5330 
5331  case 425:
5332 
5333 /* Line 678 of lalr1.cc */
5334 #line 3722 "Parser.yy"
5335  {
5336  if((yysemantic_stack_[(4) - (2)].integerVal));
5337  if(NULL == (yysemantic_stack_[(4) - (3)].valueData))
5338  {
5339  (yyval.valueData) = new ValueData();
5340  (yyval.valueData)->mValues.push_back( Value(
5342  }
5343  else
5344  {
5345  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
5346  }
5347  }
5348  break;
5349 
5350  case 426:
5351 
5352 /* Line 678 of lalr1.cc */
5353 #line 3738 "Parser.yy"
5354  {
5355  (yyval.valueData) = NULL;
5356  }
5357  break;
5358 
5359  case 427:
5360 
5361 /* Line 678 of lalr1.cc */
5362 #line 3742 "Parser.yy"
5363  {
5364  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
5365  (yyval.valueData)->mValues.push_back( Value(
5366  Value::eValueTypeInteger, (yysemantic_stack_[(2) - (2)].integerVal) ) );
5367  }
5368  break;
5369 
5370  case 428:
5371 
5372 /* Line 678 of lalr1.cc */
5373 #line 3748 "Parser.yy"
5374  {
5375  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
5376  (yyval.valueData)->mValues.push_back( Value(
5377  Value::eValueTypeInteger, (yysemantic_stack_[(2) - (2)].integerVal) ) );
5378  }
5379  break;
5380 
5381  case 429:
5382 
5383 /* Line 678 of lalr1.cc */
5384 #line 3754 "Parser.yy"
5385  {
5386  (yyval.valueData) = (yysemantic_stack_[(2) - (2)].valueData);
5387  if((yysemantic_stack_[(2) - (1)].valueData))
5388  {
5389  (yysemantic_stack_[(2) - (1)].valueData)->mValues.insert((yysemantic_stack_[(2) - (1)].valueData)->mValues.end(),
5390  (yyval.valueData)->mValues.begin(), (yyval.valueData)->mValues.end() );
5391  (yyval.valueData)->mValues = (yysemantic_stack_[(2) - (1)].valueData)->mValues;
5392  delete (yysemantic_stack_[(2) - (1)].valueData);
5393  }
5394  }
5395  break;
5396 
5397  case 430:
5398 
5399 /* Line 678 of lalr1.cc */
5400 #line 3767 "Parser.yy"
5401  {
5402  (yyval.interfaceAttributes) = (yysemantic_stack_[(4) - (3)].interfaceAttributes);
5403  }
5404  break;
5405 
5406  case 431:
5407 
5408 /* Line 678 of lalr1.cc */
5409 #line 3773 "Parser.yy"
5410  {
5411  (yyval.interfaceAttributes) = NULL;
5412  }
5413  break;
5414 
5415  case 432:
5416 
5417 /* Line 678 of lalr1.cc */
5418 #line 3777 "Parser.yy"
5419  {
5420  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5421  }
5422  break;
5423 
5424  case 433:
5425 
5426 /* Line 678 of lalr1.cc */
5427 #line 3781 "Parser.yy"
5428  {
5429  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5430  }
5431  break;
5432 
5433  case 434:
5434 
5435 /* Line 678 of lalr1.cc */
5436 #line 3785 "Parser.yy"
5437  {
5438  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5439  }
5440  break;
5441 
5442  case 435:
5443 
5444 /* Line 678 of lalr1.cc */
5445 #line 3789 "Parser.yy"
5446  {
5447  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5448  }
5449  break;
5450 
5451  case 436:
5452 
5453 /* Line 678 of lalr1.cc */
5454 #line 3793 "Parser.yy"
5455  {
5456  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5457  }
5458  break;
5459 
5460  case 437:
5461 
5462 /* Line 678 of lalr1.cc */
5463 #line 3797 "Parser.yy"
5464  {
5465  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5466  }
5467  break;
5468 
5469  case 438:
5470 
5471 /* Line 678 of lalr1.cc */
5472 #line 3801 "Parser.yy"
5473  {
5474  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5475  }
5476  break;
5477 
5478  case 439:
5479 
5480 /* Line 678 of lalr1.cc */
5481 #line 3805 "Parser.yy"
5482  {
5483  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5484  }
5485  break;
5486 
5487  case 440:
5488 
5489 /* Line 678 of lalr1.cc */
5490 #line 3809 "Parser.yy"
5491  {
5492  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5493  }
5494  break;
5495 
5496  case 441:
5497 
5498 /* Line 678 of lalr1.cc */
5499 #line 3813 "Parser.yy"
5500  {
5501  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5502  }
5503  break;
5504 
5505  case 442:
5506 
5507 /* Line 678 of lalr1.cc */
5508 #line 3817 "Parser.yy"
5509  {
5510  (yyval.interfaceAttributes) = ((yysemantic_stack_[(2) - (1)].interfaceAttributes))?(yysemantic_stack_[(2) - (1)].interfaceAttributes):new InterfaceAttributes();
5512  = inDriver.getContext();
5513  TimingSharedPtr timing
5514  = ctx->getCurrentTiming();
5515  (yyval.interfaceAttributes)->setTiming(timing);
5516  ctx->setCurrentTiming(TimingSharedPtr());
5517  }
5518  break;
5519 
5520  case 443:
5521 
5522 /* Line 678 of lalr1.cc */
5523 #line 3827 "Parser.yy"
5524  {
5525  (yyval.interfaceAttributes) = ((yysemantic_stack_[(2) - (1)].interfaceAttributes))?(yysemantic_stack_[(2) - (1)].interfaceAttributes):new InterfaceAttributes();
5527  = inDriver.getContext();
5528  SimulateSharedPtr simulate
5529  = ctx->getCurrentSimulate();
5530  (yyval.interfaceAttributes)->setSimulate(simulate);
5531  ctx->setCurrentSimulate(SimulateSharedPtr());
5532  }
5533  break;
5534 
5535  case 444:
5536 
5537 /* Line 678 of lalr1.cc */
5538 #line 3837 "Parser.yy"
5539  {
5540  (yyval.interfaceAttributes) = ((yysemantic_stack_[(2) - (1)].interfaceAttributes))?(yysemantic_stack_[(2) - (1)].interfaceAttributes):new InterfaceAttributes();
5541  (yyval.interfaceAttributes)->setDesignator(*(yysemantic_stack_[(2) - (2)].stringVal));
5542  }
5543  break;
5544 
5545  case 445:
5546 
5547 /* Line 678 of lalr1.cc */
5548 #line 3842 "Parser.yy"
5549  {
5550  (yyval.interfaceAttributes) = (yysemantic_stack_[(2) - (1)].interfaceAttributes);
5551  }
5552  break;
5553 
5554  case 446:
5555 
5556 /* Line 678 of lalr1.cc */
5557 #line 3846 "Parser.yy"
5558  {
5559  (yyval.interfaceAttributes) = ((yysemantic_stack_[(2) - (1)].interfaceAttributes))?(yysemantic_stack_[(2) - (1)].interfaceAttributes):new InterfaceAttributes();
5560  (yyval.interfaceAttributes)->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
5561  }
5562  break;
5563 
5564  case 447:
5565 
5566 /* Line 678 of lalr1.cc */
5567 #line 3851 "Parser.yy"
5568  {
5569  (yyval.interfaceAttributes) = ((yysemantic_stack_[(2) - (1)].interfaceAttributes))?(yysemantic_stack_[(2) - (1)].interfaceAttributes):new InterfaceAttributes();
5570  (yyval.interfaceAttributes)->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
5571  delete (yysemantic_stack_[(2) - (2)].stringVal);
5572  }
5573  break;
5574 
5575  case 451:
5576 
5577 /* Line 678 of lalr1.cc */
5578 #line 3864 "Parser.yy"
5579  {
5580  delete (yysemantic_stack_[(2) - (2)].stringVal);
5581  }
5582  break;
5583 
5584  case 452:
5585 
5586 /* Line 678 of lalr1.cc */
5587 #line 3868 "Parser.yy"
5588  {
5589  delete (yysemantic_stack_[(2) - (2)].stringVal);
5590  }
5591  break;
5592 
5593  case 461:
5594 
5595 /* Line 678 of lalr1.cc */
5596 #line 3888 "Parser.yy"
5597  {
5598  delete (yysemantic_stack_[(2) - (2)].stringVal);
5599  }
5600  break;
5601 
5602  case 462:
5603 
5604 /* Line 678 of lalr1.cc */
5605 #line 3892 "Parser.yy"
5606  {
5607  delete (yysemantic_stack_[(2) - (2)].stringVal);
5608  }
5609  break;
5610 
5611  case 467:
5612 
5613 /* Line 678 of lalr1.cc */
5614 #line 3908 "Parser.yy"
5615  {
5616  InterfaceJoinedInfoSharedPtr joinedInfo;
5618  = inDriver.getContext();
5619  try
5620  {
5621  ctx->getFactory()->create(joinedInfo);
5622  joinedInfo->setJoinedType(
5624  }
5625  catch(Error &e)
5626  {
5627  std::string message = constructErrorMessage(
5628  "Unable to create joined info" );
5629  log("%s\n", message.c_str());
5630  e.setCurrentLocation( __FUNCTION__,
5631  __FILE__, __LINE__ );
5632  e.saveContextData("Parser error message", message);
5633  e.saveContextData("Filename", yyloc.begin.filename);
5634  e.saveContextData("StartLine", yyloc.begin.line);
5635  e.saveContextData("EndLine", yyloc.end.line);
5637  error(yyloc, message);
5638  YYABORT;
5639  }
5640  if(ctx->getInterfaceJoinedInfoDepth() == 0 )
5641  {
5642  ctx->getCurrentView()->addInterfaceJoinedInfo(joinedInfo);
5643  }
5644  ctx->pushInterfaceJoinedInfo(joinedInfo);
5645  ctx->incrementInterfaceJoinedInfoDepth();
5646  }
5647  break;
5648 
5649  case 468:
5650 
5651 /* Line 678 of lalr1.cc */
5652 #line 3940 "Parser.yy"
5653  {
5655  InterfaceJoinedInfoSharedPtr currentJoinedInfo
5656  = ctx->getCurrentInterfaceJoinedInfo();
5657  ctx->popInterfaceJoinedInfo();
5658  InterfaceJoinedInfoSharedPtr parentJoinedInfo;
5659  if(ctx->getInterfaceJoinedInfoDepth() > 1 )
5660  {
5661  parentJoinedInfo = ctx->getCurrentInterfaceJoinedInfo();
5662  }
5663  ctx->decrementInterfaceJoinedInfoDepth();
5664  if(parentJoinedInfo)
5665  {
5666  parentJoinedInfo->setRelationType(
5668  currentJoinedInfo->setRelationType(
5670  //Check size
5671  size_t parentJoinedInfoSize = parentJoinedInfo->getSize();
5672  size_t currentJoinedInfoSize = currentJoinedInfo->getSize();
5673 
5674  log("Parent joined info Size :: %d\n",
5675  parentJoinedInfoSize );
5676  log("Current joined info Size :: %d\n",
5677  currentJoinedInfoSize );
5678 
5679  //std::cout << "Parent joined info Size :: " << parentJoinedInfoSize << std::endl;
5680  //std::cout << "Current joined info Size :: " << currentJoinedInfoSize << std::endl;
5681 
5682  std::vector< InterfaceJoinedInfoSharedPtr > outJoinedInfos;
5683  parentJoinedInfo->getChildren(outJoinedInfos);
5684 
5685  std::list< PortSharedPtr > outPorts;
5686  parentJoinedInfo->getPorts(outPorts);
5687 
5688  std::list< PortListSharedPtr > outPortLists;
5689  parentJoinedInfo->getPortLists(outPortLists);
5690 
5691  if(parentJoinedInfoSize != 0)
5692  {
5693  if( parentJoinedInfoSize
5694  == currentJoinedInfoSize )
5695  {
5696  parentJoinedInfo->addChildJoinedInfo(
5697  currentJoinedInfo );
5698  }
5699  else
5700  {
5701  std::string message = constructErrorMessage(
5702  "Child joined info can't be added, port size mismatch %d with %d",
5703  parentJoinedInfoSize,
5704  currentJoinedInfoSize);
5705  log("%s\n", message.c_str());
5707  __FUNCTION__, __FILE__, __LINE__ );
5708  e.saveContextData("Parser error message", message);
5709  e.saveContextData("Filename", yyloc.begin.filename);
5710  e.saveContextData("StartLine", yyloc.begin.line);
5711  e.saveContextData("EndLine", yyloc.end.line);
5713  error(yyloc, message);
5714  YYABORT;
5715  }
5716  }
5717  else
5718  {
5719  parentJoinedInfo->addChildJoinedInfo(
5720  currentJoinedInfo );
5721  }
5722  }
5723  else
5724  {
5725  ctx->pushInterfaceJoinedInfo(currentJoinedInfo);
5726  }
5727  }
5728  break;
5729 
5730  case 470:
5731 
5732 /* Line 678 of lalr1.cc */
5733 #line 4019 "Parser.yy"
5734  {
5735  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(2) - (2)].portRefData));
5736  NameData *portNameData = portData->mPortName;
5737  std::string name = portNameData->mName;
5739  = inDriver.getContext();
5740  ViewSharedPtr view = ctx->getCurrentView();
5741 
5742  PortRefData *currPortRef = (yysemantic_stack_[(2) - (2)].portRefData);
5743  PortRefData *nextPortRef = portData->mParentPort;
5744  std::vector< std::string > nestedNames;
5745  nestedNames.push_back(currPortRef->mPortName->mName);
5746  while(nextPortRef)
5747  {
5748  currPortRef = nextPortRef;
5749  nestedNames.push_back(nextPortRef->mPortName->mName);
5750  nextPortRef = currPortRef->mParentPort;
5751  }
5752  bool isPort = (NULL == currPortRef->mInstanceName);
5753  std::string topName = *(nestedNames.rbegin());
5754  if(isPort)
5755  {
5756  PortSharedPtr port = view->findPort(topName);
5757  if(!port)
5758  {
5759  std::string message = constructErrorMessage(
5760  "No port %s found in view %s\n",
5761  name.c_str(),
5762  view->getName().c_str());
5763  log("%s\n", message.c_str());
5765  __FUNCTION__, __FILE__, __LINE__ );
5766  e.saveContextData("Parser error message", message);
5767  e.saveContextData("Filename", yyloc.begin.filename);
5768  e.saveContextData("StartLine", yyloc.begin.line);
5769  e.saveContextData("EndLine", yyloc.end.line);
5771  error(yyloc, message);
5772  YYABORT;
5773  }
5774 
5775  InterfaceJoinedInfoSharedPtr currentJoinedInfo
5776  = ctx->getCurrentInterfaceJoinedInfo();
5777  try
5778  {
5779  connectibleFinder(nestedNames, port);
5780  if(!portData->mPortName->mIndices.empty())
5781  {
5782  port = port->get(portData->mPortName->mIndices);
5783  }
5784  //Check port size
5785  std::list< PortSharedPtr > outPorts;
5786  currentJoinedInfo->getPorts(outPorts);
5787 
5788  if(!outPorts.empty())
5789  {
5790  PortSharedPtr firstPort = outPorts.front();
5791  std::list< PortSharedPtr >::iterator it
5792  = std::find(outPorts.begin(), outPorts.end(),
5793  port);
5794  if(it != outPorts.end())
5795  {
5796  std::string message = constructErrorMessage(
5797  "Port %s already exist in joined info",
5798  port->getName().c_str() );
5799  log("%s\n", message.c_str());
5801  __FUNCTION__, __FILE__, __LINE__ );
5802  e.saveContextData("Parser error message", message);
5803  e.saveContextData("Filename", yyloc.begin.filename);
5804  e.saveContextData("StartLine", yyloc.begin.line);
5805  e.saveContextData("EndLine", yyloc.end.line);
5807  error(yyloc, message);
5808  YYABORT;
5809  }
5810  else
5811  {
5812  if(firstPort->getSize() == port->getSize())
5813  {
5814  currentJoinedInfo->addPort(port);
5815  }
5816  else
5817  {
5818  std::string message = constructErrorMessage(
5819  "Port %s can't be added, port size mismatch %d with %d",
5820  name.c_str(),
5821  firstPort->getSize(),
5822  port->getSize());
5823  log("%s\n", message.c_str());
5825  __FUNCTION__, __FILE__, __LINE__ );
5826  e.saveContextData("Parser error message", message);
5827  e.saveContextData("Filename", yyloc.begin.filename);
5828  e.saveContextData("StartLine", yyloc.begin.line);
5829  e.saveContextData("EndLine", yyloc.end.line);
5831  error(yyloc, message);
5832  YYABORT;
5833  }
5834  }
5835  }
5836  else
5837  {
5838  currentJoinedInfo->addPort(port);
5839  }
5840  }
5841  catch(Error &e)
5842  {
5844  __FUNCTION__, __FILE__, __LINE__ );
5845  throw;
5846  }
5847  }
5848  else
5849  {
5850  }
5851  }
5852  break;
5853 
5854  case 471:
5855 
5856 /* Line 678 of lalr1.cc */
5857 #line 4138 "Parser.yy"
5858  {
5859  if(NULL != (yysemantic_stack_[(2) - (2)].portListData) && !(yysemantic_stack_[(2) - (2)].portListData)->mPortRefs.empty())
5860  {
5861  boost::scoped_ptr<PortListData> portListData((yysemantic_stack_[(2) - (2)].portListData));
5862  std::string message;
5863 
5865  PortListSharedPtr portList;
5866  ctx->getFactory()->create(portList);
5867 
5868  InterfaceJoinedInfoSharedPtr currentJoinedInfo
5869  = ctx->getCurrentInterfaceJoinedInfo();
5870 
5871  for( std::vector<PortRefData *>::iterator it
5872  = portListData->mPortRefs.begin();
5873  it != portListData->mPortRefs.end(); ++it )
5874  {
5875  PortRefData *portData = *it;
5876  std::vector< std::string > nestedNames;
5877  PortRefData *currPortRef = *it;
5878  PortRefData *nextPortRef = portData->mParentPort;
5879  nestedNames.push_back(currPortRef->mPortName->mName);
5880  while(nextPortRef)
5881  {
5882  currPortRef = nextPortRef;
5883  nestedNames.push_back(nextPortRef->mPortName->mName);
5884  nextPortRef = currPortRef->mParentPort;
5885  }
5886  bool isPort = (NULL == currPortRef->mInstanceName);
5887  NameData *portNameData = currPortRef->mPortName;
5888  std::string topName = *(nestedNames.rbegin());
5889  ViewSharedPtr view = ctx->getCurrentView();
5890  if(isPort)
5891  {
5892  PortSharedPtr port = view->findPort(topName);
5893  if(!port)
5894  {
5895  std::string message = constructErrorMessage(
5896  "No port %s found in view %s\n",
5897  portNameData->mName.c_str(),
5898  view->getName().c_str());
5899  log("%s\n", message.c_str());
5901  __FUNCTION__, __FILE__, __LINE__ );
5902  e.saveContextData("Parser error message", message);
5903  e.saveContextData("Filename", yyloc.begin.filename);
5904  e.saveContextData("StartLine", yyloc.begin.line);
5905  e.saveContextData("EndLine", yyloc.end.line);
5907  error(yyloc, message);
5908  YYABORT;
5909  }
5910 
5911  try
5912  {
5913  connectibleFinder(nestedNames, port);
5914  if(!portData->mPortName->mIndices.empty())
5915  {
5916  port = port->get(portData->mPortName->mIndices);
5917  }
5918  portList->addChildPort(port);
5919  }
5920  catch(Error &e)
5921  {
5922  std::string message = constructErrorMessage(
5923  "Unable to connect port : %s",
5924  port->getName().c_str());
5925  log("%s\n", message.c_str());
5926  e.setCurrentLocation( __FUNCTION__,
5927  __FILE__, __LINE__ );
5928  e.saveContextData("Parser error message", message);
5929  e.saveContextData("Filename", yyloc.begin.filename);
5930  e.saveContextData("StartLine", yyloc.begin.line);
5931  e.saveContextData("EndLine", yyloc.end.line);
5933  error(yyloc, message);
5934  YYABORT;
5935  }
5936  }
5937  else
5938  {
5939  }
5940  }
5941  if(currentJoinedInfo->getSize() == portList->getSize())
5942  {
5943  currentJoinedInfo->addPortList(portList);
5944  }
5945  else
5946  {
5947  std::string message = constructErrorMessage(
5948  "Port size mismatch %d with %d",
5949  currentJoinedInfo->getSize(),
5950  portList->getSize());
5951  log("%s\n", message.c_str());
5953  __FUNCTION__, __FILE__, __LINE__ );
5954  e.saveContextData("Parser error message", message);
5955  e.saveContextData("Filename", yyloc.begin.filename);
5956  e.saveContextData("StartLine", yyloc.begin.line);
5957  e.saveContextData("EndLine", yyloc.end.line);
5959  error(yyloc, message);
5960  YYABORT;
5961  }
5962  }
5963  }
5964  break;
5965 
5966  case 474:
5967 
5968 /* Line 678 of lalr1.cc */
5969 #line 4251 "Parser.yy"
5970  {
5971  std::string message;
5972  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(2) - (2)].portRefData));
5973  try
5974  {
5975  connectElementToNet(
5976  (yysemantic_stack_[(2) - (2)].portRefData), inDriver.getContext(),
5977  yyloc, message );
5978  }
5979  catch(Error &e)
5980  {
5982  __FUNCTION__, __FILE__, __LINE__ );
5984  error(yyloc, message);
5985  YYABORT;
5986  }
5987  }
5988  break;
5989 
5990  case 475:
5991 
5992 /* Line 678 of lalr1.cc */
5993 #line 4270 "Parser.yy"
5994  {
5995  if(NULL != (yysemantic_stack_[(2) - (2)].portListData) && !(yysemantic_stack_[(2) - (2)].portListData)->mPortRefs.empty())
5996  {
5997  boost::scoped_ptr<PortListData> portListData((yysemantic_stack_[(2) - (2)].portListData));
5998  std::string message;
5999  PortListSharedPtr portList;
6000  inDriver.getContext()->getFactory()->create(portList);
6002  for( std::vector<PortRefData *>::iterator it
6003  = portListData->mPortRefs.begin();
6004  it != portListData->mPortRefs.end(); ++it )
6005  {
6006  PortRefData *portData = *it;
6007  std::vector< std::string > nestedNames;
6008  PortRefData *currPortRef = *it;
6009  PortRefData *nextPortRef = portData->mParentPort;
6010  nestedNames.push_back(currPortRef->mPortName->mName);
6011  while(nextPortRef)
6012  {
6013  currPortRef = nextPortRef;
6014  nestedNames.push_back(nextPortRef->mPortName->mName);
6015  nextPortRef = currPortRef->mParentPort;
6016  }
6017  bool isPort = (NULL == currPortRef->mInstanceName);
6018  NameData *portNameData = currPortRef->mPortName;
6019  std::string topName = *(nestedNames.rbegin());
6020  ViewSharedPtr view = ctx->getCurrentView();
6021  if(isPort)
6022  {
6023  PortSharedPtr port = view->findPort(topName);
6024  if(!port)
6025  {
6026  std::string message = constructErrorMessage(
6027  "No port %s found",
6028  portNameData->mName.c_str());
6029  log("%s\n", message.c_str());
6031  __FUNCTION__, __FILE__, __LINE__ );
6032  e.saveContextData("Parser error message", message);
6033  e.saveContextData("Filename", yyloc.begin.filename);
6034  e.saveContextData("StartLine", yyloc.begin.line);
6035  e.saveContextData("EndLine", yyloc.end.line);
6037  error(yyloc, message);
6038  YYABORT;
6039  }
6040  try
6041  {
6042  connectibleFinder(nestedNames, port);
6043  if(!portData->mPortName->mIndices.empty())
6044  {
6045  port = port->get(portData->mPortName->mIndices);
6046  }
6047  portList->addChildPort(port);
6048  }
6049  catch(Error &e)
6050  {
6051  std::string message = constructErrorMessage(
6052  "Unable to connect port : %s",
6053  port->getName().c_str());
6054  log("%s\n", message.c_str());
6055  e.setCurrentLocation( __FUNCTION__,
6056  __FILE__, __LINE__ );
6057  e.saveContextData("Parser error message", message);
6058  e.saveContextData("Filename", yyloc.begin.filename);
6059  e.saveContextData("StartLine", yyloc.begin.line);
6060  e.saveContextData("EndLine", yyloc.end.line);
6062  error(yyloc, message);
6063  YYABORT;
6064  }
6065  }
6066  else
6067  {
6068  NameData *instanceName
6069  = currPortRef->mInstanceName;
6070  InstanceSharedPtr instance
6071  = view->findInstance(
6072  instanceName->mName );
6073  if(!instance)
6074  {
6075  std::string message = constructErrorMessage(
6076  "Instance %s not known",
6077  instanceName->mName.c_str() );
6078  log("%s\n", message.c_str());
6080  __FUNCTION__, __FILE__, __LINE__ );
6081  e.saveContextData("Parser error message", message);
6082  e.saveContextData("Filename", yyloc.begin.filename);
6083  e.saveContextData("StartLine", yyloc.begin.line);
6084  e.saveContextData("EndLine", yyloc.end.line);
6086  error(yyloc, message);
6087  YYABORT;
6088  }
6089  if(!instanceName->mIndices.empty())
6090  {
6091  InstanceSharedPtr bit
6092  = instance->get(instanceName->mIndices);
6093  instance = bit;
6094  }
6095  PortReferenceSharedPtr portRef
6096  = instance->findPortReference(topName);
6097  if(!portRef)
6098  {
6099  std::string message = constructErrorMessage(
6100  "No port ref %s found",
6101  portNameData->mName.c_str());
6102  log("%s\n", message.c_str());
6104  __FUNCTION__, __FILE__, __LINE__ );
6105  e.saveContextData("Parser error message", message);
6106  e.saveContextData("Filename", yyloc.begin.filename);
6107  e.saveContextData("StartLine", yyloc.begin.line);
6108  e.saveContextData("EndLine", yyloc.end.line);
6110  error(yyloc, message);
6111  YYABORT;
6112  }
6113  try
6114  {
6115  connectibleFinder(nestedNames, portRef);
6116  if(!portData->mPortName->mIndices.empty())
6117  {
6118  portRef = portRef->get(
6119  portData->mPortName->mIndices );
6120  }
6121  portList->addChildPortReference(portRef);
6122  }
6123  catch(Error &e)
6124  {
6125  std::string message = constructErrorMessage(
6126  "Unable to connect port ref : %s",
6127  portRef->getName().c_str());
6128  log("%s\n", message.c_str());
6129  e.setCurrentLocation( __FUNCTION__,
6130  __FILE__, __LINE__ );
6131  e.saveContextData("Parser error message", message);
6132  e.saveContextData("Filename", yyloc.begin.filename);
6133  e.saveContextData("StartLine", yyloc.begin.line);
6134  e.saveContextData("EndLine", yyloc.end.line);
6136  error(yyloc, message);
6137  YYABORT;
6138  }
6139  }
6140  }
6141  try
6142  {
6143  portList->connect(ctx->getCurrentNet());
6144  }
6145  catch(Error &e)
6146  {
6148  __FUNCTION__, __FILE__, __LINE__ );
6150  error(yyloc, message);
6151  YYABORT;
6152  }
6153  }
6154  }
6155  break;
6156 
6157  case 476:
6158 
6159 /* Line 678 of lalr1.cc */
6160 #line 4432 "Parser.yy"
6161  {
6162  boost::scoped_ptr<NameData> globPortRef((yysemantic_stack_[(2) - (2)].nameData));
6163  std::string name = globPortRef->mName;
6164  //Find ports of this name
6166  ViewSharedPtr view = ctx->getCurrentView();
6167  NetSharedPtr net = ctx->getCurrentNet();
6168  size_t netSize = net->getSize();
6169  PortSharedPtr port = view->findPort(name);
6170  if(port)
6171  {
6172  try
6173  {
6174  port->connect(net);
6175  }
6176  catch(Error &e)
6177  {
6178  std::string message = constructErrorMessage(
6179  "Unable to connect port : %s",
6180  port->getName().c_str());
6181  log("%s\n", message.c_str());
6182  e.setCurrentLocation( __FUNCTION__,
6183  __FILE__, __LINE__ );
6184  e.saveContextData("Parser error message", message);
6185  e.saveContextData("Filename", yyloc.begin.filename);
6186  e.saveContextData("StartLine", yyloc.begin.line);
6187  e.saveContextData("EndLine", yyloc.end.line);
6189  error(yyloc, message);
6190  YYABORT;
6191  }
6192  }
6193  std::vector< InstanceSharedPtr > leafInstances;
6194  {
6195  std::vector< InstanceSharedPtr > instances;
6196  view->getInstances(instances);
6197  for( std::vector< InstanceSharedPtr >::iterator it
6198  = instances.begin(); it != instances.end(); ++it )
6199  {
6201  == (*it)->getCompositionType() )
6202  {
6203  leafInstances.push_back(*it);
6204  }
6205  else
6206  {
6207  (*it)->getChildren(leafInstances);
6208  }
6209  }
6210  }
6211  for( std::vector< InstanceSharedPtr >::iterator it
6212  = leafInstances.begin(); it != leafInstances.end(); ++it )
6213  {
6215  = (*it)->findPortReference(name);
6216  if( pRef
6217  && netSize == pRef->getSize() )
6218  {
6219  try
6220  {
6221  pRef->connect(net);
6222  }
6223  catch(Error &e)
6224  {
6225  std::string message = constructErrorMessage(
6226  "Unable to connect port : %s",
6227  pRef->getName().c_str());
6228  log("%s\n", message.c_str());
6229  e.setCurrentLocation( __FUNCTION__,
6230  __FILE__, __LINE__ );
6231  e.saveContextData("Parser error message", message);
6232  e.saveContextData("Filename", yyloc.begin.filename);
6233  e.saveContextData("StartLine", yyloc.begin.line);
6234  e.saveContextData("EndLine", yyloc.end.line);
6236  error(yyloc, message);
6237  YYABORT;
6238  }
6239  }
6240  }
6241  }
6242  break;
6243 
6244  case 490:
6245 
6246 /* Line 678 of lalr1.cc */
6247 #line 4537 "Parser.yy"
6248  {
6249  if((yysemantic_stack_[(4) - (3)].integerVal));
6250  }
6251  break;
6252 
6253  case 493:
6254 
6255 /* Line 678 of lalr1.cc */
6256 #line 4547 "Parser.yy"
6257  {
6258  delete (yysemantic_stack_[(2) - (2)].stringVal);
6259  }
6260  break;
6261 
6262  case 494:
6263 
6264 /* Line 678 of lalr1.cc */
6265 #line 4553 "Parser.yy"
6266  {
6267  delete (yysemantic_stack_[(1) - (1)].stringVal);
6268  }
6269  break;
6270 
6271  case 496:
6272 
6273 /* Line 678 of lalr1.cc */
6274 #line 4562 "Parser.yy"
6275  {
6276  delete (yysemantic_stack_[(4) - (3)].pairData);
6277  }
6278  break;
6279 
6280  case 499:
6281 
6282 /* Line 678 of lalr1.cc */
6283 #line 4574 "Parser.yy"
6284  {
6285  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
6286  }
6287  break;
6288 
6289  case 500:
6290 
6291 /* Line 678 of lalr1.cc */
6292 #line 4580 "Parser.yy"
6293  {
6294  if((yysemantic_stack_[(4) - (3)].nameData))
6295  {
6297  = inDriver.getContext();
6298  RootSharedPtr root = ctx->getRoot();
6299  LibrarySharedPtr lib;
6300  // We do not create a new extern lib when one
6301  // exists already
6302  lib = root->findLibrary((yysemantic_stack_[(4) - (3)].nameData)->mName);
6303  if(lib)
6304  {
6305  log("Skipped creation of existing lib.\n");
6306  }
6307  EdifLevel level;
6308  switch((yysemantic_stack_[(4) - (4)].integerVal))
6309  {
6310  case 0:
6311  {
6312  level = eEdifLevel0;
6313  break;
6314  }
6315  case 1:
6316  {
6317  level = eEdifLevel1;
6318  break;
6319  }
6320  case 2:
6321  {
6322  level = eEdifLevel2;
6323  break;
6324  }
6325  default:
6326  {
6327  std::string message = constructErrorMessage(
6328  "Edif level %s is not supported", (yysemantic_stack_[(4) - (4)].integerVal) );
6329  log("%s\n", message.c_str());
6331  __FUNCTION__, __FILE__, __LINE__ );
6332  e.saveContextData("Parser error message", message);
6333  e.saveContextData("Filename", yyloc.begin.filename);
6334  e.saveContextData("StartLine", yyloc.begin.line);
6335  e.saveContextData("EndLine", yyloc.end.line);
6337  error(yyloc, message);
6338  YYABORT;
6339  }
6340  }
6341  if(lib)
6342  {
6343  if(lib->getLevel() != level)
6344  {
6345  std::string message = constructErrorMessage(
6346  "Level mismatch - old %d new %d\n",
6347  lib->getLevel(), level );
6348  log("%s\n", message.c_str());
6350  __FUNCTION__, __FILE__, __LINE__ );
6351  e.saveContextData("Parser error message", message);
6352  e.saveContextData("Filename", yyloc.begin.filename);
6353  e.saveContextData("StartLine", yyloc.begin.line);
6354  e.saveContextData("EndLine", yyloc.end.line);
6356  error(yyloc, message);
6357  YYABORT;
6358  }
6359  else
6360  {
6361  if(lib->getIsExtern())
6362  {
6363  log("Exising lib was extern .. changing\n");
6364  lib->setIsExtern(false);
6365  }
6366  }
6367  }
6368  else
6369  {
6370  try
6371  {
6372  ctx->getFactory()->create(lib);
6373  }
6374  catch(Error &e)
6375  {
6376  std::string message = constructErrorMessage(
6377  "Unable to create lib : %s",
6378  lib->getName().c_str());
6379  log("%s\n", message.c_str());
6380  e.setCurrentLocation( __FUNCTION__,
6381  __FILE__, __LINE__ );
6382  e.saveContextData("Parser error message", message);
6383  e.saveContextData("Filename", yyloc.begin.filename);
6384  e.saveContextData("StartLine", yyloc.begin.line);
6385  e.saveContextData("EndLine", yyloc.end.line);
6387  error(yyloc, message);
6388  YYABORT;
6389  }
6390  lib->setName((yysemantic_stack_[(4) - (3)].nameData)->mName);
6391  if(! (yysemantic_stack_[(4) - (3)].nameData)->mOriginalName.empty())
6392  {
6393  lib->setOriginalName((yysemantic_stack_[(4) - (3)].nameData)->mOriginalName);
6394  }
6395  lib->setLevel(level);
6396  lib->setParent(root);
6397  root->addLibrary(lib);
6398  log("Created lib %s level %d\n",
6399  lib->getName().c_str(), level );
6400  }
6401  ctx->setCurrentLibrary(lib);
6402  ctx->pushStatusContainer(lib);
6403  delete (yysemantic_stack_[(4) - (3)].nameData);
6404  }
6405  else
6406  {
6407  //TBD::POSSIBLE?
6408  }
6409  }
6410  break;
6411 
6412  case 501:
6413 
6414 /* Line 678 of lalr1.cc */
6415 #line 4697 "Parser.yy"
6416  {
6417  inDriver.getContext()->setCurrentLibrary(
6418  LibrarySharedPtr() );
6419  inDriver.getContext()->popStatusContainer();
6420  }
6421  break;
6422 
6423  case 505:
6424 
6425 /* Line 678 of lalr1.cc */
6426 #line 4708 "Parser.yy"
6427  {
6429  LibrarySharedPtr lib = ctx->getCurrentLibrary();
6430  lib->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
6431  delete (yysemantic_stack_[(2) - (2)].stringVal);
6432  }
6433  break;
6434 
6435  case 506:
6436 
6437 /* Line 678 of lalr1.cc */
6438 #line 4715 "Parser.yy"
6439  {
6441  LibrarySharedPtr lib = ctx->getCurrentLibrary();
6442  lib->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
6443  delete (yysemantic_stack_[(2) - (2)].stringVal);
6444  }
6445  break;
6446 
6447  case 508:
6448 
6449 /* Line 678 of lalr1.cc */
6450 #line 4727 "Parser.yy"
6451  {
6452  (yyval.nameData) = (yysemantic_stack_[(4) - (3)].nameData);
6453  }
6454  break;
6455 
6456  case 516:
6457 
6458 /* Line 678 of lalr1.cc */
6459 #line 4748 "Parser.yy"
6460  {
6461  boost::scoped_ptr<ValueData> delay((yysemantic_stack_[(5) - (3)].valueData));
6462  boost::scoped_ptr<ValueData> acLoad((yysemantic_stack_[(5) - (4)].valueData));
6463  (yyval.portDelay) = new PortDelay();
6464  (yyval.portDelay)->setType(PortDelay::eTypeLoadDelay);
6465  (yyval.portDelay)->setDelay(
6466  delay->mValues[0].get<Value::MiNoMax>() );
6467  (yyval.portDelay)->setAcLoad(
6468  acLoad->mValues[0].get<Value::MiNoMax>() );
6469  }
6470  break;
6471 
6472  case 526:
6473 
6474 /* Line 678 of lalr1.cc */
6475 #line 4780 "Parser.yy"
6476  {
6477  delete (yysemantic_stack_[(1) - (1)].logicRefData);
6478  }
6479  break;
6480 
6481  case 531:
6482 
6483 /* Line 678 of lalr1.cc */
6484 #line 4792 "Parser.yy"
6485  {
6486  LogicalResponseSharedPtr logicalResponse;
6488  = inDriver.getContext();
6489  try
6490  {
6491  ctx->getFactory()->create(logicalResponse);
6492  }
6493  catch(Error &e)
6494  {
6495  std::string message = constructErrorMessage(
6496  "Unable to create logicInput/logicOutput" );
6497  log("%s\n", message.c_str());
6498  e.setCurrentLocation( __FUNCTION__,
6499  __FILE__, __LINE__ );
6500  e.saveContextData("Parser error message", message);
6501  e.saveContextData("Filename", yyloc.begin.filename);
6502  e.saveContextData("StartLine", yyloc.begin.line);
6503  e.saveContextData("EndLine", yyloc.end.line);
6505  error(yyloc, message);
6506  YYABORT;
6507  }
6508  logicalResponse->setResponseType(LogicalResponse::eResponseTypeInput);
6509  ctx->setCurrentLogicalResponse(logicalResponse);
6510  ApplySharedPtr apply
6511  = ctx->getCurrentApply();
6512  apply->addLogicResponse(logicalResponse);
6513  }
6514  break;
6515 
6516  case 532:
6517 
6518 /* Line 678 of lalr1.cc */
6519 #line 4821 "Parser.yy"
6520  {
6522  ctx->setCurrentLogicalResponse(LogicalResponseSharedPtr());
6523  }
6524  break;
6525 
6526  case 535:
6527 
6528 /* Line 678 of lalr1.cc */
6529 #line 4832 "Parser.yy"
6530  {
6531  if(NULL != (yysemantic_stack_[(1) - (1)].portListData) && !(yysemantic_stack_[(1) - (1)].portListData)->mPortRefs.empty())
6532  {
6533  boost::scoped_ptr<PortListData> portListData((yysemantic_stack_[(1) - (1)].portListData));
6534  std::string message;
6535 
6537  LogicalResponseSharedPtr logicalResponse
6538  = ctx->getCurrentLogicalResponse();
6539 
6540  PortListSharedPtr portList;
6541  ctx->getFactory()->create(portList);
6542 
6543  for( std::vector<PortRefData *>::iterator it
6544  = portListData->mPortRefs.begin();
6545  it != portListData->mPortRefs.end(); ++it )
6546  {
6547  PortRefData *portData = *it;
6548  std::vector< std::string > nestedNames;
6549  PortRefData *currPortRef = *it;
6550  PortRefData *nextPortRef = portData->mParentPort;
6551  nestedNames.push_back(currPortRef->mPortName->mName);
6552  while(nextPortRef)
6553  {
6554  currPortRef = nextPortRef;
6555  nestedNames.push_back(nextPortRef->mPortName->mName);
6556  nextPortRef = currPortRef->mParentPort;
6557  }
6558  bool isPort = (NULL == currPortRef->mInstanceName);
6559  NameData *portNameData = currPortRef->mPortName;
6560  std::string topName = *(nestedNames.rbegin());
6561  ViewSharedPtr view = ctx->getCurrentView();
6562  if(isPort)
6563  {
6564  PortSharedPtr port = view->findPort(topName);
6565  if(!port)
6566  {
6567  SimulateSharedPtr simulate
6568  = ctx->getCurrentSimulate();
6569  PortListAliasSharedPtr portList
6570  = simulate->findPortListAlias(topName);
6571  if(!portList)
6572  {
6573  std::string message = constructErrorMessage(
6574  "No port %s found in view/portListAlias\n",
6575  portNameData->mName.c_str());
6576  log("%s\n", message.c_str());
6578  __FUNCTION__, __FILE__, __LINE__ );
6579  e.saveContextData("Parser error message", message);
6580  e.saveContextData("Filename", yyloc.begin.filename);
6581  e.saveContextData("StartLine", yyloc.begin.line);
6582  e.saveContextData("EndLine", yyloc.end.line);
6584  error(yyloc, message);
6585  YYABORT;
6586  }
6587  }
6588 
6589  try
6590  {
6591  connectibleFinder(nestedNames, port);
6592  if(!portData->mPortName->mIndices.empty())
6593  {
6594  port = port->get(portData->mPortName->mIndices);
6595  }
6596  portList->addChildPort(port);
6597  }
6598  catch(Error &e)
6599  {
6600  std::string message = constructErrorMessage(
6601  "Unable to connect port : %s",
6602  port->getName().c_str());
6603  log("%s\n", message.c_str());
6604  e.setCurrentLocation( __FUNCTION__,
6605  __FILE__, __LINE__ );
6606  e.saveContextData("Parser error message", message);
6607  e.saveContextData("Filename", yyloc.begin.filename);
6608  e.saveContextData("StartLine", yyloc.begin.line);
6609  e.saveContextData("EndLine", yyloc.end.line);
6611  error(yyloc, message);
6612  YYABORT;
6613  }
6614  }
6615  else
6616  {
6617  }
6618  }
6619  logicalResponse->setConnectedPortList(portList);
6620  }
6621  }
6622  break;
6623 
6624  case 536:
6625 
6626 /* Line 678 of lalr1.cc */
6627 #line 4925 "Parser.yy"
6628  {
6629  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(1) - (1)].portRefData));
6630  NameData *portNameData = portData->mPortName;
6631  std::string name = portNameData->mName;
6633  = inDriver.getContext();
6634  ViewSharedPtr view = ctx->getCurrentView();
6635 
6636  PortRefData *currPortRef = (yysemantic_stack_[(1) - (1)].portRefData);
6637  PortRefData *nextPortRef = portData->mParentPort;
6638  std::vector< std::string > nestedNames;
6639  nestedNames.push_back(currPortRef->mPortName->mName);
6640  while(nextPortRef)
6641  {
6642  currPortRef = nextPortRef;
6643  nestedNames.push_back(nextPortRef->mPortName->mName);
6644  nextPortRef = currPortRef->mParentPort;
6645  }
6646 
6647  bool isPort = (NULL == currPortRef->mInstanceName);
6648  std::string topName = *(nestedNames.rbegin());
6649  if(isPort)
6650  {
6651  PortSharedPtr port = view->findPort(topName);
6652  if(!port)
6653  {
6654  std::string message = constructErrorMessage(
6655  "No port %s found in view %s\n",
6656  name.c_str(),
6657  view->getName().c_str());
6658  log("%s\n", message.c_str());
6660  __FUNCTION__, __FILE__, __LINE__ );
6661  e.saveContextData("Parser error message", message);
6662  e.saveContextData("Filename", yyloc.begin.filename);
6663  e.saveContextData("StartLine", yyloc.begin.line);
6664  e.saveContextData("EndLine", yyloc.end.line);
6666  error(yyloc, message);
6667  YYABORT;
6668  }
6669 
6670  LogicalResponseSharedPtr logicalResponse
6671  = ctx->getCurrentLogicalResponse();
6672  try
6673  {
6674  connectibleFinder(nestedNames, port);
6675  if(!portData->mPortName->mIndices.empty())
6676  {
6677  port = port->get(portData->mPortName->mIndices);
6678  }
6679  logicalResponse->setConnectedPort(port);
6680  }
6681  catch(Error &e)
6682  {
6684  __FUNCTION__, __FILE__, __LINE__ );
6685  throw;
6686  }
6687  }
6688  }
6689  break;
6690 
6691  case 537:
6692 
6693 /* Line 678 of lalr1.cc */
6694 #line 4987 "Parser.yy"
6695  {
6696  boost::scoped_ptr<NameData> portData((yysemantic_stack_[(1) - (1)].nameData));
6697  std::string name = portData->mName;
6699  = inDriver.getContext();
6700  ViewSharedPtr view = ctx->getCurrentView();
6701  PortSharedPtr port = view->findPort(name);
6702  LogicalResponseSharedPtr logicalResponse
6703  = ctx->getCurrentLogicalResponse();
6704  if(!port)
6705  {
6706  SimulateSharedPtr simulate
6707  = ctx->getCurrentSimulate();
6708  PortListAliasSharedPtr portListAlias
6709  = simulate->findPortListAlias(name);
6710  if(!portListAlias)
6711  {
6712  std::string message = constructErrorMessage(
6713  "No port %s found in view/portListAlias\n",
6714  name.c_str());
6715  log("%s\n", message.c_str());
6717  __FUNCTION__, __FILE__, __LINE__ );
6718  e.saveContextData("Parser error message", message);
6719  e.saveContextData("Filename", yyloc.begin.filename);
6720  e.saveContextData("StartLine", yyloc.begin.line);
6721  e.saveContextData("EndLine", yyloc.end.line);
6723  error(yyloc, message);
6724  YYABORT;
6725  }
6726  else
6727  {
6728  logicalResponse->setConnectedPortListAlias(portListAlias);
6729  }
6730  }
6731  else
6732  {
6733  logicalResponse->setConnectedPort(port);
6734  }
6735  }
6736  break;
6737 
6738  case 538:
6739 
6740 /* Line 678 of lalr1.cc */
6741 #line 5031 "Parser.yy"
6742  {
6743  LogicElementSharedPtr logicElem;
6745  = inDriver.getContext();
6746  try
6747  {
6748  ctx->getFactory()->create(logicElem);
6749  logicElem->setType(LogicElement::eTypeList);
6750  }
6751  catch(Error &e)
6752  {
6753  std::string message = constructErrorMessage(
6754  "Unable to create logicList" );
6755  log("%s\n", message.c_str());
6756  e.setCurrentLocation( __FUNCTION__,
6757  __FILE__, __LINE__ );
6758  e.saveContextData("Parser error message", message);
6759  e.saveContextData("Filename", yyloc.begin.filename);
6760  e.saveContextData("StartLine", yyloc.begin.line);
6761  e.saveContextData("EndLine", yyloc.end.line);
6763  error(yyloc, message);
6764  YYABORT;
6765  }
6766  ctx->pushLogicElement(logicElem);
6767  ctx->incrementLogicElementDepth();
6768  }
6769  break;
6770 
6771  case 539:
6772 
6773 /* Line 678 of lalr1.cc */
6774 #line 5058 "Parser.yy"
6775  {
6777  LogicElementSharedPtr currentLogicElem
6778  = ctx->getCurrentLogicElement();
6779  ctx->popLogicElement();
6780  LogicElementSharedPtr parentLogicElem;
6781  if(ctx->getLogicElementDepth() > 1 )
6782  {
6783  parentLogicElem = ctx->getCurrentLogicElement();
6784  }
6785  ctx->decrementLogicElementDepth();
6786  if(parentLogicElem)
6787  {
6788  parentLogicElem->setRelationType(
6790  currentLogicElem->setRelationType(
6792  //Check size
6793  size_t parentLogicElemSize = parentLogicElem->getSize();
6794  size_t currentLogicElemSize = currentLogicElem->getSize();
6795 
6796  log("Parent LogicList Size :: %d\n",
6797  parentLogicElemSize);
6798  log("Current LogicList Size :: %d\n",
6799  currentLogicElemSize);
6800 
6801  //std::cout << "Parent LogicList Size :: " << parentLogicElemSize << std::endl;
6802  //std::cout << "Current LogicList Size :: " << currentLogicElemSize << std::endl;
6803 
6804  if(parentLogicElemSize != 0)
6805  {
6806  if(parentLogicElemSize == currentLogicElemSize)
6807  {
6808  parentLogicElem->addChildLogicElement(currentLogicElem);
6809  }
6810  else
6811  {
6812  std::string message = constructErrorMessage(
6813  "Child logicList can't be added, size mismatch %d with %d",
6814  parentLogicElemSize,
6815  currentLogicElemSize);
6816  log("%s\n", message.c_str());
6818  __FUNCTION__, __FILE__, __LINE__ );
6819  e.saveContextData("Parser error message", message);
6820  e.saveContextData("Filename", yyloc.begin.filename);
6821  e.saveContextData("StartLine", yyloc.begin.line);
6822  e.saveContextData("EndLine", yyloc.end.line);
6824  error(yyloc, message);
6825  YYABORT;
6826  }
6827  }
6828  else
6829  {
6830  parentLogicElem->addChildLogicElement(currentLogicElem);
6831  }
6832  }
6833  else
6834  {
6835  ctx->pushLogicElement(currentLogicElem);
6836  ctx->incrementLogicElementDepth();
6837  }
6838  }
6839  break;
6840 
6841  case 544:
6842 
6843 /* Line 678 of lalr1.cc */
6844 #line 5131 "Parser.yy"
6845  {
6846  (yyval.logicRefData) = (yysemantic_stack_[(4) - (3)].logicRefData);
6847  }
6848  break;
6849 
6850  case 545:
6851 
6852 /* Line 678 of lalr1.cc */
6853 #line 5137 "Parser.yy"
6854  {
6855  (yyval.logicRefData) = (yysemantic_stack_[(4) - (3)].logicRefData);
6856  }
6857  break;
6858 
6859  case 547:
6860 
6861 /* Line 678 of lalr1.cc */
6862 #line 5146 "Parser.yy"
6863  {
6864  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
6865  }
6866  break;
6867 
6868  case 549:
6869 
6870 /* Line 678 of lalr1.cc */
6871 #line 5155 "Parser.yy"
6872  {
6873  LogicElementSharedPtr logicElem;
6875  = inDriver.getContext();
6876  try
6877  {
6878  ctx->getFactory()->create(logicElem);
6879  logicElem->setType(LogicElement::eTypeOneOf);
6880  }
6881  catch(Error &e)
6882  {
6883  std::string message = constructErrorMessage(
6884  "Unable to create logicOneOf" );
6885  log("%s\n", message.c_str());
6886  e.setCurrentLocation( __FUNCTION__,
6887  __FILE__, __LINE__ );
6888  e.saveContextData("Parser error message", message);
6889  e.saveContextData("Filename", yyloc.begin.filename);
6890  e.saveContextData("StartLine", yyloc.begin.line);
6891  e.saveContextData("EndLine", yyloc.end.line);
6893  error(yyloc, message);
6894  YYABORT;
6895  }
6896  ctx->pushLogicElement(logicElem);
6897  ctx->incrementLogicElementDepth();
6898  }
6899  break;
6900 
6901  case 550:
6902 
6903 /* Line 678 of lalr1.cc */
6904 #line 5182 "Parser.yy"
6905  {
6907  LogicElementSharedPtr currentLogicElem
6908  = ctx->getCurrentLogicElement();
6909  ctx->popLogicElement();
6910  LogicElementSharedPtr parentLogicElem;
6911  if(ctx->getLogicElementDepth() > 1 )
6912  {
6913  parentLogicElem = ctx->getCurrentLogicElement();
6914  }
6915  ctx->decrementLogicElementDepth();
6916  if(parentLogicElem)
6917  {
6918  parentLogicElem->setRelationType(
6920  currentLogicElem->setRelationType(
6922  //Check size
6923  size_t parentLogicElemSize = parentLogicElem->getSize();
6924  size_t currentLogicElemSize = currentLogicElem->getSize();
6925 
6926  log("Parent LogicOneOf Size :: %d\n",
6927  parentLogicElemSize);
6928  log("Current LogicOneOf Size :: %d\n",
6929  currentLogicElemSize);
6930 
6931  //std::cout << "Parent LogicOneOf Size :: " << parentLogicElemSize << std::endl;
6932  //std::cout << "Current LogicOneOf Size :: " << currentLogicElemSize << std::endl;
6933 
6934  if(parentLogicElemSize != 0)
6935  {
6936  if(parentLogicElemSize == currentLogicElemSize)
6937  {
6938  parentLogicElem->addChildLogicElement(currentLogicElem);
6939  }
6940  else
6941  {
6942  std::string message = constructErrorMessage(
6943  "Child logictOneOf can't be added, size mismatch %d with %d",
6944  parentLogicElemSize,
6945  currentLogicElemSize);
6946  log("%s\n", message.c_str());
6948  __FUNCTION__, __FILE__, __LINE__ );
6949  e.saveContextData("Parser error message", message);
6950  e.saveContextData("Filename", yyloc.begin.filename);
6951  e.saveContextData("StartLine", yyloc.begin.line);
6952  e.saveContextData("EndLine", yyloc.end.line);
6954  error(yyloc, message);
6955  YYABORT;
6956  }
6957  }
6958  else
6959  {
6960  parentLogicElem->addChildLogicElement(currentLogicElem);
6961  }
6962  }
6963  else
6964  {
6965  ctx->pushLogicElement(currentLogicElem);
6966  ctx->incrementLogicElementDepth();
6967  }
6968  }
6969  break;
6970 
6971  case 551:
6972 
6973 /* Line 678 of lalr1.cc */
6974 #line 5249 "Parser.yy"
6975  {
6976  boost::scoped_ptr<NameData> logicData((yysemantic_stack_[(1) - (1)].nameData));
6977  std::string name = logicData->mName;
6979  = inDriver.getContext();
6980  LibrarySharedPtr lib
6981  = ctx->getCurrentLibrary();
6982  SimulationInfoSharedPtr simuInfo
6983  = lib->getSimulationInfo();
6984  if(!simuInfo)
6985  {
6986  std::string message = constructErrorMessage(
6987  "SimulatioInfo not found in %s library",
6988  lib->getName().c_str() );
6989  log("%s\n", message.c_str());
6991  __FUNCTION__, __FILE__, __LINE__ );
6992  e.saveContextData("Parser error message", message);
6993  e.saveContextData("Filename", yyloc.begin.filename);
6994  e.saveContextData("StartLine", yyloc.begin.line);
6995  e.saveContextData("EndLine", yyloc.end.line);
6997  error(yyloc, message);
6998  YYABORT;
6999  }
7000  LogicValueSharedPtr logicVal
7001  = simuInfo->findLogicValue(name);
7002  if(!logicVal)
7003  {
7004  SimulateSharedPtr simulate
7005  = ctx->getCurrentSimulate();
7006  if(simulate)
7007  {
7008  WaveValueSharedPtr waveValue
7009  = simulate->findWaveValue(name);
7010  if(!waveValue)
7011  {
7012  std::string message = constructErrorMessage(
7013  "Wave Value %s not found",
7014  logicData->mName.c_str() );
7015  log("%s\n", message.c_str());
7017  __FUNCTION__, __FILE__, __LINE__ );
7018  e.saveContextData("Parser error message", message);
7019  e.saveContextData("Filename", yyloc.begin.filename);
7020  e.saveContextData("StartLine", yyloc.begin.line);
7021  e.saveContextData("EndLine", yyloc.end.line);
7023  error(yyloc, message);
7024  YYABORT;
7025  }
7026  }
7027  else
7028  {
7029  std::string message = constructErrorMessage(
7030  "Logic Value %s not found",
7031  name.c_str() );
7032  log("%s\n", message.c_str());
7034  __FUNCTION__, __FILE__, __LINE__ );
7035  e.saveContextData("Parser error message", message);
7036  e.saveContextData("Filename", yyloc.begin.filename);
7037  e.saveContextData("StartLine", yyloc.begin.line);
7038  e.saveContextData("EndLine", yyloc.end.line);
7040  error(yyloc, message);
7041  YYABORT;
7042  }
7043  }
7044  LogicElementSharedPtr singleElem;
7045  try
7046  {
7047  ctx->getFactory()->create(singleElem);
7048  singleElem->setType(LogicElement::eTypeSingle);
7049  singleElem->setName(name);
7050  }
7051  catch(Error &e)
7052  {
7053  std::string message = constructErrorMessage(
7054  "Unable to create logic single element" );
7055  log("%s\n", message.c_str());
7056  e.setCurrentLocation( __FUNCTION__,
7057  __FILE__, __LINE__ );
7058  e.saveContextData("Parser error message", message);
7059  e.saveContextData("Filename", yyloc.begin.filename);
7060  e.saveContextData("StartLine", yyloc.begin.line);
7061  e.saveContextData("EndLine", yyloc.end.line);
7063  error(yyloc, message);
7064  YYABORT;
7065  }
7066  LogicElementSharedPtr logicElem
7067  = ctx->getCurrentLogicElement();
7068  logicElem->addChildLogicElement(singleElem);
7069  }
7070  break;
7071 
7072  case 555:
7073 
7074 /* Line 678 of lalr1.cc */
7075 #line 5352 "Parser.yy"
7076  {
7077  LogicalResponseSharedPtr logicalResponse;
7079  = inDriver.getContext();
7080  try
7081  {
7082  ctx->getFactory()->create(logicalResponse);
7083  }
7084  catch(Error &e)
7085  {
7086  std::string message = constructErrorMessage(
7087  "Unable to create logicOutput" );
7088  log("%s\n", message.c_str());
7089  e.setCurrentLocation( __FUNCTION__,
7090  __FILE__, __LINE__ );
7091  e.saveContextData("Parser error message", message);
7092  e.saveContextData("Filename", yyloc.begin.filename);
7093  e.saveContextData("StartLine", yyloc.begin.line);
7094  e.saveContextData("EndLine", yyloc.end.line);
7096  error(yyloc, message);
7097  YYABORT;
7098  }
7099  logicalResponse->setResponseType(LogicalResponse::eResponseTypeOutput);
7100  ctx->setCurrentLogicalResponse(logicalResponse);
7101  ApplySharedPtr apply
7102  = ctx->getCurrentApply();
7103  apply->addLogicResponse(logicalResponse);
7104  }
7105  break;
7106 
7107  case 556:
7108 
7109 /* Line 678 of lalr1.cc */
7110 #line 5381 "Parser.yy"
7111  {
7113  ctx->setCurrentLogicalResponse(LogicalResponseSharedPtr());
7114  }
7115  break;
7116 
7117  case 562:
7118 
7119 /* Line 678 of lalr1.cc */
7120 #line 5397 "Parser.yy"
7121  {
7122  delete (yysemantic_stack_[(2) - (2)].stringVal);
7123  }
7124  break;
7125 
7126  case 563:
7127 
7128 /* Line 678 of lalr1.cc */
7129 #line 5401 "Parser.yy"
7130  {
7131  delete (yysemantic_stack_[(2) - (2)].stringVal);
7132  }
7133  break;
7134 
7135  case 564:
7136 
7137 /* Line 678 of lalr1.cc */
7138 #line 5407 "Parser.yy"
7139  {
7140  if(NULL == (yysemantic_stack_[(5) - (4)].logicRefData))
7141  {
7142  (yyval.logicRefData) = new LogicRefData();
7143  }
7144  else
7145  {
7146  (yyval.logicRefData) = (yysemantic_stack_[(5) - (4)].logicRefData);
7147  }
7148  (yyval.logicRefData)->mLogicName = (yysemantic_stack_[(5) - (3)].nameData);
7149  }
7150  break;
7151 
7152  case 565:
7153 
7154 /* Line 678 of lalr1.cc */
7155 #line 5421 "Parser.yy"
7156  {
7157  (yyval.logicRefData) = NULL;
7158  }
7159  break;
7160 
7161  case 566:
7162 
7163 /* Line 678 of lalr1.cc */
7164 #line 5425 "Parser.yy"
7165  {
7166  (yyval.logicRefData) = new LogicRefData();
7167  (yyval.logicRefData)->mLibraryName = (yysemantic_stack_[(1) - (1)].nameData);
7168  }
7169  break;
7170 
7171  case 567:
7172 
7173 /* Line 678 of lalr1.cc */
7174 #line 5432 "Parser.yy"
7175  {
7176  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(3) - (3)].nameData));
7177  std::string name = nameData->mName;
7179  LogicValueSharedPtr logicVal;
7180  SimulationInfoSharedPtr simuInfo
7181  = ctx->getCurrentSimulationInfo();
7182  logicVal = simuInfo->findLogicValue(name);
7183  if(logicVal)
7184  {
7185  log("Found existing logic value\n");
7186  std::string message = constructErrorMessage(
7187  "Logic value %s already exists in simulation info\n",
7188  name.c_str() );
7189  log("%s\n", message.c_str());
7191  __FUNCTION__, __FILE__, __LINE__ );
7192  e.saveContextData("Parser error message", message);
7193  e.saveContextData("Filename", yyloc.begin.filename);
7194  e.saveContextData("StartLine", yyloc.begin.line);
7195  e.saveContextData("EndLine", yyloc.end.line);
7197  error(yyloc, message);
7198  YYABORT;
7199  }
7200  else
7201  {
7202  try
7203  {
7204  ctx->getFactory()->create(logicVal);
7205  }
7206  catch(Error &e)
7207  {
7208  std::string message = constructErrorMessage(
7209  "Unable to create Logic Value : %s", name.c_str());
7210  log("%s\n", message.c_str());
7211  e.setCurrentLocation( __FUNCTION__,
7212  __FILE__, __LINE__ );
7213  e.saveContextData("Parser error message", message);
7214  e.saveContextData("Filename", yyloc.begin.filename);
7215  e.saveContextData("StartLine", yyloc.begin.line);
7216  e.saveContextData("EndLine", yyloc.end.line);
7218  error(yyloc, message);
7219  YYABORT;
7220  }
7221  logicVal->setName(name);
7222  if(!nameData->mOriginalName.empty())
7223  {
7224  logicVal->setOriginalName(nameData->mOriginalName);
7225  }
7226  logicVal->setParent(simuInfo);
7227  simuInfo->addLogicValue(logicVal);
7228  log("Created Logic Value %s\n", logicVal->getName().c_str());
7229  }
7230  ctx->setCurrentLogicValue(logicVal);
7231  ctx->pushPropertyContainer(logicVal);
7232  }
7233  break;
7234 
7235  case 568:
7236 
7237 /* Line 678 of lalr1.cc */
7238 #line 5490 "Parser.yy"
7239  {
7241  LogicValueSharedPtr logicVal = ctx->getCurrentLogicValue();
7242  if((yysemantic_stack_[(6) - (5)].logicValueAttributes))
7243  {
7244  boost::shared_ptr<LogicValueAttributes> attrib((yysemantic_stack_[(6) - (5)].logicValueAttributes));
7245  logicVal->setAttributes(attrib);
7246  }
7247  ctx->setCurrentLogicValue(LogicValueSharedPtr());
7248  ctx->popPropertyContainer();
7249  }
7250  break;
7251 
7252  case 569:
7253 
7254 /* Line 678 of lalr1.cc */
7255 #line 5504 "Parser.yy"
7256  {
7257  (yyval.logicValueAttributes) = NULL;
7258  }
7259  break;
7260 
7261  case 570:
7262 
7263 /* Line 678 of lalr1.cc */
7264 #line 5508 "Parser.yy"
7265  {
7266  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(2) - (2)].valueData));
7267  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7268  (yyval.logicValueAttributes)->setVoltageMap(data->mValues[0].get<Value::MiNoMax>());
7269  }
7270  break;
7271 
7272  case 571:
7273 
7274 /* Line 678 of lalr1.cc */
7275 #line 5514 "Parser.yy"
7276  {
7277  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(2) - (2)].valueData));
7278  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7279  (yyval.logicValueAttributes)->setCurrentMap(data->mValues[0].get<Value::MiNoMax>());
7280  }
7281  break;
7282 
7283  case 572:
7284 
7285 /* Line 678 of lalr1.cc */
7286 #line 5520 "Parser.yy"
7287  {
7288  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7289  Value::Boolean val = (yysemantic_stack_[(2) - (2)].integerVal);
7290  (yyval.logicValueAttributes)->setBooleanMap(val);
7291  }
7292  break;
7293 
7294  case 573:
7295 
7296 /* Line 678 of lalr1.cc */
7297 #line 5526 "Parser.yy"
7298  {
7299  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7300  std::list< LogicValueSharedPtr > logicValues;
7301  boost::scoped_ptr<LogicListData> logicListData((yysemantic_stack_[(2) - (2)].logicListData));
7302  if(NULL != (yysemantic_stack_[(2) - (2)].logicListData) && !(yysemantic_stack_[(2) - (2)].logicListData)->mNameDataList.empty())
7303  {
7304  for( std::list<NameData *>::iterator it
7305  = logicListData->mNameDataList.begin();
7306  it != logicListData->mNameDataList.end(); it++ )
7307  {
7308  NameData *pNameData = *it;
7309  std::string name = pNameData->mName;
7311  LogicValueSharedPtr logicVal;
7312  SimulationInfoSharedPtr simuInfo
7313  = ctx->getCurrentSimulationInfo();
7314  logicVal = simuInfo->findLogicValue(name);
7315  if(!logicVal)
7316  {
7317  std::string message = constructErrorMessage(
7318  "Logic Value %s not found",
7319  name.c_str() );
7320  log("%s\n", message.c_str());
7322  __FUNCTION__, __FILE__, __LINE__ );
7323  e.saveContextData("Parser error message", message);
7324  e.saveContextData("Filename", yyloc.begin.filename);
7325  e.saveContextData("StartLine", yyloc.begin.line);
7326  e.saveContextData("EndLine", yyloc.end.line);
7328  error(yyloc, message);
7329  YYABORT;
7330  }
7331  else
7332  {
7333  if(!logicValues.empty())
7334  {
7335  std::list< LogicValueSharedPtr >::iterator logicIt
7336  = std::find(logicValues.begin(), logicValues.end(), logicVal);
7337  if(logicIt != logicValues.end())
7338  {
7339  std::string message = constructErrorMessage(
7340  "Logic value %s already exist in compound list",
7341  name.c_str());
7342  log("%s\n", message.c_str());
7344  __FUNCTION__, __FILE__, __LINE__ );
7345  e.saveContextData("Parser error message", message);
7346  e.saveContextData("Filename", yyloc.begin.filename);
7347  e.saveContextData("StartLine", yyloc.begin.line);
7348  e.saveContextData("EndLine", yyloc.end.line);
7350  error(yyloc, message);
7351  YYABORT;
7352  }
7353  else
7354  {
7355  logicValues.push_back(logicVal);
7356  }
7357  }
7358  else
7359  {
7360  logicValues.push_back(logicVal);
7361  }
7362  }
7363  }
7364  (yyval.logicValueAttributes)->setCompoundLogicValues(logicValues);
7365  }
7366  }
7367  break;
7368 
7369  case 574:
7370 
7371 /* Line 678 of lalr1.cc */
7372 #line 5596 "Parser.yy"
7373  {
7374  boost::scoped_ptr<NameData> pNameData((yysemantic_stack_[(2) - (2)].nameData));
7375  std::string name = pNameData->mName;
7377  LogicValueSharedPtr logicVal;
7378  SimulationInfoSharedPtr simuInfo
7379  = ctx->getCurrentSimulationInfo();
7380  logicVal = simuInfo->findLogicValue(name);
7381  if(!logicVal)
7382  {
7383  std::string message = constructErrorMessage(
7384  "Logic Value %s not found",
7385  name.c_str() );
7386  log("%s\n", message.c_str());
7388  __FUNCTION__, __FILE__, __LINE__ );
7389  e.saveContextData("Parser error message", message);
7390  e.saveContextData("Filename", yyloc.begin.filename);
7391  e.saveContextData("StartLine", yyloc.begin.line);
7392  e.saveContextData("EndLine", yyloc.end.line);
7394  error(yyloc, message);
7395  YYABORT;
7396  }
7397  else
7398  {
7399  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7400  (yyval.logicValueAttributes)->setWeakLogicValue(logicVal);
7401  }
7402  }
7403  break;
7404 
7405  case 575:
7406 
7407 /* Line 678 of lalr1.cc */
7408 #line 5627 "Parser.yy"
7409  {
7410  boost::scoped_ptr<NameData> pNameData((yysemantic_stack_[(2) - (2)].nameData));
7411  std::string name = pNameData->mName;
7413  LogicValueSharedPtr logicVal;
7414  SimulationInfoSharedPtr simuInfo
7415  = ctx->getCurrentSimulationInfo();
7416  logicVal = simuInfo->findLogicValue(name);
7417  if(!logicVal)
7418  {
7419  std::string message = constructErrorMessage(
7420  "Logic Value %s not found",
7421  name.c_str() );
7422  log("%s\n", message.c_str());
7424  __FUNCTION__, __FILE__, __LINE__ );
7425  e.saveContextData("Parser error message", message);
7426  e.saveContextData("Filename", yyloc.begin.filename);
7427  e.saveContextData("StartLine", yyloc.begin.line);
7428  e.saveContextData("EndLine", yyloc.end.line);
7430  error(yyloc, message);
7431  YYABORT;
7432  }
7433  else
7434  {
7435  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7436  (yyval.logicValueAttributes)->setStrongLogicValue(logicVal);
7437  }
7438  }
7439  break;
7440 
7441  case 576:
7442 
7443 /* Line 678 of lalr1.cc */
7444 #line 5658 "Parser.yy"
7445  {
7446  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7447  std::list< LogicValueSharedPtr > logicValues;
7448  boost::scoped_ptr<LogicListData> logicListData((yysemantic_stack_[(2) - (2)].logicListData));
7449  if(NULL != (yysemantic_stack_[(2) - (2)].logicListData) && !(yysemantic_stack_[(2) - (2)].logicListData)->mNameDataList.empty())
7450  {
7451  for( std::list<NameData *>::iterator it
7452  = logicListData->mNameDataList.begin();
7453  it != logicListData->mNameDataList.end(); it++ )
7454  {
7455  NameData *pNameData = *it;
7456  std::string name = pNameData->mName;
7458  LogicValueSharedPtr logicVal;
7459  SimulationInfoSharedPtr simuInfo
7460  = ctx->getCurrentSimulationInfo();
7461  logicVal = simuInfo->findLogicValue(name);
7462  if(!logicVal)
7463  {
7464  std::string message = constructErrorMessage(
7465  "Logic Value %s not found",
7466  name.c_str() );
7467  log("%s\n", message.c_str());
7469  __FUNCTION__, __FILE__, __LINE__ );
7470  e.saveContextData("Parser error message", message);
7471  e.saveContextData("Filename", yyloc.begin.filename);
7472  e.saveContextData("StartLine", yyloc.begin.line);
7473  e.saveContextData("EndLine", yyloc.end.line);
7475  error(yyloc, message);
7476  YYABORT;
7477  }
7478  else
7479  {
7480  if(!logicValues.empty())
7481  {
7482  std::list< LogicValueSharedPtr >::iterator logicIt
7483  = std::find(logicValues.begin(), logicValues.end(), logicVal);
7484  if(logicIt != logicValues.end())
7485  {
7486  std::string message = constructErrorMessage(
7487  "Logic value %s already exist in dominates list",
7488  name.c_str());
7489  log("%s\n", message.c_str());
7491  __FUNCTION__, __FILE__, __LINE__ );
7492  e.saveContextData("Parser error message", message);
7493  e.saveContextData("Filename", yyloc.begin.filename);
7494  e.saveContextData("StartLine", yyloc.begin.line);
7495  e.saveContextData("EndLine", yyloc.end.line);
7497  error(yyloc, message);
7498  YYABORT;
7499  }
7500  else
7501  {
7502  logicValues.push_back(logicVal);
7503  }
7504  }
7505  else
7506  {
7507  logicValues.push_back(logicVal);
7508  }
7509  }
7510  }
7511  (yyval.logicValueAttributes)->setDominatedLogicValues(logicValues);
7512  }
7513  }
7514  break;
7515 
7516  case 577:
7517 
7518 /* Line 678 of lalr1.cc */
7519 #line 5728 "Parser.yy"
7520  {
7522  boost::scoped_ptr<LogicRefData> logicRefData((yysemantic_stack_[(2) - (2)].logicRefData));
7523  std::string logicValName = logicRefData->mLogicName->mName;
7524  std::string libName;
7525  bool isLocalLib = (NULL == logicRefData->mLibraryName);
7526  if(isLocalLib)
7527  {
7528  libName = ctx->getCurrentLibrary()->getName();
7529  }
7530  else
7531  {
7532  libName = logicRefData->mLibraryName->mName;
7533  }
7534  LibrarySharedPtr library
7535  = ctx->getRoot()->findLibrary(libName) ;
7536  if(!library)
7537  {
7538  std::string message = constructErrorMessage(
7539  "Library %s not found",
7540  libName.c_str() );
7541  log("%s\n", message.c_str());
7543  __FUNCTION__, __FILE__, __LINE__ );
7544  e.saveContextData("Parser error message", message);
7545  e.saveContextData("Filename", yyloc.begin.filename);
7546  e.saveContextData("StartLine", yyloc.begin.line);
7547  e.saveContextData("EndLine", yyloc.end.line);
7549  error(yyloc, message);
7550  YYABORT;
7551  }
7552  LogicValueSharedPtr logicVal;
7553  SimulationInfoSharedPtr simuInfo
7554  = library->getSimulationInfo();
7555  if(!simuInfo)
7556  {
7557  std::string message = constructErrorMessage(
7558  "SimulatioInfo not found in %s library",
7559  library->getName().c_str() );
7560  log("%s\n", message.c_str());
7562  __FUNCTION__, __FILE__, __LINE__ );
7563  e.saveContextData("Parser error message", message);
7564  e.saveContextData("Filename", yyloc.begin.filename);
7565  e.saveContextData("StartLine", yyloc.begin.line);
7566  e.saveContextData("EndLine", yyloc.end.line);
7568  error(yyloc, message);
7569  YYABORT;
7570  }
7571  logicVal = simuInfo->findLogicValue(logicValName);
7572  if(!logicVal)
7573  {
7574  std::string message = constructErrorMessage(
7575  "Logic Value %s not found",
7576  logicValName.c_str() );
7577  log("%s\n", message.c_str());
7579  __FUNCTION__, __FILE__, __LINE__ );
7580  e.saveContextData("Parser error message", message);
7581  e.saveContextData("Filename", yyloc.begin.filename);
7582  e.saveContextData("StartLine", yyloc.begin.line);
7583  e.saveContextData("EndLine", yyloc.end.line);
7585  error(yyloc, message);
7586  YYABORT;
7587  }
7588  else
7589  {
7590  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7593  logicMap->mLogicRef = logicValName;
7594  logicMap->mLibraryRef = libName;
7595  logicMap->mLogicMapType
7597  (yyval.logicValueAttributes)->addLogicMap(logicMap);
7598  }
7599  }
7600  break;
7601 
7602  case 578:
7603 
7604 /* Line 678 of lalr1.cc */
7605 #line 5809 "Parser.yy"
7606  {
7608  boost::scoped_ptr<LogicRefData> logicRefData((yysemantic_stack_[(2) - (2)].logicRefData));
7609  std::string logicValName = logicRefData->mLogicName->mName;
7610  std::string libName;
7611  bool isLocalLib = (NULL == logicRefData->mLibraryName);
7612  if(isLocalLib)
7613  {
7614  libName = ctx->getCurrentLibrary()->getName();
7615  }
7616  else
7617  {
7618  libName = logicRefData->mLibraryName->mName;
7619  }
7620  LibrarySharedPtr library
7621  = ctx->getRoot()->findLibrary(libName) ;
7622  if(!library)
7623  {
7624  std::string message = constructErrorMessage(
7625  "Library %s not found",
7626  libName.c_str() );
7627  log("%s\n", message.c_str());
7629  __FUNCTION__, __FILE__, __LINE__ );
7630  e.saveContextData("Parser error message", message);
7631  e.saveContextData("Filename", yyloc.begin.filename);
7632  e.saveContextData("StartLine", yyloc.begin.line);
7633  e.saveContextData("EndLine", yyloc.end.line);
7635  error(yyloc, message);
7636  YYABORT;
7637  }
7638  LogicValueSharedPtr logicVal;
7639  SimulationInfoSharedPtr simuInfo
7640  = library->getSimulationInfo();
7641  if(!simuInfo)
7642  {
7643  std::string message = constructErrorMessage(
7644  "SimulatioInfo not found in %s library",
7645  library->getName().c_str() );
7646  log("%s\n", message.c_str());
7648  __FUNCTION__, __FILE__, __LINE__ );
7649  e.saveContextData("Parser error message", message);
7650  e.saveContextData("Filename", yyloc.begin.filename);
7651  e.saveContextData("StartLine", yyloc.begin.line);
7652  e.saveContextData("EndLine", yyloc.end.line);
7654  error(yyloc, message);
7655  YYABORT;
7656  }
7657  logicVal = simuInfo->findLogicValue(logicValName);
7658  if(!logicVal)
7659  {
7660  std::string message = constructErrorMessage(
7661  "Logic Value %s not found",
7662  logicValName.c_str() );
7663  log("%s\n", message.c_str());
7665  __FUNCTION__, __FILE__, __LINE__ );
7666  e.saveContextData("Parser error message", message);
7667  e.saveContextData("Filename", yyloc.begin.filename);
7668  e.saveContextData("StartLine", yyloc.begin.line);
7669  e.saveContextData("EndLine", yyloc.end.line);
7671  error(yyloc, message);
7672  YYABORT;
7673  }
7674  else
7675  {
7676  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7679  logicMap->mLogicRef = logicValName;
7680  logicMap->mLibraryRef = libName;
7681  logicMap->mLogicMapType
7683  (yyval.logicValueAttributes)->addLogicMap(logicMap);
7684  }
7685  }
7686  break;
7687 
7688  case 579:
7689 
7690 /* Line 678 of lalr1.cc */
7691 #line 5890 "Parser.yy"
7692  {
7693  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7694  (yyval.logicValueAttributes)->setIsIsolated(true);
7695  }
7696  break;
7697 
7698  case 580:
7699 
7700 /* Line 678 of lalr1.cc */
7701 #line 5895 "Parser.yy"
7702  {
7703  (yyval.logicValueAttributes) = ((yysemantic_stack_[(2) - (1)].logicValueAttributes)) ? (yysemantic_stack_[(2) - (1)].logicValueAttributes) : new LogicValueAttributes();
7704  std::list< LogicValueSharedPtr > logicValues;
7705  boost::scoped_ptr<LogicListData> logicListData((yysemantic_stack_[(2) - (2)].logicListData));
7706  if(NULL != (yysemantic_stack_[(2) - (2)].logicListData) && !(yysemantic_stack_[(2) - (2)].logicListData)->mNameDataList.empty())
7707  {
7708  for( std::list<NameData *>::iterator it
7709  = logicListData->mNameDataList.begin();
7710  it != logicListData->mNameDataList.end(); it++ )
7711  {
7712  NameData *pNameData = *it;
7713  std::string name = pNameData->mName;
7715  LogicValueSharedPtr logicVal;
7716  SimulationInfoSharedPtr simuInfo
7717  = ctx->getCurrentSimulationInfo();
7718  logicVal = simuInfo->findLogicValue(name);
7719  if(!logicVal)
7720  {
7721  std::string message = constructErrorMessage(
7722  "Logic Value %s not found",
7723  name.c_str() );
7724  log("%s\n", message.c_str());
7726  __FUNCTION__, __FILE__, __LINE__ );
7727  e.saveContextData("Parser error message", message);
7728  e.saveContextData("Filename", yyloc.begin.filename);
7729  e.saveContextData("StartLine", yyloc.begin.line);
7730  e.saveContextData("EndLine", yyloc.end.line);
7732  error(yyloc, message);
7733  YYABORT;
7734  }
7735  else
7736  {
7737  if(!logicValues.empty())
7738  {
7739  std::list< LogicValueSharedPtr >::iterator logicIt
7740  = std::find(logicValues.begin(), logicValues.end(), logicVal);
7741  if(logicIt != logicValues.end())
7742  {
7743  std::string message = constructErrorMessage(
7744  "Logic value %s already exist in resolve list",
7745  name.c_str());
7746  log("%s\n", message.c_str());
7748  __FUNCTION__, __FILE__, __LINE__ );
7749  e.saveContextData("Parser error message", message);
7750  e.saveContextData("Filename", yyloc.begin.filename);
7751  e.saveContextData("StartLine", yyloc.begin.line);
7752  e.saveContextData("EndLine", yyloc.end.line);
7754  error(yyloc, message);
7755  YYABORT;
7756  }
7757  else
7758  {
7759  logicValues.push_back(logicVal);
7760  }
7761  }
7762  else
7763  {
7764  logicValues.push_back(logicVal);
7765  }
7766  }
7767  }
7768  (yyval.logicValueAttributes)->setResolvedLogicValues(logicValues);
7769  }
7770  }
7771  break;
7772 
7773  case 581:
7774 
7775 /* Line 678 of lalr1.cc */
7776 #line 5965 "Parser.yy"
7777  {
7778  (yyval.logicValueAttributes) = (yysemantic_stack_[(2) - (1)].logicValueAttributes);
7779  }
7780  break;
7781 
7782  case 582:
7783 
7784 /* Line 678 of lalr1.cc */
7785 #line 5969 "Parser.yy"
7786  {
7787  (yyval.logicValueAttributes) = (yysemantic_stack_[(2) - (1)].logicValueAttributes);
7789  LogicValueSharedPtr logicVal = ctx->getCurrentLogicValue();
7790  logicVal->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
7791  delete (yysemantic_stack_[(2) - (2)].stringVal);
7792  }
7793  break;
7794 
7795  case 583:
7796 
7797 /* Line 678 of lalr1.cc */
7798 #line 5977 "Parser.yy"
7799  {
7800  (yyval.logicValueAttributes) = (yysemantic_stack_[(2) - (1)].logicValueAttributes);
7802  LogicValueSharedPtr logicVal = ctx->getCurrentLogicValue();
7803  logicVal->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
7804  delete (yysemantic_stack_[(2) - (2)].stringVal);
7805  }
7806  break;
7807 
7808  case 584:
7809 
7810 /* Line 678 of lalr1.cc */
7811 #line 5987 "Parser.yy"
7812  {
7813  LogicElementSharedPtr logicElem;
7815  = inDriver.getContext();
7816  try
7817  {
7818  ctx->getFactory()->create(logicElem);
7819  logicElem->setType(LogicElement::eTypeWaveForm);
7820  }
7821  catch(Error &e)
7822  {
7823  std::string message = constructErrorMessage(
7824  "Unable to create logicWaveForm" );
7825  log("%s\n", message.c_str());
7826  e.setCurrentLocation( __FUNCTION__,
7827  __FILE__, __LINE__ );
7828  e.saveContextData("Parser error message", message);
7829  e.saveContextData("Filename", yyloc.begin.filename);
7830  e.saveContextData("StartLine", yyloc.begin.line);
7831  e.saveContextData("EndLine", yyloc.end.line);
7833  error(yyloc, message);
7834  YYABORT;
7835  }
7836  if(ctx->getLogicElementDepth() == 0 )
7837  {
7838  LogicalResponseSharedPtr logicalResponse
7839  = ctx->getCurrentLogicalResponse();
7840  if(logicalResponse)
7841  {
7842  logicalResponse->setLogicWaveForm(logicElem);
7843  }
7844 
7845  WaveValueSharedPtr waveValue
7846  = ctx->getCurrentWaveValue();
7847  if(waveValue)
7848  {
7849  waveValue->setLogicWaveform(logicElem);
7850  }
7851  }
7852  ctx->pushLogicElement(logicElem);
7853  ctx->incrementLogicElementDepth();
7854  }
7855  break;
7856 
7857  case 585:
7858 
7859 /* Line 678 of lalr1.cc */
7860 #line 6030 "Parser.yy"
7861  {
7863  LogicElementSharedPtr currentLogicElem
7864  = ctx->getCurrentLogicElement();
7865  ctx->popLogicElement();
7866  LogicElementSharedPtr parentLogicElem;
7867  if(ctx->getLogicElementDepth() > 1 )
7868  {
7869  parentLogicElem = ctx->getCurrentLogicElement();
7870  }
7871  ctx->decrementLogicElementDepth();
7872  if(parentLogicElem)
7873  {
7874  parentLogicElem->setRelationType(
7876  currentLogicElem->setRelationType(
7878  //Check size
7879  //size_t parentLogicElemSize = parentLogicElem->getSize();
7880  //size_t currentLogicElemSize = currentLogicElem->getSize();
7881 
7882  //log("Parent LogicWaveForm Size :: %d\n",
7883  // parentLogicElemSize);
7884  //log("Current LogicWaveForm Size :: %d\n",
7885  // currentLogicElemSize);
7886 
7887  //std::cout << "Parent LogicWaveForm Size :: " << parentLogicElemSize << std::endl;
7888  //std::cout << "Current LogicWaveForm Size :: " << currentLogicElemSize << std::endl;
7889 
7890  parentLogicElem->addChildLogicElement(currentLogicElem);
7891  }
7892  else
7893  {
7894  ctx->pushLogicElement(currentLogicElem);
7895  }
7896  }
7897  break;
7898 
7899  case 604:
7900 
7901 /* Line 678 of lalr1.cc */
7902 #line 6101 "Parser.yy"
7903  {
7904  (yyval.nameData) = (yysemantic_stack_[(6) - (3)].nameData);
7905  (yyval.nameData)->mIndices.push_back((yysemantic_stack_[(6) - (4)].integerVal));
7906  if((yysemantic_stack_[(6) - (5)].arrayDimensions))
7907  {
7908  (yyval.nameData)->mIndices.insert((yyval.nameData)->mIndices.end(),
7909  (yysemantic_stack_[(6) - (5)].arrayDimensions)->begin(), (yysemantic_stack_[(6) - (5)].arrayDimensions)->end() );
7910  delete (yysemantic_stack_[(6) - (5)].arrayDimensions);
7911  }
7912  }
7913  break;
7914 
7915  case 605:
7916 
7917 /* Line 678 of lalr1.cc */
7918 #line 6114 "Parser.yy"
7919  {
7920  (yyval.arrayDimensions) = NULL;
7921  }
7922  break;
7923 
7924  case 607:
7925 
7926 /* Line 678 of lalr1.cc */
7927 #line 6121 "Parser.yy"
7928  {
7929  if((yysemantic_stack_[(6) - (4)].integerVal));
7930  delete (yysemantic_stack_[(6) - (3)].nameData);
7931  }
7932  break;
7933 
7934  case 609:
7935 
7936 /* Line 678 of lalr1.cc */
7937 #line 6129 "Parser.yy"
7938  {
7939  delete (yysemantic_stack_[(1) - (1)].arrayDimensions);
7940  }
7941  break;
7942 
7943  case 610:
7944 
7945 /* Line 678 of lalr1.cc */
7946 #line 6135 "Parser.yy"
7947  {
7948  if(NULL == (yysemantic_stack_[(4) - (3)].valueData))
7949  {
7950  (yyval.valueData) = new ValueData();
7951  (yyval.valueData)->mValues.push_back( Value(
7953  }
7954  else
7955  {
7956  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
7957  }
7958  }
7959  break;
7960 
7961  case 611:
7962 
7963 /* Line 678 of lalr1.cc */
7964 #line 6150 "Parser.yy"
7965  {
7966  (yyval.valueData) = NULL;
7967  }
7968  break;
7969 
7970  case 612:
7971 
7972 /* Line 678 of lalr1.cc */
7973 #line 6154 "Parser.yy"
7974  {
7975  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
7976  (yyval.valueData)->mValues.push_back( Value(
7978  (yysemantic_stack_[(2) - (2)].valueData)->mValues[0].get<Value::MiNoMax>() ) );
7979  delete (yysemantic_stack_[(2) - (2)].valueData);
7980  }
7981  break;
7982 
7983  case 613:
7984 
7985 /* Line 678 of lalr1.cc */
7986 #line 6162 "Parser.yy"
7987  {
7988  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
7989  (yyval.valueData)->mValues.push_back( Value(
7991  (yysemantic_stack_[(2) - (2)].valueData)->mValues[0].get<Value::MiNoMax>() ) );
7992  delete (yysemantic_stack_[(2) - (2)].valueData);
7993  }
7994  break;
7995 
7996  case 614:
7997 
7998 /* Line 678 of lalr1.cc */
7999 #line 6170 "Parser.yy"
8000  {
8001  (yyval.valueData) = (yysemantic_stack_[(2) - (2)].valueData);
8002  if((yysemantic_stack_[(2) - (1)].valueData))
8003  {
8004  (yysemantic_stack_[(2) - (1)].valueData)->mValues.insert((yysemantic_stack_[(2) - (1)].valueData)->mValues.end(),
8005  (yyval.valueData)->mValues.begin(), (yyval.valueData)->mValues.end() );
8006  (yyval.valueData)->mValues = (yysemantic_stack_[(2) - (1)].valueData)->mValues;
8007  delete (yysemantic_stack_[(2) - (1)].valueData);
8008  }
8009  }
8010  break;
8011 
8012  case 615:
8013 
8014 /* Line 678 of lalr1.cc */
8015 #line 6183 "Parser.yy"
8016  {
8017  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
8018  }
8019  break;
8020 
8021  case 616:
8022 
8023 /* Line 678 of lalr1.cc */
8024 #line 6189 "Parser.yy"
8025  {
8026  (yyval.valueData) = (yysemantic_stack_[(1) - (1)].valueData);
8027  }
8028  break;
8029 
8030  case 617:
8031 
8032 /* Line 678 of lalr1.cc */
8033 #line 6193 "Parser.yy"
8034  {
8035  (yyval.valueData) = (yysemantic_stack_[(2) - (1)].valueData);
8036  }
8037  break;
8038 
8039  case 618:
8040 
8041 /* Line 678 of lalr1.cc */
8042 #line 6199 "Parser.yy"
8043  {
8044  (yyval.valueData) = (yysemantic_stack_[(1) - (1)].valueData);
8045  }
8046  break;
8047 
8048  case 619:
8049 
8050 /* Line 678 of lalr1.cc */
8051 #line 6203 "Parser.yy"
8052  {
8053  Value::MiNoMax val;
8054  Value::Number num((yysemantic_stack_[(1) - (1)].pairData)->mX, (yysemantic_stack_[(1) - (1)].pairData)->mY);
8055  val.setNominal(num);
8056  (yyval.valueData) = new ValueData();
8057  (yyval.valueData)->mValues.push_back(
8059  delete (yysemantic_stack_[(1) - (1)].pairData);
8060  }
8061  break;
8062 
8063  case 620:
8064 
8065 /* Line 678 of lalr1.cc */
8066 #line 6215 "Parser.yy"
8067  {
8068  Value::MiNoMax val;
8069  if((yysemantic_stack_[(6) - (3)].pairData))
8070  {
8071  Value::Number num((yysemantic_stack_[(6) - (3)].pairData)->mX, (yysemantic_stack_[(6) - (3)].pairData)->mY);
8072  val.setMin(num);
8073  }
8074  if((yysemantic_stack_[(6) - (4)].pairData))
8075  {
8076  Value::Number num((yysemantic_stack_[(6) - (4)].pairData)->mX, (yysemantic_stack_[(6) - (4)].pairData)->mY);
8077  val.setNominal(num);
8078  }
8079  if((yysemantic_stack_[(6) - (5)].pairData))
8080  {
8081  Value::Number num((yysemantic_stack_[(6) - (5)].pairData)->mX, (yysemantic_stack_[(6) - (5)].pairData)->mY);
8082  val.setMax(num);
8083  }
8084  (yyval.valueData) = new ValueData();
8085  (yyval.valueData)->mValues.push_back(
8087  delete (yysemantic_stack_[(6) - (3)].pairData);
8088  delete (yysemantic_stack_[(6) - (4)].pairData);
8089  delete (yysemantic_stack_[(6) - (5)].pairData);
8090  }
8091  break;
8092 
8093  case 621:
8094 
8095 /* Line 678 of lalr1.cc */
8096 #line 6242 "Parser.yy"
8097  {
8098  (yyval.pairData) = (yysemantic_stack_[(1) - (1)].pairData);
8099  }
8100  break;
8101 
8102  case 622:
8103 
8104 /* Line 678 of lalr1.cc */
8105 #line 6246 "Parser.yy"
8106  {
8107  (yyval.pairData) = NULL;
8108  }
8109  break;
8110 
8111  case 623:
8112 
8113 /* Line 678 of lalr1.cc */
8114 #line 6250 "Parser.yy"
8115  {
8116  (yyval.pairData) = NULL;
8117  }
8118  break;
8119 
8120  case 627:
8121 
8122 /* Line 678 of lalr1.cc */
8123 #line 6263 "Parser.yy"
8124  {
8125  InterfaceJoinedInfoSharedPtr joinedInfo;
8127  = inDriver.getContext();
8128  try
8129  {
8130  ctx->getFactory()->create(joinedInfo);
8131  joinedInfo->setJoinedType(
8133  }
8134  catch(Error &e)
8135  {
8136  std::string message = constructErrorMessage(
8137  "Unable to create must joined info" );
8138  log("%s\n", message.c_str());
8139  e.setCurrentLocation( __FUNCTION__,
8140  __FILE__, __LINE__ );
8141  e.saveContextData("Parser error message", message);
8142  e.saveContextData("Filename", yyloc.begin.filename);
8143  e.saveContextData("StartLine", yyloc.begin.line);
8144  e.saveContextData("EndLine", yyloc.end.line);
8146  error(yyloc, message);
8147  YYABORT;
8148  }
8149  if(ctx->getInterfaceJoinedInfoDepth() == 0 )
8150  {
8151  ctx->getCurrentView()->addInterfaceJoinedInfo(joinedInfo);
8152  }
8153  ctx->pushInterfaceJoinedInfo(joinedInfo);
8154  ctx->incrementInterfaceJoinedInfoDepth();
8155  }
8156  break;
8157 
8158  case 628:
8159 
8160 /* Line 678 of lalr1.cc */
8161 #line 6295 "Parser.yy"
8162  {
8164  InterfaceJoinedInfoSharedPtr currentJoinedInfo
8165  = ctx->getCurrentInterfaceJoinedInfo();
8166  ctx->popInterfaceJoinedInfo();
8167  InterfaceJoinedInfoSharedPtr parentJoinedInfo;
8168  if(ctx->getInterfaceJoinedInfoDepth() > 1 )
8169  {
8170  parentJoinedInfo = ctx->getCurrentInterfaceJoinedInfo();
8171  }
8172  ctx->decrementInterfaceJoinedInfoDepth();
8173  if(parentJoinedInfo)
8174  {
8175  parentJoinedInfo->setRelationType(
8177  currentJoinedInfo->setRelationType(
8179  //Check size
8180  size_t parentJoinedInfoSize = parentJoinedInfo->getSize();
8181  size_t currentJoinedInfoSize = currentJoinedInfo->getSize();
8182 
8183  log("Parent joined info Size :: %d\n",
8184  parentJoinedInfoSize );
8185  log("Current joined info Size :: %d\n",
8186  currentJoinedInfoSize );
8187 
8188  //std::cout << "Parent joined info Size :: " << parentJoinedInfoSize << std::endl;
8189  //std::cout << "Current joined info Size :: " << currentJoinedInfoSize << std::endl;
8190 
8191  std::vector< InterfaceJoinedInfoSharedPtr > outJoinedInfos;
8192  parentJoinedInfo->getChildren(outJoinedInfos);
8193 
8194  std::list< PortSharedPtr > outPorts;
8195  parentJoinedInfo->getPorts(outPorts);
8196 
8197  std::list< PortListSharedPtr > outPortLists;
8198  parentJoinedInfo->getPortLists(outPortLists);
8199 
8200  if(parentJoinedInfoSize != 0)
8201  {
8202  if( parentJoinedInfoSize
8203  == currentJoinedInfoSize )
8204  {
8205  parentJoinedInfo->addChildJoinedInfo(
8206  currentJoinedInfo );
8207  }
8208  else
8209  {
8210  std::string message = constructErrorMessage(
8211  "Child joined info can't be added, port size mismatch %d with %d",
8212  parentJoinedInfoSize,
8213  currentJoinedInfoSize);
8214  log("%s\n", message.c_str());
8216  __FUNCTION__, __FILE__, __LINE__ );
8217  e.saveContextData("Parser error message", message);
8218  e.saveContextData("Filename", yyloc.begin.filename);
8219  e.saveContextData("StartLine", yyloc.begin.line);
8220  e.saveContextData("EndLine", yyloc.end.line);
8222  error(yyloc, message);
8223  YYABORT;
8224  }
8225  }
8226  else
8227  {
8228  parentJoinedInfo->addChildJoinedInfo(
8229  currentJoinedInfo );
8230  }
8231  }
8232  else
8233  {
8234  ctx->pushInterfaceJoinedInfo(currentJoinedInfo);
8235  }
8236  }
8237  break;
8238 
8239  case 630:
8240 
8241 /* Line 678 of lalr1.cc */
8242 #line 6374 "Parser.yy"
8243  {
8244  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(2) - (2)].portRefData));
8245  NameData *portNameData = portData->mPortName;
8246  std::string name = portNameData->mName;
8248  = inDriver.getContext();
8249  ViewSharedPtr view = ctx->getCurrentView();
8250 
8251  PortRefData *currPortRef = (yysemantic_stack_[(2) - (2)].portRefData);
8252  PortRefData *nextPortRef = portData->mParentPort;
8253  std::vector< std::string > nestedNames;
8254  nestedNames.push_back(currPortRef->mPortName->mName);
8255  while(nextPortRef)
8256  {
8257  currPortRef = nextPortRef;
8258  nestedNames.push_back(nextPortRef->mPortName->mName);
8259  nextPortRef = currPortRef->mParentPort;
8260  }
8261  bool isPort = (NULL == currPortRef->mInstanceName);
8262  std::string topName = *(nestedNames.rbegin());
8263  if(isPort)
8264  {
8265  PortSharedPtr port = view->findPort(topName);
8266  if(!port)
8267  {
8268  std::string message = constructErrorMessage(
8269  "No port %s found in view %s\n",
8270  name.c_str(),
8271  view->getName().c_str());
8272  log("%s\n", message.c_str());
8274  __FUNCTION__, __FILE__, __LINE__ );
8275  e.saveContextData("Parser error message", message);
8276  e.saveContextData("Filename", yyloc.begin.filename);
8277  e.saveContextData("StartLine", yyloc.begin.line);
8278  e.saveContextData("EndLine", yyloc.end.line);
8280  error(yyloc, message);
8281  YYABORT;
8282  }
8283 
8284  InterfaceJoinedInfoSharedPtr currentJoinedInfo
8285  = ctx->getCurrentInterfaceJoinedInfo();
8286  try
8287  {
8288  connectibleFinder(nestedNames, port);
8289  if(!portData->mPortName->mIndices.empty())
8290  {
8291  port = port->get(portData->mPortName->mIndices);
8292  }
8293  //Check port size
8294  std::list< PortSharedPtr > outPorts;
8295  currentJoinedInfo->getPorts(outPorts);
8296 
8297  if(!outPorts.empty())
8298  {
8299  PortSharedPtr firstPort = outPorts.front();
8300  std::list< PortSharedPtr >::iterator it
8301  = std::find(outPorts.begin(), outPorts.end(),
8302  port);
8303  if(it != outPorts.end())
8304  {
8305  std::string message = constructErrorMessage(
8306  "Port %s already exist in mustJoin info",
8307  port->getName().c_str() );
8308  log("%s\n", message.c_str());
8310  __FUNCTION__, __FILE__, __LINE__ );
8311  e.saveContextData("Parser error message", message);
8312  e.saveContextData("Filename", yyloc.begin.filename);
8313  e.saveContextData("StartLine", yyloc.begin.line);
8314  e.saveContextData("EndLine", yyloc.end.line);
8316  error(yyloc, message);
8317  YYABORT;
8318  }
8319  else
8320  {
8321  if(firstPort->getSize() == port->getSize())
8322  {
8323  currentJoinedInfo->addPort(port);
8324  }
8325  else
8326  {
8327  std::string message = constructErrorMessage(
8328  "Port %s can't be added, port size mismatch %d with %d",
8329  name.c_str(),
8330  firstPort->getSize(),
8331  port->getSize());
8332  log("%s\n", message.c_str());
8334  __FUNCTION__, __FILE__, __LINE__ );
8335  e.saveContextData("Parser error message", message);
8336  e.saveContextData("Filename", yyloc.begin.filename);
8337  e.saveContextData("StartLine", yyloc.begin.line);
8338  e.saveContextData("EndLine", yyloc.end.line);
8340  error(yyloc, message);
8341  YYABORT;
8342  }
8343  }
8344  }
8345  else
8346  {
8347  currentJoinedInfo->addPort(port);
8348  }
8349  }
8350  catch(Error &e)
8351  {
8353  __FUNCTION__, __FILE__, __LINE__ );
8354  throw;
8355  }
8356  }
8357  else
8358  {
8359  }
8360  }
8361  break;
8362 
8363  case 631:
8364 
8365 /* Line 678 of lalr1.cc */
8366 #line 6493 "Parser.yy"
8367  {
8368  if(NULL != (yysemantic_stack_[(2) - (2)].portListData) && !(yysemantic_stack_[(2) - (2)].portListData)->mPortRefs.empty())
8369  {
8370  boost::scoped_ptr<PortListData> portListData((yysemantic_stack_[(2) - (2)].portListData));
8371  std::string message;
8372 
8374  PortListSharedPtr portList;
8375  ctx->getFactory()->create(portList);
8376 
8377  InterfaceJoinedInfoSharedPtr currentJoinedInfo
8378  = ctx->getCurrentInterfaceJoinedInfo();
8379 
8380  for( std::vector<PortRefData *>::iterator it
8381  = portListData->mPortRefs.begin();
8382  it != portListData->mPortRefs.end(); ++it )
8383  {
8384  PortRefData *portData = *it;
8385  std::vector< std::string > nestedNames;
8386  PortRefData *currPortRef = *it;
8387  PortRefData *nextPortRef = portData->mParentPort;
8388  nestedNames.push_back(currPortRef->mPortName->mName);
8389  while(nextPortRef)
8390  {
8391  currPortRef = nextPortRef;
8392  nestedNames.push_back(nextPortRef->mPortName->mName);
8393  nextPortRef = currPortRef->mParentPort;
8394  }
8395  bool isPort = (NULL == currPortRef->mInstanceName);
8396  NameData *portNameData = currPortRef->mPortName;
8397  std::string topName = *(nestedNames.rbegin());
8398  ViewSharedPtr view = ctx->getCurrentView();
8399  if(isPort)
8400  {
8401  PortSharedPtr port = view->findPort(topName);
8402  if(!port)
8403  {
8404  std::string message = constructErrorMessage(
8405  "No port %s found in view %s\n",
8406  portNameData->mName.c_str(),
8407  view->getName().c_str());
8408  log("%s\n", message.c_str());
8410  __FUNCTION__, __FILE__, __LINE__ );
8411  e.saveContextData("Parser error message", message);
8412  e.saveContextData("Filename", yyloc.begin.filename);
8413  e.saveContextData("StartLine", yyloc.begin.line);
8414  e.saveContextData("EndLine", yyloc.end.line);
8416  error(yyloc, message);
8417  YYABORT;
8418  }
8419 
8420  try
8421  {
8422  connectibleFinder(nestedNames, port);
8423  if(!portData->mPortName->mIndices.empty())
8424  {
8425  port = port->get(portData->mPortName->mIndices);
8426  }
8427  portList->addChildPort(port);
8428  }
8429  catch(Error &e)
8430  {
8431  std::string message = constructErrorMessage(
8432  "Unable to connect port : %s",
8433  port->getName().c_str());
8434  log("%s\n", message.c_str());
8435  e.setCurrentLocation( __FUNCTION__,
8436  __FILE__, __LINE__ );
8437  e.saveContextData("Parser error message", message);
8438  e.saveContextData("Filename", yyloc.begin.filename);
8439  e.saveContextData("StartLine", yyloc.begin.line);
8440  e.saveContextData("EndLine", yyloc.end.line);
8442  error(yyloc, message);
8443  YYABORT;
8444  }
8445  }
8446  else
8447  {
8448  }
8449  }
8450  if(currentJoinedInfo->getSize() == portList->getSize())
8451  {
8452  currentJoinedInfo->addPortList(portList);
8453  }
8454  else
8455  {
8456  std::string message = constructErrorMessage(
8457  "Port size mismatch %d with %d",
8458  currentJoinedInfo->getSize(),
8459  portList->getSize());
8460  log("%s\n", message.c_str());
8462  __FUNCTION__, __FILE__, __LINE__ );
8463  e.saveContextData("Parser error message", message);
8464  e.saveContextData("Filename", yyloc.begin.filename);
8465  e.saveContextData("StartLine", yyloc.begin.line);
8466  e.saveContextData("EndLine", yyloc.end.line);
8468  error(yyloc, message);
8469  YYABORT;
8470  }
8471  }
8472  }
8473  break;
8474 
8475  case 634:
8476 
8477 /* Line 678 of lalr1.cc */
8478 #line 6604 "Parser.yy"
8479  {
8480  (yyval.nameData) = (yysemantic_stack_[(4) - (3)].nameData);
8481  }
8482  break;
8483 
8484  case 635:
8485 
8486 /* Line 678 of lalr1.cc */
8487 #line 6610 "Parser.yy"
8488  {
8489  (yyval.nameData) = new NameData();
8490  (yyval.nameData)->mName = *(yysemantic_stack_[(1) - (1)].stringVal);
8491  delete (yysemantic_stack_[(1) - (1)].stringVal);
8492  }
8493  break;
8494 
8495  case 637:
8496 
8497 /* Line 678 of lalr1.cc */
8498 #line 6619 "Parser.yy"
8499  {
8500  delete (yysemantic_stack_[(1) - (1)].stringVal);
8501  }
8502  break;
8503 
8504  case 638:
8505 
8506 /* Line 678 of lalr1.cc */
8507 #line 6623 "Parser.yy"
8508  {
8509  delete (yysemantic_stack_[(1) - (1)].nameData);
8510  }
8511  break;
8512 
8513  case 639:
8514 
8515 /* Line 678 of lalr1.cc */
8516 #line 6627 "Parser.yy"
8517  {
8518  delete (yysemantic_stack_[(1) - (1)].nameData);
8519  }
8520  break;
8521 
8522  case 640:
8523 
8524 /* Line 678 of lalr1.cc */
8525 #line 6633 "Parser.yy"
8526  {
8527  (yyval.nameData) = new NameData();
8528  (yyval.nameData)->mName = *(yysemantic_stack_[(1) - (1)].stringVal);
8529  delete (yysemantic_stack_[(1) - (1)].stringVal);
8530  }
8531  break;
8532 
8533  case 641:
8534 
8535 /* Line 678 of lalr1.cc */
8536 #line 6639 "Parser.yy"
8537  {
8538  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
8539  }
8540  break;
8541 
8542  case 642:
8543 
8544 /* Line 678 of lalr1.cc */
8545 #line 6643 "Parser.yy"
8546  {
8547  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
8548  }
8549  break;
8550 
8551  case 643:
8552 
8553 /* Line 678 of lalr1.cc */
8554 #line 6649 "Parser.yy"
8555  {
8556  (yyval.nameData) = new NameData();
8557  (yyval.nameData)->mName = *(yysemantic_stack_[(1) - (1)].stringVal);
8558  delete (yysemantic_stack_[(1) - (1)].stringVal);
8559  }
8560  break;
8561 
8562  case 644:
8563 
8564 /* Line 678 of lalr1.cc */
8565 #line 6655 "Parser.yy"
8566  {
8567  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
8568  }
8569  break;
8570 
8571  case 645:
8572 
8573 /* Line 678 of lalr1.cc */
8574 #line 6661 "Parser.yy"
8575  {
8576  (yyval.nameData) = new NameData();
8577  (yyval.nameData)->mName = *(yysemantic_stack_[(1) - (1)].stringVal);
8578  delete (yysemantic_stack_[(1) - (1)].stringVal);
8579  }
8580  break;
8581 
8582  case 646:
8583 
8584 /* Line 678 of lalr1.cc */
8585 #line 6667 "Parser.yy"
8586  {
8587  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
8588  }
8589  break;
8590 
8591  case 647:
8592 
8593 /* Line 678 of lalr1.cc */
8594 #line 6673 "Parser.yy"
8595  {
8596  boost::scoped_ptr<NameData> pNameData((yysemantic_stack_[(3) - (3)].nameData));
8597  std::string name = pNameData->mName;
8599  NetSharedPtr net;
8600  ViewSharedPtr view = ctx->getCurrentView();
8601  NetBundleSharedPtr bundle
8602  = ctx->getCurrentNetBundleContext();
8603  bool bExistingNetFound = false;
8604  if(bundle)
8605  {
8606  typedef std::vector<NetSharedPtr > NBList;
8607  NBList children;
8608  bundle->getChildren(children);
8609  for(NBList::iterator it = children.begin();
8610  it != children.end(); it++ )
8611  {
8612  if((*it)->getName() == name)
8613  {
8614  bExistingNetFound = true;
8615  }
8616  }
8617  }
8618  else
8619  {
8620  net = view->findNet(name);
8621  bExistingNetFound = false;
8622  }
8623  if(bExistingNetFound)
8624  {
8625  std::string message = constructErrorMessage(
8626  "View %s already contains a net of name %s\n",
8627  view->getName().c_str(),
8628  net->getName().c_str() );
8629  log("%s\n", message.c_str());
8631  __FUNCTION__, __FILE__, __LINE__ );
8632  e.saveContextData("Parser error message", message);
8633  e.saveContextData("Filename", yyloc.begin.filename);
8634  e.saveContextData("StartLine", yyloc.begin.line);
8635  e.saveContextData("EndLine", yyloc.end.line);
8637  error(yyloc, message);
8638  YYABORT;
8639  }
8640  else
8641  {
8642  if(!pNameData->mIndices.empty())
8643  {
8644  try
8645  {
8646  VectorNetSharedPtr vectorNet;
8647  ctx->getFactory()->create(vectorNet);
8648  vectorNet->setName(name);
8649  vectorNet->constructChildren(
8650  ctx->getFactory(),
8651  pNameData->mIndices );
8652  net = vectorNet;
8653  }
8654  catch(Error &e)
8655  {
8656  std::string message = constructErrorMessage(
8657  "Unable to create net : %s",
8658  net->getName().c_str());
8659  log("%s\n", message.c_str());
8660  e.setCurrentLocation( __FUNCTION__,
8661  __FILE__, __LINE__ );
8662  e.saveContextData("Parser error message", message);
8663  e.saveContextData("Filename", yyloc.begin.filename);
8664  e.saveContextData("StartLine", yyloc.begin.line);
8665  e.saveContextData("EndLine", yyloc.end.line);
8667  error(yyloc, message);
8668  YYABORT;
8669  }
8670  }
8671  else
8672  {
8673  try
8674  {
8675  ScalarNetSharedPtr scalarNet;
8676  ctx->getFactory()->create(scalarNet);
8677  net = scalarNet;
8678  net->setName(name);
8679  }
8680  catch(Error &e)
8681  {
8682  std::string message = constructErrorMessage(
8683  "Unable to create net : %s",
8684  net->getName().c_str());
8685  log("%s\n", message.c_str());
8686  e.setCurrentLocation( __FUNCTION__,
8687  __FILE__, __LINE__ );
8688  e.saveContextData("Parser error message", message);
8689  e.saveContextData("Filename", yyloc.begin.filename);
8690  e.saveContextData("StartLine", yyloc.begin.line);
8691  e.saveContextData("EndLine", yyloc.end.line);
8693  error(yyloc, message);
8694  YYABORT;
8695  }
8696  }
8697  if(!pNameData->mOriginalName.empty())
8698  {
8699  net->setOriginalName(
8700  pNameData->mOriginalName );
8701  }
8702 #if 0
8703  if(bundle)
8704  {
8705  net->setParentCollection(bundle);
8706  bundle->addChild(net);
8707  log("Added net to existing bundle\n");
8708  }
8709  else
8710  {
8711  ctx->pushCurrentNet(net);
8712  NetSharedPtr currentNet = ctx->getCurrentNet();
8713  ctx->popCurrentNet();
8714 
8715  NetSharedPtr parentNet = ctx->getCurrentNet();
8716  if(parentNet)
8717  {
8718  parentNet->addSubnet(currentNet);
8719  printf("Current net %s ",
8720  net->getName().c_str() );
8721  }
8722  else
8723  {
8724  view->addNet(net);
8725  net->setParent(view);
8726  }
8727  }
8728 #endif
8729  if(pNameData->mIndices.empty())
8730  {
8731  log("Created scalar net %s ",
8732  net->getName().c_str() );
8733  }
8734  else
8735  {
8736  log("Created vector net %s with dimensions ",
8737  net->getName().c_str() );
8738  for( std::vector<size_t>::const_iterator it
8739  = pNameData->mIndices.begin();
8740  it != pNameData->mIndices.end(); ++it )
8741  {
8742  log("%lu ", *it );
8743  }
8744  }
8745  log("\n");
8746  }
8747  ctx->pushCurrentNet(net);
8748  ctx->pushPropertyContainer(net);
8749  }
8750  break;
8751 
8752  case 648:
8753 
8754 /* Line 678 of lalr1.cc */
8755 #line 6828 "Parser.yy"
8756  {
8758  ViewSharedPtr view = ctx->getCurrentView();
8759  NetSharedPtr currentNet = ctx->getCurrentNet();
8760  if((yysemantic_stack_[(7) - (6)].netAttributes))
8761  {
8762  NetAttributesSharedPtr attrib((yysemantic_stack_[(7) - (6)].netAttributes));
8763  currentNet->setAttributes(attrib);
8764  }
8765  ctx->popCurrentNet();
8766  NetSharedPtr parentNet = ctx->getCurrentNet();
8767 
8768  NetBundleSharedPtr bundle
8769  = ctx->getCurrentNetBundleContext();
8770  if(bundle)
8771  {
8772  if(parentNet)
8773  {
8774  parentNet->addSubnet(currentNet);
8775  }
8776  else
8777  {
8778  currentNet->setParentCollection(bundle);
8779  bundle->addChild(currentNet);
8780  }
8781  log("Added net to existing bundle\n");
8782  }
8783  else
8784  {
8785  if(parentNet)
8786  {
8787  parentNet->addSubnet(currentNet);
8788  }
8789  else
8790  {
8791  view->addNet(currentNet);
8792  currentNet->setParent(view);
8793  }
8794  }
8795  inDriver.getContext()->popPropertyContainer();
8796  }
8797  break;
8798 
8799  case 649:
8800 
8801 /* Line 678 of lalr1.cc */
8802 #line 6872 "Parser.yy"
8803  {
8804  (yyval.netAttributes) = NULL;
8805  }
8806  break;
8807 
8808  case 650:
8809 
8810 /* Line 678 of lalr1.cc */
8811 #line 6876 "Parser.yy"
8812  {
8813  (yyval.netAttributes) = ((yysemantic_stack_[(2) - (1)].netAttributes))?(yysemantic_stack_[(2) - (1)].netAttributes):new NetAttributes();
8814  (yyval.netAttributes)->setCriticality((yysemantic_stack_[(2) - (2)].integerVal));
8815  }
8816  break;
8817 
8818  case 651:
8819 
8820 /* Line 678 of lalr1.cc */
8821 #line 6881 "Parser.yy"
8822  {
8823  boost::scoped_ptr<NetDelay> netDelay((yysemantic_stack_[(2) - (2)].netDelay));
8824  (yyval.netAttributes) = ((yysemantic_stack_[(2) - (1)].netAttributes))?(yysemantic_stack_[(2) - (1)].netAttributes):new NetAttributes();
8825  (yyval.netAttributes)->setNetDelay(*netDelay);
8826  }
8827  break;
8828 
8829  case 652:
8830 
8831 /* Line 678 of lalr1.cc */
8832 #line 6887 "Parser.yy"
8833  {
8834  (yyval.netAttributes) = (yysemantic_stack_[(2) - (1)].netAttributes);
8835  }
8836  break;
8837 
8838  case 653:
8839 
8840 /* Line 678 of lalr1.cc */
8841 #line 6891 "Parser.yy"
8842  {
8843  (yyval.netAttributes) = (yysemantic_stack_[(2) - (1)].netAttributes);
8844  }
8845  break;
8846 
8847  case 654:
8848 
8849 /* Line 678 of lalr1.cc */
8850 #line 6895 "Parser.yy"
8851  {
8852  (yyval.netAttributes) = (yysemantic_stack_[(2) - (1)].netAttributes);
8853  }
8854  break;
8855 
8856  case 655:
8857 
8858 /* Line 678 of lalr1.cc */
8859 #line 6899 "Parser.yy"
8860  {
8861  (yyval.netAttributes) = (yysemantic_stack_[(2) - (1)].netAttributes);
8862  }
8863  break;
8864 
8865  case 656:
8866 
8867 /* Line 678 of lalr1.cc */
8868 #line 6903 "Parser.yy"
8869  {
8870  (yyval.netAttributes) = (yysemantic_stack_[(2) - (1)].netAttributes);
8871  }
8872  break;
8873 
8874  case 657:
8875 
8876 /* Line 678 of lalr1.cc */
8877 #line 6907 "Parser.yy"
8878  {
8879  (yyval.netAttributes) = (yysemantic_stack_[(2) - (1)].netAttributes);
8881  NetSharedPtr net = ctx->getCurrentNet();
8882  net->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
8883  delete (yysemantic_stack_[(2) - (2)].stringVal);
8884  }
8885  break;
8886 
8887  case 658:
8888 
8889 /* Line 678 of lalr1.cc */
8890 #line 6915 "Parser.yy"
8891  {
8892  (yyval.netAttributes) = (yysemantic_stack_[(2) - (1)].netAttributes);
8894  NetSharedPtr net = ctx->getCurrentNet();
8895  net->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
8896  delete (yysemantic_stack_[(2) - (2)].stringVal);
8897  }
8898  break;
8899 
8900  case 661:
8901 
8902 /* Line 678 of lalr1.cc */
8903 #line 6929 "Parser.yy"
8904  {
8905  if((yysemantic_stack_[(2) - (2)].netDelay));
8906  }
8907  break;
8908 
8909  case 662:
8910 
8911 /* Line 678 of lalr1.cc */
8912 #line 6933 "Parser.yy"
8913  {
8914  if((yysemantic_stack_[(2) - (2)].integerVal));
8915  }
8916  break;
8917 
8918  case 664:
8919 
8920 /* Line 678 of lalr1.cc */
8921 #line 6938 "Parser.yy"
8922  {
8923  delete (yysemantic_stack_[(2) - (2)].stringVal);
8924  }
8925  break;
8926 
8927  case 665:
8928 
8929 /* Line 678 of lalr1.cc */
8930 #line 6944 "Parser.yy"
8931  {
8932  boost::scoped_ptr<NameData> pNameData((yysemantic_stack_[(3) - (3)].nameData));
8933  std::string name = pNameData->mName;
8935  = inDriver.getContext();
8936  NetSharedPtr net;
8937  ViewSharedPtr view = ctx->getCurrentView();
8938  NetBundleSharedPtr bundle
8939  = ctx->getCurrentNetBundleContext();
8940  if(bundle)
8941  {
8942  typedef std::vector<NetSharedPtr > NBList;
8943  NBList children;
8944  bundle->getChildren(children);
8945  for(NBList::iterator it = children.begin();
8946  it != children.end(); it++ )
8947  {
8948  if((*it)->getName() == name)
8949  {
8950  net = *it;
8951  }
8952  }
8953  }
8954  else
8955  {
8956  net = view->findNet(name);
8957  }
8958  if(net)
8959  {
8960  log("Found existing net\n");
8961  std::string message = constructErrorMessage(
8962  "View %s already contains a net of name %s\n",
8963  view->getName().c_str(),
8964  net->getName().c_str() );
8966  __FUNCTION__, __FILE__, __LINE__ );
8967  e.saveContextData("Parser error message", message);
8968  e.saveContextData("Filename", yyloc.begin.filename);
8969  e.saveContextData("StartLine", yyloc.begin.line);
8970  e.saveContextData("EndLine", yyloc.end.line);
8972  error(yyloc, message);
8973  YYABORT;
8974  }
8975  else
8976  {
8977  try
8978  {
8979  NetBundleSharedPtr netBundle;
8980  ctx->getFactory()->create(netBundle);
8981  ctx->pushNetBundleContext(netBundle);
8982  net = netBundle;
8983  }
8984  catch(Error &e)
8985  {
8986  std::string message = constructErrorMessage(
8987  "Unable to create net bundle : %s",
8988  net->getName().c_str());
8989  log("%s\n", message.c_str());
8990  e.setCurrentLocation( __FUNCTION__,
8991  __FILE__, __LINE__ );
8992  e.saveContextData("Parser error message", message);
8993  e.saveContextData("Filename", yyloc.begin.filename);
8994  e.saveContextData("StartLine", yyloc.begin.line);
8995  e.saveContextData("EndLine", yyloc.end.line);
8997  error(yyloc, message);
8998  YYABORT;
8999  }
9000  net->setName(name);
9001  net->setParent(view);
9002  if(!pNameData->mOriginalName.empty())
9003  {
9004  net->setOriginalName(pNameData->mOriginalName);
9005  }
9006  if(bundle)
9007  {
9008  net->setParentCollection(bundle);
9009  bundle->addChild(net);
9010  log("Added net to existing bundle\n");
9011  }
9012  else
9013  {
9014  view->addNet(net);
9015  }
9016  log( "Created net bundle %s\n",
9017  net->getName().c_str() );
9018  }
9019  //ctx->pushCurrentNet(net);
9020  }
9021  break;
9022 
9023  case 666:
9024 
9025 /* Line 678 of lalr1.cc */
9026 #line 7034 "Parser.yy"
9027  {
9029  = inDriver.getContext();
9030  //ctx->popCurrentNet();
9031  ctx->popNetBundleContext();
9032  }
9033  break;
9034 
9035  case 671:
9036 
9037 /* Line 678 of lalr1.cc */
9038 #line 7047 "Parser.yy"
9039  {
9041  NetBundleSharedPtr bundle
9042  = ctx->getCurrentNetBundleContext();
9043  bundle->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
9044  delete (yysemantic_stack_[(2) - (2)].stringVal);
9045  }
9046  break;
9047 
9048  case 672:
9049 
9050 /* Line 678 of lalr1.cc */
9051 #line 7055 "Parser.yy"
9052  {
9054  NetBundleSharedPtr bundle
9055  = ctx->getCurrentNetBundleContext();
9056  bundle->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
9057  delete (yysemantic_stack_[(2) - (2)].stringVal);
9058  }
9059  break;
9060 
9061  case 673:
9062 
9063 /* Line 678 of lalr1.cc */
9064 #line 7065 "Parser.yy"
9065  {
9066  (yyval.netDelay) = (yysemantic_stack_[(5) - (4)].netDelay);
9067  (yyval.netDelay)->setDerivation(
9068  static_cast<Derivation>((yysemantic_stack_[(5) - (3)].integerVal)) );
9069  }
9070  break;
9071 
9072  case 674:
9073 
9074 /* Line 678 of lalr1.cc */
9075 #line 7074 "Parser.yy"
9076  {
9077  (yyval.netDelay) = (yysemantic_stack_[(1) - (1)].netDelay);
9078  }
9079  break;
9080 
9081  case 675:
9082 
9083 /* Line 678 of lalr1.cc */
9084 #line 7078 "Parser.yy"
9085  {
9086  (yyval.netDelay) = ((yysemantic_stack_[(2) - (1)].netDelay)) ? (yysemantic_stack_[(2) - (1)].netDelay) : new NetDelay();
9088  = inDriver.getContext();
9089  LogicElementSharedPtr logicElem
9090  = ctx->getCurrentLogicElement();
9091  if(logicElem)
9092  {
9093  (yyval.netDelay)->setTransition(logicElem);
9094  }
9095  }
9096  break;
9097 
9098  case 676:
9099 
9100 /* Line 678 of lalr1.cc */
9101 #line 7090 "Parser.yy"
9102  {
9103  (yyval.netDelay) = ((yysemantic_stack_[(2) - (1)].netDelay)) ? (yysemantic_stack_[(2) - (1)].netDelay) : new NetDelay();
9105  = inDriver.getContext();
9106  LogicElementSharedPtr logicElem
9107  = ctx->getCurrentLogicElement();
9108  if(logicElem)
9109  {
9110  (yyval.netDelay)->setTransition(logicElem);
9111  }
9112  }
9113  break;
9114 
9115  case 677:
9116 
9117 /* Line 678 of lalr1.cc */
9118 #line 7104 "Parser.yy"
9119  {
9120  (yyval.netDelay) = (yysemantic_stack_[(4) - (3)].netDelay);
9121  }
9122  break;
9123 
9124  case 678:
9125 
9126 /* Line 678 of lalr1.cc */
9127 #line 7110 "Parser.yy"
9128  {
9129  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(1) - (1)].valueData));
9130  (yyval.netDelay) = new NetDelay();
9131  (yyval.netDelay)->setDelay(data->mValues[0].get<Value::MiNoMax>());
9132  }
9133  break;
9134 
9135  case 679:
9136 
9137 /* Line 678 of lalr1.cc */
9138 #line 7116 "Parser.yy"
9139  {
9140  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(1) - (1)].valueData));
9141  (yyval.netDelay) = new NetDelay();
9142  (yyval.netDelay)->setDelay(data->mValues[0].get<Value::MiNoMax>());
9143  }
9144  break;
9145 
9146  case 684:
9147 
9148 /* Line 678 of lalr1.cc */
9149 #line 7132 "Parser.yy"
9150  {
9151  boost::scoped_ptr<NameData> netData((yysemantic_stack_[(1) - (1)].nameData));
9152  std::string name = netData->mName;
9154  = inDriver.getContext();
9155  ViewSharedPtr view = ctx->getCurrentView();
9156  NetSharedPtr net = view->findNet(name);
9157  if(!net)
9158  {
9159  std::string message = constructErrorMessage(
9160  "No Net %s found in view %s\n",
9161  name.c_str(),
9162  view->getName().c_str());
9163  log("%s\n", message.c_str());
9165  __FUNCTION__, __FILE__, __LINE__ );
9166  e.saveContextData("Parser error message", message);
9167  e.saveContextData("Filename", yyloc.begin.filename);
9168  e.saveContextData("StartLine", yyloc.begin.line);
9169  e.saveContextData("EndLine", yyloc.end.line);
9171  error(yyloc, message);
9172  YYABORT;
9173  }
9174  else
9175  {
9176  EventSharedPtr event
9177  = ctx->getCurrentEvent();
9178  event->addNet(net);
9179  }
9180  }
9181  break;
9182 
9183  case 693:
9184 
9185 /* Line 678 of lalr1.cc */
9186 #line 7180 "Parser.yy"
9187  {
9188  delete (yysemantic_stack_[(2) - (2)].stringVal);
9189  }
9190  break;
9191 
9192  case 694:
9193 
9194 /* Line 678 of lalr1.cc */
9195 #line 7184 "Parser.yy"
9196  {
9197  delete (yysemantic_stack_[(2) - (2)].stringVal);
9198  }
9199  break;
9200 
9201  case 706:
9202 
9203 /* Line 678 of lalr1.cc */
9204 #line 7211 "Parser.yy"
9205  {
9206  NetRefData *nData = (yysemantic_stack_[(5) - (4)].netRefData);
9207  if(nData)
9208  {
9209  if(nData->mNetName)
9210  {
9211  (yyval.netRefData) = new NetRefData();
9212  (yyval.netRefData)->mParentNet = nData;
9213  (yyval.netRefData)->mView = nData->mView;
9214  nData->mView = NULL;
9215  }
9216  else
9217  {
9218  if( nData->mInstanceName
9219  || nData->mView )
9220  {
9221  (yyval.netRefData) = nData;
9222  }
9223  }
9224  }
9225  else
9226  {
9227  (yyval.netRefData) = new NetRefData();
9228  }
9229  (yyval.netRefData)->mNetName = (yysemantic_stack_[(5) - (3)].nameData);
9230  }
9231  break;
9232 
9233  case 707:
9234 
9235 /* Line 678 of lalr1.cc */
9236 #line 7240 "Parser.yy"
9237  {
9238  (yyval.netRefData) = NULL;
9239  }
9240  break;
9241 
9242  case 708:
9243 
9244 /* Line 678 of lalr1.cc */
9245 #line 7244 "Parser.yy"
9246  {
9247  (yyval.netRefData) = (yysemantic_stack_[(1) - (1)].netRefData);
9248  }
9249  break;
9250 
9251  case 709:
9252 
9253 /* Line 678 of lalr1.cc */
9254 #line 7248 "Parser.yy"
9255  {
9256  (yyval.netRefData) = new NetRefData();
9257  (yyval.netRefData)->mInstanceName = (yysemantic_stack_[(1) - (1)].instanceRef)->mName;
9258  (yyval.netRefData)->mView = (yysemantic_stack_[(1) - (1)].instanceRef)->mView;
9259  delete (yysemantic_stack_[(1) - (1)].instanceRef);
9260  }
9261  break;
9262 
9263  case 710:
9264 
9265 /* Line 678 of lalr1.cc */
9266 #line 7255 "Parser.yy"
9267  {
9268  (yyval.netRefData) = new NetRefData();
9269  (yyval.netRefData)->mView = (yysemantic_stack_[(1) - (1)].viewRefData);
9270  }
9271  break;
9272 
9273  case 712:
9274 
9275 /* Line 678 of lalr1.cc */
9276 #line 7265 "Parser.yy"
9277  {
9278  PermutableSharedPtr permutable;
9280  = inDriver.getContext();
9281  try
9282  {
9283  ctx->getFactory()->create(permutable);
9284  permutable->setIsNonPermutable(true);
9285  }
9286  catch(Error &e)
9287  {
9288  std::string message = constructErrorMessage(
9289  "Unable to create Permutable" );
9290  log("%s\n", message.c_str());
9291  e.setCurrentLocation( __FUNCTION__,
9292  __FILE__, __LINE__ );
9293  e.saveContextData("Parser error message", message);
9294  e.saveContextData("Filename", yyloc.begin.filename);
9295  e.saveContextData("StartLine", yyloc.begin.line);
9296  e.saveContextData("EndLine", yyloc.end.line);
9298  error(yyloc, message);
9299  YYABORT;
9300  }
9301  ctx->pushPermutable(permutable);
9302  ctx->incrementPermutableDepth();
9303  }
9304  break;
9305 
9306  case 713:
9307 
9308 /* Line 678 of lalr1.cc */
9309 #line 7292 "Parser.yy"
9310  {
9312  PermutableSharedPtr currentPermutable
9313  = ctx->getCurrentPermutable();
9314  ctx->popPermutable();
9315  PermutableSharedPtr parentPermutable;
9316  if(ctx->getPermutableDepth() > 1 )
9317  {
9318  parentPermutable = ctx->getCurrentPermutable();
9319  }
9320  ctx->decrementPermutableDepth();
9321  if(parentPermutable)
9322  {
9323  parentPermutable->setPermutableType(
9325  currentPermutable->setPermutableType(
9327  //Check permutable port size
9328  size_t parentPermutableSize = parentPermutable->getSize();
9329  size_t currentPermutableSize = currentPermutable->getSize();
9330 
9331  log("Parent permutable Size :: %d\n",
9332  parentPermutableSize );
9333  log("Current permutable Size :: %d\n",
9334  currentPermutableSize );
9335  std::vector< PermutableSharedPtr > outPermutables;
9336  parentPermutable->getChildren(outPermutables);
9337  std::vector< PortSharedPtr > outPorts;
9338  parentPermutable->getPorts(outPorts);
9339 
9340  if(!outPermutables.empty() || !outPorts.empty())
9341  {
9342  if( parentPermutableSize
9343  == currentPermutableSize )
9344  {
9345  parentPermutable->addChildPermutable(
9346  currentPermutable );
9347  }
9348  else
9349  {
9350  std::string message = constructErrorMessage(
9351  "Child permutable can't be added, port size mismatch %d with %d",
9352  parentPermutableSize,
9353  currentPermutableSize);
9354  log("%s\n", message.c_str());
9356  __FUNCTION__, __FILE__, __LINE__ );
9357  e.saveContextData("Parser error message", message);
9358  e.saveContextData("Filename", yyloc.begin.filename);
9359  e.saveContextData("StartLine", yyloc.begin.line);
9360  e.saveContextData("EndLine", yyloc.end.line);
9362  error(yyloc, message);
9363  YYABORT;
9364  }
9365  }
9366  else
9367  {
9368  parentPermutable->addChildPermutable(
9369  currentPermutable );
9370  }
9371  }
9372  else
9373  {
9374  ctx->pushPermutable(currentPermutable);
9375  }
9376  }
9377  break;
9378 
9379  case 715:
9380 
9381 /* Line 678 of lalr1.cc */
9382 #line 7363 "Parser.yy"
9383  {
9384  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(2) - (2)].portRefData));
9385  NameData *portNameData = portData->mPortName;
9386  std::string name = portNameData->mName;
9388  = inDriver.getContext();
9389  ViewSharedPtr view = ctx->getCurrentView();
9390  if(view && ( View::eTypeGraphic == view->getType() ||
9391  View::eTypeDocument == view->getType() ) )
9392  {
9393  std::string message = constructErrorMessage(
9394  "Permutable can not be used in this view type");
9395  log("%s\n", message.c_str());
9397  __FUNCTION__, __FILE__, __LINE__ );
9398  throw e;
9399  }
9400  PortRefData *currPortRef = (yysemantic_stack_[(2) - (2)].portRefData);
9401  PortRefData *nextPortRef = portData->mParentPort;
9402  std::vector< std::string > nestedNames;
9403  nestedNames.push_back(currPortRef->mPortName->mName);
9404  while(nextPortRef)
9405  {
9406  currPortRef = nextPortRef;
9407  nestedNames.push_back(nextPortRef->mPortName->mName);
9408  nextPortRef = currPortRef->mParentPort;
9409  }
9410  bool isPort = (NULL == currPortRef->mInstanceName);
9411  std::string topName = *(nestedNames.rbegin());
9412  if(isPort)
9413  {
9414  PortSharedPtr port = view->findPort(topName);
9415  if(!port)
9416  {
9417  std::string message = constructErrorMessage(
9418  "No port %s found in view %s\n",
9419  name.c_str(),
9420  view->getName().c_str());
9421  log("%s\n", message.c_str());
9423  __FUNCTION__, __FILE__, __LINE__ );
9424  e.saveContextData("Parser error message", message);
9425  e.saveContextData("Filename", yyloc.begin.filename);
9426  e.saveContextData("StartLine", yyloc.begin.line);
9427  e.saveContextData("EndLine", yyloc.end.line);
9429  error(yyloc, message);
9430  YYABORT;
9431  }
9432  PermutableSharedPtr currentPermutable
9433  = ctx->getCurrentPermutable();
9434  try
9435  {
9436  connectibleFinder(nestedNames, port);
9437  if(!portData->mPortName->mIndices.empty())
9438  {
9439  port = port->get(portData->mPortName->mIndices);
9440  }
9441  //Check permutable port size
9442  std::vector< PortSharedPtr > outPorts;
9443  currentPermutable->getPorts(outPorts);
9444 
9445  if(!outPorts.empty())
9446  {
9447  PortSharedPtr firstPort = outPorts.front();
9448  std::vector< PortSharedPtr >::iterator it
9449  = std::find(outPorts.begin(), outPorts.end(),
9450  port);
9451  if(it != outPorts.end())
9452  {
9453  std::string message = constructErrorMessage(
9454  "Port %s already exist in permutable",
9455  port->getName().c_str() );
9456  log("%s\n", message.c_str());
9458  __FUNCTION__, __FILE__, __LINE__ );
9459  e.saveContextData("Parser error message", message);
9460  e.saveContextData("Filename", yyloc.begin.filename);
9461  e.saveContextData("StartLine", yyloc.begin.line);
9462  e.saveContextData("EndLine", yyloc.end.line);
9464  error(yyloc, message);
9465  YYABORT;
9466  }
9467  else
9468  {
9469  if(firstPort->getSize() == port->getSize())
9470  {
9471  currentPermutable->addPort(port);
9472  }
9473  else
9474  {
9475  std::string message = constructErrorMessage(
9476  "Port %s can't be added, port size mismatch %d with %d",
9477  name.c_str(),
9478  firstPort->getSize(),
9479  port->getSize());
9480  log("%s\n", message.c_str());
9482  __FUNCTION__, __FILE__, __LINE__ );
9483  e.saveContextData("Parser error message", message);
9484  e.saveContextData("Filename", yyloc.begin.filename);
9485  e.saveContextData("StartLine", yyloc.begin.line);
9486  e.saveContextData("EndLine", yyloc.end.line);
9488  error(yyloc, message);
9489  YYABORT;
9490  }
9491  }
9492  }
9493  else
9494  {
9495  currentPermutable->addPort(port);
9496  }
9497  }
9498  catch(Error &e)
9499  {
9501  __FUNCTION__, __FILE__, __LINE__ );
9502  throw;
9503  }
9504  }
9505  }
9506  break;
9507 
9508  case 719:
9509 
9510 /* Line 678 of lalr1.cc */
9511 #line 7494 "Parser.yy"
9512  {
9513  delete (yysemantic_stack_[(2) - (2)].stringVal);
9514  }
9515  break;
9516 
9517  case 720:
9518 
9519 /* Line 678 of lalr1.cc */
9520 #line 7498 "Parser.yy"
9521  {
9522  delete (yysemantic_stack_[(2) - (2)].stringVal);
9523  }
9524  break;
9525 
9526  case 724:
9527 
9528 /* Line 678 of lalr1.cc */
9529 #line 7509 "Parser.yy"
9530  {
9531  delete (yysemantic_stack_[(2) - (2)].stringVal);
9532  }
9533  break;
9534 
9535  case 725:
9536 
9537 /* Line 678 of lalr1.cc */
9538 #line 7513 "Parser.yy"
9539  {
9540  delete (yysemantic_stack_[(2) - (2)].stringVal);
9541  }
9542  break;
9543 
9544  case 726:
9545 
9546 /* Line 678 of lalr1.cc */
9547 #line 7519 "Parser.yy"
9548  {
9549  if(NULL == (yysemantic_stack_[(4) - (3)].valueData))
9550  {
9551  (yyval.valueData) = new ValueData();
9552  (yyval.valueData)->mValues.push_back( Value(
9554  }
9555  else
9556  {
9557  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
9558  }
9559  }
9560  break;
9561 
9562  case 727:
9563 
9564 /* Line 678 of lalr1.cc */
9565 #line 7534 "Parser.yy"
9566  {
9567  (yyval.valueData) = NULL;
9568  }
9569  break;
9570 
9571  case 728:
9572 
9573 /* Line 678 of lalr1.cc */
9574 #line 7538 "Parser.yy"
9575  {
9576  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
9577  (yyval.valueData)->mValues.push_back( Value( Value::eValueTypeNumber,
9578  Value::Number((yysemantic_stack_[(2) - (2)].pairData)->mX, (yysemantic_stack_[(2) - (2)].pairData)->mY) ) );
9579  delete (yysemantic_stack_[(2) - (2)].pairData);
9580  }
9581  break;
9582 
9583  case 729:
9584 
9585 /* Line 678 of lalr1.cc */
9586 #line 7545 "Parser.yy"
9587  {
9588  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
9589  (yyval.valueData)->mValues.push_back( Value( Value::eValueTypeNumber,
9590  Value::Number((yysemantic_stack_[(2) - (2)].pairData)->mX, (yysemantic_stack_[(2) - (2)].pairData)->mY) ) );
9591  delete (yysemantic_stack_[(2) - (2)].pairData);
9592  }
9593  break;
9594 
9595  case 730:
9596 
9597 /* Line 678 of lalr1.cc */
9598 #line 7552 "Parser.yy"
9599  {
9600  (yyval.valueData) = (yysemantic_stack_[(2) - (2)].valueData);
9601  if((yysemantic_stack_[(2) - (1)].valueData))
9602  {
9603  (yysemantic_stack_[(2) - (1)].valueData)->mValues.insert((yysemantic_stack_[(2) - (1)].valueData)->mValues.end(),
9604  (yyval.valueData)->mValues.begin(), (yyval.valueData)->mValues.end() );
9605  (yyval.valueData)->mValues = (yysemantic_stack_[(2) - (1)].valueData)->mValues;
9606  delete (yysemantic_stack_[(2) - (1)].valueData);
9607  }
9608  }
9609  break;
9610 
9611  case 731:
9612 
9613 /* Line 678 of lalr1.cc */
9614 #line 7565 "Parser.yy"
9615  {
9616  (yyval.pairData) = (yysemantic_stack_[(4) - (3)].pairData);
9617  }
9618  break;
9619 
9620  case 732:
9621 
9622 /* Line 678 of lalr1.cc */
9623 #line 7571 "Parser.yy"
9624  {
9625  (yyval.pairData) = (yysemantic_stack_[(1) - (1)].pairData);
9626  }
9627  break;
9628 
9629  case 733:
9630 
9631 /* Line 678 of lalr1.cc */
9632 #line 7575 "Parser.yy"
9633  {
9634  (yyval.pairData) = (yysemantic_stack_[(2) - (1)].pairData);
9635  }
9636  break;
9637 
9638  case 738:
9639 
9640 /* Line 678 of lalr1.cc */
9641 #line 7587 "Parser.yy"
9642  {
9643  delete (yysemantic_stack_[(2) - (2)].stringVal);
9644  }
9645  break;
9646 
9647  case 743:
9648 
9649 /* Line 678 of lalr1.cc */
9650 #line 7599 "Parser.yy"
9651  {
9652  delete (yysemantic_stack_[(2) - (2)].stringVal);
9653  }
9654  break;
9655 
9656  case 744:
9657 
9658 /* Line 678 of lalr1.cc */
9659 #line 7603 "Parser.yy"
9660  {
9661  delete (yysemantic_stack_[(2) - (2)].stringVal);
9662  }
9663  break;
9664 
9665  case 745:
9666 
9667 /* Line 678 of lalr1.cc */
9668 #line 7609 "Parser.yy"
9669  {
9670  (yyval.pairData) = (yysemantic_stack_[(5) - (4)].pairData);
9671  }
9672  break;
9673 
9674  case 758:
9675 
9676 /* Line 678 of lalr1.cc */
9677 #line 7635 "Parser.yy"
9678  {
9679  delete (yysemantic_stack_[(4) - (3)].pairData);
9680  }
9681  break;
9682 
9683  case 762:
9684 
9685 /* Line 678 of lalr1.cc */
9686 #line 7646 "Parser.yy"
9687  {
9688  delete (yysemantic_stack_[(2) - (2)].stringVal);
9689  }
9690  break;
9691 
9692  case 763:
9693 
9694 /* Line 678 of lalr1.cc */
9695 #line 7650 "Parser.yy"
9696  {
9697  delete (yysemantic_stack_[(2) - (2)].stringVal);
9698  }
9699  break;
9700 
9701  case 767:
9702 
9703 /* Line 678 of lalr1.cc */
9704 #line 7661 "Parser.yy"
9705  {
9706  delete (yysemantic_stack_[(2) - (2)].stringVal);
9707  }
9708  break;
9709 
9710  case 768:
9711 
9712 /* Line 678 of lalr1.cc */
9713 #line 7665 "Parser.yy"
9714  {
9715  delete (yysemantic_stack_[(2) - (2)].stringVal);
9716  }
9717  break;
9718 
9719  case 769:
9720 
9721 /* Line 678 of lalr1.cc */
9722 #line 7671 "Parser.yy"
9723  {
9724  if((yysemantic_stack_[(6) - (3)].integerVal));
9725  }
9726  break;
9727 
9728  case 772:
9729 
9730 /* Line 678 of lalr1.cc */
9731 #line 7681 "Parser.yy"
9732  {
9733  (yyval.stringVal) = (yysemantic_stack_[(4) - (3)].stringVal);
9734  }
9735  break;
9736 
9737  case 774:
9738 
9739 /* Line 678 of lalr1.cc */
9740 #line 7690 "Parser.yy"
9741  {
9742  delete (yysemantic_stack_[(1) - (1)].nameData);
9743  }
9744  break;
9745 
9746  case 782:
9747 
9748 /* Line 678 of lalr1.cc */
9749 #line 7701 "Parser.yy"
9750  {
9751  delete (yysemantic_stack_[(2) - (2)].stringVal);
9752  }
9753  break;
9754 
9755  case 783:
9756 
9757 /* Line 678 of lalr1.cc */
9758 #line 7705 "Parser.yy"
9759  {
9760  delete (yysemantic_stack_[(2) - (2)].stringVal);
9761  }
9762  break;
9763 
9764  case 788:
9765 
9766 /* Line 678 of lalr1.cc */
9767 #line 7721 "Parser.yy"
9768  {
9770  = inDriver.getContext();
9771  ObjectFactorySharedPtr factory
9772  = ctx->getFactory();
9773  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(6) - (3)].nameData));
9774  boost::scoped_ptr<ValueData> valueData((yysemantic_stack_[(6) - (4)].valueData));
9775  ParameterSharedPtr param;
9776  if((yysemantic_stack_[(6) - (3)].nameData)->mIndices.empty())
9777  {
9778  try
9779  {
9780  SingleParameterSharedPtr single;
9781  factory->create(single);
9782  param = single;
9783  param->setName(nameData->mName);
9784  if(!nameData->mOriginalName.empty())
9785  {
9786  param->setOriginalName(nameData->mOriginalName);
9787  }
9788  param->setValue(valueData->mValues[0]);
9789  }
9790  catch(Error &e)
9791  {
9793  __FUNCTION__, __FILE__, __LINE__ );
9794  throw;
9795  }
9796  }
9797  else
9798  {
9799  size_t arraySize = accumulate(
9800  nameData->mIndices.begin(),
9801  nameData->mIndices.end(), 1,
9802  std::multiplies<size_t>());
9803  if(valueData->mValues.size() != arraySize)
9804  {
9805  std::string message = constructErrorMessage(
9806  "Size mismatch %d with %d", valueData->mValues.size(),
9807  nameData->mIndices.size() );
9808  log("%s\n", message.c_str());
9810  __FUNCTION__, __FILE__, __LINE__ );
9811  e.saveContextData("Parser error message", message);
9812  e.saveContextData("Filename", yyloc.begin.filename);
9813  e.saveContextData("StartLine", yyloc.begin.line);
9814  e.saveContextData("EndLine", yyloc.end.line);
9816  error(yyloc, message);
9817  YYABORT;
9818  }
9819  try
9820  {
9822  factory->create(array);
9823  array->setName(nameData->mName);
9824  if(!nameData->mOriginalName.empty())
9825  {
9826  array->setOriginalName(nameData->mOriginalName);
9827  }
9828  array->constructChildren( factory,
9829  (yysemantic_stack_[(6) - (3)].nameData)->mIndices );
9830  param = array;
9831  std::vector< ParameterSharedPtr > children;
9832  param->getChildren(children);
9833  std::vector< ParameterSharedPtr >::iterator it = children.begin();
9834  std::vector< ParameterSharedPtr >::iterator end = children.end();
9835  size_t i = 0;
9836  for(; it != end; ++it, i++ )
9837  {
9838  (*it)->setValue(valueData->mValues[i]);
9839  }
9840  }
9841  catch(Error &e)
9842  {
9844  __FUNCTION__, __FILE__, __LINE__ );
9845  throw;
9846  }
9847  }
9848  param->setUnit(static_cast<Unit>((yysemantic_stack_[(6) - (5)].integerVal)) );
9849  ViewSharedPtr view = ctx->getCurrentView();
9850  ParameterContext context
9851  = view->getParameterContext();
9852  view->getParameters()->set(
9853  context, nameData->mName, param );
9854  log("New param %s created for context %lu\n",
9855  nameData->mName.c_str(), context );
9856  }
9857  break;
9858 
9859  case 789:
9860 
9861 /* Line 678 of lalr1.cc */
9862 #line 7813 "Parser.yy"
9863  {
9864  (yyval.integerVal) = 0;
9865  }
9866  break;
9867 
9868  case 791:
9869 
9870 /* Line 678 of lalr1.cc */
9871 #line 7820 "Parser.yy"
9872  {
9873  (yyval.paramAssignInfo) = new ParamAssignInfo();
9874  (yyval.paramAssignInfo)->mNameData = (yysemantic_stack_[(5) - (3)].nameData);
9875  (yyval.paramAssignInfo)->mValueData = (yysemantic_stack_[(5) - (4)].valueData);
9876  }
9877  break;
9878 
9879  case 795:
9880 
9881 /* Line 678 of lalr1.cc */
9882 #line 7835 "Parser.yy"
9883  {
9884  PathDelaySharedPtr pathDelay;
9886  = inDriver.getContext();
9887  try
9888  {
9889  ctx->getFactory()->create(pathDelay);
9890  }
9891  catch(Error &e)
9892  {
9893  std::string message = constructErrorMessage(
9894  "Unable to create pathDelay" );
9895  log("%s\n", message.c_str());
9896  e.setCurrentLocation( __FUNCTION__,
9897  __FILE__, __LINE__ );
9898  e.saveContextData("Parser error message", message);
9899  e.saveContextData("Filename", yyloc.begin.filename);
9900  e.saveContextData("StartLine", yyloc.begin.line);
9901  e.saveContextData("EndLine", yyloc.end.line);
9903  error(yyloc, message);
9904  YYABORT;
9905  }
9906  ctx->setCurrentPathDelay(pathDelay);
9907  TimingSharedPtr timing = ctx->getCurrentTiming();
9908  timing->addPathDelay(pathDelay);
9909  }
9910  break;
9911 
9912  case 796:
9913 
9914 /* Line 678 of lalr1.cc */
9915 #line 7862 "Parser.yy"
9916  {
9918  ctx->setCurrentPathDelay(PathDelaySharedPtr());
9919  }
9920  break;
9921 
9922  case 798:
9923 
9924 /* Line 678 of lalr1.cc */
9925 #line 7870 "Parser.yy"
9926  {
9928  PathDelaySharedPtr pathDelay
9929  = ctx->getCurrentPathDelay();
9930  EventSharedPtr event
9931  = ctx->getCurrentEvent();
9932  event->setType(Event::eTypeEvent);
9933  pathDelay->addEvent(event);
9934  ctx->setCurrentEvent(EventSharedPtr());
9935  }
9936  break;
9937 
9938  case 799:
9939 
9940 /* Line 678 of lalr1.cc */
9941 #line 7883 "Parser.yy"
9942  {
9943  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(4) - (3)].valueData));
9945  PathDelaySharedPtr pathDelay
9946  = ctx->getCurrentPathDelay();
9947  pathDelay->setDelay(data->mValues[0].get<Value::MiNoMax>());
9948  }
9949  break;
9950 
9951  case 802:
9952 
9953 /* Line 678 of lalr1.cc */
9954 #line 7897 "Parser.yy"
9955  {
9956  if((yysemantic_stack_[(4) - (3)].integerVal));
9957  }
9958  break;
9959 
9960  case 803:
9961 
9962 /* Line 678 of lalr1.cc */
9963 #line 7903 "Parser.yy"
9964  {
9965  PermutableSharedPtr permutable;
9967  = inDriver.getContext();
9968  try
9969  {
9970  ctx->getFactory()->create(permutable);
9971  permutable->setIsNonPermutable(false);
9972  }
9973  catch(Error &e)
9974  {
9975  std::string message = constructErrorMessage(
9976  "Unable to create Permutable" );
9977  log("%s\n", message.c_str());
9978  e.setCurrentLocation( __FUNCTION__,
9979  __FILE__, __LINE__ );
9980  e.saveContextData("Parser error message", message);
9981  e.saveContextData("Filename", yyloc.begin.filename);
9982  e.saveContextData("StartLine", yyloc.begin.line);
9983  e.saveContextData("EndLine", yyloc.end.line);
9985  error(yyloc, message);
9986  YYABORT;
9987  }
9988  if(ctx->getPermutableDepth() == 0 )
9989  {
9990  ctx->getCurrentView()->addPermutable(permutable);
9991  }
9992  ctx->pushPermutable(permutable);
9993  ctx->incrementPermutableDepth();
9994  }
9995  break;
9996 
9997  case 804:
9998 
9999 /* Line 678 of lalr1.cc */
10000 #line 7934 "Parser.yy"
10001  {
10003  PermutableSharedPtr currentPermutable
10004  = ctx->getCurrentPermutable();
10005  ctx->popPermutable();
10006  PermutableSharedPtr parentPermutable;
10007  if(ctx->getPermutableDepth() > 1 )
10008  {
10009  parentPermutable = ctx->getCurrentPermutable();
10010  }
10011  ctx->decrementPermutableDepth();
10012  if(parentPermutable)
10013  {
10014  parentPermutable->setPermutableType(
10016  currentPermutable->setPermutableType(
10018  //Check permutable port size
10019  size_t parentPermutableSize = parentPermutable->getSize();
10020  size_t currentPermutableSize = currentPermutable->getSize();
10021 
10022  log("Parent permutable Size :: %d\n",
10023  parentPermutableSize );
10024  log("Current permutable Size :: %d\n",
10025  currentPermutableSize );
10026  std::vector< PermutableSharedPtr > outPermutables;
10027  parentPermutable->getChildren(outPermutables);
10028  std::vector< PortSharedPtr > outPorts;
10029  parentPermutable->getPorts(outPorts);
10030 
10031  if(!outPermutables.empty() || !outPorts.empty())
10032  {
10033  if( parentPermutableSize
10034  == currentPermutableSize )
10035  {
10036  parentPermutable->addChildPermutable(
10037  currentPermutable );
10038  }
10039  else
10040  {
10041  std::string message = constructErrorMessage(
10042  "Child permutable can't be added, port size mismatch %d with %d",
10043  parentPermutableSize,
10044  currentPermutableSize);
10045  log("%s\n", message.c_str());
10047  __FUNCTION__, __FILE__, __LINE__ );
10048  e.saveContextData("Parser error message", message);
10049  e.saveContextData("Filename", yyloc.begin.filename);
10050  e.saveContextData("StartLine", yyloc.begin.line);
10051  e.saveContextData("EndLine", yyloc.end.line);
10053  error(yyloc, message);
10054  YYABORT;
10055  }
10056  }
10057  else
10058  {
10059  parentPermutable->addChildPermutable(
10060  currentPermutable );
10061  }
10062  }
10063  else
10064  {
10065  ctx->pushPermutable(currentPermutable);
10066  }
10067  }
10068  break;
10069 
10070  case 806:
10071 
10072 /* Line 678 of lalr1.cc */
10073 #line 8005 "Parser.yy"
10074  {
10075  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(2) - (2)].portRefData));
10076  NameData *portNameData = portData->mPortName;
10077  std::string name = portNameData->mName;
10079  = inDriver.getContext();
10080  ViewSharedPtr view = ctx->getCurrentView();
10081  if(view && ( View::eTypeGraphic == view->getType() ||
10082  View::eTypeDocument == view->getType() ) )
10083  {
10084  std::string message = constructErrorMessage(
10085  "Permutable can not be used in this view type");
10086  log("%s\n", message.c_str());
10088  __FUNCTION__, __FILE__, __LINE__ );
10089  throw e;
10090  }
10091  PortRefData *currPortRef = (yysemantic_stack_[(2) - (2)].portRefData);
10092  PortRefData *nextPortRef = portData->mParentPort;
10093  std::vector< std::string > nestedNames;
10094  nestedNames.push_back(currPortRef->mPortName->mName);
10095  while(nextPortRef)
10096  {
10097  currPortRef = nextPortRef;
10098  nestedNames.push_back(nextPortRef->mPortName->mName);
10099  nextPortRef = currPortRef->mParentPort;
10100  }
10101  bool isPort = (NULL == currPortRef->mInstanceName);
10102  std::string topName = *(nestedNames.rbegin());
10103  if(isPort)
10104  {
10105  PortSharedPtr port = view->findPort(topName);
10106  if(!port)
10107  {
10108  std::string message = constructErrorMessage(
10109  "No port %s found in view %s\n",
10110  name.c_str(),
10111  view->getName().c_str());
10112  log("%s\n", message.c_str());
10114  __FUNCTION__, __FILE__, __LINE__ );
10115  e.saveContextData("Parser error message", message);
10116  e.saveContextData("Filename", yyloc.begin.filename);
10117  e.saveContextData("StartLine", yyloc.begin.line);
10118  e.saveContextData("EndLine", yyloc.end.line);
10120  error(yyloc, message);
10121  YYABORT;
10122  }
10123  PermutableSharedPtr currentPermutable
10124  = ctx->getCurrentPermutable();
10125  try
10126  {
10127  connectibleFinder(nestedNames, port);
10128  if(!portData->mPortName->mIndices.empty())
10129  {
10130  port = port->get(portData->mPortName->mIndices);
10131  }
10132  //Check permutable port size
10133  std::vector< PortSharedPtr > outPorts;
10134  currentPermutable->getPorts(outPorts);
10135 
10136  if(!outPorts.empty())
10137  {
10138  PortSharedPtr firstPort = outPorts.front();
10139  std::vector< PortSharedPtr >::iterator it
10140  = std::find(outPorts.begin(), outPorts.end(),
10141  port);
10142  if(it != outPorts.end())
10143  {
10144  std::string message = constructErrorMessage(
10145  "Port %s already exist in permutable",
10146  port->getName().c_str() );
10147  log("%s\n", message.c_str());
10149  __FUNCTION__, __FILE__, __LINE__ );
10150  e.saveContextData("Parser error message", message);
10151  e.saveContextData("Filename", yyloc.begin.filename);
10152  e.saveContextData("StartLine", yyloc.begin.line);
10153  e.saveContextData("EndLine", yyloc.end.line);
10155  error(yyloc, message);
10156  YYABORT;
10157  }
10158  else
10159  {
10160  if(firstPort->getSize() == port->getSize())
10161  {
10162  currentPermutable->addPort(port);
10163  }
10164  else
10165  {
10166  std::string message = constructErrorMessage(
10167  "Port %s can't be added, port size mismatch %d with %d",
10168  name.c_str(),
10169  firstPort->getSize(),
10170  port->getSize());
10171  log("%s\n", message.c_str());
10173  __FUNCTION__, __FILE__, __LINE__ );
10174  e.saveContextData("Parser error message", message);
10175  e.saveContextData("Filename", yyloc.begin.filename);
10176  e.saveContextData("StartLine", yyloc.begin.line);
10177  e.saveContextData("EndLine", yyloc.end.line);
10179  error(yyloc, message);
10180  YYABORT;
10181  }
10182  }
10183  }
10184  else
10185  {
10186  currentPermutable->addPort(port);
10187  }
10188  }
10189  catch(Error &e)
10190  {
10192  __FUNCTION__, __FILE__, __LINE__ );
10193  throw;
10194  }
10195  }
10196  }
10197  break;
10198 
10199  case 812:
10200 
10201 /* Line 678 of lalr1.cc */
10202 #line 8140 "Parser.yy"
10203  {
10204  if(NULL == (yysemantic_stack_[(4) - (3)].valueData))
10205  {
10206  (yyval.valueData) = new ValueData();
10207  (yyval.valueData)->mValues.push_back( Value(
10209  }
10210  else
10211  {
10212  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
10213  }
10214  }
10215  break;
10216 
10217  case 813:
10218 
10219 /* Line 678 of lalr1.cc */
10220 #line 8155 "Parser.yy"
10221  {
10222  (yyval.valueData) = NULL;
10223  }
10224  break;
10225 
10226  case 814:
10227 
10228 /* Line 678 of lalr1.cc */
10229 #line 8159 "Parser.yy"
10230  {
10231  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
10232  (yyval.valueData)->mValues.push_back( Value(
10234  Value::Point((yysemantic_stack_[(2) - (2)].pairData)->mX, (yysemantic_stack_[(2) - (2)].pairData)->mY) ) );
10235  delete (yysemantic_stack_[(2) - (2)].pairData);
10236  }
10237  break;
10238 
10239  case 815:
10240 
10241 /* Line 678 of lalr1.cc */
10242 #line 8167 "Parser.yy"
10243  {
10244  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
10245  (yyval.valueData)->mValues.push_back( Value(
10247  Value::Point((yysemantic_stack_[(2) - (2)].pairData)->mX, (yysemantic_stack_[(2) - (2)].pairData)->mY) ) );
10248  delete (yysemantic_stack_[(2) - (2)].pairData);
10249  }
10250  break;
10251 
10252  case 816:
10253 
10254 /* Line 678 of lalr1.cc */
10255 #line 8175 "Parser.yy"
10256  {
10257  (yyval.valueData) = (yysemantic_stack_[(2) - (2)].valueData);
10258  if((yysemantic_stack_[(2) - (1)].valueData))
10259  {
10260  (yysemantic_stack_[(2) - (1)].valueData)->mValues.insert((yysemantic_stack_[(2) - (1)].valueData)->mValues.end(),
10261  (yyval.valueData)->mValues.begin(), (yyval.valueData)->mValues.end() );
10262  (yyval.valueData)->mValues = (yysemantic_stack_[(2) - (1)].valueData)->mValues;
10263  delete (yysemantic_stack_[(2) - (1)].valueData);
10264  }
10265  }
10266  break;
10267 
10268  case 817:
10269 
10270 /* Line 678 of lalr1.cc */
10271 #line 8188 "Parser.yy"
10272  {
10273  (yyval.pairData) = (yysemantic_stack_[(4) - (3)].pairData);
10274  }
10275  break;
10276 
10277  case 818:
10278 
10279 /* Line 678 of lalr1.cc */
10280 #line 8194 "Parser.yy"
10281  {
10282  (yyval.pairData) = (yysemantic_stack_[(1) - (1)].pairData);
10283  }
10284  break;
10285 
10286  case 819:
10287 
10288 /* Line 678 of lalr1.cc */
10289 #line 8198 "Parser.yy"
10290  {
10291  (yyval.pairData) = (yysemantic_stack_[(2) - (1)].pairData);
10292  }
10293  break;
10294 
10295  case 822:
10296 
10297 /* Line 678 of lalr1.cc */
10298 #line 8208 "Parser.yy"
10299  {
10300  delete (yysemantic_stack_[(2) - (2)].pairData);
10301  }
10302  break;
10303 
10304  case 823:
10305 
10306 /* Line 678 of lalr1.cc */
10307 #line 8214 "Parser.yy"
10308  {
10309  (yyval.pairData) = new PairData((yysemantic_stack_[(5) - (3)].integerVal), (yysemantic_stack_[(5) - (4)].integerVal));
10310  }
10311  break;
10312 
10313  case 827:
10314 
10315 /* Line 678 of lalr1.cc */
10316 #line 8227 "Parser.yy"
10317  {
10318  boost::scoped_ptr<NameData> pNameData((yysemantic_stack_[(3) - (3)].nameData));
10319  std::string name = pNameData->mName;
10321  = inDriver.getContext();
10322  PortSharedPtr port;
10323  ViewSharedPtr view = ctx->getCurrentView();
10324  PortBundleSharedPtr bundle
10325  = ctx->getCurrentPortBundleContext();
10326  bool bExistingPortFound = false;
10327  if(bundle)
10328  {
10329  typedef std::vector<PortSharedPtr > PBList;
10330  PBList children;
10331  bundle->getChildren(children);
10332  for(PBList::iterator it = children.begin();
10333  it != children.end(); it++ )
10334  {
10335  if((*it)->getName() == name)
10336  {
10337  bExistingPortFound = true;
10338  }
10339  }
10340  }
10341  else
10342  {
10343  port = view->findPort(name);
10344  bExistingPortFound = port;
10345  }
10346  if(bExistingPortFound)
10347  {
10348  if(!ctx->getIsViewBeingLinked())
10349  {
10350  log("Existing port %s already found..Ignoring\n",
10351  port->getName().c_str());
10352 #if 0
10353  std::string message = constructErrorMessage(
10354  "View %s already contains a port of name %s\n",
10355  view->getName().c_str(),
10356  port->getName().c_str() );
10357  log("%s\n", message.c_str());
10359  __FUNCTION__, __FILE__, __LINE__ );
10360  e.saveContextData("Parser error message", message);
10361  e.saveContextData("Filename", yyloc.begin.filename);
10362  e.saveContextData("StartLine", yyloc.begin.line);
10363  e.saveContextData("EndLine", yyloc.end.line);
10365  error(yyloc, message);
10366  YYABORT;
10367 #endif
10368  }
10369  }
10370  else
10371  {
10372  if(!pNameData->mIndices.empty())
10373  {
10374  try
10375  {
10376  VectorPortSharedPtr vectorPort;
10377  ctx->getFactory()->create(vectorPort);
10378  vectorPort->setName(name);
10379  vectorPort->constructChildren(
10380  ctx->getFactory(),
10381  pNameData->mIndices );
10382  port = vectorPort;
10383  }
10384  catch(Error &e)
10385  {
10386  std::string message = constructErrorMessage(
10387  "Unable to create vector port : %s",
10388  port->getName().c_str());
10389  log("%s\n", message.c_str());
10390  e.setCurrentLocation( __FUNCTION__,
10391  __FILE__, __LINE__ );
10392  e.saveContextData("Parser error message", message);
10393  e.saveContextData("Filename", yyloc.begin.filename);
10394  e.saveContextData("StartLine", yyloc.begin.line);
10395  e.saveContextData("EndLine", yyloc.end.line);
10397  error(yyloc, message);
10398  YYABORT;
10399  }
10400  }
10401  else
10402  {
10403  try
10404  {
10405  ScalarPortSharedPtr scalarPort;
10406  ctx->getFactory()->create(scalarPort);
10407  port = scalarPort;
10408  port->setName(name);
10409  }
10410  catch(Error &e)
10411  {
10412  std::string message = constructErrorMessage(
10413  "Unable to create port : %s",
10414  port->getName().c_str());
10415  log("%s\n", message.c_str());
10416  e.setCurrentLocation( __FUNCTION__,
10417  __FILE__, __LINE__ );
10418  e.saveContextData("Parser error message", message);
10419  e.saveContextData("Filename", yyloc.begin.filename);
10420  e.saveContextData("StartLine", yyloc.begin.line);
10421  e.saveContextData("EndLine", yyloc.end.line);
10423  error(yyloc, message);
10424  YYABORT;
10425  }
10426  }
10427  if(!pNameData->mOriginalName.empty())
10428  {
10429  port->setOriginalName(
10430  pNameData->mOriginalName );
10431  }
10432  port->setParent(view);
10433  if(bundle)
10434  {
10435  port->setParentCollection(bundle);
10436  bundle->addChild(port);
10437  log("Added port to existing bundle\n");
10438  }
10439  else
10440  {
10441  view->addPort(port);
10442  }
10443  if(pNameData->mIndices.empty())
10444  {
10445  log("Created scalar port %s ",
10446  port->getName().c_str() );
10447  }
10448  else
10449  {
10450  log("Created vector port %s with dimensions ",
10451  port->getName().c_str() );
10452  for( std::vector<size_t>::const_iterator it
10453  = pNameData->mIndices.begin();
10454  it != pNameData->mIndices.end(); ++it )
10455  {
10456  log("%lu ", *it );
10457  }
10458  }
10459  log("\n");
10460  }
10461  ctx->setCurrentPort(port);
10462  ctx->pushPropertyContainer(port);
10463  }
10464  break;
10465 
10466  case 828:
10467 
10468 /* Line 678 of lalr1.cc */
10469 #line 8374 "Parser.yy"
10470  {
10472  if((yysemantic_stack_[(6) - (5)].portAttributes))
10473  {
10474  boost::shared_ptr<PortAttributes> attrib((yysemantic_stack_[(6) - (5)].portAttributes));
10475  ctx->getCurrentPort()->setAttributes(attrib);
10476  }
10477  ctx->setCurrentPort(PortSharedPtr());
10478  ctx->popPropertyContainer();
10479  }
10480  break;
10481 
10482  case 829:
10483 
10484 /* Line 678 of lalr1.cc */
10485 #line 8387 "Parser.yy"
10486  {
10487  (yyval.portAttributes) = NULL;
10488  }
10489  break;
10490 
10491  case 830:
10492 
10493 /* Line 678 of lalr1.cc */
10494 #line 8391 "Parser.yy"
10495  {
10496  (yyval.portAttributes) = (yysemantic_stack_[(2) - (1)].portAttributes);
10497  }
10498  break;
10499 
10500  case 831:
10501 
10502 /* Line 678 of lalr1.cc */
10503 #line 8395 "Parser.yy"
10504  {
10505  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10506  Value::Boolean unused = (yysemantic_stack_[(2) - (2)].integerVal);
10507  Value val(Value::eValueTypeBoolean, unused);
10508  (yyval.portAttributes)->setUnused(val);
10509  }
10510  break;
10511 
10512  case 832:
10513 
10514 /* Line 678 of lalr1.cc */
10515 #line 8402 "Parser.yy"
10516  {
10517  boost::scoped_ptr<PortDelay> delay((yysemantic_stack_[(2) - (2)].portDelay));
10518  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10519  (yyval.portAttributes)->setPortDelay(*delay);
10520  }
10521  break;
10522 
10523  case 833:
10524 
10525 /* Line 678 of lalr1.cc */
10526 #line 8408 "Parser.yy"
10527  {
10528  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10529  boost::scoped_ptr<std::string> data((yysemantic_stack_[(2) - (2)].stringVal));
10530  Value val(Value::eValueTypeString, *data);
10531  (yyval.portAttributes)->setDesignator(val);
10532  }
10533  break;
10534 
10535  case 834:
10536 
10537 /* Line 678 of lalr1.cc */
10538 #line 8415 "Parser.yy"
10539  {
10540  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
10541  Value::Number num(data->mX, data->mY);
10542  Value val(Value::eValueTypeNumber, num);
10543  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10544  (yyval.portAttributes)->setDcFaninLoad(val);
10545  }
10546  break;
10547 
10548  case 835:
10549 
10550 /* Line 678 of lalr1.cc */
10551 #line 8423 "Parser.yy"
10552  {
10553  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
10554  Value::Number num(data->mX, data->mY);
10555  Value val(Value::eValueTypeNumber, num);
10556  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10557  (yyval.portAttributes)->setDcFanoutLoad(val);
10558  }
10559  break;
10560 
10561  case 836:
10562 
10563 /* Line 678 of lalr1.cc */
10564 #line 8431 "Parser.yy"
10565  {
10566  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
10567  Value::Number num(data->mX, data->mY);
10568  Value val(Value::eValueTypeNumber, num);
10569  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10570  (yyval.portAttributes)->setDcMaxFanin(val);
10571  }
10572  break;
10573 
10574  case 837:
10575 
10576 /* Line 678 of lalr1.cc */
10577 #line 8439 "Parser.yy"
10578  {
10579  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
10580  Value::Number num(data->mX, data->mY);
10581  Value val(Value::eValueTypeNumber, num);
10582  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10583  (yyval.portAttributes)->setDcMaxFanout(val);
10584  }
10585  break;
10586 
10587  case 838:
10588 
10589 /* Line 678 of lalr1.cc */
10590 #line 8447 "Parser.yy"
10591  {
10592  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(2) - (2)].valueData));
10593  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10594  (yyval.portAttributes)->setAcLoad(data->mValues[0]);
10595  }
10596  break;
10597 
10598  case 839:
10599 
10600 /* Line 678 of lalr1.cc */
10601 #line 8453 "Parser.yy"
10602  {
10603  (yyval.portAttributes) = (yysemantic_stack_[(2) - (1)].portAttributes);
10604  }
10605  break;
10606 
10607  case 840:
10608 
10609 /* Line 678 of lalr1.cc */
10610 #line 8457 "Parser.yy"
10611  {
10612  (yyval.portAttributes) = (yysemantic_stack_[(2) - (1)].portAttributes);
10614  PortSharedPtr port = ctx->getCurrentPort();
10615  port->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
10616  delete (yysemantic_stack_[(2) - (2)].stringVal);
10617  }
10618  break;
10619 
10620  case 841:
10621 
10622 /* Line 678 of lalr1.cc */
10623 #line 8465 "Parser.yy"
10624  {
10625  (yyval.portAttributes) = (yysemantic_stack_[(2) - (1)].portAttributes);
10627  PortSharedPtr port = ctx->getCurrentPort();
10628  port->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
10629  delete (yysemantic_stack_[(2) - (2)].stringVal);
10630  }
10631  break;
10632 
10633  case 842:
10634 
10635 /* Line 678 of lalr1.cc */
10636 #line 8475 "Parser.yy"
10637  {
10638  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(3) - (3)].portRefData));
10640  = inDriver.getContext();
10641  std::vector< std::string > nestedNames;
10642  PortRefData *currPortRef = (yysemantic_stack_[(3) - (3)].portRefData);
10643  PortRefData *nextPortRef = portData->mParentPort;
10644  nestedNames.push_back(currPortRef->mPortName->mName);
10645  while(nextPortRef)
10646  {
10647  currPortRef = nextPortRef;
10648  nestedNames.push_back(nextPortRef->mPortName->mName);
10649  nextPortRef = currPortRef->mParentPort;
10650  }
10651  bool isPort = (NULL == currPortRef->mInstanceName);
10652  NameData *portNameData = currPortRef->mPortName;
10653  std::string topName = *(nestedNames.rbegin());
10654  CellSharedPtr cell = ctx->getCurrentCell();
10655  ViewSharedPtr view = cell->findView(
10656  portData->mView->mViewName->mName );
10657  if(!view)
10658  {
10659  std::string message = constructErrorMessage(
10660  "No view %s found",
10661  portData->mView->mViewName->mName.c_str());
10662  log("%s\n", message.c_str());
10664  __FUNCTION__, __FILE__, __LINE__ );
10665  e.saveContextData("Parser error message", message);
10666  e.saveContextData("Filename", yyloc.begin.filename);
10667  e.saveContextData("StartLine", yyloc.begin.line);
10668  e.saveContextData("EndLine", yyloc.end.line);
10670  error(yyloc, message);
10671  YYABORT;
10672  }
10673  if(isPort)
10674  {
10675  PortSharedPtr port = view->findPort(topName);
10676  if(!port)
10677  {
10678  std::string message = constructErrorMessage(
10679  "No port %s found",
10680  portNameData->mName.c_str());
10681  log("%s\n", message.c_str());
10683  __FUNCTION__, __FILE__, __LINE__ );
10684  e.saveContextData("Parser error message", message);
10685  e.saveContextData("Filename", yyloc.begin.filename);
10686  e.saveContextData("StartLine", yyloc.begin.line);
10687  e.saveContextData("EndLine", yyloc.end.line);
10689  error(yyloc, message);
10690  YYABORT;
10691  }
10692  try
10693  {
10694  connectibleFinder(nestedNames, port);
10695  if(!portData->mPortName->mIndices.empty())
10696  {
10697  port = port->get(portData->mPortName->mIndices);
10698  }
10699  ctx->setCurrentPort(port);
10700  ctx->pushPropertyContainer(port);
10701  }
10702  catch(Error &e)
10703  {
10705  __FUNCTION__, __FILE__, __LINE__ );
10706  throw;
10707  }
10708  }
10709  else
10710  {
10711  NameData *instanceName
10712  = currPortRef->mInstanceName;
10713  InstanceSharedPtr instance
10714  = view->findInstance(
10715  instanceName->mName );
10716  if(!instance)
10717  {
10718  std::string message = constructErrorMessage(
10719  "Instance %s not known",
10720  instanceName->mName.c_str() );
10721  log("%s\n", message.c_str());
10723  __FUNCTION__, __FILE__, __LINE__ );
10724  e.saveContextData("Parser error message", message);
10725  e.saveContextData("Filename", yyloc.begin.filename);
10726  e.saveContextData("StartLine", yyloc.begin.line);
10727  e.saveContextData("EndLine", yyloc.end.line);
10729  error(yyloc, message);
10730  YYABORT;
10731  }
10732  if(!instanceName->mIndices.empty())
10733  {
10734  InstanceSharedPtr bit
10735  = instance->get(instanceName->mIndices);
10736  instance = bit;
10737  }
10738  PortReferenceSharedPtr portRef
10739  = instance->findPortReference(topName);
10740  if(!portRef)
10741  {
10742  std::string message = constructErrorMessage(
10743  "No port ref %s found",
10744  portNameData->mName.c_str());
10745  log("%s\n", message.c_str());
10747  __FUNCTION__, __FILE__, __LINE__ );
10748  e.saveContextData("Parser error message", message);
10749  e.saveContextData("Filename", yyloc.begin.filename);
10750  e.saveContextData("StartLine", yyloc.begin.line);
10751  e.saveContextData("EndLine", yyloc.end.line);
10753  error(yyloc, message);
10754  YYABORT;
10755  }
10756  try
10757  {
10758  connectibleFinder(nestedNames, portRef);
10759  if(!portData->mPortName->mIndices.empty())
10760  {
10761  portRef = portRef->get(portData->mPortName->mIndices);
10762  }
10763  ctx->setCurrentPortRef(portRef);
10764  ctx->pushPropertyContainer(portRef);
10765  }
10766  catch(Error &e)
10767  {
10768  std::string message = constructErrorMessage(
10769  "Unable to connect port ref : %s",
10770  portRef->getName().c_str());
10771  log("%s\n", message.c_str());
10772  e.setCurrentLocation( __FUNCTION__,
10773  __FILE__, __LINE__ );
10774  e.saveContextData("Parser error message", message);
10775  e.saveContextData("Filename", yyloc.begin.filename);
10776  e.saveContextData("StartLine", yyloc.begin.line);
10777  e.saveContextData("EndLine", yyloc.end.line);
10779  error(yyloc, message);
10780  YYABORT;
10781  }
10782  }
10783  }
10784  break;
10785 
10786  case 843:
10787 
10788 /* Line 678 of lalr1.cc */
10789 #line 8622 "Parser.yy"
10790  {
10792  = inDriver.getContext();
10793  if((yysemantic_stack_[(6) - (5)].portAttributes))
10794  {
10795  boost::shared_ptr<PortAttributes>
10796  attrib((yysemantic_stack_[(6) - (5)].portAttributes));
10797  PortSharedPtr port
10798  = ctx->getCurrentPort();
10799  if(port)
10800  {
10801  port->setAttributes(attrib);
10802  }
10803  else
10804  {
10805  ctx->getCurrentPortRef()
10806  ->setAttributes(attrib);
10807  }
10808  }
10809  ctx->setCurrentPort(PortSharedPtr());
10810  ctx->setCurrentPortRef(
10812  ctx->popPropertyContainer();
10813  }
10814  break;
10815 
10816  case 844:
10817 
10818 /* Line 678 of lalr1.cc */
10819 #line 8649 "Parser.yy"
10820  {
10821  (yyval.portAttributes) = NULL;
10822  }
10823  break;
10824 
10825  case 845:
10826 
10827 /* Line 678 of lalr1.cc */
10828 #line 8653 "Parser.yy"
10829  {
10830  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10831  Value::Boolean unused = (yysemantic_stack_[(2) - (2)].integerVal);
10832  Value val(Value::eValueTypeBoolean, unused);
10833  (yyval.portAttributes)->setUnused(val);
10834  }
10835  break;
10836 
10837  case 846:
10838 
10839 /* Line 678 of lalr1.cc */
10840 #line 8660 "Parser.yy"
10841  {
10842  boost::scoped_ptr<PortDelay> delay((yysemantic_stack_[(2) - (2)].portDelay));
10843  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10844  (yyval.portAttributes)->setPortDelay(*delay);
10845  }
10846  break;
10847 
10848  case 847:
10849 
10850 /* Line 678 of lalr1.cc */
10851 #line 8666 "Parser.yy"
10852  {
10853  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10854  boost::scoped_ptr<std::string> data((yysemantic_stack_[(2) - (2)].stringVal));
10855  Value val(Value::eValueTypeString, *data);
10856  (yyval.portAttributes)->setDesignator(val);
10857  }
10858  break;
10859 
10860  case 848:
10861 
10862 /* Line 678 of lalr1.cc */
10863 #line 8673 "Parser.yy"
10864  {
10865  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
10866  Value::Number num(data->mX, data->mY);
10867  Value val(Value::eValueTypeNumber, num);
10868  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10869  (yyval.portAttributes)->setDcFaninLoad(val);
10870  }
10871  break;
10872 
10873  case 849:
10874 
10875 /* Line 678 of lalr1.cc */
10876 #line 8681 "Parser.yy"
10877  {
10878  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
10879  Value::Number num(data->mX, data->mY);
10880  Value val(Value::eValueTypeNumber, num);
10881  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10882  (yyval.portAttributes)->setDcFanoutLoad(val);
10883  }
10884  break;
10885 
10886  case 850:
10887 
10888 /* Line 678 of lalr1.cc */
10889 #line 8689 "Parser.yy"
10890  {
10891  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
10892  Value::Number num(data->mX, data->mY);
10893  Value val(Value::eValueTypeNumber, num);
10894  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10895  (yyval.portAttributes)->setDcMaxFanin(val);
10896  }
10897  break;
10898 
10899  case 851:
10900 
10901 /* Line 678 of lalr1.cc */
10902 #line 8697 "Parser.yy"
10903  {
10904  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
10905  Value::Number num(data->mX, data->mY);
10906  Value val(Value::eValueTypeNumber, num);
10907  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10908  (yyval.portAttributes)->setDcMaxFanout(val);
10909  }
10910  break;
10911 
10912  case 852:
10913 
10914 /* Line 678 of lalr1.cc */
10915 #line 8705 "Parser.yy"
10916  {
10917  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(2) - (2)].valueData));
10918  (yyval.portAttributes) = ((yysemantic_stack_[(2) - (1)].portAttributes))?(yysemantic_stack_[(2) - (1)].portAttributes):new PortAttributes();
10919  (yyval.portAttributes)->setAcLoad(data->mValues[0]);
10920  }
10921  break;
10922 
10923  case 853:
10924 
10925 /* Line 678 of lalr1.cc */
10926 #line 8711 "Parser.yy"
10927  {
10928  (yyval.portAttributes) = (yysemantic_stack_[(2) - (1)].portAttributes);
10929  }
10930  break;
10931 
10932  case 854:
10933 
10934 /* Line 678 of lalr1.cc */
10935 #line 8715 "Parser.yy"
10936  {
10937  (yyval.portAttributes) = (yysemantic_stack_[(2) - (1)].portAttributes);
10938  delete (yysemantic_stack_[(2) - (2)].stringVal);
10939  }
10940  break;
10941 
10942  case 855:
10943 
10944 /* Line 678 of lalr1.cc */
10945 #line 8722 "Parser.yy"
10946  {
10947  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(3) - (3)].nameData));
10948  std::string name = nameData->mName;
10950  PortSharedPtr port;
10951  ViewSharedPtr view = ctx->getCurrentView();
10952  PortBundleSharedPtr bundle
10953  = ctx->getCurrentPortBundleContext();
10954  bool bExistingPortFound = false;
10955  if(bundle)
10956  {
10957  typedef std::vector<PortSharedPtr > PBList;
10958  PBList children;
10959  bundle->getChildren(children);
10960  for(PBList::iterator it = children.begin();
10961  it != children.end(); it++ )
10962  {
10963  if((*it)->getName() == name)
10964  {
10965  bExistingPortFound = true;
10966  }
10967  }
10968  }
10969  else
10970  {
10971  port = view->findPort(name);
10972  bExistingPortFound = port;
10973  }
10974  if(bExistingPortFound)
10975  {
10976  if(!ctx->getIsViewBeingLinked())
10977  {
10978  std::string message = constructErrorMessage(
10979  "View %s already contains a port of name %s\n",
10980  view->getName().c_str(),
10981  port->getName().c_str() );
10982  log("%s\n", message.c_str());
10984  __FUNCTION__, __FILE__, __LINE__ );
10985  e.saveContextData("Parser error message", message);
10986  e.saveContextData("Filename", yyloc.begin.filename);
10987  e.saveContextData("StartLine", yyloc.begin.line);
10988  e.saveContextData("EndLine", yyloc.end.line);
10990  error(yyloc, message);
10991  YYABORT;
10992  }
10993  }
10994  else
10995  {
10996  try
10997  {
10998  PortBundleSharedPtr portBundle;
10999  ctx->getFactory()->create(portBundle);
11000  ctx->pushPortBundleContext(portBundle);
11001  port = portBundle;
11002  }
11003  catch(Error &e)
11004  {
11005  std::string message = constructErrorMessage(
11006  "Unable to create port bundle : %s",
11007  port->getName().c_str());
11008  log("%s\n", message.c_str());
11009  e.setCurrentLocation( __FUNCTION__,
11010  __FILE__, __LINE__ );
11011  e.saveContextData("Parser error message", message);
11012  e.saveContextData("Filename", yyloc.begin.filename);
11013  e.saveContextData("StartLine", yyloc.begin.line);
11014  e.saveContextData("EndLine", yyloc.end.line);
11016  error(yyloc, message);
11017  YYABORT;
11018  }
11019  port->setName(name);
11020  if(!nameData->mOriginalName.empty())
11021  {
11022  port->setOriginalName(nameData->mOriginalName);
11023  }
11024  port->setParent(view);
11025  if(bundle)
11026  {
11027  port->setParentCollection(bundle);
11028  bundle->addChild(port);
11029  log("Added port to existing bundle\n");
11030  }
11031  else
11032  {
11033  view->addPort(port);
11034  }
11035  log( "Created port bundle %s\n",
11036  port->getName().c_str() );
11037  }
11038  ctx->setCurrentPort(port);
11039  }
11040  break;
11041 
11042  case 856:
11043 
11044 /* Line 678 of lalr1.cc */
11045 #line 8816 "Parser.yy"
11046  {
11047  inDriver.getContext()->popPortBundleContext();
11048  inDriver.getContext()->setCurrentPort(
11049  PortSharedPtr() );
11050  }
11051  break;
11052 
11053  case 859:
11054 
11055 /* Line 678 of lalr1.cc */
11056 #line 8826 "Parser.yy"
11057  {
11059  PortBundleSharedPtr bundle
11060  = ctx->getCurrentPortBundleContext();
11061  bundle->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
11062  delete (yysemantic_stack_[(2) - (2)].stringVal);
11063  }
11064  break;
11065 
11066  case 860:
11067 
11068 /* Line 678 of lalr1.cc */
11069 #line 8834 "Parser.yy"
11070  {
11072  PortBundleSharedPtr bundle
11073  = ctx->getCurrentPortBundleContext();
11074  bundle->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
11075  delete (yysemantic_stack_[(2) - (2)].stringVal);
11076  }
11077  break;
11078 
11079  case 861:
11080 
11081 /* Line 678 of lalr1.cc */
11082 #line 8844 "Parser.yy"
11083  {
11084  (yyval.portDelay) = (yysemantic_stack_[(5) - (4)].portDelay);
11085  (yyval.portDelay)->setDerivation(
11086  static_cast<Derivation>((yysemantic_stack_[(5) - (3)].integerVal)) );
11089  }
11090  break;
11091 
11092  case 862:
11093 
11094 /* Line 678 of lalr1.cc */
11095 #line 8854 "Parser.yy"
11096  {
11099  (yyval.portDelay) = (yysemantic_stack_[(1) - (1)].portDelay);
11100  }
11101  break;
11102 
11103  case 863:
11104 
11105 /* Line 678 of lalr1.cc */
11106 #line 8860 "Parser.yy"
11107  {
11110  (yyval.portDelay) = (yysemantic_stack_[(1) - (1)].portDelay);
11111  }
11112  break;
11113 
11114  case 864:
11115 
11116 /* Line 678 of lalr1.cc */
11117 #line 8866 "Parser.yy"
11118  {
11119  (yyval.portDelay) = ((yysemantic_stack_[(2) - (1)].portDelay)) ? (yysemantic_stack_[(2) - (1)].portDelay) : new PortDelay();
11121  = inDriver.getContext();
11122  LogicElementSharedPtr logicElem
11123  = ctx->getCurrentLogicElement();
11124  if(logicElem)
11125  {
11126  (yyval.portDelay)->setTransition(logicElem);
11127  }
11128  }
11129  break;
11130 
11131  case 865:
11132 
11133 /* Line 678 of lalr1.cc */
11134 #line 8878 "Parser.yy"
11135  {
11136  (yyval.portDelay) = ((yysemantic_stack_[(2) - (1)].portDelay)) ? (yysemantic_stack_[(2) - (1)].portDelay) : new PortDelay();
11138  = inDriver.getContext();
11139  LogicElementSharedPtr logicElem
11140  = ctx->getCurrentLogicElement();
11141  if(logicElem)
11142  {
11143  (yyval.portDelay)->setTransition(logicElem);
11144  }
11145  }
11146  break;
11147 
11148  case 870:
11149 
11150 /* Line 678 of lalr1.cc */
11151 #line 8900 "Parser.yy"
11152  {
11153  boost::scoped_ptr<NameData> portData((yysemantic_stack_[(1) - (1)].nameData));
11154  std::string name = portData->mName;
11156  = inDriver.getContext();
11157  ViewSharedPtr view = ctx->getCurrentView();
11158  PortSharedPtr port = view->findPort(name);
11159  if(!port)
11160  {
11161  std::string message = constructErrorMessage(
11162  "No port %s found in view %s\n",
11163  name.c_str(),
11164  view->getName().c_str());
11165  log("%s\n", message.c_str());
11167  __FUNCTION__, __FILE__, __LINE__ );
11168  e.saveContextData("Parser error message", message);
11169  e.saveContextData("Filename", yyloc.begin.filename);
11170  e.saveContextData("StartLine", yyloc.begin.line);
11171  e.saveContextData("EndLine", yyloc.end.line);
11173  error(yyloc, message);
11174  YYABORT;
11175  }
11176  else
11177  {
11178  EventSharedPtr event
11179  = ctx->getCurrentEvent();
11180  event->addPort(port);
11181  }
11182  }
11183  break;
11184 
11185  case 885:
11186 
11187 /* Line 678 of lalr1.cc */
11188 #line 8954 "Parser.yy"
11189  {
11190  delete (yysemantic_stack_[(2) - (2)].stringVal);
11191  }
11192  break;
11193 
11194  case 886:
11195 
11196 /* Line 678 of lalr1.cc */
11197 #line 8958 "Parser.yy"
11198  {
11199  delete (yysemantic_stack_[(2) - (2)].stringVal);
11200  }
11201  break;
11202 
11203  case 887:
11204 
11205 /* Line 678 of lalr1.cc */
11206 #line 8964 "Parser.yy"
11207  {
11208  (yyval.portInst) = (yysemantic_stack_[(4) - (3)].portInst);
11209  }
11210  break;
11211 
11212  case 888:
11213 
11214 /* Line 678 of lalr1.cc */
11215 #line 8970 "Parser.yy"
11216  {
11217  (yyval.portInst) = new PortInstData();
11218  (yyval.portInst)->mRefData = (yysemantic_stack_[(1) - (1)].portRefData);
11219  }
11220  break;
11221 
11222  case 889:
11223 
11224 /* Line 678 of lalr1.cc */
11225 #line 8975 "Parser.yy"
11226  {
11227  (yyval.portInst) = new PortInstData();
11228  (yyval.portInst)->mRefData = new PortRefData();
11229  (yyval.portInst)->mRefData->mPortName = (yysemantic_stack_[(1) - (1)].nameData);
11230  }
11231  break;
11232 
11233  case 890:
11234 
11235 /* Line 678 of lalr1.cc */
11236 #line 8981 "Parser.yy"
11237  {
11238  (yyval.portInst) = ((yysemantic_stack_[(2) - (1)].portInst))?(yysemantic_stack_[(2) - (1)].portInst):new PortInstData();
11239  (yyval.portInst)->mAttribute = ((yyval.portInst)->mAttribute)
11240  ? (yyval.portInst)->mAttribute
11241  : new PortAttributes();
11242  Value::Boolean unused = (yysemantic_stack_[(2) - (2)].integerVal);
11243  Value val(Value::eValueTypeBoolean, unused);
11244  (yyval.portInst)->mAttribute->setUnused(val);
11245  }
11246  break;
11247 
11248  case 891:
11249 
11250 /* Line 678 of lalr1.cc */
11251 #line 8991 "Parser.yy"
11252  {
11253  (yyval.portInst) = ((yysemantic_stack_[(2) - (1)].portInst))?(yysemantic_stack_[(2) - (1)].portInst):new PortInstData();
11254  (yyval.portInst)->mAttribute = ((yyval.portInst)->mAttribute)
11255  ? (yyval.portInst)->mAttribute
11256  : new PortAttributes();
11257  boost::scoped_ptr<PortDelay> delay((yysemantic_stack_[(2) - (2)].portDelay));
11258  (yyval.portInst)->mAttribute->setPortDelay(*delay);
11259  }
11260  break;
11261 
11262  case 892:
11263 
11264 /* Line 678 of lalr1.cc */
11265 #line 9000 "Parser.yy"
11266  {
11267  (yyval.portInst) = ((yysemantic_stack_[(2) - (1)].portInst))?(yysemantic_stack_[(2) - (1)].portInst):new PortInstData();
11268  (yyval.portInst)->mAttribute = ((yyval.portInst)->mAttribute)
11269  ? (yyval.portInst)->mAttribute
11270  : new PortAttributes();
11271  boost::scoped_ptr<std::string> data((yysemantic_stack_[(2) - (2)].stringVal));
11272  Value val(Value::eValueTypeString, *data);
11273  (yyval.portInst)->mAttribute->setDesignator(val);
11274  }
11275  break;
11276 
11277  case 893:
11278 
11279 /* Line 678 of lalr1.cc */
11280 #line 9010 "Parser.yy"
11281  {
11282  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
11283  Value::Number num(data->mX, data->mY);
11284  Value val(Value::eValueTypeNumber, num);
11285  (yyval.portInst) = ((yysemantic_stack_[(2) - (1)].portInst))?(yysemantic_stack_[(2) - (1)].portInst):new PortInstData();
11286  (yyval.portInst)->mAttribute = ((yyval.portInst)->mAttribute)
11287  ? (yyval.portInst)->mAttribute
11288  : new PortAttributes();
11289  (yyval.portInst)->mAttribute->setDcFaninLoad(val);
11290  }
11291  break;
11292 
11293  case 894:
11294 
11295 /* Line 678 of lalr1.cc */
11296 #line 9021 "Parser.yy"
11297  {
11298  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
11299  Value::Number num(data->mX, data->mY);
11300  Value val(Value::eValueTypeNumber, num);
11301  (yyval.portInst) = ((yysemantic_stack_[(2) - (1)].portInst))?(yysemantic_stack_[(2) - (1)].portInst):new PortInstData();
11302  (yyval.portInst)->mAttribute = ((yyval.portInst)->mAttribute)
11303  ? (yyval.portInst)->mAttribute
11304  : new PortAttributes();
11305  (yyval.portInst)->mAttribute->setDcFanoutLoad(val);
11306  }
11307  break;
11308 
11309  case 895:
11310 
11311 /* Line 678 of lalr1.cc */
11312 #line 9032 "Parser.yy"
11313  {
11314  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
11315  Value::Number num(data->mX, data->mY);
11316  Value val(Value::eValueTypeNumber, num);
11317  (yyval.portInst) = ((yysemantic_stack_[(2) - (1)].portInst))?(yysemantic_stack_[(2) - (1)].portInst):new PortInstData();
11318  (yyval.portInst)->mAttribute = ((yyval.portInst)->mAttribute)
11319  ? (yyval.portInst)->mAttribute
11320  : new PortAttributes();
11321  (yyval.portInst)->mAttribute->setDcMaxFanin(val);
11322  }
11323  break;
11324 
11325  case 896:
11326 
11327 /* Line 678 of lalr1.cc */
11328 #line 9043 "Parser.yy"
11329  {
11330  boost::scoped_ptr<PairData> data((yysemantic_stack_[(2) - (2)].pairData));
11331  Value::Number num(data->mX, data->mY);
11332  Value val(Value::eValueTypeNumber, num);
11333  (yyval.portInst) = ((yysemantic_stack_[(2) - (1)].portInst))?(yysemantic_stack_[(2) - (1)].portInst):new PortInstData();
11334  (yyval.portInst)->mAttribute = ((yyval.portInst)->mAttribute)
11335  ? (yyval.portInst)->mAttribute
11336  : new PortAttributes();
11337  (yyval.portInst)->mAttribute->setDcMaxFanout(val);
11338  }
11339  break;
11340 
11341  case 897:
11342 
11343 /* Line 678 of lalr1.cc */
11344 #line 9054 "Parser.yy"
11345  {
11346  boost::scoped_ptr<ValueData> data((yysemantic_stack_[(2) - (2)].valueData));
11347  (yyval.portInst) = ((yysemantic_stack_[(2) - (1)].portInst))?(yysemantic_stack_[(2) - (1)].portInst):new PortInstData();
11348  (yyval.portInst)->mAttribute = ((yyval.portInst)->mAttribute)
11349  ? (yyval.portInst)->mAttribute
11350  : new PortAttributes();
11351  (yyval.portInst)->mAttribute->setAcLoad(data->mValues[0]);
11352  }
11353  break;
11354 
11355  case 898:
11356 
11357 /* Line 678 of lalr1.cc */
11358 #line 9063 "Parser.yy"
11359  {
11360  (yyval.portInst) = (yysemantic_stack_[(2) - (1)].portInst);
11361  }
11362  break;
11363 
11364  case 899:
11365 
11366 /* Line 678 of lalr1.cc */
11367 #line 9067 "Parser.yy"
11368  {
11369  (yyval.portInst) = (yysemantic_stack_[(2) - (1)].portInst);
11370  delete (yysemantic_stack_[(2) - (2)].stringVal);
11371  }
11372  break;
11373 
11374  case 900:
11375 
11376 /* Line 678 of lalr1.cc */
11377 #line 9072 "Parser.yy"
11378  {
11379  (yyval.portInst) = (yysemantic_stack_[(2) - (1)].portInst);
11380  delete (yysemantic_stack_[(2) - (2)].stringVal);
11381  }
11382  break;
11383 
11384  case 905:
11385 
11386 /* Line 678 of lalr1.cc */
11387 #line 9087 "Parser.yy"
11388  {
11389  (yyval.portListData) = (yysemantic_stack_[(4) - (3)].portListData);
11390  }
11391  break;
11392 
11393  case 906:
11394 
11395 /* Line 678 of lalr1.cc */
11396 #line 9093 "Parser.yy"
11397  {
11398  (yyval.portListData) = NULL;
11399  }
11400  break;
11401 
11402  case 907:
11403 
11404 /* Line 678 of lalr1.cc */
11405 #line 9097 "Parser.yy"
11406  {
11407  (yyval.portListData) = ((yysemantic_stack_[(2) - (1)].portListData))?(yysemantic_stack_[(2) - (1)].portListData):new PortListData();
11408  (yyval.portListData)->mPortRefs.push_back((yysemantic_stack_[(2) - (2)].portRefData));
11409  }
11410  break;
11411 
11412  case 908:
11413 
11414 /* Line 678 of lalr1.cc */
11415 #line 9102 "Parser.yy"
11416  {
11417  (yyval.portListData) = ((yysemantic_stack_[(2) - (1)].portListData))?(yysemantic_stack_[(2) - (1)].portListData):new PortListData();
11418  PortRefData *portRef = new PortRefData();
11419  portRef->mPortName = (yysemantic_stack_[(2) - (2)].nameData);
11420  (yyval.portListData)->mPortRefs.push_back(portRef);
11421  }
11422  break;
11423 
11424  case 909:
11425 
11426 /* Line 678 of lalr1.cc */
11427 #line 9111 "Parser.yy"
11428  {
11429  if((yysemantic_stack_[(5) - (3)].nameData))
11430  {
11431  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(5) - (3)].nameData));
11432  std::string name = nameData->mName;
11434  PortListAliasSharedPtr portlistAlias;
11435  ctx->getFactory()->create(portlistAlias);
11436  portlistAlias->setName(name);
11437 
11438  if(NULL != (yysemantic_stack_[(5) - (4)].portListData) && !(yysemantic_stack_[(5) - (4)].portListData)->mPortRefs.empty())
11439  {
11440  boost::scoped_ptr<PortListData> portListData((yysemantic_stack_[(5) - (4)].portListData));
11441  std::string message;
11442 
11444  PortListSharedPtr portList;
11445  ctx->getFactory()->create(portList);
11446 
11447  for( std::vector<PortRefData *>::iterator it
11448  = portListData->mPortRefs.begin();
11449  it != portListData->mPortRefs.end(); ++it )
11450  {
11451  PortRefData *portData = *it;
11452  std::vector< std::string > nestedNames;
11453  PortRefData *currPortRef = *it;
11454  PortRefData *nextPortRef = portData->mParentPort;
11455  nestedNames.push_back(currPortRef->mPortName->mName);
11456  while(nextPortRef)
11457  {
11458  currPortRef = nextPortRef;
11459  nestedNames.push_back(nextPortRef->mPortName->mName);
11460  nextPortRef = currPortRef->mParentPort;
11461  }
11462  bool isPort = (NULL == currPortRef->mInstanceName);
11463  NameData *portNameData = currPortRef->mPortName;
11464  std::string topName = *(nestedNames.rbegin());
11465  ViewSharedPtr view = ctx->getCurrentView();
11466  if(isPort)
11467  {
11468  PortSharedPtr port = view->findPort(topName);
11469  if(!port)
11470  {
11471  std::string message = constructErrorMessage(
11472  "No port %s found in view %s\n",
11473  portNameData->mName.c_str(),
11474  view->getName().c_str());
11475  log("%s\n", message.c_str());
11477  __FUNCTION__, __FILE__, __LINE__ );
11478  e.saveContextData("Parser error message", message);
11479  e.saveContextData("Filename", yyloc.begin.filename);
11480  e.saveContextData("StartLine", yyloc.begin.line);
11481  e.saveContextData("EndLine", yyloc.end.line);
11483  error(yyloc, message);
11484  YYABORT;
11485  }
11486 
11487  try
11488  {
11489  connectibleFinder(nestedNames, port);
11490  if(!portData->mPortName->mIndices.empty())
11491  {
11492  port = port->get(portData->mPortName->mIndices);
11493  }
11494  portList->addChildPort(port);
11495  }
11496  catch(Error &e)
11497  {
11498  std::string message = constructErrorMessage(
11499  "Unable to connect port : %s",
11500  port->getName().c_str());
11501  log("%s\n", message.c_str());
11502  e.setCurrentLocation( __FUNCTION__,
11503  __FILE__, __LINE__ );
11504  e.saveContextData("Parser error message", message);
11505  e.saveContextData("Filename", yyloc.begin.filename);
11506  e.saveContextData("StartLine", yyloc.begin.line);
11507  e.saveContextData("EndLine", yyloc.end.line);
11509  error(yyloc, message);
11510  YYABORT;
11511  }
11512  }
11513  else
11514  {
11515  }
11516  }
11517  portlistAlias->setPortList(portList);
11518  }
11519  SimulateSharedPtr simulate
11520  = ctx->getCurrentSimulate();
11521  try
11522  {
11523  simulate->addPortListAlias(portlistAlias);
11524  }
11525  catch(Error &e)
11526  {
11527  std::string message = constructErrorMessage(
11528  "Unable to add port list alias : %s",
11529  portlistAlias->getName().c_str());
11530  log("%s\n", message.c_str());
11531  e.setCurrentLocation( __FUNCTION__,
11532  __FILE__, __LINE__ );
11533  e.saveContextData("Parser error message", message);
11534  e.saveContextData("Filename", yyloc.begin.filename);
11535  e.saveContextData("StartLine", yyloc.begin.line);
11536  e.saveContextData("EndLine", yyloc.end.line);
11538  error(yyloc, message);
11539  YYABORT;
11540  }
11541  }
11542  }
11543  break;
11544 
11545  case 914:
11546 
11547 /* Line 678 of lalr1.cc */
11548 #line 9235 "Parser.yy"
11549  {
11550  delete (yysemantic_stack_[(2) - (2)].stringVal);
11551  }
11552  break;
11553 
11554  case 915:
11555 
11556 /* Line 678 of lalr1.cc */
11557 #line 9239 "Parser.yy"
11558  {
11559  delete (yysemantic_stack_[(2) - (2)].stringVal);
11560  }
11561  break;
11562 
11563  case 917:
11564 
11565 /* Line 678 of lalr1.cc */
11566 #line 9246 "Parser.yy"
11567  {
11568  delete (yysemantic_stack_[(1) - (1)].nameData);
11569  }
11570  break;
11571 
11572  case 929:
11573 
11574 /* Line 678 of lalr1.cc */
11575 #line 9272 "Parser.yy"
11576  {
11577  PortRefData *pData = (yysemantic_stack_[(5) - (4)].portRefData);
11578  if(pData)
11579  {
11580  if(pData->mPortName)
11581  {
11582  (yyval.portRefData) = new PortRefData();
11583  (yyval.portRefData)->mParentPort = pData;
11584  (yyval.portRefData)->mView = pData->mView;
11585  pData->mView = NULL;
11586  }
11587  else
11588  {
11589  if( pData->mInstanceName
11590  || pData->mView )
11591  {
11592  (yyval.portRefData) = pData;
11593  }
11594  }
11595  }
11596  else
11597  {
11598  (yyval.portRefData) = new PortRefData();
11599  }
11600  (yyval.portRefData)->mPortName = (yysemantic_stack_[(5) - (3)].nameData);
11601  }
11602  break;
11603 
11604  case 930:
11605 
11606 /* Line 678 of lalr1.cc */
11607 #line 9301 "Parser.yy"
11608  {
11609  (yyval.portRefData) = NULL;
11610  }
11611  break;
11612 
11613  case 931:
11614 
11615 /* Line 678 of lalr1.cc */
11616 #line 9305 "Parser.yy"
11617  {
11618  (yyval.portRefData) = (yysemantic_stack_[(1) - (1)].portRefData);
11619  }
11620  break;
11621 
11622  case 932:
11623 
11624 /* Line 678 of lalr1.cc */
11625 #line 9309 "Parser.yy"
11626  {
11627  (yyval.portRefData) = new PortRefData();
11628  (yyval.portRefData)->mInstanceName = (yysemantic_stack_[(1) - (1)].instanceRef)->mName;
11629  (yyval.portRefData)->mView = (yysemantic_stack_[(1) - (1)].instanceRef)->mView;
11630  delete (yysemantic_stack_[(1) - (1)].instanceRef);
11631  }
11632  break;
11633 
11634  case 933:
11635 
11636 /* Line 678 of lalr1.cc */
11637 #line 9316 "Parser.yy"
11638  {
11639  (yyval.portRefData) = new PortRefData();
11640  (yyval.portRefData)->mView = (yysemantic_stack_[(1) - (1)].viewRefData);
11641  }
11642  break;
11643 
11644  case 934:
11645 
11646 /* Line 678 of lalr1.cc */
11647 #line 9323 "Parser.yy"
11648  {
11649  (yyval.pairStrData) = new PairStrData(*(yysemantic_stack_[(5) - (3)].stringVal), *(yysemantic_stack_[(5) - (4)].stringVal));
11650  }
11651  break;
11652 
11653  case 935:
11654 
11655 /* Line 678 of lalr1.cc */
11656 #line 9329 "Parser.yy"
11657  {
11658  (yyval.stringVal) = new std::string();
11659  }
11660  break;
11661 
11662  case 936:
11663 
11664 /* Line 678 of lalr1.cc */
11665 #line 9333 "Parser.yy"
11666  {
11667  (yyval.stringVal) = (yysemantic_stack_[(1) - (1)].stringVal);
11668  //delete $1;
11669  }
11670  break;
11671 
11672  case 940:
11673 
11674 /* Line 678 of lalr1.cc */
11675 #line 9347 "Parser.yy"
11676  {
11677  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(3) - (3)].nameData));
11678  if(!nameData->mIndices.empty())
11679  {
11680  std::string message = constructErrorMessage(
11681  "Property %s cannot be an array",
11682  nameData->mName.c_str() );
11683  log("%s\n", message.c_str());
11685  __FUNCTION__, __FILE__, __LINE__ );
11686  e.saveContextData("Parser error message", message);
11687  e.saveContextData("Filename", yyloc.begin.filename);
11688  e.saveContextData("StartLine", yyloc.begin.line);
11689  e.saveContextData("EndLine", yyloc.end.line);
11691  error(yyloc, message);
11692  YYABORT;
11693  }
11694  PropertySharedPtr property;
11696  = inDriver.getContext();
11697  try
11698  {
11699  ctx->getFactory()->create(property);
11700  }
11701  catch(Error &e)
11702  {
11703  std::string message = constructErrorMessage(
11704  "Unable to create Property : %s",
11705  nameData->mName.c_str());
11706  log("%s\n", message.c_str());
11707  e.setCurrentLocation( __FUNCTION__,
11708  __FILE__, __LINE__ );
11709  e.saveContextData("Parser error message", message);
11710  e.saveContextData("Filename", yyloc.begin.filename);
11711  e.saveContextData("StartLine", yyloc.begin.line);
11712  e.saveContextData("EndLine", yyloc.end.line);
11714  error(yyloc, message);
11715  YYABORT;
11716  }
11717  property->setName(nameData->mName.c_str());
11718  if(!nameData->mOriginalName.empty())
11719  {
11720  property->setOriginalName(nameData->mOriginalName);
11721  }
11722  ctx->pushProperty(property);
11723  ctx->incrementPropertyDepth();
11724  }
11725  break;
11726 
11727  case 941:
11728 
11729 /* Line 678 of lalr1.cc */
11730 #line 9396 "Parser.yy"
11731  {
11733  = inDriver.getContext();
11734  PropertySharedPtr currentP
11735  = ctx->getCurrentProperty();
11736  ctx->popProperty();
11737  PropertySharedPtr parentP;
11738  if(ctx->getPropertyDepth() > 1 )
11739  {
11740  parentP = ctx->getCurrentProperty();
11741  }
11742  ctx->decrementPropertyDepth();
11743  PropertyContainerSharedPtr container
11744  =ctx->getCurrentPropertyContainer();
11745  if(parentP)
11746  {
11747  parentP->addChildProperty(
11748  currentP->getName(), currentP );
11749  }
11750  else
11751  {
11752  if(ctx->getIsInInstance())
11753  {
11754  //Can happen only in case of instances
11755  ctx->pushProperty(currentP);
11756  }
11757  else
11758  {
11759  if(container)
11760  {
11761  container->setProperty(
11762  currentP->getName(), currentP );
11763  }
11764  else
11765  {
11766  log("Property %s is being discarded\n",
11767  currentP->getName().c_str());
11768  }
11769  }
11770  }
11771  }
11772  break;
11773 
11774  case 942:
11775 
11776 /* Line 678 of lalr1.cc */
11777 #line 9440 "Parser.yy"
11778  {
11779  boost::scoped_ptr<ValueData> value((yysemantic_stack_[(1) - (1)].valueData));
11780  if(value->mValues.size() > 1)
11781  {
11782  std::string message = constructErrorMessage(
11783  "Property value cannot be an array" );
11784  log("%s\n", message.c_str());
11786  __FUNCTION__, __FILE__, __LINE__ );
11787  e.saveContextData("Parser error message", message);
11788  e.saveContextData("Filename", yyloc.begin.filename);
11789  e.saveContextData("StartLine", yyloc.begin.line);
11790  e.saveContextData("EndLine", yyloc.end.line);
11792  error(yyloc, message);
11793  YYABORT;
11794  }
11795  inDriver.getContext()->getCurrentProperty()
11796  ->setValue(value->mValues[0]);
11797  }
11798  break;
11799 
11800  case 943:
11801 
11802 /* Line 678 of lalr1.cc */
11803 #line 9461 "Parser.yy"
11804  {
11805  inDriver.getContext()->getCurrentProperty()
11806  ->setOwner(*(yysemantic_stack_[(2) - (2)].stringVal));
11807  delete (yysemantic_stack_[(2) - (2)].stringVal);
11808  }
11809  break;
11810 
11811  case 944:
11812 
11813 /* Line 678 of lalr1.cc */
11814 #line 9467 "Parser.yy"
11815  {
11816  inDriver.getContext()->getCurrentProperty()
11817  ->setUnit(static_cast<Unit>((yysemantic_stack_[(2) - (2)].integerVal)));
11818  }
11819  break;
11820 
11821  case 946:
11822 
11823 /* Line 678 of lalr1.cc */
11824 #line 9473 "Parser.yy"
11825  {
11826  inDriver.getContext()->getCurrentProperty()
11827  ->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
11828  delete (yysemantic_stack_[(2) - (2)].stringVal);
11829  }
11830  break;
11831 
11832  case 960:
11833 
11834 /* Line 678 of lalr1.cc */
11835 #line 9500 "Parser.yy"
11836  {
11837  delete (yysemantic_stack_[(2) - (2)].stringVal);
11838  }
11839  break;
11840 
11841  case 961:
11842 
11843 /* Line 678 of lalr1.cc */
11844 #line 9504 "Parser.yy"
11845  {
11846  delete (yysemantic_stack_[(2) - (2)].stringVal);
11847  }
11848  break;
11849 
11850  case 972:
11851 
11852 /* Line 678 of lalr1.cc */
11853 #line 9526 "Parser.yy"
11854  {
11855  delete (yysemantic_stack_[(5) - (3)].pairData);
11856  }
11857  break;
11858 
11859  case 973:
11860 
11861 /* Line 678 of lalr1.cc */
11862 #line 9532 "Parser.yy"
11863  {
11864  delete (yysemantic_stack_[(1) - (1)].pairData);
11865  }
11866  break;
11867 
11868  case 978:
11869 
11870 /* Line 678 of lalr1.cc */
11871 #line 9544 "Parser.yy"
11872  {
11873  delete (yysemantic_stack_[(2) - (2)].stringVal);
11874  }
11875  break;
11876 
11877  case 979:
11878 
11879 /* Line 678 of lalr1.cc */
11880 #line 9548 "Parser.yy"
11881  {
11882  delete (yysemantic_stack_[(2) - (2)].stringVal);
11883  }
11884  break;
11885 
11886  case 980:
11887 
11888 /* Line 678 of lalr1.cc */
11889 #line 9554 "Parser.yy"
11890  {
11891  (yyval.nameData) = (yysemantic_stack_[(5) - (3)].nameData);
11892  (yyval.nameData)->mOriginalName = *(yysemantic_stack_[(5) - (4)].stringVal);
11893  delete (yysemantic_stack_[(5) - (4)].stringVal);
11894  }
11895  break;
11896 
11897  case 981:
11898 
11899 /* Line 678 of lalr1.cc */
11900 #line 9562 "Parser.yy"
11901  {
11902  (yyval.nameData) = new NameData();
11903  (yyval.nameData)->mName = *(yysemantic_stack_[(1) - (1)].stringVal);
11904  delete (yysemantic_stack_[(1) - (1)].stringVal);
11905  }
11906  break;
11907 
11908  case 982:
11909 
11910 /* Line 678 of lalr1.cc */
11911 #line 9568 "Parser.yy"
11912  {
11913  (yyval.nameData) = (yysemantic_stack_[(1) - (1)].nameData);
11914  }
11915  break;
11916 
11917  case 983:
11918 
11919 /* Line 678 of lalr1.cc */
11920 #line 9574 "Parser.yy"
11921  {
11922  (yyval.stringVal) = (yysemantic_stack_[(1) - (1)].stringVal);
11923  }
11924  break;
11925 
11926  case 984:
11927 
11928 /* Line 678 of lalr1.cc */
11929 #line 9578 "Parser.yy"
11930  {
11931  (yyval.stringVal) = (yysemantic_stack_[(1) - (1)].stringVal);
11932  }
11933  break;
11934 
11935  case 985:
11936 
11937 /* Line 678 of lalr1.cc */
11938 #line 9584 "Parser.yy"
11939  {
11940  (yyval.logicListData) = (yysemantic_stack_[(4) - (3)].logicListData);
11941  }
11942  break;
11943 
11944  case 986:
11945 
11946 /* Line 678 of lalr1.cc */
11947 #line 9590 "Parser.yy"
11948  {
11949  (yyval.logicListData) = NULL;
11950  }
11951  break;
11952 
11953  case 987:
11954 
11955 /* Line 678 of lalr1.cc */
11956 #line 9594 "Parser.yy"
11957  {
11958  (yyval.logicListData) = ((yysemantic_stack_[(2) - (1)].logicListData))?(yysemantic_stack_[(2) - (1)].logicListData):new LogicListData();
11959  (yyval.logicListData)->mNameDataList.push_back((yysemantic_stack_[(2) - (2)].nameData));
11960  }
11961  break;
11962 
11963  case 989:
11964 
11965 /* Line 678 of lalr1.cc */
11966 #line 9604 "Parser.yy"
11967  {
11968  delete (yysemantic_stack_[(6) - (3)].pairData);
11969  delete (yysemantic_stack_[(6) - (4)].pairData);
11970  if((yysemantic_stack_[(6) - (5)].integerVal));
11971  }
11972  break;
11973 
11974  case 990:
11975 
11976 /* Line 678 of lalr1.cc */
11977 #line 9612 "Parser.yy"
11978  {
11979  (yyval.pairData) = new PairData((yysemantic_stack_[(1) - (1)].integerVal));
11980  }
11981  break;
11982 
11983  case 991:
11984 
11985 /* Line 678 of lalr1.cc */
11986 #line 9616 "Parser.yy"
11987  {
11988  (yyval.pairData) = new PairData((yysemantic_stack_[(5) - (3)].integerVal), (yysemantic_stack_[(5) - (4)].integerVal));
11989  }
11990  break;
11991 
11992  case 992:
11993 
11994 /* Line 678 of lalr1.cc */
11995 #line 9622 "Parser.yy"
11996  {
11997  if((yysemantic_stack_[(5) - (3)].integerVal));
11998  if((yysemantic_stack_[(5) - (4)].integerVal));
11999  }
12000  break;
12001 
12002  case 993:
12003 
12004 /* Line 678 of lalr1.cc */
12005 #line 9629 "Parser.yy"
12006  {
12007  if((yysemantic_stack_[(5) - (3)].integerVal));
12008  if((yysemantic_stack_[(5) - (4)].integerVal));
12009  }
12010  break;
12011 
12012  case 995:
12013 
12014 /* Line 678 of lalr1.cc */
12015 #line 9639 "Parser.yy"
12016  {
12017  delete (yysemantic_stack_[(1) - (1)].stringVal);
12018  }
12019  break;
12020 
12021  case 997:
12022 
12023 /* Line 678 of lalr1.cc */
12024 #line 9644 "Parser.yy"
12025  {
12026  delete (yysemantic_stack_[(2) - (2)].stringVal);
12027  }
12028  break;
12029 
12030  case 1003:
12031 
12032 /* Line 678 of lalr1.cc */
12033 #line 9661 "Parser.yy"
12034  {
12035  SimulateSharedPtr simulate;
12037  = inDriver.getContext();
12038  try
12039  {
12040  ctx->getFactory()->create(simulate);
12041  }
12042  catch(Error &e)
12043  {
12044  std::string message = constructErrorMessage(
12045  "Unable to create simulate" );
12046  log("%s\n", message.c_str());
12047  e.setCurrentLocation( __FUNCTION__,
12048  __FILE__, __LINE__ );
12049  e.saveContextData("Parser error message", message);
12050  e.saveContextData("Filename", yyloc.begin.filename);
12051  e.saveContextData("StartLine", yyloc.begin.line);
12052  e.saveContextData("EndLine", yyloc.end.line);
12054  error(yyloc, message);
12055  YYABORT;
12056  }
12057  ctx->setCurrentSimulate(simulate);
12058  }
12059  break;
12060 
12061  case 1004:
12062 
12063 /* Line 678 of lalr1.cc */
12064 #line 9686 "Parser.yy"
12065  {
12066  // Note : Need to do the followings, from where Simulate called
12067  //EdifContextSharedPtr ctx = inDriver.getContext();
12068  //ctx->setCurrentSimulate(SimulateSharedPtr());
12069  }
12070  break;
12071 
12072  case 1005:
12073 
12074 /* Line 678 of lalr1.cc */
12075 #line 9694 "Parser.yy"
12076  {
12077  if((yysemantic_stack_[(1) - (1)].nameData))
12078  {
12080  = inDriver.getContext();
12081  SimulateSharedPtr simulate
12082  = ctx->getCurrentSimulate();
12083  simulate->setName((yysemantic_stack_[(1) - (1)].nameData)->mName);
12084  if(!(yysemantic_stack_[(1) - (1)].nameData)->mOriginalName.empty())
12085  {
12086  simulate->setOriginalName((yysemantic_stack_[(1) - (1)].nameData)->mOriginalName);
12087  }
12088  delete (yysemantic_stack_[(1) - (1)].nameData);
12089  }
12090  else
12091  {
12092  //TBD::POSSIBLE?
12093  }
12094  }
12095  break;
12096 
12097  case 1009:
12098 
12099 /* Line 678 of lalr1.cc */
12100 #line 9717 "Parser.yy"
12101  {
12103  SimulateSharedPtr simulate
12104  = ctx->getCurrentSimulate();
12105  simulate->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
12106  delete (yysemantic_stack_[(2) - (2)].stringVal);
12107  }
12108  break;
12109 
12110  case 1010:
12111 
12112 /* Line 678 of lalr1.cc */
12113 #line 9725 "Parser.yy"
12114  {
12116  SimulateSharedPtr simulate
12117  = ctx->getCurrentSimulate();
12118  simulate->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
12119  delete (yysemantic_stack_[(2) - (2)].stringVal);
12120  }
12121  break;
12122 
12123  case 1011:
12124 
12125 /* Line 678 of lalr1.cc */
12126 #line 9735 "Parser.yy"
12127  {
12128  SimulationInfoSharedPtr simuInfo;
12130  = inDriver.getContext();
12131  try
12132  {
12133  ctx->getFactory()->create(simuInfo);
12134  }
12135  catch(Error &e)
12136  {
12137  std::string message = constructErrorMessage(
12138  "Unable to create simulation info" );
12139  log("%s\n", message.c_str());
12140  e.setCurrentLocation( __FUNCTION__,
12141  __FILE__, __LINE__ );
12142  e.saveContextData("Parser error message", message);
12143  e.saveContextData("Filename", yyloc.begin.filename);
12144  e.saveContextData("StartLine", yyloc.begin.line);
12145  e.saveContextData("EndLine", yyloc.end.line);
12147  error(yyloc, message);
12148  YYABORT;
12149  }
12150  ctx->setCurrentSimulationInfo(simuInfo);
12151  LibrarySharedPtr lib = ctx->getCurrentLibrary();
12152  lib->setSimulationInfo(simuInfo);
12153  }
12154  break;
12155 
12156  case 1012:
12157 
12158 /* Line 678 of lalr1.cc */
12159 #line 9762 "Parser.yy"
12160  {
12162  ctx->setCurrentSimulationInfo(
12164  }
12165  break;
12166 
12167  case 1015:
12168 
12169 /* Line 678 of lalr1.cc */
12170 #line 9772 "Parser.yy"
12171  {
12173  SimulationInfoSharedPtr simuInfo
12174  = ctx->getCurrentSimulationInfo();
12175  simuInfo->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
12176  delete (yysemantic_stack_[(2) - (2)].stringVal);
12177  }
12178  break;
12179 
12180  case 1016:
12181 
12182 /* Line 678 of lalr1.cc */
12183 #line 9780 "Parser.yy"
12184  {
12186  SimulationInfoSharedPtr simuInfo
12187  = ctx->getCurrentSimulationInfo();
12188  simuInfo->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
12189  delete (yysemantic_stack_[(2) - (2)].stringVal);
12190  }
12191  break;
12192 
12193  case 1029:
12194 
12195 /* Line 678 of lalr1.cc */
12196 #line 9818 "Parser.yy"
12197  {
12198  StatusSharedPtr status;
12200  = inDriver.getContext();
12201  try
12202  {
12203  ctx->getFactory()->create(status);
12204  }
12205  catch(Error &e)
12206  {
12207  std::string message = constructErrorMessage(
12208  "Unable to create Status" );
12209  log("%s\n", message.c_str());
12210  e.setCurrentLocation( __FUNCTION__,
12211  __FILE__, __LINE__ );
12212  e.saveContextData("Parser error message", message);
12213  e.saveContextData("Filename", yyloc.begin.filename);
12214  e.saveContextData("StartLine", yyloc.begin.line);
12215  e.saveContextData("EndLine", yyloc.end.line);
12217  error(yyloc, message);
12218  YYABORT;
12219  }
12220  ctx->setCurrentStatus(status);
12221  }
12222  break;
12223 
12224  case 1030:
12225 
12226 /* Line 678 of lalr1.cc */
12227 #line 9843 "Parser.yy"
12228  {
12230  StatusSharedPtr currentStatus
12231  = ctx->getCurrentStatus();
12232 
12233  StatusContainerSharedPtr container
12234  = ctx->getCurrentStatusContainer();
12235  if(container)
12236  {
12237  container->addStatus(currentStatus);
12238  }
12239  else
12240  {
12241  log("Status is being discarded\n");
12242  }
12243  }
12244  break;
12245 
12246  case 1033:
12247 
12248 /* Line 678 of lalr1.cc */
12249 #line 9864 "Parser.yy"
12250  {
12252  StatusSharedPtr status = ctx->getCurrentStatus();
12253  status->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
12254  delete (yysemantic_stack_[(2) - (2)].stringVal);
12255  }
12256  break;
12257 
12258  case 1034:
12259 
12260 /* Line 678 of lalr1.cc */
12261 #line 9871 "Parser.yy"
12262  {
12264  StatusSharedPtr status = ctx->getCurrentStatus();
12265  status->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
12266  delete (yysemantic_stack_[(2) - (2)].stringVal);
12267  }
12268  break;
12269 
12270  case 1039:
12271 
12272 /* Line 678 of lalr1.cc */
12273 #line 9888 "Parser.yy"
12274  {
12275  delete (yysemantic_stack_[(1) - (1)].pairData);
12276  }
12277  break;
12278 
12279  case 1042:
12280 
12281 /* Line 678 of lalr1.cc */
12282 #line 9896 "Parser.yy"
12283  {
12284  (yyval.stringVal) = (yysemantic_stack_[(4) - (3)].stringVal);
12285  }
12286  break;
12287 
12288  case 1043:
12289 
12290 /* Line 678 of lalr1.cc */
12291 #line 9902 "Parser.yy"
12292  {
12293  if((yysemantic_stack_[(4) - (2)].stringVal));
12294  if(NULL == (yysemantic_stack_[(4) - (3)].valueData))
12295  {
12296  (yyval.valueData) = new ValueData();
12297  (yyval.valueData)->mValues.push_back( Value(
12299  }
12300  else
12301  {
12302  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
12303  }
12304  }
12305  break;
12306 
12307  case 1044:
12308 
12309 /* Line 678 of lalr1.cc */
12310 #line 9918 "Parser.yy"
12311  {
12312  (yyval.valueData) = NULL;
12313  }
12314  break;
12315 
12316  case 1045:
12317 
12318 /* Line 678 of lalr1.cc */
12319 #line 9922 "Parser.yy"
12320  {
12321  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
12322  (yyval.valueData)->mValues.push_back( Value(
12323  Value::eValueTypeString, *(yysemantic_stack_[(2) - (2)].stringVal) ) );
12324  delete (yysemantic_stack_[(2) - (2)].stringVal);
12325  }
12326  break;
12327 
12328  case 1046:
12329 
12330 /* Line 678 of lalr1.cc */
12331 #line 9929 "Parser.yy"
12332  {
12333  (yyval.valueData) = ((yysemantic_stack_[(2) - (1)].valueData)) ? (yysemantic_stack_[(2) - (1)].valueData) : new ValueData();
12334  (yyval.valueData)->mValues.push_back( Value(
12335  Value::eValueTypeString, *(yysemantic_stack_[(2) - (2)].stringVal) ) );
12336  delete (yysemantic_stack_[(2) - (2)].stringVal);
12337  }
12338  break;
12339 
12340  case 1047:
12341 
12342 /* Line 678 of lalr1.cc */
12343 #line 9936 "Parser.yy"
12344  {
12345  (yyval.valueData) = (yysemantic_stack_[(2) - (2)].valueData);
12346  if((yysemantic_stack_[(2) - (1)].valueData))
12347  {
12348  (yysemantic_stack_[(2) - (1)].valueData)->mValues.insert((yysemantic_stack_[(2) - (1)].valueData)->mValues.end(),
12349  (yyval.valueData)->mValues.begin(), (yyval.valueData)->mValues.end() );
12350  (yyval.valueData)->mValues = (yysemantic_stack_[(2) - (1)].valueData)->mValues;
12351  delete (yysemantic_stack_[(2) - (1)].valueData);
12352  }
12353  }
12354  break;
12355 
12356  case 1048:
12357 
12358 /* Line 678 of lalr1.cc */
12359 #line 9949 "Parser.yy"
12360  {
12361  (yyval.stringVal) = (yysemantic_stack_[(1) - (1)].stringVal);
12362  }
12363  break;
12364 
12365  case 1049:
12366 
12367 /* Line 678 of lalr1.cc */
12368 #line 9953 "Parser.yy"
12369  {
12370  (yyval.stringVal) = (yysemantic_stack_[(2) - (1)].stringVal);
12371  }
12372  break;
12373 
12374  case 1050:
12375 
12376 /* Line 678 of lalr1.cc */
12377 #line 9959 "Parser.yy"
12378  {
12379  (yyval.nameData) = (yysemantic_stack_[(4) - (3)].nameData);
12380  }
12381  break;
12382 
12383  case 1064:
12384 
12385 /* Line 678 of lalr1.cc */
12386 #line 9980 "Parser.yy"
12387  {
12388  delete (yysemantic_stack_[(2) - (2)].stringVal);
12389  }
12390  break;
12391 
12392  case 1065:
12393 
12394 /* Line 678 of lalr1.cc */
12395 #line 9984 "Parser.yy"
12396  {
12397  delete (yysemantic_stack_[(2) - (2)].stringVal);
12398  }
12399  break;
12400 
12401  case 1074:
12402 
12403 /* Line 678 of lalr1.cc */
12404 #line 10008 "Parser.yy"
12405  {
12406  delete (yysemantic_stack_[(1) - (1)].logicRefData);
12407  }
12408  break;
12409 
12410  case 1081:
12411 
12412 /* Line 678 of lalr1.cc */
12413 #line 10022 "Parser.yy"
12414  {
12415  log("PRINT TECHNOLOGY \n");
12416  }
12417  break;
12418 
12419  case 1087:
12420 
12421 /* Line 678 of lalr1.cc */
12422 #line 10033 "Parser.yy"
12423  {
12424  delete (yysemantic_stack_[(2) - (2)].stringVal);
12425  }
12426  break;
12427 
12428  case 1088:
12429 
12430 /* Line 678 of lalr1.cc */
12431 #line 10037 "Parser.yy"
12432  {
12433  delete (yysemantic_stack_[(2) - (2)].stringVal);
12434  }
12435  break;
12436 
12437  case 1089:
12438 
12439 /* Line 678 of lalr1.cc */
12440 #line 10043 "Parser.yy"
12441  {
12442  if((yysemantic_stack_[(4) - (3)].integerVal));
12443  }
12444  break;
12445 
12446  case 1091:
12447 
12448 /* Line 678 of lalr1.cc */
12449 #line 10052 "Parser.yy"
12450  {
12452  ForbiddenEventSharedPtr forbiddenEvent
12453  = ctx->getCurrentForbiddenEvent();
12454  EventSharedPtr event
12455  = ctx->getCurrentEvent();
12456  event->setType(Event::eTypeEvent);
12457  forbiddenEvent->setStartTimeInterval(event);
12458  ctx->setCurrentEvent(EventSharedPtr());
12459  }
12460  break;
12461 
12462  case 1092:
12463 
12464 /* Line 678 of lalr1.cc */
12465 #line 10063 "Parser.yy"
12466  {
12467  boost::scoped_ptr<PairData> data((yysemantic_stack_[(1) - (1)].pairData));
12468  Value::Number num(data->mX, data->mY);
12469  Value val(Value::eValueTypeNumber, num);
12470 
12472  ForbiddenEventSharedPtr forbiddenEvent
12473  = ctx->getCurrentForbiddenEvent();
12474  EventSharedPtr event
12475  = ctx->getCurrentEvent();
12476  event->setType(Event::eTypeOffsetEvent);
12477  event->setOffsetTime(val);
12478  forbiddenEvent->setStartTimeInterval(event);
12479  ctx->setCurrentEvent(EventSharedPtr());
12480  }
12481  break;
12482 
12483  case 1093:
12484 
12485 /* Line 678 of lalr1.cc */
12486 #line 10081 "Parser.yy"
12487  {
12489  ForbiddenEventSharedPtr forbiddenEvent
12490  = ctx->getCurrentForbiddenEvent();
12491  EventSharedPtr event
12492  = ctx->getCurrentEvent();
12493  event->setType(Event::eTypeEvent);
12494  forbiddenEvent->setEndTimeInterval(event);
12495  ctx->setCurrentEvent(EventSharedPtr());
12496  }
12497  break;
12498 
12499  case 1094:
12500 
12501 /* Line 678 of lalr1.cc */
12502 #line 10092 "Parser.yy"
12503  {
12504  boost::scoped_ptr<PairData> data((yysemantic_stack_[(1) - (1)].pairData));
12505  Value::Number num(data->mX, data->mY);
12506  Value val(Value::eValueTypeNumber, num);
12507 
12509  ForbiddenEventSharedPtr forbiddenEvent
12510  = ctx->getCurrentForbiddenEvent();
12511  EventSharedPtr event
12512  = ctx->getCurrentEvent();
12513  event->setType(Event::eTypeOffsetEvent);
12514  event->setOffsetTime(val);
12515  forbiddenEvent->setEndTimeInterval(event);
12516  ctx->setCurrentEvent(EventSharedPtr());
12517  }
12518  break;
12519 
12520  case 1095:
12521 
12522 /* Line 678 of lalr1.cc */
12523 #line 10108 "Parser.yy"
12524  {
12526  ForbiddenEventSharedPtr forbiddenEvent
12527  = ctx->getCurrentForbiddenEvent();
12528 
12529  boost::scoped_ptr<PairData> data((yysemantic_stack_[(1) - (1)].pairData));
12530  Value::Number num(data->mX, data->mY);
12531  Value val(Value::eValueTypeNumber, num);
12532  forbiddenEvent->setDuration(val);
12533  }
12534  break;
12535 
12536  case 1096:
12537 
12538 /* Line 678 of lalr1.cc */
12539 #line 10121 "Parser.yy"
12540  {
12541  if((yysemantic_stack_[(9) - (3)].integerVal));
12542  if((yysemantic_stack_[(9) - (4)].integerVal));
12543  if((yysemantic_stack_[(9) - (5)].integerVal));
12544  if((yysemantic_stack_[(9) - (6)].integerVal));
12545  if((yysemantic_stack_[(9) - (7)].integerVal));
12546  if((yysemantic_stack_[(9) - (8)].integerVal));
12547  (yyval.timeStamp) = new TimeStamp();
12548  (yyval.timeStamp)->setYear((yysemantic_stack_[(9) - (3)].integerVal));
12549  (yyval.timeStamp)->setMonth((yysemantic_stack_[(9) - (4)].integerVal));
12550  (yyval.timeStamp)->setDay((yysemantic_stack_[(9) - (5)].integerVal));
12551  (yyval.timeStamp)->setHour((yysemantic_stack_[(9) - (6)].integerVal));
12552  (yyval.timeStamp)->setMinute((yysemantic_stack_[(9) - (7)].integerVal));
12553  (yyval.timeStamp)->setSecond((yysemantic_stack_[(9) - (8)].integerVal));
12554  }
12555  break;
12556 
12557  case 1097:
12558 
12559 /* Line 678 of lalr1.cc */
12560 #line 10139 "Parser.yy"
12561  {
12562  TimingSharedPtr timing;
12564  = inDriver.getContext();
12565  try
12566  {
12567  ctx->getFactory()->create(timing);
12568  }
12569  catch(Error &e)
12570  {
12571  std::string message = constructErrorMessage(
12572  "Unable to create timing" );
12573  log("%s\n", message.c_str());
12574  e.setCurrentLocation( __FUNCTION__,
12575  __FILE__, __LINE__ );
12576  e.saveContextData("Parser error message", message);
12577  e.saveContextData("Filename", yyloc.begin.filename);
12578  e.saveContextData("StartLine", yyloc.begin.line);
12579  e.saveContextData("EndLine", yyloc.end.line);
12581  error(yyloc, message);
12582  YYABORT;
12583  }
12584  ctx->setCurrentTiming(timing);
12585  }
12586  break;
12587 
12588  case 1098:
12589 
12590 /* Line 678 of lalr1.cc */
12591 #line 10164 "Parser.yy"
12592  {
12593  // Note : Need to do the followings, from where Timing called
12594  //EdifContextSharedPtr ctx = inDriver.getContext();
12595  //ctx->setCurrentTiming(TimingSharedPtr());
12596  }
12597  break;
12598 
12599  case 1099:
12600 
12601 /* Line 678 of lalr1.cc */
12602 #line 10172 "Parser.yy"
12603  {
12605  = inDriver.getContext();
12606  TimingSharedPtr timing
12607  = ctx->getCurrentTiming();
12608  timing->setDerivation(
12609  static_cast<Derivation>((yysemantic_stack_[(1) - (1)].integerVal)) );
12610  }
12611  break;
12612 
12613  case 1102:
12614 
12615 /* Line 678 of lalr1.cc */
12616 #line 10183 "Parser.yy"
12617  {
12619  = inDriver.getContext();
12620  TimingSharedPtr timing
12621  = ctx->getCurrentTiming();
12622  timing->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
12623  delete (yysemantic_stack_[(2) - (2)].stringVal);
12624  }
12625  break;
12626 
12627  case 1103:
12628 
12629 /* Line 678 of lalr1.cc */
12630 #line 10192 "Parser.yy"
12631  {
12633  = inDriver.getContext();
12634  TimingSharedPtr timing
12635  = ctx->getCurrentTiming();
12636  timing->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
12637  delete (yysemantic_stack_[(2) - (2)].stringVal);
12638  }
12639  break;
12640 
12641  case 1111:
12642 
12643 /* Line 678 of lalr1.cc */
12644 #line 10214 "Parser.yy"
12645  {
12647  = inDriver.getContext();
12648  LogicElementSharedPtr logicElem;
12649  try
12650  {
12651  ctx->getFactory()->create(logicElem);
12652  logicElem->setType(LogicElement::eTypeTransition);
12653  }
12654  catch(Error &e)
12655  {
12656  std::string message = constructErrorMessage(
12657  "Unable to create transition" );
12658  log("%s\n", message.c_str());
12659  e.setCurrentLocation( __FUNCTION__,
12660  __FILE__, __LINE__ );
12661  e.saveContextData("Parser error message", message);
12662  e.saveContextData("Filename", yyloc.begin.filename);
12663  e.saveContextData("StartLine", yyloc.begin.line);
12664  e.saveContextData("EndLine", yyloc.end.line);
12666  error(yyloc, message);
12667  YYABORT;
12668  }
12669  ctx->pushLogicElement(logicElem);
12670  ctx->incrementLogicElementDepth();
12671  }
12672  break;
12673 
12674  case 1135:
12675 
12676 /* Line 678 of lalr1.cc */
12677 #line 10284 "Parser.yy"
12678  {
12679  (yyval.integerVal) = (yysemantic_stack_[(4) - (3)].integerVal);
12680  }
12681  break;
12682 
12683  case 1136:
12684 
12685 /* Line 678 of lalr1.cc */
12686 #line 10290 "Parser.yy"
12687  {
12688  (yyval.integerVal) = 1;
12689  }
12690  break;
12691 
12692  case 1137:
12693 
12694 /* Line 678 of lalr1.cc */
12695 #line 10294 "Parser.yy"
12696  {
12697  (yyval.integerVal) = 2;
12698  }
12699  break;
12700 
12701  case 1138:
12702 
12703 /* Line 678 of lalr1.cc */
12704 #line 10298 "Parser.yy"
12705  {
12706  (yyval.integerVal) = 3;
12707  }
12708  break;
12709 
12710  case 1139:
12711 
12712 /* Line 678 of lalr1.cc */
12713 #line 10302 "Parser.yy"
12714  {
12715  (yyval.integerVal) = 4;
12716  }
12717  break;
12718 
12719  case 1140:
12720 
12721 /* Line 678 of lalr1.cc */
12722 #line 10306 "Parser.yy"
12723  {
12724  (yyval.integerVal) = 5;
12725  }
12726  break;
12727 
12728  case 1141:
12729 
12730 /* Line 678 of lalr1.cc */
12731 #line 10310 "Parser.yy"
12732  {
12733  (yyval.integerVal) = 6;
12734  }
12735  break;
12736 
12737  case 1142:
12738 
12739 /* Line 678 of lalr1.cc */
12740 #line 10314 "Parser.yy"
12741  {
12742  (yyval.integerVal) = 7;
12743  }
12744  break;
12745 
12746  case 1143:
12747 
12748 /* Line 678 of lalr1.cc */
12749 #line 10318 "Parser.yy"
12750  {
12751  (yyval.integerVal) = 8;
12752  }
12753  break;
12754 
12755  case 1144:
12756 
12757 /* Line 678 of lalr1.cc */
12758 #line 10322 "Parser.yy"
12759  {
12760  (yyval.integerVal) = 9;
12761  }
12762  break;
12763 
12764  case 1145:
12765 
12766 /* Line 678 of lalr1.cc */
12767 #line 10326 "Parser.yy"
12768  {
12769  (yyval.integerVal) = 10;
12770  }
12771  break;
12772 
12773  case 1146:
12774 
12775 /* Line 678 of lalr1.cc */
12776 #line 10330 "Parser.yy"
12777  {
12778  (yyval.integerVal) = 11;
12779  }
12780  break;
12781 
12782  case 1147:
12783 
12784 /* Line 678 of lalr1.cc */
12785 #line 10334 "Parser.yy"
12786  {
12787  (yyval.integerVal) = 12;
12788  }
12789  break;
12790 
12791  case 1148:
12792 
12793 /* Line 678 of lalr1.cc */
12794 #line 10338 "Parser.yy"
12795  {
12796  (yyval.integerVal) = 13;
12797  }
12798  break;
12799 
12800  case 1149:
12801 
12802 /* Line 678 of lalr1.cc */
12803 #line 10342 "Parser.yy"
12804  {
12805  (yyval.integerVal) = 14;
12806  }
12807  break;
12808 
12809  case 1150:
12810 
12811 /* Line 678 of lalr1.cc */
12812 #line 10346 "Parser.yy"
12813  {
12814  (yyval.integerVal) = 15;
12815  }
12816  break;
12817 
12818  case 1151:
12819 
12820 /* Line 678 of lalr1.cc */
12821 #line 10350 "Parser.yy"
12822  {
12823  (yyval.integerVal) = 16;
12824  }
12825  break;
12826 
12827  case 1153:
12828 
12829 /* Line 678 of lalr1.cc */
12830 #line 10359 "Parser.yy"
12831  {
12832  (yyval.integerVal) = 1;
12833  }
12834  break;
12835 
12836  case 1154:
12837 
12838 /* Line 678 of lalr1.cc */
12839 #line 10365 "Parser.yy"
12840  {
12843  }
12844  break;
12845 
12846  case 1155:
12847 
12848 /* Line 678 of lalr1.cc */
12849 #line 10369 "Parser.yy"
12850  {
12852  (yyval.stringVal) = new std::string(val);
12855  }
12856  break;
12857 
12858  case 1156:
12859 
12860 /* Line 678 of lalr1.cc */
12861 #line 10378 "Parser.yy"
12862  {
12863  delete (yysemantic_stack_[(1) - (1)].stringVal);
12864  }
12865  break;
12866 
12867  case 1157:
12868 
12869 /* Line 678 of lalr1.cc */
12870 #line 10382 "Parser.yy"
12871  {
12872  if((yysemantic_stack_[(2) - (2)].integerVal));
12873  }
12874  break;
12875 
12876  case 1158:
12877 
12878 /* Line 678 of lalr1.cc */
12879 #line 10386 "Parser.yy"
12880  {
12881  delete (yysemantic_stack_[(2) - (2)].stringVal);
12882  }
12883  break;
12884 
12885  case 1159:
12886 
12887 /* Line 678 of lalr1.cc */
12888 #line 10390 "Parser.yy"
12889  {
12890  delete (yysemantic_stack_[(2) - (2)].stringVal);
12891  }
12892  break;
12893 
12894  case 1167:
12895 
12896 /* Line 678 of lalr1.cc */
12897 #line 10409 "Parser.yy"
12898  {
12899  (yyval.stringVal) = (yysemantic_stack_[(4) - (3)].stringVal);
12900  }
12901  break;
12902 
12903  case 1168:
12904 
12905 /* Line 678 of lalr1.cc */
12906 #line 10415 "Parser.yy"
12907  {
12908  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(3) - (3)].nameData));
12909  std::string name = nameData->mName;
12911  ViewSharedPtr view;
12912  CellSharedPtr cell = ctx->getCurrentCell();
12913  view = cell->findView(name);
12914  bool isCellExtern = cell->getIsExtern();
12915  if(view)
12916  {
12917  log("Found existing view\n");
12918  if(isCellExtern)
12919  {
12920  if(!view->getIsExtern())
12921  {
12922  std::string message = constructErrorMessage(
12923  "View %s already exists in cell %s\n",
12924  name.c_str(), view->getName().c_str() );
12925  log("%s\n", message.c_str());
12927  __FUNCTION__, __FILE__, __LINE__ );
12928  e.setCurrentLocation( __FUNCTION__,
12929  __FILE__, __LINE__ );
12930  e.saveContextData("Parser error message", message);
12931  e.saveContextData("Filename", yyloc.begin.filename);
12932  e.saveContextData("StartLine", yyloc.begin.line);
12933  e.saveContextData("EndLine", yyloc.end.line);
12935  error(yyloc, message);
12936  YYABORT;
12937  }
12938  else
12939  {
12940  log( "Extern view %s already exists in %s\n",
12941  name.c_str(), cell->getName().c_str() );
12942  }
12943  }
12944  else
12945  {
12946  if(view->getIsExtern())
12947  {
12948  log("Found extern view of this name\n");
12949  view->setIsExtern(false);
12950  ctx->setIsViewBeingLinked(true);
12951  }
12952  else
12953  {
12954  log("View %s already found.. Ignoring\n",
12955  name.c_str());
12956  //TBD::WARN
12957 #if 0
12958  std::string message = constructErrorMessage(
12959  "View %s already exists in cell %s\n",
12960  name.c_str(), cell->getName().c_str() );
12961  log("%s\n", message.c_str());
12963  __FUNCTION__, __FILE__, __LINE__ );
12964  e.setCurrentLocation( __FUNCTION__,
12965  __FILE__, __LINE__ );
12966  e.saveContextData("Parser error message", message);
12967  e.saveContextData("Filename", yyloc.begin.filename);
12968  e.saveContextData("StartLine", yyloc.begin.line);
12969  e.saveContextData("EndLine", yyloc.end.line);
12971  error(yyloc, message);
12972  YYABORT;
12973 #endif
12974  }
12975  }
12976  }
12977  else
12978  {
12979  try
12980  {
12981  ctx->getFactory()->create(view);
12982  }
12983  catch(Error &e)
12984  {
12985  std::string message = constructErrorMessage(
12986  "Unable to create View : %s",
12987  view->getName().c_str());
12988  log("%s\n", message.c_str());
12989  e.setCurrentLocation( __FUNCTION__,
12990  __FILE__, __LINE__ );
12991  e.saveContextData("Parser error message", message);
12992  e.saveContextData("Filename", yyloc.begin.filename);
12993  e.saveContextData("StartLine", yyloc.begin.line);
12994  e.saveContextData("EndLine", yyloc.end.line);
12996  error(yyloc, message);
12997  YYABORT;
12998  }
12999  view->setName(name);
13000  if(!nameData->mOriginalName.empty())
13001  {
13002  view->setOriginalName(nameData->mOriginalName);
13003  }
13004  view->setIsExtern(isCellExtern);
13005  view->setParent(cell);
13006  cell->addView(view);
13007  LinkerSharedPtr linker = ctx->getLinker();
13008  Linker::NameSpec viewNameSpec(
13009  cell->getParent()->getName(),
13010  cell->getName(), view->getName() );
13011  if(isCellExtern)
13012  {
13013  linker->setExternView(viewNameSpec, view);
13014  log("Extern view %s saved in linker.\n",
13015  view->getName().c_str() );
13016  }
13017  else
13018  {
13019  linker->linkUnresolved(viewNameSpec, view);
13020  }
13021  log("Created view %s\n", view->getName().c_str());
13022  }
13023  ctx->setCurrentView(view);
13024  log("View %s added\n",
13025  view->getName().c_str());
13026  ctx->pushPropertyContainer(view);
13027  ctx->pushStatusContainer(view);
13028  }
13029  break;
13030 
13031  case 1169:
13032 
13033 /* Line 678 of lalr1.cc */
13034 #line 10537 "Parser.yy"
13035  {
13036  ViewSharedPtr view = inDriver.getContext()->getCurrentView();
13037  if(View::eTypeNetlist != view->getType())
13038  {
13039  view->setNonNetlistViewData(inDriver.getLexer()->getBuffer());
13040  }
13041  inDriver.getContext()->setCurrentView(
13042  ViewSharedPtr() );
13043  inDriver.getContext()->setIsViewBeingLinked(false);
13044  inDriver.getContext()->popPropertyContainer();
13045  inDriver.getContext()->popStatusContainer();
13046 
13048  log("%s\n", inDriver.getLexer()->getBuffer().c_str());
13049 
13051  }
13052  break;
13053 
13054  case 1170:
13055 
13056 /* Line 678 of lalr1.cc */
13057 #line 10557 "Parser.yy"
13058  {
13060  ViewSharedPtr view = ctx->getCurrentView();
13061  if((yysemantic_stack_[(1) - (1)].interfaceAttributes))
13062  {
13063  InterfaceAttributesSharedPtr attrib((yysemantic_stack_[(1) - (1)].interfaceAttributes));
13064  view->setInterfaceAttributes(attrib);
13065  }
13066  }
13067  break;
13068 
13069  case 1173:
13070 
13071 /* Line 678 of lalr1.cc */
13072 #line 10569 "Parser.yy"
13073  {
13075  ViewSharedPtr view = ctx->getCurrentView();
13076  view->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
13077  delete (yysemantic_stack_[(2) - (2)].stringVal);
13078  }
13079  break;
13080 
13081  case 1175:
13082 
13083 /* Line 678 of lalr1.cc */
13084 #line 10577 "Parser.yy"
13085  {
13087  ViewSharedPtr view = ctx->getCurrentView();
13088  if(View::eTypeNetlist == view->getType())
13089  {
13090  view->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
13091  delete (yysemantic_stack_[(2) - (2)].stringVal);
13092  }
13093  }
13094  break;
13095 
13096  case 1188:
13097 
13098 /* Line 678 of lalr1.cc */
13099 #line 10607 "Parser.yy"
13100  {
13101  delete (yysemantic_stack_[(2) - (2)].stringVal);
13102  }
13103  break;
13104 
13105  case 1189:
13106 
13107 /* Line 678 of lalr1.cc */
13108 #line 10611 "Parser.yy"
13109  {
13110  delete (yysemantic_stack_[(2) - (2)].stringVal);
13111  }
13112  break;
13113 
13114  case 1196:
13115 
13116 /* Line 678 of lalr1.cc */
13117 #line 10633 "Parser.yy"
13118  {
13119  if(NULL == (yysemantic_stack_[(5) - (4)].viewRefData))
13120  {
13121  (yyval.viewRefData) = new ViewRefData();
13122  }
13123  else
13124  {
13125  (yyval.viewRefData) = (yysemantic_stack_[(5) - (4)].viewRefData);
13126  }
13127  (yyval.viewRefData)->mViewName = (yysemantic_stack_[(5) - (3)].nameData);
13128  }
13129  break;
13130 
13131  case 1197:
13132 
13133 /* Line 678 of lalr1.cc */
13134 #line 10647 "Parser.yy"
13135  {
13136  (yyval.viewRefData) = NULL; //Current view
13137  }
13138  break;
13139 
13140  case 1198:
13141 
13142 /* Line 678 of lalr1.cc */
13143 #line 10651 "Parser.yy"
13144  {
13145  (yyval.viewRefData) = (yysemantic_stack_[(1) - (1)].viewRefData);
13146  }
13147  break;
13148 
13149  case 1199:
13150 
13151 /* Line 678 of lalr1.cc */
13152 #line 10657 "Parser.yy"
13153  {
13154  View::Type viewType = static_cast<View::Type>((yysemantic_stack_[(4) - (3)].integerVal));
13155  if(View::eTypeNetlist != viewType)
13156  {
13157  //TBD::WARN
13158  std::string message = constructErrorMessage(
13159  "Warning::View types other than netlist are ignored");
13160  log("%s\n", message.c_str());
13161  // Error e( eMessageIdParserWarning,
13162  // __FUNCTION__, __FILE__, __LINE__ );
13163  // e.saveContextData("Parser warning message", message);
13164  // e.saveContextData("Filename", yyloc.begin.filename);
13165  // e.saveContextData("StartLine", yyloc.begin.line);
13166  // e.saveContextData("EndLine", yyloc.end.line);
13167  // inDriver.setParserError(e);
13168  // error(yyloc, message);
13169  // YYABORT;
13172  }
13173  inDriver.getContext()->getCurrentView()->setType(
13174  viewType );
13175  }
13176  break;
13177 
13178  case 1200:
13179 
13180 /* Line 678 of lalr1.cc */
13181 #line 10683 "Parser.yy"
13182  {
13183  (yyval.integerVal) = View::eTypeMaskLayout;
13184  }
13185  break;
13186 
13187  case 1201:
13188 
13189 /* Line 678 of lalr1.cc */
13190 #line 10687 "Parser.yy"
13191  {
13192  (yyval.integerVal) = View::eTypePCBLayout;
13193  }
13194  break;
13195 
13196  case 1202:
13197 
13198 /* Line 678 of lalr1.cc */
13199 #line 10691 "Parser.yy"
13200  {
13201  (yyval.integerVal) = View::eTypeNetlist;
13202  }
13203  break;
13204 
13205  case 1203:
13206 
13207 /* Line 678 of lalr1.cc */
13208 #line 10695 "Parser.yy"
13209  {
13210  (yyval.integerVal) = View::eTypeSchematic;
13211  }
13212  break;
13213 
13214  case 1204:
13215 
13216 /* Line 678 of lalr1.cc */
13217 #line 10699 "Parser.yy"
13218  {
13219  (yyval.integerVal) = View::eTypeSymbolic;
13220  }
13221  break;
13222 
13223  case 1205:
13224 
13225 /* Line 678 of lalr1.cc */
13226 #line 10703 "Parser.yy"
13227  {
13228  (yyval.integerVal) = View::eTypeBehavior;
13229  }
13230  break;
13231 
13232  case 1206:
13233 
13234 /* Line 678 of lalr1.cc */
13235 #line 10707 "Parser.yy"
13236  {
13237  (yyval.integerVal) = View::eTypeLogicModel;
13238  }
13239  break;
13240 
13241  case 1207:
13242 
13243 /* Line 678 of lalr1.cc */
13244 #line 10711 "Parser.yy"
13245  {
13246  (yyval.integerVal) = View::eTypeDocument;
13247  }
13248  break;
13249 
13250  case 1208:
13251 
13252 /* Line 678 of lalr1.cc */
13253 #line 10715 "Parser.yy"
13254  {
13255  (yyval.integerVal) = View::eTypeGraphic;
13256  }
13257  break;
13258 
13259  case 1209:
13260 
13261 /* Line 678 of lalr1.cc */
13262 #line 10719 "Parser.yy"
13263  {
13264  (yyval.integerVal) = View::eTypeStranger;
13265  }
13266  break;
13267 
13268  case 1210:
13269 
13270 /* Line 678 of lalr1.cc */
13271 #line 10725 "Parser.yy"
13272  {
13273  if((yysemantic_stack_[(4) - (3)].integerVal));
13274  }
13275  break;
13276 
13277  case 1211:
13278 
13279 /* Line 678 of lalr1.cc */
13280 #line 10731 "Parser.yy"
13281  {
13282  (yyval.valueData) = (yysemantic_stack_[(4) - (3)].valueData);
13283  }
13284  break;
13285 
13286  case 1212:
13287 
13288 /* Line 678 of lalr1.cc */
13289 #line 10737 "Parser.yy"
13290  {
13291  if((yysemantic_stack_[(4) - (3)].nameData))
13292  {
13293  boost::scoped_ptr<NameData> nameData((yysemantic_stack_[(4) - (3)].nameData));
13294  std::string name = nameData->mName;
13296  WaveValueSharedPtr waveValue;
13297  try
13298  {
13299  ctx->getFactory()->create(waveValue);
13300  waveValue->setName(name);
13301  }
13302  catch(Error &e)
13303  {
13304  std::string message = constructErrorMessage(
13305  "Unable to create WaveValue" );
13306  log("%s\n", message.c_str());
13307  e.setCurrentLocation( __FUNCTION__,
13308  __FILE__, __LINE__ );
13309  e.saveContextData("Parser error message", message);
13310  e.saveContextData("Filename", yyloc.begin.filename);
13311  e.saveContextData("StartLine", yyloc.begin.line);
13312  e.saveContextData("EndLine", yyloc.end.line);
13314  error(yyloc, message);
13315  YYABORT;
13316  }
13317  boost::scoped_ptr<PairData> data((yysemantic_stack_[(4) - (4)].pairData));
13318  Value::Number num(data->mX, data->mY);
13319  Value val(Value::eValueTypeNumber, num);
13320  waveValue->setDeltaTimeDuration(val);
13321 
13322  SimulateSharedPtr simulate
13323  = ctx->getCurrentSimulate();
13324  try
13325  {
13326  simulate->addWaveValue(waveValue);
13327  }
13328  catch(Error &e)
13329  {
13330  std::string message = constructErrorMessage(
13331  "Unable to add wave value : %s",
13332  waveValue->getName().c_str());
13333  log("%s\n", message.c_str());
13334  e.setCurrentLocation( __FUNCTION__,
13335  __FILE__, __LINE__ );
13336  e.saveContextData("Parser error message", message);
13337  e.saveContextData("Filename", yyloc.begin.filename);
13338  e.saveContextData("StartLine", yyloc.begin.line);
13339  e.saveContextData("EndLine", yyloc.end.line);
13341  error(yyloc, message);
13342  YYABORT;
13343  }
13344  ctx->setCurrentWaveValue(waveValue);
13345  }
13346  }
13347  break;
13348 
13349  case 1213:
13350 
13351 /* Line 678 of lalr1.cc */
13352 #line 10794 "Parser.yy"
13353  {
13355  ctx->setCurrentWaveValue(WaveValueSharedPtr());
13356  }
13357  break;
13358 
13359  case 1214:
13360 
13361 /* Line 678 of lalr1.cc */
13362 #line 10801 "Parser.yy"
13363  {
13364  (yyval.nameData) = (yysemantic_stack_[(4) - (3)].nameData);
13365  }
13366  break;
13367 
13368  case 1215:
13369 
13370 /* Line 678 of lalr1.cc */
13371 #line 10807 "Parser.yy"
13372  {
13373  InterfaceJoinedInfoSharedPtr joinedInfo;
13375  = inDriver.getContext();
13376  try
13377  {
13378  ctx->getFactory()->create(joinedInfo);
13379  joinedInfo->setJoinedType(
13381  }
13382  catch(Error &e)
13383  {
13384  std::string message = constructErrorMessage(
13385  "Unable to create weak joined info" );
13386  log("%s\n", message.c_str());
13387  e.setCurrentLocation( __FUNCTION__,
13388  __FILE__, __LINE__ );
13389  e.saveContextData("Parser error message", message);
13390  e.saveContextData("Filename", yyloc.begin.filename);
13391  e.saveContextData("StartLine", yyloc.begin.line);
13392  e.saveContextData("EndLine", yyloc.end.line);
13394  error(yyloc, message);
13395  YYABORT;
13396  }
13397  if(ctx->getInterfaceJoinedInfoDepth() == 0 )
13398  {
13399  ctx->getCurrentView()->addInterfaceJoinedInfo(joinedInfo);
13400  }
13401  ctx->pushInterfaceJoinedInfo(joinedInfo);
13402  ctx->incrementInterfaceJoinedInfoDepth();
13403  }
13404  break;
13405 
13406  case 1216:
13407 
13408 /* Line 678 of lalr1.cc */
13409 #line 10839 "Parser.yy"
13410  {
13412  InterfaceJoinedInfoSharedPtr currentJoinedInfo
13413  = ctx->getCurrentInterfaceJoinedInfo();
13414  ctx->popInterfaceJoinedInfo();
13415  InterfaceJoinedInfoSharedPtr parentJoinedInfo;
13416  if(ctx->getInterfaceJoinedInfoDepth() > 1 )
13417  {
13418  parentJoinedInfo = ctx->getCurrentInterfaceJoinedInfo();
13419  }
13420  ctx->decrementInterfaceJoinedInfoDepth();
13421  if(parentJoinedInfo)
13422  {
13423  parentJoinedInfo->setRelationType(
13425  currentJoinedInfo->setRelationType(
13427  //Check size
13428  size_t parentJoinedInfoSize = parentJoinedInfo->getSize();
13429  size_t currentJoinedInfoSize = currentJoinedInfo->getSize();
13430 
13431  log("Parent joined info Size :: %d\n",
13432  parentJoinedInfoSize );
13433  log("Current joined info Size :: %d\n",
13434  currentJoinedInfoSize );
13435 
13436  //std::cout << "Parent joined info Size :: " << parentJoinedInfoSize << std::endl;
13437  //std::cout << "Current joined info Size :: " << currentJoinedInfoSize << std::endl;
13438 
13439  std::vector< InterfaceJoinedInfoSharedPtr > outJoinedInfos;
13440  parentJoinedInfo->getChildren(outJoinedInfos);
13441 
13442  std::list< PortSharedPtr > outPorts;
13443  parentJoinedInfo->getPorts(outPorts);
13444 
13445  std::list< PortListSharedPtr > outPortLists;
13446  parentJoinedInfo->getPortLists(outPortLists);
13447 
13448  if(parentJoinedInfoSize != 0)
13449  {
13450  if( parentJoinedInfoSize
13451  == currentJoinedInfoSize )
13452  {
13453  parentJoinedInfo->addChildJoinedInfo(
13454  currentJoinedInfo );
13455  }
13456  else
13457  {
13458  std::string message = constructErrorMessage(
13459  "Child joined info can't be added, port size mismatch %d with %d",
13460  parentJoinedInfoSize,
13461  currentJoinedInfoSize);
13462  log("%s\n", message.c_str());
13464  __FUNCTION__, __FILE__, __LINE__ );
13465  e.saveContextData("Parser error message", message);
13466  e.saveContextData("Filename", yyloc.begin.filename);
13467  e.saveContextData("StartLine", yyloc.begin.line);
13468  e.saveContextData("EndLine", yyloc.end.line);
13470  error(yyloc, message);
13471  YYABORT;
13472  }
13473  }
13474  else
13475  {
13476  parentJoinedInfo->addChildJoinedInfo(
13477  currentJoinedInfo );
13478  }
13479  }
13480  else
13481  {
13482  ctx->pushInterfaceJoinedInfo(currentJoinedInfo);
13483  }
13484  }
13485  break;
13486 
13487  case 1218:
13488 
13489 /* Line 678 of lalr1.cc */
13490 #line 10918 "Parser.yy"
13491  {
13492  boost::scoped_ptr<PortRefData> portData((yysemantic_stack_[(2) - (2)].portRefData));
13493  NameData *portNameData = portData->mPortName;
13494  std::string name = portNameData->mName;
13496  = inDriver.getContext();
13497  ViewSharedPtr view = ctx->getCurrentView();
13498 
13499  PortRefData *currPortRef = (yysemantic_stack_[(2) - (2)].portRefData);
13500  PortRefData *nextPortRef = portData->mParentPort;
13501  std::vector< std::string > nestedNames;
13502  nestedNames.push_back(currPortRef->mPortName->mName);
13503  while(nextPortRef)
13504  {
13505  currPortRef = nextPortRef;
13506  nestedNames.push_back(nextPortRef->mPortName->mName);
13507  nextPortRef = currPortRef->mParentPort;
13508  }
13509  bool isPort = (NULL == currPortRef->mInstanceName);
13510  std::string topName = *(nestedNames.rbegin());
13511  if(isPort)
13512  {
13513  PortSharedPtr port = view->findPort(topName);
13514  if(!port)
13515  {
13516  std::string message = constructErrorMessage(
13517  "No port %s found in view %s\n",
13518  name.c_str(),
13519  view->getName().c_str());
13520  log("%s\n", message.c_str());
13522  __FUNCTION__, __FILE__, __LINE__ );
13523  e.saveContextData("Parser error message", message);
13524  e.saveContextData("Filename", yyloc.begin.filename);
13525  e.saveContextData("StartLine", yyloc.begin.line);
13526  e.saveContextData("EndLine", yyloc.end.line);
13528  error(yyloc, message);
13529  YYABORT;
13530  }
13531 
13532  InterfaceJoinedInfoSharedPtr currentJoinedInfo
13533  = ctx->getCurrentInterfaceJoinedInfo();
13534  try
13535  {
13536  connectibleFinder(nestedNames, port);
13537  if(!portData->mPortName->mIndices.empty())
13538  {
13539  port = port->get(portData->mPortName->mIndices);
13540  }
13541  //Check port size
13542  std::list< PortSharedPtr > outPorts;
13543  currentJoinedInfo->getPorts(outPorts);
13544 
13545  if(!outPorts.empty())
13546  {
13547  PortSharedPtr firstPort = outPorts.front();
13548  std::list< PortSharedPtr >::iterator it
13549  = std::find(outPorts.begin(), outPorts.end(),
13550  port);
13551  if(it != outPorts.end())
13552  {
13553  std::string message = constructErrorMessage(
13554  "Port %s already exist in weakJoined info",
13555  port->getName().c_str() );
13556  log("%s\n", message.c_str());
13558  __FUNCTION__, __FILE__, __LINE__ );
13559  e.saveContextData("Parser error message", message);
13560  e.saveContextData("Filename", yyloc.begin.filename);
13561  e.saveContextData("StartLine", yyloc.begin.line);
13562  e.saveContextData("EndLine", yyloc.end.line);
13564  error(yyloc, message);
13565  YYABORT;
13566  }
13567  else
13568  {
13569  if(firstPort->getSize() == port->getSize())
13570  {
13571  currentJoinedInfo->addPort(port);
13572  }
13573  else
13574  {
13575  std::string message = constructErrorMessage(
13576  "Port %s can't be added, port size mismatch %d with %d",
13577  name.c_str(),
13578  firstPort->getSize(),
13579  port->getSize());
13580  log("%s\n", message.c_str());
13582  __FUNCTION__, __FILE__, __LINE__ );
13583  e.saveContextData("Parser error message", message);
13584  e.saveContextData("Filename", yyloc.begin.filename);
13585  e.saveContextData("StartLine", yyloc.begin.line);
13586  e.saveContextData("EndLine", yyloc.end.line);
13588  error(yyloc, message);
13589  YYABORT;
13590  }
13591  }
13592  }
13593  else
13594  {
13595  currentJoinedInfo->addPort(port);
13596  }
13597  }
13598  catch(Error &e)
13599  {
13601  __FUNCTION__, __FILE__, __LINE__ );
13602  throw;
13603  }
13604  }
13605  else
13606  {
13607  }
13608  }
13609  break;
13610 
13611  case 1219:
13612 
13613 /* Line 678 of lalr1.cc */
13614 #line 11037 "Parser.yy"
13615  {
13616  if(NULL != (yysemantic_stack_[(2) - (2)].portListData) && !(yysemantic_stack_[(2) - (2)].portListData)->mPortRefs.empty())
13617  {
13618  boost::scoped_ptr<PortListData> portListData((yysemantic_stack_[(2) - (2)].portListData));
13619  std::string message;
13620 
13622  PortListSharedPtr portList;
13623  ctx->getFactory()->create(portList);
13624 
13625  InterfaceJoinedInfoSharedPtr currentJoinedInfo
13626  = ctx->getCurrentInterfaceJoinedInfo();
13627 
13628  for( std::vector<PortRefData *>::iterator it
13629  = portListData->mPortRefs.begin();
13630  it != portListData->mPortRefs.end(); ++it )
13631  {
13632  PortRefData *portData = *it;
13633  std::vector< std::string > nestedNames;
13634  PortRefData *currPortRef = *it;
13635  PortRefData *nextPortRef = portData->mParentPort;
13636  nestedNames.push_back(currPortRef->mPortName->mName);
13637  while(nextPortRef)
13638  {
13639  currPortRef = nextPortRef;
13640  nestedNames.push_back(nextPortRef->mPortName->mName);
13641  nextPortRef = currPortRef->mParentPort;
13642  }
13643  bool isPort = (NULL == currPortRef->mInstanceName);
13644  NameData *portNameData = currPortRef->mPortName;
13645  std::string topName = *(nestedNames.rbegin());
13646  ViewSharedPtr view = ctx->getCurrentView();
13647  if(isPort)
13648  {
13649  PortSharedPtr port = view->findPort(topName);
13650  if(!port)
13651  {
13652  std::string message = constructErrorMessage(
13653  "No port %s found in view %s\n",
13654  portNameData->mName.c_str(),
13655  view->getName().c_str());
13656  log("%s\n", message.c_str());
13658  __FUNCTION__, __FILE__, __LINE__ );
13659  e.saveContextData("Parser error message", message);
13660  e.saveContextData("Filename", yyloc.begin.filename);
13661  e.saveContextData("StartLine", yyloc.begin.line);
13662  e.saveContextData("EndLine", yyloc.end.line);
13664  error(yyloc, message);
13665  YYABORT;
13666  }
13667 
13668  try
13669  {
13670  connectibleFinder(nestedNames, port);
13671  if(!portData->mPortName->mIndices.empty())
13672  {
13673  port = port->get(portData->mPortName->mIndices);
13674  }
13675  portList->addChildPort(port);
13676  }
13677  catch(Error &e)
13678  {
13679  std::string message = constructErrorMessage(
13680  "Unable to connect port : %s",
13681  port->getName().c_str());
13682  log("%s\n", message.c_str());
13683  e.setCurrentLocation( __FUNCTION__,
13684  __FILE__, __LINE__ );
13685  e.saveContextData("Parser error message", message);
13686  e.saveContextData("Filename", yyloc.begin.filename);
13687  e.saveContextData("StartLine", yyloc.begin.line);
13688  e.saveContextData("EndLine", yyloc.end.line);
13690  error(yyloc, message);
13691  YYABORT;
13692  }
13693  }
13694  else
13695  {
13696  }
13697  }
13698  if(currentJoinedInfo->getSize() == portList->getSize())
13699  {
13700  currentJoinedInfo->addPortList(portList);
13701  }
13702  else
13703  {
13704  std::string message = constructErrorMessage(
13705  "Port size mismatch %d with %d",
13706  currentJoinedInfo->getSize(),
13707  portList->getSize());
13708  log("%s\n", message.c_str());
13710  __FUNCTION__, __FILE__, __LINE__ );
13711  e.saveContextData("Parser error message", message);
13712  e.saveContextData("Filename", yyloc.begin.filename);
13713  e.saveContextData("StartLine", yyloc.begin.line);
13714  e.saveContextData("EndLine", yyloc.end.line);
13716  error(yyloc, message);
13717  YYABORT;
13718  }
13719  }
13720  }
13721  break;
13722 
13723  case 1227:
13724 
13725 /* Line 678 of lalr1.cc */
13726 #line 11155 "Parser.yy"
13727  {
13728  delete (yysemantic_stack_[(2) - (2)].stringVal);
13729  }
13730  break;
13731 
13732  case 1228:
13733 
13734 /* Line 678 of lalr1.cc */
13735 #line 11159 "Parser.yy"
13736  {
13737  delete (yysemantic_stack_[(2) - (2)].stringVal);
13738  }
13739  break;
13740 
13741  case 1229:
13742 
13743 /* Line 678 of lalr1.cc */
13744 #line 11165 "Parser.yy"
13745  {
13746  WrittenSharedPtr written;
13748  = inDriver.getContext();
13749  try
13750  {
13751  ctx->getFactory()->create(written);
13752  }
13753  catch(Error &e)
13754  {
13755  std::string message = constructErrorMessage(
13756  "Unable to create Written" );
13757  log("%s\n", message.c_str());
13758  e.setCurrentLocation( __FUNCTION__,
13759  __FILE__, __LINE__ );
13760  e.saveContextData("Parser error message", message);
13761  e.saveContextData("Filename", yyloc.begin.filename);
13762  e.saveContextData("StartLine", yyloc.begin.line);
13763  e.saveContextData("EndLine", yyloc.end.line);
13765  error(yyloc, message);
13766  YYABORT;
13767  }
13768  ctx->setCurrentWritten(written);
13769  ctx->pushPropertyContainer(written);
13770  }
13771  break;
13772 
13773  case 1230:
13774 
13775 /* Line 678 of lalr1.cc */
13776 #line 11191 "Parser.yy"
13777  {
13779  StatusSharedPtr status = ctx->getCurrentStatus();
13780  WrittenSharedPtr written = ctx->getCurrentWritten();
13781  status->addWritten(written);
13782  ctx->setCurrentWritten(WrittenSharedPtr());
13783  ctx->popPropertyContainer();
13784  }
13785  break;
13786 
13787  case 1231:
13788 
13789 /* Line 678 of lalr1.cc */
13790 #line 11202 "Parser.yy"
13791  {
13793  WrittenSharedPtr written = ctx->getCurrentWritten();
13794  written->setTimeStamp(*(yysemantic_stack_[(1) - (1)].timeStamp));
13795  delete (yysemantic_stack_[(1) - (1)].timeStamp);
13796  }
13797  break;
13798 
13799  case 1232:
13800 
13801 /* Line 678 of lalr1.cc */
13802 #line 11209 "Parser.yy"
13803  {
13805  WrittenSharedPtr written = ctx->getCurrentWritten();
13806  written->setAuthorName(*(yysemantic_stack_[(2) - (2)].stringVal));
13807  delete (yysemantic_stack_[(2) - (2)].stringVal);
13808  }
13809  break;
13810 
13811  case 1233:
13812 
13813 /* Line 678 of lalr1.cc */
13814 #line 11216 "Parser.yy"
13815  {
13816  boost::scoped_ptr<PairStrData> data((yysemantic_stack_[(2) - (2)].pairStrData));
13818  WrittenSharedPtr written = ctx->getCurrentWritten();
13819  written->setProgramName(data->mFirst);
13820  written->setProgramVersion(data->mSecond);
13821  }
13822  break;
13823 
13824  case 1234:
13825 
13826 /* Line 678 of lalr1.cc */
13827 #line 11224 "Parser.yy"
13828  {
13829  boost::scoped_ptr<PairStrData> data((yysemantic_stack_[(2) - (2)].pairStrData));
13831  WrittenSharedPtr written = ctx->getCurrentWritten();
13832  written->setDataOriginLocationName(data->mFirst);
13833  written->setDataOriginVersion(data->mSecond);
13834  }
13835  break;
13836 
13837  case 1236:
13838 
13839 /* Line 678 of lalr1.cc */
13840 #line 11233 "Parser.yy"
13841  {
13843  WrittenSharedPtr written = ctx->getCurrentWritten();
13844  written->addComment(*(yysemantic_stack_[(2) - (2)].stringVal));
13845  delete (yysemantic_stack_[(2) - (2)].stringVal);
13846  }
13847  break;
13848 
13849  case 1237:
13850 
13851 /* Line 678 of lalr1.cc */
13852 #line 11240 "Parser.yy"
13853  {
13855  WrittenSharedPtr written = ctx->getCurrentWritten();
13856  written->addUserData(*(yysemantic_stack_[(2) - (2)].stringVal));
13857  delete (yysemantic_stack_[(2) - (2)].stringVal);
13858  }
13859  break;
13860 
13861  case 1238:
13862 
13863 /* Line 678 of lalr1.cc */
13864 #line 11249 "Parser.yy"
13865  {
13866  (yyval.stringVal) = (yysemantic_stack_[(1) - (1)].stringVal);
13867  }
13868  break;
13869 
13870  case 1239:
13871 
13872 /* Line 678 of lalr1.cc */
13873 #line 11255 "Parser.yy"
13874  {
13875  (yyval.stringVal) =(yysemantic_stack_[(1) - (1)].stringVal);
13876  }
13877  break;
13878 
13879  case 1240:
13880 
13881 /* Line 678 of lalr1.cc */
13882 #line 11261 "Parser.yy"
13883  {
13884  (yyval.integerVal) =(yysemantic_stack_[(1) - (1)].integerVal);
13885  }
13886  break;
13887 
13888  case 1241:
13889 
13890 /* Line 678 of lalr1.cc */
13891 #line 11267 "Parser.yy"
13892  {
13893  inDriver.getLexer()->setIsIdContext(true);
13894  delete (yysemantic_stack_[(1) - (1)].stringVal);
13895  }
13896  break;
13897 
13898 
13899 
13900 /* Line 678 of lalr1.cc */
13901 #line 13902 "Parser.cc"
13902  default:
13903  break;
13904  }
13905  YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
13906 
13907  yypop_ (yylen);
13908  yylen = 0;
13909  YY_STACK_PRINT ();
13910 
13911  yysemantic_stack_.push (yyval);
13912  yylocation_stack_.push (yyloc);
13913 
13914  /* Shift the result of the reduction. */
13915  yyn = yyr1_[yyn];
13916  yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
13917  if (0 <= yystate && yystate <= yylast_
13918  && yycheck_[yystate] == yystate_stack_[0])
13919  yystate = yytable_[yystate];
13920  else
13921  yystate = yydefgoto_[yyn - yyntokens_];
13922  goto yynewstate;
13923 
13924  /*------------------------------------.
13925  | yyerrlab -- here on detecting error |
13926  `------------------------------------*/
13927  yyerrlab:
13928  /* If not already recovering from an error, report this error. */
13929  if (!yyerrstatus_)
13930  {
13931  ++yynerrs_;
13932  error (yylloc, yysyntax_error_ (yystate, yytoken));
13933  }
13934 
13935  yyerror_range[0] = yylloc;
13936  if (yyerrstatus_ == 3)
13937  {
13938  /* If just tried and failed to reuse lookahead token after an
13939  error, discard it. */
13940 
13941  if (yychar <= yyeof_)
13942  {
13943  /* Return failure if at end of input. */
13944  if (yychar == yyeof_)
13945  YYABORT;
13946  }
13947  else
13948  {
13949  yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc);
13950  yychar = yyempty_;
13951  }
13952  }
13953 
13954  /* Else will try to reuse lookahead token after shifting the error
13955  token. */
13956  goto yyerrlab1;
13957 
13958 
13959  /*---------------------------------------------------.
13960  | yyerrorlab -- error raised explicitly by YYERROR. |
13961  `---------------------------------------------------*/
13962  yyerrorlab:
13963 
13964  /* Pacify compilers like GCC when the user code never invokes
13965  YYERROR and the label yyerrorlab therefore never appears in user
13966  code. */
13967  if (false)
13968  goto yyerrorlab;
13969 
13970  yyerror_range[0] = yylocation_stack_[yylen - 1];
13971  /* Do not reclaim the symbols of the rule which action triggered
13972  this YYERROR. */
13973  yypop_ (yylen);
13974  yylen = 0;
13975  yystate = yystate_stack_[0];
13976  goto yyerrlab1;
13977 
13978  /*-------------------------------------------------------------.
13979  | yyerrlab1 -- common code for both syntax error and YYERROR. |
13980  `-------------------------------------------------------------*/
13981  yyerrlab1:
13982  yyerrstatus_ = 3; /* Each real token shifted decrements this. */
13983 
13984  for (;;)
13985  {
13986  yyn = yypact_[yystate];
13987  if (yyn != yypact_ninf_)
13988  {
13989  yyn += yyterror_;
13990  if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
13991  {
13992  yyn = yytable_[yyn];
13993  if (0 < yyn)
13994  break;
13995  }
13996  }
13997 
13998  /* Pop the current state because it cannot handle the error token. */
13999  if (yystate_stack_.height () == 1)
14000  YYABORT;
14001 
14002  yyerror_range[0] = yylocation_stack_[0];
14003  yydestruct_ ("Error: popping",
14004  yystos_[yystate],
14006  yypop_ ();
14007  yystate = yystate_stack_[0];
14008  YY_STACK_PRINT ();
14009  }
14010 
14011  yyerror_range[1] = yylloc;
14012  // Using YYLLOC is tempting, but would change the location of
14013  // the lookahead. YYLOC is available though.
14014  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
14015  yysemantic_stack_.push (yylval);
14016  yylocation_stack_.push (yyloc);
14017 
14018  /* Shift the error token. */
14019  YY_SYMBOL_PRINT ("Shifting", yystos_[yyn],
14021 
14022  yystate = yyn;
14023  goto yynewstate;
14024 
14025  /* Accept. */
14026  yyacceptlab:
14027  yyresult = 0;
14028  goto yyreturn;
14029 
14030  /* Abort. */
14031  yyabortlab:
14032  yyresult = 1;
14033  goto yyreturn;
14034 
14035  yyreturn:
14036  if (yychar != yyempty_)
14037  yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
14038 
14039  /* Do not reclaim the symbols of the rule which action triggered
14040  this YYABORT or YYACCEPT. */
14041  yypop_ (yylen);
14042  while (yystate_stack_.height () != 1)
14043  {
14044  yydestruct_ ("Cleanup: popping",
14045  yystos_[yystate_stack_[0]],
14046  &yysemantic_stack_[0],
14047  &yylocation_stack_[0]);
14048  yypop_ ();
14049  }
14050 
14051  return yyresult;
14052  }
boost::shared_ptr< LogicValue > LogicValueSharedPtr
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
void log(const char *fmt,...)
Definition: Log.cpp:89
static const short int yypact_ninf_
Definition: Parser.h:537
boost::shared_ptr< Instance > InstanceSharedPtr
boost::shared_ptr< StatusContainer > StatusContainerSharedPtr
location location_type
Symbol locations.
Definition: Parser.h:159
boost::shared_ptr< EdifContext > EdifContextSharedPtr
Represents attributes of a Net object.
boost::shared_ptr< NetAttributes > NetAttributesSharedPtr
boost::shared_ptr< ParameterArray > ParameterArraySharedPtr
boost::shared_ptr< ScalarPort > ScalarPortSharedPtr
#define YY_REDUCE_PRINT(Rule)
Definition: Parser.cc:483
boost::shared_ptr< WaveValue > WaveValueSharedPtr
boost::shared_ptr< ScalarNet > ScalarNetSharedPtr
static const int yyterror_
Definition: Parser.h:619
boost::shared_ptr< PropertyContainer > PropertyContainerSharedPtr
boost::shared_ptr< LogicElement > LogicElementSharedPtr
boost::shared_ptr< PortBundle > PortBundleSharedPtr
boost::shared_ptr< Permutable > PermutableSharedPtr
Present a slice of the top of a stack.
This structure is for logicRef and libraryRef used in logicMapInput/logicMapOutput.
void setNominal(const Value::Number &inSource)
Definition: Value.cpp:88
class Driver & inDriver
Definition: Parser.h:626
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
std::vector< size_t > mIndices
void setMax(const Value::Number &inSource)
Definition: Value.cpp:78
std::vector< Value > mValues
stack< semantic_type > semantic_stack_type
Semantic value stack type.
Definition: Parser.h:521
boost::shared_ptr< Linker > LinkerSharedPtr
Represents the netDelay attribute of Net.
Definition: NetDelay.hpp:32
boost::shared_ptr< Parameter > ParameterSharedPtr
state_stack_type yystate_stack_
The state stack.
Definition: Parser.h:526
boost::shared_ptr< Written > WrittenSharedPtr
boost::shared_ptr< ObjectFactory > ObjectFactorySharedPtr
static const unsigned short int yydefact_[]
Definition: Parser.h:542
boost::shared_ptr< InstanceArray > InstanceArraySharedPtr
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
void setMin(const Value::Number &inSource)
Definition: Value.cpp:83
void setAppendToUserDataBuffer(bool inAppendToBuffer)
Definition: Scanner.cc:7098
void setAppendToBuffer(bool inAppendToBuffer)
Definition: Scanner.cc:7088
boost::shared_ptr< Simulate > SimulateSharedPtr
std::string string
boost::shared_ptr< Design > DesignSharedPtr
std::string getUserDataBuffer()
Definition: Scanner.hpp:128
boost::shared_ptr< PortAttributes > PortAttributesSharedPtr
stack< state_type > state_stack_type
State stack type.
Definition: Parser.h:519
boost::shared_ptr< VectorPort > VectorPortSharedPtr
boost::shared_ptr< VectorNet > VectorNetSharedPtr
static const unsigned short int yyr1_[]
For a rule, its LHS.
Definition: Parser.h:561
The Error object thrown by different methods of EdifOM.
Definition: Error.hpp:41
location_stack_type yylocation_stack_
The location stack.
Definition: Parser.h:530
#define YYABORT
Definition: Parser.cc:492
boost::shared_ptr< LogicalResponse > LogicalResponseSharedPtr
#define yylex
Definition: Parser.cc:86
boost::shared_ptr< Net > NetSharedPtr
static const int yyfinal_
Definition: Parser.h:618
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: LutParser.hpp:126
Represents the time in Universal Time Coordinate (year, month, day, hour, minute, second) ...
Definition: TimeStamp.hpp:29
void push(const T &t)
Bison undocumented.
boost::shared_ptr< Library > LibrarySharedPtr
void yypop_(unsigned int n=1)
Pop n symbols the three stacks.
Definition: Parser.cc:2085
boost::shared_ptr< PortReference > PortReferenceSharedPtr
boost::shared_ptr< SimulationInfo > SimulationInfoSharedPtr
static const short int yypgoto_[]
Definition: Parser.h:544
boost::shared_ptr< ForbiddenEvent > ForbiddenEventSharedPtr
boost::shared_ptr< PortList > PortListSharedPtr
boost::shared_ptr< Apply > ApplySharedPtr
void saveContextData(const std::string &inName, const boost::any &inSource)
Definition: Error.cpp:79
EdifContextSharedPtr getContext() const
Definition: Driver.hpp:127
Represents attributes of a view interface.
boost::shared_ptr< Event > EventSharedPtr
virtual std::string yysyntax_error_(int yystate, int tok)
Definition: Parser.cc:14056
static const short int yydefgoto_[]
Definition: Parser.h:545
boost::shared_ptr< SingleParameter > SingleParameterSharedPtr
Create port reference.
Scanner * getLexer() const
Definition: Driver.hpp:119
This class is used within simulationInfo construct to define a logic value to use for modeling...
static const int yyeof_
Definition: Parser.h:613
#define YY_STACK_PRINT()
Definition: Parser.cc:484
boost::shared_ptr< InterfaceAttributes > InterfaceAttributesSharedPtr
semantic_stack_type yysemantic_stack_
The semantic value stack.
Definition: Parser.h:528
std::string getBuffer()
Definition: Scanner.hpp:120
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
void yydestruct_(const char *yymsg, int yytype, semantic_type *yyvaluep, location_type *yylocationp)
Reclaim the memory associated to a symbol.
Definition: Parser.cc:591
token_number_type yytranslate_(int t)
Convert a scanner token number t to a symbol number.
Definition: Parser.cc:16449
boost::shared_ptr< View > ViewSharedPtr
boost::shared_ptr< Cell > CellSharedPtr
static const int yyntokens_
Definition: Parser.h:621
void setParserError(const Error &inSource)
Definition: Driver.cpp:85
boost::shared_ptr< InterfaceJoinedInfo > InterfaceJoinedInfoSharedPtr
boost::shared_ptr< PortListAlias > PortListAliasSharedPtr
boost::shared_ptr< Port > PortSharedPtr
boost::shared_ptr< PathDelay > PathDelaySharedPtr
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: Parser.cc:482
boost::shared_ptr< Property > PropertySharedPtr
boost::shared_ptr< SingleInstance > SingleInstanceSharedPtr
static const int yylast_
Definition: Parser.h:615
boost::shared_ptr< Timing > TimingSharedPtr
boost::shared_ptr< Status > StatusSharedPtr
boost::shared_ptr< NetBundle > NetBundleSharedPtr
std::string & getStreamName()
Definition: Driver.hpp:123
boost::shared_ptr< Root > RootSharedPtr
void setIsIdContext(bool inIsIdContext)
Definition: Scanner.hpp:112
static const unsigned char yyr2_[]
For a rule, its RHS length.
Definition: Parser.h:563
#define YYCDEBUG
Definition: Parser.cc:481
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)
Definition: Error.cpp:73

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::generic::Parser::set_debug_level ( debug_level_type  l)

Set the current debugging level.

+ Here is the caller graph for this function:

void torc::generic::Parser::set_debug_stream ( std::ostream &  )

Set the current debugging stream.

virtual void torc::generic::Parser::yy_reduce_print_ ( int  r)
privatevirtual

Report on the debug stream that the rule r is going to be reduced.

virtual void torc::generic::Parser::yy_symbol_print_ ( int  yytype,
const semantic_type yyvaluep,
const location_type yylocationp 
)
privatevirtual

Report a symbol on the debug stream.

Parameters
yytypeThe token type.
yyvaluepIts semantic value.
yylocationpIts location.
virtual void torc::generic::Parser::yy_symbol_value_print_ ( int  yytype,
const semantic_type yyvaluep,
const location_type yylocationp 
)
privatevirtual

Report a symbol value on the debug stream.

Parameters
yytypeThe token type.
yyvaluepIts semantic value.
yylocationpIts location.
void torc::generic::Parser::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 591 of file Parser.cc.

593  {
594  YYUSE (yylocationp);
595  YYUSE (yymsg);
596  YYUSE (yyvaluep);
597 
598  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
599 
600  switch (yytype)
601  {
602  case 4: /* "\"identifier\"" */
603 
604 /* Line 480 of lalr1.cc */
605 #line 578 "Parser.yy"
606  { delete (yyvaluep->stringVal); };
607 
608 /* Line 480 of lalr1.cc */
609 #line 610 "Parser.cc"
610  break;
611  case 5: /* "\"integer\"" */
612 
613 /* Line 480 of lalr1.cc */
614 #line 573 "Parser.yy"
615  { };
616 
617 /* Line 480 of lalr1.cc */
618 #line 619 "Parser.cc"
619  break;
620  case 6: /* "\"double\"" */
621 
622 /* Line 480 of lalr1.cc */
623 #line 574 "Parser.yy"
624  { };
625 
626 /* Line 480 of lalr1.cc */
627 #line 628 "Parser.cc"
628  break;
629  case 7: /* "\"string\"" */
630 
631 /* Line 480 of lalr1.cc */
632 #line 578 "Parser.yy"
633  { delete (yyvaluep->stringVal); };
634 
635 /* Line 480 of lalr1.cc */
636 #line 637 "Parser.cc"
637  break;
638  case 300: /* "EdifFileName" */
639 
640 /* Line 480 of lalr1.cc */
641 #line 575 "Parser.yy"
642  { };
643 
644 /* Line 480 of lalr1.cc */
645 #line 646 "Parser.cc"
646  break;
647  case 301: /* "EdifLevel" */
648 
649 /* Line 480 of lalr1.cc */
650 #line 573 "Parser.yy"
651  { };
652 
653 /* Line 480 of lalr1.cc */
654 #line 655 "Parser.cc"
655  break;
656  case 302: /* "EdifVersion" */
657 
658 /* Line 480 of lalr1.cc */
659 #line 576 "Parser.yy"
660  { };
661 
662 /* Line 480 of lalr1.cc */
663 #line 664 "Parser.cc"
664  break;
665  case 303: /* "AcLoad" */
666 
667 /* Line 480 of lalr1.cc */
668 #line 578 "Parser.yy"
669  { delete (yyvaluep->valueData); };
670 
671 /* Line 480 of lalr1.cc */
672 #line 673 "Parser.cc"
673  break;
674  case 304: /* "_AcLoad" */
675 
676 /* Line 480 of lalr1.cc */
677 #line 578 "Parser.yy"
678  { delete (yyvaluep->valueData); };
679 
680 /* Line 480 of lalr1.cc */
681 #line 682 "Parser.cc"
682  break;
683  case 313: /* "ArrayData" */
684 
685 /* Line 480 of lalr1.cc */
686 #line 575 "Parser.yy"
687  { };
688 
689 /* Line 480 of lalr1.cc */
690 #line 691 "Parser.cc"
691  break;
692  case 314: /* "_ArrayData" */
693 
694 /* Line 480 of lalr1.cc */
695 #line 578 "Parser.yy"
696  { delete (yyvaluep->arrayDimensions); };
697 
698 /* Line 480 of lalr1.cc */
699 #line 700 "Parser.cc"
700  break;
701  case 315: /* "_IntegerList" */
702 
703 /* Line 480 of lalr1.cc */
704 #line 578 "Parser.yy"
705  { delete (yyvaluep->arrayDimensions); };
706 
707 /* Line 480 of lalr1.cc */
708 #line 709 "Parser.cc"
709  break;
710  case 322: /* "Author" */
711 
712 /* Line 480 of lalr1.cc */
713 #line 578 "Parser.yy"
714  { delete (yyvaluep->stringVal); };
715 
716 /* Line 480 of lalr1.cc */
717 #line 718 "Parser.cc"
718  break;
719  case 330: /* "Boolean" */
720 
721 /* Line 480 of lalr1.cc */
722 #line 578 "Parser.yy"
723  { delete (yyvaluep->valueData); };
724 
725 /* Line 480 of lalr1.cc */
726 #line 727 "Parser.cc"
727  break;
728  case 331: /* "_Boolean" */
729 
730 /* Line 480 of lalr1.cc */
731 #line 578 "Parser.yy"
732  { delete (yyvaluep->valueData); };
733 
734 /* Line 480 of lalr1.cc */
735 #line 736 "Parser.cc"
736  break;
737  case 332: /* "BooleanDisp" */
738 
739 /* Line 480 of lalr1.cc */
740 #line 573 "Parser.yy"
741  { };
742 
743 /* Line 480 of lalr1.cc */
744 #line 745 "Parser.cc"
745  break;
746  case 333: /* "_BooleanDisp" */
747 
748 /* Line 480 of lalr1.cc */
749 #line 573 "Parser.yy"
750  { };
751 
752 /* Line 480 of lalr1.cc */
753 #line 754 "Parser.cc"
754  break;
755  case 334: /* "BooleanMap" */
756 
757 /* Line 480 of lalr1.cc */
758 #line 573 "Parser.yy"
759  { };
760 
761 /* Line 480 of lalr1.cc */
762 #line 763 "Parser.cc"
763  break;
764  case 335: /* "BooleanValue" */
765 
766 /* Line 480 of lalr1.cc */
767 #line 573 "Parser.yy"
768  { };
769 
770 /* Line 480 of lalr1.cc */
771 #line 772 "Parser.cc"
772  break;
773  case 342: /* "CellNameDef" */
774 
775 /* Line 480 of lalr1.cc */
776 #line 575 "Parser.yy"
777  { };
778 
779 /* Line 480 of lalr1.cc */
780 #line 781 "Parser.cc"
781  break;
782  case 343: /* "CellRef" */
783 
784 /* Line 480 of lalr1.cc */
785 #line 578 "Parser.yy"
786  { delete (yyvaluep->cellRefData); };
787 
788 /* Line 480 of lalr1.cc */
789 #line 790 "Parser.cc"
790  break;
791  case 344: /* "_CellRef" */
792 
793 /* Line 480 of lalr1.cc */
794 #line 578 "Parser.yy"
795  { delete (yyvaluep->cellRefData); };
796 
797 /* Line 480 of lalr1.cc */
798 #line 799 "Parser.cc"
799  break;
800  case 345: /* "CellRefData" */
801 
802 /* Line 480 of lalr1.cc */
803 #line 578 "Parser.yy"
804  { delete (yyvaluep->viewRefData); };
805 
806 /* Line 480 of lalr1.cc */
807 #line 808 "Parser.cc"
808  break;
809  case 346: /* "_CellRefData" */
810 
811 /* Line 480 of lalr1.cc */
812 #line 578 "Parser.yy"
813  { delete (yyvaluep->viewRefData); };
814 
815 /* Line 480 of lalr1.cc */
816 #line 817 "Parser.cc"
817  break;
818  case 347: /* "CellNameRef" */
819 
820 /* Line 480 of lalr1.cc */
821 #line 575 "Parser.yy"
822  { };
823 
824 /* Line 480 of lalr1.cc */
825 #line 826 "Parser.cc"
826  break;
827  case 348: /* "CellNameRefData" */
828 
829 /* Line 480 of lalr1.cc */
830 #line 575 "Parser.yy"
831  { };
832 
833 /* Line 480 of lalr1.cc */
834 #line 835 "Parser.cc"
835  break;
836  case 350: /* "_CellType" */
837 
838 /* Line 480 of lalr1.cc */
839 #line 573 "Parser.yy"
840  { };
841 
842 /* Line 480 of lalr1.cc */
843 #line 844 "Parser.cc"
844  break;
845  case 357: /* "Comment" */
846 
847 /* Line 480 of lalr1.cc */
848 #line 578 "Parser.yy"
849  { delete (yyvaluep->stringVal); };
850 
851 /* Line 480 of lalr1.cc */
852 #line 853 "Parser.cc"
853  break;
854  case 358: /* "_Comment" */
855 
856 /* Line 480 of lalr1.cc */
857 #line 578 "Parser.yy"
858  { delete (yyvaluep->stringVal); };
859 
860 /* Line 480 of lalr1.cc */
861 #line 862 "Parser.cc"
862  break;
863  case 361: /* "Compound" */
864 
865 /* Line 480 of lalr1.cc */
866 #line 578 "Parser.yy"
867  { delete (yyvaluep->logicListData); };
868 
869 /* Line 480 of lalr1.cc */
870 #line 871 "Parser.cc"
871  break;
872  case 362: /* "_Compound" */
873 
874 /* Line 480 of lalr1.cc */
875 #line 578 "Parser.yy"
876  { delete (yyvaluep->logicListData); };
877 
878 /* Line 480 of lalr1.cc */
879 #line 880 "Parser.cc"
880  break;
881  case 369: /* "Criticality" */
882 
883 /* Line 480 of lalr1.cc */
884 #line 573 "Parser.yy"
885  { };
886 
887 /* Line 480 of lalr1.cc */
888 #line 889 "Parser.cc"
889  break;
890  case 370: /* "_Criticality" */
891 
892 /* Line 480 of lalr1.cc */
893 #line 573 "Parser.yy"
894  { };
895 
896 /* Line 480 of lalr1.cc */
897 #line 898 "Parser.cc"
898  break;
899  case 371: /* "CurrentMap" */
900 
901 /* Line 480 of lalr1.cc */
902 #line 578 "Parser.yy"
903  { delete (yyvaluep->valueData); };
904 
905 /* Line 480 of lalr1.cc */
906 #line 907 "Parser.cc"
907  break;
908  case 375: /* "_Cycle" */
909 
910 /* Line 480 of lalr1.cc */
911 #line 577 "Parser.yy"
912  { };
913 
914 /* Line 480 of lalr1.cc */
915 #line 916 "Parser.cc"
916  break;
917  case 376: /* "DataOrigin" */
918 
919 /* Line 480 of lalr1.cc */
920 #line 578 "Parser.yy"
921  { delete (yyvaluep->pairStrData); };
922 
923 /* Line 480 of lalr1.cc */
924 #line 925 "Parser.cc"
925  break;
926  case 377: /* "_DataOrigin" */
927 
928 /* Line 480 of lalr1.cc */
929 #line 578 "Parser.yy"
930  { delete (yyvaluep->stringVal); };
931 
932 /* Line 480 of lalr1.cc */
933 #line 934 "Parser.cc"
934  break;
935  case 378: /* "DcFanInLoad" */
936 
937 /* Line 480 of lalr1.cc */
938 #line 577 "Parser.yy"
939  { };
940 
941 /* Line 480 of lalr1.cc */
942 #line 943 "Parser.cc"
943  break;
944  case 379: /* "_DcFanInLoad" */
945 
946 /* Line 480 of lalr1.cc */
947 #line 577 "Parser.yy"
948  { };
949 
950 /* Line 480 of lalr1.cc */
951 #line 952 "Parser.cc"
952  break;
953  case 380: /* "DcFanOutLoad" */
954 
955 /* Line 480 of lalr1.cc */
956 #line 577 "Parser.yy"
957  { };
958 
959 /* Line 480 of lalr1.cc */
960 #line 961 "Parser.cc"
961  break;
962  case 381: /* "_DcFanOutLoad" */
963 
964 /* Line 480 of lalr1.cc */
965 #line 577 "Parser.yy"
966  { };
967 
968 /* Line 480 of lalr1.cc */
969 #line 970 "Parser.cc"
970  break;
971  case 382: /* "DcMaxFanIn" */
972 
973 /* Line 480 of lalr1.cc */
974 #line 577 "Parser.yy"
975  { };
976 
977 /* Line 480 of lalr1.cc */
978 #line 979 "Parser.cc"
979  break;
980  case 383: /* "_DcMaxFanIn" */
981 
982 /* Line 480 of lalr1.cc */
983 #line 577 "Parser.yy"
984  { };
985 
986 /* Line 480 of lalr1.cc */
987 #line 988 "Parser.cc"
988  break;
989  case 384: /* "DcMaxFanOut" */
990 
991 /* Line 480 of lalr1.cc */
992 #line 577 "Parser.yy"
993  { };
994 
995 /* Line 480 of lalr1.cc */
996 #line 997 "Parser.cc"
997  break;
998  case 385: /* "_DcMaxFanOut" */
999 
1000 /* Line 480 of lalr1.cc */
1001 #line 577 "Parser.yy"
1002  { };
1003 
1004 /* Line 480 of lalr1.cc */
1005 #line 1006 "Parser.cc"
1006  break;
1007  case 386: /* "DelayData" */
1008 
1009 /* Line 480 of lalr1.cc */
1010 #line 578 "Parser.yy"
1011  { delete (yyvaluep->portDelay); };
1012 
1013 /* Line 480 of lalr1.cc */
1014 #line 1015 "Parser.cc"
1015  break;
1016  case 387: /* "_DelayData" */
1017 
1018 /* Line 480 of lalr1.cc */
1019 #line 578 "Parser.yy"
1020  { delete (yyvaluep->portDelay); };
1021 
1022 /* Line 480 of lalr1.cc */
1023 #line 1024 "Parser.cc"
1024  break;
1025  case 392: /* "Derivation" */
1026 
1027 /* Line 480 of lalr1.cc */
1028 #line 573 "Parser.yy"
1029  { };
1030 
1031 /* Line 480 of lalr1.cc */
1032 #line 1033 "Parser.cc"
1033  break;
1034  case 393: /* "_Derivation" */
1035 
1036 /* Line 480 of lalr1.cc */
1037 #line 573 "Parser.yy"
1038  { };
1039 
1040 /* Line 480 of lalr1.cc */
1041 #line 1042 "Parser.cc"
1042  break;
1043  case 396: /* "_Design" */
1044 
1045 /* Line 480 of lalr1.cc */
1046 #line 578 "Parser.yy"
1047  { delete (yyvaluep->cellRefData); };
1048 
1049 /* Line 480 of lalr1.cc */
1050 #line 1051 "Parser.cc"
1051  break;
1052  case 399: /* "DesignatorData" */
1053 
1054 /* Line 480 of lalr1.cc */
1055 #line 578 "Parser.yy"
1056  { delete (yyvaluep->stringVal); };
1057 
1058 /* Line 480 of lalr1.cc */
1059 #line 1060 "Parser.cc"
1060  break;
1061  case 400: /* "_DesignatorData" */
1062 
1063 /* Line 480 of lalr1.cc */
1064 #line 578 "Parser.yy"
1065  { delete (yyvaluep->stringVal); };
1066 
1067 /* Line 480 of lalr1.cc */
1068 #line 1069 "Parser.cc"
1069  break;
1070  case 401: /* "DesignNameDef" */
1071 
1072 /* Line 480 of lalr1.cc */
1073 #line 575 "Parser.yy"
1074  { };
1075 
1076 /* Line 480 of lalr1.cc */
1077 #line 1078 "Parser.cc"
1078  break;
1079  case 407: /* "_Direction" */
1080 
1081 /* Line 480 of lalr1.cc */
1082 #line 573 "Parser.yy"
1083  { };
1084 
1085 /* Line 480 of lalr1.cc */
1086 #line 1087 "Parser.cc"
1087  break;
1088  case 411: /* "Dominates" */
1089 
1090 /* Line 480 of lalr1.cc */
1091 #line 578 "Parser.yy"
1092  { delete (yyvaluep->logicListData); };
1093 
1094 /* Line 480 of lalr1.cc */
1095 #line 1096 "Parser.cc"
1096  break;
1097  case 412: /* "_Dominates" */
1098 
1099 /* Line 480 of lalr1.cc */
1100 #line 578 "Parser.yy"
1101  { delete (yyvaluep->logicListData); };
1102 
1103 /* Line 480 of lalr1.cc */
1104 #line 1105 "Parser.cc"
1105  break;
1106  case 415: /* "Duration" */
1107 
1108 /* Line 480 of lalr1.cc */
1109 #line 577 "Parser.yy"
1110  { };
1111 
1112 /* Line 480 of lalr1.cc */
1113 #line 1114 "Parser.cc"
1114  break;
1115  case 465: /* "GlobPortRefData" */
1116 
1117 /* Line 480 of lalr1.cc */
1118 #line 575 "Parser.yy"
1119  { };
1120 
1121 /* Line 480 of lalr1.cc */
1122 #line 1123 "Parser.cc"
1123  break;
1124  case 474: /* "_Instance" */
1125 
1126 /* Line 480 of lalr1.cc */
1127 #line 578 "Parser.yy"
1128  { delete (yyvaluep->instanceInfo); };
1129 
1130 /* Line 480 of lalr1.cc */
1131 #line 1132 "Parser.cc"
1132  break;
1133  case 477: /* "InstanceRefData" */
1134 
1135 /* Line 480 of lalr1.cc */
1136 #line 578 "Parser.yy"
1137  { delete (yyvaluep->instanceRef); };
1138 
1139 /* Line 480 of lalr1.cc */
1140 #line 1141 "Parser.cc"
1141  break;
1142  case 478: /* "_InstanceRefData" */
1143 
1144 /* Line 480 of lalr1.cc */
1145 #line 578 "Parser.yy"
1146  { delete (yyvaluep->instanceRef); };
1147 
1148 /* Line 480 of lalr1.cc */
1149 #line 1150 "Parser.cc"
1150  break;
1151  case 485: /* "InstNameDef" */
1152 
1153 /* Line 480 of lalr1.cc */
1154 #line 575 "Parser.yy"
1155  { };
1156 
1157 /* Line 480 of lalr1.cc */
1158 #line 1159 "Parser.cc"
1159  break;
1160  case 487: /* "InstNameRefData" */
1161 
1162 /* Line 480 of lalr1.cc */
1163 #line 575 "Parser.yy"
1164  { };
1165 
1166 /* Line 480 of lalr1.cc */
1167 #line 1168 "Parser.cc"
1168  break;
1169  case 488: /* "IntDisplay" */
1170 
1171 /* Line 480 of lalr1.cc */
1172 #line 573 "Parser.yy"
1173  { };
1174 
1175 /* Line 480 of lalr1.cc */
1176 #line 1177 "Parser.cc"
1177  break;
1178  case 489: /* "_IntDisplay" */
1179 
1180 /* Line 480 of lalr1.cc */
1181 #line 573 "Parser.yy"
1182  { };
1183 
1184 /* Line 480 of lalr1.cc */
1185 #line 1186 "Parser.cc"
1186  break;
1187  case 490: /* "Integer" */
1188 
1189 /* Line 480 of lalr1.cc */
1190 #line 578 "Parser.yy"
1191  { delete (yyvaluep->valueData); };
1192 
1193 /* Line 480 of lalr1.cc */
1194 #line 1195 "Parser.cc"
1195  break;
1196  case 491: /* "_Integer" */
1197 
1198 /* Line 480 of lalr1.cc */
1199 #line 578 "Parser.yy"
1200  { delete (yyvaluep->valueData); };
1201 
1202 /* Line 480 of lalr1.cc */
1203 #line 1204 "Parser.cc"
1204  break;
1205  case 492: /* "Interface" */
1206 
1207 /* Line 480 of lalr1.cc */
1208 #line 578 "Parser.yy"
1209  { delete (yyvaluep->interfaceAttributes); };
1210 
1211 /* Line 480 of lalr1.cc */
1212 #line 1213 "Parser.cc"
1213  break;
1214  case 493: /* "_Interface" */
1215 
1216 /* Line 480 of lalr1.cc */
1217 #line 578 "Parser.yy"
1218  { delete (yyvaluep->interfaceAttributes); };
1219 
1220 /* Line 480 of lalr1.cc */
1221 #line 1222 "Parser.cc"
1222  break;
1223  case 518: /* "LibNameDef" */
1224 
1225 /* Line 480 of lalr1.cc */
1226 #line 575 "Parser.yy"
1227  { };
1228 
1229 /* Line 480 of lalr1.cc */
1230 #line 1231 "Parser.cc"
1231  break;
1232  case 520: /* "LibNameRefData" */
1233 
1234 /* Line 480 of lalr1.cc */
1235 #line 575 "Parser.yy"
1236  { };
1237 
1238 /* Line 480 of lalr1.cc */
1239 #line 1240 "Parser.cc"
1240  break;
1241  case 525: /* "LibraryRefData" */
1242 
1243 /* Line 480 of lalr1.cc */
1244 #line 575 "Parser.yy"
1245  { };
1246 
1247 /* Line 480 of lalr1.cc */
1248 #line 1249 "Parser.cc"
1249  break;
1250  case 530: /* "LoadDelayData" */
1251 
1252 /* Line 480 of lalr1.cc */
1253 #line 578 "Parser.yy"
1254  { delete (yyvaluep->portDelay); };
1255 
1256 /* Line 480 of lalr1.cc */
1257 #line 1258 "Parser.cc"
1258  break;
1259  case 531: /* "_LoadDelayData" */
1260 
1261 /* Line 480 of lalr1.cc */
1262 #line 578 "Parser.yy"
1263  { delete (yyvaluep->valueData); };
1264 
1265 /* Line 480 of lalr1.cc */
1266 #line 1267 "Parser.cc"
1267  break;
1268  case 545: /* "LogicMapIn" */
1269 
1270 /* Line 480 of lalr1.cc */
1271 #line 578 "Parser.yy"
1272  { delete (yyvaluep->logicRefData); };
1273 
1274 /* Line 480 of lalr1.cc */
1275 #line 1276 "Parser.cc"
1276  break;
1277  case 546: /* "LogicMapOut" */
1278 
1279 /* Line 480 of lalr1.cc */
1280 #line 578 "Parser.yy"
1281  { delete (yyvaluep->logicRefData); };
1282 
1283 /* Line 480 of lalr1.cc */
1284 #line 1285 "Parser.cc"
1285  break;
1286  case 547: /* "LogicNameDef" */
1287 
1288 /* Line 480 of lalr1.cc */
1289 #line 575 "Parser.yy"
1290  { };
1291 
1292 /* Line 480 of lalr1.cc */
1293 #line 1294 "Parser.cc"
1294  break;
1295  case 548: /* "LogicNameRefData" */
1296 
1297 /* Line 480 of lalr1.cc */
1298 #line 575 "Parser.yy"
1299  { };
1300 
1301 /* Line 480 of lalr1.cc */
1302 #line 1303 "Parser.cc"
1303  break;
1304  case 559: /* "LogicRef" */
1305 
1306 /* Line 480 of lalr1.cc */
1307 #line 578 "Parser.yy"
1308  { delete (yyvaluep->logicRefData); };
1309 
1310 /* Line 480 of lalr1.cc */
1311 #line 1312 "Parser.cc"
1312  break;
1313  case 560: /* "_LogicRef" */
1314 
1315 /* Line 480 of lalr1.cc */
1316 #line 578 "Parser.yy"
1317  { delete (yyvaluep->logicRefData); };
1318 
1319 /* Line 480 of lalr1.cc */
1320 #line 1321 "Parser.cc"
1321  break;
1322  case 563: /* "_LogicValue" */
1323 
1324 /* Line 480 of lalr1.cc */
1325 #line 578 "Parser.yy"
1326  { delete (yyvaluep->logicValueAttributes); };
1327 
1328 /* Line 480 of lalr1.cc */
1329 #line 1330 "Parser.cc"
1330  break;
1331  case 573: /* "MemberData" */
1332 
1333 /* Line 480 of lalr1.cc */
1334 #line 575 "Parser.yy"
1335  { };
1336 
1337 /* Line 480 of lalr1.cc */
1338 #line 1339 "Parser.cc"
1339  break;
1340  case 574: /* "_MemberData" */
1341 
1342 /* Line 480 of lalr1.cc */
1343 #line 578 "Parser.yy"
1344  { delete (yyvaluep->arrayDimensions); };
1345 
1346 /* Line 480 of lalr1.cc */
1347 #line 1348 "Parser.cc"
1348  break;
1349  case 577: /* "MiNoMa" */
1350 
1351 /* Line 480 of lalr1.cc */
1352 #line 578 "Parser.yy"
1353  { delete (yyvaluep->valueData); };
1354 
1355 /* Line 480 of lalr1.cc */
1356 #line 1357 "Parser.cc"
1357  break;
1358  case 578: /* "_MiNoMa" */
1359 
1360 /* Line 480 of lalr1.cc */
1361 #line 578 "Parser.yy"
1362  { delete (yyvaluep->valueData); };
1363 
1364 /* Line 480 of lalr1.cc */
1365 #line 1366 "Parser.cc"
1366  break;
1367  case 579: /* "MiNoMaDisp" */
1368 
1369 /* Line 480 of lalr1.cc */
1370 #line 578 "Parser.yy"
1371  { delete (yyvaluep->valueData); };
1372 
1373 /* Line 480 of lalr1.cc */
1374 #line 1375 "Parser.cc"
1375  break;
1376  case 580: /* "_MiNoMaDisp" */
1377 
1378 /* Line 480 of lalr1.cc */
1379 #line 578 "Parser.yy"
1380  { delete (yyvaluep->valueData); };
1381 
1382 /* Line 480 of lalr1.cc */
1383 #line 1384 "Parser.cc"
1384  break;
1385  case 581: /* "MiNoMaValue" */
1386 
1387 /* Line 480 of lalr1.cc */
1388 #line 578 "Parser.yy"
1389  { delete (yyvaluep->valueData); };
1390 
1391 /* Line 480 of lalr1.cc */
1392 #line 1393 "Parser.cc"
1393  break;
1394  case 582: /* "Mnm" */
1395 
1396 /* Line 480 of lalr1.cc */
1397 #line 578 "Parser.yy"
1398  { delete (yyvaluep->valueData); };
1399 
1400 /* Line 480 of lalr1.cc */
1401 #line 1402 "Parser.cc"
1402  break;
1403  case 583: /* "_Mnm" */
1404 
1405 /* Line 480 of lalr1.cc */
1406 #line 577 "Parser.yy"
1407  { };
1408 
1409 /* Line 480 of lalr1.cc */
1410 #line 1411 "Parser.cc"
1411  break;
1412  case 589: /* "Name" */
1413 
1414 /* Line 480 of lalr1.cc */
1415 #line 575 "Parser.yy"
1416  { };
1417 
1418 /* Line 480 of lalr1.cc */
1419 #line 1420 "Parser.cc"
1420  break;
1421  case 590: /* "_Name" */
1422 
1423 /* Line 480 of lalr1.cc */
1424 #line 575 "Parser.yy"
1425  { };
1426 
1427 /* Line 480 of lalr1.cc */
1428 #line 1429 "Parser.cc"
1429  break;
1430  case 592: /* "NameDefData" */
1431 
1432 /* Line 480 of lalr1.cc */
1433 #line 575 "Parser.yy"
1434  { };
1435 
1436 /* Line 480 of lalr1.cc */
1437 #line 1438 "Parser.cc"
1438  break;
1439  case 593: /* "NameRef" */
1440 
1441 /* Line 480 of lalr1.cc */
1442 #line 575 "Parser.yy"
1443  { };
1444 
1445 /* Line 480 of lalr1.cc */
1446 #line 1447 "Parser.cc"
1447  break;
1448  case 594: /* "NameRefData" */
1449 
1450 /* Line 480 of lalr1.cc */
1451 #line 575 "Parser.yy"
1452  { };
1453 
1454 /* Line 480 of lalr1.cc */
1455 #line 1456 "Parser.cc"
1456  break;
1457  case 597: /* "_Net" */
1458 
1459 /* Line 480 of lalr1.cc */
1460 #line 578 "Parser.yy"
1461  { delete (yyvaluep->netAttributes); };
1462 
1463 /* Line 480 of lalr1.cc */
1464 #line 1465 "Parser.cc"
1465  break;
1466  case 603: /* "NetDelay" */
1467 
1468 /* Line 480 of lalr1.cc */
1469 #line 578 "Parser.yy"
1470  { delete (yyvaluep->netDelay); };
1471 
1472 /* Line 480 of lalr1.cc */
1473 #line 1474 "Parser.cc"
1474  break;
1475  case 604: /* "_NetDelay" */
1476 
1477 /* Line 480 of lalr1.cc */
1478 #line 578 "Parser.yy"
1479  { delete (yyvaluep->netDelay); };
1480 
1481 /* Line 480 of lalr1.cc */
1482 #line 1483 "Parser.cc"
1483  break;
1484  case 605: /* "NetDelayData" */
1485 
1486 /* Line 480 of lalr1.cc */
1487 #line 578 "Parser.yy"
1488  { delete (yyvaluep->netDelay); };
1489 
1490 /* Line 480 of lalr1.cc */
1491 #line 1492 "Parser.cc"
1492  break;
1493  case 606: /* "_NetDelayData" */
1494 
1495 /* Line 480 of lalr1.cc */
1496 #line 578 "Parser.yy"
1497  { delete (yyvaluep->netDelay); };
1498 
1499 /* Line 480 of lalr1.cc */
1500 #line 1501 "Parser.cc"
1501  break;
1502  case 614: /* "NetNameDef" */
1503 
1504 /* Line 480 of lalr1.cc */
1505 #line 575 "Parser.yy"
1506  { };
1507 
1508 /* Line 480 of lalr1.cc */
1509 #line 1510 "Parser.cc"
1510  break;
1511  case 616: /* "NetNameRefData" */
1512 
1513 /* Line 480 of lalr1.cc */
1514 #line 575 "Parser.yy"
1515  { };
1516 
1517 /* Line 480 of lalr1.cc */
1518 #line 1519 "Parser.cc"
1519  break;
1520  case 619: /* "NetRefData" */
1521 
1522 /* Line 480 of lalr1.cc */
1523 #line 578 "Parser.yy"
1524  { delete (yyvaluep->netRefData); };
1525 
1526 /* Line 480 of lalr1.cc */
1527 #line 1528 "Parser.cc"
1528  break;
1529  case 620: /* "_NetRefData" */
1530 
1531 /* Line 480 of lalr1.cc */
1532 #line 578 "Parser.yy"
1533  { delete (yyvaluep->netRefData); };
1534 
1535 /* Line 480 of lalr1.cc */
1536 #line 1537 "Parser.cc"
1537  break;
1538  case 629: /* "Number" */
1539 
1540 /* Line 480 of lalr1.cc */
1541 #line 578 "Parser.yy"
1542  { delete (yyvaluep->valueData); };
1543 
1544 /* Line 480 of lalr1.cc */
1545 #line 1546 "Parser.cc"
1546  break;
1547  case 630: /* "_Number" */
1548 
1549 /* Line 480 of lalr1.cc */
1550 #line 578 "Parser.yy"
1551  { delete (yyvaluep->valueData); };
1552 
1553 /* Line 480 of lalr1.cc */
1554 #line 1555 "Parser.cc"
1555  break;
1556  case 631: /* "NumbDisplay" */
1557 
1558 /* Line 480 of lalr1.cc */
1559 #line 577 "Parser.yy"
1560  { };
1561 
1562 /* Line 480 of lalr1.cc */
1563 #line 1564 "Parser.cc"
1564  break;
1565  case 632: /* "_NumbDisplay" */
1566 
1567 /* Line 480 of lalr1.cc */
1568 #line 577 "Parser.yy"
1569  { };
1570 
1571 /* Line 480 of lalr1.cc */
1572 #line 1573 "Parser.cc"
1573  break;
1574  case 637: /* "OffsetEvent" */
1575 
1576 /* Line 480 of lalr1.cc */
1577 #line 577 "Parser.yy"
1578  { };
1579 
1580 /* Line 480 of lalr1.cc */
1581 #line 1582 "Parser.cc"
1582  break;
1583  case 649: /* "Owner" */
1584 
1585 /* Line 480 of lalr1.cc */
1586 #line 578 "Parser.yy"
1587  { delete (yyvaluep->stringVal); };
1588 
1589 /* Line 480 of lalr1.cc */
1590 #line 1591 "Parser.cc"
1591  break;
1592  case 656: /* "_Parameter" */
1593 
1594 /* Line 480 of lalr1.cc */
1595 #line 573 "Parser.yy"
1596  { };
1597 
1598 /* Line 480 of lalr1.cc */
1599 #line 1600 "Parser.cc"
1600  break;
1601  case 657: /* "ParamAssign" */
1602 
1603 /* Line 480 of lalr1.cc */
1604 #line 578 "Parser.yy"
1605  { delete (yyvaluep->paramAssignInfo); };
1606 
1607 /* Line 480 of lalr1.cc */
1608 #line 1609 "Parser.cc"
1609  break;
1610  case 664: /* "_PathDelayValue" */
1611 
1612 /* Line 480 of lalr1.cc */
1613 #line 578 "Parser.yy"
1614  { delete (yyvaluep->valueData); };
1615 
1616 /* Line 480 of lalr1.cc */
1617 #line 1618 "Parser.cc"
1618  break;
1619  case 671: /* "Point" */
1620 
1621 /* Line 480 of lalr1.cc */
1622 #line 578 "Parser.yy"
1623  { delete (yyvaluep->valueData); };
1624 
1625 /* Line 480 of lalr1.cc */
1626 #line 1627 "Parser.cc"
1627  break;
1628  case 672: /* "_Point" */
1629 
1630 /* Line 480 of lalr1.cc */
1631 #line 578 "Parser.yy"
1632  { delete (yyvaluep->valueData); };
1633 
1634 /* Line 480 of lalr1.cc */
1635 #line 1636 "Parser.cc"
1636  break;
1637  case 673: /* "PointDisp" */
1638 
1639 /* Line 480 of lalr1.cc */
1640 #line 577 "Parser.yy"
1641  { };
1642 
1643 /* Line 480 of lalr1.cc */
1644 #line 1645 "Parser.cc"
1645  break;
1646  case 674: /* "_PointDisp" */
1647 
1648 /* Line 480 of lalr1.cc */
1649 #line 577 "Parser.yy"
1650  { };
1651 
1652 /* Line 480 of lalr1.cc */
1653 #line 1654 "Parser.cc"
1654  break;
1655  case 677: /* "PointValue" */
1656 
1657 /* Line 480 of lalr1.cc */
1658 #line 577 "Parser.yy"
1659  { };
1660 
1661 /* Line 480 of lalr1.cc */
1662 #line 1663 "Parser.cc"
1663  break;
1664  case 682: /* "_Port" */
1665 
1666 /* Line 480 of lalr1.cc */
1667 #line 578 "Parser.yy"
1668  { delete (yyvaluep->portAttributes); };
1669 
1670 /* Line 480 of lalr1.cc */
1671 #line 1672 "Parser.cc"
1672  break;
1673  case 685: /* "_PortBackAn" */
1674 
1675 /* Line 480 of lalr1.cc */
1676 #line 578 "Parser.yy"
1677  { delete (yyvaluep->portAttributes); };
1678 
1679 /* Line 480 of lalr1.cc */
1680 #line 1681 "Parser.cc"
1681  break;
1682  case 689: /* "PortDelayData" */
1683 
1684 /* Line 480 of lalr1.cc */
1685 #line 578 "Parser.yy"
1686  { delete (yyvaluep->portDelay); };
1687 
1688 /* Line 480 of lalr1.cc */
1689 #line 1690 "Parser.cc"
1690  break;
1691  case 690: /* "_PortDelayData" */
1692 
1693 /* Line 480 of lalr1.cc */
1694 #line 578 "Parser.yy"
1695  { delete (yyvaluep->portDelay); };
1696 
1697 /* Line 480 of lalr1.cc */
1698 #line 1699 "Parser.cc"
1699  break;
1700  case 698: /* "PortInst" */
1701 
1702 /* Line 480 of lalr1.cc */
1703 #line 578 "Parser.yy"
1704  { delete (yyvaluep->portInst); };
1705 
1706 /* Line 480 of lalr1.cc */
1707 #line 1708 "Parser.cc"
1708  break;
1709  case 699: /* "_PortInst" */
1710 
1711 /* Line 480 of lalr1.cc */
1712 #line 578 "Parser.yy"
1713  { delete (yyvaluep->portInst); };
1714 
1715 /* Line 480 of lalr1.cc */
1716 #line 1717 "Parser.cc"
1717  break;
1718  case 702: /* "PortListData" */
1719 
1720 /* Line 480 of lalr1.cc */
1721 #line 578 "Parser.yy"
1722  { delete (yyvaluep->portListData); };
1723 
1724 /* Line 480 of lalr1.cc */
1725 #line 1726 "Parser.cc"
1726  break;
1727  case 703: /* "_PortListData" */
1728 
1729 /* Line 480 of lalr1.cc */
1730 #line 578 "Parser.yy"
1731  { delete (yyvaluep->portListData); };
1732 
1733 /* Line 480 of lalr1.cc */
1734 #line 1735 "Parser.cc"
1735  break;
1736  case 708: /* "PortNameDefData" */
1737 
1738 /* Line 480 of lalr1.cc */
1739 #line 575 "Parser.yy"
1740  { };
1741 
1742 /* Line 480 of lalr1.cc */
1743 #line 1744 "Parser.cc"
1744  break;
1745  case 710: /* "PortNameRefData" */
1746 
1747 /* Line 480 of lalr1.cc */
1748 #line 575 "Parser.yy"
1749  { };
1750 
1751 /* Line 480 of lalr1.cc */
1752 #line 1753 "Parser.cc"
1753  break;
1754  case 713: /* "PortRefData" */
1755 
1756 /* Line 480 of lalr1.cc */
1757 #line 578 "Parser.yy"
1758  { delete (yyvaluep->portRefData); };
1759 
1760 /* Line 480 of lalr1.cc */
1761 #line 1762 "Parser.cc"
1762  break;
1763  case 714: /* "_PortRefData" */
1764 
1765 /* Line 480 of lalr1.cc */
1766 #line 578 "Parser.yy"
1767  { delete (yyvaluep->portRefData); };
1768 
1769 /* Line 480 of lalr1.cc */
1770 #line 1771 "Parser.cc"
1771  break;
1772  case 715: /* "Program" */
1773 
1774 /* Line 480 of lalr1.cc */
1775 #line 578 "Parser.yy"
1776  { delete (yyvaluep->pairStrData); };
1777 
1778 /* Line 480 of lalr1.cc */
1779 #line 1780 "Parser.cc"
1780  break;
1781  case 716: /* "_Program" */
1782 
1783 /* Line 480 of lalr1.cc */
1784 #line 578 "Parser.yy"
1785  { delete (yyvaluep->stringVal); };
1786 
1787 /* Line 480 of lalr1.cc */
1788 #line 1789 "Parser.cc"
1789  break;
1790  case 722: /* "PropNameDef" */
1791 
1792 /* Line 480 of lalr1.cc */
1793 #line 575 "Parser.yy"
1794  { };
1795 
1796 /* Line 480 of lalr1.cc */
1797 #line 1798 "Parser.cc"
1798  break;
1799  case 733: /* "Rename" */
1800 
1801 /* Line 480 of lalr1.cc */
1802 #line 575 "Parser.yy"
1803  { };
1804 
1805 /* Line 480 of lalr1.cc */
1806 #line 1807 "Parser.cc"
1807  break;
1808  case 734: /* "__Rename" */
1809 
1810 /* Line 480 of lalr1.cc */
1811 #line 575 "Parser.yy"
1812  { };
1813 
1814 /* Line 480 of lalr1.cc */
1815 #line 1816 "Parser.cc"
1816  break;
1817  case 735: /* "_Rename" */
1818 
1819 /* Line 480 of lalr1.cc */
1820 #line 578 "Parser.yy"
1821  { delete (yyvaluep->stringVal); };
1822 
1823 /* Line 480 of lalr1.cc */
1824 #line 1825 "Parser.cc"
1825  break;
1826  case 736: /* "Resolves" */
1827 
1828 /* Line 480 of lalr1.cc */
1829 #line 578 "Parser.yy"
1830  { delete (yyvaluep->logicListData); };
1831 
1832 /* Line 480 of lalr1.cc */
1833 #line 1834 "Parser.cc"
1834  break;
1835  case 737: /* "_Resolves" */
1836 
1837 /* Line 480 of lalr1.cc */
1838 #line 578 "Parser.yy"
1839  { delete (yyvaluep->logicListData); };
1840 
1841 /* Line 480 of lalr1.cc */
1842 #line 1843 "Parser.cc"
1843  break;
1844  case 740: /* "ScaledInt" */
1845 
1846 /* Line 480 of lalr1.cc */
1847 #line 577 "Parser.yy"
1848  { };
1849 
1850 /* Line 480 of lalr1.cc */
1851 #line 1852 "Parser.cc"
1852  break;
1853  case 747: /* "SimNameDef" */
1854 
1855 /* Line 480 of lalr1.cc */
1856 #line 575 "Parser.yy"
1857  { };
1858 
1859 /* Line 480 of lalr1.cc */
1860 #line 1861 "Parser.cc"
1861  break;
1862  case 768: /* "StrDisplay" */
1863 
1864 /* Line 480 of lalr1.cc */
1865 #line 578 "Parser.yy"
1866  { delete (yyvaluep->stringVal); };
1867 
1868 /* Line 480 of lalr1.cc */
1869 #line 1870 "Parser.cc"
1870  break;
1871  case 769: /* "String" */
1872 
1873 /* Line 480 of lalr1.cc */
1874 #line 578 "Parser.yy"
1875  { delete (yyvaluep->valueData); };
1876 
1877 /* Line 480 of lalr1.cc */
1878 #line 1879 "Parser.cc"
1879  break;
1880  case 770: /* "_String" */
1881 
1882 /* Line 480 of lalr1.cc */
1883 #line 578 "Parser.yy"
1884  { delete (yyvaluep->valueData); };
1885 
1886 /* Line 480 of lalr1.cc */
1887 #line 1888 "Parser.cc"
1888  break;
1889  case 771: /* "_StrDisplay" */
1890 
1891 /* Line 480 of lalr1.cc */
1892 #line 578 "Parser.yy"
1893  { delete (yyvaluep->stringVal); };
1894 
1895 /* Line 480 of lalr1.cc */
1896 #line 1897 "Parser.cc"
1897  break;
1898  case 772: /* "Strong" */
1899 
1900 /* Line 480 of lalr1.cc */
1901 #line 575 "Parser.yy"
1902  { };
1903 
1904 /* Line 480 of lalr1.cc */
1905 #line 1906 "Parser.cc"
1906  break;
1907  case 788: /* "TimeStamp" */
1908 
1909 /* Line 480 of lalr1.cc */
1910 #line 578 "Parser.yy"
1911  { delete (yyvaluep->timeStamp); };
1912 
1913 /* Line 480 of lalr1.cc */
1914 #line 1915 "Parser.cc"
1915  break;
1916  case 800: /* "TypedValue" */
1917 
1918 /* Line 480 of lalr1.cc */
1919 #line 578 "Parser.yy"
1920  { delete (yyvaluep->valueData); };
1921 
1922 /* Line 480 of lalr1.cc */
1923 #line 1924 "Parser.cc"
1924  break;
1925  case 805: /* "Unit" */
1926 
1927 /* Line 480 of lalr1.cc */
1928 #line 573 "Parser.yy"
1929  { };
1930 
1931 /* Line 480 of lalr1.cc */
1932 #line 1933 "Parser.cc"
1933  break;
1934  case 806: /* "_Unit" */
1935 
1936 /* Line 480 of lalr1.cc */
1937 #line 573 "Parser.yy"
1938  { };
1939 
1940 /* Line 480 of lalr1.cc */
1941 #line 1942 "Parser.cc"
1942  break;
1943  case 808: /* "UnusedData" */
1944 
1945 /* Line 480 of lalr1.cc */
1946 #line 573 "Parser.yy"
1947  { };
1948 
1949 /* Line 480 of lalr1.cc */
1950 #line 1951 "Parser.cc"
1951  break;
1952  case 809: /* "UserData" */
1953 
1954 /* Line 480 of lalr1.cc */
1955 #line 578 "Parser.yy"
1956  { delete (yyvaluep->stringVal); };
1957 
1958 /* Line 480 of lalr1.cc */
1959 #line 1960 "Parser.cc"
1960  break;
1961  case 812: /* "ValueNameDefData" */
1962 
1963 /* Line 480 of lalr1.cc */
1964 #line 575 "Parser.yy"
1965  { };
1966 
1967 /* Line 480 of lalr1.cc */
1968 #line 1969 "Parser.cc"
1969  break;
1970  case 814: /* "ValueNameRefData" */
1971 
1972 /* Line 480 of lalr1.cc */
1973 #line 575 "Parser.yy"
1974  { };
1975 
1976 /* Line 480 of lalr1.cc */
1977 #line 1978 "Parser.cc"
1978  break;
1979  case 815: /* "Version" */
1980 
1981 /* Line 480 of lalr1.cc */
1982 #line 578 "Parser.yy"
1983  { delete (yyvaluep->stringVal); };
1984 
1985 /* Line 480 of lalr1.cc */
1986 #line 1987 "Parser.cc"
1987  break;
1988  case 823: /* "ViewNameDef" */
1989 
1990 /* Line 480 of lalr1.cc */
1991 #line 575 "Parser.yy"
1992  { };
1993 
1994 /* Line 480 of lalr1.cc */
1995 #line 1996 "Parser.cc"
1996  break;
1997  case 825: /* "ViewNameRefData" */
1998 
1999 /* Line 480 of lalr1.cc */
2000 #line 575 "Parser.yy"
2001  { };
2002 
2003 /* Line 480 of lalr1.cc */
2004 #line 2005 "Parser.cc"
2005  break;
2006  case 828: /* "ViewRefData" */
2007 
2008 /* Line 480 of lalr1.cc */
2009 #line 578 "Parser.yy"
2010  { delete (yyvaluep->viewRefData); };
2011 
2012 /* Line 480 of lalr1.cc */
2013 #line 2014 "Parser.cc"
2014  break;
2015  case 829: /* "_ViewRefData" */
2016 
2017 /* Line 480 of lalr1.cc */
2018 #line 578 "Parser.yy"
2019  { delete (yyvaluep->viewRefData); };
2020 
2021 /* Line 480 of lalr1.cc */
2022 #line 2023 "Parser.cc"
2023  break;
2024  case 831: /* "_ViewType" */
2025 
2026 /* Line 480 of lalr1.cc */
2027 #line 573 "Parser.yy"
2028  { };
2029 
2030 /* Line 480 of lalr1.cc */
2031 #line 2032 "Parser.cc"
2032  break;
2033  case 833: /* "VoltageMap" */
2034 
2035 /* Line 480 of lalr1.cc */
2036 #line 578 "Parser.yy"
2037  { delete (yyvaluep->valueData); };
2038 
2039 /* Line 480 of lalr1.cc */
2040 #line 2041 "Parser.cc"
2041  break;
2042  case 836: /* "Weak" */
2043 
2044 /* Line 480 of lalr1.cc */
2045 #line 575 "Parser.yy"
2046  { };
2047 
2048 /* Line 480 of lalr1.cc */
2049 #line 2050 "Parser.cc"
2050  break;
2051  case 845: /* "Ident" */
2052 
2053 /* Line 480 of lalr1.cc */
2054 #line 578 "Parser.yy"
2055  { delete (yyvaluep->stringVal); };
2056 
2057 /* Line 480 of lalr1.cc */
2058 #line 2059 "Parser.cc"
2059  break;
2060  case 846: /* "Str" */
2061 
2062 /* Line 480 of lalr1.cc */
2063 #line 578 "Parser.yy"
2064  { delete (yyvaluep->stringVal); };
2065 
2066 /* Line 480 of lalr1.cc */
2067 #line 2068 "Parser.cc"
2068  break;
2069  case 847: /* "Int" */
2070 
2071 /* Line 480 of lalr1.cc */
2072 #line 573 "Parser.yy"
2073  { };
2074 
2075 /* Line 480 of lalr1.cc */
2076 #line 2077 "Parser.cc"
2077  break;
2078 
2079  default:
2080  break;
2081  }
2082  }
#define YYUSE(e)
Definition: Parser.cc:449
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: Parser.cc:482

+ Here is the caller graph for this function:

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

Pop n symbols the three stacks.

Definition at line 2085 of file Parser.cc.

2086  {
2087  yystate_stack_.pop (n);
2088  yysemantic_stack_.pop (n);
2089  yylocation_stack_.pop (n);
2090  }
state_stack_type yystate_stack_
The state stack.
Definition: Parser.h:526
location_stack_type yylocation_stack_
The location stack.
Definition: Parser.h:530
semantic_stack_type yysemantic_stack_
The semantic value stack.
Definition: Parser.h:528
void pop(unsigned int n=1)
Bison undocumented.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void torc::generic::Parser::yystack_print_ ( )
privatevirtual

Print the state stack on the debug stream.

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

Generate an error message.

Parameters
statethe state where the error occurred.
tokthe lookahead token.

Definition at line 14056 of file Parser.cc.

14057  {
14058  std::string res;
14059  YYUSE (yystate);
14060 #if YYERROR_VERBOSE
14061  int yyn = yypact_[yystate];
14062  if (yypact_ninf_ < yyn && yyn <= yylast_)
14063  {
14064  /* Start YYX at -YYN if negative to avoid negative indexes in
14065  YYCHECK. */
14066  int yyxbegin = yyn < 0 ? -yyn : 0;
14067 
14068  /* Stay within bounds of both yycheck and yytname. */
14069  int yychecklim = yylast_ - yyn + 1;
14070  int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
14071  int count = 0;
14072  for (int x = yyxbegin; x < yyxend; ++x)
14073  if (yycheck_[x + yyn] == x && x != yyterror_)
14074  ++count;
14075 
14076  // FIXME: This method of building the message is not compatible
14077  // with internationalization. It should work like yacc.c does it.
14078  // That is, first build a string that looks like this:
14079  // "syntax error, unexpected %s or %s or %s"
14080  // Then, invoke YY_ on this string.
14081  // Finally, use the string as a format to output
14082  // yytname_[tok], etc.
14083  // Until this gets fixed, this message appears in English only.
14084  res = "syntax error, unexpected ";
14085  res += yytnamerr_ (yytname_[tok]);
14086  if (count < 5)
14087  {
14088  count = 0;
14089  for (int x = yyxbegin; x < yyxend; ++x)
14090  if (yycheck_[x + yyn] == x && x != yyterror_)
14091  {
14092  res += (!count++) ? ", expecting " : " or ";
14093  res += yytnamerr_ (yytname_[x]);
14094  }
14095  }
14096  }
14097  else
14098 #endif
14099  res = YY_("syntax error");
14100  return res;
14101  }
static const short int yypact_ninf_
Definition: Parser.h:537
#define YY_(msgid)
Definition: Parser.cc:444
static const int yyterror_
Definition: Parser.h:619
static const short int yycheck_[]
Definition: Parser.h:555
std::string string
#define YYUSE(e)
Definition: Parser.cc:449
virtual std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
static const short int yypact_[]
For a state, the index in yytable_ of its portion.
Definition: Parser.h:536
static const int yyntokens_
Definition: Parser.h:621
static const char *const yytname_[]
For a symbol, its name in clear.
Definition: Parser.h:567
static const int yylast_
Definition: Parser.h:615

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual std::string torc::generic::Parser::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:

Parser::token_number_type torc::generic::Parser::yytranslate_ ( int  t)
private

Convert a scanner token number t to a symbol number.

Definition at line 16449 of file Parser.cc.

16450  {
16451  static
16452  const token_number_type
16453  translate_table[] =
16454  {
16455  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16456  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16457  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16458  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16459  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16460  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16461  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16462  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16463  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16464  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16465  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16466  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16467  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16468  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16469  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16470  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16471  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16472  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16473  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16474  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16475  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16476  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16477  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16478  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16479  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
16480  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
16481  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
16482  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
16483  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
16484  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
16485  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
16486  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
16487  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
16488  75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
16489  85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
16490  95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
16491  105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
16492  115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
16493  125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
16494  135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
16495  145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
16496  155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
16497  165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
16498  175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
16499  185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
16500  195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
16501  205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
16502  215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
16503  225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
16504  235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
16505  245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
16506  255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
16507  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
16508  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
16509  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
16510  295
16511  };
16512  if ((unsigned int) t <= yyuser_token_number_max_)
16513  return translate_table[t];
16514  else
16515  return yyundef_token_;
16516  }
static const unsigned int yyuser_token_number_max_
Definition: Parser.h:622
static const token_number_type yyundef_token_
Definition: Parser.h:623
unsigned short int token_number_type
Internal symbol numbers.
Definition: Parser.h:533

+ Here is the caller graph for this function:

Field Documentation

class Driver& torc::generic::Parser::inDriver
private

Definition at line 626 of file Parser.h.

std::ostream* torc::generic::Parser::yycdebug_
private

Definition at line 593 of file Parser.h.

const short int torc::generic::Parser::yycheck_
staticprivate

Definition at line 555 of file Parser.h.

int torc::generic::Parser::yydebug_
private

Definition at line 592 of file Parser.h.

const unsigned short int torc::generic::Parser::yydefact_
staticprivate

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

Definition at line 542 of file Parser.h.

const short int torc::generic::Parser::yydefgoto_
staticprivate

Definition at line 545 of file Parser.h.

const int torc::generic::Parser::yyempty_ = -2
staticprivate

Definition at line 617 of file Parser.h.

const int torc::generic::Parser::yyeof_ = 0
staticprivate

Definition at line 613 of file Parser.h.

const int torc::generic::Parser::yyerrcode_ = 256
staticprivate

Definition at line 620 of file Parser.h.

const int torc::generic::Parser::yyfinal_ = 4
staticprivate

Definition at line 618 of file Parser.h.

const int torc::generic::Parser::yylast_ = 2272
staticprivate

Definition at line 615 of file Parser.h.

location_stack_type torc::generic::Parser::yylocation_stack_
private

The location stack.

Definition at line 530 of file Parser.h.

const int torc::generic::Parser::yynnts_ = 553
staticprivate

Definition at line 616 of file Parser.h.

const int torc::generic::Parser::yyntokens_ = 296
staticprivate

Definition at line 621 of file Parser.h.

const short int torc::generic::Parser::yypact_
staticprivate

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

Definition at line 536 of file Parser.h.

const short int torc::generic::Parser::yypact_ninf_ = -1561
staticprivate

Definition at line 537 of file Parser.h.

const short int torc::generic::Parser::yypgoto_
staticprivate

Definition at line 544 of file Parser.h.

const unsigned short int torc::generic::Parser::yyprhs_[]
staticprivate

For each rule, the index of the first RHS symbol in yyrhs_.

Definition at line 581 of file Parser.h.

const unsigned short int torc::generic::Parser::yyr1_
staticprivate

For a rule, its LHS.

Definition at line 561 of file Parser.h.

const unsigned char torc::generic::Parser::yyr2_
staticprivate

For a rule, its RHS length.

Definition at line 563 of file Parser.h.

const rhs_number_type torc::generic::Parser::yyrhs_[]
staticprivate

A `-1'-separated list of the rules' RHS.

Definition at line 579 of file Parser.h.

const unsigned short int torc::generic::Parser::yyrline_[]
staticprivate

For each rule, its source line number.

Definition at line 583 of file Parser.h.

semantic_stack_type torc::generic::Parser::yysemantic_stack_
private

The semantic value stack.

Definition at line 528 of file Parser.h.

state_stack_type torc::generic::Parser::yystate_stack_
private

The state stack.

Definition at line 526 of file Parser.h.

const unsigned short int torc::generic::Parser::yystos_
staticprivate

For a state, its accessing symbol.

Definition at line 558 of file Parser.h.

const unsigned short int torc::generic::Parser::yytable_
staticprivate

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 552 of file Parser.h.

const signed char torc::generic::Parser::yytable_ninf_ = -1
staticprivate

Definition at line 553 of file Parser.h.

const int torc::generic::Parser::yyterror_ = 1
staticprivate

Definition at line 619 of file Parser.h.

const char* const torc::generic::Parser::yytname_[]
staticprivate

For a symbol, its name in clear.

Definition at line 567 of file Parser.h.

const unsigned short int torc::generic::Parser::yytoken_number_[]
staticprivate

For each scanner token number, its symbol number.

Definition at line 585 of file Parser.h.

const Parser::token_number_type torc::generic::Parser::yyundef_token_ = 2
staticprivate

Definition at line 623 of file Parser.h.

const unsigned int torc::generic::Parser::yyuser_token_number_max_ = 550
staticprivate

Definition at line 622 of file Parser.h.


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