diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2015-02-21 16:12:30 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2015-02-21 16:17:14 (GMT) |
commit | 080a465b1321ff93c05ce398cd18a577e0ebae4b (patch) | |
tree | 0bae20bf26007d2856f0460143125a31cff131b5 /src/defargs.l | |
parent | 5bfda3d4c1158e5429349a2698339650dcfbbe88 (diff) | |
download | Doxygen-080a465b1321ff93c05ce398cd18a577e0ebae4b.zip Doxygen-080a465b1321ff93c05ce398cd18a577e0ebae4b.tar.gz Doxygen-080a465b1321ff93c05ce398cd18a577e0ebae4b.tar.bz2 |
Added type constraint relations for Java generics to dot graphs and XML output
Diffstat (limited to 'src/defargs.l')
-rw-r--r-- | src/defargs.l | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/defargs.l b/src/defargs.l index 164c100..70234b2 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -73,6 +73,7 @@ static QCString g_curArgName; static QCString g_curArgDocs; static QCString g_curArgAttrib; static QCString g_curArgArray; +static QCString g_curTypeConstraint; static QCString g_extraTypeChars; static int g_argRoundCount; static int g_argSharpCount; @@ -80,6 +81,7 @@ static int g_argCurlyCount; static int g_readArgContext; static int g_lastDocContext; static int g_lastDocChar; +static int g_lastExtendsContext; static QCString g_delimiter; /* ----------------------------------------------------------------- @@ -120,6 +122,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" %x FuncQual %x ReadDocBlock %x ReadDocLine +%x ReadTypeConstraint %x TrailingReturn @@ -332,8 +335,9 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" int i=l-1; while (i>=0 && (isspace((uchar)g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='.')) i--; while (i>=0 && (isId(g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='$')) i--; - Argument *a = new Argument; - a->attrib = g_curArgAttrib.copy(); + Argument *a = new Argument; + a->attrib = g_curArgAttrib.copy(); + a->typeConstraint = g_curTypeConstraint.stripWhiteSpace(); //printf("a->type=%s a->name=%s i=%d l=%d\n", // a->type.data(),a->name.data(),i,l); a->array.resize(0); @@ -413,6 +417,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" g_curArgDefValue.resize(0); g_curArgArray.resize(0); g_curArgDocs.resize(0); + g_curTypeConstraint.resize(0); if (*yytext==')') { BEGIN(FuncQual); @@ -424,6 +429,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } } } +<ReadFuncArgType,ReadFuncArgPtr>"extends" { + g_curTypeConstraint.resize(0); + g_lastExtendsContext=YY_START; + BEGIN(ReadTypeConstraint); + } <ReadFuncArgType,ReadFuncArgPtr>"$"?{ID} { QCString name=yytext; //resolveDefines(yytext); if (YY_START==ReadFuncArgType && g_curArgArray=="[]") // Java style array @@ -451,13 +461,23 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" <CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>. { *g_copyArgValue += *yytext; } -<FuncQual>"const" { +<ReadTypeConstraint>[,)>] { + unput(*yytext); + BEGIN(g_lastExtendsContext); + } +<ReadTypeConstraint>. { + g_curTypeConstraint+=yytext; + } +<ReadTypeConstraint>\n { + g_curTypeConstraint+=' '; + } +<FuncQual>"const" { g_argList->constSpecifier=TRUE; } -<FuncQual>"volatile" { +<FuncQual>"volatile" { g_argList->volatileSpecifier=TRUE; } -<FuncQual,TrailingReturn>"="{B}*"0" { +<FuncQual,TrailingReturn>"="{B}*"0" { g_argList->pureSpecifier=TRUE; BEGIN(FuncQual); } @@ -534,6 +554,7 @@ void stringToArgumentList(const char *argsString,ArgumentList* al,QCString *extr g_curArgDocs.resize(0); g_curArgAttrib.resize(0); g_curArgArray.resize(0); + g_curTypeConstraint.resize(0); g_extraTypeChars.resize(0); g_argRoundCount = 0; g_argSharpCount = 0; |