diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-11 10:15:20 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-11 10:15:20 +0000 |
commit | 53dd426984124cae8ddd9aea4124ac31026795c9 (patch) | |
tree | 04982ff330fc25d3e8290a97971aeba56f9ada3d /Tools | |
parent | 2320bb14977245aaf165bc8b3a62b04390fd9c5f (diff) | |
download | edk2-53dd426984124cae8ddd9aea4124ac31026795c9.zip edk2-53dd426984124cae8ddd9aea4124ac31026795c9.tar.gz edk2-53dd426984124cae8ddd9aea4124ac31026795c9.tar.bz2 |
fix a bug in identifying comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1723 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/Java/Source/MigrationTools/org/tianocore/migration/Critic.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/Java/Source/MigrationTools/org/tianocore/migration/Critic.java b/Tools/Java/Source/MigrationTools/org/tianocore/migration/Critic.java index 4641e37..401dea9 100644 --- a/Tools/Java/Source/MigrationTools/org/tianocore/migration/Critic.java +++ b/Tools/Java/Source/MigrationTools/org/tianocore/migration/Critic.java @@ -18,7 +18,7 @@ import java.io.*; public final class Critic {
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 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 final Pattern ptncommentequation = Pattern.compile("([^\\s]*)\\s+-\\s+(.*)\\s*");
private static Matcher mtrcommentequation;
@@ -45,7 +45,7 @@ public final class Critic { wholeline = wholeline.replaceAll("\t", " ");
wholeline = Common.replaceAll(wholeline, ptnheadcomment, "/** @file$1**/");
- wholeline = Common.replaceAll(wholeline, ptnfunccomment, "$1\n/**$3\n**/$4$2");
+ wholeline = Common.replaceAll(wholeline, ptnfunccomment, "$1\n/**$3\n**/\n$4$2");
//wholeline = Common.replaceAll(wholeline, ptncommentstructure, "/**\n#%\n$1\n%#\n#%%\n$2\n%%#\n#%%%\n$3\n%%%#\n**/");
// first scan
|