Esempio n. 1
0
bool CArea::GetValueFromVo(string VO)
{
	if (!ParseTypeMode(VO)) return false;
	if (!ParseDataType(VO)) return false;
	if (!ParseAxis(VO)) return false;
	if (!ParseVar(VO)) return false;
	if (!ParseDefLine(VO)) return false;
	if (!ParseWeight(VO)) return false;
	if (!ParseOutput(VO)) return false;
	return true;
}
void CParser::ParseStatementDim(int nTabs)
{
	//Dim Num As Integer
	CString sToken = m_oToken.GetCurrentToken();
	m_sProgress = m_sProgress + GetTabs(nTabs) 
		+ "ParseStatemenDim " + sToken + "\r\n";

	m_oToken.GetNextToken();
	ParseID(nTabs+1);	
	ParseAsKeyword(nTabs+1);
	ParseDataType(nTabs+1);
}
void CParser::ParseProcedureReturn()
{
	int nTabs = 5;
	CString sToken = m_oToken.GetCurrentToken();
	m_sProgress = m_sProgress + GetTabs(nTabs) + 
		"ParseProcedureReturn\r\n";

	if(IsAsKeyword(sToken) == true)
	{
		ParseAsKeyword(nTabs+1);

		ParseDataType(nTabs+1);
	}	
	//m_oToken.GetNextToken();	
}
void CParser::ParseArgument()
{
	int nTabs = 6;
	m_sProgress = m_sProgress + GetTabs(nTabs) + 
		"ParseArgument\r\n";	

	ParseArgumentScope();	

	ParseID(nTabs+1);

	// parse As keyword
	ParseAsKeyword(nTabs+1);	

	ParseDataType(nTabs+1);
}
Esempio n. 5
0
bool cSmartCardNagra::GetDataType(unsigned char dt, int len, int shots)
{
  bool isdt8 = (dt==0x08);
  for(int i=0; i<shots; i++) {
    if(!DoBlkCmd(0x22,0x03,0xA2,len,&dt) || !Status()) {
     PRINTF(L_SC_ERROR,"failed to get datatype %02X",dt);
     return false;
     }
    if(buff[5]==0) break;
    if(!ParseDataType(dt&0x0F)) return false;
    if(isdt8 && buff[14]==0x49) break;
    dt|=0x80; // get next item
    }
  return true;
}
Esempio n. 6
0
asCScriptNode *asCParser::ParseType(bool allowConst)
{
	asCScriptNode *node = new asCScriptNode(snDataType);

	sToken t;

	if( allowConst )
	{
		GetToken(&t);
		RewindTo(&t);
		if( t.type == ttConst )
		{
			node->AddChildLast(ParseToken(ttConst));
			if( isSyntaxError ) return node;
		}
	}

	node->AddChildLast(ParseDataType());

	// Parse [] and @
	GetToken(&t);
	RewindTo(&t);
	while( t.type == ttOpenBracket || t.type == ttHandle)
	{
		if( t.type == ttOpenBracket )
		{
			node->AddChildLast(ParseToken(ttOpenBracket));
			if( isSyntaxError ) return node;

			GetToken(&t);
			if( t.type != ttCloseBracket )
			{
				Error(ExpectedToken("]").AddressOf(), &t);
				return node;
			}
		}
		else
		{
			node->AddChildLast(ParseToken(ttHandle));
			if( isSyntaxError ) return node;
		}

		GetToken(&t);
		RewindTo(&t);
	}

	return node;
}