// Create as much of the parse tree as possible. public override int CreateParseSubTree(ref CLexicalAnalyzer plexAnal, ref CSymbolTable pSymbolTable) { int i32Ret = 0; CToken pToken = null; //try { if ((CLexicalAnalyzer.LEX_FAIL == plexAnal.GetNextToken(ref pToken, ref pSymbolTable)) || pToken == null || (pToken.GetSubType() != RUL_TOKEN_SUBTYPE.RUL_LBRACK)) { //DELETE_PTR(pToken);//clean up memory even on errors //throw (C_UM_ERROR_INTERNALERR); } m_pDeclarations = new CDeclarations(); i32Ret = m_pDeclarations.CreateParseSubTree(ref plexAnal, ref pSymbolTable); m_pStmtList = new CStatementList(); i32Ret = m_pStmtList.CreateParseSubTree(ref plexAnal, ref pSymbolTable); if (0 == i32Ret) { if ((CLexicalAnalyzer.LEX_FAIL == plexAnal.GetNextToken(ref pToken, ref pSymbolTable)) || pToken == null || (pToken.GetSubType() != RUL_TOKEN_SUBTYPE.RUL_RBRACK)) { //DELETE_PTR(pToken);//clean up memory, even on errors //throw (C_UM_ERROR_INTERNALERR); return(i32Ret); } else { return(1); } } return(0); } /* * catch (CRIDEError* perr) * { * //if nobody has bothered to catch the error till now, * //what else can be done but to just eat it and keep quiet... * pvecErrors.push_back(perr); * } * catch (...) * { * throw (C_UM_ERROR_UNKNOWNERROR); * } * return i32Ret; */ }
public virtual int visitDeclarations(CDeclarations pStatement, CSymbolTable pSymbolTable, ref INTER_VARIANT pvar, RUL_TOKEN_SUBTYPE AssignType = RUL_TOKEN_SUBTYPE.RUL_ASSIGN) //Anil August 26 2005 to Fix a[exp1] += exp2 { return(0); }