Commit be4c107a authored by Oleg Batrashev's avatar Oleg Batrashev

Add scopes to Fortran prototype name parsing.

parent f138b8f3
...@@ -266,6 +266,7 @@ ATTR_STMT {ATTR_SPEC}|DIMENSION|{ACCESS_SPEC} ...@@ -266,6 +266,7 @@ ATTR_STMT {ATTR_SPEC}|DIMENSION|{ACCESS_SPEC}
CONTAINS CONTAINS CONTAINS CONTAINS
PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTAL)? PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTAL)?
SCOPENAME ({ID}{BS}"::"{BS})*
%option noyywrap %option noyywrap
%option stack %option stack
...@@ -1110,15 +1111,16 @@ private { ...@@ -1110,15 +1111,16 @@ private {
<Prototype>{BS}{SUBPROG}{BS_} { <Prototype>{BS}{SUBPROG}{BS_} {
BEGIN(PrototypeSubprog); BEGIN(PrototypeSubprog);
} }
<PrototypeSubprog>{ID}{BS} { current->name = yytext; <Prototype,PrototypeSubprog>{BS}{SCOPENAME}?{BS}{ID} {
current->name = QCString(yytext).lower();
current->name.stripWhiteSpace(); current->name.stripWhiteSpace();
BEGIN(PrototypeArgs); BEGIN(PrototypeArgs);
} }
<PrototypeArgs>{ <PrototypeArgs>{
"("|")"|","|{BS_} { current->args += yytext; } "("|")"|","|{BS_} { current->args += yytext; }
{ID} { current->args += yytext; {ID} { current->args += yytext;
Argument *a = new Argument; Argument *a = new Argument;
a->name = yytext; a->name = QCString(yytext).lower();
current->argList->append(a); current->argList->append(a);
} }
} }
...@@ -2331,7 +2333,7 @@ void FortranLanguageScanner::resetCodeParserState() ...@@ -2331,7 +2333,7 @@ void FortranLanguageScanner::resetCodeParserState()
void FortranLanguageScanner::parsePrototype(const char *text) void FortranLanguageScanner::parsePrototype(const char *text)
{ {
QCString buffer = QCString(text).lower(); QCString buffer = QCString(text);
pushBuffer(buffer); pushBuffer(buffer);
parsingPrototype = TRUE; parsingPrototype = TRUE;
BEGIN(Prototype); BEGIN(Prototype);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment