Index: src/fortranscanner.l
===================================================================
RCS file: /cygdrive/d/cvs_doxygen/doxygen/doxygen/src/fortranscanner.l,v
retrieving revision 1.9.2.2
diff -u -r1.9.2.2 fortranscanner.l
--- src/fortranscanner.l	17 Feb 2013 14:43:50 -0000	1.9.2.2
+++ src/fortranscanner.l	6 Mar 2013 18:11:28 -0000
@@ -78,7 +78,7 @@
 // {{{ ----- Helper structs -----
 //! Holds modifiers (ie attributes) for one symbol (variable, function, etc)
 struct SymbolModifiers {
-  enum Protection {NONE_P, PUBLIC, PRIVATE, PROTECTED};
+  enum Protection {NONE_P, PUBLIC, PRIVATE};
   enum Direction {NONE_D, IN, OUT, INOUT};
 
   //!< This is only used with function return value.
@@ -86,6 +86,7 @@
   Protection protection;
   Direction direction;
   bool optional;
+  bool protect;
   QCString dimension;
   bool allocatable;
   bool external;
@@ -101,7 +102,7 @@
   QCString passVar;
 
   SymbolModifiers() : type(), returnName(), protection(NONE_P), direction(NONE_D),
-    optional(FALSE), dimension(), allocatable(FALSE),
+    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() {}
@@ -257,7 +258,7 @@
 
 INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")"
 ATTR_SPEC (ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE)
-ACCESS_SPEC (PROTECTED|PRIVATE|PUBLIC)
+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. */
 ATTR_STMT {ATTR_SPEC}|DIMENSION|{ACCESS_SPEC}
@@ -549,9 +550,6 @@
 
   /*------- access specification --------------------------------------------------------------------------*/
 
-<ModuleBody>protected/{BS}(\n|"!")       { defaultProtection = Protected;
-                                           current->protection = defaultProtection ;
-                                         }
 <ModuleBody>private/{BS}(\n|"!")         { defaultProtection = Private;
                                            current->protection = defaultProtection ;
                                          }
@@ -593,10 +591,6 @@
                                           current->protection = Private;
                                           typeProtection = Private;
                                         }
-protected                               {
-                                          current->protection = Protected;
-                                          typeProtection = Protected;
-                                        }
 {LANGUAGE_BIND_SPEC}                    {
                                           /* ignored for now */
                                         }
@@ -1501,6 +1495,7 @@
   allocatable |= mdfs.allocatable;
   external |= mdfs.external;
   intrinsic |= mdfs.intrinsic;
+  protect |= mdfs.protect;
   parameter |= mdfs.parameter;
   pointer |= mdfs.pointer;
   target |= mdfs.target;
@@ -1542,7 +1537,7 @@
   }
   else if (mdfString=="protected") 
   {
-    newMdf.protection = SymbolModifiers::PROTECTED;
+    newMdf.protect = TRUE;
   }
   else if (mdfString=="optional") 
   {
@@ -1734,7 +1729,7 @@
     if (!typeName.isEmpty()) typeName += ", ";
     typeName += "private";
   }
-  else if (mdfs.protection == SymbolModifiers::PROTECTED)
+  if (mdfs.protect)
   {
     if (!typeName.isEmpty()) typeName += ", ";
     typeName += "protected";
@@ -1760,8 +1755,6 @@
     ent->protection = Public;
   else if (mdfs.protection == SymbolModifiers::PRIVATE)
     ent->protection = Private;
-  else if (mdfs.protection == SymbolModifiers::PROTECTED)
-    ent->protection = Protected;
 }
 
 /*! Starts the new scope in fortran program. Consider using this function when
