]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/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
.*;
18 Macro(String r8
, String r9
) {
22 Macro(String
[] linecontext
) {
23 r8name
= linecontext
[0];
24 r9name
= linecontext
[1];
30 public static Pattern ptntmacro
= Pattern
.compile("\\b[A-Z_]+\\s*?\\(?\\b",Pattern
.MULTILINE
);
32 private static String unmacro
= "VOID UINTN BOOLEAN ASSERT OPTIONAL STATIC NULL TRUE IN OUT FALSE";
34 public static String
register(Matcher mtr
, ModuleInfo mi
, Database db
) {
38 if (ModuleInfo
.db
.hasMacro(temp
)) { // only changed macros registered, because the database of macro has only changed ones
39 if (!unmacro
.contains(temp
)) {
40 mi
.hashnonlocalmacro
.add(temp
);