]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/MigrationTools/org/tianocore/migration/Macro.java
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 package org
.tianocore
.migration
;
15 import java
.util
.regex
.Matcher
;
16 import java
.util
.regex
.Pattern
;
19 Macro(String r8
, String r9
) {
24 Macro(String
[] linecontext
) {
25 r8name
= linecontext
[0];
26 r9name
= linecontext
[1];
33 public static Pattern ptntmacro
= Pattern
.compile("\\b\\w(\\w|\\d)*",
36 private static String unmacro
= "VOID UINTN BOOLEAN ASSERT OPTIONAL STATIC NULL TRUE IN OUT FALSE";
38 public static String
register(Matcher mtr
, ModuleInfo mi
, Database db
) {
42 mi
.hashmacro
.add(temp
);
43 if (MigrationTool
.db
.hasMacro(temp
)) { // only changed macros
44 // registered, because the
45 // database of macro has only
47 if (!unmacro
.contains(temp
)) {
48 mi
.hashnonlocalmacro
.add(temp
);