⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cqlyacc.cpp

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 CPP
📖 第 1 页 / 共 5 页
字号:
             }break;case 2:#line 270 "CQL.y"{		 CQL_globalParserState->currentRule = "class_name";                 sprintf(msg,"BISON::class_name = %s\n", (const char *)(yyvsp[0]._identifier->getName().getString().getCString())); 		 printf_(msg);		yyval._identifier = yyvsp[0]._identifier;             }break;case 3:#line 279 "CQL.y"{ 		CQL_globalParserState->currentRule = "class_path";                 sprintf(msg,"BISON::class_path\n"); 		 printf_(msg);		 yyval._identifier = yyvsp[0]._identifier;             }break;case 4:#line 298 "CQL.y"{							/*			   			SCOPED_PROPERTY can be:			   			- "A::prop"			   			- "A::class.prop"			   			- "A::class.prop#'OK'			   			- "A::class.prop[4]"							*/							CQL_globalParserState->currentRule = "scoped_property";							sprintf(msg,"BISON::scoped_property = %s\n",CQL_lval.strValue);							printf_(msg);                    if(isUTF8Str(CQL_lval.strValue)){                       String tmp(CQL_lval.strValue);		        			  yyval._identifier = new CQLIdentifier(tmp);				  			  _ObjPtr._ptr = yyval._identifier;              			  _ObjPtr.type = Id;              			  _ptrs.append(_ObjPtr);                    }else{                       sprintf(msg,"BISON::scoped_property-> BAD UTF\n");		                 printf_(msg);		                 throw CQLSyntaxErrorException(					         MessageLoaderParms(String("CQL.CQL_y.BAD_UTF8"),							   String("Bad UTF8 encountered parsing rule $0 in position $1."),							   String("scoped_property"),							   CQL_globalParserState->currentTokenPos)						     );					     }		        	  }break;case 5:#line 331 "CQL.y"{ 		/*		   We make sure the literal is valid UTF8, then make a String		*/		CQL_globalParserState->currentRule = "literal_string";                sprintf(msg,"BISON::literal_string-> %s\n",CQL_lval.strValue); 		printf_(msg);		if(isUTF8Str(CQL_lval.strValue)){		     yyval._string = new String(CQL_lval.strValue);			  _ObjPtr._ptr = yyval._string;           _ObjPtr.type = Str;           _ptrs.append(_ObjPtr);		}else{		    sprintf(msg,"BISON::literal_string-> BAD UTF\n");		    printf_(msg);		    throw CQLSyntaxErrorException(					MessageLoaderParms(String("CQL.CQL_y.BAD_UTF8"),							   String("Bad UTF8 encountered parsing rule $0 in position $1."),							   String("literal_string"),							   CQL_globalParserState->currentTokenPos)						 );		}             }break;case 6:#line 359 "CQL.y"{ 		   CQL_globalParserState->currentRule = "binary_value->BINARY";                   sprintf(msg,"BISON::binary_value-> %s\n",CQL_lval.strValue); 		   printf_(msg);                   yyval._value = new CQLValue(CQL_lval.strValue, CQLValue::Binary); 						 _ObjPtr._ptr = yyval._value;                   _ObjPtr.type = Val;                   _ptrs.append(_ObjPtr);               }break;case 7:#line 370 "CQL.y"{ 		   CQL_globalParserState->currentRule = "binary_value->NEGATIVE_BINARY";                   sprintf(msg,"BISON::binary_value-> %s\n",CQL_lval.strValue); 		   printf_(msg);                   yyval._value = new CQLValue(CQL_lval.strValue, CQLValue::Binary, false); 						 _ObjPtr._ptr = yyval._value;                   _ObjPtr.type = Val;                   _ptrs.append(_ObjPtr);               }break;case 8:#line 384 "CQL.y"{ 		CQL_globalParserState->currentRule = "hex_value->HEXADECIMAL";                sprintf(msg,"BISON::hex_value-> %s\n",CQL_lval.strValue); 		printf_(msg);                yyval._value = new CQLValue(CQL_lval.strValue, CQLValue::Hex);					 _ObjPtr._ptr = yyval._value;                _ObjPtr.type = Val;                _ptrs.append(_ObjPtr);            }break;case 9:#line 395 "CQL.y"{ 		CQL_globalParserState->currentRule = "hex_value->NEGATIVE_HEXADECIMAL";                sprintf(msg,"BISON::hex_value-> %s\n",CQL_lval.strValue); 		printf_(msg);                yyval._value = new CQLValue(CQL_lval.strValue, CQLValue::Hex, false);				    _ObjPtr._ptr = yyval._value;                _ObjPtr.type = Val;                _ptrs.append(_ObjPtr);            }break;case 10:#line 409 "CQL.y"{ 		    CQL_globalParserState->currentRule = "decimal_value->INTEGER";                    sprintf(msg,"BISON::decimal_value-> %s\n",CQL_lval.strValue); 		    printf_(msg);                    yyval._value = new CQLValue(CQL_lval.strValue, CQLValue::Decimal); 						  _ObjPtr._ptr = yyval._value;                    _ObjPtr.type = Val;                    _ptrs.append(_ObjPtr);                }break;case 11:#line 420 "CQL.y"{ 		    CQL_globalParserState->currentRule = "decimal_value->NEGATIVE_INTEGER";                    sprintf(msg,"BISON::decimal_value-> %s\n",CQL_lval.strValue); 		    printf_(msg);                    yyval._value = new CQLValue(CQL_lval.strValue, CQLValue::Decimal, false);						  _ObjPtr._ptr = yyval._value;                    _ObjPtr.type = Val;                    _ptrs.append(_ObjPtr);                }break;case 12:#line 434 "CQL.y"{ 		 CQL_globalParserState->currentRule = "real_value->REAL";                 sprintf(msg,"BISON::real_value-> %s\n",CQL_lval.strValue); 		 printf_(msg);                 yyval._value = new CQLValue(CQL_lval.strValue, CQLValue::Real);					  _ObjPtr._ptr = yyval._value;                 _ObjPtr.type = Val;                 _ptrs.append(_ObjPtr);             }break;case 13:#line 444 "CQL.y"{ 		 CQL_globalParserState->currentRule = "real_value->NEGATIVE_REAL";                 sprintf(msg,"BISON::real_value-> %s\n",CQL_lval.strValue); 		 printf_(msg);                 yyval._value = new CQLValue(CQL_lval.strValue, CQLValue::Real, false);					  _ObjPtr._ptr = yyval._value;                 _ObjPtr.type = Val;                 _ptrs.append(_ObjPtr);             }break;case 14:#line 457 "CQL.y"{	      CQL_globalParserState->currentRule = "literal->literal_string";              sprintf(msg,"BISON::literal->literal_string\n");	      printf_(msg);              yyval._value = new CQLValue(*yyvsp[0]._string);				  _ObjPtr._ptr = yyval._value;              _ObjPtr.type = Val;              _ptrs.append(_ObjPtr);          }break;case 15:#line 467 "CQL.y"{	      CQL_globalParserState->currentRule = "literal->decimal_value";              sprintf(msg,"BISON::literal->decimal_value\n");	      printf_(msg);          }break;case 16:#line 474 "CQL.y"{              CQL_globalParserState->currentRule = "literal->binary_value";              sprintf(msg,"BISON::literal->binary_value\n");	      printf_(msg);          }break;case 17:#line 481 "CQL.y"{              CQL_globalParserState->currentRule = "literal->hex_value";              sprintf(msg,"BISON::literal->hex_value\n");	      printf_(msg);          }break;case 18:#line 488 "CQL.y"{              CQL_globalParserState->currentRule = "literal->real_value";              sprintf(msg,"BISON::literal->real_value\n");	      printf_(msg);          }break;case 19:#line 495 "CQL.y"{	      CQL_globalParserState->currentRule = "literal->_TRUE";              sprintf(msg,"BISON::literal->_TRUE\n");	      printf_(msg);              yyval._value = new CQLValue(Boolean(true));				  _ObjPtr._ptr = yyval._value;              _ObjPtr.type = Val;              _ptrs.append(_ObjPtr);          }break;case 20:#line 506 "CQL.y"{	      CQL_globalParserState->currentRule = "literal->_FALSE";              sprintf(msg,"BISON::literal->_FALSE\n");	      printf_(msg);              yyval._value = new CQLValue(Boolean(false));				  _ObjPtr._ptr = yyval._value;              _ObjPtr.type = Val;              _ptrs.append(_ObjPtr);          }break;case 21:#line 520 "CQL.y"{		  CQL_globalParserState->currentRule = "array_index->expr";                  sprintf(msg,"BISON::array_index->expr\n");		  printf_(msg);		  CQLValue* _val = (CQLValue*)_factory.getObject(yyvsp[0]._predicate,Predicate,Value);		  yyval._string = new String(_val->toString());		  _ObjPtr._ptr = yyval._string;        _ObjPtr.type = Str;        _ptrs.append(_ObjPtr);              }break;case 22:#line 535 "CQL.y"{		       CQL_globalParserState->currentRule = "array_index_list->array_index";                       sprintf(msg,"BISON::array_index_list->array_index\n");		       printf_(msg); 		       yyval._string = yyvsp[0]._string;                   }break;case 23:#line 545 "CQL.y"{            CQL_globalParserState->currentRule = "chain->literal";            sprintf(msg,"BISON::chain->literal\n");	    printf_(msg);            chain_state = CQLVALUE;	    yyval._node = _factory.makeObject(yyvsp[0]._value,Predicate);          }break;case 24:#line 554 "CQL.y"{	    CQL_globalParserState->currentRule = "chain-> ( expr )";            sprintf(msg,"BISON::chain-> ( expr )\n");	    printf_(msg);            chain_state = CQLPREDICATE;	    yyval._node = yyvsp[-1]._predicate;        }break;case 25:#line 563 "CQL.y"{	   CQL_globalParserState->currentRule = "chain->identifier";           sprintf(msg,"BISON::chain->identifier\n");	   printf_(msg);           chain_state = CQLIDENTIFIER;	   yyval._node = _factory.makeObject(yyvsp[0]._identifier,Predicate);        }break;case 26:#line 572 "CQL.y"{	    CQL_globalParserState->currentRule = "chain->identifier#literal_string";            sprintf(msg,"BISON::chain->identifier#literal_string\n");	    printf_(msg);            String tmp = yyvsp[-2]._identifier->getName().getString();            tmp.append("#").append(*yyvsp[0]._string);            CQLIdentifier _id(tmp);   	    yyval._node = _factory.makeObject(&_id,Predicate);	    chain_state = CQLIDENTIFIER;        }break;case 27:#line 584 "CQL.y"{	    CQL_globalParserState->currentRule = "chain->scoped_property";	    sprintf(msg,"BISON::chain-> scoped_property\n");	    printf_(msg);            chain_state = CQLIDENTIFIER;	    yyval._node = _factory.makeObject(yyvsp[0]._identifier,Predicate);        }break;case 28:#line 593 "CQL.y"{	    CQL_globalParserState->currentRule = "chain->identifier( arg_list )";            sprintf(msg,"BISON::chain-> identifier( arg_list )\n");	    printf_(msg);            chain_state = CQLFUNCTION;	    CQLFunction _func(*yyvsp[-3]._identifier,_arglist);	    yyval._node = (CQLPredicate*)(_factory.makeObject(&_func,Predicate));	    _arglist.clear();        }break;case 29:#line 603 "CQL.y"{	    CQL_globalParserState->currentRule = "chain->chain.scoped_property";	    sprintf(msg,"BISON::chain-> chain DOT scoped_property : chain_state = %d\n",chain_state);	    printf_(msg);	    CQLIdentifier *_id;	    if(chain_state == CQLIDENTIFIER){	        _id = ((CQLIdentifier*)(_factory.getObject(yyvsp[-2]._node,Predicate,Identifier)));                CQLChainedIdentifier _cid(*_id);                _cid.append(*yyvsp[0]._identifier);		yyval._node = _factory.makeObject(&_cid,Predicate);            }else if(chain_state == CQLCHAINEDIDENTIFIER){		CQLChainedIdentifier *_cid;		_cid = ((CQLChainedIdentifier*)(_factory.getObject(yyvsp[-2]._node,Predicate,ChainedIdentifier)));		_cid->append(*yyvsp[0]._identifier);		_factory.setObject(((CQLPredicate*)yyvsp[-2]._node),_cid,ChainedIdentifier);		yyval._node = yyvsp[-2]._node;	    }else{		/* error */		String _msg("chain-> chain DOT scoped_property : chain state not CQLIDENTIFIER or CQLCHAINEDIDENTIFIER");		throw CQLSyntaxErrorException(                                        MessageLoaderParms(String("CQL.CQL_y.NOT_CHAINID_OR_IDENTIFIER"),                                                           String("Chain state not a CQLIdentifier or a CQLChainedIdentifier while parsing rule $0 in position $1."),

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -