diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-11-17 21:22:48 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-11-17 21:22:48 (GMT) |
commit | b9e362903872f0313e6e26154aacc6c185a9b31d (patch) | |
tree | 0c7c3ab3d6f38e212b2cd4a4628e3c9d32d49db3 /src/fortranscanner.l | |
parent | 169834ef89a1df22c8f72a01b6a9413bbb57edb5 (diff) | |
download | Doxygen-b9e362903872f0313e6e26154aacc6c185a9b31d.zip Doxygen-b9e362903872f0313e6e26154aacc6c185a9b31d.tar.gz Doxygen-b9e362903872f0313e6e26154aacc6c185a9b31d.tar.bz2 |
Release-1.7.5.1-20111117
Diffstat (limited to 'src/fortranscanner.l')
-rw-r--r-- | src/fortranscanner.l | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l index ba0d6db..16d17f8 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -178,6 +178,7 @@ static Protection defaultProtection; static Protection typeProtection; static int typeMode = false; static InterfaceType ifType = IF_NONE; +static bool functionLine = FALSE; static char stringStartSymbol; // single or double quote @@ -246,7 +247,7 @@ NOARGS {BS}"\n" NUM_TYPE (complex|integer|logical|real) KIND {ARGS} CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS})) -TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS_}PRECISION|{CHAR}|TYPE{ARGS}|CLASS{ARGS}|PROCEDURE{ARGS}?) +TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS_}COMPLEX|DOUBLE{BS_}PRECISION|{CHAR}|TYPE{ARGS}|CLASS{ARGS}|PROCEDURE{ARGS}?) INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")" ATTR_SPEC (ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE) @@ -303,6 +304,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA /*-----------------------------------------------------------------------------------*/ <*>^.*\n { // prepass: look for line continuations + functionLine = FALSE; //fprintf(stderr, "---%s", yytext); @@ -982,10 +984,13 @@ private { BEGIN(SubprogBody); } <SubprogBody>result{BS}\({BS}{ID} { - result= yytext; - result= result.right(result.length()-result.find("(")-1); - result= result.stripWhiteSpace(); - modifiers[current_root->parent()][current_root->name.lower()].returnName = result; + if (functionLine) + { + result= yytext; + result= result.right(result.length()-result.find("(")-1); + result= result.stripWhiteSpace(); + modifiers[current_root->parent()][current_root->name.lower()].returnName = result; + } //cout << "=====> got result " << result << endl; } @@ -1907,6 +1912,7 @@ static void addSubprogram(const char *text) subrCurrent.prepend(current); current->section = Entry::FUNCTION_SEC ; QCString subtype = text; subtype=subtype.lower().stripWhiteSpace(); + functionLine = subtype=="function"; current->type += " " + subtype; current->type = current->type.stripWhiteSpace(); current->fileName = yyFileName; |