[rfta-svn] SF.net SVN: rfta: [52] rfta/trunk
Brought to you by:
blep
From: <rft...@li...> - 2007-08-27 15:16:15
|
Revision: 52 http://rfta.svn.sourceforge.net/rfta/?rev=52&view=rev Author: blep Date: 2007-08-25 07:14:42 -0700 (Sat, 25 Aug 2007) Log Message: ----------- - added support for class key before type - function parameters are now parsed and collected Modified Paths: -------------- rfta/trunk/TODO rfta/trunk/include/rfta/cxxparseraction.h rfta/trunk/include/rfta/cxxtype.h rfta/trunk/include/rfta/forwards.h rfta/trunk/src/lib_rftaparser/cxxparser_grammar.txt rfta/trunk/src/lib_rftaparser/cxxparseraction.cpp rfta/trunk/src/lib_rftaparser/cxxtype.cpp rfta/trunk/src/test_rftaparser/main.cpp rfta/trunk/test/rftaparser_test.py rfta/trunk/testdata/cxxparser_ut/t_decl_003_init_list.cpp rfta/trunk/testresult/parser_unittests/cxxparser_ut.expected Added Paths: ----------- rfta/trunk/testdata/cxxparser_ut/t_class_019_classkeyprefix.cpp rfta/trunk/testdata/cxxparser_ut/t_function_002_parameters.cpp Modified: rfta/trunk/TODO =================================================================== --- rfta/trunk/TODO 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/TODO 2007-08-25 14:14:42 UTC (rev 52) @@ -1,10 +1,9 @@ Milestone M1: -- member declaration in the form of "struct/class Named *member" (Audacity) +- fix parsing of function like declaration (string constant in CEGUI) - using namespace ... (arianne) - extern "C" ... - class dll export macro support -- proper handling for function type - function pointer types (FileZilla) - polish report pointer/reference type correctly +- allow default parameter value even if name is missing. - Modified: rfta/trunk/include/rfta/cxxparseraction.h =================================================================== --- rfta/trunk/include/rfta/cxxparseraction.h 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/include/rfta/cxxparseraction.h 2007-08-25 14:14:42 UTC (rev 52) @@ -68,6 +68,15 @@ // function virtual bool isPureSpecifier(const TokenScannerPosRange &zero); + virtual void enterFnParameter(); + virtual void exitFnParameter(); + virtual void addEllipsisFnParameter(); + virtual void addFnParameter(); + virtual void setFnParameterName(const TokenScannerPosRange &idVar); + virtual void setFnParameterInitializer(const TokenScannerPosRange &initializer); + virtual void enterFnSuffix(); + virtual void exitFnSuffix(); + virtual void addFunctionType(const TokenScannerPosRange &cv); // template virtual void enterTemplateArguments(); @@ -106,11 +115,25 @@ bool scopeQualifiedLookUp_; }; CppTL::Stack<TypeSpecifierLookUpData> typeSpecifierContexts_; + typedef CppTL::SList<FunctionArg> FunctionArgs; + FunctionArgs::Allocator functionArgsAllocator_; + struct FnParameterTypeContext + { + Type *typeId_; + LocatedSymbol selfTypeId_; + Scope *selfTypeScope_; + Scope *lookUpScope_; + TextId fnParameterName_; + bool isSelfType_; + bool fnParameterHasDefault_; + }; + CppTL::Stack<FnParameterTypeContext> fnParameterTypeContexts_; /// typeId_ will be set on the following events: /// - Beginning enum declaration /// - Exiting class declaration /// - Ending a (scoped) type identifier Type *typeId_; + CppTL::Stack<FunctionArgs> functionArgsStack_; TemplateArguments templateArguments_; TemplateArguments validTemplateArguments_; bool hasValidTemplateArguments_; @@ -122,6 +145,8 @@ Scope *selfTypeScope_; TextId pureSpecifierZeroTextId_; FunctionSpecifier functionSpecifier_; + TextId fnParameterName_; + bool fnParameterHasDefault_; }; } // namespace Rfta { Modified: rfta/trunk/include/rfta/cxxtype.h =================================================================== --- rfta/trunk/include/rfta/cxxtype.h 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/include/rfta/cxxtype.h 2007-08-25 14:14:42 UTC (rev 52) @@ -131,7 +131,23 @@ typedef std::deque<TemplateParameter> TemplateParameters; +enum FunctionArgKind +{ + fnArgEllipsis = 1, + fnArgType +}; +struct FunctionArg +{ + FunctionArgKind kind_; + Type *type_; + TextId id_; + bool hasDefault_; +}; + +typedef CppTL::AnyEnumerator<FunctionArg> FunctionArgEnum; +typedef std::deque<FunctionArg> FunctionArgs; + class ScopeVisitor { public: @@ -292,7 +308,9 @@ virtual TypeDecorator *isTypeDecorator(); - virtual TextId getUnqualifiedTypeName() const = 0; + virtual FunctionType *isFunctionType(); + + virtual TextId getUnqualifiedTypeName() const; }; @@ -556,8 +574,6 @@ public: // overridden from Type virtual BuiltInType *isBuiltIn(); - virtual TextId getUnqualifiedTypeName() const; - private: BuiltInType( const BuiltInType &other ); BuiltInType &operator =( const BuiltInType &other ); @@ -579,8 +595,6 @@ public: // overridden from Type virtual TypeDecorator *isTypeDecorator(); - virtual TextId getUnqualifiedTypeName() const; - protected: Type &type_; }; @@ -632,6 +646,28 @@ }; +class FunctionType : public Type +{ +public: + FunctionType( Type &returnType, FunctionArgEnum enumArgs, CVQualifier qualifiers ); + + Type &getReturnType(); + + FunctionArgEnum enumArgs(); + + CVQualifier getQualifiers(); + +public: // overridden from Type + virtual FunctionType *isFunctionType(); + +protected: + Type &returnType_; + FunctionArgs args_; + CVQualifier qualifiers_; +}; + + + class DeclarationManager { public: @@ -696,8 +732,12 @@ Type &addCVQualifiers( Type &type, CVQualifier qualifiers ); Type &makeReferenceType( Type &type ); + Type &makePointerType( Type &type ); + Type &makeArrayType( Type &type, bool hasDimension ); + + Type &makeFunctionType( Type &returnType, FunctionArgEnum enumArgs, CVQualifier qualifiers ); private: void initializeBuiltIns(); @@ -717,6 +757,7 @@ CppTL::BatchAllocator<ConstVolatileType> constVolatileTypeAlloc_; CppTL::BatchAllocator<PointerType> pointerTypeAlloc_; CppTL::BatchAllocator<ArrayType> arrayTypeAlloc_; + CppTL::BatchAllocator<FunctionType> functionTypeAlloc_; //CppTL::BatchAllocator<UnknownScope> unknownScopeAlloc_; Type *builtIns_[ (1 << signBitSize) * typeMaxCount ]; Modified: rfta/trunk/include/rfta/forwards.h =================================================================== --- rfta/trunk/include/rfta/forwards.h 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/include/rfta/forwards.h 2007-08-25 14:14:42 UTC (rev 52) @@ -23,6 +23,7 @@ class DeclarationVisitor; class EnumTypeDecl; class EnumValueDecl; +class FunctionType; class GlobalNamespaceScope; class NamespaceDecl; class NamespaceScope; Modified: rfta/trunk/src/lib_rftaparser/cxxparser_grammar.txt =================================================================== --- rfta/trunk/src/lib_rftaparser/cxxparser_grammar.txt 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/src/lib_rftaparser/cxxparser_grammar.txt 2007-08-25 14:14:42 UTC (rev 52) @@ -206,7 +206,7 @@ ( 'operator' ( operator | simple_type_specifier ) *fn_suffix - | $idVar=(identifier) ?(fn_suffix ?pure_specifier | array_suffix) !setDeclarator[$idVar] + | $idVar=(identifier) ?(fn_suffix2 ?pure_specifier | array_suffix) !setDeclarator[$idVar] ) ::ptr_operator # ignore pointer to member @@ -219,12 +219,38 @@ ?($cv1=(cv_qualifier_seq)) fn_throw_clause +::fn_suffix2 + @[enterFnSuffix exitFnSuffix] + '(' + fn_parameters + ')' + $cv=(?cv_qualifier_seq) + fn_throw_clause + !addFunctionType[$cv] + ::fn_throw_clause ?( 'throw' '(' ?type_list ')' ) ::pure_specifier '=' $zero=(%T_INTLIT) => isPureSpecifier[$zero] +::fn_parameters + ?( fn_parameter *( ',' fn_parameter ) ) + +::fn_parameter + @[enterFnParameter exitFnParameter] + ( '...' !addEllipsisFnParameter[] + | simple_type_specifier + ?( parameter_declarator + ?( $initializer=(initializer) !setFnParameterInitializer[$initializer] ) + ) + !addFnParameter[] +# *(~(')'|',')) + ) + +::parameter_declarator + $idVar=(identifier) ?(fn_suffix | array_suffix) !setFnParameterName[$idVar] + ::fn_definition ?ctor_member_initializer fn_definition_skip_compound @@ -241,7 +267,7 @@ *(',' identifier '(' skip_member_init_expression ')' ) ::skip_member_init_expression - *( skip_member_initializer_braced_expression | ~(')' | %T_EOF) ) + *( skip_braced_expression | ~(')' | %T_EOF) ) ::array_suffix +( '[' @@ -279,17 +305,19 @@ # type specifier used for conversion operator ::simple_type_specifier - ?($cv1=(cv_qualifier_seq)) - ( fundamental_type | type_id ) - ?($cv2=(cv_qualifier_seq)) + $cv1=(?(cv_qualifier_seq)) + ( fundamental_type | ?class_key type_id ) + $cv2=(?(cv_qualifier_seq)) + !setTypeSpecifier[$cv1, $cv2] *ptr_operator + # result of this expression is used by predicate declarationTypeIsSelfType[] ::type_specifier $cv1=(?(cv_qualifier_seq)) ( fundamental_type - | type_id | class_specifier + | ?class_key type_id | enum_specifier ) $cv2=(?(cv_qualifier_seq)) !setTypeSpecifier[$cv1, $cv2] @@ -335,11 +363,11 @@ '=' skip_initializer_expression ::skip_initializer_expression - +( skip_braced_expression | skip_block_initializer | ~( ',' | ';' ) ) + +( skip_braced_expression | skip_block_initializer | ~( ',' | ';' | ')' | %T_EOF ) ) ::skip_braced_expression '(' - +( skip_braced_expression | ~')' ) + *( skip_braced_expression | ~( ')' | %T_EOF ) ) ')' ::skip_member_initializer_braced_expression Modified: rfta/trunk/src/lib_rftaparser/cxxparseraction.cpp =================================================================== --- rfta/trunk/src/lib_rftaparser/cxxparseraction.cpp 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/src/lib_rftaparser/cxxparseraction.cpp 2007-08-25 14:14:42 UTC (rev 52) @@ -429,7 +429,7 @@ type = selfTypeScope_->getSelfType( selfTypeId_.text_ ); CPPTL_ASSERT_MESSAGE( type != 0, "Self type not correctly initialized" ); } - return *typeId_; + return *type; } @@ -517,6 +517,104 @@ void +CxxParserAction::enterFnSuffix() +{ + new (functionArgsStack_.unitializedPush()) FunctionArgs(); +} + + +void +CxxParserAction::exitFnSuffix() +{ + functionArgsStack_.pop(); +} + + +void +CxxParserAction::enterFnParameter() +{ + FnParameterTypeContext *context = fnParameterTypeContexts_.unitializedPush(); +// Do not initialize POD with new to avoid cost of zero initialization. +// new (context) FnParameterTypeContext(); + context->typeId_ = typeId_; + context->selfTypeId_ = selfTypeId_; + context->selfTypeScope_ = selfTypeScope_; + context->lookUpScope_ = lookUpScope_; + context->fnParameterName_ = fnParameterName_; + context->isSelfType_ = isSelfType_; + context->fnParameterHasDefault_ = fnParameterHasDefault_; + + fnParameterName_ = nullTextId(); + fnParameterHasDefault_ = false; +} + + +void +CxxParserAction::exitFnParameter() +{ + FnParameterTypeContext &context = fnParameterTypeContexts_.top(); + typeId_ = context.typeId_; + selfTypeId_ = context.selfTypeId_; + selfTypeScope_ = context.selfTypeScope_; + lookUpScope_ = context.lookUpScope_; + fnParameterName_ = context.fnParameterName_; + isSelfType_ = context.isSelfType_; + fnParameterHasDefault_ = context.fnParameterHasDefault_; + fnParameterTypeContexts_.pop(); +} + + +void +CxxParserAction::addEllipsisFnParameter() +{ + FunctionArg arg; + arg.kind_ = fnArgEllipsis; + arg.id_ = 0; + arg.type_ = 0; + arg.hasDefault_ =false; + functionArgsStack_.top().push_front( arg, functionArgsAllocator_ ); +} + + +void +CxxParserAction::addFnParameter() +{ + FunctionArg arg; + arg.kind_ = fnArgType; + arg.id_ = fnParameterName_; + arg.type_ = &getCurrentType(); + arg.hasDefault_ = fnParameterHasDefault_; + functionArgsStack_.top().push_front( arg, functionArgsAllocator_ ); +} + + +void +CxxParserAction::setFnParameterName(const TokenScannerPosRange &idVar) +{ + fnParameterName_ = idVar.start_->text_; +} + + +void +CxxParserAction::setFnParameterInitializer(const TokenScannerPosRange &initializer) +{ + fnParameterHasDefault_ = true; +} + + +void +CxxParserAction::addFunctionType(const TokenScannerPosRange &cv) +{ + CVQualifier qualifiers; + updateCVQualifier( cv, qualifiers ); + FunctionArgEnum enumArgs = CppTL::Enum::anyImplicitCastTransform( functionArgsStack_.top().enumItems(), + CppTL::Type<FunctionArgEnum::value_type>() ); + typeId_ = &( decls_.makeFunctionType( getCurrentType(), enumArgs, qualifiers ) ); + isSelfType_ = false; +} + + +void CxxParserAction::enterTemplateArguments() { TypeSpecifierLookUpData *context = typeSpecifierContexts_.unitializedPush(); Modified: rfta/trunk/src/lib_rftaparser/cxxtype.cpp =================================================================== --- rfta/trunk/src/lib_rftaparser/cxxtype.cpp 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/src/lib_rftaparser/cxxtype.cpp 2007-08-25 14:14:42 UTC (rev 52) @@ -307,6 +307,19 @@ } +FunctionType * +Type::isFunctionType() +{ + return 0; +} + +TextId +Type::getUnqualifiedTypeName() const +{ + return nullTextId(); +} + + // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class TypeDeclaration @@ -895,13 +908,6 @@ } -TextId -BuiltInType::getUnqualifiedTypeName() const -{ - return nullTextId(); -} - - CppTL::ConstString BuiltInType::toString() const { @@ -943,13 +949,6 @@ } -TextId -TypeDecorator::getUnqualifiedTypeName() const -{ - return nullTextId(); -} - - // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class ConstVolatileType @@ -1043,7 +1042,52 @@ +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class FunctionType +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +FunctionType::FunctionType( Type &returnType, + FunctionArgEnum enumArgs, + CVQualifier qualifiers ) + : returnType_( returnType ) + , qualifiers_( qualifiers ) +{ + // Notes: enumerate arguments from last to first. + while ( enumArgs.hasNext() ) + args_.push_front( enumArgs.next() ); +} + + +Type & +FunctionType::getReturnType() +{ + return returnType_; +} + + +FunctionArgEnum +FunctionType::enumArgs() +{ + return CppTL::Enum::anyContainer( args_, CppTL::Type<FunctionArgEnum::value_type>() ); +} + + +CVQualifier +FunctionType::getQualifiers() +{ + return qualifiers_; +} + + +FunctionType * +FunctionType::isFunctionType() +{ + return this; +} + + // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class DeclarationManager @@ -1380,5 +1424,14 @@ } +Type & +DeclarationManager::makeFunctionType( Type &returnType, + FunctionArgEnum enumArgs, + CVQualifier qualifiers ) +{ + return * new (functionTypeAlloc_.allocate()) FunctionType( returnType, enumArgs, qualifiers ); +} + + } // namespace Rfta { Modified: rfta/trunk/src/test_rftaparser/main.cpp =================================================================== --- rfta/trunk/src/test_rftaparser/main.cpp 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/src/test_rftaparser/main.cpp 2007-08-25 14:14:42 UTC (rev 52) @@ -312,12 +312,57 @@ Rfta::TypeDecorator *decorator = type.isTypeDecorator(); return decorator->toString( getQualifiedTypeId( decorator->getDecoratedType() ) ); } + else if ( type.isFunctionType() ) + { + return getFunctionTypeId( *( type.isFunctionType() ) ); + } else { return "<type unsupported by dumper>"; } } + CppTL::ConstString getFunctionTypeId( Rfta::FunctionType &fnType ) const + { + CppTL::StringBuffer name; + name += getQualifiedTypeId( fnType.getReturnType() ); + name += "("; + Rfta::FunctionArgEnum enumArgs = fnType.enumArgs(); + bool needComma = false; + while ( enumArgs.hasNext() ) + { + if ( needComma ) + name += ", "; + else + needComma = true; + const Rfta::FunctionArg &arg = enumArgs.next(); + switch ( arg.kind_ ) + { + case Rfta::fnArgEllipsis: + name += "..."; + break; + case Rfta::fnArgType: + name += getQualifiedTypeId( *arg.type_ ); + if ( !Rfta::isNullTextId( arg.id_ ) ) + { + name += " "; + name += getText( arg.id_ ); + if ( arg.hasDefault_ ) + name += " = .."; + } + break; + default: + CPPTL_DEBUG_ASSERT_UNREACHABLE; + } + } + name += ")"; + if ( fnType.getQualifiers() & Rfta::cvQualifierConst ) + name += " const"; + if ( fnType.getQualifiers() & Rfta::cvQualifierVolatile ) + name += " volatile"; + return name; + } + CppTL::ConstString getQualifiedTemplateTypeId( Rfta::TemplateClassInstance &templateInstance, const CppTL::ConstString &templateClassName ) const { Modified: rfta/trunk/test/rftaparser_test.py =================================================================== --- rfta/trunk/test/rftaparser_test.py 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/test/rftaparser_test.py 2007-08-25 14:14:42 UTC (rev 52) @@ -23,7 +23,8 @@ if len(sys.argv) == 2 and sys.argv[1] == 'generate' and raw_input( 'Confirm expected result regeneration ? (yes/no):' ) == 'yes': generate_result = True print 'The expected result will be regenerated' - compare_result = len(sys.argv) == 2 and sys.argv[1] == 'compare' + compare_result = len(sys.argv) >= 2 and sys.argv[1] == 'compare' + fast = len(sys.argv) == 3 and sys.argv[2] == 'fast' class ParserTestRunner(rftatest.TestRunner): def __init__( self ): rftatest.TestRunner.__init__( self, PARSER_PATH ) #, extra_flags = ('--no-log',) ) @@ -32,5 +33,6 @@ ParserTestRunner().runZippedProjects( RESULT_DIR, compare_to_expected = compare_result, dump_diff = False, - generate_expected = generate_result ) + generate_expected = generate_result, + max_projects = fast and 10 or 0 ) print 'Test duration:', ( datetime.datetime.now() - start ).seconds, 'seconds' Added: rfta/trunk/testdata/cxxparser_ut/t_class_019_classkeyprefix.cpp =================================================================== --- rfta/trunk/testdata/cxxparser_ut/t_class_019_classkeyprefix.cpp (rev 0) +++ rfta/trunk/testdata/cxxparser_ut/t_class_019_classkeyprefix.cpp 2007-08-25 14:14:42 UTC (rev 52) @@ -0,0 +1,11 @@ +struct Dummy {}; + +static struct Dummy z; + +class C0019A +{ + virtual void initialize( const class C0019A &other ) const volatile; +}; + +static class C0019A x; + Modified: rfta/trunk/testdata/cxxparser_ut/t_decl_003_init_list.cpp =================================================================== --- rfta/trunk/testdata/cxxparser_ut/t_decl_003_init_list.cpp 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/testdata/cxxparser_ut/t_decl_003_init_list.cpp 2007-08-25 14:14:42 UTC (rev 52) @@ -1 +1,3 @@ int decl003a, decl003b = 1234; + +long startTime = TickCount(); \ No newline at end of file Added: rfta/trunk/testdata/cxxparser_ut/t_function_002_parameters.cpp =================================================================== --- rfta/trunk/testdata/cxxparser_ut/t_function_002_parameters.cpp (rev 0) +++ rfta/trunk/testdata/cxxparser_ut/t_function_002_parameters.cpp 2007-08-25 14:14:42 UTC (rev 52) @@ -0,0 +1,21 @@ +static void dummy(); + +static int getResult(); + +Fn002::~Fn002(); + +Fn003::Fn003( void ); + +static int computeIt( int x, double, void *, ... ) +{ + return x+1; +} + +static void fnComplexTypes(std::string const& method, std::string const& event, std::string const& info="") +{ +} + +int main( int argc, const char *argv[] ) +{ + return 0; +} Modified: rfta/trunk/testresult/parser_unittests/cxxparser_ut.expected =================================================================== --- rfta/trunk/testresult/parser_unittests/cxxparser_ut.expected 2007-08-25 08:16:57 UTC (rev 51) +++ rfta/trunk/testresult/parser_unittests/cxxparser_ut.expected 2007-08-25 14:14:42 UTC (rev 52) @@ -224,8 +224,18 @@ ------------------------------------------------------------------------------ #SOURCELOG: ../testdata\cxxparser_ut\t_class_007_ctor.cpp ------------------------------------------------------------------------------ -#SOURCESTATUS: ../testdata\cxxparser_ut\t_class_008_self_pointer.cpp FAILED -1073741819 +#SOURCESTATUS: ../testdata\cxxparser_ut\t_class_008_self_pointer.cpp OK _ #SOURCEOUPUT: ../testdata\cxxparser_ut\t_class_008_self_pointer.cpp +namespace: <GlobalNamespace> { + class: C0008 { + nested classes: { + } + members: { + symbol: self_ of type ::C0008 * + } + } + class: C0008 +} ------------------------------------------------------------------------------ #SOURCELOG: ../testdata\cxxparser_ut\t_class_008_self_pointer.cpp ------------------------------------------------------------------------------ @@ -236,8 +246,8 @@ nested classes: { } members: { - symbol: what of type char const * - symbol: whatThrowsMany of type char const * + symbol: what of type char const *() + symbol: whatThrowsMany of type char const *() } } class: C0009 @@ -395,7 +405,7 @@ nested classes: { } members: { - symbol: what of type char const * + symbol: what of type char const *() const } } } @@ -415,8 +425,8 @@ nested classes: { } members: { - symbol: initialize of type void - symbol: initialize of type void + symbol: initialize of type void() + symbol: initialize of type void() } } class: C016 @@ -454,8 +464,8 @@ nested classes: { } members: { - symbol: initialize of type void - symbol: walk of type void + symbol: initialize of type void() + symbol: walk of type void() } } class: C0018A @@ -464,6 +474,30 @@ ------------------------------------------------------------------------------ #SOURCELOG: ../testdata\cxxparser_ut\t_class_018_purevirtual.cpp ------------------------------------------------------------------------------ +#SOURCESTATUS: ../testdata\cxxparser_ut\t_class_019_classkeyprefix.cpp OK _ +#SOURCEOUPUT: ../testdata\cxxparser_ut\t_class_019_classkeyprefix.cpp +namespace: <GlobalNamespace> { + class: C0019A { + nested classes: { + } + members: { + symbol: initialize of type void(::C0019A const & other) const volatile + } + } + class: Dummy { + nested classes: { + } + members: { + } + } + class: Dummy + symbol: z of type ::Dummy + class: C0019A + symbol: x of type ::C0019A +} +------------------------------------------------------------------------------ +#SOURCELOG: ../testdata\cxxparser_ut\t_class_019_classkeyprefix.cpp +------------------------------------------------------------------------------ #SOURCESTATUS: ../testdata\cxxparser_ut\t_decl_001_fundamental.cpp OK _ #SOURCEOUPUT: ../testdata\cxxparser_ut\t_decl_001_fundamental.cpp namespace: <GlobalNamespace> { @@ -521,6 +555,7 @@ namespace: <GlobalNamespace> { symbol: decl003a of type signed int symbol: decl003b of type signed int + symbol: startTime of type signed long int } ------------------------------------------------------------------------------ #SOURCELOG: ../testdata\cxxparser_ut\t_decl_003_init_list.cpp @@ -543,7 +578,7 @@ #SOURCESTATUS: ../testdata\cxxparser_ut\t_decl_005_function.cpp OK _ #SOURCEOUPUT: ../testdata\cxxparser_ut\t_decl_005_function.cpp namespace: <GlobalNamespace> { - symbol: decl005a of type signed int + symbol: decl005a of type signed int() } ------------------------------------------------------------------------------ #SOURCELOG: ../testdata\cxxparser_ut\t_decl_005_function.cpp @@ -699,13 +734,53 @@ #SOURCESTATUS: ../testdata\cxxparser_ut\t_function_001_skip_body.cpp OK _ #SOURCEOUPUT: ../testdata\cxxparser_ut\t_function_001_skip_body.cpp namespace: <GlobalNamespace> { - symbol: dummy of type void - symbol: getResult of type signed int - symbol: main of type signed int + symbol: dummy of type void() + symbol: getResult of type signed int() + symbol: main of type signed int(signed int argc, char const *[] argv) } ------------------------------------------------------------------------------ #SOURCELOG: ../testdata\cxxparser_ut\t_function_001_skip_body.cpp ------------------------------------------------------------------------------ +#SOURCESTATUS: ../testdata\cxxparser_ut\t_function_002_parameters.cpp OK _ +#SOURCEOUPUT: ../testdata\cxxparser_ut\t_function_002_parameters.cpp +namespace: <GlobalNamespace> { + class: std { + nested classes: { + class: string { + nested classes: { + } + members: { + } + } + } + members: { + class: string + } + } + class: Fn003 { + nested classes: { + } + members: { + } + } + class: Fn002 { + nested classes: { + } + members: { + } + } + symbol: dummy of type void() + symbol: getResult of type signed int() + class: Fn002 + class: Fn003 + symbol: computeIt of type signed int(signed int x, double, void *, ...) + class: std + symbol: fnComplexTypes of type void(::std::string const & method, ::std::string const & event, ::std::string const & info = ..) + symbol: main of type signed int(signed int argc, char const *[] argv) +} +------------------------------------------------------------------------------ +#SOURCELOG: ../testdata\cxxparser_ut\t_function_002_parameters.cpp +------------------------------------------------------------------------------ #SOURCESTATUS: ../testdata\cxxparser_ut\t_guess_001_inheritance.cpp OK _ #SOURCEOUPUT: ../testdata\cxxparser_ut\t_guess_001_inheritance.cpp namespace: <GlobalNamespace> { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |