summaryrefslogtreecommitdiffstats
path: root/src/fortranscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/fortranscanner.l')
-rw-r--r--src/fortranscanner.l25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index b8d4afd..cb6a9f9 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -210,7 +210,11 @@ B [ \t]
BS [ \t]*
BS_ [ \t]+
COMMA {BS},{BS}
-ARGS {BS}("("[^)]*")")
+ARGS_L0 ("("[^)]*")")
+ARGS_L1a [^()]*"("[^)]*")"[^)]*
+ARGS_L1 ("("{ARGS_L1a}*")")
+ARGS_L2 "("({ARGS_L0}|[^()]|{ARGS_L1a}|{ARGS_L1})*")"
+ARGS {BS}({ARGS_L0}|{ARGS_L1}|{ARGS_L2})
NOARGS {BS}"\n"
NUM_TYPE (complex|integer|logical|real)
@@ -377,6 +381,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
current->section=Entry::USINGDIR_SEC;
current_root->addSubEntry(current);
current = new Entry;
+ current->lang = SrcLangExt_F90;
yy_pop_state();
}
<Use>{ID}/, {
@@ -391,6 +396,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
current->section=Entry::USINGDECL_SEC;
current_root->addSubEntry(current);
current = new Entry ;
+ current->lang = SrcLangExt_F90;
}
<Use,UseOnly>"\n" {
unput(*yytext);
@@ -398,7 +404,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
}
/*------ ignore special fortran statements */
-<Start,ModuleBody,SubprogBody>^[ \t]*interface({BS_}{ID}({BS}\({BS}[^ \t()]+{BS}\))?)?/{BS}(!|\n) { // handle interface block
+<Start,ModuleBody,SubprogBody>^[ \t]*interface({BS_}{ID}({ARGS}?)?)?/{BS}(!|\n) { // handle interface block
if(YY_START == Start)
{
addModule(NULL);
@@ -417,7 +423,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
yy_push_state(InterfaceBody);
startScope(last_entry);
}
-<InterfaceBody>^{BS}"end"({BS}"interface"({BS_}{ID})?)?{BS}/(\n|!) {
+<InterfaceBody>^{BS}"end"({BS}"interface"({BS_}{ID}{ARGS}?)?)?{BS}/(\n|!) {
if (!endScope(current_root))
yyterminate();
yy_pop_state();
@@ -1327,6 +1333,16 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs)
typeName += ",";
typeName += "save";
}
+ if (mdfs.protection == SymbolModifiers::PUBLIC)
+ {
+ typeName += ",";
+ typeName += "public";
+ }
+ else if (mdfs.protection == SymbolModifiers::PRIVATE)
+ {
+ typeName += ",";
+ typeName += "private";
+ }
return typeName;
}
@@ -1485,6 +1501,7 @@ static void initEntry()
current->mtype = mtype;
current->virt = virt;
current->stat = gstat;
+ current->lang = SrcLangExt_F90;
initGroupInfo(current);
}
@@ -1706,11 +1723,13 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
groupEnterFile(yyFileName,yyLineNr);
current = new Entry;
+ current->lang = SrcLangExt_F90;
current->name = yyFileName;
current->section = Entry::SOURCE_SEC;
current_root->addSubEntry(current);
file_root = current;
current = new Entry;
+ current->lang = SrcLangExt_F90;
fscanYYrestart( fscanYYin );
{