--- doxygen-1.5.8-r1/work/doxygen-1.5.8/src/fortrancode.l	2008-12-25 14:48:57.000000000 -0600
+++ doxygen-1.5.8-r2/work/doxygen-1.5.8/src/fortrancode.l	2009-06-20 11:51:47.000000000 -0500
@@ -611,7 +611,7 @@
 
 IDSYM	  [a-z_A-Z0-9]
 ID        [a-z_A-Z]+{IDSYM}*
-SUBPROG   (subroutine|function)
+SUBPROG   (program|subroutine|function)
 B         [ \t]
 BS        [ \t]*
 BS_       [ \t]+
@@ -708,7 +708,7 @@
                                         }
        
  /*-------- fortran module  -----------------------------------------*/
-<Start>("program"|"module"|"type"|"interface")/{BS_}|({COMMA}{ACCESS_SPEC})|\n {  //
+<Start>("module"|"type"|"interface")/{BS_}|({COMMA}{ACCESS_SPEC})|\n {  //
 					  startUseScope();
   					  startFontClass("keyword"); 
   					  codifyLines(yytext);
@@ -730,7 +730,7 @@
                                           currentModule=0;
 					  REJECT;
                                         }
-<Start>^{BS}"end"({BS}("program"|"module"|"type"|"interface")({BS_}{ID})?)?{BS}/(\n|!) {  //
+<Start>^{BS}"end"({BS}("module"|"type"|"interface")({BS_}{ID})?)?{BS}/(\n|!) {  //
                                           endUseScope();
  					  startFontClass("keyword"); 
   					  codifyLines(yytext);
@@ -743,14 +743,14 @@
   					  codifyLines(yytext);
 					  endFontClass();
                                        }              
-<Start>{SUBPROG}{BS_}                  {  // Fortran subroutine or function found
+<Start>{SUBPROG}{BS_}                  {  // Fortran program, subroutine or function found
    					  startFontClass("keyword");
   					  codifyLines(yytext);
 					  endFontClass();
                                           yy_push_state(YY_START);
                                           BEGIN(Subprog);
                                         }
-<Subprog>{ID}                           { // subroutine/function name
+<Subprog>{ID}                           { // program/subroutine/function name
                                           //cout << "===> start procedure " << yytext << endl;
 					  startUseScope();
 					  generateLink(*g_code,yytext);
@@ -761,7 +761,7 @@
 <Subprog>"\n"                           { codifyLines(yytext);
                                           yy_pop_state();
                                         }
-<Start>"^{BS}end"({BS}{SUBPROG}({BS_}{ID})?)?{BS}/(\n|!) {  // Fortran subroutine or function ends
+<Start>"^{BS}end"({BS}{SUBPROG}({BS_}{ID})?)?{BS}/(\n|!) {  // Fortran program, subroutine or function ends
                                           //cout << "===> end function " << yytext << endl;
                                           endUseScope();
    					  startFontClass("keyword");
--- doxygen-1.5.8-r1/work/doxygen-1.5.8/src/fortranscanner.l	2008-12-22 08:33:27.000000000 -0600
+++ doxygen-1.5.8-r2/work/doxygen-1.5.8/src/fortranscanner.l	2009-06-20 11:56:03.000000000 -0500
@@ -204,7 +204,7 @@
 ID        [a-z_A-Z%]+{IDSYM}*
 PP_ID     {ID}
 LABELID   [a-z_A-Z]+[a-z_A-Z0-9\-]*
-SUBPROG   (subroutine|function|block)
+SUBPROG   (program|subroutine|function|block)
 B         [ \t]
 BS        [ \t]*
 BS_       [ \t]+
@@ -434,11 +434,11 @@
 <SubprogBody>^{BS}{CONTAINS}/({BS}|\n|!)  { BEGIN(SubprogBodyContains); }
 
  /*------ module handling ------------------------------------------------------------*/ 
-<Start>module|program{BS_}             {  //
+<Start>module{BS_}             {  //
 					    yy_push_state(Module);
                                             defaultProtection = Public;
                                        }
-<Start,ModuleBody,ModuleBodyContains>^{BS}"end"({BS}(module|program)({BS_}{ID})?)?{BS}/(\n|!) { // end module	
+<Start,ModuleBody,ModuleBodyContains>^{BS}"end"({BS}(module)({BS_}{ID})?)?{BS}/(\n|!) { // end module	
 					    resolveModuleProcedures(moduleProcedures, current_root);
 					    if (!endScope(current_root))
 					      yyterminate();
@@ -651,7 +651,7 @@
                                         }
 <Initialization>.                       { initializer+=yytext; }
  
- /*------ fortran subroutine/function handling ------------------------------------------------------------*/
+ /*------ fortran program/subroutine/function handling ------------------------------------------------------------*/
  /*       Start is initial condition                                                                       */
  
 <Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{TYPE_SPEC}{BS}/{SUBPROG}{BS_} {   
@@ -665,13 +665,13 @@
                                        }          
 
 <SubprogPrefix>{BS}{SUBPROG}{BS_}     {
-                                         // Fortran subroutine or function found
+                                         // Fortran program, subroutine or function found
                                          addSubprogram(yytext);
                                          BEGIN(Subprog);
                                        }
 
 <Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{SUBPROG}{BS_} {
-                                         // Fortran subroutine or function found
+                                         // Fortran program, subroutine or function found
                                          result= yytext;
                                          result= result.stripWhiteSpace();
                                          extractPrefix(result);
