Enhance doxygening function headers for .h file.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1481 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2006-09-06 07:49:27 +00:00
parent b30d28b3d4
commit b4648de2bc
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ import java.io.*;
public final class Critic { public final class Critic {
public static final Pattern PTN_NEW_HEAD_COMMENT = Pattern.compile("^\\/\\*\\*.*?\\*\\*\\/",Pattern.DOTALL); public static final Pattern PTN_NEW_HEAD_COMMENT = Pattern.compile("^\\/\\*\\*.*?\\*\\*\\/",Pattern.DOTALL);
private static final Pattern ptnheadcomment = Pattern.compile("^\\/\\*\\+\\+(.*?)\\-\\-\\*\\/",Pattern.DOTALL); private static final Pattern ptnheadcomment = Pattern.compile("^\\/\\*\\+\\+(.*?)\\-\\-\\*\\/",Pattern.DOTALL);
private static final Pattern ptnfunccomment = Pattern.compile("([\\};\\/\">]\\s*)([\\w\\s]*?[_\\w][_\\w\\d]*\\s*\\([^\\)\\(]*\\)\\s*)\\/\\*\\+\\+(.*?)\\-\\-\\*\\/(\\s*.*?)([\\{;])",Pattern.DOTALL); // find function with {;">/ , may be unsafe private static final Pattern ptnfunccomment = Pattern.compile("([\\};\\/\">]\\s*)([\\w\\s]*?[_\\w][_\\w\\d]*\\s*\\([^\\)\\(]*\\)\\s*)\\/\\*\\+\\+(.*?)\\-\\-\\*\\/(\\s*.*?)(?=[\\{;])",Pattern.DOTALL); // find function with {;">/ , may be unsafe
//private static Pattern ptncommentstructure = Pattern.compile("\\/\\*\\+\\+\\s*Routine Description:\\s*(.*?)\\s*Arguments:\\s*(.*?)\\s*Returns:\\s*(.*?)\\s*\\-\\-\\*\\/",Pattern.DOTALL); //private static Pattern ptncommentstructure = Pattern.compile("\\/\\*\\+\\+\\s*Routine Description:\\s*(.*?)\\s*Arguments:\\s*(.*?)\\s*Returns:\\s*(.*?)\\s*\\-\\-\\*\\/",Pattern.DOTALL);
private static final Pattern ptncommentequation = Pattern.compile("([^\\s]*)\\s+-\\s+(.*)\\s*"); private static final Pattern ptncommentequation = Pattern.compile("([^\\s]*)\\s+-\\s+(.*)\\s*");
private static Matcher mtrcommentequation; private static Matcher mtrcommentequation;
@ -45,7 +45,7 @@ public final class Critic {
wholeline = wholeline.replaceAll("\t", " "); wholeline = wholeline.replaceAll("\t", " ");
wholeline = Common.replaceAll(wholeline, ptnheadcomment, "/** @file$1**/"); wholeline = Common.replaceAll(wholeline, ptnheadcomment, "/** @file$1**/");
wholeline = Common.replaceAll(wholeline, ptnfunccomment, "$1/**$3**/$4$2$5"); wholeline = Common.replaceAll(wholeline, ptnfunccomment, "$1/**$3**/$4$2");
//wholeline = Common.replaceAll(wholeline, ptncommentstructure, "/**\n#%\n$1\n%#\n#%%\n$2\n%%#\n#%%%\n$3\n%%%#\n**/"); //wholeline = Common.replaceAll(wholeline, ptncommentstructure, "/**\n#%\n$1\n%#\n#%%\n$2\n%%#\n#%%%\n$3\n%%%#\n**/");
// first scan // first scan

View File

@ -302,7 +302,7 @@ public final class SourceFileReplacer implements Common.ForDoAll {
} }
//generate R8lib.h //generate R8lib.h
while ((mtrr8onlyhead = Func.ptnbrace.matcher(paragraph)).find()) { while ((mtrr8onlyhead = Func.ptnbrace.matcher(paragraph)).find()) {
paragraph = mtrr8onlyhead.replaceAll(";\n//"); paragraph = mtrr8onlyhead.replaceAll(";");
} }
outfile2.append(paragraph + "\n\n"); outfile2.append(paragraph + "\n\n");
} }