diff -u doxygen-813-reported/src/fortrancode.l doxygen-813/src/fortrancode.l
--- doxygen-813-reported/src/fortrancode.l	2012-05-13 19:00:24.822412300 +0200
+++ doxygen-813/src/fortrancode.l	2012-05-13 19:08:38.168412300 +0200
@@ -673,6 +673,7 @@
 ATTR_STMT {ATTR_SPEC}|DIMENSION
 COMMANDS  (DO|SELECT|CASE|WHERE|IF|THEN|ELSE|MODULE{BS_}PROCEDURE|CONTAINS|IMPLICIT{BS}NONE|CONTAINS|WRITE|READ|ALLOCATE|ALLOCATED|ASSOCIATED|DEALLOCATE|SIZE|END{BS}IF|END{BS}DO|WHILE|INQUIRE|OPEN|CLOSE|DATA)
 IGNORE (CALL)
+PREFIX    (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTAL)?
 
 /* |  */
 
@@ -786,12 +787,12 @@
 					  REJECT;
                                         }
  /*-------- subprog definition -------------------------------------*/
-<Start>{TYPE_SPEC}{BS}/{SUBPROG}{BS_}  {   // TYPE_SPEC is for old function style function result
+<Start>({PREFIX}{BS_})?{TYPE_SPEC}{BS_}({PREFIX}{BS_})?{BS}/{SUBPROG}{BS_}  {   // TYPE_SPEC is for old function style function result
    					  startFontClass("keyword");
   					  codifyLines(yytext);
 					  endFontClass();
                                        }              
-<Start>{SUBPROG}{BS_}                  {  // Fortran subroutine or function found
+<Start>({PREFIX}{BS_})?{SUBPROG}{BS_}                  {  // Fortran subroutine or function found
    					  startFontClass("keyword");
   					  codifyLines(yytext);
 					  endFontClass();
diff -u doxygen-813-reported/src/fortranscanner.l doxygen-813/src/fortranscanner.l
--- doxygen-813-reported/src/fortranscanner.l	2012-05-13 19:01:08.348412300 +0200
+++ doxygen-813/src/fortranscanner.l	2012-05-13 18:38:02.896412300 +0200
@@ -924,7 +924,7 @@
  /*------ fortran subroutine/function handling ------------------------------------------------------------*/
  /*       Start is initial condition                                                                       */
  
-<Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{TYPE_SPEC}{BS}/{SUBPROG}{BS_} {
+<Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{TYPE_SPEC}{BS}({PREFIX}{BS_})?/{SUBPROG}{BS_} {
                                          if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
                                          {
                                            addInterface("$interface$", ifType);
