Add EntryPointLib class once ImageEntryPoint is found in inf file.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 02:03:47 +0000 (02:03 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 02:03:47 +0000 (02:03 +0000)
Enhance to recognize function-invocation to not include protocol calling.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1581 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/MigrationTools/org/tianocore/migration/Func.java
Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java

index f00eac4..1858066 100644 (file)
@@ -33,8 +33,7 @@ public class Func {
     public String r9libname;\r
 \r
     public static Pattern ptnbrace = Pattern.compile("\\{[^\\{\\}]*\\}",Pattern.MULTILINE);\r
-    //public static Pattern ptnfuncc = Pattern.compile("([a-zA-Z_]\\w*)\\s*\\([^\\)\\(]*\\)",Pattern.MULTILINE);\r
-    public static Pattern ptnfuncc = Pattern.compile("([a-zA-Z_]\\w*)\\s*\\(",Pattern.MULTILINE);\r
+    public static Pattern ptnfuncc = Pattern.compile("(?<!->)([a-zA-Z_]\\w*)\\s*\\(",Pattern.MULTILINE);\r
     public static Pattern ptnfuncd = Pattern.compile("([a-zA-Z_]\\w*)\\s*\\([^\\)\\(]*\\)\\s*@",Pattern.MULTILINE);\r
     public static Pattern ptnlowcase = Pattern.compile("[a-z]");                // must be removed\r
     \r
index 383353c..41c27a6 100644 (file)
@@ -102,6 +102,7 @@ public final class ModuleReader implements Common.ForDoAll {
                 while (mtrinfequation.find()) {\r
                     if (mtrinfequation.group(1).matches("IMAGE_ENTRY_POINT")) {\r
                         mi.entrypoint = mtrinfequation.group(2);\r
+                        mi.hashrequiredr9libs.add("EntryPointLib");\r
                     }\r
                     if (mtrinfequation.group(1).matches("DPX_SOURCE")) {\r
                         if (!mi.localmodulesources.contains(mtrinfequation.group(2))) {\r
@@ -119,7 +120,7 @@ public final class ModuleReader implements Common.ForDoAll {
                     }\r
                 }\r
             }\r
-            if (mtrsection.group(1).matches("includes.common")) {\r
+            if (mtrsection.group(1).matches("includes.")) {\r
                 mtrfilename = ptnfilename.matcher(mtrsection.group(2));\r
                 while (mtrfilename.find()) {\r
                        mi.infincludes.add(mtrfilename.group());\r