- Pattern pat = Pattern.compile("g?(BS|RT)(\\s*->\\s*)([a-zA-Z_]\\w*)", Pattern.MULTILINE); // ! only two level () bracket allowed !\r
- //Pattern ptnpei = Pattern.compile("\\(\\*\\*?PeiServices\\)[.-][>]?\\s*(\\w*[#$]*)(\\s*\\(([^\\(\\)]*(\\([^\\(\\)]*\\))?[^\\(\\)]*)*\\))", Pattern.MULTILINE);\r
-\r
- // replace BS -> gBS , RT -> gRT\r
- Matcher mat = pat.matcher(wholeline);\r
- if (mat.find()) { // add a library here\r
- MigrationTool.ui.println("Converting all BS->gBS, RT->gRT");\r
- wholeline = mat.replaceAll("g$1$2$3"); //unknown correctiveness\r
- }\r
- mat.reset();\r
- while (mat.find()) {\r
- if (mat.group(1).matches("BS")) {\r
- mi.hashrequiredr9libs.add("UefiBootServicesTableLib");\r
- }\r
- if (mat.group(1).matches("RT")) {\r
- mi.hashrequiredr9libs.add("UefiRuntimeServicesTableLib");\r
- }\r
- }\r