+++ /dev/null
-/** @file\r
- \r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
- \r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
- \r
- **/\r
-package org.tianocore.migration;\r
-\r
-import java.util.regex.*;\r
-\r
-public class Macro {\r
- Macro(String r8, String r9) {\r
- r8name = r8;\r
- r9name = r9;\r
- }\r
- Macro(String[] linecontext) {\r
- r8name = linecontext[0];\r
- r9name = linecontext[1];\r
- }\r
- \r
- public String r8name;\r
- public String r9name;\r
-\r
- public static Pattern ptntmacro = Pattern.compile("\\b[A-Z_]+\\s*?\\(?\\b",Pattern.MULTILINE);\r
-\r
- private static String unmacro = "VOID UINTN BOOLEAN ASSERT OPTIONAL STATIC NULL TRUE IN OUT FALSE";\r
-\r
- public static String register(Matcher mtr, ModuleInfo mi, Database db) {\r
- String temp = null;\r
- \r
- temp = mtr.group();\r
- mi.hashmacro.add(temp);\r
- if (MigrationTool.db.hasMacro(temp)) { // only changed macros registered, because the database of macro has only changed ones\r
- if (!unmacro.contains(temp)) {\r
- mi.hashnonlocalmacro.add(temp);\r
- }\r
- return temp;\r
- }\r
- return null;\r
- }\r
-}
\ No newline at end of file