You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(15) |
Feb
(26) |
Mar
(97) |
Apr
(224) |
May
(226) |
Jun
|
Jul
(3) |
Aug
(22) |
Sep
(48) |
Oct
|
Nov
|
Dec
(38) |
2004 |
Jan
(28) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(37) |
Jul
|
Aug
(73) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Andre B. <net...@us...> - 2004-08-20 19:26:20
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7626/parser Added Files: functor3.h Log Message: -- extensions for grammar key-words ":declareSymbol", ":enterScope" and ":leaveScope" ... the new way of symboltable building --- NEW FILE: functor3.h --- /** * additional definitions for making and binding functions with 3 parameters * */ #ifndef __FUNCTOR3__ #define __FUNCTOR3__ template <class ReturnType, class Arg1Type, class Arg2Type, class Arg3Type> class Functor3Base { public: typedef ReturnType result_type; virtual ~Functor3Base() { } virtual ReturnType operator()( Arg1Type arg1,Arg2Type arg2,Arg3Type arg3 ) = 0; }; template <class FunctorType, class Arg1Type, class Arg2Type, class Arg3Type> class Functor3Impl: public Functor3Base<void,Arg1Type,Arg2Type,Arg3Type > { private: FunctorType functor_; public: typedef Arg1Type first_argument_type; typedef Arg2Type second_argument_type; typedef Arg3Type third_argument_type; typedef void result_type; Functor3Impl( FunctorType functor ) : functor_( functor ) { } void operator()(Arg1Type arg1, Arg2Type arg2, Arg3Type arg3) { functor_(arg1, arg2, arg3); } }; template <class Arg1Type, class Arg2Type, class Arg3Type> class Functor3 { public: typedef Arg1Type first_argument_type; typedef Arg2Type second_argument_type; typedef Arg3Type third_argument_type; typedef void result_type; explicit Functor3( Functor3Base<void, Arg1Type, Arg2Type, Arg3Type> *impl = 0 ) : impl_( impl ) { } void operator()(Arg1Type arg1, Arg2Type arg2, Arg3Type arg3) { (*impl_)(arg1, arg2, arg3); } operator bool() const { return impl_.get() != 0; } bool operator !() const { return impl_.get() == 0; } private: CPPUT_DEDUCED_TYPENAME CppUT::SmartPtr< Functor3Base<void, Arg1Type, Arg2Type, Arg3Type> > impl_; }; template<class ReturnType, class FunctorType, class BindArg2Type, class BindArg3Type> class Bind3 { public: typedef CPPUT_DEDUCED_TYPENAME FunctorType::first_argument_type first_argument_type; typedef void result_type; Bind3( FunctorType functor, BindArg2Type arg2, BindArg3Type arg3 ) : functor_( functor ) , arg2_( arg2 ) , arg3_( arg3 ) { } void operator()(first_argument_type arg1) { functor_(arg1, arg2_, arg3_); } private: FunctorType functor_; BindArg2Type arg2_; BindArg3Type arg3_; }; template <class Arg1Type, class Arg2Type, class Arg3Type> inline Functor3<Arg1Type, Arg2Type, Arg3Type> makeCFn3( void (*function)(Arg1Type arg1, Arg2Type arg2, Arg3Type arg3) ) { typedef void (*FunctionType)(Arg1Type arg1, Arg2Type arg2, Arg3Type arg3); return Functor3<Arg1Type, Arg2Type, Arg3Type>( new Functor3Impl<FunctionType, Arg1Type, Arg2Type, Arg3Type>( function ) ); } template<class FunctorType, class Arg2Type, class Arg3Type> CppUT::Functor1<CPPUT_DEDUCED_TYPENAME FunctorType::first_argument_type> bind3( FunctorType functor, Arg2Type arg2, Arg3Type arg3 ) { return CppUT::makeFn1( Bind3<CPPUT_DEDUCED_TYPENAME FunctorType::result_type, FunctorType, Arg2Type, Arg3Type>( functor, arg2, arg3 ) ); } #endif |
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7335/parser Modified Files: commandstream.cpp commandstream.h commandstreamtest.cpp commandstreamtest.h cpp_grammar.txt cppparserfacade.cpp cppparserfacade.h forwards.h grammarbuilder.cpp grammarbuildertest.cpp main.cpp parsecontext.h parser.dsp parser.h parsertest.cpp parsertest.h parsertesthelper.cpp project.h refactoringtest.h scope.h sourceeditor.cpp sourceeditor.h symboldeclarator.cpp testproject.cpp testproject.h Log Message: -- extensions for grammar key-words ":declareSymbol", ":enterScope" and ":leaveScope" ... the new way of symboltable building Index: testproject.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/testproject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testproject.h 20 Jun 2004 11:00:38 -0000 1.2 --- testproject.h 20 Aug 2004 19:25:11 -0000 1.3 *************** *** 30,34 **** Parser::SymbolTable &symbolTable(); ! Parser::NodePtr parse( const std::string &source ); void commitEditChanges(); --- 30,34 ---- Parser::SymbolTable &symbolTable(); ! Parser::NodePtr parse( const Parser::FileId file, const std::string &source ); void commitEditChanges(); Index: refactoringtest.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/refactoringtest.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** refactoringtest.h 16 Aug 2004 20:51:32 -0000 1.2 --- refactoringtest.h 20 Aug 2004 19:25:11 -0000 1.3 *************** *** 13,17 **** CPPUT_TEST( testRenameClassTest2 ); CPPUT_TEST( testRenameClassTest3 ); ! CPPUT_TEST( testRenameClassTest4 ); CPPUT_TEST( testRenameClassTest5 ); CPPUT_TEST( testRenameClassTest6 ); --- 13,17 ---- CPPUT_TEST( testRenameClassTest2 ); CPPUT_TEST( testRenameClassTest3 ); ! //CPPUT_TEST( testRenameClassTest4 ); CPPUT_TEST( testRenameClassTest5 ); CPPUT_TEST( testRenameClassTest6 ); Index: main.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.cpp 5 Aug 2004 20:52:40 -0000 1.2 --- main.cpp 20 Aug 2004 19:25:10 -0000 1.3 *************** *** 37,41 **** int main( int argc, char *argv[] ) { ! CppUT::TestSuitePtr allSuite = CppUT::Registry::instance().createDefaultTests(); CppUT::TestContext context; CppUT::TestRunResult result; --- 37,41 ---- int main( int argc, char *argv[] ) { ! CppUT::TestSuitePtr allSuite = CppUT::Registry::instance().createDefaultTests(); CppUT::TestContext context; CppUT::TestRunResult result; Index: cppparserfacade.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/cppparserfacade.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** cppparserfacade.cpp 8 Jun 2004 20:23:11 -0000 1.1.1.1 --- cppparserfacade.cpp 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- //#include "commandstream.h" #include <fstream> + #include "symboltable.h" *************** *** 39,49 **** NodePtr ! CppParserFacade::parse( const std::string &input ) { Parser::Tokens tokens; // Parser::CppParser::preprocess( input, tokens ); Parser::CppParser::tokenize( input, tokens ); ! Parser::CommandStream result; ! Parser::ParseContext context( tokens.begin(), tokens.end(), result ); bool matched = translationUnitMatcher_->parse( context ); --- 40,51 ---- NodePtr ! CppParserFacade::parse( const Parser::FileId fileid, const std::string &input, SymbolTable &symbolTable ) { Parser::Tokens tokens; // Parser::CppParser::preprocess( input, tokens ); Parser::CppParser::tokenize( input, tokens ); ! Parser::CommandStream result( symbolTable ); ! result.setCurrentFile( fileid ); ! Parser::ParseContext context( tokens.begin(), tokens.end(), result, symbolTable ); bool matched = translationUnitMatcher_->parse( context ); *************** *** 53,57 **** // note: at the current time, ending silent tokens are not added to the ast ! NodePtr rootNode = result.makeNodeTree(); if ( rootNode->hasChildren() ) return rootNode->childAt(0); --- 55,59 ---- // note: at the current time, ending silent tokens are not added to the ast ! NodePtr rootNode = result.makeNodeTree(symbolTable.translationUnitScope(fileid)); if ( rootNode->hasChildren() ) return rootNode->childAt(0); Index: parsertesthelper.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/parsertesthelper.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** parsertesthelper.cpp 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- parsertesthelper.cpp 20 Aug 2004 19:25:11 -0000 1.2 *************** *** 67,72 **** bool enableTrace = (flag & traceEnabled) != 0; ! Parser::CommandStream result; ! Parser::ParseContext context( tokens.begin(), tokens.end(), result, enableTrace ? &tracker : 0 ); bool matched = matcher->parse( context ); --- 67,74 ---- bool enableTrace = (flag & traceEnabled) != 0; ! Parser::SymbolTable symTab; ! Parser::CommandStream result( symTab ); ! result.setCurrentFile( 0 ); ! Parser::ParseContext context( tokens.begin(), tokens.end(), result, symTab, enableTrace ? &tracker : 0 ); bool matched = matcher->parse( context ); *************** *** 90,94 **** if ( expectedTree || checkNoError ) { ! Parser::NodePtr actualTree = result.makeNodeTree(); if ( expectedTree ) { --- 92,96 ---- if ( expectedTree || checkNoError ) { ! Parser::NodePtr actualTree = result.makeNodeTree(symTab.translationUnitScope(0)); if ( expectedTree ) { *************** *** 144,149 **** tracker.setProgressive( true ); ! Parser::CommandStream result; ! Parser::ParseContext context( tokens.begin(), tokens.end(), result, &tracker ); bool matched = matcher->parse( context ); checkParseContextIsBalanced( context, tokens, matcher, tracker ); --- 146,152 ---- tracker.setProgressive( true ); ! Parser::SymbolTable symTab; ! Parser::CommandStream result( symTab ); ! Parser::ParseContext context( tokens.begin(), tokens.end(), result, symTab, &tracker ); bool matched = matcher->parse( context ); checkParseContextIsBalanced( context, tokens, matcher, tracker ); Index: commandstream.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/commandstream.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** commandstream.cpp 8 Jun 2004 20:23:10 -0000 1.1.1.1 --- commandstream.cpp 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 1,11 **** #include "commandstream.h" namespace Parser { ! NodePtr CommandStream::makeNodeTree() { ! Context context; ! context.root_ = makeCompositeNode( "" ); context.current_ = context.root_; StreamItems::iterator it = items_.begin(); --- 1,16 ---- #include "commandstream.h" + #include "nodeiterator.h" + #include "functor3.h" + #include "cppparser.h" namespace Parser { ! NodePtr CommandStream::makeNodeTree(ScopePtr scope) { ! Context context(symbolTable_); ! context.root_ = makeCompositeNode( "" ); context.current_ = context.root_; + context.scopes_.push_back(scope); + context.fileId_ = getCurrentFile(); StreamItems::iterator it = items_.begin(); *************** *** 76,79 **** --- 81,176 ---- child->removeFromParent(); } + + void enterScope( CommandStream::Context *context, + const ConstString &scopeName) + { + NodePtr node; + if ( context->current_->hasChildren() ) + { + node = Parser::getChild(context->current_,scopeName); + // we take sub node 'id' ... TODO: nested name alternative ! + if (node == NodePtr()) + return; /* [ AB: TODO - error in grammar: no such sub node ] */ + node = Parser::getChild(node,"id"); + } + if ( node == NodePtr() ) + return; /* [ AB: TODO - error in grammar: no such sub node ] */ + + if ( context->scopes_.empty() ) + return; /* [ AB: TODO - error in scope logic - no current scope ?? ] */ + + ScopePtr current = context->scopes_.back(); + int cnt = current->subScopeCount(); + DeclarationScopePtr subdecl; + while (cnt-->0 && subdecl == DeclarationScopePtr()) + { + ScopePtr sub = current->subScopeAt(cnt); + subdecl = boost::shared_polymorphic_downcast<DeclarationScope>(sub); + if ( subdecl != DeclarationScopePtr() ) + { + if ( subdecl->declaration()->name() != node->text().str()) + subdecl = DeclarationScopePtr(); + } + } + if ( subdecl == DeclarationScopePtr()) + return; /* [ AB: TODO - error in grammar: no such scope declared before ] */ + context->scopes_.push_back(subdecl); + } + + void leaveScope( CommandStream::Context *context ) + { + if ( context->scopes_.empty() ) + return; /* [ AB: TODO - error in grammar: no scope to leave ] */ + + context->scopes_.pop_back(); + } + + static Symbol + getChildSymbol( const NodePtr &node, FileId currentFile ) + { + NodeEnumerator enumChildren = node->enumChildren(); + while ( enumChildren.hasNext() ) + { + NodePtr child = enumChildren.nextPtr(); + if ( child->category() == CppParser::tkIdentifier ) + { + Location location( currentFile, child->location().startPos_ ); + return Symbol( child->text().str(), location ); + } + } + + throw std::runtime_error( "Node " + node->name().str() + " has no identifier child node." ); + } + + void declareSymbol( CommandStream::Context *context, + const ConstString &symbolType, + const ConstString &nodeName) + { + NodePtr node; + if ( context->current_->hasChildren() ) + { + node = Parser::getChild(context->current_,nodeName); + // we take sub node 'id' ... TODO: nested name alternative ! + if (node == NodePtr()) + return; /* [ AB: TODO - error in grammar: no such sub node ] */ + node = Parser::getChild(node,"id"); + } + + if ( node == NodePtr() ) + return; /* [ AB: TODO - error in grammar: no such sub node ] */ + + + if (symbolType == "class") + { + // declare symbol: + Symbol classSymbol = getChildSymbol(node,context->fileId_); + SymbolDeclarationPtr declaration = context->symbolTable_.declare( classSymbol ); + // create class scope + ClassScopePtr classScope( new ClassScope( declaration ) ); + if ( context->scopes_.empty() || context->scopes_.back() == ScopePtr() ) + return; /* [ AB: TODO - internal error: no scope ] */ + context->scopes_.back()->add( classScope ); + } + } } *************** *** 113,116 **** --- 210,227 ---- } + Command cmdDeclareSymbol( const ConstString &symbolType, const ConstString &nodeName ) + { + return bind3( makeCFn3( &Commands::declareSymbol ), symbolType,nodeName); + } + + Command cmdEnterScope( const ConstString &scopeName ) + { + return CppUT::bind2( CppUT::makeCFn2( &Commands::enterScope ), scopeName ); + } + + Command cmdLeaveScope() + { + return CppUT::makeCFn1( &Commands::leaveScope ); + } } // namespace Parser Index: symboldeclarator.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/symboldeclarator.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** symboldeclarator.cpp 16 Aug 2004 20:54:57 -0000 1.6 --- symboldeclarator.cpp 20 Aug 2004 19:25:11 -0000 1.7 *************** *** 144,147 **** --- 144,150 ---- NodePtr className = safeGetChild( classSpecifier, "class_name" ); NodePtr classNameId = safeGetChild( className, "id" ); // we ignore the nested spec + /* + AB: Has been deactivated, this is automaticly done by the new grammar keywords ":declareSymbol" and ":enterScope" + Symbol classSymbol( getChildSymbol( classNameId ) ); SymbolDeclarationPtr declaration = symbolTable_.declare( classSymbol ); *************** *** 149,156 **** parentScope.add( classScope ); // should be actual nested scope // @todo setScope in declaration NodePtr members = getChild( classSpecifier, "member_specification" ); if ( members ) ! declareClassMembers( members, *classScope ); } --- 152,174 ---- parentScope.add( classScope ); // should be actual nested scope // @todo setScope in declaration + */ + int cnt = parentScope.subScopeCount(); + ClassScopePtr subdecl; + while (cnt-->0 && subdecl == DeclarationScopePtr()) + { + ScopePtr sub = parentScope.subScopeAt(cnt); + subdecl = boost::shared_polymorphic_downcast<ClassScope>(sub); + if ( subdecl != ClassScopePtr() ) + { + if ( subdecl->declaration()->name() != getChild(classNameId,"identifier")->text().str() ) + subdecl = ClassScopePtr(); + } + } + if ( subdecl == ClassScopePtr()) + return; /* [ AB: TODO - error in grammar: no such scope declared before ] */ NodePtr members = getChild( classSpecifier, "member_specification" ); if ( members ) ! declareClassMembers( members, *subdecl ); } Index: commandstreamtest.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/commandstreamtest.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** commandstreamtest.cpp 8 Jun 2004 20:23:10 -0000 1.1.1.1 --- commandstreamtest.cpp 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 9,13 **** CommandStreamTest::setUp() { ! stream_.reset( new Parser::CommandStream() ); } --- 9,13 ---- CommandStreamTest::setUp() { ! stream_.reset( new Parser::CommandStream(symbolTable_) ); } *************** *** 24,28 **** { PARSER_ASSERT_NODE_TREE_EQUAL( testNode(""), ! stream_->makeNodeTree() ); } --- 24,28 ---- { PARSER_ASSERT_NODE_TREE_EQUAL( testNode(""), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } *************** *** 35,39 **** PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "if", id_t("x") ), ! stream_->makeNodeTree() ); } --- 35,39 ---- PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "if", id_t("x") ), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } *************** *** 46,50 **** PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", testNode( "test", "if" ) ), ! stream_->makeNodeTree() ); } --- 46,50 ---- PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", testNode( "test", "if" ) ), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } *************** *** 56,60 **** PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "root" ), ! stream_->makeNodeTree() ); } --- 56,60 ---- PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "root" ), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } *************** *** 69,73 **** tokenNode->setName( "keyword" ); PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", Parser::NodePtr(tokenNode) ), ! stream_->makeNodeTree() ); } --- 69,73 ---- tokenNode->setName( "keyword" ); PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", Parser::NodePtr(tokenNode) ), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } *************** *** 83,87 **** PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", testNode( "block", "if" ), "while" ), ! stream_->makeNodeTree() ); } --- 83,87 ---- PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", testNode( "block", "if" ), "while" ), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } *************** *** 100,104 **** PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", testNode( "binop", id_t("x"),"*",id_t("y") ) ), ! stream_->makeNodeTree() ); } --- 100,104 ---- PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", testNode( "binop", id_t("x"),"*",id_t("y") ) ), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } *************** *** 112,116 **** PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "if" ), ! stream_->makeNodeTree() ); } --- 112,116 ---- PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "if" ), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } *************** *** 131,134 **** PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "if", "else" ), ! stream_->makeNodeTree() ); } --- 131,134 ---- PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "if", "else" ), ! stream_->makeNodeTree(Parser::ScopePtr()) ); } Index: commandstreamtest.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/commandstreamtest.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** commandstreamtest.h 8 Jun 2004 20:23:10 -0000 1.1.1.1 --- commandstreamtest.h 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 38,41 **** --- 38,42 ---- private: boost::shared_ptr<Parser::CommandStream> stream_; + Parser::SymbolTable symbolTable_; }; Index: sourceeditor.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/sourceeditor.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sourceeditor.cpp 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- sourceeditor.cpp 20 Aug 2004 19:25:11 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- SourceEditor::SourceEditor( const std::string &source, + const FileId fileid, Project &project ) : project_( project ) *************** *** 11,15 **** tracker_.reset( new NodeTracker( buffers_ ) ); ! translationUnit_ = project.parse( source ); } --- 12,16 ---- tracker_.reset( new NodeTracker( buffers_ ) ); ! translationUnit_ = project.parse( fileid, source ); } Index: testproject.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/testproject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testproject.cpp 20 Jun 2004 11:00:38 -0000 1.2 --- testproject.cpp 20 Aug 2004 19:25:11 -0000 1.3 *************** *** 25,29 **** std::string source = readSourceFile( it->second ); ! Parser::NodePtr translationUnit = parse( source ); declarator.declareTranslationUnit( translationUnit ); } --- 25,29 ---- std::string source = readSourceFile( it->second ); ! Parser::NodePtr translationUnit = parse( it->first, source ); declarator.declareTranslationUnit( translationUnit ); } *************** *** 90,94 **** std::string path = pathFromFileId( file ); ! Parser::SourceEditorPtr editor( new Parser::SourceEditor( readSourceFile(path), *this ) ); editors_[ file ] = editor; return *editor; --- 90,94 ---- std::string path = pathFromFileId( file ); ! Parser::SourceEditorPtr editor( new Parser::SourceEditor( readSourceFile(path), it->first, *this ) ); editors_[ file ] = editor; return *editor; *************** *** 96,104 **** Parser::NodePtr ! TestProject::parse( const std::string &source ) { if ( !parser_ ) parser_.reset( new Parser::CppParserFacade( configuration() ) ); ! return parser_->parse( source ); } --- 96,104 ---- Parser::NodePtr ! TestProject::parse( const Parser::FileId fileid, const std::string &source ) { if ( !parser_ ) parser_.reset( new Parser::CppParserFacade( configuration() ) ); ! return parser_->parse( fileid, source, symbolTable_ ); } Index: project.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/project.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** project.h 20 Jun 2004 11:00:38 -0000 1.2 --- project.h 20 Aug 2004 19:25:11 -0000 1.3 *************** *** 72,76 **** virtual SymbolTable &symbolTable() = 0; ! virtual NodePtr parse( const std::string &source ) = 0; // should really pass a parse context }; --- 72,76 ---- virtual SymbolTable &symbolTable() = 0; ! virtual NodePtr parse( const Parser::FileId file, const std::string &source ) = 0; // should really pass a parse context }; Index: grammarbuildertest.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/grammarbuildertest.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** grammarbuildertest.cpp 8 Jun 2004 20:23:14 -0000 1.1.1.1 --- grammarbuildertest.cpp 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 76,80 **** Parser::Tokens tokens; Parser::GrammarParser::tokenize( input, tokens ); ! ParserTesting::checkParserMatch( tokens, matcher ); } --- 76,80 ---- Parser::Tokens tokens; Parser::GrammarParser::tokenize( input, tokens ); ! ParserTesting::checkParserMatch( tokens, matcher, ParserTesting::noParseTrace ); } *************** *** 309,311 **** PARSER_ASSERT_BUILD_MATCH( "lookahead", "+(" ); } - --- 309,310 ---- Index: cpp_grammar.txt =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/cpp_grammar.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** cpp_grammar.txt 21 Jun 2004 13:49:30 -0000 1.7 --- cpp_grammar.txt 20 Aug 2004 19:25:10 -0000 1.8 *************** *** 664,668 **** class_specifier = :node( 'class_specifier', ! class_head '{' ?( member_specification ) '}' ); # ############### A.8.2: Classes, Specials Member Functions ################## --- 664,668 ---- class_specifier = :node( 'class_specifier', ! class_head :declareSymbol('class', 'class_name') '{' :enterScope('class_name') ?( member_specification ) :leaveScope() '}' ); # ############### A.8.2: Classes, Specials Member Functions ################## Index: scope.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/scope.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** scope.h 16 Aug 2004 20:52:31 -0000 1.6 --- scope.h 20 Aug 2004 19:25:11 -0000 1.7 *************** *** 21,24 **** --- 21,25 ---- class TranslationUnitScope; class TypedefScope; + class DeclarationScope; typedef boost::shared_ptr<ClassScope> ClassScopePtr; typedef boost::shared_ptr<EnumScope> EnumScopePtr; *************** *** 28,31 **** --- 29,33 ---- typedef boost::shared_ptr<TypedefScope> TypedefScopePtr; typedef boost::shared_ptr<TranslationUnitScope> TranslationUnitScopePtr; + typedef boost::shared_ptr<DeclarationScope> DeclarationScopePtr; class Type; Index: forwards.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/forwards.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** forwards.h 8 Jun 2004 20:23:13 -0000 1.1.1.1 --- forwards.h 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 9,12 **** --- 9,14 ---- class GrammarBuilder; + class SymbolTable; + class Matcher; typedef boost::shared_ptr<Matcher> MatcherPtr; Index: parsertest.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/parsertest.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** parsertest.h 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- parsertest.h 20 Aug 2004 19:25:11 -0000 1.2 *************** *** 33,36 **** --- 33,37 ---- CPPUT_TEST( testOptionalMatcher ); CPPUT_TEST( testNodeCmd ); + CPPUT_TEST( testDeclareSymbolCommand ); CPPUT_TESTSUITE_END(); *************** *** 62,65 **** --- 63,67 ---- void testOptionalMatcher(); void testNodeCmd(); + void testDeclareSymbolCommand(); private: Index: sourceeditor.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/sourceeditor.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sourceeditor.h 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- sourceeditor.h 20 Aug 2004 19:25:11 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- public: SourceEditor( const std::string &source, + const FileId fileid, Project &project ); Index: parsertest.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/parsertest.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** parsertest.cpp 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- parsertest.cpp 20 Aug 2004 19:25:11 -0000 1.2 *************** *** 24,29 **** { Parser::Tokens toks = tokens( "0", "1", "2", "3", "4", "5", "6" ); ! Parser::CommandStream result; ! Parser::ParseContext context( toks.begin(), toks.end(), result ); Parser::Tokens relativeToks; --- 24,30 ---- { Parser::Tokens toks = tokens( "0", "1", "2", "3", "4", "5", "6" ); ! Parser::SymbolTable symTab; ! Parser::CommandStream result( symTab ); ! Parser::ParseContext context( toks.begin(), toks.end(), result, symTab ); Parser::Tokens relativeToks; *************** *** 44,48 **** context.getRelativeTokenRange( 0, 1, relativeToks ); CPPUT_ASSERTSTR_EQUAL( "0", relativeToks.at(0).text() ); ! PARSER_ASSERT_NODE_TREE_EQUAL( testNode(""), result.makeNodeTree() ); // Check commit --- 45,49 ---- context.getRelativeTokenRange( 0, 1, relativeToks ); CPPUT_ASSERTSTR_EQUAL( "0", relativeToks.at(0).text() ); ! PARSER_ASSERT_NODE_TREE_EQUAL( testNode(""), result.makeNodeTree(Parser::ScopePtr()) ); // Check commit *************** *** 59,63 **** CPPUT_ASSERTSTR_EQUAL( "2", relativeToks.at(0).text() ); PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "0", "1" ), ! result.makeNodeTree() ); // Check preserve/restore state --- 60,64 ---- CPPUT_ASSERTSTR_EQUAL( "2", relativeToks.at(0).text() ); PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "0", "1" ), ! result.makeNodeTree(Parser::ScopePtr()) ); // Check preserve/restore state *************** *** 85,89 **** CPPUT_ASSERTSTR_EQUAL( "6", relativeToks.at(0).text() ); PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "3", "4", "5" ), ! result.makeNodeTree() ); } --- 86,90 ---- CPPUT_ASSERTSTR_EQUAL( "6", relativeToks.at(0).text() ); PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "3", "4", "5" ), ! result.makeNodeTree(Parser::ScopePtr()) ); } *************** *** 93,98 **** { Parser::Tokens toks = tokens( "if", spaces_t(1), "(", spaces_t(2), "x", spaces_t(2), ")", spaces_t(4) ); ! Parser::CommandStream result; ! Parser::ParseContext context( toks.begin(), toks.end(), result ); CPPUT_ASSERTSTR_EQUAL( "if", context.nextToken().text() ); context.addLastToken(); --- 94,100 ---- { Parser::Tokens toks = tokens( "if", spaces_t(1), "(", spaces_t(2), "x", spaces_t(2), ")", spaces_t(4) ); ! Parser::SymbolTable symTab; ! Parser::CommandStream result( symTab ); ! Parser::ParseContext context( toks.begin(), toks.end(), result, symTab ); CPPUT_ASSERTSTR_EQUAL( "if", context.nextToken().text() ); context.addLastToken(); *************** *** 105,109 **** CPPUT_ASSERT_FALSE( context.hasMoreToken() ); PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "if", spaces_t(1), "(", spaces_t(2), "x", spaces_t(2), ")" ), ! result.makeNodeTree() ); // Notes: trailing spaces are discarded... } --- 107,111 ---- CPPUT_ASSERT_FALSE( context.hasMoreToken() ); PARSER_ASSERT_NODE_TREE_EQUAL( testNode( "", "if", spaces_t(1), "(", spaces_t(2), "x", spaces_t(2), ")" ), ! result.makeNodeTree(Parser::ScopePtr()) ); // Notes: trailing spaces are discarded... } *************** *** 381,382 **** --- 383,401 ---- } + void + ParserTest::testDeclareSymbolCommand() + { + /* + "class = :node( 'id', '%' $identifier ) :declareSymbol('class','id');" + */ + PARSER_ASSERT_PRODUCED_TREE_EQUAL( + tokens("%", id_t("x") ), + symbol_m("%") >> node_cmd( "id", terminal_m( identifier ) ) + >> declare_cmd("class", "id") + >> enterscope_cmd("id") + >> leavescope_cmd() , + testNode( "", + "%" , + testNode( "id", id_t("x") ) + ) ); + } Index: cppparserfacade.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/cppparserfacade.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** cppparserfacade.h 8 Jun 2004 20:23:11 -0000 1.1.1.1 --- cppparserfacade.h 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- # include "forwards.h" + # include "location.h" # include "cppparsersettings.h" # include <stdexcept> *************** *** 14,18 **** // clearly not final api, will need filename & 'file provider' for preprocessing ! NodePtr parse( const std::string &input ); private: --- 15,19 ---- // clearly not final api, will need filename & 'file provider' for preprocessing ! NodePtr parse( const Parser::FileId fileid, const std::string &input, SymbolTable &symbolTable ); private: Index: parsecontext.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/parsecontext.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** parsecontext.h 8 Jun 2004 20:23:16 -0000 1.1.1.1 --- parsecontext.h 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- # define PARSER_PARSECONTEXT_H_INCLUDED + # include "symboltable.h" # include "commandstream.h" # include "parsingtracker.h" *************** *** 31,34 **** --- 32,36 ---- Tokens::const_iterator end, CommandStream &result, + SymbolTable &symbolTable, ParsingTracker *tracker = 0 ); *************** *** 87,90 **** --- 89,93 ---- Tokens::const_iterator lastTokenEnd_; CommandStream &result_; + SymbolTable &symbolTable_; ParsingTracker *tracker_; *************** *** 101,104 **** --- 104,108 ---- Tokens::const_iterator end, CommandStream &result, + SymbolTable &symbolTable, ParsingTracker *tracker ) : begin_( begin) *************** *** 107,110 **** --- 111,115 ---- , current_( begin ) , result_( result ) + , symbolTable_( symbolTable ) , tracker_( tracker ) { Index: parser.dsp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/parser.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** parser.dsp 16 Aug 2004 20:59:52 -0000 1.3 --- parser.dsp 20 Aug 2004 19:25:10 -0000 1.4 *************** *** 73,77 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "PARSER_ENABLE_TRACKING" /YX /FD /GZ /c # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x40c /d "_DEBUG" --- 73,77 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "PARSER_ENABLE_TRACKING" /FR /YX /FD /GZ /c # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x40c /d "_DEBUG" *************** *** 311,322 **** # Begin Source File - SOURCE=.\commandstreamtest.cpp - # End Source File - # Begin Source File - - SOURCE=.\commandstreamtest.h - # End Source File - # Begin Source File - SOURCE=.\conststringtest.cpp # End Source File --- 311,314 ---- *************** *** 343,346 **** --- 335,346 ---- # Begin Source File + SOURCE=.\commandstreamtest.cpp + # End Source File + # Begin Source File + + SOURCE=.\commandstreamtest.h + # End Source File + # Begin Source File + SOURCE=.\cppnodetestbase.cpp # End Source File Index: parser.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/parser.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** parser.h 8 Jun 2004 20:23:16 -0000 1.1.1.1 --- parser.h 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 2,5 **** --- 2,7 ---- # define PARSER_PARSE_H_INCLUDED + #pragma warning(disable: 4786) + # include "conststring.h" # include "parsecontext.h" *************** *** 1003,1006 **** --- 1005,1023 ---- } + inline MatcherPtr declare_cmd( const ConstString &symbolType, const ConstString &nodeName ) + { + return cmd_m( cmdDeclareSymbol(symbolType, nodeName) ); + } + + inline MatcherPtr enterscope_cmd( const ConstString &scopeName ) + { + return cmd_m( cmdEnterScope( scopeName ) ); + } + + inline MatcherPtr leavescope_cmd( ) + { + return cmd_m( cmdLeaveScope() ); + } + } // namespace MatcherFactories Index: commandstream.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/commandstream.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** commandstream.h 8 Jun 2004 20:23:10 -0000 1.1.1.1 --- commandstream.h 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- # include "token.h" # include "node.h" + + # include "symboltable.h" + # include "scope.h" + # include <deque> *************** *** 30,33 **** --- 34,42 ---- NodePtr current_; std::deque<NodePtr> locations_; + std::deque<ScopePtr> scopes_; + FileId fileId_; + SymbolTable& symbolTable_; + + Context(SymbolTable& symbolTable): symbolTable_(symbolTable) { } }; *************** *** 113,117 **** } ! NodePtr makeNodeTree(); void reset() --- 122,126 ---- } ! NodePtr makeNodeTree(ScopePtr scope); void reset() *************** *** 121,124 **** --- 130,148 ---- } + void setCurrentFile(FileId fileid) + { + currentFile_ = fileid; + } + + FileId getCurrentFile() + { + return currentFile_; + } + + CommandStream(SymbolTable& symbolTable) + : symbolTable_( symbolTable ) + { + } + private: typedef std::vector<StreamItem> StreamItems; *************** *** 127,130 **** --- 151,157 ---- typedef std::deque<State> States; States states_; + + FileId currentFile_; + SymbolTable& symbolTable_; }; *************** *** 138,141 **** --- 165,171 ---- Command cmdMakePenultimateChildOfLast(); Command cmdRemoveLastChild(); + Command cmdDeclareSymbol( const ConstString &symbolType, const ConstString &nodeName ); + Command cmdEnterScope( const ConstString &scopeName ); + Command cmdLeaveScope(); } // namespace Parser Index: grammarbuilder.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/grammarbuilder.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** grammarbuilder.cpp 8 Jun 2004 20:23:14 -0000 1.1.1.1 --- grammarbuilder.cpp 20 Aug 2004 19:25:10 -0000 1.2 *************** *** 234,237 **** --- 234,261 ---- } + MatcherPtr buildDeclareSymbolCommand( CommandFactoryHelper &helper ) + { + helper.expectParameter( CommandParameter::stringType ); // symbol-type + helper.expectParameter( CommandParameter::stringType ); // node-reference + helper.checkParameterCount(); + ConstString symbolType = helper.getStringParameterAt( 0 ); + ConstString nodeReference = helper.getStringParameterAt( 1 ); + return declare_cmd( symbolType, nodeReference ); + } + + MatcherPtr buildEnterScopeCommand( CommandFactoryHelper &helper ) + { + helper.expectParameter( CommandParameter::stringType ); // scope-name or node-id + helper.checkParameterCount(); + ConstString scopeName = helper.getStringParameterAt( 0 ); + return enterscope_cmd( scopeName ); + } + + MatcherPtr buildLeaveScopeCommand( CommandFactoryHelper &helper ) + { + return leavescope_cmd(); + } + + } // BuilderCommandFactories *************** *** 249,252 **** --- 273,279 ---- addCommandFactory( "make_penultimate_node_child_of_last", &BuilderCommandFactories::buildMakePenultimateChildOfLast ); addCommandFactory( "remove_last_child", &BuilderCommandFactories::buildRemoveLastChild ); + addCommandFactory( "declareSymbol", &BuilderCommandFactories::buildDeclareSymbolCommand ); + addCommandFactory( "enterScope", &BuilderCommandFactories::buildEnterScopeCommand ); + addCommandFactory( "leaveScope", &BuilderCommandFactories::buildLeaveScopeCommand ); } *************** *** 257,262 **** Tokens tokens; GrammarParser::tokenize( grammar, tokens ); ! CommandStream result; ! ParseContext context( tokens.begin(), tokens.end(), result ); MatcherPtr matcher = GrammarParser::parser(); bool matched = matcher->parse( context ); --- 284,291 ---- Tokens tokens; GrammarParser::tokenize( grammar, tokens ); ! SymbolTable symTab; ! ScopePtr scope; ! CommandStream result( symTab ); ! ParseContext context( tokens.begin(), tokens.end(), result, symTab ); MatcherPtr matcher = GrammarParser::parser(); bool matched = matcher->parse( context ); *************** *** 273,277 **** } ! NodePtr rootNode = result.makeNodeTree(); NodePtr tokenDeclNode = getChild(rootNode,"tokens_declaration"); NodeByNameEnumerator enumTokenTypes = enumChildrenByName( tokenDeclNode, "token_type" ); --- 302,306 ---- } ! NodePtr rootNode = result.makeNodeTree(scope); NodePtr tokenDeclNode = getChild(rootNode,"tokens_declaration"); NodeByNameEnumerator enumTokenTypes = enumChildrenByName( tokenDeclNode, "token_type" ); |
From: Baptiste L. <bl...@us...> - 2004-08-18 21:02:36
|
Update of /cvsroot/cpptool/CppParser/src/cppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9882 Modified Files: node.cpp Log Message: * optimized node loading Index: node.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/src/cppparser/node.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** node.cpp 16 Aug 2004 20:44:15 -0000 1.2 --- node.cpp 18 Aug 2004 21:02:27 -0000 1.3 *************** *** 117,120 **** --- 117,144 ---- + void + Node::setChildren( const Nodes &children ) + { + NodePtr previous; + for ( Nodes::const_iterator it = children.begin(); it != children.end(); ++it ) + { + if ( previous ) + { + previous->nextSibling_ = *it; + (*it)->previousSibling_ = previous.get(); + } + else + { + previous = *it; + firstChild_ = *it; + (*it)->previousSibling_ = 0; + } + + (*it)->parent_ = this; + } + + } + + NodePtr Node::thisPtr() const |
From: Baptiste L. <bl...@us...> - 2004-08-18 20:55:57
|
Update of /cvsroot/cpptool/CppParser/src/pycppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8517 Modified Files: node.cpp Log Message: * optimized node loading Index: node.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/src/pycppparser/node.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** node.cpp 18 Aug 2004 19:05:59 -0000 1.2 --- node.cpp 18 Aug 2004 20:55:48 -0000 1.3 *************** *** 70,75 **** list childrenState = extract<list>( state[1] ); int childrenCount = len( childrenState ); for ( int index = 0; index < childrenCount; ++index ) ! node.appendChild( extract<Parser::NodePtr>( childrenState[index] ) ); } }; --- 70,78 ---- list childrenState = extract<list>( state[1] ); int childrenCount = len( childrenState ); + Parser::Nodes nodes; for ( int index = 0; index < childrenCount; ++index ) ! nodes.push_back( extract<Parser::NodePtr>( childrenState[index] ) ); ! ! node.setChildren( nodes ); } }; |
From: Baptiste L. <bl...@us...> - 2004-08-18 19:06:13
|
Update of /cvsroot/cpptool/CppParser/src/pycppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17684 Modified Files: node.cpp Log Message: * added support for pickling Index: node.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/src/pycppparser/node.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** node.cpp 7 Aug 2004 15:52:24 -0000 1.1 --- node.cpp 18 Aug 2004 19:05:59 -0000 1.2 *************** *** 1,4 **** --- 1,5 ---- // Boost Includes ============================================================== #include <boost/python.hpp> + #include <boost/python/detail/api_placeholder.hpp> #include <boost/cstdint.hpp> *************** *** 12,15 **** --- 13,79 ---- namespace py { + struct Node_pickle_suite : boost::python::pickle_suite + { + + static boost::python::tuple + getinitargs( const Parser::Node &node ) + { + return boost::python::make_tuple( node.name().str() ); + } + + static boost::python::tuple + getstate( const Parser::Node &node ) + { + const Parser::Token &token = node.token(); + tuple tokenState = make_tuple( token.type().hash(), + token.text().str(), + token.location().startPos_, + token.location().endPos_, + token.location().bufferId_ ); + + list childrenState; + Parser::NodeEnumerator enumChildren( node.enumChildren() ); + while ( enumChildren.hasNext() ) + childrenState.append( enumChildren.nextPtr() ); + + return make_tuple( tokenState, + childrenState ); + } + + static + void + setstate( Parser::Node &node, + boost::python::tuple state ) + { + if ( len(state) != 2 ) + { + PyErr_SetObject(PyExc_ValueError, + str("expected 2-item tuple in call to __setstate__").ptr() ); + throw_error_already_set(); + } + + tuple tokenState = extract<tuple>( state[0] ); + if ( len(tokenState) != 5 ) + { + PyErr_SetObject(PyExc_ValueError, + str("expected 5-item tuple for token state in call to __setstate__").ptr() ); + throw_error_already_set(); + } + std::string tokenText = extract<std::string>( tokenState[1] ); + Parser::Token token( tokenText, + Parser::TokenType( extract<unsigned long>( tokenState[0] ) ), + Parser::TokenLocation( extract<unsigned long>( tokenState[2] ), + extract<unsigned long>( tokenState[3] ), + extract<unsigned long>( tokenState[4] ) ) ); + node.setToken( token ); + + list childrenState = extract<list>( state[1] ); + int childrenCount = len( childrenState ); + for ( int index = 0; index < childrenCount; ++index ) + node.appendChild( extract<Parser::NodePtr>( childrenState[index] ) ); + } + }; + + BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Node_treeStr_overloads, treeStr, 0, 2) *************** *** 47,51 **** void Export_cppparser_Node() { ! class_< Parser::Node, Parser::NodePtr, boost::noncopyable >("Node", no_init) .def( "enumChildren", &Parser::Node::enumChildren ) .def( "previousSibling", &py::Node_previousSibling ) --- 111,117 ---- void Export_cppparser_Node() { ! class_< Parser::Node, Parser::NodePtr, boost::noncopyable >("Node", ! init<std::string>() ) ! .def_pickle( py::Node_pickle_suite() ) .def( "enumChildren", &Parser::Node::enumChildren ) .def( "previousSibling", &py::Node_previousSibling ) |
From: Baptiste L. <bl...@us...> - 2004-08-18 07:06:08
|
Update of /cvsroot/cpptool/CppParser/src/cppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3099 Modified Files: cpp_grammar.txt Log Message: * added support for __declspec(dllimport) and __cdecl to parse preprocessed headers. Index: cpp_grammar.txt =================================================================== RCS file: /cvsroot/cpptool/CppParser/src/cppparser/cpp_grammar.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cpp_grammar.txt 8 Aug 2004 19:14:51 -0000 1.6 --- cpp_grammar.txt 18 Aug 2004 07:05:59 -0000 1.7 *************** *** 440,444 **** | user_type_specifier; ! storage_class_specifier = :rename('storage_class_specifier') %'auto register static extern mutable'; function_specifier = :rename('function_specifier') %'inline virtual explicit'; --- 440,448 ---- | user_type_specifier; ! msvc_declspec = :node( 'msvc_declspec', '__declspec' '(' $identifier ')' ); ! ! storage_class_specifier = :node('storage_class_specifier', ! msvc_declspec %'auto register static extern mutable' ! | msvc_declspec ); function_specifier = :rename('function_specifier') %'inline virtual explicit'; *************** *** 475,479 **** simple_declaration = :node( 'simple_declaration', ! ?( decl_specifiers ) ?( init_declarator_list ) ';' ); # A.7, C++PL3 p.804 --- 479,483 ---- simple_declaration = :node( 'simple_declaration', ! ?( decl_specifiers ) ?('__cdecl') ?( init_declarator_list ) ';' ); # A.7, C++PL3 p.804 |
From: Andre B. <net...@us...> - 2004-08-17 05:48:15
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32614/parser Modified Files: parser.dsp Log Message: -- restructuring of vc6 project Index: parser.dsp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/parser.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** parser.dsp 9 Aug 2004 11:01:51 -0000 1.2 --- parser.dsp 16 Aug 2004 20:59:52 -0000 1.3 *************** *** 40,43 **** --- 40,44 ---- # PROP Output_Dir "..\..\build\examples\parser\release" # PROP Intermediate_Dir "..\..\build\examples\parser\release" + # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c *************** *** 72,76 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "PARSER_ENABLE_TRACKING" /YX /FD /GZ /c # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x40c /d "_DEBUG" --- 73,77 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "PARSER_ENABLE_TRACKING" /YX /FD /GZ /c # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x40c /d "_DEBUG" *************** *** 97,116 **** # PROP Default_Filter "" ! # Begin Source File ! SOURCE=.\bimap.h ! # End Source File # Begin Source File ! SOURCE=.\commandstream.cpp # End Source File # Begin Source File ! SOURCE=.\commandstream.h # End Source File ! # Begin Source File ! SOURCE=.\conststring.h ! # End Source File # Begin Source File --- 98,116 ---- # PROP Default_Filter "" ! # Begin Group "preprocessor" ! # PROP Default_Filter "" # Begin Source File ! SOURCE=.\lineprocessor.cpp # End Source File # Begin Source File ! SOURCE=.\lineprocessor.h # End Source File ! # End Group ! # Begin Group "scanner" ! # PROP Default_Filter "" # Begin Source File *************** *** 123,179 **** # Begin Source File ! SOURCE=.\cppparser.cpp # End Source File # Begin Source File ! SOURCE=.\cppparser.h # End Source File ! # Begin Source File ! SOURCE=.\cppparserfacade.cpp ! # End Source File # Begin Source File ! SOURCE=.\cppparserfacade.h # End Source File # Begin Source File ! SOURCE=.\cppparsersettings.h # End Source File # Begin Source File ! SOURCE=.\forwards.h # End Source File # Begin Source File ! SOURCE=.\grammarbuilder.cpp # End Source File # Begin Source File ! SOURCE=.\grammarbuilder.h # End Source File # Begin Source File ! SOURCE=.\grammarparser.cpp # End Source File # Begin Source File ! SOURCE=.\grammarparser.h # End Source File # Begin Source File ! SOURCE=.\lineprocessor.cpp # End Source File # Begin Source File ! SOURCE=.\lineprocessor.h # End Source File # Begin Source File ! SOURCE=.\location.h # End Source File # Begin Source File ! SOURCE=.\main.cpp # End Source File # Begin Source File --- 123,179 ---- # Begin Source File ! SOURCE=.\token.h # End Source File # Begin Source File ! SOURCE=.\tokenmanager.h # End Source File ! # End Group ! # Begin Group "parser" ! # PROP Default_Filter "" # Begin Source File ! SOURCE=.\commandstream.cpp # End Source File # Begin Source File ! SOURCE=.\commandstream.h # End Source File # Begin Source File ! SOURCE=.\cppparser.cpp # End Source File # Begin Source File ! SOURCE=.\cppparser.h # End Source File # Begin Source File ! SOURCE=.\cppparserfacade.cpp # End Source File # Begin Source File ! SOURCE=.\cppparserfacade.h # End Source File # Begin Source File ! SOURCE=.\cppparsersettings.h # End Source File # Begin Source File ! SOURCE=.\grammarbuilder.cpp # End Source File # Begin Source File ! SOURCE=.\grammarbuilder.h # End Source File # Begin Source File ! SOURCE=.\grammarparser.cpp # End Source File # Begin Source File ! SOURCE=.\grammarparser.h # End Source File # Begin Source File *************** *** 207,214 **** # Begin Source File - SOURCE=.\options.h - # End Source File - # Begin Source File - SOURCE=.\parsecontext.h # End Source File --- 207,210 ---- *************** *** 225,232 **** SOURCE=.\parsingtracker.h # End Source File ! # Begin Source File ! SOURCE=.\project.h ! # End Source File # Begin Source File --- 221,228 ---- SOURCE=.\parsingtracker.h # End Source File ! # End Group ! # Begin Group "symbtab" ! # PROP Default_Filter "" # Begin Source File *************** *** 239,283 **** # Begin Source File ! SOURCE=.\sourceeditor.cpp # End Source File # Begin Source File ! SOURCE=.\sourceeditor.h # End Source File # Begin Source File ! SOURCE=.\stlhelper.h # End Source File # Begin Source File ! SOURCE=.\symboldeclaration.cpp # End Source File # Begin Source File ! SOURCE=.\symboldeclaration.h # End Source File # Begin Source File ! SOURCE=.\symboldeclarator.cpp # End Source File # Begin Source File ! SOURCE=.\symboldeclarator.h # End Source File # Begin Source File ! SOURCE=.\symboltable.cpp # End Source File # Begin Source File ! SOURCE=.\symboltable.h # End Source File # Begin Source File ! SOURCE=.\token.h # End Source File # Begin Source File ! SOURCE=.\tokenmanager.h # End Source File # End Group --- 235,304 ---- # Begin Source File ! SOURCE=.\symboldeclaration.cpp # End Source File # Begin Source File ! SOURCE=.\symboldeclaration.h # End Source File # Begin Source File ! SOURCE=.\symboldeclarator.cpp # End Source File # Begin Source File ! SOURCE=.\symboldeclarator.h # End Source File # Begin Source File ! SOURCE=.\symboltable.cpp # End Source File # Begin Source File ! SOURCE=.\symboltable.h # End Source File + # End Group + # Begin Group "base" + + # PROP Default_Filter "" # Begin Source File ! SOURCE=.\bimap.h # End Source File # Begin Source File ! SOURCE=.\conststring.h # End Source File # Begin Source File ! SOURCE=.\forwards.h # End Source File # Begin Source File ! SOURCE=.\location.h # End Source File # Begin Source File ! SOURCE=.\options.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\stlhelper.h ! # End Source File ! # End Group ! # Begin Source File ! ! SOURCE=.\main.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\project.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\sourceeditor.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\sourceeditor.h # End Source File # End Group *************** *** 285,288 **** --- 306,312 ---- # PROP Default_Filter "" + # Begin Group "scannertests" + + # PROP Default_Filter "" # Begin Source File *************** *** 311,314 **** --- 335,346 ---- # Begin Source File + SOURCE=.\tokentesthelper.h + # End Source File + # End Group + # Begin Group "parsertests" + + # PROP Default_Filter "" + # Begin Source File + SOURCE=.\cppnodetestbase.cpp # End Source File *************** *** 389,392 **** --- 421,428 ---- SOURCE=.\parsertesthelper.h # End Source File + # End Group + # Begin Group "preprocessortests" + + # PROP Default_Filter "" # Begin Source File *************** *** 397,443 **** SOURCE=.\preprocessortest.h # End Source File ! # Begin Source File ! SOURCE=.\refactoringtest.cpp ! # End Source File # Begin Source File ! SOURCE=.\refactoringtest.h # End Source File # Begin Source File ! SOURCE=.\symboltabletest.cpp # End Source File # Begin Source File ! SOURCE=.\symboltabletest.h # End Source File # Begin Source File ! SOURCE=.\symboltabletestprocessor.cpp # End Source File # Begin Source File ! SOURCE=.\symboltabletestprocessor.h # End Source File # Begin Source File ! SOURCE=.\testproject.cpp # End Source File # Begin Source File ! SOURCE=.\testproject.h # End Source File # Begin Source File ! SOURCE=.\testtools.h # End Source File # Begin Source File ! SOURCE=.\tokentesthelper.h # End Source File # Begin Source File ! SOURCE=.\unittesting.h # End Source File # End Group --- 433,480 ---- SOURCE=.\preprocessortest.h # End Source File ! # End Group ! # Begin Group "testbase" ! # PROP Default_Filter "" # Begin Source File ! SOURCE=.\testproject.cpp # End Source File # Begin Source File ! SOURCE=.\testproject.h # End Source File # Begin Source File ! SOURCE=.\testtools.h # End Source File # Begin Source File ! SOURCE=.\unittesting.h # End Source File + # End Group # Begin Source File ! SOURCE=.\refactoringtest.cpp # End Source File # Begin Source File ! SOURCE=.\refactoringtest.h # End Source File # Begin Source File ! SOURCE=.\symboltabletest.cpp # End Source File # Begin Source File ! SOURCE=.\symboltabletest.h # End Source File # Begin Source File ! SOURCE=.\symboltabletestprocessor.cpp # End Source File # Begin Source File ! SOURCE=.\symboltabletestprocessor.h # End Source File # End Group *************** *** 454,518 **** SOURCE=.\testdata\refactoring\rename_class\test1.cpp - - !IF "$(CFG)" == "parser - Win32 Release" - - !ELSEIF "$(CFG)" == "parser - Win32 Debug" - # PROP Exclude_From_Build 1 - - !ENDIF - # End Source File # Begin Source File SOURCE=.\testdata\refactoring\rename_class\test2.cpp - - !IF "$(CFG)" == "parser - Win32 Release" - - !ELSEIF "$(CFG)" == "parser - Win32 Debug" - # PROP Exclude_From_Build 1 - - !ENDIF - # End Source File # Begin Source File SOURCE=.\testdata\refactoring\rename_class\test3.cpp - - !IF "$(CFG)" == "parser - Win32 Release" - - !ELSEIF "$(CFG)" == "parser - Win32 Debug" - # PROP Exclude_From_Build 1 - - !ENDIF - # End Source File # Begin Source File SOURCE=.\testdata\refactoring\rename_class\test4.cpp - - !IF "$(CFG)" == "parser - Win32 Release" - - !ELSEIF "$(CFG)" == "parser - Win32 Debug" - # PROP Exclude_From_Build 1 - - !ENDIF - # End Source File # Begin Source File SOURCE=.\testdata\refactoring\rename_class\test5.cpp - - !IF "$(CFG)" == "parser - Win32 Release" - - !ELSEIF "$(CFG)" == "parser - Win32 Debug" - # PROP Exclude_From_Build 1 ! !ENDIF ! # End Source File # End Group --- 491,520 ---- SOURCE=.\testdata\refactoring\rename_class\test1.cpp # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=.\testdata\refactoring\rename_class\test2.cpp # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=.\testdata\refactoring\rename_class\test3.cpp # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=.\testdata\refactoring\rename_class\test4.cpp # PROP Exclude_From_Build 1 # End Source File # Begin Source File SOURCE=.\testdata\refactoring\rename_class\test5.cpp # PROP Exclude_From_Build 1 + # End Source File + # Begin Source File ! SOURCE=.\testdata\refactoring\rename_class\test6.cpp ! # PROP Exclude_From_Build 1 # End Source File # End Group *************** *** 627,630 **** --- 629,644 ---- # End Group # End Group + # Begin Group "data" + + # PROP Default_Filter "" + # Begin Source File + + SOURCE=.\cpp_grammar.txt + # End Source File + # Begin Source File + + SOURCE=.\grammar_tree.txt + # End Source File + # End Group # End Target # End Project |
From: Andre B. <net...@us...> - 2004-08-16 21:08:58
|
Update of /cvsroot/cpptool/CppParser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1806 Modified Files: .cvsignore Log Message: -- ignore temp files... Index: .cvsignore =================================================================== RCS file: /cvsroot/cpptool/CppParser/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 19 Jun 2004 12:25:48 -0000 1.1 --- .cvsignore 16 Aug 2004 21:06:57 -0000 1.2 *************** *** 3,4 **** --- 3,5 ---- wiki libs + *.plg |
From: Andre B. <net...@us...> - 2004-08-16 21:06:43
|
Update of /cvsroot/cpptool/CppParser/src/cppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1092/cppparser Added Files: CppParserStatic.dsp Log Message: -- vc6 projects --- NEW FILE: CppParserStatic.dsp --- # Microsoft Developer Studio Project File - Name="CppParserStatic" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 CFG=CppParserStatic - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "CppParserStatic.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "CppParserStatic.mak" CFG="CppParserStatic - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "CppParserStatic - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "CppParserStatic - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "CppParserStatic - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\..\build\CppParserLib\Release" # PROP Intermediate_Dir "..\..\build\CppParserLib\Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\..\build\CppParserLib\Release\rfta_cppparser_vc6_mrs.lib" !ELSEIF "$(CFG)" == "CppParserStatic - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "CppParserStatic___Win32_Debug" # PROP BASE Intermediate_Dir "CppParserStatic___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\..\build\CppParserLib\Debug" # PROP Intermediate_Dir "..\..\build\CppParserLib\Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "RFTA_CPPPARSER_STATIC_BUILD" /YX /FD /GZ /c # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\..\build\CppParserLib\Debug\rfta_cppparser_vc6_mds.lib" !ENDIF # Begin Target # Name "CppParserStatic - Win32 Release" # Name "CppParserStatic - Win32 Debug" # Begin Group "source" # PROP Default_Filter "" # Begin Source File SOURCE=.\commandstream.cpp # End Source File # Begin Source File SOURCE=.\commandstream.h # End Source File # Begin Source File SOURCE=.\cpplexer.cpp # End Source File # Begin Source File SOURCE=.\cpplexer.h # End Source File # Begin Source File SOURCE=.\cppparser.cpp # End Source File # Begin Source File SOURCE=.\cppparserfacade.cpp # End Source File # Begin Source File SOURCE=.\grammarbuilder.cpp # End Source File # Begin Source File SOURCE=.\grammarbuilder.h # End Source File # Begin Source File SOURCE=.\grammarparser.cpp # End Source File # Begin Source File SOURCE=.\grammarparser.h # End Source File # Begin Source File SOURCE=.\node.cpp # End Source File # Begin Source File SOURCE=.\nodeiterator.h # End Source File # Begin Source File SOURCE=.\nodeprocessor.cpp # End Source File # Begin Source File SOURCE=.\parsecontext.h # End Source File # Begin Source File SOURCE=.\parser.h # End Source File # Begin Source File SOURCE=.\parsingtracker.cpp # End Source File # Begin Source File SOURCE=.\parsingtracker.h # End Source File # Begin Source File SOURCE=.\stlhelper.h # End Source File # Begin Source File SOURCE=.\token.h # End Source File # Begin Source File SOURCE=.\unittesting.h # End Source File # End Group # Begin Group "tests" # PROP Default_Filter "" # Begin Source File SOURCE=.\commandstreamtest.cpp # End Source File # Begin Source File SOURCE=.\commandstreamtest.h # End Source File # Begin Source File SOURCE=.\conststringtest.cpp # End Source File # Begin Source File SOURCE=.\conststringtest.h # End Source File # Begin Source File SOURCE=.\cpplexertest.cpp # End Source File # Begin Source File SOURCE=.\cpplexertest.h # End Source File # Begin Source File SOURCE=.\cppnodetestbase.cpp # End Source File # Begin Source File SOURCE=.\cppnodetestbase.h # End Source File # Begin Source File SOURCE=.\cppparsertest.cpp # End Source File # Begin Source File SOURCE=.\cppparsertest.h # End Source File # Begin Source File SOURCE=.\grammarbuildertest.cpp # End Source File # Begin Source File SOURCE=.\grammarbuildertest.h # End Source File # Begin Source File SOURCE=.\grammarparsertest.cpp # End Source File # Begin Source File SOURCE=.\grammarparsertest.h # End Source File # Begin Source File SOURCE=.\nodetest.cpp # End Source File # Begin Source File SOURCE=.\nodetest.h # End Source File # Begin Source File SOURCE=.\nodetesthelper.cpp # End Source File # Begin Source File SOURCE=.\nodetesthelper.h # End Source File # Begin Source File SOURCE=.\nodetreetestbase.cpp # End Source File # Begin Source File SOURCE=.\nodetreetestbase.h # End Source File # Begin Source File SOURCE=.\parsertest.cpp # End Source File # Begin Source File SOURCE=.\parsertest.h # End Source File # Begin Source File SOURCE=.\parsertesthelper.cpp # End Source File # Begin Source File SOURCE=.\parsertesthelper.h # End Source File # Begin Source File SOURCE=.\preprocessortest.cpp # End Source File # Begin Source File SOURCE=.\preprocessortest.h # End Source File # Begin Source File SOURCE=.\testtools.h # End Source File # Begin Source File SOURCE=.\tokentesthelper.h # End Source File # End Group # Begin Group "includes" # PROP Default_Filter "" # Begin Group "rfta" # PROP Default_Filter "" # Begin Source File SOURCE=..\..\include\rfta\cppparser\autolink.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\config.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\conststring.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparser.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparserfacade.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparsersettings.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\forwards.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\node.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\nodeprocessor.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\token.h # End Source File # End Group # End Group # End Target # End Project |
From: Andre B. <net...@us...> - 2004-08-16 21:05:55
|
Update of /cvsroot/cpptool/CppParser/src/cppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv933/cppparser Added Files: CppParserDll.dsp Log Message: -- vc6 projects --- NEW FILE: CppParserDll.dsp --- # Microsoft Developer Studio Project File - Name="CppParserDll" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=CppParserDll - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "CppParserDll.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "CppParserDll.mak" CFG="CppParserDll - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "CppParserDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "CppParserDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "CppParserDll - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\..\build\CppParserDll\Release" # PROP Intermediate_Dir "..\..\build\CppParserDll\Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPPARSERDLL_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPPARSERDLL_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\build\CppParserDll\Release\rfta_cppparser_vc6_mrd.dll" !ELSEIF "$(CFG)" == "CppParserDll - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\..\build\CppParserDll\Debug" # PROP Intermediate_Dir "..\..\build\CppParserDll\Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPPARSERDLL_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPPARSERDLL_EXPORTS" /D "RFTA_CPPPARSER_DLL_BUILD" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\build\CppParserDll\Debug\rfta_cppparser_vc6_mdd.dll" /pdbtype:sept # SUBTRACT LINK32 /pdb:none /nodefaultlib !ENDIF # Begin Target # Name "CppParserDll - Win32 Release" # Name "CppParserDll - Win32 Debug" # Begin Group "source" # PROP Default_Filter "" # Begin Source File SOURCE=.\commandstream.cpp # End Source File # Begin Source File SOURCE=.\commandstream.h # End Source File # Begin Source File SOURCE=.\cpplexer.cpp # End Source File # Begin Source File SOURCE=.\cpplexer.h # End Source File # Begin Source File SOURCE=.\cppparser.cpp # End Source File # Begin Source File SOURCE=.\cppparserfacade.cpp # End Source File # Begin Source File SOURCE=.\grammarbuilder.cpp # End Source File # Begin Source File SOURCE=.\grammarbuilder.h # End Source File # Begin Source File SOURCE=.\grammarparser.cpp # End Source File # Begin Source File SOURCE=.\grammarparser.h # End Source File # Begin Source File SOURCE=.\node.cpp # End Source File # Begin Source File SOURCE=.\nodeiterator.h # End Source File # Begin Source File SOURCE=.\nodeprocessor.cpp # End Source File # Begin Source File SOURCE=.\parsecontext.h # End Source File # Begin Source File SOURCE=.\parser.h # End Source File # Begin Source File SOURCE=.\parsingtracker.cpp # End Source File # Begin Source File SOURCE=.\parsingtracker.h # End Source File # Begin Source File SOURCE=.\stlhelper.h # End Source File # Begin Source File SOURCE=.\token.h # End Source File # Begin Source File SOURCE=.\unittesting.h # End Source File # End Group # Begin Group "tests" # PROP Default_Filter "" # Begin Source File SOURCE=.\commandstreamtest.cpp # End Source File # Begin Source File SOURCE=.\commandstreamtest.h # End Source File # Begin Source File SOURCE=.\conststringtest.cpp # End Source File # Begin Source File SOURCE=.\conststringtest.h # End Source File # Begin Source File SOURCE=.\cpplexertest.cpp # End Source File # Begin Source File SOURCE=.\cpplexertest.h # End Source File # Begin Source File SOURCE=.\cppnodetestbase.cpp # End Source File # Begin Source File SOURCE=.\cppnodetestbase.h # End Source File # Begin Source File SOURCE=.\cppparsertest.cpp # End Source File # Begin Source File SOURCE=.\cppparsertest.h # End Source File # Begin Source File SOURCE=.\grammarbuildertest.cpp # End Source File # Begin Source File SOURCE=.\grammarbuildertest.h # End Source File # Begin Source File SOURCE=.\grammarparsertest.cpp # End Source File # Begin Source File SOURCE=.\grammarparsertest.h # End Source File # Begin Source File SOURCE=.\nodetest.cpp # End Source File # Begin Source File SOURCE=.\nodetest.h # End Source File # Begin Source File SOURCE=.\nodetesthelper.cpp # End Source File # Begin Source File SOURCE=.\nodetesthelper.h # End Source File # Begin Source File SOURCE=.\nodetreetestbase.cpp # End Source File # Begin Source File SOURCE=.\nodetreetestbase.h # End Source File # Begin Source File SOURCE=.\parsertest.cpp # End Source File # Begin Source File SOURCE=.\parsertest.h # End Source File # Begin Source File SOURCE=.\parsertesthelper.cpp # End Source File # Begin Source File SOURCE=.\parsertesthelper.h # End Source File # Begin Source File SOURCE=.\preprocessortest.cpp # End Source File # Begin Source File SOURCE=.\preprocessortest.h # End Source File # Begin Source File SOURCE=.\testtools.h # End Source File # Begin Source File SOURCE=.\tokentesthelper.h # End Source File # End Group # Begin Group "includes" # PROP Default_Filter "" # Begin Group "rfta" # PROP Default_Filter "" # Begin Source File SOURCE=..\..\include\rfta\cppparser\autolink.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\config.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\conststring.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparser.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparserfacade.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparsersettings.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\forwards.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\node.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\nodeprocessor.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\token.h # End Source File # End Group # End Group # End Target # End Project |
From: Andre B. <net...@us...> - 2004-08-16 21:05:50
|
Update of /cvsroot/cpptool/CppParser/src/pycppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv933/pycppparser Added Files: PyCppParserDll.dsp PyCppParserDynamicDll.dsp PyCppParserStaticDll.dsp Log Message: -- vc6 projects --- NEW FILE: PyCppParserDynamicDll.dsp --- # Microsoft Developer Studio Project File - Name="PyCppParserDynamicDll" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=PyCppParserDynamicDll - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "PyCppParserDynamicDll.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "PyCppParserDynamicDll.mak" CFG="PyCppParserDynamicDll - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "PyCppParserDynamicDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "PyCppParserDynamicDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "PyCppParserDynamicDll - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\..\build\PyCppParserDynamicDll\Release" # PROP Intermediate_Dir "..\..\build\PyCppParserDynamicDll\Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PyCppParserDynamicDll_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PyCppParserDynamicDll_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\build\PyCppParserDynamicDll\Release/PyCppParser_.dll" !ELSEIF "$(CFG)" == "PyCppParserDynamicDll - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "PyCppParserDynamicDll___Win32_Debug" # PROP BASE Intermediate_Dir "PyCppParserDynamicDll___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\..\build\PyCppParserDynamicDll\Debug" # PROP Intermediate_Dir "..\..\build\PyCppParserDynamicDll\Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PyCppParserDynamicDll_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /Zm200 /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 boost_python.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\build\PyCppParserDynamicDll\Debug/PyCppParser_.dll" /pdbtype:sept !ENDIF # Begin Target # Name "PyCppParserDynamicDll - Win32 Release" # Name "PyCppParserDynamicDll - Win32 Debug" # Begin Group "src" # PROP Default_Filter "" # Begin Source File SOURCE=.\conststring.cpp # End Source File # Begin Source File SOURCE=.\cppparser.cpp # End Source File # Begin Source File SOURCE=.\cppparserfacade.cpp # End Source File # Begin Source File SOURCE=.\main.cpp # End Source File # Begin Source File SOURCE=.\node.cpp # End Source File # Begin Source File SOURCE=.\nodeprocessor.cpp # End Source File # Begin Source File SOURCE=.\pyenumerator.h # End Source File # Begin Source File SOURCE=.\token.cpp # End Source File # End Group # Begin Group "includes" # PROP Default_Filter "" # Begin Group "rfta" # PROP Default_Filter "" # Begin Source File SOURCE=..\..\include\rfta\cppparser\autolink.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\config.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\conststring.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparser.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparserfacade.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparsersettings.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\forwards.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\node.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\nodeprocessor.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\token.h # End Source File # End Group # End Group # End Target # End Project --- NEW FILE: PyCppParserDll.dsp --- # Microsoft Developer Studio Project File - Name="PyCppParserDll" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=PyCppParserDll - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "PyCppParserDll.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "PyCppParserDll.mak" CFG="PyCppParserDll - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "PyCppParserDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "PyCppParserDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "PyCppParserDll - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "PyCppParserDll___Win32_Debug" # PROP BASE Intermediate_Dir "PyCppParserDll___Win32_Debug" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\..\build\PyCppParserDll\Debug" # PROP Intermediate_Dir "..\..\build\PyCppParserDll\Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUT_STATIC_LINK" /D "RFTA_CPPPARSER_STATIC_BUILD" /YX /FD /Zm200 /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUT_STATIC_LINK" /D "RFTA_CPPPARSER_STATIC_BUILD" /YX /FD /Zm200 /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 boost_python.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 boost_python.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "PyCppParserDll - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "PyCppParserDll___Win32_Release" # PROP BASE Intermediate_Dir "PyCppParserDll___Win32_Release" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "..\..\build\PyCppParserDll\Release" # PROP Intermediate_Dir "..\..\build\PyCppParserDll\Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PYCPPPARSERDLL_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PYCPPPARSERDLL_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 !ENDIF # Begin Target # Name "PyCppParserDll - Win32 Debug" # Name "PyCppParserDll - Win32 Release" # Begin Group "src" # PROP Default_Filter "" # Begin Source File SOURCE=.\conststring.cpp # End Source File # Begin Source File SOURCE=.\cppparser.cpp # End Source File # Begin Source File SOURCE=.\cppparserfacade.cpp # End Source File # Begin Source File SOURCE=.\main.cpp # End Source File # Begin Source File SOURCE=.\node.cpp # End Source File # Begin Source File SOURCE=.\nodeprocessor.cpp # End Source File # Begin Source File SOURCE=.\pyenumerator.h # End Source File # Begin Source File SOURCE=.\token.cpp # End Source File # End Group # Begin Group "includes" # PROP Default_Filter "" # Begin Group "rfta" # PROP Default_Filter "" # Begin Source File SOURCE=..\..\include\rfta\cppparser\autolink.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\config.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\conststring.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparser.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparserfacade.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparsersettings.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\forwards.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\node.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\nodeprocessor.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\token.h # End Source File # End Group # End Group # End Target # End Project --- NEW FILE: PyCppParserStaticDll.dsp --- # Microsoft Developer Studio Project File - Name="PyCppParserDll" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=PyCppParserDll - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "PyCppParserDll.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "PyCppParserDll.mak" CFG="PyCppParserDll - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "PyCppParserDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "PyCppParserDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "PyCppParserDll - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PYCPPPARSERDLL_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PYCPPPARSERDLL_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 !ELSEIF "$(CFG)" == "PyCppParserDll - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "PyCppParserDll___Win32_Debug" # PROP BASE Intermediate_Dir "PyCppParserDll___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PYCPPPARSERDLL_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUT_STATIC_LINK" /D "RFTA_CPPPARSER_STATIC_BUILD" /YX /FD /Zm200 /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 boost_python.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "PyCppParserDll - Win32 Release" # Name "PyCppParserDll - Win32 Debug" # Begin Group "src" # PROP Default_Filter "" # Begin Source File SOURCE=.\conststring.cpp # End Source File # Begin Source File SOURCE=.\cppparser.cpp # End Source File # Begin Source File SOURCE=.\cppparserfacade.cpp # End Source File # Begin Source File SOURCE=.\main.cpp # End Source File # Begin Source File SOURCE=.\node.cpp # End Source File # Begin Source File SOURCE=.\nodeprocessor.cpp # End Source File # Begin Source File SOURCE=.\pyenumerator.h # End Source File # Begin Source File SOURCE=.\token.cpp # End Source File # End Group # Begin Group "includes" # PROP Default_Filter "" # Begin Group "rfta" # PROP Default_Filter "" # Begin Source File SOURCE=..\..\include\rfta\cppparser\autolink.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\config.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\conststring.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparser.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparserfacade.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\cppparsersettings.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\forwards.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\node.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\nodeprocessor.h # End Source File # Begin Source File SOURCE=..\..\include\rfta\cppparser\token.h # End Source File # End Group # End Group # End Target # End Project |
From: Andre B. <net...@us...> - 2004-08-16 21:05:50
|
Update of /cvsroot/cpptool/CppParser/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv933 Added Files: CPPRefactoring.dsp CPPRefactoring.dsw Log Message: -- vc6 projects --- NEW FILE: CPPRefactoring.dsp --- # Microsoft Developer Studio Project File - Name="CPPRefactoring" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=CPPRefactoring - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "CPPRefactoring.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "CPPRefactoring.mak" CFG="CPPRefactoring - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "CPPRefactoring - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "CPPRefactoring - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "CPPRefactoring - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "CPPRefactoring - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "CPPRefactoring - Win32 Release" # Name "CPPRefactoring - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project --- NEW FILE: CPPRefactoring.dsw --- Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "CppParserDll"=.\cppparser\CppParserDll.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name cpput End Project Dependency }}} ############################################################################### Project: "CppParserStatic"=.\CPPPARSER\CppParserStatic.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name cpput End Project Dependency }}} ############################################################################### Project: "PyCppParserDll"=.\PYCPPPARSER\PyCppParserDll.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name cpput End Project Dependency Begin Project Dependency Project_Dep_Name CppParserStatic End Project Dependency }}} ############################################################################### Project: "PyCppParserDynamicDll"=.\pycppparser\PyCppParserDynamicDll.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name cpput End Project Dependency Begin Project Dependency Project_Dep_Name CppParserDll End Project Dependency }}} ############################################################################### Project: "cpput"=.\cpput\cpput.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### |
From: Andre B. <net...@us...> - 2004-08-16 20:59:45
|
Update of /cvsroot/cpptool/CppParser/examples/parser/testdata/refactoring/rename_class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32340/examples/parser/testdata/refactoring/rename_class Added Files: test6.cpp Log Message: -- additional test: multiple files --- NEW FILE: test6.cpp --- rename_class C2 $1 ##rename_class C2 $2 ##rename_class C2 $3 ##rename_class C2 $4 ====input: ====file: c1.cpp class C$1$1 { $2$C1() {} ~$3$C1() {} void f() {} }; ====file: forwards.h class $4$C1; ====expected: ====file: forwards.h class C2; ====file: c1.cpp class C2 { C2() {} ~C2() {} void f() {} }; ====end: |
From: Andre B. <net...@us...> - 2004-08-16 20:57:02
|
Update of /cvsroot/cpptool/CppParser/examples/parser/testdata/refactoring/rename_class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32030/examples/parser/testdata/refactoring/rename_class Modified Files: test3.cpp test4.cpp Log Message: -- some small changes to the tests Index: test4.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/testdata/refactoring/rename_class/test4.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** test4.cpp 8 Jun 2004 20:23:19 -0000 1.1.1.1 --- test4.cpp 16 Aug 2004 20:56:50 -0000 1.2 *************** *** 1,4 **** ! rename_class C2 $1 ! ##rename_class C2 $2 ##rename_class C2 $3 ##rename_class C2 $4 --- 1,4 ---- ! ##rename_class C2 $1 ! rename_class C2 $2 ##rename_class C2 $3 ##rename_class C2 $4 *************** *** 6,17 **** ====input: ====file: c1.cpp ! class C1; ! class C$1$1 { ! $2$C1(); ~$3$C1(); void f(); }; $4$C1::C1() {} ! C1::~$5$C1() {} void C1::f() {} ====expected: --- 6,17 ---- ====input: ====file: c1.cpp ! class $1$C1; ! class $2$C1 { ! C1(); ~$3$C1(); void f(); }; $4$C1::C1() {} ! $5$C1::~C1() {} void C1::f() {} ====expected: Index: test3.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/testdata/refactoring/rename_class/test3.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** test3.cpp 8 Jun 2004 20:23:19 -0000 1.1.1.1 --- test3.cpp 16 Aug 2004 20:56:50 -0000 1.2 *************** *** 1,10 **** ! rename_class C2 $1 ##rename_class C2 $2 ##rename_class C2 $3 ! ##rename_class C2 $4 ====input: ====file: c1.cpp class $4$C1; ! class C$1$1 { $2$C1() {} ~$3$C1() {} --- 1,10 ---- ! ##rename_class C2 $1 ##rename_class C2 $2 ##rename_class C2 $3 ! rename_class C2 $4 ====input: ====file: c1.cpp class $4$C1; ! class $1$C1 { $2$C1() {} ~$3$C1() {} |
From: Andre B. <net...@us...> - 2004-08-16 20:56:22
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31922/examples/parser Modified Files: symboltable.cpp symboltable.h Log Message: -- added function to find sibling declarations Index: symboltable.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/symboltable.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** symboltable.cpp 20 Jun 2004 11:00:38 -0000 1.2 --- symboltable.cpp 16 Aug 2004 20:56:11 -0000 1.3 *************** *** 2,6 **** #include "scope.h" - namespace Parser { --- 2,5 ---- *************** *** 28,31 **** --- 27,43 ---- } + SymbolDeclarationPtrEnum + SymbolTable::enumSiblingDeclaration( const SymbolDeclarationPtr& declaration) const + { + std::deque<SymbolDeclarationPtr> * list = new std::deque<SymbolDeclarationPtr>(); + SymbolsReferences::const_iterator itSymbol = references_.begin(); + for ( ; itSymbol != references_.end(); ++itSymbol ) + { + if (itSymbol->first->equals(*declaration)) + list->push_back(itSymbol->first); + } + return CppUT::enumStl(*list); + } + SymbolDeclarationPtr Index: symboltable.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/symboltable.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** symboltable.h 20 Jun 2004 11:00:38 -0000 1.2 --- symboltable.h 16 Aug 2004 20:56:11 -0000 1.3 *************** *** 23,26 **** --- 23,28 ---- SymbolDeclarationPtr findDeclarationAt( const Location &location ) const; + Parser::SymbolDeclarationPtrEnum enumSiblingDeclaration( const SymbolDeclarationPtr& declaration) const; + SymbolDeclarationPtr declare( const Symbol &symbol ); |
From: Andre B. <net...@us...> - 2004-08-16 20:55:11
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31667/examples/parser Modified Files: symboldeclarator.cpp Log Message: -- fixed member declaration handling for constructor -- open: destructor Index: symboldeclarator.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/symboldeclarator.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** symboldeclarator.cpp 21 Jun 2004 18:53:16 -0000 1.5 --- symboldeclarator.cpp 16 Aug 2004 20:54:57 -0000 1.6 *************** *** 164,169 **** --- 164,178 ---- { NodePtr member = enumMember.nextPtr(); + // usual functions with body: if ( member->name() == ConstString("member_function_definition") ) + declareMemberFunctionDefinition( safeGetChild( member, "function_definition" ), parentScope ); + // constructor without body: + if ( member->name() == ConstString("typeless_function_declaration") ) declareMemberFunctionDefinition( member, parentScope ); + // TODO: destructor falls into this category: + /* + if ( member->name() == ConstString("member_declaration") ) + declareMemberDeclaration( member, parentScope );; + */ } } *************** *** 174,179 **** ClassScope &parentScope ) { ! NodePtr functionDefinition = safeGetChild( member, "function_definition" ); ! NodePtr declaratorId = safeGetChild( functionDefinition, "declarator_id"); NodePtr unqualifiedId = safeGetChild( declaratorId, "unqualified_id" ); --- 183,187 ---- ClassScope &parentScope ) { ! NodePtr declaratorId = safeGetChild( member, "declarator_id"); NodePtr unqualifiedId = safeGetChild( declaratorId, "unqualified_id" ); |
From: Andre B. <net...@us...> - 2004-08-16 20:53:56
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31432/examples/parser Modified Files: symboldeclaration.cpp symboldeclaration.h Log Message: -- moved declaration enumerator to source of declarations -- added compare function for sibling declarations (not optimal) Index: symboldeclaration.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/symboldeclaration.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** symboldeclaration.h 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- symboldeclaration.h 16 Aug 2004 20:53:46 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- # include "location.h" # include <boost/shared_ptr.hpp> + # include <cpput/enumerator.h> # include <string> *************** *** 15,19 **** class SymbolReference; typedef boost::shared_ptr<SymbolDeclaration> SymbolDeclarationPtr; ! class Symbol --- 16,20 ---- class SymbolReference; typedef boost::shared_ptr<SymbolDeclaration> SymbolDeclarationPtr; ! typedef CppUT::Enumerator<SymbolDeclarationPtr> SymbolDeclarationPtrEnum; class Symbol *************** *** 58,61 **** --- 59,64 ---- bool isTypeDeclaration() const; + bool equals(const SymbolDeclaration& siblingDeclaration) const; + private: Symbol symbol_; Index: symboldeclaration.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/symboldeclaration.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** symboldeclaration.cpp 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- symboldeclaration.cpp 16 Aug 2004 20:53:46 -0000 1.2 *************** *** 49,52 **** --- 49,63 ---- } + bool + SymbolDeclaration::equals(const SymbolDeclaration& siblingDeclaration) const + { + if (symbol_.name() != siblingDeclaration.name()) + return false; + return + scope_ == siblingDeclaration.scope() || + // [TODO] not the best way to compare strings, better implement scope.equal() member !!! + ( scope_!=ScopePtr() && scope_->str() == siblingDeclaration.scope()->str() ); + } + // class SymbolReference |
From: Andre B. <net...@us...> - 2004-08-16 20:52:44
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31037/examples/parser Modified Files: scope.h Log Message: -- moved declaration enumerator to source of declarations Index: scope.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/scope.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** scope.h 21 Jun 2004 18:53:16 -0000 1.5 --- scope.h 16 Aug 2004 20:52:31 -0000 1.6 *************** *** 32,37 **** typedef boost::shared_ptr<Type> TypePtr; - typedef CppUT::Enumerator<SymbolDeclarationPtr> SymbolDeclarationPtrEnum; - class ScopeVisitor { --- 32,35 ---- |
From: Andre B. <net...@us...> - 2004-08-16 20:51:42
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30804/examples/parser Modified Files: refactoringtest.h Log Message: -- activated tests Index: refactoringtest.h =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/refactoringtest.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** refactoringtest.h 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- refactoringtest.h 16 Aug 2004 20:51:32 -0000 1.2 *************** *** 12,18 **** CPPUT_TEST( testRenameClassTest1 ); CPPUT_TEST( testRenameClassTest2 ); ! //CPPUT_TEST( testRenameClassTest3 ); ! //CPPUT_TEST( testRenameClassTest4 ); ! //CPPUT_TEST( testRenameClassTest5 ); CPPUT_TESTSUITE_END(); --- 12,19 ---- CPPUT_TEST( testRenameClassTest1 ); CPPUT_TEST( testRenameClassTest2 ); ! CPPUT_TEST( testRenameClassTest3 ); ! CPPUT_TEST( testRenameClassTest4 ); ! CPPUT_TEST( testRenameClassTest5 ); ! CPPUT_TEST( testRenameClassTest6 ); CPPUT_TESTSUITE_END(); *************** *** 25,28 **** --- 26,30 ---- void testRenameClassTest4(); void testRenameClassTest5(); + void testRenameClassTest6(); private: |
From: Andre B. <net...@us...> - 2004-08-16 20:51:06
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30640/examples/parser Modified Files: refactoringtest.cpp Log Message: -- implemented "sibling class declaration" renaming Index: refactoringtest.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/refactoringtest.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** refactoringtest.cpp 8 Jun 2004 20:23:17 -0000 1.1.1.1 --- refactoringtest.cpp 16 Aug 2004 20:50:57 -0000 1.2 *************** *** 93,106 **** Parser::SymbolTable &table = project_.symbolTable(); Parser::SymbolDeclarationPtr declaration = table.findDeclarationAt( location ); ! CPPUT_ASSERT( declaration, "No class declaration at location." ); ! Parser::SymbolTable::ReferenceEnum enumReference( table.enumReferences(declaration) ); ! while ( enumReference.hasNext() ) { ! const Parser::Location &reference = enumReference.next(); ! Parser::FileId file = reference.file(); ! Parser::SourceEditor &editor = project_.editSource( file ); ! Parser::NodePtr node = editor.findNodeAt( reference.pos() ); ! editor.rename( node, newName_ ); } project_.commitEditChanges(); } --- 93,115 ---- Parser::SymbolTable &table = project_.symbolTable(); Parser::SymbolDeclarationPtr declaration = table.findDeclarationAt( location ); ! CPPUT_ASSERT( declaration!=Parser::SymbolDeclarationPtr(), "No class declaration at location." ); ! // find out all sibling declarations: ! Parser::SymbolDeclarationPtrEnum enumDeclarations( table.enumSiblingDeclaration( declaration ) ); ! CPPUT_ASSERT( enumDeclarations.hasNext(), "Declarations not enumerated." ); ! while ( enumDeclarations.hasNext() ) { ! const Parser::SymbolDeclarationPtr& currentDecl = enumDeclarations.next(); ! ! Parser::SymbolTable::ReferenceEnum enumReference( table.enumReferences(currentDecl) ); ! while ( enumReference.hasNext() ) ! { ! const Parser::Location &reference = enumReference.next(); ! Parser::FileId file = reference.file(); ! Parser::SourceEditor &editor = project_.editSource( file ); ! Parser::NodePtr node = editor.findNodeAt( reference.pos() ); ! editor.rename( node, newName_ ); ! } } + project_.commitEditChanges(); } *************** *** 300,303 **** --- 309,319 ---- void + RefactoringTest::testRenameClassTest6() + { + testRefactoring( renameClassPath_ + "test6.cpp" ); + } + + + void RefactoringTest::testRefactoring( const std::string &path ) { |
From: Andre B. <net...@us...> - 2004-08-16 20:44:28
|
Update of /cvsroot/cpptool/CppParser/src/cppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29275/src/cppparser Modified Files: node.cpp Log Message: -- make it compilable with VC6 Index: node.cpp =================================================================== RCS file: /cvsroot/cpptool/CppParser/src/cppparser/node.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** node.cpp 7 Aug 2004 15:52:23 -0000 1.1 --- node.cpp 16 Aug 2004 20:44:15 -0000 1.2 *************** *** 2,14 **** - namespace boost { ! void intrusive_ptr_add_ref( Parser::Node *node ) { ++(node->count_); } ! void boost::intrusive_ptr_release( Parser::Node *node ) { if ( --(node->count_) == 0 ) --- 2,13 ---- namespace boost { ! void RFTA_CPPARSER_API intrusive_ptr_add_ref( Parser::Node *node ) { ++(node->count_); } ! void RFTA_CPPARSER_API boost::intrusive_ptr_release( Parser::Node *node ) { if ( --(node->count_) == 0 ) |
From: Baptiste L. <bl...@us...> - 2004-08-14 14:42:32
|
Update of /cvsroot/cpptool/CppParser/src/cppparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24431 Removed Files: nodetracker.cpp nodetrackertest.cpp Log Message: * removed extra sources --- nodetracker.cpp DELETED --- --- nodetrackertest.cpp DELETED --- |
From: Baptiste L. <bl...@us...> - 2004-08-14 14:28:51
|
Update of /cvsroot/cpptool/CppParser/src/pyrfta/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22607/samples Added Files: expr1.txt typedef1.txt var1.txt var2.txt Log Message: * added some sample sources that works with dumpast.py. --- NEW FILE: typedef1.txt --- typedef unsigned int Offest; typedef class { int x, y; } Coord; --- NEW FILE: var1.txt --- int x = 2, y = 7; --- NEW FILE: var2.txt --- MyClass x; --- NEW FILE: expr1.txt --- void main() { x = 3; } |
From: Baptiste L. <bl...@us...> - 2004-08-14 14:28:51
|
Update of /cvsroot/cpptool/CppParser/src/pyrfta/samples/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22607/samples/sources Added Files: MiniArchiveRecovery.cpp MiniPartFile.cpp Log Message: * added some sample sources that works with dumpast.py. --- NEW FILE: MiniArchiveRecovery.cpp --- // Excerpt from emule.sf.net sources // At some point it may be worth displaying messages to alert the user if there were errors, or where to find the file. void CArchiveRecovery::recover(CPartFile *partFile, bool preview) { if (partFile->m_bPreviewing || partFile->m_bRecoveringArchive) return; partFile->m_bRecoveringArchive = true; theApp.emuledlg->AddLogLine(true, GetResString(IDS_ATTEMPTING_RECOVERY) ); // Get the current filled list for this file CTypedPtrList<CPtrList, Gap_Struct*> *filled = new CTypedPtrList<CPtrList, Gap_Struct*>; partFile->GetFilledList(filled); // The rest of the work can be safely done in a new thread ThreadParam *tp = new ThreadParam; tp->partFile = partFile; tp->filled = filled; tp->preview = preview; DWORD dwThreadId; HANDLE hThread = CreateThread( NULL, // no security attributes 0, // use default stack size run, // thread function tp, // argument to thread function 0, // use default creation flags &dwThreadId); // returns the thread identifier // Check the return value for success. if (hThread == NULL) { partFile->m_bRecoveringArchive = false; theApp.emuledlg->AddLogLine(true, GetResString(IDS_RECOVERY_FAILED)); // Need to delete the memory here as won't be done in thread DeleteMemory(tp); } } --- NEW FILE: MiniPartFile.cpp --- // Excerpt from emule.sf.net sources CBarShader CPartFile::s_LoadBar(PROGRESS_HEIGHT); // Barry - was 5 CBarShader CPartFile::s_ChunkBar(16); CPartFile::CPartFile() { Init(); } CPartFile::CPartFile(CSearchFile* searchresult) { Init(); md4cpy(m_abyFileHash, searchresult->GetFileHash()); for (int i = 0; i < searchresult->taglist.GetCount();i++){ switch (searchresult->taglist[i]->tag->specialtag){ case FT_FILENAME:{ m_pszFileName = nstrdup(searchresult->taglist[i]->tag->stringvalue); break; } case FT_FILESIZE:{ m_nFileSize = searchresult->taglist[i]->tag->intvalue; break; } default: CTag* newtag = new CTag(searchresult->taglist[i]->tag); taglist.Add(newtag); } } if(m_nFileSize < PARTSIZE ) hashsetneeded = false; CreatePartFile(); } void CPartFile::InitializeFromLink(CED2KFileLink* fileLink) { Init(); try{ m_pszFileName = nstrdup( fileLink->GetName() ); m_nFileSize = fileLink->GetSize(); if(m_nFileSize < PARTSIZE ) hashsetneeded = false; md4cpy(m_abyFileHash, fileLink->GetHashKey()); if (!theApp.downloadqueue->IsFileExisting(m_abyFileHash)) CreatePartFile(); else status = PS_ERROR; } catch(CString error){ OUTPUT_DEBUG_TRACE(); char buffer[200]; sprintf(buffer, GetResString(IDS_ERR_INVALIDLINK), error.GetBuffer()); theApp.emuledlg->AddLogLine(true, GetResString(IDS_ERR_LINKERROR), buffer); status = PS_ERROR; } } CPartFile::~CPartFile(){ // Barry - Ensure all buffered data is written FlushBuffer(); if (m_hpartfile.m_hFile != INVALID_HANDLE_VALUE){ // commit file and directory entry m_hpartfile.Close(); // Update met file (with current directory entry) SavePartFile(); } if (fullname) delete[] fullname; if (partmetfilename) delete[] partmetfilename; m_SrcpartFrequency.RemoveAll(); for (POSITION pos = gaplist.GetHeadPosition();pos != 0;gaplist.GetNext(pos)) delete gaplist.GetAt(pos); } |
From: Baptiste L. <bl...@us...> - 2004-08-14 14:19:08
|
Update of /cvsroot/cpptool/CppParser/src/pyrfta/samples/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21442/sources Log Message: Directory /cvsroot/cpptool/CppParser/src/pyrfta/samples/sources added to the repository |