From: <jal...@st...> - 2004-09-02 18:13:42
|
Hello Everyone again, I have fixed the throw clause problem that was in my previous email by changing the body of the method bool Parser::optThrowDecl(Ptree*& throw_decl) in the parser.cc file (for OpenC++ 2.5.12 but each version of OpenC++ has the same implementation for this method). Here is what I changed this method to: bool Parser::optThrowDecl(Ptree*& throw_decl) { Token tk; int t; Ptree* p = nil; if(lex->LookAhead(0) == THROW){ lex->GetToken(tk); p = Ptree::Snoc(p, new LeafReserved(tk)); if(lex->GetToken(tk) != '(') return FALSE; p = Ptree::Snoc(p, new Leaf(tk)); Ptree* q; t = lex->LookAhead(0); if(t == '\0') return FALSE; else if (rTempArgList(q)) { if(lex->GetToken(tk) != ')') return FALSE; p = Ptree::Nconc(p, Ptree::List(q, new Leaf (tk))); } else return FALSE; } throw_decl = p; return TRUE; } Hope this helps anyone. John Altidor |