summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2014-10-11 10:21:06 (GMT)
committeralbert-github <albert.tests@gmail.com>2014-10-11 10:21:06 (GMT)
commit6da2e3fb28f6ed9f219c66d165ac4467fda36148 (patch)
tree867d27db24e684669005a48e9cd5ad211da62e0f /src
parent4df52916170bb81179697d0fa78c7d81fd95415f (diff)
downloadDoxygen-6da2e3fb28f6ed9f219c66d165ac4467fda36148.zip
Doxygen-6da2e3fb28f6ed9f219c66d165ac4467fda36148.tar.gz
Doxygen-6da2e3fb28f6ed9f219c66d165ac4467fda36148.tar.bz2
Bug 738063 - Fortran attribute contiguous not identified
Added keywords contiguous and volatile
Diffstat (limited to 'src')
-rw-r--r--src/fortrancode.l2
-rw-r--r--src/fortranscanner.l26
2 files changed, 25 insertions, 3 deletions
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 03baeed..ac6a73b 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -694,7 +694,7 @@ CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS}))
TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE|CLASS|PROCEDURE)
INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")"
-ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|IMPURE|ELEMENTAL|VALUE|NOPASS|DEFERRED)
+ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|IMPURE|ELEMENTAL|VALUE|NOPASS|DEFERRED|CONTIGUOUS|VOLATILE)
ACCESS_SPEC (PROTECTED|PRIVATE|PUBLIC)
/* Assume that attribute statements are almost the same as attributes. */
ATTR_STMT {ATTR_SPEC}|DIMENSION
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 8ea8aeb..8415e43 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -99,13 +99,15 @@ struct SymbolModifiers {
bool nonoverridable;
bool nopass;
bool pass;
+ bool contiguous;
+ bool volat; /* volatile is a reserverd name */
QCString passVar;
SymbolModifiers() : type(), returnName(), protection(NONE_P), direction(NONE_D),
optional(FALSE), protect(FALSE), dimension(), allocatable(FALSE),
external(FALSE), intrinsic(FALSE), parameter(FALSE),
pointer(FALSE), target(FALSE), save(FALSE), deferred(FALSE), nonoverridable(FALSE),
- nopass(FALSE), pass(FALSE), passVar() {}
+ nopass(FALSE), pass(FALSE), contiguous(FALSE), volat(FALSE), passVar() {}
SymbolModifiers& operator|=(const SymbolModifiers &mdfs);
SymbolModifiers& operator|=(QCString mdfrString);
@@ -258,7 +260,7 @@ CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{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 (EXTERNAL|ALLOCATABLE|DIMENSION{ARGS}|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE)
+ATTR_SPEC (EXTERNAL|ALLOCATABLE|DIMENSION{ARGS}|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE|CONTIGUOUS|VOLATILE)
ACCESS_SPEC (PRIVATE|PUBLIC)
LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")"
/* Assume that attribute statements are almost the same as attributes. */
@@ -1572,6 +1574,8 @@ SymbolModifiers& SymbolModifiers::operator|=(const SymbolModifiers &mdfs)
nopass |= mdfs.nopass;
pass |= mdfs.pass;
passVar = mdfs.passVar;
+ contiguous |= mdfs.contiguous;
+ volat |= mdfs.volat;
return *this;
}
@@ -1650,6 +1654,14 @@ SymbolModifiers& SymbolModifiers::operator|=(QCString mdfString)
{
newMdf.nonoverridable = TRUE;
}
+ else if (mdfString=="contiguous")
+ {
+ newMdf.contiguous = TRUE;
+ }
+ else if (mdfString=="volatile")
+ {
+ newMdf.volat = TRUE;
+ }
else if (mdfString.contains("pass"))
{
newMdf.pass = TRUE;
@@ -1804,6 +1816,16 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs)
if (!typeName.isEmpty()) typeName += ", ";
typeName += "protected";
}
+ if (mdfs.contiguous)
+ {
+ if (!typeName.isEmpty()) typeName += ", ";
+ typeName += "contiguous";
+ }
+ if (mdfs.volat)
+ {
+ if (!typeName.isEmpty()) typeName += ", ";
+ typeName += "volatile";
+ }
return typeName;
}