summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xBaseTools/Bin/Win32/BootSectImage.exebin393216 -> 393216 bytes
-rwxr-xr-xBaseTools/Bin/Win32/EfiLdrImage.exebin421888 -> 421888 bytes
-rwxr-xr-xBaseTools/Bin/Win32/EfiRom.exebin446464 -> 446464 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Fpd2Dsc.exebin1428686 -> 1429802 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenBootSector.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenCrc32.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenDepex.exebin610560 -> 612999 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFds.exebin1452307 -> 1465182 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFfs.exebin430080 -> 430080 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFv.exebin479232 -> 475136 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFw.exebin466944 -> 479232 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenPage.exebin421888 -> 421888 bytes
-rw-r--r--BaseTools/Bin/Win32/GenPatchPcdTable.exebin0 -> 607128 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenSec.exebin446464 -> 446464 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenVtf.exebin446464 -> 446464 bytes
-rw-r--r--BaseTools/Bin/Win32/LzmaCompress.exebin397312 -> 397312 bytes
-rwxr-xr-xBaseTools/Bin/Win32/MigrationMsa2Inf.exebin1374303 -> 1375239 bytes
-rw-r--r--BaseTools/Bin/Win32/PatchPcdValue.exebin0 -> 558196 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Spd2Dec.exebin1382890 -> 1385329 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Split.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/TargetTool.exebin579152 -> 580101 bytes
-rwxr-xr-xBaseTools/Bin/Win32/TianoCompress.exebin434176 -> 434176 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Trim.exebin672353 -> 675164 bytes
-rwxr-xr-xBaseTools/Bin/Win32/VfrCompile.exebin1155072 -> 1183744 bytes
-rwxr-xr-xBaseTools/Bin/Win32/VolInfo.exebin471040 -> 471040 bytes
-rwxr-xr-xBaseTools/Bin/Win32/build.exebin1723538 -> 2733693 bytes
-rw-r--r--BaseTools/Conf/build_rule.template18
-rw-r--r--BaseTools/Conf/tools_def.template500
-rw-r--r--BaseTools/Source/C/BootSectImage/bootsectimage.c4
-rw-r--r--BaseTools/Source/C/Common/EfiUtilityMsgs.c35
-rw-r--r--BaseTools/Source/C/Common/EfiUtilityMsgs.h11
-rw-r--r--BaseTools/Source/C/Common/ParseInf.c70
-rw-r--r--BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c4
-rw-r--r--BaseTools/Source/C/EfiRom/EfiRom.c4
-rw-r--r--BaseTools/Source/C/GenBootSector/GenBootSector.c4
-rw-r--r--BaseTools/Source/C/GenCrc32/GenCrc32.c4
-rw-r--r--BaseTools/Source/C/GenFfs/GenFfs.c24
-rw-r--r--BaseTools/Source/C/GenFv/GenFv.c93
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.c506
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.h17
-rw-r--r--BaseTools/Source/C/GenFw/GenFw.c834
-rw-r--r--BaseTools/Source/C/GenFw/elf32.h14
-rw-r--r--BaseTools/Source/C/GenFw/elf64.h13
-rw-r--r--BaseTools/Source/C/GenFw/elf_common.h14
-rw-r--r--BaseTools/Source/C/GenPage/GenPage.c4
-rw-r--r--BaseTools/Source/C/GenSec/GenSec.c232
-rw-r--r--BaseTools/Source/C/GenVtf/GenVtf.c5
-rw-r--r--BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c4
-rw-r--r--BaseTools/Source/C/Include/Common/PiFirmwareFile.h6
-rw-r--r--BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h111
-rw-r--r--BaseTools/Source/C/Makefiles/NmakeSubdirs.bat12
-rw-r--r--BaseTools/Source/C/Makefiles/app.makefile12
-rw-r--r--BaseTools/Source/C/Makefiles/footer.makefile11
-rw-r--r--BaseTools/Source/C/Makefiles/header.makefile11
-rw-r--r--BaseTools/Source/C/Makefiles/lib.makefile11
-rw-r--r--BaseTools/Source/C/Makefiles/ms.app11
-rw-r--r--BaseTools/Source/C/Makefiles/ms.common11
-rw-r--r--BaseTools/Source/C/Makefiles/ms.lib11
-rw-r--r--BaseTools/Source/C/Makefiles/ms.rule11
-rw-r--r--BaseTools/Source/C/PyEfiCompressor/EfiCompressor.c13
-rw-r--r--BaseTools/Source/C/PyEfiCompressor/Makefile11
-rw-r--r--BaseTools/Source/C/PyUtility/Makefile11
-rw-r--r--BaseTools/Source/C/PyUtility/PyUtility.c13
-rw-r--r--BaseTools/Source/C/Split/Split.c4
-rw-r--r--BaseTools/Source/C/TianoCompress/TianoCompress.c4
-rw-r--r--BaseTools/Source/C/VfrCompile/EfiVfr.h3
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrCompiler.cpp76
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrCompiler.h2
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrError.cpp13
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrError.h6
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp47
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.h150
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g435
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp155
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrUtilityLib.h9
-rw-r--r--BaseTools/Source/C/VolInfo/VolInfo.c4
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py4378
-rw-r--r--BaseTools/Source/Python/AutoGen/GenC.py271
-rw-r--r--BaseTools/Source/Python/AutoGen/GenDepex.py4
-rw-r--r--BaseTools/Source/Python/AutoGen/UniClassObject.py25
-rw-r--r--BaseTools/Source/Python/AutoGen/__init__.py9
-rw-r--r--BaseTools/Source/Python/Common/BuildToolError.py2
-rw-r--r--BaseTools/Source/Python/Common/DataType.py16
-rw-r--r--BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py5
-rw-r--r--BaseTools/Source/Python/Common/FdfParserLite.py43
-rw-r--r--BaseTools/Source/Python/Common/InfClassObject.py7
-rw-r--r--BaseTools/Source/Python/Common/InfClassObjectLight.py7
-rw-r--r--BaseTools/Source/Python/Common/Misc.py85
-rw-r--r--BaseTools/Source/Python/Common/Parsing.py124
-rw-r--r--BaseTools/Source/Python/Common/__init__.py15
-rw-r--r--BaseTools/Source/Python/CommonDataClass/FdfClass.py10
-rw-r--r--BaseTools/Source/Python/CommonDataClass/ModuleClass.py5
-rw-r--r--BaseTools/Source/Python/CommonDataClass/__init__.py15
-rw-r--r--BaseTools/Source/Python/Ecc/C.g57
-rw-r--r--BaseTools/Source/Python/Ecc/CLexer.py1722
-rw-r--r--BaseTools/Source/Python/Ecc/CParser.py8051
-rw-r--r--BaseTools/Source/Python/Ecc/Check.py67
-rw-r--r--BaseTools/Source/Python/Ecc/Ecc.py12
-rw-r--r--BaseTools/Source/Python/Ecc/EccToolError.py32
-rw-r--r--BaseTools/Source/Python/Ecc/ParserWarning.py13
-rw-r--r--BaseTools/Source/Python/Ecc/__init__.py15
-rw-r--r--BaseTools/Source/Python/Ecc/c.py594
-rw-r--r--BaseTools/Source/Python/Ecc/exception.xml10
-rw-r--r--BaseTools/Source/Python/Eot/CLexer.py4947
-rw-r--r--BaseTools/Source/Python/Eot/CParser.py18844
-rw-r--r--BaseTools/Source/Python/Eot/CodeFragment.py185
-rw-r--r--BaseTools/Source/Python/Eot/CodeFragmentCollector.py467
-rw-r--r--BaseTools/Source/Python/Eot/Database.py255
-rw-r--r--BaseTools/Source/Python/Eot/EfiCompressor.pydbin0 -> 8192 bytes
-rw-r--r--BaseTools/Source/Python/Eot/Eot.py647
-rw-r--r--BaseTools/Source/Python/Eot/EotGlobalData.py138
-rw-r--r--BaseTools/Source/Python/Eot/EotToolError.py21
-rw-r--r--BaseTools/Source/Python/Eot/FileProfile.py58
-rw-r--r--BaseTools/Source/Python/Eot/FvImage.py1453
-rw-r--r--BaseTools/Source/Python/Eot/InfParserLite.py171
-rw-r--r--BaseTools/Source/Python/Eot/LzmaCompressor.pydbin0 -> 53248 bytes
-rw-r--r--BaseTools/Source/Python/Eot/Parser.py848
-rw-r--r--BaseTools/Source/Python/Eot/ParserWarning.py26
-rw-r--r--BaseTools/Source/Python/Eot/Report.py472
-rw-r--r--BaseTools/Source/Python/Eot/__init__.py15
-rw-r--r--BaseTools/Source/Python/Eot/c.py394
-rw-r--r--BaseTools/Source/Python/Fdb/__init__.py15
-rw-r--r--BaseTools/Source/Python/FixFlash/__init__.py15
-rw-r--r--BaseTools/Source/Python/GenFds/CompressSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/DepexSection.py29
-rw-r--r--BaseTools/Source/Python/GenFds/EfiSection.py30
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py109
-rw-r--r--BaseTools/Source/Python/GenFds/FfsFileStatement.py26
-rw-r--r--BaseTools/Source/Python/GenFds/FfsInfStatement.py77
-rw-r--r--BaseTools/Source/Python/GenFds/Fv.py57
-rw-r--r--BaseTools/Source/Python/GenFds/FvImageSection.py8
-rw-r--r--BaseTools/Source/Python/GenFds/GenFds.py62
-rw-r--r--BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py37
-rw-r--r--BaseTools/Source/Python/GenFds/GuidSection.py140
-rw-r--r--BaseTools/Source/Python/GenFds/Section.py5
-rw-r--r--BaseTools/Source/Python/GenFds/__init__.py15
-rw-r--r--BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py189
-rw-r--r--BaseTools/Source/Python/GenPatchPcdTable/__init__.py15
-rw-r--r--BaseTools/Source/Python/Makefile8
-rw-r--r--BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py4
-rw-r--r--BaseTools/Source/Python/MigrationMsa2Inf/__init__.py15
-rw-r--r--BaseTools/Source/Python/MkBOM/__init__.py15
-rw-r--r--BaseTools/Source/Python/PackagingTool/InstallPkg.py2
-rw-r--r--BaseTools/Source/Python/PackagingTool/MkPkg.py2
-rw-r--r--BaseTools/Source/Python/PackagingTool/RmPkg.py2
-rw-r--r--BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py287
-rw-r--r--BaseTools/Source/Python/PatchPcdValue/__init__.py15
-rw-r--r--BaseTools/Source/Python/Table/TableEotReport.py4
-rw-r--r--BaseTools/Source/Python/Table/TableQuery.py20
-rw-r--r--BaseTools/Source/Python/Table/TableReport.py5
-rw-r--r--BaseTools/Source/Python/Table/__init__.py15
-rw-r--r--BaseTools/Source/Python/TargetTool/TargetTool.py4
-rw-r--r--BaseTools/Source/Python/TargetTool/__init__.py15
-rw-r--r--BaseTools/Source/Python/Trim/Trim.py21
-rw-r--r--BaseTools/Source/Python/Workspace/WorkspaceDatabase.py4728
-rw-r--r--BaseTools/Source/Python/Workspace/__init__.py15
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py1423
-rw-r--r--BaseTools/Source/Python/build/__init__.py15
-rw-r--r--BaseTools/Source/Python/build/build.py3320
-rw-r--r--BaseTools/Source/Python/fpd2dsc/__init__.py15
-rw-r--r--BaseTools/Source/Python/fpd2dsc/fpd2dsc.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/ConvertModule.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/StoreInf.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/__init__.py15
-rw-r--r--BaseTools/Source/Python/sitecustomize.py10
-rw-r--r--BaseTools/Source/Python/spd2dec/__init__.py15
-rw-r--r--BaseTools/UserManuals/Build_Utility_Man_Page.rtf329
-rw-r--r--BaseTools/UserManuals/GenVtf_Utility_Man_Page.rtf201
-rwxr-xr-xBaseTools/gcc/mingw-gcc-build.py72
169 files changed, 46579 insertions, 12981 deletions
diff --git a/BaseTools/Bin/Win32/BootSectImage.exe b/BaseTools/Bin/Win32/BootSectImage.exe
index 454aa34cff..06cdd4e0f3 100755
--- a/BaseTools/Bin/Win32/BootSectImage.exe
+++ b/BaseTools/Bin/Win32/BootSectImage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/EfiLdrImage.exe b/BaseTools/Bin/Win32/EfiLdrImage.exe
index cfa5475d50..6c80b40eb4 100755
--- a/BaseTools/Bin/Win32/EfiLdrImage.exe
+++ b/BaseTools/Bin/Win32/EfiLdrImage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/EfiRom.exe b/BaseTools/Bin/Win32/EfiRom.exe
index 399b2d8818..a36b64accb 100755
--- a/BaseTools/Bin/Win32/EfiRom.exe
+++ b/BaseTools/Bin/Win32/EfiRom.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Fpd2Dsc.exe b/BaseTools/Bin/Win32/Fpd2Dsc.exe
index 59212c57bc..55f1a6943e 100755
--- a/BaseTools/Bin/Win32/Fpd2Dsc.exe
+++ b/BaseTools/Bin/Win32/Fpd2Dsc.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenBootSector.exe b/BaseTools/Bin/Win32/GenBootSector.exe
index e618ad1d7f..7d3b3980d6 100755
--- a/BaseTools/Bin/Win32/GenBootSector.exe
+++ b/BaseTools/Bin/Win32/GenBootSector.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenCrc32.exe b/BaseTools/Bin/Win32/GenCrc32.exe
index 3e4b5e5a1c..a77006e763 100755
--- a/BaseTools/Bin/Win32/GenCrc32.exe
+++ b/BaseTools/Bin/Win32/GenCrc32.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenDepex.exe b/BaseTools/Bin/Win32/GenDepex.exe
index 3959a8048e..04c6e719aa 100755
--- a/BaseTools/Bin/Win32/GenDepex.exe
+++ b/BaseTools/Bin/Win32/GenDepex.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFds.exe b/BaseTools/Bin/Win32/GenFds.exe
index 65322ef37e..d9b51693c5 100755
--- a/BaseTools/Bin/Win32/GenFds.exe
+++ b/BaseTools/Bin/Win32/GenFds.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFfs.exe b/BaseTools/Bin/Win32/GenFfs.exe
index bc3e4476a4..32c813992e 100755
--- a/BaseTools/Bin/Win32/GenFfs.exe
+++ b/BaseTools/Bin/Win32/GenFfs.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFv.exe b/BaseTools/Bin/Win32/GenFv.exe
index 485fa10bbc..df202d399b 100755
--- a/BaseTools/Bin/Win32/GenFv.exe
+++ b/BaseTools/Bin/Win32/GenFv.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFw.exe b/BaseTools/Bin/Win32/GenFw.exe
index 724b50170a..7a816a2e9d 100755
--- a/BaseTools/Bin/Win32/GenFw.exe
+++ b/BaseTools/Bin/Win32/GenFw.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenPage.exe b/BaseTools/Bin/Win32/GenPage.exe
index 0c47f3fc86..0dd72b849a 100755
--- a/BaseTools/Bin/Win32/GenPage.exe
+++ b/BaseTools/Bin/Win32/GenPage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenPatchPcdTable.exe b/BaseTools/Bin/Win32/GenPatchPcdTable.exe
new file mode 100644
index 0000000000..437ee129a0
--- /dev/null
+++ b/BaseTools/Bin/Win32/GenPatchPcdTable.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenSec.exe b/BaseTools/Bin/Win32/GenSec.exe
index 62adbfae53..62b04ee013 100755
--- a/BaseTools/Bin/Win32/GenSec.exe
+++ b/BaseTools/Bin/Win32/GenSec.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenVtf.exe b/BaseTools/Bin/Win32/GenVtf.exe
index a222d5e6b8..ee60e62d32 100755
--- a/BaseTools/Bin/Win32/GenVtf.exe
+++ b/BaseTools/Bin/Win32/GenVtf.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/LzmaCompress.exe b/BaseTools/Bin/Win32/LzmaCompress.exe
index b280fb2811..5397a5c5e5 100644
--- a/BaseTools/Bin/Win32/LzmaCompress.exe
+++ b/BaseTools/Bin/Win32/LzmaCompress.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/MigrationMsa2Inf.exe b/BaseTools/Bin/Win32/MigrationMsa2Inf.exe
index 089252d4e5..bb3be942fd 100755
--- a/BaseTools/Bin/Win32/MigrationMsa2Inf.exe
+++ b/BaseTools/Bin/Win32/MigrationMsa2Inf.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/PatchPcdValue.exe b/BaseTools/Bin/Win32/PatchPcdValue.exe
new file mode 100644
index 0000000000..27a4f1f908
--- /dev/null
+++ b/BaseTools/Bin/Win32/PatchPcdValue.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Spd2Dec.exe b/BaseTools/Bin/Win32/Spd2Dec.exe
index e1474b6aaf..7c16177bba 100755
--- a/BaseTools/Bin/Win32/Spd2Dec.exe
+++ b/BaseTools/Bin/Win32/Spd2Dec.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Split.exe b/BaseTools/Bin/Win32/Split.exe
index 3e02697d7a..ce172e92d6 100755
--- a/BaseTools/Bin/Win32/Split.exe
+++ b/BaseTools/Bin/Win32/Split.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/TargetTool.exe b/BaseTools/Bin/Win32/TargetTool.exe
index b0c6cde178..ba065328f4 100755
--- a/BaseTools/Bin/Win32/TargetTool.exe
+++ b/BaseTools/Bin/Win32/TargetTool.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/TianoCompress.exe b/BaseTools/Bin/Win32/TianoCompress.exe
index f9894b0a78..58afbabc3a 100755
--- a/BaseTools/Bin/Win32/TianoCompress.exe
+++ b/BaseTools/Bin/Win32/TianoCompress.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Trim.exe b/BaseTools/Bin/Win32/Trim.exe
index 9777b80e3f..8bfdbb3ab4 100755
--- a/BaseTools/Bin/Win32/Trim.exe
+++ b/BaseTools/Bin/Win32/Trim.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/VfrCompile.exe b/BaseTools/Bin/Win32/VfrCompile.exe
index a193e5bc14..dfbff8c173 100755
--- a/BaseTools/Bin/Win32/VfrCompile.exe
+++ b/BaseTools/Bin/Win32/VfrCompile.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/VolInfo.exe b/BaseTools/Bin/Win32/VolInfo.exe
index 32e5218b8f..915ec6540f 100755
--- a/BaseTools/Bin/Win32/VolInfo.exe
+++ b/BaseTools/Bin/Win32/VolInfo.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/build.exe b/BaseTools/Bin/Win32/build.exe
index 02827fe1ca..5bf71358a9 100755
--- a/BaseTools/Bin/Win32/build.exe
+++ b/BaseTools/Bin/Win32/build.exe
Binary files differ
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 7e5d4aa037..0f2921c714 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2007-2009, Intel Corporation
+# Copyright (c) 2007-2010, Intel Corporation
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -237,8 +237,6 @@
<Command.GCC>
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS)
- "$(OBJCOPY)" --only-keep-debug ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pdb
- "$(OBJCOPY)" -S ${dst}
"$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
<Command.RVCT>
@@ -286,7 +284,16 @@
<OutputFile>
$(DEBUG_DIR)(+)$(MODULE_NAME).efi
- <Command.MSFT, Command.INTEL, Command.GCC, Command.RVCT>
+ <Command.MSFT, Command.INTEL, Command.RVCT>
+ GenFw -e $(MODULE_TYPE) -o ${dst} ${src}
+ $(CP) ${dst} $(OUTPUT_DIR)
+ $(CP) ${dst} $(BIN_DIR)
+ -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
+
+ <Command.GCC>
+ $(OBJCOPY) --only-keep-debug ${src} $(BIN_DIR)(+)$(MODULE_NAME).debug
+ $(OBJCOPY) --strip-unneeded ${src}
+ $(OBJCOPY) --add-gnu-debuglink=$(BIN_DIR)(+)$(MODULE_NAME).debug ${src}
GenFw -e $(MODULE_TYPE) -o ${dst} ${src}
$(CP) ${dst} $(OUTPUT_DIR)
$(CP) ${dst} $(BIN_DIR)
@@ -424,6 +431,9 @@
<InputFile>
*.mcb
+ <ExtraDependency>
+ $(MAKE_FILE)
+
<OutputFile>
$(OUTPUT_DIR)(+)$(MODULE_NAME).bin
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index bb0cead397..e797f15c53 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006-2009, Intel Corporation
+# Copyright (c) 2006-2010, Intel Corporation
# Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.
#
# All rights reserved. This program and the accompanying materials
@@ -27,6 +27,19 @@ DEFINE VS2005x86_DLL = C:\Program Files (x86)\Microsoft Visual Studio 8\Commo
DEFINE VS2005x86_BINX64 = DEF(VS2005x86_BIN)\x86_amd64
DEFINE VS2005x86_BIN64 = DEF(VS2005x86_BIN)\x86_ia64
+DEFINE VS2008_BIN = C:\Program Files\Microsoft Visual Studio 9.0\Vc\bin
+DEFINE VS2008_DLL = C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
+DEFINE VS2008_BINX64 = DEF(VS2008_BIN)\x86_amd64
+DEFINE VS2008_BIN64 = DEF(VS2008_BIN)\x86_ia64
+
+DEFINE VS2008x86_BIN = C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin
+DEFINE VS2008x86_DLL = C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE
+DEFINE VS2008x86_BINX64 = DEF(VS2008x86_BIN)\x86_amd64
+DEFINE VS2008x86_BIN64 = DEF(VS2008x86_BIN)\x86_ia64
+
+DEFINE WINSDK_VERSION = v6.0A
+DEFINE WINSDK_BIN = c:\Program Files\Microsoft SDKs\Windows\DEF(WINSDK_VERSION)\bin
+DEFINE WINSDKx86_BIN = c:\Program Files (x86)\Microsoft SDKs\Windows\DEF(WINSDK_VERSION)\bin
# These defines are needed for certain Microsoft Visual Studio tools that
# are used by other toolchains. An example is that ICC on Windows normally
@@ -158,6 +171,7 @@ DEFINE ARMGCC_BIN = /
# =====================
# VS2003 - win32 - Microsoft Visual Studio .NET 2003, Intel EBC, Intel ASL
# VS2005 - win32 - Microsoft Visual Studio 2005 Team Suite Edition, Intel EBC, Intel ASL (also compatible with VS 2005 Express, Standard, and Pro)
+# VS2008 - win32 - Microsoft Visual Studio 2008 Team Suite with Intel ASL
# DDK3790 - win32 - Microsoft Windows DDK 3790.1830, Intel EBC, Intel ASL
# UNIXGCC - UNIX GCC, No EBC, Intel ASL
# ELFGCC - Linux ELF GCC, No EBC, Intel ASL
@@ -166,12 +180,15 @@ DEFINE ARMGCC_BIN = /
# MYTOOLS - win32 - VS2005 for IA32/X64, WINDDK 3790.1830 for IPF, Intel EBC, Intel ASL
# VS2003xASL - win32 - Microsoft Visual Studio .NET 2003, Intel EBC, Microsoft ASL
# VS2005xASL - win32 - Microsoft Visual Studio 2005 Team Suite Edition, Intel EBC, Microsoft ASL
+# VS2008xASL - win32 - Microsoft Visual Studio 2008 Team Suite with Microsoft ASL
# DDK3790xASL - win32 - Microsoft Windows DDK 3790.1830, Intel EBC, Microsoft ASL
# CYGGCCxASL - win32 - CygWin GCC, Intel EBC, Microsoft ASL
# ICCxASL - win32 - Intel C Compiler V9.1, Intel EBC, Microsoft ASL
# VS2005x86 - win64 - Microsoft Visual Studio 2005 Team Suite Edition (x86), Intel EBC, Intel ASL (also compatible with VS 2005 Express, Standard, and Pro)
+# VS2008x86 - Microsoft Visual Studio 2008 (x86) w/ Intel ASL
# ICCx86 - win64 - Intel C Compiler V9.1 (x86), Intel EBC, Intel ASL
# VS2005x86xASL - win64 - Microsoft Visual Studio 2005 Team Suite Edition (x86), Intel EBC, Microsoft ASL (also compatible with VS 2005 Express, Standard, and Pro)
+# VS2008x86xASL - Microsoft Visual Studio 2008 (x86) w/ Microsoft ASL
# ICCx86xASL - win64 - Intel C Compiler V9.1 (x86), Intel EBC, Microsoft ASL
# CYGGCCx86 - win64 - CygWin GCC (x86), Intel EBC (x86), Intel ASL
# CYGGCCx86xASL - win64 - CygWin GCC (x86), Intel EBC (x86), Microsoft ASL
@@ -853,6 +870,454 @@ RELEASE_VS2005x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:R
*_VS2005x86xASL_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC
*_VS2005x86xASL_EBC_DLINK_FLAGS = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP
+
+
+####################################################################################
+#
+# Microsoft Visual Studio 2008
+#
+# VS2008 - Microsoft Visual Studio 2005 All Edition, including Standard, Professional, Express, TeamSuite
+# ASL - Intel ACPI Source Language Compiler
+####################################################################################
+# VS2008 - Microsoft Visual Studio 2008 ALL Edition, including Standard, Professional, Express, TeamSuite
+*_VS2008_*_*_FAMILY = MSFT
+
+*_VS2008_*_MAKE_PATH = DEF(VS2008_BIN)\nmake.exe
+*_VS2008_*_MAKE_FLAGS = /nologo
+*_VS2008_*_RC_PATH = DEF(WINSDK_BIN)\rc.exe
+
+*_VS2008_*_SLINK_FLAGS = /NOLOGO /LTCG
+*_VS2008_*_APP_FLAGS = /nologo /E /TC
+*_VS2008_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+
+##################
+# ASL definitions
+##################
+*_VS2008_*_ASL_PATH = DEF(DEFAULT_WIN_ASL_BIN)
+*_VS2008_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
+*_VS2008_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
+*_VS2008_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
+*_VS2008_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
+*_VS2008_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2008_IA32_*_DLL = DEF(VS2008_DLL)
+
+*_VS2008_IA32_MAKE_PATH = DEF(VS2008_BIN)\nmake.exe
+*_VS2008_IA32_CC_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008_IA32_VFRPP_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008_IA32_SLINK_PATH = DEF(VS2008_BIN)\lib.exe
+*_VS2008_IA32_DLINK_PATH = DEF(VS2008_BIN)\link.exe
+*_VS2008_IA32_ASMLINK_PATH = DEF(WINDDK_BIN16)\link16.exe
+*_VS2008_IA32_APP_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008_IA32_PP_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008_IA32_ASM_PATH = DEF(VS2008_BIN)\ml.exe
+*_VS2008_IA32_ASLCC_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008_IA32_ASLPP_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008_IA32_ASLDLINK_PATH = DEF(VS2008_BIN)\link.exe
+
+ *_VS2008_IA32_MAKE_FLAGS = /nologo
+ DEBUG_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2008_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+ DEBUG_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2008_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
+ DEBUG_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2008_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ *_VS2008_IA32_ASMLINK_FLAGS = /nologo /tiny
+
+##################
+# X64 definitions
+##################
+*_VS2008_X64_*_DLL = DEF(VS2008_DLL)
+
+*_VS2008_X64_CC_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008_X64_PP_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008_X64_APP_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008_X64_VFRPP_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008_X64_ASM_PATH = DEF(VS2008_BINX64)\ml64.exe
+*_VS2008_X64_SLINK_PATH = DEF(VS2008_BINX64)\lib.exe
+*_VS2008_X64_DLINK_PATH = DEF(VS2008_BINX64)\link.exe
+*_VS2008_X64_ASLCC_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008_X64_ASLPP_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008_X64_ASLDLINK_PATH = DEF(VS2008_BINX64)\link.exe
+
+
+ DEBUG_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2008_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+ DEBUG_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2008_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
+ DEBUG_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+
+##################
+# IPF definitions
+##################
+*_VS2008_IPF_*_DLL = DEF(VS2008_DLL)
+
+*_VS2008_IPF_PP_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008_IPF_APP_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008_IPF_VFRPP_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008_IPF_CC_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008_IPF_ASM_PATH = DEF(VS2008_BIN64)\ias.exe
+*_VS2008_IPF_SLINK_PATH = DEF(VS2008_BIN64)\lib.exe
+*_VS2008_IPF_DLINK_PATH = DEF(VS2008_BIN64)\link.exe
+*_VS2008_IPF_ASLCC_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008_IPF_ASLPP_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008_IPF_ASLDLINK_PATH = DEF(VS2008_BIN64)\link.exe
+
+ DEBUG_VS2008_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi
+RELEASE_VS2008_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
+ DEBUG_VS2008_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+RELEASE_VS2008_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
+ DEBUG_VS2008_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2008_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+
+##################
+# EBC definitions
+##################
+*_VS2008_EBC_*_FAMILY = INTEL
+
+*_VS2008_EBC_MAKE_PATH = DEF(VS2008_BIN)\nmake.exe
+*_VS2008_EBC_PP_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2008_EBC_VFRPP_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2008_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2008_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
+*_VS2008_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
+
+*_VS2008_EBC_MAKE_FLAGS = /nologo
+*_VS2008_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2008_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT)
+*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2008_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC
+*_VS2008_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP
+
+####################################################################################
+#
+# Microsoft Visual Studio 2008
+#
+# VS2008 - Microsoft Visual Studio 2008 All Edition, including Standard, Professional, Express, TeamSuite
+# ASL - Microsoft ACPI Source Language Compiler (asl.exe)
+####################################################################################
+# VS2008xASL - Microsoft Visual Studio 2008 ALL Edition, including Standard, Professional, Express, TeamSuite
+*_VS2008xASL_*_*_FAMILY = MSFT
+
+*_VS2008xASL_*_MAKE_PATH = DEF(VS2008_BIN)\nmake.exe
+*_VS2008xASL_*_MAKE_FLAG = /nologo
+*_VS2008xASL_*_RC_PATH = DEF(WINSDK_BIN)\rc.exe
+
+*_VS2008xASL_*_SLINK_FLAGS = /NOLOGO /LTCG
+*_VS2008xASL_*_APP_FLAGS = /nologo /E /TC
+*_VS2008xASL_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2008xASL_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+
+##################
+# ASL definitions
+##################
+*_VS2008xASL_*_ASL_PATH = DEF(WIN_ASL_BIN)
+*_VS2008xASL_*_ASL_FLAGS =
+*_VS2008xASL_*_ASL_OUTFLAGS = DEF(MS_ASL_OUTFLAGS)
+*_VS2008xASL_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
+*_VS2008xASL_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
+*_VS2008xASL_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2008xASL_IA32_*_DLL = DEF(VS2008_DLL)
+
+*_VS2008xASL_IA32_MAKE_PATH = DEF(VS2008_BIN)\nmake.exe
+*_VS2008xASL_IA32_CC_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008xASL_IA32_VFRPP_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008xASL_IA32_SLINK_PATH = DEF(VS2008_BIN)\lib.exe
+*_VS2008xASL_IA32_DLINK_PATH = DEF(VS2008_BIN)\link.exe
+*_VS2008xASL_IA32_ASMLINK_PATH = DEF(WINDDK_BIN16)\link16.exe
+*_VS2008xASL_IA32_APP_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008xASL_IA32_PP_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008xASL_IA32_ASM_PATH = DEF(VS2008_BIN)\ml.exe
+*_VS2008xASL_IA32_ASLCC_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008xASL_IA32_ASLPP_PATH = DEF(VS2008_BIN)\cl.exe
+*_VS2008xASL_IA32_ASLDLINK_PATH = DEF(VS2008_BIN)\link.exe
+
+ *_VS2008xASL_IA32_MAKE_FLAGS = /nologo
+ DEBUG_VS2008xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2008xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+ DEBUG_VS2008xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2008xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
+ DEBUG_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2008xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ *_VS2008xASL_IA32_ASMLINK_FLAGS= /nologo /tiny
+
+##################
+# X64 definitions
+##################
+*_VS2008xASL_X64_*_DLL = DEF(VS2008_DLL)
+
+*_VS2008xASL_X64_CC_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008xASL_X64_PP_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008xASL_X64_APP_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008xASL_X64_VFRPP_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008xASL_X64_ASM_PATH = DEF(VS2008_BINX64)\ml64.exe
+*_VS2008xASL_X64_SLINK_PATH = DEF(VS2008_BINX64)\lib.exe
+*_VS2008xASL_X64_DLINK_PATH = DEF(VS2008_BINX64)\link.exe
+*_VS2008xASL_X64_ASLCC_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008xASL_X64_ASLPP_PATH = DEF(VS2008_BINX64)\cl.exe
+*_VS2008xASL_X64_ASLDLINK_PATH = DEF(VS2008_BINX64)\link.exe
+
+
+ DEBUG_VS2008xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2008xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+ DEBUG_VS2008xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2008xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
+ DEBUG_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2008xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+
+##################
+# IPF definitions
+##################
+*_VS2008xASL_IPF_*_DLL = DEF(VS2008_DLL)
+
+*_VS2008xASL_IPF_PP_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008xASL_IPF_APP_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008xASL_IPF_VFRPP_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008xASL_IPF_CC_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008xASL_IPF_ASM_PATH = DEF(VS2008_BIN64)\ias.exe
+*_VS2008xASL_IPF_SLINK_PATH = DEF(VS2008_BIN64)\lib.exe
+*_VS2008xASL_IPF_DLINK_PATH = DEF(VS2008_BIN64)\link.exe
+*_VS2008xASL_IPF_ASLCC_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008xASL_IPF_ASLPP_PATH = DEF(VS2008_BIN64)\cl.exe
+*_VS2008xASL_IPF_ASLDLINK_PATH = DEF(VS2008_BIN64)\link.exe
+
+ DEBUG_VS2008xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi
+RELEASE_VS2008xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
+ DEBUG_VS2008xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+RELEASE_VS2008xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
+ DEBUG_VS2008xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2008xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF.ICF /IGNORE:4086 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+
+##################
+# EBC definitions
+##################
+*_VS2008xASL_EBC_*_FAMILY = INTEL
+
+*_VS2008xASL_EBC_MAKE_PATH = DEF(VS2008_BIN)\nmake.exe
+*_VS2008xASL_EBC_PP_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2008xASL_EBC_VFRPP_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2008xASL_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2008xASL_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
+*_VS2008xASL_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
+
+*_VS2008xASL_EBC_MAKE_FLAGS = /nologo
+*_VS2008xASL_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2008xASL_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT)
+*_VS2008xASL_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2008xASL_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC
+*_VS2008xASL_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP
+
+
+####################################################################################
+# VS2008x86 - Microsoft Visual Studio 2008 (x86) with Intel ASL
+# ASL - Intel ACPI Source Language Compiler (iasl.exe)
+####################################################################################
+# VS2008x86 - Microsoft Visual Studio 2008 (x86) ALL Edition with Intel ASL
+*_VS2008x86_*_*_FAMILY = MSFT
+
+*_VS2008x86_*_MAKE_PATH = DEF(VS2008x86_BIN)\nmake.exe
+*_VS2008xASL_*_MAKE_FLAG = /nologo
+*_VS2008xASL_*_RC_PATH = DEF(WINSDKx86_BIN)\rc.exe
+
+*_VS2008x86_*_MAKE_FLAGS = /nologo
+*_VS2008x86_*_SLINK_FLAGS = /NOLOGO /LTCG
+*_VS2008x86_*_APP_FLAGS = /nologo /E /TC
+*_VS2008x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+
+##################
+# ASL definitions
+##################
+*_VS2008x86_*_ASL_PATH = DEF(WIN_IASL_BIN)
+*_VS2008x86_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
+*_VS2008x86_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
+*_VS2008x86_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
+*_VS2008x86_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
+*_VS2008x86_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2008x86_IA32_*_DLL = DEF(VS2008x86_DLL)
+
+*_VS2008x86_IA32_MAKE_PATH = DEF(VS2008x86_BIN)\nmake.exe
+*_VS2008x86_IA32_CC_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86_IA32_VFRPP_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86_IA32_ASLCC_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86_IA32_ASLPP_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86_IA32_SLINK_PATH = DEF(VS2008x86_BIN)\lib.exe
+*_VS2008x86_IA32_DLINK_PATH = DEF(VS2008x86_BIN)\link.exe
+*_VS2008x86_IA32_ASLDLINK_PATH= DEF(VS2008x86_BIN)\link.exe
+*_VS2008x86_IA32_ASMLINK_PATH = DEF(WINDDK_BIN16)\link.exe
+*_VS2008x86_IA32_APP_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86_IA32_PP_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86_IA32_ASM_PATH = DEF(VS2008x86_BIN)\ml.exe
+
+ *_VS2008x86_IA32_MAKE_FLAGS = /nologo
+ DEBUG_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2008x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+ DEBUG_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2008x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
+ DEBUG_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2008x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ *_VS2008x86_IA32_ASMLINK_FLAGS= /nologo /tiny
+
+##################
+# X64 definitions
+##################
+*_VS2008x86_X64_*_DLL = DEF(VS2008x86_DLL)
+
+*_VS2008x86_X64_CC_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86_X64_PP_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86_X64_APP_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86_X64_VFRPP_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86_X64_ASLCC_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86_X64_ASLPP_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86_X64_ASM_PATH = DEF(VS2008x86_BINX64)\ml64.exe
+*_VS2008x86_X64_SLINK_PATH = DEF(VS2008x86_BINX64)\lib.exe
+*_VS2008x86_X64_DLINK_PATH = DEF(VS2008x86_BINX64)\link.exe
+*_VS2008x86_X64_ASLDLINK_PATH = DEF(VS2008x86_BINX64)\link.exe
+
+ DEBUG_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2008x86_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+ DEBUG_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2008x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
+ DEBUG_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+
+##################
+# IPF definitions
+##################
+*_VS2008x86_IPF_*_DLL = DEF(VS2008x86_DLL)
+
+*_VS2008x86_IPF_PP_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86_IPF_APP_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86_IPF_VFRPP_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86_IPF_ASLCC_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86_IPF_ASLPP_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86_IPF_CC_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86_IPF_ASM_PATH = DEF(VS2008x86_BIN64)\ias.exe
+*_VS2008x86_IPF_SLINK_PATH = DEF(VS2008x86_BIN64)\lib.exe
+*_VS2008x86_IPF_DLINK_PATH = DEF(VS2008x86_BIN64)\link.exe
+*_VS2008x86_IPF_ASLDLINK_PATH = DEF(VS2008x86_BIN64)\link.exe
+
+ DEBUG_VS2008x86_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi
+RELEASE_VS2008x86_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
+ DEBUG_VS2008x86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+RELEASE_VS2008x86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
+ DEBUG_VS2008x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2008x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+
+
+####################################################################################
+# VS2008x86xASL - Microsoft Visual Studio 2008 with Microsoft ASL
+# ASL - Microsoft ACPI Source Language Compiler (asl.exe)
+####################################################################################
+*_VS2008x86xASL_*_*_FAMILY = MSFT
+
+*_VS2008x86xASL_*_MAKE_PATH = DEF(VS2008x86_BIN)\nmake.exe
+*_VS2008xASL_*_MAKE_FLAG = /nologo
+*_VS2008xASL_*_RC_PATH = DEF(WINSDKx86_BIN)\rc.exe
+
+*_VS2008x86xASL_*_MAKE_FLAGS = /nologo
+*_VS2008x86xASL_*_SLINK_FLAGS = /NOLOGO /LTCG
+*_VS2008x86xASL_*_APP_FLAGS = /nologo /E /TC
+*_VS2008x86xASL_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2008x86xASL_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+
+##################
+# ASL definitions
+##################
+*_VS2008x86xASL_*_ASL_PATH = DEF(WIN_ASL_BIN)
+*_VS2008x86xASL_*_ASL_FLAGS = DEF(MS_ASL_FLAGS)
+*_VS2008x86xASL_*_ASL_OUTFLAGS = DEF(MS_ASL_OUTFLAGS)
+*_VS2008x86xASL_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
+*_VS2008x86xASL_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
+*_VS2008x86xASL_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2008x86xASL_IA32_*_DLL = DEF(VS2008x86_DLL)
+
+*_VS2008x86xASL_IA32_MAKE_PATH = DEF(VS2008x86_BIN)\nmake.exe
+*_VS2008x86xASL_IA32_CC_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86xASL_IA32_VFRPP_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86xASL_IA32_ASLCC_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86xASL_IA32_ASLPP_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86xASL_IA32_SLINK_PATH = DEF(VS2008x86_BIN)\lib.exe
+*_VS2008x86xASL_IA32_DLINK_PATH = DEF(VS2008x86_BIN)\link.exe
+*_VS2008x86xASL_IA32_ASLDLINK_PATH= DEF(VS2008x86_BIN)\link.exe
+*_VS2008x86xASL_IA32_ASMLINK_PATH = DEF(WINDDK_BIN16)\link.exe
+*_VS2008x86xASL_IA32_APP_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86xASL_IA32_PP_PATH = DEF(VS2008x86_BIN)\cl.exe
+*_VS2008x86xASL_IA32_ASM_PATH = DEF(VS2008x86_BIN)\ml.exe
+
+ *_VS2008x86xASL_IA32_MAKE_FLAGS = /nologo
+ DEBUG_VS2008x86xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2008x86xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs8192 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+ DEBUG_VS2008x86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2008x86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
+ DEBUG_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2008x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+ *_VS2008x86xASL_IA32_ASMLINK_FLAGS= /nologo /tiny
+
+##################
+# X64 definitions
+##################
+*_VS2008x86xASL_X64_*_DLL = DEF(VS2008x86_DLL)
+
+*_VS2008x86xASL_X64_CC_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86xASL_X64_PP_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86xASL_X64_APP_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86xASL_X64_VFRPP_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86xASL_X64_ASLCC_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86xASL_X64_ASLPP_PATH = DEF(VS2008x86_BINX64)\cl.exe
+*_VS2008x86xASL_X64_ASM_PATH = DEF(VS2008x86_BINX64)\ml64.exe
+*_VS2008x86xASL_X64_SLINK_PATH = DEF(VS2008x86_BINX64)\lib.exe
+*_VS2008x86xASL_X64_DLINK_PATH = DEF(VS2008x86_BINX64)\link.exe
+*_VS2008x86xASL_X64_ASLDLINK_PATH = DEF(VS2008x86_BINX64)\link.exe
+
+ DEBUG_VS2008x86xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2008x86xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs8192 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+ DEBUG_VS2008x86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2008x86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
+ DEBUG_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2008x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+
+##################
+# IPF definitions
+##################
+*_VS2008x86xASL_IPF_*_DLL = DEF(VS2008x86_DLL)
+
+*_VS2008x86xASL_IPF_PP_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86xASL_IPF_APP_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86xASL_IPF_VFRPP_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86xASL_IPF_ASLCC_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86xASL_IPF_ASLPP_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86xASL_IPF_CC_PATH = DEF(VS2008x86_BIN64)\cl.exe
+*_VS2008x86xASL_IPF_ASM_PATH = DEF(VS2008x86_BIN64)\ias.exe
+*_VS2008x86xASL_IPF_SLINK_PATH = DEF(VS2008x86_BIN64)\lib.exe
+*_VS2008x86xASL_IPF_DLINK_PATH = DEF(VS2008x86_BIN64)\link.exe
+*_VS2008x86xASL_IPF_ASLDLINK_PATH = DEF(VS2008x86_BIN64)\link.exe
+
+ DEBUG_VS2008x86xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi
+RELEASE_VS2008x86xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
+ DEBUG_VS2008x86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+RELEASE_VS2008x86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
+ DEBUG_VS2008x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2008x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4086 /MAP /ALIGN:32 /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+
+
####################################################################################
#
# Microsoft Device Driver Kit 3790.1830 (IA-32, X64, Itanium, with Link Time Code Generation)
@@ -1083,11 +1548,11 @@ RELEASE_DDK3790xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF
*_*_*_SYMRENAME_PATH = echo
*_*_*_SYMRENAME_FLAGS = Symbol renaming not needed for
-DEFINE GCC_ALL_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -c -include AutoGen.h
+DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -c -include AutoGen.h
DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2
DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address
DEFINE GCC_IPF_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency
-DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib -s --pie
+DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie
DEFINE GCC_IA32_X64_DLINK_COMMON = DEF(GCC_DLINK_FLAGS_COMMON) --gc-sections
DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
@@ -1104,9 +1569,9 @@ DEFINE GCC_IA32_RC_FLAGS = -I binary -O elf32-i386 -B i386 --re
DEFINE GCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386 --rename-section .data=.hii
DEFINE GCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 --rename-section .data=.hii
-DEFINE GCC44_ALL_CC_FLAGS = -fshort-wchar -fno-stack-protector -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -ffunction-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-stack-protector -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -D EFI32
-DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -Wno-address
+DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -Wno-address
DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections
DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable
DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
@@ -1169,9 +1634,11 @@ DEFINE GCC44_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
*_UNIXGCC_X64_ASLPP_PATH = DEF(UNIXGCC_X64_PETOOLS_PREFIX)gcc
*_UNIXGCC_X64_VFRPP_PATH = DEF(UNIXGCC_X64_PETOOLS_PREFIX)gcc
*_UNIXGCC_X64_RC_PATH = DEF(UNIXGCC_X64_PETOOLS_PREFIX)objcopy
+*_UNIXGCC_X64_OBJCOPY_PATH = DEF(UNIXGCC_X64_PETOOLS_PREFIX)objcopy
*_UNIXGCC_X64_CC_FLAGS = DEF(GCC_X64_CC_FLAGS)
*_UNIXGCC_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
+*_UNIXGCC_X64_OBJCOPY_FLAGS =
##################
# IPF definitions
@@ -1228,15 +1695,14 @@ DEFINE GCC44_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
*_GCC44_IA32_ASLCC_PATH = DEF(GCC44_IA32_PREFIX)gcc
*_GCC44_IA32_ASLPP_PATH = DEF(GCC44_IA32_PREFIX)gcc
*_GCC44_IA32_RC_PATH = DEF(GCC44_IA32_PREFIX)objcopy
-*_GCC44_IA32_OBJCOPY_PATH = DEF(GCC44_IA32_PREFIX)objcopy
*_GCC44_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32
*_GCC44_IA32_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_ASLDLINK_FLAGS) -m elf_i386
*_GCC44_IA32_ASM_FLAGS = DEF(GCC44_ASM_FLAGS) -m32 --32 -march=i386
-*_GCC44_IA32_CC_FLAGS = DEF(GCC44_IA32_CC_FLAGS)
+*_GCC44_IA32_CC_FLAGS = DEF(GCC44_IA32_CC_FLAGS) -Os
*_GCC44_IA32_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -m elf_i386 --oformat=elf32-i386
*_GCC44_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
-*_GCC44_IA32_OBJCOPY_FLAGS =
+
####################################################################################
#
@@ -2250,17 +2716,17 @@ RELEASE_XCODE32_X64_ASM_FLAGS = -arch x86_64
RELEASE_XCODE32_X64_CC_FLAGS = -arch x86_64 -Oz -combine -mms-bitfields -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-address -fomit-frame-pointer -static -c -include AutoGen.h -fno-stack-protector
##################
-# ARM definitions - still a work in progress (Assumes iPhone SDK installed)
+# ARM definitions - (Assumes iPhone SDK installed on Snow Leopard)
##################
-*_XCODE32_ARM_ARCHCC_FLAGS = -arch armv6 -march=armv6 -mthumb
-*_XCODE32_ARM_ARCHASM_FLAGS = -arch armv6
-*_XCODE32_ARM_ARCHDLINK_FLAGS = -arch armv6
+*_XCODE32_ARM_ARCHCC_FLAGS = -arch armv7 -march=armv7 -mthumb
+*_XCODE32_ARM_ARCHASM_FLAGS = -arch armv7
+*_XCODE32_ARM_ARCHDLINK_FLAGS = -arch armv7
*_XCODE32_ARM_PLATFORM_FLAGS =
*_XCODE32_ARM_CC_PATH = DEF(IPHONE_TOOLS)/usr/bin/gcc
*_XCODE32_ARM_SLINK_PATH = DEF(IPHONE_TOOLS)/usr/bin/libtool
-*_XCODE32_ARM_DLINK_PATH = DEF(IPHONE_TOOLS)/usr/bin/ld
+*_XCODE32_ARM_DLINK_PATH = ld
*_XCODE32_ARM_ASM_PATH = DEF(IPHONE_TOOLS)/usr/bin/as
*_XCODE32_ARM_PP_PATH = DEF(IPHONE_TOOLS)/usr/bin/gcc
*_XCODE32_ARM_VFRPP_PATH = DEF(IPHONE_TOOLS)/usr/bin/gcc
@@ -2291,8 +2757,8 @@ RELEASE_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-inter
#
# Use default values, or override in DSC file
#
-*_RVCT31_ARM_ARCHCC_FLAGS = --cpu Cortex-A8 --thumb
-*_RVCT31_ARM_ARCHASM_FLAGS = --cpu Cortex-A8
+*_RVCT31_ARM_ARCHCC_FLAGS = --thumb --cpu 7-A
+*_RVCT31_ARM_ARCHASM_FLAGS = --cpu 7-A
*_RVCT31_ARM_ARCHDLINK_FLAGS =
*_RVCT31_ARM_PLATFORM_FLAGS =
@@ -2341,8 +2807,8 @@ RELEASE_RVCT31_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -Ospac
#
# Use default values, or override in DSC file
#
-*_RVCT31CYGWIN_ARM_ARCHCC_FLAGS = --cpu Cortex-A8 --thumb
-*_RVCT31CYGWIN_ARM_ARCHASM_FLAGS = --cpu Cortex-A8
+*_RVCT31CYGWIN_ARM_ARCHCC_FLAGS = --thumb --cpu 7-A
+*_RVCT31CYGWIN_ARM_ARCHASM_FLAGS = --cpu 7-A
*_RVCT31CYGWIN_ARM_ARCHDLINK_FLAGS =
*_RVCT31CYGWIN_ARM_PLATFORM_FLAGS =
diff --git a/BaseTools/Source/C/BootSectImage/bootsectimage.c b/BaseTools/Source/C/BootSectImage/bootsectimage.c
index d8dc8907a5..7386bcf2e2 100644
--- a/BaseTools/Source/C/BootSectImage/bootsectimage.c
+++ b/BaseTools/Source/C/BootSectImage/bootsectimage.c
@@ -4,7 +4,7 @@ Abstract:
Patch the BPB information in boot sector image file.
Patch the MBR code in MBR image file.
-Copyright 2006 - 2008, Intel Corporation
+Copyright 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -56,7 +56,7 @@ Returns:
--*/
{
printf ("%s v%d.%d - Utility to break a file into two pieces at the specified offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
- printf ("Copyright (c) 1999-2007 Intel Corporation. All rights reserved.\n");
+ printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");
}
void
diff --git a/BaseTools/Source/C/Common/EfiUtilityMsgs.c b/BaseTools/Source/C/Common/EfiUtilityMsgs.c
index 68cf02469e..0e7608d1cf 100644
--- a/BaseTools/Source/C/Common/EfiUtilityMsgs.c
+++ b/BaseTools/Source/C/Common/EfiUtilityMsgs.c
@@ -46,18 +46,6 @@ STATIC INT8 mPrintLimitsSet = 0;
STATIC
VOID
-PrintMessage (
- CHAR8 *Type,
- CHAR8 *FileName,
- UINT32 LineNumber,
- UINT32 MessageCode,
- CHAR8 *Text,
- CHAR8 *MsgFmt,
- va_list List
- );
-
-STATIC
-VOID
PrintLimitExceeded (
VOID
);
@@ -151,12 +139,6 @@ Notes:
va_start (List, MsgFmt);
PrintMessage ("ERROR", FileName, LineNumber, MessageCode, Text, MsgFmt, List);
va_end (List);
- //
- // Set status accordingly
- //
- if (mStatus < STATUS_ERROR) {
- mStatus = STATUS_ERROR;
- }
}
VOID
@@ -211,12 +193,6 @@ Returns:
va_start (List, MsgFmt);
PrintMessage ("ERROR", mSourceFileName, mSourceFileLineNum, MessageCode, Text, MsgFmt, List);
va_end (List);
- //
- // Set status accordingly
- //
- if (mStatus < STATUS_ERROR) {
- mStatus = STATUS_ERROR;
- }
}
VOID
@@ -396,7 +372,6 @@ Returns:
va_end (List);
}
-STATIC
VOID
PrintMessage (
CHAR8 *Type,
@@ -517,6 +492,15 @@ Notes:
sprintf (Line, "%s", mUtilityName);
}
}
+
+ if (strcmp (Type, "ERROR") == 0) {
+ //
+ // Set status accordingly for ERROR information.
+ //
+ if (mStatus < STATUS_ERROR) {
+ mStatus = STATUS_ERROR;
+ }
+ }
}
//
@@ -545,6 +529,7 @@ Notes:
vsprintf (Line2, MsgFmt, List);
fprintf (stdout, " %s\n", Line2);
}
+
}
STATIC
diff --git a/BaseTools/Source/C/Common/EfiUtilityMsgs.h b/BaseTools/Source/C/Common/EfiUtilityMsgs.h
index 40e6e170ae..8986a592d7 100644
--- a/BaseTools/Source/C/Common/EfiUtilityMsgs.h
+++ b/BaseTools/Source/C/Common/EfiUtilityMsgs.h
@@ -71,6 +71,17 @@ SetUtilityName (
;
VOID
+PrintMessage (
+ CHAR8 *Type,
+ CHAR8 *FileName,
+ UINT32 LineNumber,
+ UINT32 MessageCode,
+ CHAR8 *Text,
+ CHAR8 *MsgFmt,
+ va_list List
+ );
+
+VOID
Error (
CHAR8 *FileName,
UINT32 LineNumber,
diff --git a/BaseTools/Source/C/Common/ParseInf.c b/BaseTools/Source/C/Common/ParseInf.c
index cd10da9b2d..2ce25be86f 100644
--- a/BaseTools/Source/C/Common/ParseInf.c
+++ b/BaseTools/Source/C/Common/ParseInf.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2008, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -484,13 +484,14 @@ Returns:
--*/
{
UINT8 Index;
- UINT64 HexNumber;
+ UINT64 Value;
CHAR8 CurrentChar;
//
// Initialize the result
//
- HexNumber = 0;
+ Value = 0;
+ Index = 0;
//
// Check input paramter
@@ -498,50 +499,65 @@ Returns:
if (AsciiString == NULL || ReturnValue == NULL) {
return EFI_INVALID_PARAMETER;
}
+ while (AsciiString[Index] == ' ') {
+ Index ++;
+ }
+
//
// Add each character to the result
//
- if (IsHex || (AsciiString[0] == '0' && (AsciiString[1] == 'x' || AsciiString[1] == 'X'))) {
- //
- // Verify string is a hex number
- //
- for (Index = 2; Index < strlen (AsciiString); Index++) {
- if (isxdigit ((int)AsciiString[Index]) == 0) {
- return EFI_ABORTED;
- }
- }
+ if (IsHex || (AsciiString[Index] == '0' && (AsciiString[Index + 1] == 'x' || AsciiString[Index + 1] == 'X'))) {
//
// Convert the hex string.
//
- for (Index = 2; AsciiString[Index] != '\0'; Index++) {
+ for (Index = Index + 2; AsciiString[Index] != '\0'; Index++) {
CurrentChar = AsciiString[Index];
- HexNumber *= 16;
+ if (CurrentChar == ' ') {
+ break;
+ }
+ //
+ // Verify Hex string
+ //
+ if (isxdigit ((int)CurrentChar) == 0) {
+ return EFI_ABORTED;
+ }
+ //
+ // Add hex value
+ //
+ Value *= 16;
if (CurrentChar >= '0' && CurrentChar <= '9') {
- HexNumber += CurrentChar - '0';
+ Value += CurrentChar - '0';
} else if (CurrentChar >= 'a' && CurrentChar <= 'f') {
- HexNumber += CurrentChar - 'a' + 10;
+ Value += CurrentChar - 'a' + 10;
} else if (CurrentChar >= 'A' && CurrentChar <= 'F') {
- HexNumber += CurrentChar - 'A' + 10;
- } else {
- //
- // Unrecognized character
- //
- return EFI_ABORTED;
+ Value += CurrentChar - 'A' + 10;
}
}
- *ReturnValue = HexNumber;
+ *ReturnValue = Value;
} else {
//
- // Verify string is a number
+ // Convert dec string is a number
//
- for (Index = 0; Index < strlen (AsciiString); Index++) {
- if (isdigit ((int)AsciiString[Index]) == 0) {
+ for (; Index < strlen (AsciiString); Index++) {
+ CurrentChar = AsciiString[Index];
+ if (CurrentChar == ' ') {
+ break;
+ }
+ //
+ // Verify Dec string
+ //
+ if (isdigit ((int)CurrentChar) == 0) {
return EFI_ABORTED;
}
+ //
+ // Add dec value
+ //
+ Value = Value * 10;
+ Value += CurrentChar - '0';
}
- *ReturnValue = atol (AsciiString);
+ *ReturnValue = Value;
}
return EFI_SUCCESS;
diff --git a/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c b/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c
index c2c8111d31..7a3b4a2234 100644
--- a/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c
+++ b/BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c
@@ -1,6 +1,6 @@
/** @file
-Copyright 2006 - 2008, Intel Corporation
+Copyright 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -84,7 +84,7 @@ Returns:
--*/
{
printf ("%s v%d.%d -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
- printf ("Copyright (c) 1999-2007 Intel Corporation. All rights reserved.\n");
+ printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");
}
VOID
diff --git a/BaseTools/Source/C/EfiRom/EfiRom.c b/BaseTools/Source/C/EfiRom/EfiRom.c
index d43520ae47..981786c705 100644
--- a/BaseTools/Source/C/EfiRom/EfiRom.c
+++ b/BaseTools/Source/C/EfiRom/EfiRom.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 1999-2008 Intel Corporation. All rights reserved
+Copyright (c) 1999-2010 Intel Corporation. All rights reserved
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@@ -1205,7 +1205,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
diff --git a/BaseTools/Source/C/GenBootSector/GenBootSector.c b/BaseTools/Source/C/GenBootSector/GenBootSector.c
index 05839bb736..e4a79be69c 100644
--- a/BaseTools/Source/C/GenBootSector/GenBootSector.c
+++ b/BaseTools/Source/C/GenBootSector/GenBootSector.c
@@ -1,6 +1,6 @@
/** @file
-Copyright 2006 - 2008, Intel Corporation
+Copyright 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -542,7 +542,7 @@ Returns:
--*/
{
printf ("%s v%d.%d -Utility to retrieve and update the boot sector or MBR.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
- printf ("Copyright (c) 2009 Intel Corporation. All rights reserved.\n");
+ printf ("Copyright (c) 2009 - 2010 Intel Corporation. All rights reserved.\n");
}
VOID
diff --git a/BaseTools/Source/C/GenCrc32/GenCrc32.c b/BaseTools/Source/C/GenCrc32/GenCrc32.c
index a94f9202fe..34d1a7a344 100644
--- a/BaseTools/Source/C/GenCrc32/GenCrc32.c
+++ b/BaseTools/Source/C/GenCrc32/GenCrc32.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007 - 2008, Intel Corporation
+Copyright (c) 2007 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -86,7 +86,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c
index 324490a707..cdaba0c8d1 100644
--- a/BaseTools/Source/C/GenFfs/GenFfs.c
+++ b/BaseTools/Source/C/GenFfs/GenFfs.c
@@ -1,6 +1,6 @@
/**
-Copyright (c) 2004-2008, Intel Corporation
+Copyright (c) 2004-2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -119,7 +119,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
@@ -287,6 +287,8 @@ Returns:
EFI_COMMON_SECTION_HEADER TempSectHeader;
EFI_TE_IMAGE_HEADER TeHeader;
UINT32 TeOffset;
+ EFI_GUID_DEFINED_SECTION GuidSectHeader;
+ UINT32 HeaderSize;
Size = 0;
Offset = 0;
@@ -330,6 +332,7 @@ Returns:
// Check this section is Te/Pe section, and Calculate the numbers of Te/Pe section.
//
TeOffset = 0;
+ HeaderSize = sizeof (EFI_COMMON_SECTION_HEADER);
fread (&TempSectHeader, 1, sizeof (TempSectHeader), InFile);
if (TempSectHeader.Type == EFI_SECTION_TE) {
(*PESectionNum) ++;
@@ -339,8 +342,14 @@ Returns:
}
} else if (TempSectHeader.Type == EFI_SECTION_PE32) {
(*PESectionNum) ++;
+ } else if (TempSectHeader.Type == EFI_SECTION_GUID_DEFINED) {
+ fseek (InFile, 0, SEEK_SET);
+ fread (&GuidSectHeader, 1, sizeof (GuidSectHeader), InFile);
+ if ((GuidSectHeader.Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) == 0) {
+ HeaderSize = GuidSectHeader.DataOffset;
+ }
+ (*PESectionNum) ++;
} else if (TempSectHeader.Type == EFI_SECTION_COMPRESSION ||
- TempSectHeader.Type == EFI_SECTION_GUID_DEFINED ||
TempSectHeader.Type == EFI_SECTION_FIRMWARE_VOLUME_IMAGE) {
//
// for the encapsulated section, assume it contains Pe/Te section
@@ -358,17 +367,18 @@ Returns:
TeOffset = InputFileAlign [Index] - (TeOffset % InputFileAlign [Index]);
TeOffset = TeOffset % InputFileAlign [Index];
}
-
+
//
// make sure section data meet its alignment requirement by adding one raw pad section.
// But the different sections have the different section header. Necessary or not?
// Based on section type to adjust offset? Todo
//
- if ((InputFileAlign [Index] != 0) && (((Size + sizeof (EFI_COMMON_SECTION_HEADER) + TeOffset) % InputFileAlign [Index]) != 0)) {
- Offset = (Size + 2 * sizeof (EFI_COMMON_SECTION_HEADER) + TeOffset + InputFileAlign [Index] - 1) & ~(InputFileAlign [Index] - 1);
- Offset = Offset - Size - sizeof (EFI_COMMON_SECTION_HEADER) - TeOffset;
+ if ((InputFileAlign [Index] != 0) && (((Size + HeaderSize + TeOffset) % InputFileAlign [Index]) != 0)) {
+ Offset = (Size + sizeof (EFI_COMMON_SECTION_HEADER) + HeaderSize + TeOffset + InputFileAlign [Index] - 1) & ~(InputFileAlign [Index] - 1);
+ Offset = Offset - Size - HeaderSize - TeOffset;
if (FileBuffer != NULL && ((Size + Offset) < *BufferLength)) {
+ memset (FileBuffer + Size, 0, Offset);
SectHeader = (EFI_COMMON_SECTION_HEADER *) (FileBuffer + Size);
SectHeader->Type = EFI_SECTION_RAW;
SectHeader->Size[0] = (UINT8) (Offset & 0xff);
diff --git a/BaseTools/Source/C/GenFv/GenFv.c b/BaseTools/Source/C/GenFv/GenFv.c
index 135c9ed23f..5b7f72e19e 100644
--- a/BaseTools/Source/C/GenFv/GenFv.c
+++ b/BaseTools/Source/C/GenFv/GenFv.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007 - 2009, Intel Corporation
+Copyright (c) 2007 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -40,7 +40,7 @@ Abstract:
//
#define UTILITY_MAJOR_VERSION 0
#define UTILITY_MINOR_VERSION 1
-#define GENFV_UPDATE_TIME " updated on 2008/11/21"
+#define GENFV_UPDATE_TIME " updated on 2010/2/1"
EFI_GUID mEfiFirmwareFileSystem2Guid = EFI_FIRMWARE_FILE_SYSTEM2_GUID;
@@ -97,7 +97,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
@@ -126,11 +126,8 @@ Returns:
run in Flash. It supports DEC or HEX digital format.\n\
If it is set to zero, no rebase action will be taken\n");
fprintf (stdout, " -a AddressFile, --addrfile AddressFile\n\
- AddressFile is one file used to record boot driver base\n\
- address and runtime driver base address. And this tool\n\
- will update these two addresses after it relocates all\n\
- boot drivers and runtime drivers in this fv iamge to\n\
- the preferred loaded memory address.\n");
+ AddressFile is one file used to record the child\n\
+ FV base address when current FV base address is set.\n");
fprintf (stdout, " -m logfile, --map logfile\n\
Logfile is the output fv map file name. if it is not\n\
given, the FvName.map will be the default map file name\n");
@@ -194,10 +191,8 @@ Returns:
CHAR8 *InfFileImage;
UINT32 InfFileSize;
CHAR8 *OutFileName;
- CHAR8 ValueString[_MAX_PATH];
BOOLEAN CapsuleFlag;
BOOLEAN DumpCapsule;
- MEMORY_FILE AddrMemoryFile;
FILE *FpFile;
EFI_CAPSULE_HEADER *CapsuleHeader;
UINT64 LogLevel, TempNumber;
@@ -546,62 +541,6 @@ Returns:
}
//
- // Read boot and runtime address from address file
- //
- if (AddrFileName != NULL) {
- VerboseMsg ("the input address file name is %s", AddrFileName);
- Status = GetFileImage (AddrFileName, &InfFileImage, &InfFileSize);
- if (EFI_ERROR (Status)) {
- return STATUS_ERROR;
- }
-
- AddrMemoryFile.FileImage = InfFileImage;
- AddrMemoryFile.CurrentFilePointer = InfFileImage;
- AddrMemoryFile.Eof = InfFileImage + InfFileSize;
-
- //
- // Read the boot driver base address for this FV image
- //
- Status = FindToken (&AddrMemoryFile, OPTIONS_SECTION_STRING, EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING, 0, ValueString);
- if (Status == EFI_SUCCESS) {
- //
- // Get the base address
- //
- Status = AsciiStringToUint64 (ValueString, FALSE, &TempNumber);
- if (EFI_ERROR (Status)) {
- Error (NULL, 0, 2000, "Invalid parameter", "%s = %s", EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING, ValueString);
- return STATUS_ERROR;
- }
- mFvDataInfo.BootBaseAddress = TempNumber;
- DebugMsg (NULL, 0, 9, "Boot driver base address", "%s = %s", EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING, ValueString);
- }
-
- //
- // Read the FV runtime driver base address
- //
- Status = FindToken (&AddrMemoryFile, OPTIONS_SECTION_STRING, EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING, 0, ValueString);
- if (Status == EFI_SUCCESS) {
- //
- // Get the base address
- //
- Status = AsciiStringToUint64 (ValueString, FALSE, &TempNumber);
- if (EFI_ERROR (Status)) {
- Error (NULL, 0, 2000, "Invalid parameter", "%s = %s", EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING, ValueString);
- return STATUS_ERROR;
- }
- mFvDataInfo.RuntimeBaseAddress = TempNumber;
- DebugMsg (NULL, 0, 9, "Runtime driver base address", "%s = %s", EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING, ValueString);
- }
-
- //
- // free the allocated memory space for addr file.
- //
- free (InfFileImage);
- InfFileImage = NULL;
- InfFileSize = 0;
- }
-
- //
// Read the INF file image
//
if (InfFileName != NULL) {
@@ -683,32 +622,22 @@ Returns:
//
// update boot driver address and runtime driver address in address file
//
- if (Status == EFI_SUCCESS && AddrFileName != NULL) {
+ if (Status == EFI_SUCCESS && AddrFileName != NULL && mFvBaseAddressNumber > 0) {
FpFile = fopen (AddrFileName, "w");
if (FpFile == NULL) {
Error (NULL, 0, 0001, "Error opening file", AddrFileName);
return STATUS_ERROR;
}
- fprintf (FpFile, OPTIONS_SECTION_STRING);
+ fprintf (FpFile, FV_BASE_ADDRESS_STRING);
fprintf (FpFile, "\n");
- if (mFvDataInfo.BootBaseAddress != 0) {
- fprintf (FpFile, EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING);
- fprintf (
- FpFile,
- " = 0x%llx\n",
- (unsigned long long)mFvDataInfo.BootBaseAddress
- );
- DebugMsg (NULL, 0, 9, "Updated boot driver base address", "%s = 0x%llx", EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING, (unsigned long long) mFvDataInfo.BootBaseAddress);
- }
- if (mFvDataInfo.RuntimeBaseAddress != 0) {
- fprintf (FpFile, EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING);
+ for (Index = 0; Index < mFvBaseAddressNumber; Index ++) {
fprintf (
FpFile,
- " = 0x%llx\n",
- (unsigned long long)mFvDataInfo.RuntimeBaseAddress
+ "0x%llx\n",
+ (unsigned long long)mFvBaseAddress[Index]
);
- DebugMsg (NULL, 0, 9, "Updated runtime driver base address", "%s = 0x%llx", EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING, (unsigned long long) mFvDataInfo.RuntimeBaseAddress);
}
+ fflush (FpFile);
fclose (FpFile);
}
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index d17a2ff1a8..00d008573a 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2009, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -159,6 +159,9 @@ UINT8 m64kRecoveryStartupApDataArray[SIZEOF_ST
FV_INFO mFvDataInfo;
CAP_INFO mCapDataInfo;
+EFI_PHYSICAL_ADDRESS mFvBaseAddress[0x10];
+UINT32 mFvBaseAddressNumber = 0;
+
EFI_STATUS
ParseFvInf (
IN MEMORY_FILE *InfFile,
@@ -716,6 +719,11 @@ Returns:
EFI_TE_IMAGE_HEADER *TEImageHeader;
EFI_IMAGE_SECTION_HEADER *SectionHeader;
unsigned long long TempLongAddress;
+ UINT32 TextVirtualAddress;
+ UINT32 DataVirtualAddress;
+ EFI_PHYSICAL_ADDRESS LinkTimeBaseAddress;
+
+
//
// Init local variable
//
@@ -789,29 +797,35 @@ Returns:
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (TEImageHeader + 1);
Index = TEImageHeader->NumberOfSections;
}
-
+
//
// module information output
//
if (ImageBaseAddress == 0) {
fprintf (FvMapFile, "%s (dummy) (", KeyWord);
- fprintf (FvMapFile, "BaseAddress=%08llx, ", (unsigned long long) ImageBaseAddress);
+ fprintf (FvMapFile, "BaseAddress=%010llx, ", (unsigned long long) ImageBaseAddress);
} else {
- fprintf (FvMapFile, "%s (", KeyWord);
- fprintf (FvMapFile, "BaseAddress=%08llx, ", (unsigned long long) (ImageBaseAddress + Offset));
+ fprintf (FvMapFile, "%s (Fixed Flash Address, ", KeyWord);
+ fprintf (FvMapFile, "BaseAddress=0x%010llx, ", (unsigned long long) (ImageBaseAddress + Offset));
}
- fprintf (FvMapFile, "EntryPoint=%08llx, ", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));
- fprintf (FvMapFile, "GUID=%s", FileGuidName);
+ fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));
fprintf (FvMapFile, ")\n");
+ fprintf (FvMapFile, "(GUID=%s", FileGuidName);
+ TextVirtualAddress = 0;
+ DataVirtualAddress = 0;
for (; Index > 0; Index --, SectionHeader ++) {
- if (stricmp ((CHAR8 *)SectionHeader->Name, ".text") == 0) {
- fprintf (FvMapFile, ".textbaseaddress=%08llx ", (unsigned long long) (ImageBaseAddress + SectionHeader->VirtualAddress));
+ if (stricmp ((CHAR8 *)SectionHeader->Name, ".text") == 0) {
+ TextVirtualAddress = SectionHeader->VirtualAddress;
} else if (stricmp ((CHAR8 *)SectionHeader->Name, ".data") == 0) {
- fprintf (FvMapFile, ".databaseaddress=%08llx ", (unsigned long long) (ImageBaseAddress + SectionHeader->VirtualAddress));
+ DataVirtualAddress = SectionHeader->VirtualAddress;
+ } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".sdata") == 0) {
+ DataVirtualAddress = SectionHeader->VirtualAddress;
}
}
- fprintf (FvMapFile, "\n\n");
+ fprintf (FvMapFile, " .textbaseaddress=0x%010llx", (unsigned long long) (ImageBaseAddress + TextVirtualAddress));
+ fprintf (FvMapFile, " .databaseaddress=0x%010llx", (unsigned long long) (ImageBaseAddress + DataVirtualAddress));
+ fprintf (FvMapFile, ")\n\n");
//
// Open PeMapFile
@@ -826,6 +840,7 @@ Returns:
//
// Output Functions information into Fv Map file
//
+ LinkTimeBaseAddress = 0;
while (fgets (Line, MAX_LINE_LEN, PeMapFile) != NULL) {
//
// Skip blank line
@@ -851,6 +866,9 @@ Returns:
//
FunctionType = 2;
fgets (Line, MAX_LINE_LEN, PeMapFile);
+ } else if (stricmp (KeyWord, "Preferred") ==0) {
+ sscanf (Line + strlen (" Preferred load address is"), "%llx", &TempLongAddress);
+ LinkTimeBaseAddress = (UINT64) TempLongAddress;
}
continue;
}
@@ -861,24 +879,14 @@ Returns:
sscanf (Line, "%s %s %llx %s", KeyWord, FunctionName, &TempLongAddress, FunctionTypeName);
FunctionAddress = (UINT64) TempLongAddress;
if (FunctionTypeName [1] == '\0' && (FunctionTypeName [0] == 'f' || FunctionTypeName [0] == 'F')) {
- fprintf (FvMapFile, " %016llx ", (unsigned long long) (ImageBaseAddress + FunctionAddress));
- fprintf (FvMapFile, "(%08llx) F ", (unsigned long long) (FunctionAddress - Offset));
- fprintf (FvMapFile, "%s\n", FunctionName);
- } else {
- fprintf (FvMapFile, " %016llx ", (unsigned long long) (ImageBaseAddress + FunctionAddress));
- fprintf (FvMapFile, "(%08llx) ", (unsigned long long) (FunctionAddress - Offset));
+ fprintf (FvMapFile, " 0x%010llx ", (unsigned long long) (ImageBaseAddress + FunctionAddress - LinkTimeBaseAddress));
fprintf (FvMapFile, "%s\n", FunctionName);
}
} else if (FunctionType == 2) {
sscanf (Line, "%s %s %llx %s", KeyWord, FunctionName, &TempLongAddress, FunctionTypeName);
FunctionAddress = (UINT64) TempLongAddress;
if (FunctionTypeName [1] == '\0' && (FunctionTypeName [0] == 'f' || FunctionTypeName [0] == 'F')) {
- fprintf (FvMapFile, " %016llx ", (unsigned long long) (ImageBaseAddress + FunctionAddress));
- fprintf (FvMapFile, "(%08llx) FS ", (unsigned long long) (FunctionAddress - Offset));
- fprintf (FvMapFile, "%s\n", FunctionName);
- } else {
- fprintf (FvMapFile, " %016llx ", (unsigned long long) (ImageBaseAddress + FunctionAddress));
- fprintf (FvMapFile, "(%08llx) ", (unsigned long long) (FunctionAddress - Offset));
+ fprintf (FvMapFile, " 0x%010llx ", (unsigned long long) (ImageBaseAddress + FunctionAddress - LinkTimeBaseAddress));
fprintf (FvMapFile, "%s\n", FunctionName);
}
}
@@ -898,7 +906,8 @@ AddFile (
IN FV_INFO *FvInfo,
IN UINTN Index,
IN OUT EFI_FFS_FILE_HEADER **VtfFileImage,
- IN FILE *FvMapFile
+ IN FILE *FvMapFile,
+ IN FILE *FvReportFile
)
/*++
@@ -916,6 +925,7 @@ Arguments:
VtfFileImage A pointer to the VTF file within the FvImage. If this is equal
to the end of the FvImage then no VTF previously found.
FvMapFile Pointer to FvMap File
+ FvReportFile Pointer to FvReport File
Returns:
@@ -933,6 +943,7 @@ Returns:
UINT32 CurrentFileAlignment;
EFI_STATUS Status;
UINTN Index1;
+ UINT8 FileGuidString[PRINTED_GUID_BUFFER_SIZE];
Index1 = 0;
//
@@ -1071,6 +1082,10 @@ Returns:
// copy VTF File
//
memcpy (*VtfFileImage, FileBuffer, FileSize);
+
+ PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE);
+ fprintf (FvReportFile, "0x%08X %s\n", (unsigned)(UINTN) (((UINT8 *)*VtfFileImage) - (UINTN)FvImage->FileImage), FileGuidString);
+
free (FileBuffer);
DebugMsg (NULL, 0, 9, "Add VTF FFS file in FV image", NULL);
return EFI_SUCCESS;
@@ -1106,6 +1121,8 @@ Returns:
// Copy the file
//
memcpy (FvImage->CurrentFilePointer, FileBuffer, FileSize);
+ PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE);
+ fprintf (FvReportFile, "0x%08X %s\n", (unsigned) (FvImage->CurrentFilePointer - FvImage->FileImage), FileGuidString);
FvImage->CurrentFilePointer += FileSize;
} else {
Error (NULL, 0, 4002, "Resource", "FV space is full, cannot add file %s.", FvInfo->FvFiles[Index]);
@@ -1967,10 +1984,13 @@ Returns:
EFI_FIRMWARE_VOLUME_EXT_HEADER *FvExtHeader;
FILE *FvExtHeaderFile;
UINTN FileSize;
+ CHAR8 FvReportName[_MAX_PATH];
+ FILE *FvReportFile;
FvBufferHeader = NULL;
FvFile = NULL;
FvMapFile = NULL;
+ FvReportFile = NULL;
if (InfFileImage != NULL) {
//
@@ -2110,6 +2130,12 @@ Returns:
VerboseMsg ("FV Map file name is %s", FvMapName);
//
+ // FvReport file to log the FV information in one Fvimage
+ //
+ strcpy (FvReportName, FvFileName);
+ strcat (FvReportName, ".txt");
+
+ //
// Calculate the FV size and Update Fv Size based on the actual FFS files.
// And Update mFvDataInfo data.
//
@@ -2225,6 +2251,14 @@ Returns:
}
//
+ // Open FvReport file
+ //
+ FvReportFile = fopen(FvReportName, "w");
+ if (FvReportFile == NULL) {
+ Error (NULL, 0, 0001, "Error opening file", FvReportName);
+ return EFI_ABORTED;
+ }
+ //
// record FV size information into FvMap file.
//
if (mFvTotalSize != 0) {
@@ -2241,6 +2275,12 @@ Returns:
}
//
+ // record FV size information to FvReportFile.
+ //
+ fprintf (FvReportFile, "%s = 0x%x\n", EFI_FV_TOTAL_SIZE_STRING, (unsigned) mFvTotalSize);
+ fprintf (FvReportFile, "%s = 0x%x\n", EFI_FV_TAKEN_SIZE_STRING, (unsigned) mFvTakenSize);
+
+ //
// Add PI FV extension header
//
if (FvExtHeader != NULL) {
@@ -2263,7 +2303,7 @@ Returns:
//
// Add the file
//
- Status = AddFile (&FvImageMemoryFile, &mFvDataInfo, Index, &VtfFileImage, FvMapFile);
+ Status = AddFile (&FvImageMemoryFile, &mFvDataInfo, Index, &VtfFileImage, FvMapFile, FvReportFile);
//
// Exit if error detected while adding the file
@@ -2358,13 +2398,19 @@ Finish:
}
if (FvFile != NULL) {
+ fflush (FvFile);
fclose (FvFile);
}
if (FvMapFile != NULL) {
+ fflush (FvMapFile);
fclose (FvMapFile);
}
+ if (FvReportFile != NULL) {
+ fflush (FvReportFile);
+ fclose (FvReportFile);
+ }
return Status;
}
@@ -2653,6 +2699,54 @@ Returns:
}
EFI_STATUS
+GetChildFvFromFfs (
+ IN FV_INFO *FvInfo,
+ IN EFI_FFS_FILE_HEADER *FfsFile,
+ IN UINTN XipOffset
+ )
+/*++
+
+Routine Description:
+
+ This function gets all child FvImages in the input FfsFile, and records
+ their base address to the parent image.
+
+Arguments:
+ FvInfo A pointer to FV_INFO struture.
+ FfsFile A pointer to Ffs file image that may contain FvImage.
+ XipOffset The offset address to the parent FvImage base.
+
+Returns:
+
+ EFI_SUCCESS Base address of child Fv image is recorded.
+--*/
+{
+ EFI_STATUS Status;
+ UINTN Index;
+ EFI_FILE_SECTION_POINTER SubFvSection;
+ EFI_FIRMWARE_VOLUME_HEADER *SubFvImageHeader;
+ EFI_PHYSICAL_ADDRESS SubFvBaseAddress;
+
+ for (Index = 1;; Index++) {
+ //
+ // Find FV section
+ //
+ Status = GetSectionByType (FfsFile, EFI_SECTION_FIRMWARE_VOLUME_IMAGE, Index, &SubFvSection);
+ if (EFI_ERROR (Status)) {
+ break;
+ }
+ SubFvImageHeader = (EFI_FIRMWARE_VOLUME_HEADER *) ((UINT8 *) SubFvSection.FVImageSection + sizeof (EFI_FIRMWARE_VOLUME_IMAGE_SECTION));
+ //
+ // Rebase on Flash
+ //
+ SubFvBaseAddress = FvInfo->BaseAddress + (UINTN) SubFvImageHeader - (UINTN) FfsFile + XipOffset;
+ mFvBaseAddress[mFvBaseAddressNumber ++ ] = SubFvBaseAddress;
+ }
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
FfsRebase (
IN OUT FV_INFO *FvInfo,
IN CHAR8 *FileName,
@@ -2696,7 +2790,6 @@ Returns:
EFI_FFS_FILE_STATE SavedState;
EFI_IMAGE_OPTIONAL_HEADER_UNION *ImgHdr;
EFI_TE_IMAGE_HEADER *TEImageHeader;
- UINT8 Flags;
UINT8 *MemoryImagePointer;
EFI_IMAGE_SECTION_HEADER *SectionHeader;
CHAR8 PeFileName [_MAX_PATH];
@@ -2717,26 +2810,12 @@ Returns:
PeFileBuffer = NULL;
//
- // Check XipAddress, BootAddress and RuntimeAddress
+ // Don't need to relocate image when BaseAddress is not set.
//
- Flags = 0;
- XipBase = 0;
- if (FvInfo->BaseAddress != 0) {
- Flags |= REBASE_XIP_FILE;
- XipBase = FvInfo->BaseAddress + XipOffset;
- }
- if (FvInfo->BootBaseAddress != 0) {
- Flags |= REBASE_BOOTTIME_FILE;
- }
- if (FvInfo->RuntimeBaseAddress != 0) {
- Flags |= REBASE_RUNTIME_FILE;
+ if (FvInfo->BaseAddress == 0) {
+ return EFI_SUCCESS;
}
-
- //
- // Don't Rebase this FFS.
- // Only copy the original map file into the FvMap file
- // for the image that is not required to be relocated.
- //
+ XipBase = FvInfo->BaseAddress + XipOffset;
//
// We only process files potentially containing PE32 sections.
@@ -2749,6 +2828,16 @@ Returns:
case EFI_FV_FILETYPE_DRIVER:
case EFI_FV_FILETYPE_DXE_CORE:
break;
+ case EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE:
+ //
+ // Rebase the inside FvImage.
+ //
+ GetChildFvFromFfs (FvInfo, FfsFile, XipOffset);
+
+ //
+ // Search PE/TE section in FV sectin.
+ //
+ break;
default:
return EFI_SUCCESS;
}
@@ -2809,13 +2898,6 @@ Returns:
case EFI_FV_FILETYPE_PEI_CORE:
case EFI_FV_FILETYPE_PEIM:
case EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER:
- if ((Flags & REBASE_XIP_FILE) == 0) {
- //
- // We aren't relocating XIP code, so skip it.
- //
- goto WritePeMap;
- }
-
//
// Check if section-alignment and file-alignment match or not
//
@@ -2889,70 +2971,18 @@ Returns:
case EFI_FV_FILETYPE_DRIVER:
case EFI_FV_FILETYPE_DXE_CORE:
- switch (ImgHdr->Pe32.OptionalHeader.Subsystem) {
- case EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER:
- if ((Flags & REBASE_XIP_FILE) == REBASE_XIP_FILE) {
- //
- // Check if section-alignment and file-alignment match or not
- //
- if ((ImgHdr->Pe32.OptionalHeader.SectionAlignment != ImgHdr->Pe32.OptionalHeader.FileAlignment)) {
- //
- // Xip module has the same section alignment and file alignment.
- //
- Error (NULL, 0, 3000, "Invalid", "Section-Alignment and File-Alignment do not match : %s.", FileName);
- return EFI_ABORTED;
- }
- NewPe32BaseAddress = XipBase + (UINTN) CurrentPe32Section.Pe32Section + sizeof (EFI_PE32_SECTION) - (UINTN)FfsFile;
- BaseToUpdate = &XipBase;
- } else if ((Flags & REBASE_RUNTIME_FILE) == REBASE_RUNTIME_FILE) {
- //
- // make sure image base address at the section alignment
- //
- FvInfo->RuntimeBaseAddress = (FvInfo->RuntimeBaseAddress - ImageContext.ImageSize) & (~(ImageContext.SectionAlignment - 1));
- FvInfo->RuntimeBaseAddress = FvInfo->RuntimeBaseAddress & (~(EFI_PAGE_SIZE - 1));
- NewPe32BaseAddress = FvInfo->RuntimeBaseAddress;
- BaseToUpdate = &(FvInfo->RuntimeBaseAddress);
- } else {
- //
- // RT drivers aren't supposed to be relocated
- //
- goto WritePeMap;
- }
- break;
-
- default:
- //
- // We treat all other subsystems the same as BS_DRIVER
- //
- if ((Flags & REBASE_XIP_FILE) == REBASE_XIP_FILE) {
- //
- // Check if section-alignment and file-alignment match or not
- //
- if ((ImgHdr->Pe32.OptionalHeader.SectionAlignment != ImgHdr->Pe32.OptionalHeader.FileAlignment)) {
- //
- // Xip module has the same section alignment and file alignment.
- //
- Error (NULL, 0, 3000, "Invalid", "Section-Alignment and File-Alignment do not match : %s.", FileName);
- return EFI_ABORTED;
- }
- NewPe32BaseAddress = XipBase + (UINTN) CurrentPe32Section.Pe32Section + sizeof (EFI_PE32_SECTION) - (UINTN)FfsFile;
- BaseToUpdate = &XipBase;
- } else if ((Flags & REBASE_BOOTTIME_FILE) == REBASE_BOOTTIME_FILE) {
- //
- // make sure image base address at the Section and Page alignment
- //
- FvInfo->BootBaseAddress = (FvInfo->BootBaseAddress - ImageContext.ImageSize) & (~(ImageContext.SectionAlignment - 1));
- FvInfo->BootBaseAddress = FvInfo->BootBaseAddress & (~(EFI_PAGE_SIZE - 1));
- NewPe32BaseAddress = FvInfo->BootBaseAddress;
- BaseToUpdate = &(FvInfo->BootBaseAddress);
- } else {
- //
- // Skip all BS_DRIVER's
- //
- goto WritePeMap;
- }
- break;
+ //
+ // Check if section-alignment and file-alignment match or not
+ //
+ if ((ImgHdr->Pe32.OptionalHeader.SectionAlignment != ImgHdr->Pe32.OptionalHeader.FileAlignment)) {
+ //
+ // Xip module has the same section alignment and file alignment.
+ //
+ Error (NULL, 0, 3000, "Invalid", "Section-Alignment and File-Alignment do not match : %s.", FileName);
+ return EFI_ABORTED;
}
+ NewPe32BaseAddress = XipBase + (UINTN) CurrentPe32Section.Pe32Section + sizeof (EFI_PE32_SECTION) - (UINTN)FfsFile;
+ BaseToUpdate = &XipBase;
break;
default:
@@ -2963,68 +2993,74 @@ Returns:
}
//
- // Relocation exist and rebase
+ // Relocation doesn't exist
//
- if (!ImageContext.RelocationsStripped) {
- //
- // Load and Relocate Image Data
- //
- MemoryImagePointer = (UINT8 *) malloc ((UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
- if (MemoryImagePointer == NULL) {
- Error (NULL, 0, 4001, "Resource", "memory cannot be allocated on rebase of %s", FileName);
- return EFI_OUT_OF_RESOURCES;
- }
- memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
- ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~((INT64)ImageContext.SectionAlignment - 1));
-
- Status = PeCoffLoaderLoadImage (&ImageContext);
- if (EFI_ERROR (Status)) {
- Error (NULL, 0, 3000, "Invalid", "LocateImage() call failed on rebase of %s", FileName);
- free ((VOID *) MemoryImagePointer);
- return Status;
- }
-
- ImageContext.DestinationAddress = NewPe32BaseAddress;
- Status = PeCoffLoaderRelocateImage (&ImageContext);
- if (EFI_ERROR (Status)) {
- Error (NULL, 0, 3000, "Invalid", "RelocateImage() call failed on rebase of %s", FileName);
- free ((VOID *) MemoryImagePointer);
- return Status;
- }
+ if (ImageContext.RelocationsStripped) {
+ Warning (NULL, 0, 0, "Invalid", "The file %s has no .reloc section.", FileName);
+ continue;
+ }
- //
- // Copy Relocated data to raw image file.
- //
- SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
- (UINTN) ImgHdr +
- sizeof (UINT32) +
- sizeof (EFI_IMAGE_FILE_HEADER) +
- ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader
- );
-
- for (Index = 0; Index < ImgHdr->Pe32.FileHeader.NumberOfSections; Index ++, SectionHeader ++) {
- CopyMem (
- (UINT8 *) CurrentPe32Section.Pe32Section + sizeof (EFI_COMMON_SECTION_HEADER) + SectionHeader->PointerToRawData,
- (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
- SectionHeader->SizeOfRawData
- );
- }
-
+ //
+ // Relocation exist and rebase
+ //
+ //
+ // Load and Relocate Image Data
+ //
+ MemoryImagePointer = (UINT8 *) malloc ((UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
+ if (MemoryImagePointer == NULL) {
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated on rebase of %s", FileName);
+ return EFI_OUT_OF_RESOURCES;
+ }
+ memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
+ ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~((INT64)ImageContext.SectionAlignment - 1));
+
+ Status = PeCoffLoaderLoadImage (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "LocateImage() call failed on rebase of %s", FileName);
free ((VOID *) MemoryImagePointer);
- MemoryImagePointer = NULL;
- if (PeFileBuffer != NULL) {
- free (PeFileBuffer);
- PeFileBuffer = NULL;
- }
+ return Status;
+ }
+
+ ImageContext.DestinationAddress = NewPe32BaseAddress;
+ Status = PeCoffLoaderRelocateImage (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "RelocateImage() call failed on rebase of %s", FileName);
+ free ((VOID *) MemoryImagePointer);
+ return Status;
+ }
+
+ //
+ // Copy Relocated data to raw image file.
+ //
+ SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
+ (UINTN) ImgHdr +
+ sizeof (UINT32) +
+ sizeof (EFI_IMAGE_FILE_HEADER) +
+ ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader
+ );
+
+ for (Index = 0; Index < ImgHdr->Pe32.FileHeader.NumberOfSections; Index ++, SectionHeader ++) {
+ CopyMem (
+ (UINT8 *) CurrentPe32Section.Pe32Section + sizeof (EFI_COMMON_SECTION_HEADER) + SectionHeader->PointerToRawData,
+ (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
+ SectionHeader->SizeOfRawData
+ );
+ }
+
+ free ((VOID *) MemoryImagePointer);
+ MemoryImagePointer = NULL;
+ if (PeFileBuffer != NULL) {
+ free (PeFileBuffer);
+ PeFileBuffer = NULL;
}
//
// Update Image Base Address
//
if (ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
- ImgHdr->Pe32.OptionalHeader.ImageBase = (UINT32) NewPe32BaseAddress;
+ ImgHdr->Pe32.OptionalHeader.ImageBase = (UINT32) NewPe32BaseAddress;
} else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) {
- ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress;
+ ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress;
} else {
Error (NULL, 0, 3000, "Invalid", "unknown PE magic signature %X in PE32 image %s",
ImgHdr->Pe32.OptionalHeader.Magic,
@@ -3034,11 +3070,6 @@ Returns:
}
//
- // Update BASE address by add one page size.
- //
- *BaseToUpdate -= EFI_PAGE_SIZE;
-
- //
// Now update file checksum
//
if (FfsFile->Attributes & FFS_ATTRIB_CHECKSUM) {
@@ -3055,7 +3086,7 @@ Returns:
//
// Get this module function address from ModulePeMapFile and add them into FvMap file
//
-WritePeMap:
+
//
// Default use FileName as map file path
//
@@ -3069,7 +3100,8 @@ WritePeMap:
if (FfsFile->Type != EFI_FV_FILETYPE_SECURITY_CORE &&
FfsFile->Type != EFI_FV_FILETYPE_PEI_CORE &&
FfsFile->Type != EFI_FV_FILETYPE_PEIM &&
- FfsFile->Type != EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER
+ FfsFile->Type != EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER &&
+ FfsFile->Type != EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE
) {
//
// Only Peim code may have a TE section
@@ -3122,13 +3154,6 @@ WritePeMap:
// Get File PdbPointer
//
PdbPointer = PeCoffLoaderGetPdbPointer (ImageContext.Handle);
-
- if ((Flags & REBASE_XIP_FILE) == 0) {
- //
- // For none XIP PEIM module, their map info also are collected.
- //
- goto WriteTeMap;
- }
//
// Set new rebased address.
@@ -3139,7 +3164,7 @@ WritePeMap:
//
// if reloc is stripped, try to get the original efi image to get reloc info.
//
- if (ImageContext.RelocationsStripped == TRUE) {
+ if (ImageContext.RelocationsStripped) {
//
// Construct the original efi file name
//
@@ -3194,71 +3219,76 @@ WritePeMap:
ImageContext.RelocationsStripped = FALSE;
}
}
+ //
+ // Relocation doesn't exist
+ //
+ if (ImageContext.RelocationsStripped) {
+ Warning (NULL, 0, 0, "Invalid", "The file %s has no .reloc section.", FileName);
+ continue;
+ }
//
// Relocation exist and rebase
//
- if (!ImageContext.RelocationsStripped) {
- //
- // Load and Relocate Image Data
- //
- MemoryImagePointer = (UINT8 *) malloc ((UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
- if (MemoryImagePointer == NULL) {
- Error (NULL, 0, 4001, "Resource", "memory cannot be allocated on rebase of %s", FileName);
- return EFI_OUT_OF_RESOURCES;
- }
- memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
- ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~(ImageContext.SectionAlignment - 1));
-
- Status = PeCoffLoaderLoadImage (&ImageContext);
- if (EFI_ERROR (Status)) {
- Error (NULL, 0, 3000, "Invalid", "LocateImage() call failed on rebase of %s", FileName);
- free ((VOID *) MemoryImagePointer);
- return Status;
- }
- //
- // Reloacate TeImage
- //
- ImageContext.DestinationAddress = NewPe32BaseAddress;
- Status = PeCoffLoaderRelocateImage (&ImageContext);
- if (EFI_ERROR (Status)) {
- Error (NULL, 0, 3000, "Invalid", "RelocateImage() call failed on rebase of TE image %s", FileName);
- free ((VOID *) MemoryImagePointer);
- return Status;
- }
-
- //
- // Copy the relocated image into raw image file.
- //
- SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (TEImageHeader + 1);
- for (Index = 0; Index < TEImageHeader->NumberOfSections; Index ++, SectionHeader ++) {
- if (!ImageContext.IsTeImage) {
- CopyMem (
- (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,
- (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
- SectionHeader->SizeOfRawData
- );
- } else {
- CopyMem (
- (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,
- (VOID*) (UINTN) (ImageContext.ImageAddress + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->VirtualAddress),
- SectionHeader->SizeOfRawData
- );
- }
- }
-
- //
- // Free the allocated memory resource
- //
+ //
+ // Load and Relocate Image Data
+ //
+ MemoryImagePointer = (UINT8 *) malloc ((UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
+ if (MemoryImagePointer == NULL) {
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated on rebase of %s", FileName);
+ return EFI_OUT_OF_RESOURCES;
+ }
+ memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
+ ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~(ImageContext.SectionAlignment - 1));
+
+ Status = PeCoffLoaderLoadImage (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "LocateImage() call failed on rebase of %s", FileName);
free ((VOID *) MemoryImagePointer);
- MemoryImagePointer = NULL;
- if (PeFileBuffer != NULL) {
- free (PeFileBuffer);
- PeFileBuffer = NULL;
+ return Status;
+ }
+ //
+ // Reloacate TeImage
+ //
+ ImageContext.DestinationAddress = NewPe32BaseAddress;
+ Status = PeCoffLoaderRelocateImage (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "RelocateImage() call failed on rebase of TE image %s", FileName);
+ free ((VOID *) MemoryImagePointer);
+ return Status;
+ }
+
+ //
+ // Copy the relocated image into raw image file.
+ //
+ SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (TEImageHeader + 1);
+ for (Index = 0; Index < TEImageHeader->NumberOfSections; Index ++, SectionHeader ++) {
+ if (!ImageContext.IsTeImage) {
+ CopyMem (
+ (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,
+ (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
+ SectionHeader->SizeOfRawData
+ );
+ } else {
+ CopyMem (
+ (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,
+ (VOID*) (UINTN) (ImageContext.ImageAddress + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->VirtualAddress),
+ SectionHeader->SizeOfRawData
+ );
}
}
//
+ // Free the allocated memory resource
+ //
+ free ((VOID *) MemoryImagePointer);
+ MemoryImagePointer = NULL;
+ if (PeFileBuffer != NULL) {
+ free (PeFileBuffer);
+ PeFileBuffer = NULL;
+ }
+
+ //
// Update Image Base Address
//
TEImageHeader->ImageBase = NewPe32BaseAddress;
@@ -3279,7 +3309,7 @@ WritePeMap:
//
// Get this module function address from ModulePeMapFile and add them into FvMap file
//
-WriteTeMap:
+
//
// Default use FileName as map file path
//
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.h b/BaseTools/Source/C/GenFv/GenFvInternalLib.h
index 3c0e9336bd..b82fac8837 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.h
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.h
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2008, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -67,6 +67,7 @@ Abstract:
#define OPTIONS_SECTION_STRING "[options]"
#define ATTRIBUTES_SECTION_STRING "[attributes]"
#define FILES_SECTION_STRING "[files]"
+#define FV_BASE_ADDRESS_STRING "[FV_BASE_ADDRESS]"
//
// Options section
@@ -82,8 +83,6 @@ Abstract:
#define EFI_CAPSULE_HEADER_SIZE_STRING "EFI_CAPSULE_HEADER_SIZE"
#define EFI_CAPSULE_FLAGS_STRING "EFI_CAPSULE_FLAGS"
#define EFI_CAPSULE_VERSION_STRING "EFI_CAPSULE_VERSION"
-#define EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING "EFI_BOOT_DRIVER_BASE_ADDRESS"
-#define EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING "EFI_RUNTIME_DRIVER_BASE_ADDRESS"
#define EFI_FV_TOTAL_SIZE_STRING "EFI_FV_TOTAL_SIZE"
#define EFI_FV_TAKEN_SIZE_STRING "EFI_FV_TAKEN_SIZE"
@@ -205,13 +204,6 @@ Abstract:
#define CHECKSUM_BIT_MASK 0x80
//
-// Rebase File type
-//
-#define REBASE_XIP_FILE 0x1
-#define REBASE_BOOTTIME_FILE 0x2
-#define REBASE_RUNTIME_FILE 0x4
-
-//
// Private data types
//
//
@@ -228,8 +220,6 @@ typedef struct {
typedef struct {
BOOLEAN BaseAddressSet;
EFI_PHYSICAL_ADDRESS BaseAddress;
- EFI_PHYSICAL_ADDRESS BootBaseAddress;
- EFI_PHYSICAL_ADDRESS RuntimeBaseAddress;
EFI_GUID FvFileSystemGuid;
BOOLEAN FvFileSystemGuidSet;
EFI_GUID FvNameGuid;
@@ -270,6 +260,9 @@ extern CAP_INFO mCapDataInfo;
extern EFI_GUID mEfiFirmwareFileSystem2Guid;
extern UINT32 mFvTotalSize;
extern UINT32 mFvTakenSize;
+
+extern EFI_PHYSICAL_ADDRESS mFvBaseAddress[];
+extern UINT32 mFvBaseAddressNumber;
//
// Local function prototypes
//
diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index aabd143b6a..d42c88e23d 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2009, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -78,6 +78,8 @@ Abstract:
#define FW_RELOC_STRIPEED_IMAGE 9
#define FW_HII_PACKAGE_LIST_RCIMAGE 10
#define FW_HII_PACKAGE_LIST_BINIMAGE 11
+#define FW_REBASE_IMAGE 12
+#define FW_SET_ADDRESS_IMAGE 13
#define DUMP_TE_HEADER 0x11
@@ -116,6 +118,12 @@ static const char *gHiiPackageRCFileHeader[] = {
STATIC CHAR8 *mInImageName;
+//
+// Module image information
+//
+STATIC UINT32 mImageTimeStamp = 0;
+STATIC UINT32 mImageSize = 0;
+
STATIC
EFI_STATUS
ZeroDebugData (
@@ -190,7 +198,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
@@ -244,7 +252,9 @@ Returns:
fprintf (stdout, " -s timedate, --stamp timedate\n\
timedate format is \"yyyy-mm-dd 00:00:00\". if timedata \n\
is set to NOW, current system time is used. The support\n\
- date scope is 1970-1-1 8:0:0 ~ 2038-1-19 3:14:07\n\
+ date scope is 1970-01-01 00+timezone:00:00\n\
+ ~ 2038-01-19 03+timezone:14:07\n\
+ The scope is adjusted according to the different zones.\n\
It can't be combined with other action options\n\
except for -o, -r option. It is a action option.\n\
If it is combined with other action options, the later\n\
@@ -288,6 +298,18 @@ Returns:
except for -o option. It is a action option.\n\
If it is combined with other action options, the later\n\
input action option will override the previous one.\n");
+ fprintf (stdout, " --rebase NewAddress Rebase image to new base address. New address \n\
+ is also set to the first none code section header.\n\
+ It can't be combined with other action options\n\
+ except for -o or -r option. It is a action option.\n\
+ If it is combined with other action options, the later\n\
+ input action option will override the previous one.\n");
+ fprintf (stdout, " --address NewAddress Set new address into the first none code \n\
+ section header of the input image.\n\
+ It can't be combined with other action options\n\
+ except for -o or -r option. It is a action option.\n\
+ If it is combined with other action options, the later\n\
+ input action option will override the previous one.\n");
fprintf (stdout, " -v, --verbose Turn on verbose output with informational messages.\n");
fprintf (stdout, " -q, --quiet Disable all messages except key message and fatal error\n");
fprintf (stdout, " -d, --debug level Enable debug messages, at input debug level.\n");
@@ -860,6 +882,7 @@ ScanSections(
NtHdr->Pe32.FileHeader.NumberOfSections = CoffNbrSections;
NtHdr->Pe32.FileHeader.TimeDateStamp = (UINT32) time(NULL);
+ mImageTimeStamp = NtHdr->Pe32.FileHeader.TimeDateStamp;
NtHdr->Pe32.FileHeader.PointerToSymbolTable = 0;
NtHdr->Pe32.FileHeader.NumberOfSymbols = 0;
NtHdr->Pe32.FileHeader.SizeOfOptionalHeader = sizeof(NtHdr->Pe32.OptionalHeader);
@@ -1639,6 +1662,257 @@ Returns:
return HiiSectionHeader;
}
+EFI_STATUS
+RebaseImageRead (
+ IN VOID *FileHandle,
+ IN UINTN FileOffset,
+ IN OUT UINT32 *ReadSize,
+ OUT VOID *Buffer
+ )
+/*++
+
+Routine Description:
+
+ Support routine for the PE/COFF Loader that reads a buffer from a PE/COFF file
+
+Arguments:
+
+ FileHandle - The handle to the PE/COFF file
+
+ FileOffset - The offset, in bytes, into the file to read
+
+ ReadSize - The number of bytes to read from the file starting at FileOffset
+
+ Buffer - A pointer to the buffer to read the data into.
+
+Returns:
+
+ EFI_SUCCESS - ReadSize bytes of data were read into Buffer from the PE/COFF file starting at FileOffset
+
+--*/
+{
+ CHAR8 *Destination8;
+ CHAR8 *Source8;
+ UINT32 Length;
+
+ Destination8 = Buffer;
+ Source8 = (CHAR8 *) ((UINTN) FileHandle + FileOffset);
+ Length = *ReadSize;
+ while (Length--) {
+ *(Destination8++) = *(Source8++);
+ }
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+SetAddressToSectionHeader (
+ IN CHAR8 *FileName,
+ IN OUT UINT8 *FileBuffer,
+ IN UINT64 NewPe32BaseAddress
+ )
+/*++
+
+Routine Description:
+
+ Set new base address into the section header of PeImage
+
+Arguments:
+
+ FileName - Name of file
+ FileBuffer - Pointer to PeImage.
+ NewPe32BaseAddress - New Base Address for PE image.
+
+Returns:
+
+ EFI_SUCCESS Set new base address into this image successfully.
+
+--*/
+{
+ EFI_STATUS Status;
+ PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
+ UINTN Index;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *ImgHdr;
+ EFI_IMAGE_SECTION_HEADER *SectionHeader;
+
+ //
+ // Initialize context
+ //
+ memset (&ImageContext, 0, sizeof (ImageContext));
+ ImageContext.Handle = (VOID *) FileBuffer;
+ ImageContext.ImageRead = (PE_COFF_LOADER_READ_FILE) RebaseImageRead;
+ Status = PeCoffLoaderGetImageInfo (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "The input PeImage %s is not valid", FileName);
+ return Status;
+ }
+
+ if (ImageContext.RelocationsStripped) {
+ Error (NULL, 0, 3000, "Invalid", "The input PeImage %s has no relocation to be fixed up", FileName);
+ return Status;
+ }
+
+ //
+ // Get PeHeader pointer
+ //
+ ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(FileBuffer + ImageContext.PeCoffHeaderOffset);
+
+ //
+ // Get section header list
+ //
+ SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
+ (UINTN) ImgHdr +
+ sizeof (UINT32) +
+ sizeof (EFI_IMAGE_FILE_HEADER) +
+ ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader
+ );
+
+ //
+ // Set base address into the first section header that doesn't point to code section.
+ //
+ for (Index = 0; Index < ImgHdr->Pe32.FileHeader.NumberOfSections; Index ++, SectionHeader ++) {
+ if ((SectionHeader->Characteristics & EFI_IMAGE_SCN_CNT_CODE) == 0) {
+ *(UINT64 *) &SectionHeader->PointerToRelocations = NewPe32BaseAddress;
+ break;
+ }
+ }
+
+ //
+ // No available section header is found.
+ //
+ if (Index == ImgHdr->Pe32.FileHeader.NumberOfSections) {
+ return EFI_NOT_FOUND;
+ }
+
+ //
+ // BaseAddress is set to section header.
+ //
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+RebaseImage (
+ IN CHAR8 *FileName,
+ IN OUT UINT8 *FileBuffer,
+ IN UINT64 NewPe32BaseAddress
+ )
+/*++
+
+Routine Description:
+
+ Set new base address into PeImage, and fix up PeImage based on new address.
+
+Arguments:
+
+ FileName - Name of file
+ FileBuffer - Pointer to PeImage.
+ NewPe32BaseAddress - New Base Address for PE image.
+
+Returns:
+
+ EFI_INVALID_PARAMETER - BaseAddress is not valid.
+ EFI_SUCCESS - Update PeImage is correctly.
+
+--*/
+{
+ EFI_STATUS Status;
+ PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
+ UINTN Index;
+ EFI_IMAGE_OPTIONAL_HEADER_UNION *ImgHdr;
+ UINT8 *MemoryImagePointer;
+ EFI_IMAGE_SECTION_HEADER *SectionHeader;
+
+ //
+ // Initialize context
+ //
+ memset (&ImageContext, 0, sizeof (ImageContext));
+ ImageContext.Handle = (VOID *) FileBuffer;
+ ImageContext.ImageRead = (PE_COFF_LOADER_READ_FILE) RebaseImageRead;
+ Status = PeCoffLoaderGetImageInfo (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "The input PeImage %s is not valid", FileName);
+ return Status;
+ }
+
+ if (ImageContext.RelocationsStripped) {
+ Error (NULL, 0, 3000, "Invalid", "The input PeImage %s has no relocation to be fixed up", FileName);
+ return Status;
+ }
+
+ //
+ // Get PeHeader pointer
+ //
+ ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(FileBuffer + ImageContext.PeCoffHeaderOffset);
+
+ //
+ // Load and Relocate Image Data
+ //
+ MemoryImagePointer = (UINT8 *) malloc ((UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
+ if (MemoryImagePointer == NULL) {
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated on rebase of %s", FileName);
+ return EFI_OUT_OF_RESOURCES;
+ }
+ memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
+ ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~((INT64)ImageContext.SectionAlignment - 1));
+
+ Status = PeCoffLoaderLoadImage (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "LocateImage() call failed on rebase of %s", FileName);
+ free ((VOID *) MemoryImagePointer);
+ return Status;
+ }
+
+ ImageContext.DestinationAddress = NewPe32BaseAddress;
+ Status = PeCoffLoaderRelocateImage (&ImageContext);
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "RelocateImage() call failed on rebase of %s", FileName);
+ free ((VOID *) MemoryImagePointer);
+ return Status;
+ }
+
+ //
+ // Copy Relocated data to raw image file.
+ //
+ SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
+ (UINTN) ImgHdr +
+ sizeof (UINT32) +
+ sizeof (EFI_IMAGE_FILE_HEADER) +
+ ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader
+ );
+
+ for (Index = 0; Index < ImgHdr->Pe32.FileHeader.NumberOfSections; Index ++, SectionHeader ++) {
+ CopyMem (
+ FileBuffer + SectionHeader->PointerToRawData,
+ (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
+ SectionHeader->SizeOfRawData
+ );
+ }
+
+ free ((VOID *) MemoryImagePointer);
+
+ //
+ // Update Image Base Address
+ //
+ if ((ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) && (ImgHdr->Pe32.FileHeader.Machine != IMAGE_FILE_MACHINE_IA64)) {
+ ImgHdr->Pe32.OptionalHeader.ImageBase = (UINT32) NewPe32BaseAddress;
+ } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) {
+ ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress;
+ } else {
+ Error (NULL, 0, 3000, "Invalid", "unknown PE magic signature %X in PE32 image %s",
+ ImgHdr->Pe32.OptionalHeader.Magic,
+ FileName
+ );
+ return EFI_ABORTED;
+ }
+
+ //
+ // Set new base address into section header
+ //
+ Status = SetAddressToSectionHeader (FileName, FileBuffer, NewPe32BaseAddress);
+
+ return Status;
+}
+
int
main (
int argc,
@@ -1686,6 +1960,8 @@ Returns:
UINT32 FileLength;
UINT8 *OutputFileBuffer;
UINT32 OutputFileLength;
+ UINT8 *InputFileBuffer;
+ UINT32 InputFileLength;
RUNTIME_FUNCTION *RuntimeFunction;
UNWIND_INFO *UnwindInfo;
STATUS Status;
@@ -1712,12 +1988,18 @@ Returns:
EFI_HII_PACKAGE_HEADER EndPackage;
UINT32 HiiSectionHeaderSize;
UINT8 *HiiSectionHeader;
+ UINT64 NewBaseAddress;
+ BOOLEAN NegativeAddr;
+ FILE *ReportFile;
+ CHAR8 *ReportFileName;
+ UINTN FileLen;
SetUtilityName (UTILITY_NAME);
//
// Assign to fix compile warning
//
+ FileLen = 0;
InputFileNum = 0;
InputFileName = NULL;
mInImageName = NULL;
@@ -1740,6 +2022,8 @@ Returns:
LogLevel = 0;
OutputFileBuffer = NULL;
OutputFileLength = 0;
+ InputFileBuffer = NULL;
+ InputFileLength = 0;
Optional32 = NULL;
Optional64 = NULL;
KeepExceptionTableFlag = FALSE;
@@ -1752,6 +2036,8 @@ Returns:
memset (&HiiPackageListGuid, 0, sizeof (HiiPackageListGuid));
HiiSectionHeaderSize = 0;
HiiSectionHeader = NULL;
+ NewBaseAddress = 0;
+ NegativeAddr = FALSE;
if (argc == 1) {
Error (NULL, 0, 1001, "Missing options", "No input options.");
@@ -1899,6 +2185,44 @@ Returns:
continue;
}
+ if ((stricmp (argv[0], "--rebase") == 0)) {
+ if (argv[1][0] == '-') {
+ NegativeAddr = TRUE;
+ Status = AsciiStringToUint64 (argv[1] + 1, FALSE, &Temp64);
+ } else {
+ NegativeAddr = FALSE;
+ Status = AsciiStringToUint64 (argv[1], FALSE, &Temp64);
+ }
+ if (Status != EFI_SUCCESS) {
+ Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);
+ goto Finish;
+ }
+ OutImageType = FW_REBASE_IMAGE;
+ NewBaseAddress = (UINT64) Temp64;
+ argc -= 2;
+ argv += 2;
+ continue;
+ }
+
+ if ((stricmp (argv[0], "--address") == 0)) {
+ if (argv[1][0] == '-') {
+ NegativeAddr = TRUE;
+ Status = AsciiStringToUint64 (argv[1] + 1, FALSE, &Temp64);
+ } else {
+ NegativeAddr = FALSE;
+ Status = AsciiStringToUint64 (argv[1], FALSE, &Temp64);
+ }
+ if (Status != EFI_SUCCESS) {
+ Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);
+ goto Finish;
+ }
+ OutImageType = FW_SET_ADDRESS_IMAGE;
+ NewBaseAddress = (UINT64) Temp64;
+ argc -= 2;
+ argv += 2;
+ continue;
+ }
+
if ((stricmp (argv[0], "-p") == 0) || (stricmp (argv[0], "--pad") == 0)) {
if (AsciiStringToUint64 (argv[1], FALSE, &Temp64) != EFI_SUCCESS) {
Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);
@@ -1942,7 +2266,7 @@ Returns:
argv += 2;
continue;
}
-
+
if ((stricmp (argv[0], "-g") == 0) || (stricmp (argv[0], "--hiiguid") == 0)) {
Status = StringToGuid (argv[1], &HiiPackageListGuid);
if (EFI_ERROR (Status)) {
@@ -1988,9 +2312,9 @@ Returns:
// InputFileName buffer too small, need to realloc
//
InputFileName = (CHAR8 **) realloc (
- InputFileName,
- (InputFileNum + MAXIMUM_INPUT_FILE_NUM) * sizeof (CHAR8 *)
- );
+ InputFileName,
+ (InputFileNum + MAXIMUM_INPUT_FILE_NUM) * sizeof (CHAR8 *)
+ );
if (InputFileName == NULL) {
Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");
@@ -2090,6 +2414,12 @@ Returns:
case FW_HII_PACKAGE_LIST_BINIMAGE:
VerboseMsg ("Combine the input multi hii bin packages to one binary pacakge list file.");
break;
+ case FW_REBASE_IMAGE:
+ VerboseMsg ("Rebase the input image to new base address.");
+ break;
+ case FW_SET_ADDRESS_IMAGE:
+ VerboseMsg ("Set the preferred address into the section header of the input image");
+ break;
default:
break;
}
@@ -2114,33 +2444,52 @@ Returns:
}
fread (OutputFileBuffer, 1, OutputFileLength, fpOut);
fclose (fpOut);
- }
- fpOut = fopen (OutImageName, "wb");
- if (!fpOut) {
- Error (NULL, 0, 0001, "Error opening output file", OutImageName);
- goto Finish;
+ fpOut = NULL;
}
VerboseMsg ("Output file name is %s", OutImageName);
- } else if (!ReplaceFlag) {
- if (OutImageType == DUMP_TE_HEADER) {
- fpOut = stdout;
- } else {
- Error (NULL, 0, 1001, "Missing option", "output file");
- goto Finish;
- }
+ } else if (!ReplaceFlag && OutImageType != DUMP_TE_HEADER) {
+ Error (NULL, 0, 1001, "Missing option", "output file");
+ goto Finish;
}
//
+ // Open input file and read file data into file buffer.
+ //
+ fpIn = fopen (mInImageName, "rb");
+ if (fpIn == NULL) {
+ Error (NULL, 0, 0001, "Error opening file", mInImageName);
+ goto Finish;
+ }
+ InputFileLength = _filelength (fileno (fpIn));
+ InputFileBuffer = malloc (InputFileLength);
+ if (InputFileBuffer == NULL) {
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");
+ fclose (fpIn);
+ goto Finish;
+ }
+ fread (InputFileBuffer, 1, InputFileLength, fpIn);
+ fclose (fpIn);
+ DebugMsg (NULL, 0, 9, "input file info", "the input file size is %u bytes", (unsigned) InputFileLength);
+
+ //
// Combine multi binary HII package files.
//
if (OutImageType == FW_HII_PACKAGE_LIST_RCIMAGE || OutImageType == FW_HII_PACKAGE_LIST_BINIMAGE) {
//
+ // Open output file handle.
+ //
+ fpOut = fopen (OutImageName, "wb");
+ if (!fpOut) {
+ Error (NULL, 0, 0001, "Error opening output file", OutImageName);
+ goto Finish;
+ }
+ //
// Get hii package list lenght
//
HiiPackageListHeader.PackageLength = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
for (Index = 0; Index < InputFileNum; Index ++) {
fpIn = fopen (InputFileName [Index], "rb");
- if (!fpIn) {
+ if (fpIn == NULL) {
Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
goto Finish;
}
@@ -2186,7 +2535,7 @@ Returns:
HiiPackageDataPointer = HiiPackageListBuffer + sizeof (HiiPackageListHeader);
for (Index = 0; Index < InputFileNum; Index ++) {
fpIn = fopen (InputFileName [Index], "rb");
- if (!fpIn) {
+ if (fpIn == NULL) {
Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
free (HiiPackageListBuffer);
goto Finish;
@@ -2240,7 +2589,7 @@ Returns:
fprintf (fpOut, " 0x%04X,", *(UINT16 *) HiiPackageDataPointer);
HiiPackageDataPointer += 2;
}
-
+
if (Index % 16 == 0) {
fprintf (fpOut, "\n ");
}
@@ -2262,6 +2611,14 @@ Returns:
// Combine MciBinary files to one file
//
if (OutImageType == FW_MERGE_IMAGE) {
+ //
+ // Open output file handle.
+ //
+ fpOut = fopen (OutImageName, "wb");
+ if (!fpOut) {
+ Error (NULL, 0, 0001, "Error opening output file", OutImageName);
+ goto Finish;
+ }
for (Index = 0; Index < InputFileNum; Index ++) {
fpIn = fopen (InputFileName [Index], "rb");
if (!fpIn) {
@@ -2306,7 +2663,7 @@ Returns:
//
if (OutImageType == FW_MCI_IMAGE) {
fpIn = fopen (mInImageName, "r");
- if (!fpIn) {
+ if (fpIn == NULL) {
Error (NULL, 0, 0001, "Error opening file", mInImageName);
goto Finish;
}
@@ -2400,63 +2757,21 @@ Returns:
//
// Open the output file and write the buffer contents
//
- if (fpOut != NULL) {
- if (fwrite (FileBuffer, FileLength, 1, fpOut) != 1) {
- Error (NULL, 0, 0002, "Error writing file", OutImageName);
- goto Finish;
- }
- }
-
- if (ReplaceFlag) {
- fpInOut = fopen (mInImageName, "wb");
- if (fpInOut != NULL) {
- Error (NULL, 0, 0001, "Error opening file", mInImageName);
- goto Finish;
- }
- if (fwrite (FileBuffer, FileLength, 1, fpInOut) != 1) {
- Error (NULL, 0, 0002, "Error writing file", mInImageName);
- goto Finish;
- }
- }
VerboseMsg ("the size of output file is %u bytes", (unsigned) FileLength);
- //
- // Convert Mci.TXT to Mci.bin file successfully
- //
- goto Finish;
+ goto WriteFile;
}
//
// Open input file and read file data into file buffer.
//
- fpIn = fopen (mInImageName, "rb");
- if (!fpIn) {
- Error (NULL, 0, 0001, "Error opening file", mInImageName);
- goto Finish;
- }
-
- FileLength = _filelength (fileno (fpIn));
+ FileLength = InputFileLength;
FileBuffer = malloc (FileLength);
if (FileBuffer == NULL) {
Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");
- fclose (fpIn);
goto Finish;
}
+ memcpy (FileBuffer, InputFileBuffer, InputFileLength);
- fread (FileBuffer, 1, FileLength, fpIn);
- fclose (fpIn);
-
- DebugMsg (NULL, 0, 9, "input file info", "the input file size is %u bytes", (unsigned) FileLength);
-
- //
- // Replace file
- //
- if (ReplaceFlag) {
- fpInOut = fopen (mInImageName, "wb");
- if (!fpInOut) {
- Error (NULL, 0, 0001, "Error opening file", mInImageName);
- goto Finish;
- }
- }
//
// Dump TeImage Header into output file.
//
@@ -2466,6 +2781,26 @@ Returns:
Error (NULL, 0, 3000, "Invalid", "TE header signature of file %s is not correct.", mInImageName);
goto Finish;
}
+ //
+ // Open the output file handle.
+ //
+ if (ReplaceFlag) {
+ fpInOut = fopen (mInImageName, "wb");
+ if (fpInOut == NULL) {
+ Error (NULL, 0, 0001, "Error opening file", mInImageName);
+ goto Finish;
+ }
+ } else {
+ if (OutImageName != NULL) {
+ fpOut = fopen (OutImageName, "wb");
+ } else {
+ fpOut = stdout;
+ }
+ if (fpOut == NULL) {
+ Error (NULL, 0, 0001, "Error opening output file", OutImageName);
+ goto Finish;
+ }
+ }
if (fpInOut != NULL) {
fprintf (fpInOut, "Dump of file %s\n\n", mInImageName);
fprintf (fpInOut, "TE IMAGE HEADER VALUES\n");
@@ -2479,7 +2814,6 @@ Returns:
fprintf (fpInOut, "%17X [%8X] RVA [size] of Base Relocation Directory\n", (unsigned) TEImageHeader.DataDirectory[0].VirtualAddress, (unsigned) TEImageHeader.DataDirectory[0].Size);
fprintf (fpInOut, "%17X [%8X] RVA [size] of Debug Directory\n", (unsigned) TEImageHeader.DataDirectory[1].VirtualAddress, (unsigned) TEImageHeader.DataDirectory[1].Size);
}
-
if (fpOut != NULL) {
fprintf (fpOut, "Dump of file %s\n\n", mInImageName);
fprintf (fpOut, "TE IMAGE HEADER VALUES\n");
@@ -2514,36 +2848,36 @@ Returns:
}
} else {
if (stricmp (ModuleType, "BASE") == 0 ||
- stricmp (ModuleType, "SEC") == 0 ||
- stricmp (ModuleType, "SECURITY_CORE") == 0 ||
- stricmp (ModuleType, "PEI_CORE") == 0 ||
- stricmp (ModuleType, "PEIM") == 0 ||
- stricmp (ModuleType, "COMBINED_PEIM_DRIVER") == 0 ||
- stricmp (ModuleType, "PIC_PEIM") == 0 ||
- stricmp (ModuleType, "RELOCATABLE_PEIM") == 0 ||
- stricmp (ModuleType, "DXE_CORE") == 0 ||
- stricmp (ModuleType, "BS_DRIVER") == 0 ||
- stricmp (ModuleType, "DXE_DRIVER") == 0 ||
- stricmp (ModuleType, "DXE_SMM_DRIVER") == 0 ||
- stricmp (ModuleType, "UEFI_DRIVER") == 0 ||
- stricmp (ModuleType, "SMM_CORE") == 0) {
- Type = EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER;
- VerboseMsg ("Efi Image subsystem type is efi boot service driver.");
+ stricmp (ModuleType, "SEC") == 0 ||
+ stricmp (ModuleType, "SECURITY_CORE") == 0 ||
+ stricmp (ModuleType, "PEI_CORE") == 0 ||
+ stricmp (ModuleType, "PEIM") == 0 ||
+ stricmp (ModuleType, "COMBINED_PEIM_DRIVER") == 0 ||
+ stricmp (ModuleType, "PIC_PEIM") == 0 ||
+ stricmp (ModuleType, "RELOCATABLE_PEIM") == 0 ||
+ stricmp (ModuleType, "DXE_CORE") == 0 ||
+ stricmp (ModuleType, "BS_DRIVER") == 0 ||
+ stricmp (ModuleType, "DXE_DRIVER") == 0 ||
+ stricmp (ModuleType, "DXE_SMM_DRIVER") == 0 ||
+ stricmp (ModuleType, "UEFI_DRIVER") == 0 ||
+ stricmp (ModuleType, "SMM_CORE") == 0) {
+ Type = EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER;
+ VerboseMsg ("Efi Image subsystem type is efi boot service driver.");
} else if (stricmp (ModuleType, "UEFI_APPLICATION") == 0 ||
- stricmp (ModuleType, "APPLICATION") == 0) {
- Type = EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION;
- VerboseMsg ("Efi Image subsystem type is efi application.");
+ stricmp (ModuleType, "APPLICATION") == 0) {
+ Type = EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION;
+ VerboseMsg ("Efi Image subsystem type is efi application.");
} else if (stricmp (ModuleType, "DXE_RUNTIME_DRIVER") == 0 ||
- stricmp (ModuleType, "RT_DRIVER") == 0) {
- Type = EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER;
- VerboseMsg ("Efi Image subsystem type is efi runtime driver.");
+ stricmp (ModuleType, "RT_DRIVER") == 0) {
+ Type = EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER;
+ VerboseMsg ("Efi Image subsystem type is efi runtime driver.");
} else if (stricmp (ModuleType, "DXE_SAL_DRIVER") == 0 ||
- stricmp (ModuleType, "SAL_RT_DRIVER") == 0) {
- Type = EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER;
- VerboseMsg ("Efi Image subsystem type is efi sal runtime driver.");
+ stricmp (ModuleType, "SAL_RT_DRIVER") == 0) {
+ Type = EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER;
+ VerboseMsg ("Efi Image subsystem type is efi sal runtime driver.");
} else {
Error (NULL, 0, 1003, "Invalid option value", "EFI_FILETYPE = %s", ModuleType);
@@ -2559,7 +2893,7 @@ Returns:
VerboseMsg ("Convert the input ELF Image to Pe Image");
ConvertElf(&FileBuffer, &FileLength);
}
-
+
//
// Make sure File Offsets and Virtual Offsets are the same in the image so it is XIP
// XIP == eXecute In Place
@@ -2583,15 +2917,15 @@ Returns:
//
if ((SectionHeader->PointerToRawData + SectionHeader->SizeOfRawData) ==
(FileLength + TeHdr->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER))) {
- //
- // Remove .reloc section and update TeImage Header
- //
- FileLength = FileLength - SectionHeader->SizeOfRawData;
- SectionHeader->SizeOfRawData = 0;
- SectionHeader->Misc.VirtualSize = 0;
- TeHdr->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = 0;
- TeHdr->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].Size = 0;
- break;
+ //
+ // Remove .reloc section and update TeImage Header
+ //
+ FileLength = FileLength - SectionHeader->SizeOfRawData;
+ SectionHeader->SizeOfRawData = 0;
+ SectionHeader->Misc.VirtualSize = 0;
+ TeHdr->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = 0;
+ TeHdr->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].Size = 0;
+ break;
}
}
}
@@ -2677,7 +3011,7 @@ Returns:
goto Finish;
}
}
-
+
if (PeHdr->Pe32.FileHeader.Machine == IMAGE_FILE_MACHINE_ARM) {
// Some tools kick out IMAGE_FILE_MACHINE_ARM (0x1c0) vs IMAGE_FILE_MACHINE_ARMT (0x1c2)
// so patch back to the offical UEFI value.
@@ -2685,6 +3019,43 @@ Returns:
}
//
+ // Set new base address into image
+ //
+ if (OutImageType == FW_REBASE_IMAGE || OutImageType == FW_SET_ADDRESS_IMAGE) {
+ if ((PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) && (PeHdr->Pe32.FileHeader.Machine != IMAGE_FILE_MACHINE_IA64)) {
+ if (NewBaseAddress >= 0x100000000ULL) {
+ Error (NULL, 0, 3000, "Invalid", "New base address is larger than 4G for 32bit PE image");
+ goto Finish;
+ }
+ }
+
+ if (NegativeAddr) {
+ //
+ // Set Base Address to a negative value.
+ //
+ NewBaseAddress = (UINT64) (0 - NewBaseAddress);
+ }
+ if (OutImageType == FW_REBASE_IMAGE) {
+ Status = RebaseImage (mInImageName, FileBuffer, NewBaseAddress);
+ } else {
+ Status = SetAddressToSectionHeader (mInImageName, FileBuffer, NewBaseAddress);
+ }
+ if (EFI_ERROR (Status)) {
+ if (NegativeAddr) {
+ Error (NULL, 0, 3000, "Invalid", "Rebase/Set Image %s to Base address -0x%llx can't success", mInImageName, 0 - NewBaseAddress);
+ } else {
+ Error (NULL, 0, 3000, "Invalid", "Rebase/Set Image %s to Base address 0x%llx can't success", mInImageName, NewBaseAddress);
+ }
+ goto Finish;
+ }
+
+ //
+ // Write file
+ //
+ goto WriteFile;
+ }
+
+ //
// Extract bin data from Pe image.
//
if (OutImageType == FW_BIN_IMAGE) {
@@ -2695,14 +3066,10 @@ Returns:
//
// Output bin data from exe file
//
- if (fpOut != NULL) {
- fwrite (FileBuffer + PeHdr->Pe32.OptionalHeader.SizeOfHeaders, 1, FileLength - PeHdr->Pe32.OptionalHeader.SizeOfHeaders, fpOut);
- }
- if (fpInOut != NULL) {
- fwrite (FileBuffer + PeHdr->Pe32.OptionalHeader.SizeOfHeaders, 1, FileLength - PeHdr->Pe32.OptionalHeader.SizeOfHeaders, fpInOut);
- }
- VerboseMsg ("the size of output file is %u bytes", (unsigned) (FileLength - PeHdr->Pe32.OptionalHeader.SizeOfHeaders));
- goto Finish;
+ FileLength = FileLength - PeHdr->Pe32.OptionalHeader.SizeOfHeaders;
+ memcpy (FileBuffer, FileBuffer + PeHdr->Pe32.OptionalHeader.SizeOfHeaders, FileLength);
+ VerboseMsg ("the size of output file is %u bytes", (unsigned) FileLength);
+ goto WriteFile;
}
//
@@ -2715,14 +3082,11 @@ Returns:
goto Finish;
}
- if (fpOut != NULL) {
- fwrite (FileBuffer, 1, FileLength, fpOut);
- }
- if (fpInOut != NULL) {
- fwrite (FileBuffer, 1, FileLength, fpInOut);
- }
+ //
+ // Write the updated Image
+ //
VerboseMsg ("the size of output file is %u bytes", (unsigned) FileLength);
- goto Finish;
+ goto WriteFile;
}
//
@@ -2734,14 +3098,11 @@ Returns:
goto Finish;
}
- if (fpOut != NULL) {
- fwrite (FileBuffer, 1, FileLength, fpOut);
- }
- if (fpInOut != NULL) {
- fwrite (FileBuffer, 1, FileLength, fpInOut);
- }
+ //
+ // Write the updated Image
+ //
VerboseMsg ("the size of output file is %u bytes", (unsigned) FileLength);
- goto Finish;
+ goto WriteFile;
}
//
@@ -2768,14 +3129,9 @@ Returns:
//
// Output Apci data to file
//
- if (fpOut != NULL) {
- fwrite (FileBuffer + SectionHeader->PointerToRawData, 1, FileLength, fpOut);
- }
- if (fpInOut != NULL) {
- fwrite (FileBuffer + SectionHeader->PointerToRawData, 1, FileLength, fpInOut);
- }
+ memcpy (FileBuffer, FileBuffer + SectionHeader->PointerToRawData, FileLength);
VerboseMsg ("the size of output file is %u bytes", (unsigned) FileLength);
- goto Finish;
+ goto WriteFile;
}
}
Error (NULL, 0, 3000, "Invalid", "failed to get ACPI table from %s.", mInImageName);
@@ -2789,7 +3145,7 @@ Returns:
memset (DosHdr, 0, sizeof (EFI_IMAGE_DOS_HEADER));
DosHdr->e_magic = BackupDosHdr.e_magic;
DosHdr->e_lfanew = BackupDosHdr.e_lfanew;
-
+
for (Index = sizeof (EFI_IMAGE_DOS_HEADER); Index < (UINT32 ) DosHdr->e_lfanew; Index++) {
FileBuffer[Index] = (UINT8) DosHdr->e_cp;
}
@@ -2804,7 +3160,7 @@ Returns:
TEImageHeader.NumberOfSections = (UINT8) PeHdr->Pe32.FileHeader.NumberOfSections;
TEImageHeader.StrippedSize = (UINT16) ((UINTN) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader) - (UINTN) FileBuffer);
TEImageHeader.Subsystem = (UINT8) Type;
-
+
//
// Patch the PE header
//
@@ -2845,28 +3201,28 @@ Returns:
// Zero .pdata section data.
//
if (!KeepExceptionTableFlag && Optional32->NumberOfRvaAndSizes > EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION &&
- Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress != 0 &&
- Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size != 0) {
- SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader);
- for (Index = 0; Index < PeHdr->Pe32.FileHeader.NumberOfSections; Index++, SectionHeader++) {
- if (SectionHeader->VirtualAddress == Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress) {
- //
- // Zero .pdata Section data
- //
- memset (FileBuffer + SectionHeader->PointerToRawData, 0, SectionHeader->SizeOfRawData);
- //
- // Zero .pdata Section header name
- //
- memset (SectionHeader->Name, 0, sizeof (SectionHeader->Name));
- //
- // Zero Execption Table
- //
- Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress = 0;
- Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size = 0;
- DebugMsg (NULL, 0, 9, "Zero the .pdata section for PE image", NULL);
- break;
+ Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress != 0 &&
+ Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size != 0) {
+ SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader);
+ for (Index = 0; Index < PeHdr->Pe32.FileHeader.NumberOfSections; Index++, SectionHeader++) {
+ if (SectionHeader->VirtualAddress == Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress) {
+ //
+ // Zero .pdata Section data
+ //
+ memset (FileBuffer + SectionHeader->PointerToRawData, 0, SectionHeader->SizeOfRawData);
+ //
+ // Zero .pdata Section header name
+ //
+ memset (SectionHeader->Name, 0, sizeof (SectionHeader->Name));
+ //
+ // Zero Execption Table
+ //
+ Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress = 0;
+ Optional32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size = 0;
+ DebugMsg (NULL, 0, 9, "Zero the .pdata section for PE image", NULL);
+ break;
+ }
}
- }
}
//
@@ -2941,40 +3297,40 @@ Returns:
//
if ((!KeepExceptionTableFlag && PeHdr->Pe32.FileHeader.Machine == IMAGE_FILE_MACHINE_X64) || PeHdr->Pe32.FileHeader.Machine == IMAGE_FILE_MACHINE_IA64) {
if (Optional64->NumberOfRvaAndSizes > EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION &&
- Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress != 0 &&
- Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size != 0) {
- SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader);
- for (Index = 0; Index < PeHdr->Pe32.FileHeader.NumberOfSections; Index++, SectionHeader++) {
- if (SectionHeader->VirtualAddress == Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress) {
- //
- // Zero .pdata Section header name
- //
- memset (SectionHeader->Name, 0, sizeof (SectionHeader->Name));
-
- RuntimeFunction = (RUNTIME_FUNCTION *)(FileBuffer + SectionHeader->PointerToRawData);
- for (Index1 = 0; Index1 < Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size / sizeof (RUNTIME_FUNCTION); Index1++, RuntimeFunction++) {
- SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader);
- for (Index2 = 0; Index2 < PeHdr->Pe32.FileHeader.NumberOfSections; Index2++, SectionHeader++) {
- if (RuntimeFunction->UnwindInfoAddress >= SectionHeader->VirtualAddress && RuntimeFunction->UnwindInfoAddress < (SectionHeader->VirtualAddress + SectionHeader->SizeOfRawData)) {
- UnwindInfo = (UNWIND_INFO *)(FileBuffer + SectionHeader->PointerToRawData + (RuntimeFunction->UnwindInfoAddress - SectionHeader->VirtualAddress));
- if (UnwindInfo->Version == 1) {
- memset (UnwindInfo + 1, 0, UnwindInfo->CountOfUnwindCodes * sizeof (UINT16));
- memset (UnwindInfo, 0, sizeof (UNWIND_INFO));
+ Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress != 0 &&
+ Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size != 0) {
+ SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader);
+ for (Index = 0; Index < PeHdr->Pe32.FileHeader.NumberOfSections; Index++, SectionHeader++) {
+ if (SectionHeader->VirtualAddress == Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress) {
+ //
+ // Zero .pdata Section header name
+ //
+ memset (SectionHeader->Name, 0, sizeof (SectionHeader->Name));
+
+ RuntimeFunction = (RUNTIME_FUNCTION *)(FileBuffer + SectionHeader->PointerToRawData);
+ for (Index1 = 0; Index1 < Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size / sizeof (RUNTIME_FUNCTION); Index1++, RuntimeFunction++) {
+ SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) &(PeHdr->Pe32.OptionalHeader) + PeHdr->Pe32.FileHeader.SizeOfOptionalHeader);
+ for (Index2 = 0; Index2 < PeHdr->Pe32.FileHeader.NumberOfSections; Index2++, SectionHeader++) {
+ if (RuntimeFunction->UnwindInfoAddress >= SectionHeader->VirtualAddress && RuntimeFunction->UnwindInfoAddress < (SectionHeader->VirtualAddress + SectionHeader->SizeOfRawData)) {
+ UnwindInfo = (UNWIND_INFO *)(FileBuffer + SectionHeader->PointerToRawData + (RuntimeFunction->UnwindInfoAddress - SectionHeader->VirtualAddress));
+ if (UnwindInfo->Version == 1) {
+ memset (UnwindInfo + 1, 0, UnwindInfo->CountOfUnwindCodes * sizeof (UINT16));
+ memset (UnwindInfo, 0, sizeof (UNWIND_INFO));
+ }
+ break;
}
- break;
}
+ memset (RuntimeFunction, 0, sizeof (RUNTIME_FUNCTION));
}
- memset (RuntimeFunction, 0, sizeof (RUNTIME_FUNCTION));
+ //
+ // Zero Execption Table
+ //
+ Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size = 0;
+ Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress = 0;
+ DebugMsg (NULL, 0, 9, "Zero the .pdata section if the machine type is X64 for PE32+ image", NULL);
+ break;
}
- //
- // Zero Execption Table
- //
- Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].Size = 0;
- Optional64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION].VirtualAddress = 0;
- DebugMsg (NULL, 0, 9, "Zero the .pdata section if the machine type is X64 for PE32+ image", NULL);
- break;
}
- }
}
}
@@ -3017,19 +3373,19 @@ Returns:
Error (NULL, 0, 3000, "Invalid", "Magic 0x%x of PeImage %s is unknown.", PeHdr->Pe32.OptionalHeader.Magic, mInImageName);
goto Finish;
}
-
+
if (((PeHdr->Pe32.FileHeader.Characteristics & EFI_IMAGE_FILE_RELOCS_STRIPPED) == 0) && \
(TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress == 0) && \
(TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].Size == 0)) {
- //
- // PeImage can be loaded into memory, but it has no relocation section.
- // Fix TeImage Header to set VA of relocation data directory to not zero, the size is still zero.
- //
- if (Optional32 != NULL) {
- TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = Optional32->SizeOfImage - sizeof (EFI_IMAGE_BASE_RELOCATION);
- } else if (Optional64 != NULL) {
- TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = Optional64->SizeOfImage - sizeof (EFI_IMAGE_BASE_RELOCATION);
- }
+ //
+ // PeImage can be loaded into memory, but it has no relocation section.
+ // Fix TeImage Header to set VA of relocation data directory to not zero, the size is still zero.
+ //
+ if (Optional32 != NULL) {
+ TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = Optional32->SizeOfImage - sizeof (EFI_IMAGE_BASE_RELOCATION);
+ } else if (Optional64 != NULL) {
+ TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = Optional64->SizeOfImage - sizeof (EFI_IMAGE_BASE_RELOCATION);
+ }
}
//
@@ -3102,40 +3458,54 @@ Returns:
}
DebugMsg (NULL, 0, 9, "TeImage Header Info", "Machine type is %X, Number of sections is %X, Stripped size is %X, EntryPoint is %X, BaseOfCode is %X, ImageBase is %llX",
- TEImageHeader.Machine, TEImageHeader.NumberOfSections, TEImageHeader.StrippedSize, (unsigned) TEImageHeader.AddressOfEntryPoint, (unsigned) TEImageHeader.BaseOfCode, (unsigned long long) TEImageHeader.ImageBase);
+ TEImageHeader.Machine, TEImageHeader.NumberOfSections, TEImageHeader.StrippedSize, (unsigned) TEImageHeader.AddressOfEntryPoint, (unsigned) TEImageHeader.BaseOfCode, (unsigned long long) TEImageHeader.ImageBase);
//
// Update Image to TeImage
//
- if (fpOut != NULL) {
- fwrite (&TEImageHeader, 1, sizeof (EFI_TE_IMAGE_HEADER), fpOut);
- fwrite (FileBuffer + TEImageHeader.StrippedSize, 1, FileLength - TEImageHeader.StrippedSize, fpOut);
- }
- if (fpInOut != NULL) {
- fwrite (&TEImageHeader, 1, sizeof (EFI_TE_IMAGE_HEADER), fpInOut);
- fwrite (FileBuffer + TEImageHeader.StrippedSize, 1, FileLength - TEImageHeader.StrippedSize, fpInOut);
- }
- VerboseMsg ("the size of output file is %u bytes", (unsigned) (FileLength - TEImageHeader.StrippedSize));
- goto Finish;
+ FileLength = FileLength - TEImageHeader.StrippedSize;
+ memcpy (FileBuffer + sizeof (EFI_TE_IMAGE_HEADER), FileBuffer + TEImageHeader.StrippedSize, FileLength);
+ FileLength = FileLength + sizeof (EFI_TE_IMAGE_HEADER);
+ memcpy (FileBuffer, &TEImageHeader, sizeof (EFI_TE_IMAGE_HEADER));
+ VerboseMsg ("the size of output file is %u bytes", (unsigned) (FileLength));
}
+
WriteFile:
//
- // Update Image to EfiImage
+ // Update Image to EfiImage or TE image
//
- if (fpOut != NULL) {
- fwrite (FileBuffer, 1, FileLength, fpOut);
- }
- if (fpInOut != NULL) {
- fwrite (FileBuffer, 1, FileLength, fpInOut);
+ if (ReplaceFlag) {
+ if ((FileLength != InputFileLength) || (memcmp (FileBuffer, InputFileBuffer, FileLength) != 0)) {
+ //
+ // Update File when File is changed.
+ //
+ fpInOut = fopen (mInImageName, "wb");
+ if (fpInOut == NULL) {
+ Error (NULL, 0, 0001, "Error opening file", mInImageName);
+ goto Finish;
+ }
+ fwrite (FileBuffer, 1, FileLength, fpInOut);
+ VerboseMsg ("the size of output file is %u bytes", (unsigned) FileLength);
+ }
+ } else {
+ if ((FileLength != OutputFileLength) || (memcmp (FileBuffer, OutputFileBuffer, FileLength) != 0)) {
+ fpOut = fopen (OutImageName, "wb");
+ if (fpOut == NULL) {
+ Error (NULL, 0, 0001, "Error opening output file", OutImageName);
+ goto Finish;
+ }
+ fwrite (FileBuffer, 1, FileLength, fpOut);
+ VerboseMsg ("the size of output file is %u bytes", (unsigned) FileLength);
+ }
}
- VerboseMsg ("the size of output file is %u bytes", (unsigned) FileLength);
+ mImageSize = FileLength;
Finish:
if (fpInOut != NULL) {
if (GetUtilityStatus () != STATUS_SUCCESS) {
//
- // when file updates failed, original file is still recoveried.
+ // when file updates failed, original file is still recovered.
//
- fwrite (FileBuffer, 1, FileLength, fpInOut);
+ fwrite (InputFileBuffer, 1, InputFileLength, fpInOut);
}
//
// Write converted data into fpInOut file and close input file.
@@ -3163,11 +3533,38 @@ Finish:
fpOut = fopen (OutImageName, "wb");
fwrite (OutputFileBuffer, 1, OutputFileLength, fpOut);
fclose (fpOut);
- free (OutputFileBuffer);
}
}
}
+
+ if (InputFileBuffer != NULL) {
+ free (InputFileBuffer);
+ }
+
+ if (OutputFileBuffer != NULL) {
+ free (OutputFileBuffer);
+ }
+ //
+ // Write module size and time stamp to report file.
+ //
+ if (OutImageName != NULL) {
+ FileLen = strlen (OutImageName);
+ }
+ if (FileLen >= 4 && strcmp (OutImageName + (FileLen - 4), ".efi") == 0) {
+ ReportFileName = (CHAR8 *) malloc (FileLen + 1);
+ if (ReportFileName != NULL) {
+ strcpy (ReportFileName, OutImageName);
+ strcpy (ReportFileName + (FileLen - 4), ".txt");
+ ReportFile = fopen (ReportFileName, "w+");
+ if (ReportFile != NULL) {
+ fprintf (ReportFile, "MODULE_SIZE = %u\n", (unsigned) mImageSize);
+ fprintf (ReportFile, "TIME_STAMP = %u\n", (unsigned) mImageTimeStamp);
+ fclose(ReportFile);
+ }
+ free (ReportFileName);
+ }
+ }
VerboseMsg ("%s tool done with return code is 0x%x.", UTILITY_NAME, GetUtilityStatus ());
return GetUtilityStatus ();
@@ -3302,7 +3699,7 @@ Returns:
//Zero Debug Data and TimeStamp
//
FileHdr->TimeDateStamp = 0;
-
+ mImageTimeStamp = 0;
if (ExportDirectoryEntryFileOffset != 0) {
NewTimeStamp = (UINT32 *) (FileBuffer + ExportDirectoryEntryFileOffset + sizeof (UINT32));
*NewTimeStamp = 0;
@@ -3316,6 +3713,7 @@ Returns:
if (DebugDirectoryEntryFileOffset != 0) {
DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *) (FileBuffer + DebugDirectoryEntryFileOffset);
DebugEntry->TimeDateStamp = 0;
+ mImageTimeStamp = 0;
if (ZeroDebugFlag) {
memset (FileBuffer + DebugEntry->FileOffset, 0, DebugEntry->SizeOfData);
memset (DebugEntry, 0, sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY));
@@ -3542,7 +3940,7 @@ Returns:
// Set new stamp
//
FileHdr->TimeDateStamp = (UINT32) newtime;
-
+ mImageTimeStamp = (UINT32) newtime;
if (ExportDirectoryEntryRva != 0) {
NewTimeStamp = (UINT32 *) (FileBuffer + ExportDirectoryEntryFileOffset + sizeof (UINT32));
*NewTimeStamp = (UINT32) newtime;
diff --git a/BaseTools/Source/C/GenFw/elf32.h b/BaseTools/Source/C/GenFw/elf32.h
index 9e47123533..0edba15b81 100644
--- a/BaseTools/Source/C/GenFw/elf32.h
+++ b/BaseTools/Source/C/GenFw/elf32.h
@@ -1,3 +1,17 @@
+/** @file
+Ported ELF include files from FreeBSD
+
+Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+
+**/
/*-
* Copyright (c) 1996-1998 John D. Polstra.
* All rights reserved.
diff --git a/BaseTools/Source/C/GenFw/elf64.h b/BaseTools/Source/C/GenFw/elf64.h
index 9960888940..ba8e85fb12 100644
--- a/BaseTools/Source/C/GenFw/elf64.h
+++ b/BaseTools/Source/C/GenFw/elf64.h
@@ -1,3 +1,16 @@
+/** @file
+Ported ELF include files from FreeBSD
+
+Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
/*-
* Copyright (c) 1996-1998 John D. Polstra.
* All rights reserved.
diff --git a/BaseTools/Source/C/GenFw/elf_common.h b/BaseTools/Source/C/GenFw/elf_common.h
index 471c2650a1..1cd3f53907 100644
--- a/BaseTools/Source/C/GenFw/elf_common.h
+++ b/BaseTools/Source/C/GenFw/elf_common.h
@@ -1,3 +1,17 @@
+/** @file
+Ported ELF include files from FreeBSD
+
+Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+
+**/
/*-
* Copyright (c) 1998 John D. Polstra.
* All rights reserved.
diff --git a/BaseTools/Source/C/GenPage/GenPage.c b/BaseTools/Source/C/GenPage/GenPage.c
index dac55889d5..abcb5e827c 100644
--- a/BaseTools/Source/C/GenPage/GenPage.c
+++ b/BaseTools/Source/C/GenPage/GenPage.c
@@ -1,6 +1,6 @@
/** @file
-Copyright 2006 - 2008, Intel Corporation
+Copyright 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -92,7 +92,7 @@ Returns:
--*/
{
printf ("%s v%d.%d -Utility to generate the EfiLoader image containing page table.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
- printf ("Copyright (c) 2008 - 2009 Intel Corporation. All rights reserved.\n");
+ printf ("Copyright (c) 2008 - 2010 Intel Corporation. All rights reserved.\n");
}
VOID
diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c
index 9a1d0ca48a..8c4f8743fd 100644
--- a/BaseTools/Source/C/GenSec/GenSec.c
+++ b/BaseTools/Source/C/GenSec/GenSec.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2008, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -27,6 +27,7 @@ Abstract:
#include <Common/UefiBaseTypes.h>
#include <Common/PiFirmwareFile.h>
#include <Protocol/GuidedSectionExtraction.h>
+#include <IndustryStandard/PeImage.h>
#include "CommonLib.h"
#include "Compress.h"
@@ -80,6 +81,11 @@ STATIC CHAR8 *mCompressionTypeName[] = { "PI_NONE", "PI_STD" };
#define EFI_GUIDED_SECTION_NONE 0x80
STATIC CHAR8 *mGUIDedSectionAttribue[] = { "NONE", "PROCESSING_REQUIRED", "AUTH_STATUS_VALID"};
+STATIC CHAR8 *mAlignName[] = {
+ "1", "2", "4", "8", "16", "32", "64", "128", "256", "512",
+ "1K", "2K", "4K", "8K", "16K", "32K", "64K"
+};
+
//
// Crc32 GUID section related definitions.
//
@@ -144,7 +150,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
@@ -180,6 +186,10 @@ Returns:
fprintf (stdout, " -j Number, --buildnumber Number\n\
Number is an integer value between 0000 and 9999\n\
used in Ver section.\n");
+ fprintf (stdout, " --sectionalign SectionAlign\n\
+ SectionAlign points to section alignment, which support\n\
+ the alignment scope 1~64K. It is specified in same\n\
+ order that the section file is input.\n");
fprintf (stdout, " -v, --verbose Turn on verbose output with informational messages.\n");
fprintf (stdout, " -q, --quiet Disable all messages except key message and fatal error\n");
fprintf (stdout, " -d, --debug level Enable debug messages, at input debug level.\n");
@@ -329,9 +339,50 @@ Done:
return Status;
}
+STATIC
+EFI_STATUS
+StringtoAlignment (
+ IN CHAR8 *AlignBuffer,
+ OUT UINT32 *AlignNumber
+ )
+/*++
+
+Routine Description:
+
+ Converts Align String to align value (1~64K).
+
+Arguments:
+
+ AlignBuffer - Pointer to Align string.
+ AlignNumber - Pointer to Align value.
+
+Returns:
+
+ EFI_SUCCESS Successfully convert align string to align value.
+ EFI_INVALID_PARAMETER Align string is invalid or align value is not in scope.
+
+--*/
+{
+ UINT32 Index = 0;
+ //
+ // Check AlignBuffer
+ //
+ if (AlignBuffer == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+ for (Index = 0; Index < sizeof (mAlignName) / sizeof (CHAR8 *); Index ++) {
+ if (stricmp (AlignBuffer, mAlignName [Index]) == 0) {
+ *AlignNumber = 1 << Index;
+ return EFI_SUCCESS;
+ }
+ }
+ return EFI_INVALID_PARAMETER;
+}
+
EFI_STATUS
GetSectionContents (
CHAR8 **InputFileName,
+ UINT32 *InputFileAlign,
UINT32 InputFileNum,
UINT8 *FileBuffer,
UINT32 *BufferLength
@@ -346,7 +397,9 @@ Routine Description:
Arguments:
InputFileName - Name of the input file.
-
+
+ InputFileAlign - Alignment required by the input file data.
+
InputFileNum - Number of input files. Should be at least 1.
FileBuffer - Output buffer to contain data
@@ -362,10 +415,17 @@ Returns:
EFI_BUFFER_TOO_SMALL FileBuffer is not enough to contain all file data.
--*/
{
- UINT32 Size;
- UINT32 FileSize;
- UINT32 Index;
- FILE *InFile;
+ UINT32 Size;
+ UINT32 Offset;
+ UINT32 FileSize;
+ UINT32 Index;
+ FILE *InFile;
+ EFI_COMMON_SECTION_HEADER *SectHeader;
+ EFI_COMMON_SECTION_HEADER TempSectHeader;
+ EFI_TE_IMAGE_HEADER TeHeader;
+ UINT32 TeOffset;
+ EFI_GUID_DEFINED_SECTION GuidSectHeader;
+ UINT32 HeaderSize;
if (InputFileNum < 1) {
Error (NULL, 0, 2000, "Invalid paramter", "must specify at least one input file");
@@ -377,7 +437,9 @@ Returns:
return EFI_INVALID_PARAMETER;
}
- Size = 0;
+ Size = 0;
+ Offset = 0;
+ TeOffset = 0;
//
// Go through our array of file names and copy their contents
// to the output buffer.
@@ -407,10 +469,65 @@ Returns:
fseek (InFile, 0, SEEK_SET);
DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %u bytes", InputFileName[Index], (unsigned) FileSize);
//
+ // Adjust section buffer when section alignment is required.
+ //
+ if (InputFileAlign != NULL) {
+ //
+ // Check this section is Te/Pe section, and Calculate the numbers of Te/Pe section.
+ //
+ TeOffset = 0;
+ HeaderSize = sizeof (EFI_COMMON_SECTION_HEADER);
+ fread (&TempSectHeader, 1, sizeof (TempSectHeader), InFile);
+ if (TempSectHeader.Type == EFI_SECTION_TE) {
+ fread (&TeHeader, 1, sizeof (TeHeader), InFile);
+ if (TeHeader.Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) {
+ TeOffset = TeHeader.StrippedSize - sizeof (TeHeader);
+ }
+ } else if (TempSectHeader.Type == EFI_SECTION_GUID_DEFINED) {
+ fseek (InFile, 0, SEEK_SET);
+ fread (&GuidSectHeader, 1, sizeof (GuidSectHeader), InFile);
+ if ((GuidSectHeader.Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) == 0) {
+ HeaderSize = GuidSectHeader.DataOffset;
+ }
+ }
+
+ fseek (InFile, 0, SEEK_SET);
+
+ //
+ // Revert TeOffset to the converse value relative to Alignment
+ // This is to assure the original PeImage Header at Alignment.
+ //
+ if (TeOffset != 0) {
+ TeOffset = InputFileAlign [Index] - (TeOffset % InputFileAlign [Index]);
+ TeOffset = TeOffset % InputFileAlign [Index];
+ }
+
+ //
+ // make sure section data meet its alignment requirement by adding one raw pad section.
+ //
+ if ((InputFileAlign [Index] != 0) && (((Size + HeaderSize + TeOffset) % InputFileAlign [Index]) != 0)) {
+ Offset = (Size + sizeof (EFI_COMMON_SECTION_HEADER) + HeaderSize + TeOffset + InputFileAlign [Index] - 1) & ~(InputFileAlign [Index] - 1);
+ Offset = Offset - Size - HeaderSize - TeOffset;
+
+ if (FileBuffer != NULL && ((Size + Offset) < *BufferLength)) {
+ memset (FileBuffer + Size, 0, Offset);
+ SectHeader = (EFI_COMMON_SECTION_HEADER *) (FileBuffer + Size);
+ SectHeader->Type = EFI_SECTION_RAW;
+ SectHeader->Size[0] = (UINT8) (Offset & 0xff);
+ SectHeader->Size[1] = (UINT8) ((Offset & 0xff00) >> 8);
+ SectHeader->Size[2] = (UINT8) ((Offset & 0xff0000) >> 16);
+ }
+ DebugMsg (NULL, 0, 9, "Pad raw section for section data alignment", "Pad Raw section size is %u", (unsigned) Offset);
+
+ Size = Size + Offset;
+ }
+ }
+
+ //
// Now read the contents of the file into the buffer
// Buffer must be enough to contain the file content.
//
- if (FileSize > 0 && FileBuffer != NULL && (Size + FileSize) <= *BufferLength) {
+ if ((FileSize > 0) && (FileBuffer != NULL) && ((Size + FileSize) <= *BufferLength)) {
if (fread (FileBuffer + Size, (size_t) FileSize, 1, InFile) != 1) {
Error (NULL, 0, 0004, "Error reading file", InputFileName[Index]);
fclose (InFile);
@@ -437,6 +554,7 @@ Returns:
EFI_STATUS
GenSectionCompressionSection (
CHAR8 **InputFileName,
+ UINT32 *InputFileAlign,
UINT32 InputFileNum,
UINT8 SectCompSubType,
UINT8 **OutFileBuffer
@@ -453,7 +571,9 @@ Routine Description:
Arguments:
InputFileName - Name of the input file.
-
+
+ InputFileAlign - Alignment required by the input file data.
+
InputFileNum - Number of input files. Should be at least 1.
SectCompSubType - Specify the compression algorithm requested.
@@ -487,6 +607,7 @@ Returns:
//
Status = GetSectionContents (
InputFileName,
+ InputFileAlign,
InputFileNum,
FileBuffer,
&InputLength
@@ -503,6 +624,7 @@ Returns:
//
Status = GetSectionContents (
InputFileName,
+ InputFileAlign,
InputFileNum,
FileBuffer,
&InputLength
@@ -524,6 +646,16 @@ Returns:
switch (SectCompSubType) {
case EFI_NOT_COMPRESSED:
CompressedLength = InputLength;
+ //
+ // Copy file buffer to the none compressed data.
+ //
+ OutputBuffer = malloc (CompressedLength + sizeof (EFI_COMPRESSION_SECTION));
+ if (OutputBuffer == NULL) {
+ free (FileBuffer);
+ return EFI_OUT_OF_RESOURCES;
+ }
+ memcpy (OutputBuffer + sizeof (EFI_COMPRESSION_SECTION), FileBuffer, CompressedLength);
+ FileBuffer = OutputBuffer;
break;
case EFI_STANDARD_COMPRESSION:
@@ -599,6 +731,7 @@ Returns:
EFI_STATUS
GenSectionGuidDefinedSection (
CHAR8 **InputFileName,
+ UINT32 *InputFileAlign,
UINT32 InputFileNum,
EFI_GUID *VendorGuid,
UINT16 DataAttribute,
@@ -618,6 +751,8 @@ Arguments:
InputFileName - Name of the input file.
+ InputFileAlign - Alignment required by the input file data.
+
InputFileNum - Number of input files. Should be at least 1.
VendorGuid - Specify vendor guid value.
@@ -662,6 +797,7 @@ Returns:
//
Status = GetSectionContents (
InputFileName,
+ InputFileAlign,
InputFileNum,
FileBuffer,
&InputLength
@@ -678,6 +814,7 @@ Returns:
//
Status = GetSectionContents (
InputFileName,
+ InputFileAlign,
InputFileNum,
FileBuffer + Offset,
&InputLength
@@ -797,7 +934,11 @@ Returns:
UINT8 *OutFileBuffer;
EFI_STATUS Status;
UINT64 LogLevel;
-
+ UINT32 *InputFileAlign;
+ UINT32 InputFileAlignNum;
+
+ InputFileAlign = NULL;
+ InputFileAlignNum = 0;
InputFileName = NULL;
OutputFileName = NULL;
SectionName = NULL;
@@ -809,7 +950,7 @@ Returns:
InputFileNum = 0;
SectType = EFI_SECTION_ALL;
SectCompSubType = 0;
- SectGuidAttribute = 0;
+ SectGuidAttribute = EFI_GUIDED_SECTION_NONE;
OutFileBuffer = NULL;
InputLength = 0;
Status = STATUS_SUCCESS;
@@ -984,6 +1125,41 @@ Returns:
}
//
+ // Section File alignment requirement
+ //
+ if (stricmp (argv[0], "--sectionalign") == 0) {
+ if (InputFileAlignNum == 0) {
+ InputFileAlign = (UINT32 *) malloc (MAXIMUM_INPUT_FILE_NUM * sizeof (UINT32));
+ if (InputFileAlign == NULL) {
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");
+ return 1;
+ }
+ memset (InputFileAlign, 1, MAXIMUM_INPUT_FILE_NUM * sizeof (UINT32));
+ } else if (InputFileAlignNum % MAXIMUM_INPUT_FILE_NUM == 0) {
+ InputFileAlign = (UINT32 *) realloc (
+ InputFileAlign,
+ (InputFileNum + MAXIMUM_INPUT_FILE_NUM) * sizeof (UINT32)
+ );
+
+ if (InputFileAlign == NULL) {
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");
+ return 1;
+ }
+ memset (&(InputFileAlign[InputFileNum]), 1, (MAXIMUM_INPUT_FILE_NUM * sizeof (UINT32)));
+ }
+
+ Status = StringtoAlignment (argv[1], &(InputFileAlign[InputFileAlignNum]));
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);
+ goto Finish;
+ }
+ argc -= 2;
+ argv += 2;
+ InputFileAlignNum ++;
+ continue;
+ }
+
+ //
// Get Input file name
//
if ((InputFileNum == 0) && (InputFileName == NULL)) {
@@ -992,7 +1168,6 @@ Returns:
Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");
return 1;
}
-
memset (InputFileName, 0, (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *)));
} else if (InputFileNum % MAXIMUM_INPUT_FILE_NUM == 0) {
//
@@ -1007,7 +1182,6 @@ Returns:
Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");
return 1;
}
-
memset (&(InputFileName[InputFileNum]), 0, (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *)));
}
@@ -1016,6 +1190,11 @@ Returns:
argv ++;
}
+ if (InputFileAlignNum > 0 && InputFileAlignNum != InputFileNum) {
+ Error (NULL, 0, 1003, "Invalid option", "section alignment must be set for each section");
+ goto Finish;
+ }
+
VerboseMsg ("%s tool start.", UTILITY_NAME);
//
@@ -1050,14 +1229,11 @@ Returns:
memcpy (&VendorGuid, &mEfiCrc32SectionGuid, sizeof (EFI_GUID));
}
- if (SectGuidAttribute == 0) {
- SectGuidAttribute = EFI_GUIDED_SECTION_PROCESSING_REQUIRED;
- }
if ((SectGuidAttribute & EFI_GUIDED_SECTION_NONE) != 0) {
//
// NONE attribute, clear attribute value.
//
- SectGuidAttribute = 0;
+ SectGuidAttribute = SectGuidAttribute & ~EFI_GUIDED_SECTION_NONE;
}
VerboseMsg ("Vendor Guid is %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
(unsigned) VendorGuid.Data1,
@@ -1161,8 +1337,13 @@ Returns:
//
switch (SectType) {
case EFI_SECTION_COMPRESSION:
+ if (InputFileAlign != NULL) {
+ free (InputFileAlign);
+ InputFileAlign = NULL;
+ }
Status = GenSectionCompressionSection (
InputFileName,
+ InputFileAlign,
InputFileNum,
SectCompSubType,
&OutFileBuffer
@@ -1170,8 +1351,17 @@ Returns:
break;
case EFI_SECTION_GUID_DEFINED:
+ if (InputFileAlign != NULL && (CompareGuid (&VendorGuid, &mEfiCrc32SectionGuid) != 0)) {
+ //
+ // Only process alignment for the default known CRC32 guided section.
+ // For the unknown guided section, the alignment is processed when the dummy all section (EFI_SECTION_ALL) is generated.
+ //
+ free (InputFileAlign);
+ InputFileAlign = NULL;
+ }
Status = GenSectionGuidDefinedSection (
InputFileName,
+ InputFileAlign,
InputFileNum,
&VendorGuid,
SectGuidAttribute,
@@ -1232,6 +1422,7 @@ Returns:
//
Status = GetSectionContents (
InputFileName,
+ InputFileAlign,
InputFileNum,
OutFileBuffer,
&InputLength
@@ -1248,6 +1439,7 @@ Returns:
//
Status = GetSectionContents (
InputFileName,
+ InputFileAlign,
InputFileNum,
OutFileBuffer,
&InputLength
@@ -1296,6 +1488,10 @@ Finish:
free (InputFileName);
}
+ if (InputFileAlign != NULL) {
+ free (InputFileAlign);
+ }
+
if (OutFileBuffer != NULL) {
free (OutFileBuffer);
}
diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c
index 2e417bf563..72fb109fa6 100644
--- a/BaseTools/Source/C/GenVtf/GenVtf.c
+++ b/BaseTools/Source/C/GenVtf/GenVtf.c
@@ -1,6 +1,6 @@
/**
-Copyright (c) 1999-2008 Intel Corporation. All rights reserved
+Copyright (c) 1999-2010 Intel Corporation. All rights reserved
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@@ -342,7 +342,6 @@ Returns:
VtfInfo->LocationType = SECOND_VTF;
} else {
VtfInfo->LocationType = NONE;
- Warning(UTILITY_NAME, 0, 0001, "Unknown location for component.", VtfInfo->CompName);
}
} else if (strnicmp (*TokenStr, "COMP_TYPE", 9) == 0) {
TokenStr++;
@@ -2408,7 +2407,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
//
diff --git a/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c b/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c
index 6a25bee957..9e32892d6a 100644
--- a/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c
+++ b/BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c
@@ -1,6 +1,6 @@
/** @file
-Copyright 2006 - 2009, Intel Corporation
+Copyright 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -273,7 +273,7 @@ Version (
)
{
printf ("%s v%d.%d -Utility to retrieve and update the boot sector or MBR.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
- printf ("Copyright (c) 2007-2009 Intel Corporation. All rights reserved.\n");
+ printf ("Copyright (c) 2007-2010 Intel Corporation. All rights reserved.\n");
}
diff --git a/BaseTools/Source/C/Include/Common/PiFirmwareFile.h b/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
index 33b5645b12..4db99dcac5 100644
--- a/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
+++ b/BaseTools/Source/C/Include/Common/PiFirmwareFile.h
@@ -68,12 +68,10 @@ typedef UINT8 EFI_FFS_FILE_STATE;
#define FFS_ATTRIB_DATA_ALIGNMENT 0x38
#define FFS_ATTRIB_CHECKSUM 0x40
//
-// FFS_FIXED_CHECKSUM is the default checksum value used when the
+// FFS_FIXED_CHECKSUM is the checksum value used when the
// FFS_ATTRIB_CHECKSUM attribute bit is clear
-// note this is NOT an architecturally defined value, but is in this file for
-// implementation convenience
//
-#define FFS_FIXED_CHECKSUM 0x5A
+#define FFS_FIXED_CHECKSUM 0xAA
//
// FFS File State Bits.
diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
index e76ffd317c..9f38247141 100644
--- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
+++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
@@ -3,7 +3,7 @@
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers
- Copyright (c) 2006 - 2009, Intel Corporation All rights reserved.
+ Copyright (c) 2006 - 2010, Intel Corporation All rights reserved.
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -618,6 +618,7 @@ typedef union {
#define EFI_IFR_DISABLE_IF_OP 0x1E
#define EFI_IFR_TO_LOWER_OP 0x20
#define EFI_IFR_TO_UPPER_OP 0x21
+#define EFI_IFR_MAP_OP 0x22
#define EFI_IFR_ORDERED_LIST_OP 0x23
#define EFI_IFR_VARSTORE_OP 0x24
#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
@@ -626,6 +627,10 @@ typedef union {
#define EFI_IFR_VERSION_OP 0x28
#define EFI_IFR_END_OP 0x29
#define EFI_IFR_MATCH_OP 0x2A
+#define EFI_IFR_GET_OP 0x2B
+#define EFI_IFR_SET_OP 0x2C
+#define EFI_IFR_READ_OP 0x2D
+#define EFI_IFR_WRITE_OP 0x2E
#define EFI_IFR_EQUAL_OP 0x2F
#define EFI_IFR_NOT_EQUAL_OP 0x30
#define EFI_IFR_GREATER_THAN_OP 0x31
@@ -672,6 +677,7 @@ typedef union {
#define EFI_IFR_VALUE_OP 0x5A
#define EFI_IFR_DEFAULT_OP 0x5B
#define EFI_IFR_DEFAULTSTORE_OP 0x5C
+#define EFI_IFR_FORM_MAP_OP 0x5D
#define EFI_IFR_CATENATE_OP 0x5E
#define EFI_IFR_GUID_OP 0x5F
#define EFI_IFR_SECURITY_OP 0x60
@@ -730,14 +736,14 @@ typedef struct _EFI_IFR_VARSTORE {
typedef struct _EFI_IFR_VARSTORE_EFI {
EFI_IFR_OP_HEADER Header;
- UINT16 VarStoreId;
+ EFI_VARSTORE_ID VarStoreId;
EFI_GUID Guid;
UINT32 Attributes;
} EFI_IFR_VARSTORE_EFI;
typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
EFI_IFR_OP_HEADER Header;
- UINT16 VarStoreId;
+ EFI_VARSTORE_ID VarStoreId;
EFI_GUID Guid;
} EFI_IFR_VARSTORE_NAME_VALUE;
@@ -747,7 +753,7 @@ typedef struct _EFI_IFR_FORM_SET {
EFI_STRING_ID FormSetTitle;
EFI_STRING_ID Help;
UINT8 Flags;
- EFI_GUID ClassGuid[1];
+ // EFI_GUID ClassGuid[];
} EFI_IFR_FORM_SET;
typedef struct _EFI_IFR_END {
@@ -1009,6 +1015,9 @@ typedef struct _EFI_IFR_ONE_OF_OPTION {
#define EFI_IFR_TYPE_DATE 0x06
#define EFI_IFR_TYPE_STRING 0x07
#define EFI_IFR_TYPE_OTHER 0x08
+#define EFI_IFR_TYPE_UNDEFINED 0x09
+#define EFI_IFR_TYPE_ACTION 0x0A
+#define EFI_IFR_TYPE_BUFFER 0x0B
#define EFI_IFR_OPTION_DEFAULT 0x10
#define EFI_IFR_OPTION_DEFAULT_MFG 0x20
@@ -1288,6 +1297,100 @@ typedef struct _EFI_IFR_SECURITY {
EFI_GUID Permissions;
} EFI_IFR_SECURITY;
+typedef struct _EFI_IFR_FORM_MAP_METHOD {
+ ///
+ /// The string identifier which provides the human-readable name of
+ /// the configuration method for this standards map form.
+ ///
+ EFI_STRING_ID MethodTitle;
+ ///
+ /// Identifier which uniquely specifies the configuration methods
+ /// associated with this standards map form.
+ ///
+ EFI_GUID MethodIdentifier;
+} EFI_IFR_FORM_MAP_METHOD;
+
+typedef struct _EFI_IFR_FORM_MAP {
+ ///
+ /// The sequence that defines the type of opcode as well as the length
+ /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
+ ///
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// The unique identifier for this particular form.
+ ///
+ EFI_FORM_ID FormId;
+ ///
+ /// One or more configuration method's name and unique identifier.
+ ///
+ // EFI_IFR_FORM_MAP_METHOD Methods[];
+} EFI_IFR_FORM_MAP;
+
+typedef struct _EFI_IFR_SET {
+ ///
+ /// The sequence that defines the type of opcode as well as the length
+ /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
+ ///
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// Specifies the identifier of a previously declared variable store to
+ /// use when storing the question's value.
+ ///
+ EFI_VARSTORE_ID VarStoreId;
+ union {
+ ///
+ /// A 16-bit Buffer Storage offset.
+ ///
+ EFI_STRING_ID VarName;
+ ///
+ /// A Name Value or EFI Variable name (VarName).
+ ///
+ UINT16 VarOffset;
+ } VarStoreInfo;
+ ///
+ /// Specifies the type used for storage.
+ ///
+ UINT8 VarStoreType;
+} EFI_IFR_SET;
+
+typedef struct _EFI_IFR_GET {
+ ///
+ /// The sequence that defines the type of opcode as well as the length
+ /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
+ ///
+ EFI_IFR_OP_HEADER Header;
+ ///
+ /// Specifies the identifier of a previously declared variable store to
+ /// use when retrieving the value.
+ ///
+ EFI_VARSTORE_ID VarStoreId;
+ union {
+ ///
+ /// A 16-bit Buffer Storage offset.
+ ///
+ EFI_STRING_ID VarName;
+ ///
+ /// A Name Value or EFI Variable name (VarName).
+ ///
+ UINT16 VarOffset;
+ } VarStoreInfo;
+ ///
+ /// Specifies the type used for storage.
+ ///
+ UINT8 VarStoreType;
+} EFI_IFR_GET;
+
+typedef struct _EFI_IFR_READ {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_READ;
+
+typedef struct _EFI_IFR_WRITE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_WRITE;
+
+typedef struct _EFI_IFR_MAP {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MAP;
//
// Keyboard Package
//
diff --git a/BaseTools/Source/C/Makefiles/NmakeSubdirs.bat b/BaseTools/Source/C/Makefiles/NmakeSubdirs.bat
index cacb50baa9..8fc4bcdb41 100644
--- a/BaseTools/Source/C/Makefiles/NmakeSubdirs.bat
+++ b/BaseTools/Source/C/Makefiles/NmakeSubdirs.bat
@@ -1,3 +1,15 @@
+@REM ## @file
+@REM #
+@REM # Copyright (c) 2007 - 2010, Intel Corporation
+@REM # All rights reserved. This program and the accompanying materials
+@REM # are licensed and made available under the terms and conditions of the BSD License
+@REM # which accompanies this distribution. The full text of the license may be found at
+@REM # http://opensource.org/licenses/bsd-license.php
+@REM #
+@REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+@REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+
@echo off
setlocal
SET NMAKE_COMMAND=%1
diff --git a/BaseTools/Source/C/Makefiles/app.makefile b/BaseTools/Source/C/Makefiles/app.makefile
index 2f95003646..96fd09480f 100644
--- a/BaseTools/Source/C/Makefiles/app.makefile
+++ b/BaseTools/Source/C/Makefiles/app.makefile
@@ -1,3 +1,15 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
MAKEROOT ?= ../..
include $(MAKEROOT)/Makefiles/header.makefile
diff --git a/BaseTools/Source/C/Makefiles/footer.makefile b/BaseTools/Source/C/Makefiles/footer.makefile
index 7bdf49c1af..7877ebc149 100644
--- a/BaseTools/Source/C/Makefiles/footer.makefile
+++ b/BaseTools/Source/C/Makefiles/footer.makefile
@@ -1,3 +1,14 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
DEPFILES = $(OBJECTS:%.o=%.d)
$(MAKEROOT)/libs-$(ARCH):
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
index 5f69e7b04e..006a0716ca 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -1,8 +1,19 @@
+## @file
+#
# The makefile can be invoked with
# ARCH = x86_64 or x64 for EM64T build
# ARCH = ia32 or IA32 for IA32 build
# ARCH = ia64 or IA64 for IA64 build
#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
ARCH ?= IA32
CYGWIN:=$(findstring CYGWIN, $(shell uname -s))
diff --git a/BaseTools/Source/C/Makefiles/lib.makefile b/BaseTools/Source/C/Makefiles/lib.makefile
index 2b1a9d4289..3d49107183 100644
--- a/BaseTools/Source/C/Makefiles/lib.makefile
+++ b/BaseTools/Source/C/Makefiles/lib.makefile
@@ -1,3 +1,14 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
include $(MAKEROOT)/Makefiles/header.makefile
LIBRARY = $(MAKEROOT)/libs/lib$(LIBNAME).a
diff --git a/BaseTools/Source/C/Makefiles/ms.app b/BaseTools/Source/C/Makefiles/ms.app
index fabc0bc656..05c68ed53a 100644
--- a/BaseTools/Source/C/Makefiles/ms.app
+++ b/BaseTools/Source/C/Makefiles/ms.app
@@ -1,3 +1,14 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
!INCLUDE ..\Makefiles\ms.common
APPLICATION = $(BIN_PATH)\$(APPNAME).exe
diff --git a/BaseTools/Source/C/Makefiles/ms.common b/BaseTools/Source/C/Makefiles/ms.common
index 1523ce75ca..83372a8ab0 100644
--- a/BaseTools/Source/C/Makefiles/ms.common
+++ b/BaseTools/Source/C/Makefiles/ms.common
@@ -1,3 +1,14 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
!IFNDEF EDK_TOOLS_PATH
!ERROR "Please set your EDK_TOOLS_PATH!"
!ENDIF
diff --git a/BaseTools/Source/C/Makefiles/ms.lib b/BaseTools/Source/C/Makefiles/ms.lib
index 79fdf55e41..dd9ef74aee 100644
--- a/BaseTools/Source/C/Makefiles/ms.lib
+++ b/BaseTools/Source/C/Makefiles/ms.lib
@@ -1,3 +1,14 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
!INCLUDE ..\Makefiles\ms.common
LIBRARY = $(LIB_PATH)\$(LIBNAME).lib
diff --git a/BaseTools/Source/C/Makefiles/ms.rule b/BaseTools/Source/C/Makefiles/ms.rule
index 94687a075d..7702cfac54 100644
--- a/BaseTools/Source/C/Makefiles/ms.rule
+++ b/BaseTools/Source/C/Makefiles/ms.rule
@@ -1,3 +1,14 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
#DEPFILES = $(OBJECTS:%.o=%.d)
.c.obj :
diff --git a/BaseTools/Source/C/PyEfiCompressor/EfiCompressor.c b/BaseTools/Source/C/PyEfiCompressor/EfiCompressor.c
index 38a81c3c27..0abf11ed06 100644
--- a/BaseTools/Source/C/PyEfiCompressor/EfiCompressor.c
+++ b/BaseTools/Source/C/PyEfiCompressor/EfiCompressor.c
@@ -1,3 +1,16 @@
+/** @file
+
+Copyright (c) 2009 - 2010 Intel Corporation. All rights reserved
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
#include <Python.h>
#include <Decompress.h>
diff --git a/BaseTools/Source/C/PyEfiCompressor/Makefile b/BaseTools/Source/C/PyEfiCompressor/Makefile
index 502735bfea..c0bc5438c1 100644
--- a/BaseTools/Source/C/PyEfiCompressor/Makefile
+++ b/BaseTools/Source/C/PyEfiCompressor/Makefile
@@ -1,3 +1,14 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
!INCLUDE ..\Makefiles\ms.common
APPNAME = GenSec
diff --git a/BaseTools/Source/C/PyUtility/Makefile b/BaseTools/Source/C/PyUtility/Makefile
index 8f50ae1aeb..51ce9bcf34 100644
--- a/BaseTools/Source/C/PyUtility/Makefile
+++ b/BaseTools/Source/C/PyUtility/Makefile
@@ -1,3 +1,14 @@
+## @file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
!INCLUDE ..\Makefiles\ms.common
APPNAME = GenSec
diff --git a/BaseTools/Source/C/PyUtility/PyUtility.c b/BaseTools/Source/C/PyUtility/PyUtility.c
index f06cb9222d..e80cd70bf0 100644
--- a/BaseTools/Source/C/PyUtility/PyUtility.c
+++ b/BaseTools/Source/C/PyUtility/PyUtility.c
@@ -1,3 +1,16 @@
+/** @file
+
+Copyright (c) 2009 - 2010 Intel Corporation. All rights reserved
+This program and the accompanying materials are licensed and made available
+under the terms and conditions of the BSD License which accompanies this
+distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
#include <Python.h>
#include <Windows.h>
#include <Common/UefiBaseTypes.h>
diff --git a/BaseTools/Source/C/Split/Split.c b/BaseTools/Source/C/Split/Split.c
index d5fe738a2c..8be795ff17 100644
--- a/BaseTools/Source/C/Split/Split.c
+++ b/BaseTools/Source/C/Split/Split.c
@@ -2,7 +2,7 @@
Split a file into two pieces at the request offset.
-Copyright (c) 1999-2008 Intel Corporation. All rights reserved
+Copyright (c) 1999-2010 Intel Corporation. All rights reserved
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@@ -58,7 +58,7 @@ Returns:
--*/
{
printf ("%s v%d.%d -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
- printf ("Copyright (c) 1999-2007 Intel Corporation. All rights reserved.\n");
+ printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");
}
void
diff --git a/BaseTools/Source/C/TianoCompress/TianoCompress.c b/BaseTools/Source/C/TianoCompress/TianoCompress.c
index ef35f1721d..f99176a195 100644
--- a/BaseTools/Source/C/TianoCompress/TianoCompress.c
+++ b/BaseTools/Source/C/TianoCompress/TianoCompress.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007 - 2008, Intel Corporation
+Copyright (c) 2007 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1695,7 +1695,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
diff --git a/BaseTools/Source/C/VfrCompile/EfiVfr.h b/BaseTools/Source/C/VfrCompile/EfiVfr.h
index a88b101953..809ca9e4ad 100644
--- a/BaseTools/Source/C/VfrCompile/EfiVfr.h
+++ b/BaseTools/Source/C/VfrCompile/EfiVfr.h
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2004 - 2008, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -31,6 +31,7 @@ Abstract:
#define MAX_VFR_LINE_LEN 4096
#define EFI_IFR_MAX_LENGTH 0xFF
+#define MAX_IFR_EXPRESSION_DEPTH 0x9
#define EFI_VARSTORE_ID_INVALID 0
#define EFI_VAROFFSET_INVALID 0xFFFF
diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
index e3c150cd3d..508b68371e 100644
--- a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
@@ -2,7 +2,7 @@
VfrCompiler main class and main function.
-Copyright (c) 2004 - 2008, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -24,9 +24,19 @@ PACKAGE_DATA gCBuffer;
PACKAGE_DATA gRBuffer;
VOID
-CVfrCompiler::DebugError () {
- Error (NULL, 0, 0001, "Error parsing vfr file", " %s", mOptions.VfrFileName);
- //_asm int 3;
+CVfrCompiler::DebugError (
+ IN CHAR8 *FileName,
+ IN UINT32 LineNumber,
+ IN UINT32 MessageCode,
+ IN CONST CHAR8 *Text,
+ IN CONST CHAR8 *MsgFmt,
+ ...
+ )
+{
+ va_list List;
+ va_start (List, MsgFmt);
+ PrintMessage ((CHAR8 *) "ERROR", FileName, LineNumber, MessageCode, (CHAR8 *) Text, (CHAR8 *) MsgFmt, List);
+ va_end (List);
}
VOID
@@ -53,7 +63,7 @@ CVfrCompiler::OptionInitialization (
{
INT32 Index;
- SetUtilityName (PROGRAM_NAME);
+ SetUtilityName ((CHAR8*) PROGRAM_NAME);
mOptions.VfrFileName[0] = '\0';
mOptions.RecordListFile[0] = '\0';
@@ -84,11 +94,9 @@ CVfrCompiler::OptionInitialization (
mOptions.CreateRecordListFile = TRUE;
gCIfrRecordInfoDB.TurnOn ();
} else if (stricmp(Argv[Index], "-i") == 0) {
- Error (NULL, 0, 1000, "Unknown option", "unrecognized option %s", Argv[Index]);
- goto Fail;
Index++;
if ((Index >= Argc) || (Argv[Index][0] == '-')) {
- Error (NULL, 0, 1001, "Missing option", "-i missing path argument");
+ DebugError (NULL, 0, 1001, "Missing option", "-i missing path argument");
goto Fail;
}
@@ -96,7 +104,7 @@ CVfrCompiler::OptionInitialization (
} else if (stricmp(Argv[Index], "-o") == 0 || stricmp(Argv[Index], "--output-directory") == 0 || stricmp(Argv[Index], "-od") == 0) {
Index++;
if ((Index >= Argc) || (Argv[Index][0] == '-')) {
- Error (NULL, 0, 1001, "Missing option", "-o missing output directory name");
+ DebugError (NULL, 0, 1001, "Missing option", "-o missing output directory name");
goto Fail;
}
strcpy (mOptions.OutputDirectory, Argv[Index]);
@@ -109,17 +117,15 @@ CVfrCompiler::OptionInitialization (
strcat (mOptions.OutputDirectory, "\\");
}
}
- DebugMsg (NULL, 0, 9, "Output Directory", mOptions.OutputDirectory);
+ DebugMsg (NULL, 0, 9, (CHAR8 *) "Output Directory", mOptions.OutputDirectory);
} else if (stricmp(Argv[Index], "-b") == 0 || stricmp(Argv[Index], "--create-ifr-package") == 0 || stricmp(Argv[Index], "-ibin") == 0) {
mOptions.CreateIfrPkgFile = TRUE;
} else if (stricmp(Argv[Index], "-n") == 0 || stricmp(Argv[Index], "--no-pre-processing") == 0 || stricmp(Argv[Index], "-nopp") == 0) {
mOptions.SkipCPreprocessor = TRUE;
} else if (stricmp(Argv[Index], "-f") == 0 || stricmp(Argv[Index], "--pre-processing-flag") == 0 || stricmp(Argv[Index], "-ppflag") == 0) {
- Error (NULL, 0, 1000, "Unknown option", "unrecognized option %s", Argv[Index]);
- goto Fail;
Index++;
if ((Index >= Argc) || (Argv[Index][0] == '-')) {
- Error (NULL, 0, 1001, "Missing option", "-od - missing C-preprocessor argument");
+ DebugError (NULL, 0, 1001, "Missing option", "-od - missing C-preprocessor argument");
goto Fail;
}
@@ -127,13 +133,13 @@ CVfrCompiler::OptionInitialization (
} else if (stricmp(Argv[Index], "-c") == 0 || stricmp(Argv[Index], "--compatible-framework") == 0) {
mOptions.CompatibleMode = TRUE;
} else {
- Error (NULL, 0, 1000, "Unknown option", "unrecognized option %s", Argv[Index]);
+ DebugError (NULL, 0, 1000, "Unknown option", "unrecognized option %s", Argv[Index]);
goto Fail;
}
}
if (Index != Argc - 1) {
- Error (NULL, 0, 1001, "Missing option", "VFR file name is not specified.");
+ DebugError (NULL, 0, 1001, "Missing option", "VFR file name is not specified.");
goto Fail;
} else {
strcpy (mOptions.VfrFileName, Argv[Index]);
@@ -192,7 +198,7 @@ CVfrCompiler::AppendIncludePath (
}
IncludePaths = new CHAR8[Len];
if (IncludePaths == NULL) {
- Error (NULL, 0, 4001, "Resource: memory can't be allocated", NULL);
+ DebugError (NULL, 0, 4001, "Resource: memory can't be allocated", NULL);
return;
}
IncludePaths[0] = '\0';
@@ -221,7 +227,7 @@ CVfrCompiler::AppendCPreprocessorOptions (
}
Opt = new CHAR8[Len];
if (Opt == NULL) {
- Error (NULL, 0, 4001, "Resource: memory can't be allocated", NULL);
+ DebugError (NULL, 0, 4001, "Resource: memory can't be allocated", NULL);
return;
}
Opt[0] = 0;
@@ -339,8 +345,8 @@ CVfrCompiler::CVfrCompiler (
IN CHAR8 **Argv
)
{
- mPreProcessCmd = PREPROCESSOR_COMMAND;
- mPreProcessOpt = PREPROCESSOR_OPTIONS;
+ mPreProcessCmd = (CHAR8 *) PREPROCESSOR_COMMAND;
+ mPreProcessOpt = (CHAR8 *) PREPROCESSOR_OPTIONS;
OptionInitialization(Argc, Argv);
@@ -377,6 +383,7 @@ CVfrCompiler::Usage (
CONST CHAR8 *Help[] = {
" ",
"VfrCompile version " VFR_COMPILER_VERSION VFR_COMPILER_UPDATE_TIME,
+ "Copyright (c) 2004-2010 Intel Corporation. All rights reserved.",
" ",
"Usage: VfrCompile [options] VfrFile",
" ",
@@ -417,7 +424,7 @@ CVfrCompiler::PreProcess (
}
if ((pVfrFile = fopen (mOptions.VfrFileName, "r")) == NULL) {
- Error (NULL, 0, 0001, "Error opening the input VFR file", mOptions.VfrFileName);
+ DebugError (NULL, 0, 0001, "Error opening the input VFR file", mOptions.VfrFileName);
goto Fail;
}
fclose (pVfrFile);
@@ -433,7 +440,7 @@ CVfrCompiler::PreProcess (
PreProcessCmd = new CHAR8[CmdLen + 10];
if (PreProcessCmd == NULL) {
- Error (NULL, 0, 4001, "Resource: memory can't be allocated", NULL);
+ DebugError (NULL, 0, 4001, "Resource: memory can't be allocated", NULL);
goto Fail;
}
strcpy (PreProcessCmd, mPreProcessCmd), strcat (PreProcessCmd, " ");
@@ -448,7 +455,7 @@ CVfrCompiler::PreProcess (
strcat (PreProcessCmd, mOptions.PreprocessorOutputFileName);
if (system (PreProcessCmd) != 0) {
- Error (NULL, 0, 0003, "Error parsing file", "failed to spawn C preprocessor on VFR file %s\n", PreProcessCmd);
+ DebugError (NULL, 0, 0003, "Error parsing file", "failed to spawn C preprocessor on VFR file %s\n", PreProcessCmd);
goto Fail;
}
@@ -484,7 +491,7 @@ CVfrCompiler::Compile (
gCVfrErrorHandle.SetInputFile (InFileName);
if ((pInFile = fopen (InFileName, "r")) == NULL) {
- Error (NULL, 0, 0001, "Error opening the input file", InFileName);
+ DebugError (NULL, 0, 0001, "Error opening the input file", InFileName);
goto Fail;
}
@@ -504,7 +511,7 @@ CVfrCompiler::Compile (
Fail:
if (!IS_RUN_STATUS(STATUS_DEAD)) {
- Error (NULL, 0, 0003, "Error parsing", "compile error in file %s", InFileName);
+ DebugError (NULL, 0, 0003, "Error parsing", "compile error in file %s", InFileName);
SET_RUN_STATUS (STATUS_FAILED);
}
if (pInFile != NULL) {
@@ -534,7 +541,7 @@ CVfrCompiler::AdjustBin (
if (gCBuffer.Buffer != NULL && gRBuffer.Buffer != NULL) {
UINT32 Index;
if (gCBuffer.Size != gRBuffer.Size) {
- Error (NULL, 0, 0001, "Error parsing vfr file", " %s. FormBinary Size 0x%X is not same to RecordBuffer Size 0x%X", mOptions.VfrFileName, gCBuffer.Size, gRBuffer.Size);
+ DebugError (NULL, 0, 0001, "Error parsing vfr file", " %s. FormBinary Size 0x%X is not same to RecordBuffer Size 0x%X", mOptions.VfrFileName, gCBuffer.Size, gRBuffer.Size);
}
for (Index = 0; Index < gCBuffer.Size; Index ++) {
if (gCBuffer.Buffer[Index] != gRBuffer.Buffer[Index]) {
@@ -542,13 +549,13 @@ CVfrCompiler::AdjustBin (
}
}
if (Index != gCBuffer.Size) {
- Error (NULL, 0, 0001, "Error parsing vfr file", " %s. the 0x%X byte is different between Form and Record", mOptions.VfrFileName, Index);
+ DebugError (NULL, 0, 0001, "Error parsing vfr file", " %s. the 0x%X byte is different between Form and Record", mOptions.VfrFileName, Index);
}
- DebugMsg (NULL, 0, 9, "IFR Buffer", "Form Buffer same to Record Buffer and Size is 0x%X", Index);
+ DebugMsg (NULL, 0, 9, (CHAR8 *) "IFR Buffer", (CHAR8 *) "Form Buffer same to Record Buffer and Size is 0x%X", Index);
} else if (gCBuffer.Buffer == NULL && gRBuffer.Buffer == NULL) {
//ok
} else {
- Error (NULL, 0, 0001, "Error parsing vfr file", " %s.Buffer not allocated.", mOptions.VfrFileName);
+ DebugError (NULL, 0, 0001, "Error parsing vfr file", " %s.Buffer not allocated.", mOptions.VfrFileName);
}
//
@@ -588,7 +595,7 @@ CVfrCompiler::GenBinary (
if (mOptions.CreateIfrPkgFile == TRUE) {
if ((pFile = fopen (mOptions.PkgOutputFileName, "wb")) == NULL) {
- Error (NULL, 0, 0001, "Error opening file", mOptions.PkgOutputFileName);
+ DebugError (NULL, 0, 0001, "Error opening file", mOptions.PkgOutputFileName);
goto Fail;
}
if (gCFormPkg.BuildPkg (pFile, &gRBuffer) != VFR_RETURN_SUCCESS) {
@@ -631,7 +638,7 @@ CVfrCompiler::GenCFile (
if (!mOptions.CreateIfrPkgFile || mOptions.CompatibleMode) {
if ((pFile = fopen (mOptions.COutputFileName, "w")) == NULL) {
- Error (NULL, 0, 0001, "Error opening output C file", mOptions.COutputFileName);
+ DebugError (NULL, 0, 0001, "Error opening output C file", mOptions.COutputFileName);
goto Fail;
}
@@ -678,12 +685,12 @@ CVfrCompiler::GenRecordListFile (
}
if ((pInFile = fopen (InFileName, "r")) == NULL) {
- Error (NULL, 0, 0001, "Error opening the input VFR preprocessor output file", InFileName);
+ DebugError (NULL, 0, 0001, "Error opening the input VFR preprocessor output file", InFileName);
return;
}
if ((pOutFile = fopen (mOptions.RecordListFile, "w")) == NULL) {
- Error (NULL, 0, 0001, "Error opening the record list file", mOptions.RecordListFile);
+ DebugError (NULL, 0, 0001, "Error opening the record list file", mOptions.RecordListFile);
goto Err1;
}
@@ -713,8 +720,8 @@ Err1:
int
main (
- IN INT32 Argc,
- IN CHAR8 **Argv
+ IN int Argc,
+ IN char **Argv
)
{
COMPILER_RUN_STATUS Status;
@@ -743,3 +750,4 @@ main (
return GetUtilityStatus ();
}
+
diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.h b/BaseTools/Source/C/VfrCompile/VfrCompiler.h
index d3aa8ca56a..fcd2b24146 100644
--- a/BaseTools/Source/C/VfrCompile/VfrCompiler.h
+++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.h
@@ -102,7 +102,7 @@ public:
VOID GenBinary (VOID);
VOID GenCFile (VOID);
VOID GenRecordListFile (VOID);
- VOID DebugError (VOID);
+ VOID DebugError (IN CHAR8*, IN UINT32, IN UINT32, IN CONST CHAR8*, IN CONST CHAR8*, ...);
};
#endif
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.cpp b/BaseTools/Source/C/VfrCompile/VfrError.cpp
index 963bd2da42..3289101710 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrError.cpp
@@ -135,7 +135,6 @@ CVfrErrorHandle::ParseFileScopeRecord (
IN UINT32 WholeScopeLine
)
{
- CHAR8 *FullPathName = NULL;
SVfrFileScopeRecord *pNode = NULL;
if (Record == NULL) {
@@ -195,19 +194,19 @@ VOID
CVfrErrorHandle::PrintMsg (
IN UINT32 LineNum,
IN CHAR8 *TokName,
- IN CHAR8 *MsgType,
- IN CHAR8 *ErrorMsg
+ IN CONST CHAR8 *MsgType,
+ IN CONST CHAR8 *ErrorMsg
)
{
CHAR8 *FileName = NULL;
UINT32 FileLine;
if (strncmp ("Warning", MsgType, strlen ("Warning")) == 0) {
- VerboseMsg (ErrorMsg);
+ VerboseMsg ((CHAR8 *) ErrorMsg);
return;
}
GetFileNameLineNum (LineNum, &FileName, &FileLine);
- Error (FileName, FileLine, 0x3000, TokName, "\t%s\n", ErrorMsg);
+ Error (FileName, FileLine, 0x3000, TokName, (CHAR8 *) "\t%s\n", (CHAR8 *) ErrorMsg);
}
UINT8
@@ -220,7 +219,7 @@ CVfrErrorHandle::HandleError (
UINT32 Index;
CHAR8 *FileName = NULL;
UINT32 FileLine;
- CHAR8 *ErrorMsg = NULL;
+ CONST CHAR8 *ErrorMsg = NULL;
if (mVfrErrorHandleTable == NULL) {
return 1;
@@ -235,7 +234,7 @@ CVfrErrorHandle::HandleError (
if (ErrorMsg != NULL) {
GetFileNameLineNum (LineNum, &FileName, &FileLine);
- Error (FileName, FileLine, 0x3000, TokName, "\t%s\n", ErrorMsg);
+ Error (FileName, FileLine, 0x3000, TokName, (CHAR8 *) "\t%s\n", (CHAR8 *) ErrorMsg);
return 1;
} else {
return 0;
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.h b/BaseTools/Source/C/VfrCompile/VfrError.h
index 500926af6a..916e0702eb 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.h
+++ b/BaseTools/Source/C/VfrCompile/VfrError.h
@@ -47,7 +47,7 @@ typedef enum {
typedef struct _SVFR_ERROR_HANDLE {
EFI_VFR_RETURN_CODE mErrorCode;
- CHAR8 *mErrorMsg;
+ CONST CHAR8 *mErrorMsg;
} SVFR_ERROR_HANDLE;
struct SVfrFileScopeRecord {
@@ -74,8 +74,8 @@ public:
VOID SetInputFile (IN CHAR8 *);
VOID ParseFileScopeRecord (IN CHAR8 *, IN UINT32);
VOID GetFileNameLineNum (IN UINT32, OUT CHAR8 **, OUT UINT32 *);
- UINT8 HandleError (IN EFI_VFR_RETURN_CODE, IN UINT32 LineNum = 0, IN CHAR8 *TokName = "\0");
- VOID PrintMsg (IN UINT32 LineNum = 0, IN CHAR8 *TokName = "\0", IN CHAR8 *MsgType = "Error", IN CHAR8 *ErrorMsg = "\0");
+ UINT8 HandleError (IN EFI_VFR_RETURN_CODE, IN UINT32 LineNum = 0, IN CHAR8 *TokName = NULL);
+ VOID PrintMsg (IN UINT32 LineNum = 0, IN CHAR8 *TokName = NULL, IN CONST CHAR8 *MsgType = "Error", IN CONST CHAR8 *ErrorMsg = "");
};
#define CHECK_ERROR_RETURN(f, v) do { EFI_VFR_RETURN_CODE r; if ((r = (f)) != (v)) { return r; } } while (0)
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
index ffa898bdbe..ccbc04455a 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
@@ -2,7 +2,7 @@
The definition of CFormPkg's member function
-Copyright (c) 2004 - 2009, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -25,7 +25,7 @@ SPendingAssign::SPendingAssign (
IN VOID *Addr,
IN UINT32 Len,
IN UINT32 LineNo,
- IN CHAR8 *Msg
+ IN CONST CHAR8 *Msg
)
{
mKey = NULL;
@@ -352,11 +352,11 @@ CFormPkg::BuildPkg (
VOID
CFormPkg::_WRITE_PKG_LINE (
- IN FILE *pFile,
- IN UINT32 LineBytes,
- IN CHAR8 *LineHeader,
- IN CHAR8 *BlkBuf,
- IN UINT32 BlkSize
+ IN FILE *pFile,
+ IN UINT32 LineBytes,
+ IN CONST CHAR8 *LineHeader,
+ IN CHAR8 *BlkBuf,
+ IN UINT32 BlkSize
)
{
UINT32 Index;
@@ -375,11 +375,11 @@ CFormPkg::_WRITE_PKG_LINE (
VOID
CFormPkg::_WRITE_PKG_END (
- IN FILE *pFile,
- IN UINT32 LineBytes,
- IN CHAR8 *LineHeader,
- IN CHAR8 *BlkBuf,
- IN UINT32 BlkSize
+ IN FILE *pFile,
+ IN UINT32 LineBytes,
+ IN CONST CHAR8 *LineHeader,
+ IN CHAR8 *BlkBuf,
+ IN UINT32 BlkSize
)
{
UINT32 Index;
@@ -483,7 +483,7 @@ CFormPkg::AssignPending (
IN VOID *ValAddr,
IN UINT32 ValLen,
IN UINT32 LineNo,
- IN CHAR8 *Msg
+ IN CONST CHAR8 *Msg
)
{
SPendingAssign *pNew;
@@ -1242,7 +1242,7 @@ static struct {
{ 0, 0 }, // 0x1F
{ sizeof (EFI_IFR_TO_LOWER), 0 }, // EFI_IFR_TO_LOWER_OP - 0x20
{ sizeof (EFI_IFR_TO_UPPER), 0 }, // EFI_IFR_TO_UPPER_OP - 0x21
- { 0, 0 }, // 0x22
+ { sizeof (EFI_IFR_MAP), 1 }, // EFI_IFR_MAP - 0x22
{ sizeof (EFI_IFR_ORDERED_LIST), 1 }, // EFI_IFR_ORDERED_LIST_OP - 0x23
{ sizeof (EFI_IFR_VARSTORE), 0 }, // EFI_IFR_VARSTORE_OP
{ sizeof (EFI_IFR_VARSTORE_NAME_VALUE), 0 }, // EFI_IFR_VARSTORE_NAME_VALUE_OP
@@ -1250,8 +1250,11 @@ static struct {
{ sizeof (EFI_IFR_VARSTORE_DEVICE), 1 }, // EFI_IFR_VARSTORE_DEVICE_OP
{ sizeof (EFI_IFR_VERSION), 0 }, // EFI_IFR_VERSION_OP - 0x28
{ sizeof (EFI_IFR_END), 0 }, // EFI_IFR_END_OP
- { sizeof (EFI_IFR_MATCH), 1 }, // EFI_IFR_MATCH_OP - 0x2A
- { 0, 0 }, { 0, 0} , { 0, 0} , { 0, 0} , // 0x2B ~ 0x2E
+ { sizeof (EFI_IFR_MATCH), 0 }, // EFI_IFR_MATCH_OP - 0x2A
+ { sizeof (EFI_IFR_GET), 0 }, // EFI_IFR_GET - 0x2B
+ { sizeof (EFI_IFR_SET), 0 }, // EFI_IFR_SET - 0x2C
+ { sizeof (EFI_IFR_READ), 0 }, // EFI_IFR_READ - 0x2D
+ { sizeof (EFI_IFR_WRITE), 0 }, // EFI_IFR_WRITE - 0x2E
{ sizeof (EFI_IFR_EQUAL), 0 }, // EFI_IFR_EQUAL_OP - 0x2F
{ sizeof (EFI_IFR_NOT_EQUAL), 0 }, // EFI_IFR_NOT_EQUAL_OP
{ sizeof (EFI_IFR_GREATER_THAN), 0 }, // EFI_IFR_GREATER_THAN_OP
@@ -1298,7 +1301,7 @@ static struct {
{ sizeof (EFI_IFR_VALUE), 1 }, // EFI_IFR_VALUE_OP
{ sizeof (EFI_IFR_DEFAULT), 0 }, // EFI_IFR_DEFAULT_OP
{ sizeof (EFI_IFR_DEFAULTSTORE), 0 }, // EFI_IFR_DEFAULTSTORE_OP - 0x5C
- { 0, 0}, // 0x5D
+ { sizeof (EFI_IFR_FORM_MAP), 1}, // EFI_IFR_FORM_MAP_OP - 0x5D
{ sizeof (EFI_IFR_CATENATE), 0 }, // EFI_IFR_CATENATE_OP
{ sizeof (EFI_IFR_GUID), 0 }, // EFI_IFR_GUID_OP
{ sizeof (EFI_IFR_SECURITY), 0 }, // EFI_IFR_SECURITY_OP - 0x60
@@ -1313,9 +1316,9 @@ static struct {
"EFI_IFR_ACTION", "EFI_IFR_RESET_BUTTON", "EFI_IFR_FORM_SET", "EFI_IFR_REF", "EFI_IFR_NO_SUBMIT_IF", "EFI_IFR_INCONSISTENT_IF",
"EFI_IFR_EQ_ID_VAL", "EFI_IFR_EQ_ID_ID", "EFI_IFR_EQ_ID_LIST", "EFI_IFR_AND", "EFI_IFR_OR", "EFI_IFR_NOT",
"EFI_IFR_RULE", "EFI_IFR_GRAY_OUT_IF", "EFI_IFR_DATE", "EFI_IFR_TIME", "EFI_IFR_STRING", "EFI_IFR_REFRESH",
- "EFI_IFR_DISABLE_IF", "EFI_IFR_INVALID", "EFI_IFR_TO_LOWER", "EFI_IFR_TO_UPPER", "EFI_IFR_INVALID", "EFI_IFR_ORDERED_LIST",
+ "EFI_IFR_DISABLE_IF", "EFI_IFR_INVALID", "EFI_IFR_TO_LOWER", "EFI_IFR_TO_UPPER", "EFI_IFR_MAP", "EFI_IFR_ORDERED_LIST",
"EFI_IFR_VARSTORE", "EFI_IFR_VARSTORE_NAME_VALUE", "EFI_IFR_VARSTORE_EFI", "EFI_IFR_VARSTORE_DEVICE", "EFI_IFR_VERSION", "EFI_IFR_END",
- "EFI_IFR_MATCH", "EFI_IFR_INVALID", "EFI_IFR_INVALID", "EFI_IFR_INVALID", "EFI_IFR_INVALID", "EFI_IFR_EQUAL",
+ "EFI_IFR_MATCH", "EFI_IFR_GET", "EFI_IFR_SET", "EFI_IFR_READ", "EFI_IFR_WRITE", "EFI_IFR_EQUAL",
"EFI_IFR_NOT_EQUAL", "EFI_IFR_GREATER_THAN", "EFI_IFR_GREATER_EQUAL", "EFI_IFR_LESS_THAN", "EFI_IFR_LESS_EQUAL", "EFI_IFR_BITWISE_AND",
"EFI_IFR_BITWISE_OR", "EFI_IFR_BITWISE_NOT", "EFI_IFR_SHIFT_LEFT", "EFI_IFR_SHIFT_RIGHT", "EFI_IFR_ADD", "EFI_IFR_SUBTRACT",
"EFI_IFR_MULTIPLY", "EFI_IFR_DIVIDE", "EFI_IFR_MODULO", "EFI_IFR_RULE_REF", "EFI_IFR_QUESTION_REF1", "EFI_IFR_QUESTION_REF2",
@@ -1323,7 +1326,7 @@ static struct {
"EFI_IFR_TO_UINT", "EFI_IFR_TO_STRING", "EFI_IFR_TO_BOOLEAN", "EFI_IFR_MID", "EFI_IFR_FIND", "EFI_IFR_TOKEN",
"EFI_IFR_STRING_REF1","EFI_IFR_STRING_REF2", "EFI_IFR_CONDITIONAL", "EFI_IFR_QUESTION_REF3", "EFI_IFR_ZERO", "EFI_IFR_ONE",
"EFI_IFR_ONES", "EFI_IFR_UNDEFINED", "EFI_IFR_LENGTH", "EFI_IFR_DUP", "EFI_IFR_THIS", "EFI_IFR_SPAN",
- "EFI_IFR_VALUE", "EFI_IFR_DEFAULT", "EFI_IFR_DEFAULTSTORE", "EFI_IFR_INVALID", "EFI_IFR_CATENATE", "EFI_IFR_GUID",
+ "EFI_IFR_VALUE", "EFI_IFR_DEFAULT", "EFI_IFR_DEFAULTSTORE", "EFI_IFR_FORM_MAP", "EFI_IFR_CATENATE", "EFI_IFR_GUID",
"EFI_IFR_SECURITY",
};
@@ -1340,7 +1343,7 @@ CIFROBJ_DEBUG_PRINT (
#endif
-bool gCreateOp = TRUE;
+BOOLEAN gCreateOp = TRUE;
CIfrObj::CIfrObj (
IN UINT8 OpCode,
@@ -1396,4 +1399,4 @@ CIfrOpHeader::CIfrOpHeader (
mHeader = OpHdr.mHeader;
}
-UINT32 CIfrForm::FormIdBitMap[EFI_FREE_FORM_ID_BITMAP_SIZE] = {0, };
+UINT32 CIfrFormId::FormIdBitMap[EFI_FREE_FORM_ID_BITMAP_SIZE] = {0, };
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
index 0b84896cc9..38422e1332 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
@@ -2,7 +2,7 @@
The definition of CFormPkg's member function
-Copyright (c) 2004 - 2009, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -81,7 +81,7 @@ struct SPendingAssign {
CHAR8 *mMsg;
struct SPendingAssign *mNext;
- SPendingAssign (IN CHAR8 *, IN VOID *, IN UINT32, IN UINT32, IN CHAR8 *);
+ SPendingAssign (IN CHAR8 *, IN VOID *, IN UINT32, IN UINT32, IN CONST CHAR8 *);
~SPendingAssign ();
VOID SetAddrAndLen (IN VOID *, IN UINT32);
@@ -108,8 +108,8 @@ private:
UINT32 mPkgLength;
- VOID _WRITE_PKG_LINE (IN FILE *, IN UINT32 , IN CHAR8 *, IN CHAR8 *, IN UINT32);
- VOID _WRITE_PKG_END (IN FILE *, IN UINT32 , IN CHAR8 *, IN CHAR8 *, IN UINT32);
+ VOID _WRITE_PKG_LINE (IN FILE *, IN UINT32 , IN CONST CHAR8 *, IN CHAR8 *, IN UINT32);
+ VOID _WRITE_PKG_END (IN FILE *, IN UINT32 , IN CONST CHAR8 *, IN CHAR8 *, IN UINT32);
private:
SPendingAssign *PendingAssignList;
@@ -131,7 +131,7 @@ public:
EFI_VFR_RETURN_CODE GenCFile (IN CHAR8 *, IN FILE *, IN PACKAGE_DATA *PkgData = NULL);
public:
- EFI_VFR_RETURN_CODE AssignPending (IN CHAR8 *, IN VOID *, IN UINT32, IN UINT32, IN CHAR8 *Msg = NULL);
+ EFI_VFR_RETURN_CODE AssignPending (IN CHAR8 *, IN VOID *, IN UINT32, IN UINT32, IN CONST CHAR8 *Msg = NULL);
VOID DoPendingAssign (IN CHAR8 *, IN VOID *, IN UINT32);
bool HavePendingUnassigned (VOID);
VOID PendingAssignPrintAll (VOID);
@@ -195,11 +195,11 @@ extern CIfrRecordInfoDB gCIfrRecordInfoDB;
/*
* The definition of CIfrObj
*/
-extern bool gCreateOp;
+extern BOOLEAN gCreateOp;
class CIfrObj {
private:
- bool mDelayEmit;
+ BOOLEAN mDelayEmit;
CHAR8 *mObjBinBuf;
UINT8 mObjBinLen;
@@ -227,7 +227,7 @@ public:
inline bool ExpendObjBin (IN UINT8 Size) {
if ((mDelayEmit == TRUE) && ((mObjBinLen + Size) > mObjBinLen)) {
- mObjBinLen += Size;
+ mObjBinLen = mObjBinLen + Size;
return TRUE;
} else {
return FALSE;
@@ -248,7 +248,7 @@ public:
VOID IncLength (UINT8 Size) {
if ((mHeader->Length + Size) > mHeader->Length) {
- mHeader->Length += Size;
+ mHeader->Length = mHeader->Length + Size;
}
}
@@ -557,6 +557,7 @@ static CIfrMinMaxStepData *gCurrentMinMaxData = NULL;
class CIfrFormSet : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_FORM_SET *mFormSet;
+ EFI_GUID *mClassGuid;
public:
CIfrFormSet (UINT8 Size) : CIfrObj (EFI_IFR_FORM_SET_OP, (CHAR8 **)&mFormSet, Size),
@@ -565,6 +566,7 @@ public:
mFormSet->FormSetTitle = EFI_STRING_ID_INVALID;
mFormSet->Flags = 0;
memset (&mFormSet->Guid, 0, sizeof (EFI_GUID));
+ mClassGuid = (EFI_GUID *) (mFormSet + 1);
}
VOID SetGuid (IN EFI_GUID *Guid) {
@@ -580,7 +582,7 @@ public:
}
VOID SetClassGuid (IN EFI_GUID *Guid) {
- memcpy (&(mFormSet->ClassGuid[mFormSet->Flags++]), Guid, sizeof (EFI_GUID));
+ memcpy (&(mClassGuid[mFormSet->Flags++]), Guid, sizeof (EFI_GUID));
}
UINT8 GetFlags() {
@@ -620,10 +622,8 @@ public:
#define EFI_FORM_ID_MAX 0xFFFF
#define EFI_FREE_FORM_ID_BITMAP_SIZE ((EFI_FORM_ID_MAX + 1) / EFI_BITS_PER_UINT32)
-class CIfrForm : public CIfrObj, public CIfrOpHeader {
-private:
- EFI_IFR_FORM *mForm;
-
+class CIfrFormId {
+public:
STATIC UINT32 FormIdBitMap[EFI_FREE_FORM_ID_BITMAP_SIZE];
STATIC BOOLEAN ChekFormIdFree (IN EFI_FORM_ID FormId) {
@@ -639,6 +639,11 @@ private:
FormIdBitMap[Index] |= (0x80000000 >> Offset);
}
+};
+
+class CIfrForm : public CIfrObj, public CIfrOpHeader {
+private:
+ EFI_IFR_FORM *mForm;
public:
CIfrForm () : CIfrObj (EFI_IFR_FORM_OP, (CHAR8 **)&mForm),
@@ -654,11 +659,11 @@ public:
//
return VFR_RETURN_INVALID_PARAMETER;
}
- if (CIfrForm::ChekFormIdFree (FormId) == FALSE) {
+ if (CIfrFormId::ChekFormIdFree (FormId) == FALSE) {
return VFR_RETURN_FORMID_REDEFINED;
}
mForm->FormId = FormId;
- CIfrForm::MarkFormIdUsed (FormId);
+ CIfrFormId::MarkFormIdUsed (FormId);
return VFR_RETURN_SUCCESS;
}
@@ -667,6 +672,44 @@ public:
}
};
+class CIfrFormMap : public CIfrObj, public CIfrOpHeader {
+private:
+ EFI_IFR_FORM_MAP *mFormMap;
+ EFI_IFR_FORM_MAP_METHOD *mMethodMap;
+
+public:
+ CIfrFormMap () : CIfrObj (EFI_IFR_FORM_MAP_OP, (CHAR8 **)&mFormMap, sizeof (EFI_IFR_FORM_MAP), TRUE),
+ CIfrOpHeader (EFI_IFR_FORM_MAP_OP, &mFormMap->Header) {
+ mFormMap->FormId = 0;
+ mMethodMap = (EFI_IFR_FORM_MAP_METHOD *) (mFormMap + 1);
+ }
+
+ EFI_VFR_RETURN_CODE SetFormId (IN EFI_FORM_ID FormId) {
+ if (FormId == 0) {
+ //
+ // FormId can't be 0.
+ //
+ return VFR_RETURN_INVALID_PARAMETER;
+ }
+ if (CIfrFormId::ChekFormIdFree (FormId) == FALSE) {
+ return VFR_RETURN_FORMID_REDEFINED;
+ }
+ mFormMap->FormId = FormId;
+ CIfrFormId::MarkFormIdUsed (FormId);
+ return VFR_RETURN_SUCCESS;
+ }
+
+ VOID SetFormMapMethod (IN EFI_STRING_ID MethodTitle, IN EFI_GUID *MethodGuid) {
+ if (ExpendObjBin (sizeof (EFI_IFR_FORM_MAP_METHOD))) {
+ IncLength (sizeof (EFI_IFR_FORM_MAP_METHOD));
+
+ mMethodMap->MethodTitle = MethodTitle;
+ memcpy (&(mMethodMap->MethodIdentifier), MethodGuid, sizeof (EFI_GUID));
+ mMethodMap ++;
+ }
+ }
+};
+
class CIfrVarStore : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_VARSTORE *mVarStore;
@@ -696,7 +739,7 @@ public:
UINT8 Len;
if (Name != NULL) {
- Len = strlen (Name);
+ Len = (UINT8) strlen (Name);
if (Len != 0) {
if (ExpendObjBin (Len) == TRUE) {
IncLength (Len);
@@ -832,6 +875,66 @@ public:
};
+class CIfrRead : public CIfrObj, public CIfrOpHeader{
+private:
+ EFI_IFR_READ *mRead;
+
+public:
+ CIfrRead () : CIfrObj (EFI_IFR_READ_OP, (CHAR8 **)&mRead),
+ CIfrOpHeader (EFI_IFR_READ_OP, &mRead->Header) {}
+
+};
+
+class CIfrWrite : public CIfrObj, public CIfrOpHeader{
+private:
+ EFI_IFR_WRITE *mWrite;
+
+public:
+ CIfrWrite () : CIfrObj (EFI_IFR_WRITE_OP, (CHAR8 **)&mWrite),
+ CIfrOpHeader (EFI_IFR_WRITE_OP, &mWrite->Header) {}
+
+};
+
+class CIfrGet : public CIfrObj, public CIfrOpHeader{
+private:
+ EFI_IFR_GET *mGet;
+
+public:
+ CIfrGet (
+ IN UINT32 LineNo
+ ) : CIfrObj (EFI_IFR_GET_OP, (CHAR8 **)&mGet),
+ CIfrOpHeader (EFI_IFR_GET_OP, &mGet->Header) {
+ SetLineNo (LineNo);
+ }
+
+ VOID SetVarInfo (IN EFI_VARSTORE_INFO *Info) {
+ mGet->VarStoreId = Info->mVarStoreId;
+ mGet->VarStoreInfo.VarName = Info->mInfo.mVarName;
+ mGet->VarStoreInfo.VarOffset = Info->mInfo.mVarOffset;
+ mGet->VarStoreType = Info->mVarType;
+ }
+};
+
+class CIfrSet : public CIfrObj, public CIfrOpHeader{
+private:
+ EFI_IFR_SET *mSet;
+
+public:
+ CIfrSet (
+ IN UINT32 LineNo
+ ) : CIfrObj (EFI_IFR_SET_OP, (CHAR8 **)&mSet),
+ CIfrOpHeader (EFI_IFR_SET_OP, &mSet->Header) {
+ SetLineNo (LineNo);
+ }
+
+ VOID SetVarInfo (IN EFI_VARSTORE_INFO *Info) {
+ mSet->VarStoreId = Info->mVarStoreId;
+ mSet->VarStoreInfo.VarName = Info->mInfo.mVarName;
+ mSet->VarStoreInfo.VarOffset = Info->mInfo.mVarOffset;
+ mSet->VarStoreType = Info->mVarType;
+ }
+};
+
class CIfrSubtitle : public CIfrObj, public CIfrOpHeader, public CIfrStatementHeader {
private:
EFI_IFR_SUBTITLE *mSubtitle;
@@ -2310,6 +2413,19 @@ public:
}
};
+class CIfrMap : public CIfrObj, public CIfrOpHeader{
+private:
+ EFI_IFR_MAP *mMap;
+
+public:
+ CIfrMap (
+ IN UINT32 LineNo
+ ) : CIfrObj (EFI_IFR_MAP_OP, (CHAR8 **)&mMap),
+ CIfrOpHeader (EFI_IFR_MAP_OP, &mMap->Header) {
+ SetLineNo (LineNo);
+ }
+};
+
class CIfrMatch : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_MATCH *mMatch;
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 09ec6919ec..2a4f7b6488 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -1,5 +1,5 @@
/*++
-Copyright (c) 2004 - 2009, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -131,6 +131,9 @@ VfrParserStart (
#token EndList("endlist") "endlist"
#token EndForm("endform") "endform"
#token Form("form") "form"
+#token FormMap("formmap") "formmap"
+#token MapTitle("maptitle") "maptitle"
+#token MapGuid("mapguid") "mapguid"
#token Subtitle("subtitle") "subtitle"
#token Help("help") "help"
#token Text("text") "text"
@@ -214,6 +217,8 @@ VfrParserStart (
#token Rule("rule") "rule"
#token EndRule("endrule") "endrule"
#token Value("value") "value"
+#token Read("read") "read"
+#token Write("write") "write"
#token ResetButton("resetbutton") "resetbutton"
#token EndResetButton("endresetbutton") "endresetbutton"
#token DefaultStore("defaultstore") "defaultstore"
@@ -250,7 +255,8 @@ VfrParserStart (
vfrProgram > [UINT8 Return] :
<<
- mParserStatus = 0;
+ mParserStatus = 0;
+ mCIfrOpHdrIndex = 0;
mConstantOnlyInExpression = FALSE;
>>
(
@@ -335,82 +341,84 @@ vfrDataStructFields :
dataStructField64 :
<< UINT32 ArrayNum = 0; >>
- "UINT64"
+ D:"UINT64"
N:StringIdentifier
{
OpenBracket I:Number CloseBracket << ArrayNum = _STOU32(I->getText()); >>
}
- ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), "UINT64", ArrayNum), N); >>
+ ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), D->getText(), ArrayNum), N); >>
;
dataStructField32 :
<< UINT32 ArrayNum = 0; >>
- "UINT32"
+ D:"UINT32"
N:StringIdentifier
{
OpenBracket I:Number CloseBracket << ArrayNum = _STOU32(I->getText()); >>
}
- ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), "UINT32", ArrayNum), N); >>
+ ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), D->getText(), ArrayNum), N); >>
;
dataStructField16 :
- << UINT32 ArrayNum = 0; >>
+ <<
+ UINT32 ArrayNum = 0;
+ >>
("UINT16" | "CHAR16")
N:StringIdentifier
{
OpenBracket I:Number CloseBracket << ArrayNum = _STOU32(I->getText()); >>
}
- ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), "UINT16", ArrayNum), N); >>
+ ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), (CHAR8 *) "UINT16", ArrayNum), N); >>
;
dataStructField8 :
<< UINT32 ArrayNum = 0; >>
- "UINT8"
+ D:"UINT8"
N:StringIdentifier
{
OpenBracket I:Number CloseBracket << ArrayNum = _STOU32(I->getText()); >>
}
- ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), "UINT8", ArrayNum), N); >>
+ ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), D->getText(), ArrayNum), N); >>
;
dataStructFieldBool :
<< UINT32 ArrayNum = 0; >>
- "BOOLEAN"
+ D:"BOOLEAN"
N:StringIdentifier
{
OpenBracket I:Number CloseBracket << ArrayNum = _STOU32(I->getText()); >>
}
- ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), "BOOLEAN", ArrayNum), N); >>
+ ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), D->getText(), ArrayNum), N); >>
;
dataStructFieldString :
<< UINT32 ArrayNum = 0; >>
- "EFI_STRING_ID"
+ D:"EFI_STRING_ID"
N:StringIdentifier
{
OpenBracket I:Number CloseBracket << ArrayNum = _STOU32(I->getText()); >>
}
- ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), "EFI_STRING_ID", ArrayNum), N); >>
+ ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), D->getText(), ArrayNum), N); >>
;
dataStructFieldDate :
<< UINT32 ArrayNum = 0; >>
- "EFI_HII_DATE"
+ D:"EFI_HII_DATE"
N:StringIdentifier
{
OpenBracket I:Number CloseBracket << ArrayNum = _STOU32(I->getText()); >>
}
- ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), "EFI_HII_DATE", ArrayNum), N); >>
+ ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), D->getText(), ArrayNum), N); >>
;
dataStructFieldTime :
<< UINT32 ArrayNum = 0; >>
- "EFI_HII_TIME"
+ D:"EFI_HII_TIME"
N:StringIdentifier
{
OpenBracket I:Number CloseBracket << ArrayNum = _STOU32(I->getText()); >>
}
- ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), "EFI_HII_TIME", ArrayNum), N); >>
+ ";" << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), D->getText(), ArrayNum), N); >>
;
dataStructFieldUser :
@@ -486,24 +494,26 @@ vfrFormSetDefinition :
<<
switch (ClassGuidNum) {
case 0:
- FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET));
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + sizeof(EFI_GUID));
FSObj->SetClassGuid(&DefaultClassGuid);
break;
case 1:
- FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET));
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + ClassGuidNum * sizeof(EFI_GUID));
FSObj->SetClassGuid(&ClassGuid1);
break;
case 2:
- FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + sizeof(EFI_GUID));
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + ClassGuidNum * sizeof(EFI_GUID));
FSObj->SetClassGuid(&ClassGuid1);
FSObj->SetClassGuid(&ClassGuid2);
break;
- default:
- FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + 2 * sizeof(EFI_GUID));
+ case 3:
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + ClassGuidNum * sizeof(EFI_GUID));
FSObj->SetClassGuid(&ClassGuid1);
FSObj->SetClassGuid(&ClassGuid2);
FSObj->SetClassGuid(&ClassGuid3);
break;
+ default:
+ break;
}
SET_LINE_INFO (*FSObj, L);
@@ -542,6 +552,7 @@ vfrFormSetDefinition :
vfrFormSetList :
(
vfrFormDefinition |
+ vfrFormMapDefinition |
vfrStatementImage |
vfrStatementVarStoreLinear |
vfrStatementVarStoreEfi |
@@ -586,12 +597,13 @@ vfrStatementVarStoreLinear :
V:Varstore << VSObj.SetLineNo(V->getLine()); >>
(
TN:StringIdentifier "," << TypeName = TN->getText(); LineNum = TN->getLine(); >>
- | U8:"UINT8" "," << TypeName = "UINT8"; LineNum = U8->getLine(); >>
- | U16:"UINT16" "," << TypeName = "UINT16"; LineNum = U16->getLine(); >>
- | U32:"UINT32" "," << TypeName = "UINT32"; LineNum = U32->getLine(); >>
- | U64:"UINT64" "," << TypeName = "UINT64"; LineNum = U64->getLine(); >>
- | D:"EFI_HII_DATE" "," << TypeName = "EFI_HII_DATE"; LineNum = D->getLine(); >>
- | T:"EFI_HII_TIME" "," << TypeName = "EFI_HII_TIME"; LineNum = T->getLine(); >>
+ | U8:"UINT8" "," << TypeName = U8->getText(); LineNum = U8->getLine(); >>
+ | U16:"UINT16" "," << TypeName = U16->getText(); LineNum = U16->getLine(); >>
+ | C16:"CHAR16" "," << TypeName = (CHAR8 *) "UINT16"; LineNum = C16->getLine(); >>
+ | U32:"UINT32" "," << TypeName = U32->getText(); LineNum = U32->getLine(); >>
+ | U64:"UINT64" "," << TypeName = U64->getText(); LineNum = U64->getLine(); >>
+ | D:"EFI_HII_DATE" "," << TypeName = D->getText(); LineNum = D->getLine(); >>
+ | T:"EFI_HII_TIME" "," << TypeName = T->getText(); LineNum = T->getLine(); >>
)
{ Key "=" FID:Number "," << // Key is used to assign Varid in Framework VFR but no use in UEFI2.1 VFR
if (mCompatibleMode) {
@@ -628,7 +640,7 @@ vfrStatementVarStoreLinear :
_PCATCH(mCVfrDataStorage.GetVarStoreId(StoreName, &VarStoreId), SN);
VSObj.SetVarStoreId (VarStoreId);
_PCATCH(gCVfrVarDataTypeDB.GetDataTypeSize(TypeName, &Size), LineNum);
- VSObj.SetSize (Size);
+ VSObj.SetSize ((UINT16) Size);
VSObj.SetName (SN->getText());
>>
";"
@@ -771,11 +783,11 @@ vfrQuestionHeader[CIfrQuestionHeader & QHObj, EFI_QUESION_TYPE QType = QUESTION_
mCVfrQuestionDB.RegisterQuestion (QName, VarIdStr, QId);
break;
case QUESTION_DATE:
- mCVfrQuestionDB.RegisterNewDateQuestion (QName, VarIdStr, QId);
- break;
+ mCVfrQuestionDB.RegisterNewDateQuestion (QName, VarIdStr, QId);
+ break;
case QUESTION_TIME:
- mCVfrQuestionDB.RegisterNewTimeQuestion (QName, VarIdStr, QId);
- break;
+ mCVfrQuestionDB.RegisterNewTimeQuestion (QName, VarIdStr, QId);
+ break;
default:
_PCATCH(VFR_RETURN_FATAL_ERROR);
}
@@ -820,7 +832,7 @@ questionheaderFlagsField[UINT8 & Flags] :
| LateCheckFlag
;
-vfrStorageVarId[EFI_VARSTORE_INFO & Info, CHAR8 *&QuestVarIdStr] :
+vfrStorageVarId[EFI_VARSTORE_INFO & Info, CHAR8 *&QuestVarIdStr, BOOLEAN CheckFlag = TRUE] :
<<
UINT32 Idx;
UINT32 LineNo;
@@ -853,9 +865,11 @@ vfrStorageVarId[EFI_VARSTORE_INFO & Info, CHAR8 *&QuestVarIdStr] :
);
VfrReturnCode = mCVfrDataStorage.GetVarStoreType (SName, VarStoreType);
}
- _PCATCH(VfrReturnCode, SN1);
- _PCATCH(mCVfrDataStorage.GetVarStoreId (SName, &$Info.mVarStoreId), SN1);
- _PCATCH(mCVfrDataStorage.GetNameVarStoreInfo (&$Info, Idx), SN1);
+ if (CheckFlag || VfrReturnCode == VFR_RETURN_SUCCESS) {
+ _PCATCH(VfrReturnCode, SN1);
+ _PCATCH(mCVfrDataStorage.GetVarStoreId (SName, &$Info.mVarStoreId), SN1);
+ _PCATCH(mCVfrDataStorage.GetNameVarStoreInfo (&$Info, Idx), SN1);
+ }
>>
)
|
@@ -874,17 +888,21 @@ vfrStorageVarId[EFI_VARSTORE_INFO & Info, CHAR8 *&QuestVarIdStr] :
);
VfrReturnCode = mCVfrDataStorage.GetVarStoreType (SName, VarStoreType);
}
- _PCATCH(VfrReturnCode, SN2);
- _PCATCH(mCVfrDataStorage.GetVarStoreId (SName, &$Info.mVarStoreId), SN2);
- if (VarStoreType == EFI_VFR_VARSTORE_BUFFER) {
- _PCATCH(mCVfrDataStorage.GetBufferVarStoreDataTypeName(SName, &TName), SN2);
- _STRCAT(&VarStr, TName);
+ if (CheckFlag || VfrReturnCode == VFR_RETURN_SUCCESS) {
+ _PCATCH(VfrReturnCode, SN2);
+ _PCATCH(mCVfrDataStorage.GetVarStoreId (SName, &$Info.mVarStoreId), SN2);
+ if (VarStoreType == EFI_VFR_VARSTORE_BUFFER) {
+ _PCATCH(mCVfrDataStorage.GetBufferVarStoreDataTypeName(SName, &TName), SN2);
+ _STRCAT(&VarStr, TName);
+ }
}
>>
(
"." <<
- _PCATCH(((VarStoreType != EFI_VFR_VARSTORE_BUFFER) ? VFR_RETURN_EFIVARSTORE_USE_ERROR : VFR_RETURN_SUCCESS), SN2);
+ if (CheckFlag || VfrReturnCode == VFR_RETURN_SUCCESS) {
+ _PCATCH(((VarStoreType != EFI_VFR_VARSTORE_BUFFER) ? VFR_RETURN_EFIVARSTORE_USE_ERROR : VFR_RETURN_SUCCESS), SN2);
+ }
_STRCAT(&VarIdStr, "."); _STRCAT(&VarStr, ".");
>>
SF:StringIdentifier << _STRCAT(&VarIdStr, SF->getText()); _STRCAT(&VarStr, SF->getText()); >>
@@ -1079,6 +1097,33 @@ vfrFormDefinition :
";"
;
+vfrFormMapDefinition :
+ <<
+ CIfrFormMap *FMapObj = NULL;
+ UINT32 FormMapMethodNumber = 0;
+ EFI_GUID Guid;
+ >>
+ F:FormMap << FMapObj = new CIfrFormMap(); FMapObj->SetLineNo(F->getLine()); >>
+ FormId "=" S1:Number "," << _PCATCH(FMapObj->SetFormId (_STOFID(S1->getText())), S1); >>
+ (
+ MapTitle "=" "STRING_TOKEN" "\(" S2:Number "\)" ";"
+ MapGuid "=" guidDefinition[Guid] ";" << FMapObj->SetFormMapMethod (_STOFID(S2->getText()), &Guid); FormMapMethodNumber ++; >>
+ )* << if (FormMapMethodNumber == 0) {_PCATCH (VFR_RETURN_INVALID_PARAMETER, F->getLine(), "No MapMethod is set for FormMap!");} delete FMapObj;>>
+ (
+ vfrStatementImage |
+ vfrStatementLocked |
+ vfrStatementRules |
+ vfrStatementDefault |
+ vfrStatementStat |
+ vfrStatementQuestions |
+ vfrStatementConditional |
+ vfrStatementLabel |
+ vfrStatementBanner
+ )*
+ E:EndForm << CRT_END_OP (E); >>
+ ";"
+ ;
+
vfrStatementRules :
<< CIfrRule RObj; >>
R:Rule << RObj.SetLineNo(R->getLine()); >>
@@ -1194,6 +1239,18 @@ vfrStatementValue :
"=" vfrStatementExpression[0] << {CIfrEnd EndObj; EndObj.SetLineNo(V->getLine());} >>
;
+vfrStatementRead :
+ << CIfrRead RObj; >>
+ R:Read << RObj.SetLineNo(R->getLine()); >>
+ vfrStatementExpression[0] ";"
+ ;
+
+vfrStatementWrite :
+ << CIfrWrite WObj; >>
+ W:Write << WObj.SetLineNo(W->getLine()); >>
+ vfrStatementExpression[0] ";"
+ ;
+
vfrStatementSubTitle :
<< CIfrSubtitle SObj; >>
L:Subtitle << SObj.SetLineNo(L->getLine()); >>
@@ -1268,8 +1325,8 @@ vfrStatementCrossReference :
vfrStatementGoto :
<<
UINT8 RefType = 1;
- EFI_STRING_ID DevPath;
- EFI_GUID FSId;
+ EFI_STRING_ID DevPath = EFI_STRING_ID_INVALID;
+ EFI_GUID FSId = {0,};
EFI_FORM_ID FId;
EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;
UINT32 BitMask;
@@ -2046,6 +2103,8 @@ vfrStatementQuestionOptionTag :
vfrStatementGrayOutIfQuest |
vfrStatementValue |
vfrStatementDefault |
+ vfrStatementRead |
+ vfrStatementWrite |
vfrStatementOptions
;
@@ -2479,6 +2538,7 @@ vfrStatementInvalidSaveRestoreDefaults :
#token StringRef("stringref") "stringref"
#token PushThis("pushthis") "pushthis"
#token Security("security") "security"
+#token Get("get") "get"
#token True("TRUE") "TRUE"
#token False("FALSE") "FALSE"
#token One("ONE") "ONE"
@@ -2490,6 +2550,7 @@ vfrStatementInvalidSaveRestoreDefaults :
#token AND("AND") "AND"
#token OR("OR") "OR"
#token NOT("NOT") "NOT"
+#token Set("set") "set"
#token BitWiseNot("~") "\~"
#token BoolVal("boolval") "boolval"
#token StringVal("stringval") "stringval"
@@ -2500,12 +2561,13 @@ vfrStatementInvalidSaveRestoreDefaults :
#token Catenate("catenate") "catenate"
#token QuestionRefVal("questionrefval") "questionrefval"
#token StringRefVal("stringrefval") "stringrefval"
+#token Map("map") "map"
//
// Root expression extension function called by other function.
//
vfrStatementExpression [UINT32 RootLevel, UINT32 ExpOpCount = 0] :
- << if ($RootLevel == 0) {_CLEAR_SAVED_OPHDR ();} >>
+ << if ($RootLevel == 0) {mCIfrOpHdrIndex ++; if (mCIfrOpHdrIndex >= MAX_IFR_EXPRESSION_DEPTH) _PCATCH (VFR_RETURN_INVALID_PARAMETER, 0, "The depth of expression exceeds the max supported level 8!"); _CLEAR_SAVED_OPHDR ();} >>
andTerm[$RootLevel, $ExpOpCount]
(
L:OR andTerm[$RootLevel, $ExpOpCount] << $ExpOpCount++; CIfrOr OObj(L->getLine()); >>
@@ -2517,11 +2579,15 @@ vfrStatementExpression [UINT32 RootLevel, UINT32 ExpOpCount = 0] :
if ($ExpOpCount > 1 && $RootLevel == 0) {
if (_SET_SAVED_OPHDR_SCOPE()) {
CIfrEnd EObj;
- if (mCIfrOpHdrLineNo != 0) {
- EObj.SetLineNo (mCIfrOpHdrLineNo);
+ if (mCIfrOpHdrLineNo[mCIfrOpHdrIndex] != 0) {
+ EObj.SetLineNo (mCIfrOpHdrLineNo[mCIfrOpHdrIndex]);
}
}
}
+
+ if ($RootLevel == 0) {
+ mCIfrOpHdrIndex --;
+ }
>>
;
@@ -2664,6 +2730,7 @@ atomTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:
| vfrExpressionConstant[$RootLevel, $ExpOpCount]
| vfrExpressionUnaryOp[$RootLevel, $ExpOpCount]
| vfrExpressionTernaryOp[$RootLevel, $ExpOpCount]
+ | vfrExpressionMap[$RootLevel, $ExpOpCount]
| (
L:NOT
atomTerm[$RootLevel, $ExpOpCount] << { CIfrNot NObj(L->getLine()); $ExpOpCount++; } >>
@@ -2705,6 +2772,7 @@ vfrExpressionBuildInFunction [UINT32 & RootLevel, UINT32 & ExpOpCount] :
| stringref1Exp[$RootLevel, $ExpOpCount]
| pushthisExp[$RootLevel, $ExpOpCount]
| securityExp[$RootLevel, $ExpOpCount]
+ | getExp[$RootLevel, $ExpOpCount]
;
dupExp [UINT32 & RootLevel, UINT32 & ExpOpCount] :
@@ -2937,8 +3005,8 @@ ideqvallistExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
questionref13Exp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
<<
UINT8 Type = 0x1;
- EFI_STRING_ID DevPath;
- EFI_GUID Guid;
+ EFI_STRING_ID DevPath = EFI_STRING_ID_INVALID;
+ EFI_GUID Guid = {0,};
EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;
UINT32 BitMask;
CHAR8 *QName = NULL;
@@ -2990,8 +3058,19 @@ rulerefExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
// stringref (STR_FORM_SET_TITLE)
//
stringref1Exp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
+ <<
+ EFI_STRING_ID RefStringId = EFI_STRING_ID_INVALID;
+ >>
L:StringRef
- "\(" S:Number "\)" << { CIfrStringRef1 SR1Obj(L->getLine()); _SAVE_OPHDR_COND (SR1Obj, ($ExpOpCount == 0), L->getLine()); SR1Obj.SetStringId (_STOSID(S->getText())); $ExpOpCount++; } >>
+ "\("
+ (
+ "STRING_TOKEN"
+ "\("
+ S:Number << RefStringId = _STOSID(S->getText()); >>
+ "\)"
+ | I:Number << RefStringId = _STOSID(I->getText()); >>
+ )
+ "\)" << { CIfrStringRef1 SR1Obj(L->getLine()); _SAVE_OPHDR_COND (SR1Obj, ($ExpOpCount == 0), L->getLine()); SR1Obj.SetStringId (RefStringId); $ExpOpCount++; } >>
;
pushthisExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
@@ -3006,6 +3085,84 @@ securityExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
"\(" guidDefinition[Guid] "\)" << { CIfrSecurity SObj(L->getLine()); _SAVE_OPHDR_COND (SObj, ($ExpOpCount == 0), L->getLine()); SObj.SetPermissions (&Guid); } $ExpOpCount++; >>
;
+numericVarStoreType [UINT8 & VarType] :
+ "NUMERIC_SIZE_1" << $VarType = EFI_IFR_NUMERIC_SIZE_1; >>
+ | "NUMERIC_SIZE_2" << $VarType = EFI_IFR_NUMERIC_SIZE_2; >>
+ | "NUMERIC_SIZE_4" << $VarType = EFI_IFR_NUMERIC_SIZE_4; >>
+ | "NUMERIC_SIZE_8" << $VarType = EFI_IFR_NUMERIC_SIZE_8; >>
+ ;
+
+getExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
+ <<
+ EFI_VARSTORE_INFO Info;
+ CHAR8 *VarIdStr = NULL;
+ EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;
+ UINT32 Mask = 0;
+ EFI_QUESION_TYPE QType = QUESTION_NORMAL;
+ UINT8 VarType = EFI_IFR_TYPE_UNDEFINED;
+ UINT32 VarSize = 0;
+ Info.mVarStoreId = 0;
+ >>
+ L:Get
+ "\("
+ vfrStorageVarId[Info, VarIdStr, FALSE]
+ {"\|" FLAGS "=" numericVarStoreType [VarType] }
+ "\)" <<
+ {
+ if (Info.mVarStoreId == 0) {
+ // support Date/Time question
+ mCVfrQuestionDB.GetQuestionId (NULL, VarIdStr, QId, Mask, &QType);
+ if (QId == EFI_QUESTION_ID_INVALID || Mask == 0 || QType == QUESTION_NORMAL) {
+ _PCATCH(VFR_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode can't get the enough varstore information");
+ }
+ if (QType == QUESTION_DATE) {
+ Info.mVarType = EFI_IFR_TYPE_DATE;
+ } else if (QType == QUESTION_TIME) {
+ Info.mVarType = EFI_IFR_TYPE_TIME;
+ }
+ switch (Mask) {
+ case DATE_YEAR_BITMASK:
+ Info.mInfo.mVarOffset = 0;
+ break;
+ case DATE_DAY_BITMASK:
+ Info.mInfo.mVarOffset = 3;
+ break;
+ case TIME_HOUR_BITMASK:
+ Info.mInfo.mVarOffset = 0;
+ break;
+ case TIME_MINUTE_BITMASK:
+ Info.mInfo.mVarOffset = 1;
+ break;
+ case TIME_SECOND_BITMASK:
+ Info.mInfo.mVarOffset = 2;
+ break;
+ default:
+ _PCATCH(VFR_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode can't get the enough varstore information");
+ break;
+ }
+ } else {
+ if ((mCVfrDataStorage.GetVarStoreType(Info.mVarStoreId) == EFI_VFR_VARSTORE_NAME) && (VarType == EFI_IFR_TYPE_UNDEFINED)) {
+ _PCATCH(VFR_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode don't support name string");
+ }
+ if (VarType != EFI_IFR_TYPE_UNDEFINED) {
+ Info.mVarType = VarType;
+ _PCATCH(gCVfrVarDataTypeDB.GetDataTypeSize (Info.mVarType, &VarSize), L->getLine(), "Get/Set opcode can't get var type size");
+ Info.mVarTotalSize = VarSize;
+ }
+ _PCATCH(gCVfrVarDataTypeDB.GetDataTypeSize (Info.mVarType, &VarSize), L->getLine(), "Get/Set opcode can't get var type size");
+ if (VarSize != Info.mVarTotalSize) {
+ _PCATCH(VFR_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode don't support data array");
+ }
+ }
+ CIfrGet GObj(L->getLine());
+ _SAVE_OPHDR_COND (GObj, ($ExpOpCount == 0), L->getLine());
+ GObj.SetVarInfo (&Info);
+ delete VarIdStr;
+ $ExpOpCount++;
+ }
+ >>
+ ;
+
vfrExpressionConstant[UINT32 & RootLevel, UINT32 & ExpOpCount] :
L1:True << CIfrTrue TObj(L1->getLine()); _SAVE_OPHDR_COND (TObj, ($ExpOpCount == 0), L1->getLine()); $ExpOpCount++; >>
| L2:False << CIfrFalse FObj(L2->getLine()); _SAVE_OPHDR_COND (FObj, ($ExpOpCount == 0), L2->getLine()); $ExpOpCount++; >>
@@ -3026,6 +3183,7 @@ vfrExpressionUnaryOp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
| unintExp[$RootLevel, $ExpOpCount]
| toupperExp[$RootLevel, $ExpOpCount]
| tolwerExp[$RootLevel, $ExpOpCount]
+ | setExp[$RootLevel, $ExpOpCount]
;
lengthExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
@@ -3086,6 +3244,78 @@ tolwerExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
<< { CIfrToLower TLObj(L->getLine()); $ExpOpCount++; } >>
;
+setExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
+ <<
+ EFI_VARSTORE_INFO Info;
+ CHAR8 *VarIdStr = NULL;
+ EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;
+ UINT32 Mask = 0;
+ EFI_QUESION_TYPE QType = QUESTION_NORMAL;
+ UINT8 VarType = EFI_IFR_TYPE_UNDEFINED;
+ UINT32 VarSize = 0;
+ Info.mVarStoreId = 0;
+ >>
+ L:Set
+ "\("
+ vfrStorageVarId[Info, VarIdStr, FALSE]
+ {"\|" FLAG "=" numericVarStoreType [VarType] }
+ "," vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
+ "\)"
+ <<
+ {
+ if (Info.mVarStoreId == 0) {
+ // support Date/Time question
+ mCVfrQuestionDB.GetQuestionId (NULL, VarIdStr, QId, Mask, &QType);
+ if (QId == EFI_QUESTION_ID_INVALID || Mask == 0 || QType == QUESTION_NORMAL) {
+ _PCATCH(VFR_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode can't get the enough varstore information");
+ }
+ if (QType == QUESTION_DATE) {
+ Info.mVarType = EFI_IFR_TYPE_DATE;
+ } else if (QType == QUESTION_TIME) {
+ Info.mVarType = EFI_IFR_TYPE_TIME;
+ }
+ switch (Mask) {
+ case DATE_YEAR_BITMASK:
+ Info.mInfo.mVarOffset = 0;
+ break;
+ case DATE_DAY_BITMASK:
+ Info.mInfo.mVarOffset = 3;
+ break;
+ case TIME_HOUR_BITMASK:
+ Info.mInfo.mVarOffset = 0;
+ break;
+ case TIME_MINUTE_BITMASK:
+ Info.mInfo.mVarOffset = 1;
+ break;
+ case TIME_SECOND_BITMASK:
+ Info.mInfo.mVarOffset = 2;
+ break;
+ default:
+ _PCATCH(VFR_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode can't get the enough varstore information");
+ break;
+ }
+ } else {
+ if ((mCVfrDataStorage.GetVarStoreType(Info.mVarStoreId) == EFI_VFR_VARSTORE_NAME) && (VarType == EFI_IFR_TYPE_UNDEFINED)) {
+ _PCATCH(VFR_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode don't support name string");
+ }
+ if (VarType != EFI_IFR_TYPE_UNDEFINED) {
+ Info.mVarType = VarType;
+ _PCATCH(gCVfrVarDataTypeDB.GetDataTypeSize (Info.mVarType, &VarSize), L->getLine(), "Get/Set opcode can't get var type size");
+ Info.mVarTotalSize = VarSize;
+ }
+ _PCATCH(gCVfrVarDataTypeDB.GetDataTypeSize (Info.mVarType, &VarSize), L->getLine(), "Get/Set opcode can't get var type size");
+ if (VarSize != Info.mVarTotalSize) {
+ _PCATCH(VFR_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode don't support data array");
+ }
+ }
+ CIfrSet TSObj(L->getLine());
+ TSObj.SetVarInfo (&Info);
+ delete VarIdStr;
+ $ExpOpCount++;
+ }
+ >>
+ ;
+
vfrExpressionTernaryOp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
conditionalExp[$RootLevel, $ExpOpCount]
| findExp[$RootLevel, $ExpOpCount]
@@ -3161,6 +3391,20 @@ spanExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
"\)" << { CIfrSpan SObj(S->getLine()); SObj.SetFlags(Flags); $ExpOpCount++; } >>
;
+vfrExpressionMap [UINT32 & RootLevel, UINT32 & ExpOpCount]:
+ L:Map
+ "\("
+ vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
+ ":" << { CIfrMap MObj(L->getLine()); } >>
+ (
+ vfrStatementExpression[0]
+ ","
+ vfrStatementExpression[0]
+ ";"
+ ) *
+ E:"\)" << { CIfrEnd EObj; EObj.SetLineNo(E->getLine()); $ExpOpCount++; } >>
+ ;
+
spanFlags [UINT8 & Flags] :
N:Number << $Flags |= _STOU8(N->getText()); >>
| "LAST_NON_MATCH" << $Flags |= 0x00; >>
@@ -3185,8 +3429,9 @@ private:
CVfrQuestionDB mCVfrQuestionDB;
CVfrRulesDB mCVfrRulesDB;
- CIfrOpHeader *mCIfrOpHdr;
- UINT32 mCIfrOpHdrLineNo;
+ CIfrOpHeader * mCIfrOpHdr[MAX_IFR_EXPRESSION_DEPTH];
+ UINT32 mCIfrOpHdrLineNo[MAX_IFR_EXPRESSION_DEPTH];
+ UINT8 mCIfrOpHdrIndex;
VOID _SAVE_OPHDR_COND (IN CIfrOpHeader &, IN BOOLEAN, UINT32 LineNo = 0);
VOID _CLEAR_SAVED_OPHDR (VOID);
BOOLEAN _SET_SAVED_OPHDR_SCOPE (VOID);
@@ -3210,11 +3455,11 @@ private:
UINT32 _GET_CURRQEST_ARRAY_SIZE();
public:
- VOID _PCATCH (IN INTN, IN INTN, IN ANTLRTokenPtr, IN CHAR8 *);
+ VOID _PCATCH (IN INTN, IN INTN, IN ANTLRTokenPtr, IN CONST CHAR8 *);
VOID _PCATCH (IN EFI_VFR_RETURN_CODE);
VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN ANTLRTokenPtr);
VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32);
- VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32, IN CHAR8 *);
+ VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32, IN CONST CHAR8 *);
VOID syn (ANTLRAbstractToken *, ANTLRChar *, SetWordType *, ANTLRTokenType, INT32);
@@ -3231,7 +3476,7 @@ public:
EFI_FORM_ID _STOFID (IN CHAR8 *);
EFI_QUESTION_ID _STOQID (IN CHAR8 *);
- VOID _STRCAT (IN OUT CHAR8 **, IN CHAR8 *);
+ VOID _STRCAT (IN OUT CHAR8 **, IN CONST CHAR8 *);
VOID _DeclareDefaultLinearVarStore (IN UINT32);
VOID _DeclareStandardDefaultStorage (IN UINT32);
@@ -3259,11 +3504,11 @@ EfiVfrParser::_SAVE_OPHDR_COND (
)
{
if (Cond == TRUE) {
- if (mCIfrOpHdr != NULL) {
+ if (mCIfrOpHdr[mCIfrOpHdrIndex] != NULL) {
return ;
}
- mCIfrOpHdr = new CIfrOpHeader(OpHdr);
- mCIfrOpHdrLineNo = LineNo;
+ mCIfrOpHdr[mCIfrOpHdrIndex] = new CIfrOpHeader(OpHdr);
+ mCIfrOpHdrLineNo[mCIfrOpHdrIndex] = LineNo;
}
}
@@ -3272,8 +3517,8 @@ EfiVfrParser::_CLEAR_SAVED_OPHDR (
VOID
)
{
- mCIfrOpHdr = NULL;
- mCIfrOpHdrLineNo = 0;
+ mCIfrOpHdr[mCIfrOpHdrIndex] = NULL;
+ mCIfrOpHdrLineNo[mCIfrOpHdrIndex] = 0;
}
BOOLEAN
@@ -3281,10 +3526,11 @@ EfiVfrParser::_SET_SAVED_OPHDR_SCOPE (
VOID
)
{
- if (mCIfrOpHdr != NULL) {
- mCIfrOpHdr->SetScope (1);
+ if (mCIfrOpHdr[mCIfrOpHdrIndex] != NULL) {
+ mCIfrOpHdr[mCIfrOpHdrIndex]->SetScope (1);
return TRUE;
}
+
//
// IfrOpHdr is not set, FALSE is return.
//
@@ -3367,7 +3613,7 @@ EfiVfrParser::_PCATCH (
IN INTN ReturnCode,
IN INTN ExpectCode,
IN ANTLRTokenPtr Tok,
- IN CHAR8 *ErrorMsg
+ IN CONST CHAR8 *ErrorMsg
)
{
if (ReturnCode != ExpectCode) {
@@ -3381,7 +3627,7 @@ EfiVfrParser::_PCATCH (
IN EFI_VFR_RETURN_CODE ReturnCode
)
{
- mParserStatus += gCVfrErrorHandle.HandleError (ReturnCode);
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (ReturnCode);
}
VOID
@@ -3390,7 +3636,7 @@ EfiVfrParser::_PCATCH (
IN ANTLRTokenPtr Tok
)
{
- mParserStatus += gCVfrErrorHandle.HandleError (ReturnCode, Tok->getLine(), Tok->getText());
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (ReturnCode, Tok->getLine(), Tok->getText());
}
VOID
@@ -3399,17 +3645,17 @@ EfiVfrParser::_PCATCH (
IN UINT32 LineNum
)
{
- mParserStatus += gCVfrErrorHandle.HandleError (ReturnCode, LineNum);
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (ReturnCode, LineNum);
}
VOID
EfiVfrParser::_PCATCH (
IN EFI_VFR_RETURN_CODE ReturnCode,
IN UINT32 LineNum,
- IN CHAR8 *ErrorMsg
+ IN CONST CHAR8 *ErrorMsg
)
{
- mParserStatus += gCVfrErrorHandle.HandleError (ReturnCode, LineNum, ErrorMsg);
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (ReturnCode, LineNum, (CHAR8 *) ErrorMsg);
}
VOID
@@ -3638,7 +3884,7 @@ EfiVfrParser::_STOQID (
VOID
EfiVfrParser::_STRCAT (
IN OUT CHAR8 **Dest,
- IN CHAR8 *Src
+ IN CONST CHAR8 *Src
)
{
CHAR8 *NewStr;
@@ -3674,6 +3920,7 @@ EfiVfrParser::_DeclareDefaultFrameworkVarStore (
SVfrVarStorageNode *pNode;
UINT32 TypeSize;
BOOLEAN FirstNode;
+ CONST CHAR8 VarName[] = "Setup";
FirstNode = TRUE;
pNode = mCVfrDataStorage.GetBufferVarStoreList();
@@ -3686,9 +3933,9 @@ EfiVfrParser::_DeclareDefaultFrameworkVarStore (
CIfrVarStore VSObj;
VSObj.SetLineNo (LineNo);
VSObj.SetVarStoreId (0x1); //the first and only one Buffer Var Store
- VSObj.SetSize (TypeSize);
+ VSObj.SetSize ((UINT16) TypeSize);
//VSObj.SetName (gCVfrVarDataTypeDB.mFirstNewDataTypeName);
- VSObj.SetName ("Setup");
+ VSObj.SetName ((CHAR8 *) VarName);
VSObj.SetGuid (&mFormsetGuid);
#ifdef VFREXP_DEBUG
printf ("Create the default VarStoreName is %s\n", gCVfrVarDataTypeDB.mFirstNewDataTypeName);
@@ -3703,9 +3950,9 @@ EfiVfrParser::_DeclareDefaultFrameworkVarStore (
CIfrVarStore VSObj;
VSObj.SetLineNo (LineNo);
VSObj.SetVarStoreId (pNode->mVarStoreId);
- VSObj.SetSize (pNode->mStorageInfo.mDataType->mTotalSize);
+ VSObj.SetSize ((UINT16) pNode->mStorageInfo.mDataType->mTotalSize);
if (FirstNode) {
- VSObj.SetName ("Setup");
+ VSObj.SetName ((CHAR8 *) VarName);
FirstNode = FALSE;
} else {
VSObj.SetName (pNode->mVarStoreName);
@@ -3745,6 +3992,10 @@ EfiVfrParser::_DeclareDefaultLinearVarStore (
UINT32 Index;
CHAR8 **TypeNameList;
UINT32 ListSize;
+ CONST CHAR8 DateName[] = "Date";
+ CONST CHAR8 TimeName[] = "Time";
+ CONST CHAR8 DateType[] = "EFI_HII_DATE";
+ CONST CHAR8 TimeType[] = "EFI_HII_TIME";
gCVfrVarDataTypeDB.GetUserDefinedTypeNameList (&TypeNameList, &ListSize);
@@ -3764,7 +4015,7 @@ EfiVfrParser::_DeclareDefaultLinearVarStore (
mCVfrDataStorage.GetVarStoreId(TypeNameList[Index], &VarStoreId);
VSObj.SetVarStoreId (VarStoreId);
gCVfrVarDataTypeDB.GetDataTypeSize(TypeNameList[Index], &Size);
- VSObj.SetSize (Size);
+ VSObj.SetSize ((UINT16) Size);
VSObj.SetName (TypeNameList[Index]);
VSObj.SetGuid (&mFormsetGuid);
}
@@ -3773,45 +4024,45 @@ EfiVfrParser::_DeclareDefaultLinearVarStore (
// not required to declare Date and Time VarStore,
// because code to support old format Data and Time
//
- if (gCVfrVarDataTypeDB.IsTypeNameDefined ("Date") == FALSE) {
+ if (gCVfrVarDataTypeDB.IsTypeNameDefined ((CHAR8 *) DateName) == FALSE) {
UINT32 Size;
EFI_VARSTORE_ID VarStoreId;
CIfrVarStore VSObj;
VSObj.SetLineNo (LineNo);
mCVfrDataStorage.DeclareBufferVarStore (
- "Date",
+ (CHAR8 *) DateName,
&mFormsetGuid,
&gCVfrVarDataTypeDB,
- "EFI_HII_DATE",
+ (CHAR8 *) DateType,
EFI_VARSTORE_ID_INVALID
);
- mCVfrDataStorage.GetVarStoreId("Date", &VarStoreId);
+ mCVfrDataStorage.GetVarStoreId((CHAR8 *) DateName, &VarStoreId);
VSObj.SetVarStoreId (VarStoreId);
- gCVfrVarDataTypeDB.GetDataTypeSize("EFI_HII_DATE", &Size);
- VSObj.SetSize (Size);
- VSObj.SetName ("Date");
+ gCVfrVarDataTypeDB.GetDataTypeSize((CHAR8 *) DateType, &Size);
+ VSObj.SetSize ((UINT16) Size);
+ VSObj.SetName ((CHAR8 *) DateName);
VSObj.SetGuid (&mFormsetGuid);
}
- if (gCVfrVarDataTypeDB.IsTypeNameDefined ("Time") == FALSE) {
+ if (gCVfrVarDataTypeDB.IsTypeNameDefined ((CHAR8 *) TimeName) == FALSE) {
UINT32 Size;
EFI_VARSTORE_ID VarStoreId;
CIfrVarStore VSObj;
VSObj.SetLineNo (LineNo);
mCVfrDataStorage.DeclareBufferVarStore (
- "Time",
+ (CHAR8 *) TimeName,
&mFormsetGuid,
&gCVfrVarDataTypeDB,
- "EFI_HII_TIME",
+ (CHAR8 *) TimeType,
EFI_VARSTORE_ID_INVALID
);
- mCVfrDataStorage.GetVarStoreId("Time", &VarStoreId);
+ mCVfrDataStorage.GetVarStoreId((CHAR8 *) TimeName, &VarStoreId);
VSObj.SetVarStoreId (VarStoreId);
- gCVfrVarDataTypeDB.GetDataTypeSize("EFI_HII_TIME", &Size);
- VSObj.SetSize (Size);
- VSObj.SetName ("Time");
+ gCVfrVarDataTypeDB.GetDataTypeSize((CHAR8 *) TimeType, &Size);
+ VSObj.SetSize ((UINT16) Size);
+ VSObj.SetName ((CHAR8 *) TimeName);
VSObj.SetGuid (&mFormsetGuid);
}
}
@@ -3826,7 +4077,7 @@ EfiVfrParser::_DeclareStandardDefaultStorage (
//
CIfrDefaultStore DSObj;
- mCVfrDefaultStore.RegisterDefaultStore (DSObj.GetObjBinAddr(), "Standard Defaults", EFI_STRING_ID_INVALID, EFI_HII_DEFAULT_CLASS_STANDARD);
+ mCVfrDefaultStore.RegisterDefaultStore (DSObj.GetObjBinAddr(), (CHAR8 *) "Standard Defaults", EFI_STRING_ID_INVALID, EFI_HII_DEFAULT_CLASS_STANDARD);
DSObj.SetLineNo (LineNo);
DSObj.SetDefaultName (EFI_STRING_ID_INVALID);
DSObj.SetDefaultId (EFI_HII_DEFAULT_CLASS_STANDARD);
@@ -3836,7 +4087,7 @@ EfiVfrParser::_DeclareStandardDefaultStorage (
//
CIfrDefaultStore DSObjMF;
- mCVfrDefaultStore.RegisterDefaultStore (DSObjMF.GetObjBinAddr(), "Standard ManuFacturing", EFI_STRING_ID_INVALID, EFI_HII_DEFAULT_CLASS_MANUFACTURING);
+ mCVfrDefaultStore.RegisterDefaultStore (DSObjMF.GetObjBinAddr(), (CHAR8 *) "Standard ManuFacturing", EFI_STRING_ID_INVALID, EFI_HII_DEFAULT_CLASS_MANUFACTURING);
DSObjMF.SetLineNo (LineNo);
DSObjMF.SetDefaultName (EFI_STRING_ID_INVALID);
DSObjMF.SetDefaultId (EFI_HII_DEFAULT_CLASS_MANUFACTURING);
diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
index f047b2c471..cae0479ad3 100644
--- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
@@ -20,11 +20,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
VOID
CVfrBinaryOutput::WriteLine (
- IN FILE *pFile,
- IN UINT32 LineBytes,
- IN CHAR8 *LineHeader,
- IN CHAR8 *BlkBuf,
- IN UINT32 BlkSize
+ IN FILE *pFile,
+ IN UINT32 LineBytes,
+ IN CONST CHAR8 *LineHeader,
+ IN CHAR8 *BlkBuf,
+ IN UINT32 BlkSize
)
{
UINT32 Index;
@@ -43,11 +43,11 @@ CVfrBinaryOutput::WriteLine (
VOID
CVfrBinaryOutput::WriteEnd (
- IN FILE *pFile,
- IN UINT32 LineBytes,
- IN CHAR8 *LineHeader,
- IN CHAR8 *BlkBuf,
- IN UINT32 BlkSize
+ IN FILE *pFile,
+ IN UINT32 LineBytes,
+ IN CONST CHAR8 *LineHeader,
+ IN CHAR8 *BlkBuf,
+ IN UINT32 BlkSize
)
{
UINT32 Index;
@@ -287,7 +287,7 @@ CVfrBufferConfig::Write (
switch (Mode) {
case 'a' : // add
if (Select (Name, Id) != 0) {
- if ((pItem = new SConfigItem (Name, Id, Type, Offset, Width, Value)) == NULL) {
+ if ((pItem = new SConfigItem (Name, Id, Type, Offset, (UINT16) Width, Value)) == NULL) {
return 2;
}
if (mItemListHead == NULL) {
@@ -455,7 +455,7 @@ CVfrBufferConfig::~CVfrBufferConfig (
CVfrBufferConfig gCVfrBufferConfig;
static struct {
- CHAR8 *mTypeName;
+ CONST CHAR8 *mTypeName;
UINT8 mType;
UINT32 mSize;
UINT32 mAlign;
@@ -744,20 +744,20 @@ CVfrVarDataTypeDB::InternalTypesListInit (
SVfrDataField *pDayField = new SVfrDataField;
strcpy (pYearField->mFieldName, "Year");
- GetDataType ("UINT8", &pYearField->mFieldType);
+ GetDataType ((CHAR8 *)"UINT16", &pYearField->mFieldType);
pYearField->mOffset = 0;
pYearField->mNext = pMonthField;
pYearField->mArrayNum = 0;
strcpy (pMonthField->mFieldName, "Month");
- GetDataType ("UINT8", &pMonthField->mFieldType);
- pMonthField->mOffset = 1;
+ GetDataType ((CHAR8 *)"UINT8", &pMonthField->mFieldType);
+ pMonthField->mOffset = 2;
pMonthField->mNext = pDayField;
pMonthField->mArrayNum = 0;
strcpy (pDayField->mFieldName, "Day");
- GetDataType ("UINT8", &pDayField->mFieldType);
- pDayField->mOffset = 2;
+ GetDataType ((CHAR8 *)"UINT8", &pDayField->mFieldType);
+ pDayField->mOffset = 3;
pDayField->mNext = NULL;
pDayField->mArrayNum = 0;
@@ -768,19 +768,19 @@ CVfrVarDataTypeDB::InternalTypesListInit (
SVfrDataField *pSecondsField = new SVfrDataField;
strcpy (pHoursField->mFieldName, "Hours");
- GetDataType ("UINT8", &pHoursField->mFieldType);
+ GetDataType ((CHAR8 *)"UINT8", &pHoursField->mFieldType);
pHoursField->mOffset = 0;
pHoursField->mNext = pMinutesField;
pHoursField->mArrayNum = 0;
strcpy (pMinutesField->mFieldName, "Minutes");
- GetDataType ("UINT8", &pMinutesField->mFieldType);
+ GetDataType ((CHAR8 *)"UINT8", &pMinutesField->mFieldType);
pMinutesField->mOffset = 1;
pMinutesField->mNext = pSecondsField;
pMinutesField->mArrayNum = 0;
strcpy (pSecondsField->mFieldName, "Seconds");
- GetDataType ("UINT8", &pSecondsField->mFieldType);
+ GetDataType ((CHAR8 *)"UINT8", &pSecondsField->mFieldType);
pSecondsField->mOffset = 2;
pSecondsField->mNext = NULL;
pSecondsField->mArrayNum = 0;
@@ -853,7 +853,7 @@ CVfrVarDataTypeDB::Pack (
if (Action & VFR_PACK_SHOW) {
sprintf (Msg, "value of pragma pack(show) == %d", mPackAlign);
- gCVfrErrorHandle.PrintMsg (LineNum, "", "Warning", Msg);
+ gCVfrErrorHandle.PrintMsg (LineNum, NULL, "Warning", Msg);
}
if (Action & VFR_PACK_PUSH) {
@@ -870,7 +870,7 @@ CVfrVarDataTypeDB::Pack (
SVfrPackStackNode *pNode = NULL;
if (mPackStack == NULL) {
- gCVfrErrorHandle.PrintMsg (LineNum, "", "Error", "#pragma pack(pop...) : more pops than pushes");
+ gCVfrErrorHandle.PrintMsg (LineNum, NULL, "Error", "#pragma pack(pop...) : more pops than pushes");
}
for (pNode = mPackStack; pNode != NULL; pNode = pNode->mNext) {
@@ -884,7 +884,7 @@ CVfrVarDataTypeDB::Pack (
if (Action & VFR_PACK_ASSIGN) {
PackAlign = (Number > 1) ? Number + Number % 2 : Number;
if ((PackAlign == 0) || (PackAlign > 16)) {
- gCVfrErrorHandle.PrintMsg (LineNum, "", "Error", "expected pragma parameter to be '1', '2', '4', '8', or '16'");
+ gCVfrErrorHandle.PrintMsg (LineNum, NULL, "Error", "expected pragma parameter to be '1', '2', '4', '8', or '16'");
} else {
mPackAlign = PackAlign;
}
@@ -1127,7 +1127,7 @@ CVfrVarDataTypeDB::GetDataFieldInfo (
CHECK_ERROR_RETURN(GetTypeField (FName, pType, pField), VFR_RETURN_SUCCESS);
pType = pField->mFieldType;
CHECK_ERROR_RETURN(GetFieldOffset (pField, ArrayIdx, Tmp), VFR_RETURN_SUCCESS);
- Offset += Tmp;
+ Offset = (UINT16) (Offset + Tmp);
Type = GetFieldWidth (pField);
Size = GetFieldSize (pField, ArrayIdx);
}
@@ -1386,6 +1386,7 @@ CVfrDataStorage::GetFreeVarStoreId (
//
// Assign the different ID range for the different type VarStore to support Framework Vfr
//
+ Index = 0;
if ((!VfrCompatibleMode) || (VarType == EFI_VFR_VARSTORE_BUFFER)) {
Index = 0;
} else if (VarType == EFI_VFR_VARSTORE_EFI) {
@@ -1838,13 +1839,11 @@ CVfrDataStorage::BufferVarStoreRequestElementAdd (
IN EFI_VARSTORE_INFO &Info
)
{
- CHAR8 NewReqElt[128] = {'\0',};
- CHAR8 *OldReqElt = NULL;
SVfrVarStorageNode *pNode = NULL;
EFI_IFR_TYPE_VALUE Value = gZeroEfiIfrTypeValue;
for (pNode = mBufferVarStoreList; pNode != NULL; pNode = pNode->mNext) {
- if (strcmp (pNode->mVarStoreName, StoreName) == NULL) {
+ if (strcmp (pNode->mVarStoreName, StoreName) == 0) {
break;
}
}
@@ -2024,85 +2023,6 @@ CVfrDefaultStore::GetDefaultId (
return VFR_RETURN_UNDEFINED;
}
-STATIC
-EFI_VFR_RETURN_CODE
-AltCfgItemPrintToBuffer (
- IN CHAR8 *NewAltCfg,
- IN EFI_VARSTORE_INFO Info,
- IN UINT8 Type,
- IN EFI_IFR_TYPE_VALUE Value
- )
-{
- UINT32 Index;
- UINT8 *BufChar = NULL;
- UINT32 Count = 0;
-
- if (NewAltCfg != NULL) {
- Count = sprintf (
- NewAltCfg,
- "&OFFSET=%x&WIDTH=%x&VALUE=",
- Info.mInfo.mVarOffset,
- Info.mVarTotalSize
- );
- NewAltCfg += Count;
-
- switch (Type) {
- case EFI_IFR_TYPE_NUM_SIZE_8 :
- Count = sprintf (NewAltCfg, "%x", Value.u8);
- NewAltCfg += Count;
- break;
- case EFI_IFR_TYPE_NUM_SIZE_16 :
- Count = sprintf (NewAltCfg, "%x", Value.u16);
- NewAltCfg += Count;
- break;
- case EFI_IFR_TYPE_NUM_SIZE_32 :
- Count = sprintf (NewAltCfg, "%x", Value.u32);
- NewAltCfg += Count;
- break;
- case EFI_IFR_TYPE_NUM_SIZE_64 :
- Count = sprintf (NewAltCfg, "%x", Value.u64);
- NewAltCfg += Count;
- break;
- case EFI_IFR_TYPE_BOOLEAN :
- Count = sprintf (NewAltCfg, "%x", Value.b);
- NewAltCfg += Count;
- break;
- case EFI_IFR_TYPE_TIME :
-#if 1
- Count = sprintf (NewAltCfg, "%x", *((UINT32 *)(&Value.time)));
- NewAltCfg += Count;
-#else
- BufChar = (UINT8 *)&Value.time;
- for (Index = 0; Index < sizeof(EFI_HII_TIME); Index++) {
- Count = sprintf (NewAltCfg, "%02x", (UINT8)BufChar[Index]);
- NewAltCfg += Count;
- }
-#endif
- break;
- case EFI_IFR_TYPE_DATE :
-#if 1
- Count = sprintf (NewAltCfg, "%x", *((UINT32 *)(&Value.date)));
- NewAltCfg += Count;
-#else
- BufChar = (UINT8 *)&Value.date;
- for (Index = 0; Index < sizeof(EFI_HII_DATE); Index++) {
- Count = sprintf (NewAltCfg, "%02x", (UINT8)BufChar[Index]);
- NewAltCfg += Count;
- }
-#endif
- break;
- case EFI_IFR_TYPE_STRING :
- Count = sprintf (NewAltCfg, "%x", Value.string);
- NewAltCfg += Count;
- break;
- case EFI_IFR_TYPE_OTHER :
- return VFR_RETURN_UNSUPPORTED;
- }
- }
-
- return VFR_RETURN_FATAL_ERROR;
-}
-
EFI_VFR_RETURN_CODE
CVfrDefaultStore::BufferVarStoreAltConfigAdd (
IN EFI_VARSTORE_ID DefaultId,
@@ -2340,6 +2260,7 @@ SVfrQuestionNode::SVfrQuestionNode (
mQuestionId = EFI_QUESTION_ID_INVALID;
mBitMask = BitMask;
mNext = NULL;
+ mQtype = QUESTION_NORMAL;
if (Name == NULL) {
mName = new CHAR8[strlen ("$DEFAULT") + 1];
@@ -2509,6 +2430,9 @@ CVfrQuestionDB::RegisterOldDateQuestion (
pNode[0]->mQuestionId = QuestionId;
pNode[1]->mQuestionId = QuestionId;
pNode[2]->mQuestionId = QuestionId;
+ pNode[0]->mQtype = QUESTION_DATE;
+ pNode[1]->mQtype = QUESTION_DATE;
+ pNode[2]->mQtype = QUESTION_DATE;
pNode[0]->mNext = pNode[1];
pNode[1]->mNext = pNode[2];
pNode[2]->mNext = mQuestionList;
@@ -2585,6 +2509,9 @@ CVfrQuestionDB::RegisterNewDateQuestion (
pNode[0]->mQuestionId = QuestionId;
pNode[1]->mQuestionId = QuestionId;
pNode[2]->mQuestionId = QuestionId;
+ pNode[0]->mQtype = QUESTION_DATE;
+ pNode[1]->mQtype = QUESTION_DATE;
+ pNode[2]->mQtype = QUESTION_DATE;
pNode[0]->mNext = pNode[1];
pNode[1]->mNext = pNode[2];
pNode[2]->mNext = mQuestionList;
@@ -2651,6 +2578,9 @@ CVfrQuestionDB::RegisterOldTimeQuestion (
pNode[0]->mQuestionId = QuestionId;
pNode[1]->mQuestionId = QuestionId;
pNode[2]->mQuestionId = QuestionId;
+ pNode[0]->mQtype = QUESTION_TIME;
+ pNode[1]->mQtype = QUESTION_TIME;
+ pNode[2]->mQtype = QUESTION_TIME;
pNode[0]->mNext = pNode[1];
pNode[1]->mNext = pNode[2];
pNode[2]->mNext = mQuestionList;
@@ -2727,6 +2657,9 @@ CVfrQuestionDB::RegisterNewTimeQuestion (
pNode[0]->mQuestionId = QuestionId;
pNode[1]->mQuestionId = QuestionId;
pNode[2]->mQuestionId = QuestionId;
+ pNode[0]->mQtype = QUESTION_TIME;
+ pNode[1]->mQtype = QUESTION_TIME;
+ pNode[2]->mQtype = QUESTION_TIME;
pNode[0]->mNext = pNode[1];
pNode[1]->mNext = pNode[2];
pNode[2]->mNext = mQuestionList;
@@ -2800,13 +2733,17 @@ CVfrQuestionDB::GetQuestionId (
IN CHAR8 *Name,
IN CHAR8 *VarIdStr,
OUT EFI_QUESTION_ID &QuestionId,
- OUT UINT32 &BitMask
+ OUT UINT32 &BitMask,
+ OUT EFI_QUESION_TYPE *QType
)
{
SVfrQuestionNode *pNode;
QuestionId = EFI_QUESTION_ID_INVALID;
BitMask = 0x00000000;
+ if (QType != NULL) {
+ *QType = QUESTION_NORMAL;
+ }
if ((Name == NULL) && (VarIdStr == NULL)) {
return ;
@@ -2827,6 +2764,9 @@ CVfrQuestionDB::GetQuestionId (
QuestionId = pNode->mQuestionId;
BitMask = pNode->mBitMask;
+ if (QType != NULL) {
+ *QType = pNode->mQtype;
+ }
break;
}
@@ -2877,3 +2817,4 @@ BOOLEAN VfrCompatibleMode = FALSE;
CVfrVarDataTypeDB gCVfrVarDataTypeDB;
+
diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.h b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.h
index cb15f280d0..27ec3d900f 100644
--- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.h
+++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.h
@@ -2,7 +2,7 @@
Vfr common library functions.
-Copyright (c) 2004 - 2009, Intel Corporation
+Copyright (c) 2004 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -36,8 +36,8 @@ extern BOOLEAN VfrCompatibleMode;
class CVfrBinaryOutput {
public:
- virtual VOID WriteLine (IN FILE *, IN UINT32, IN CHAR8 *, IN CHAR8 *, IN UINT32);
- virtual VOID WriteEnd (IN FILE *, IN UINT32, IN CHAR8 *, IN CHAR8 *, IN UINT32);
+ virtual VOID WriteLine (IN FILE *, IN UINT32, IN CONST CHAR8 *, IN CHAR8 *, IN UINT32);
+ virtual VOID WriteEnd (IN FILE *, IN UINT32, IN CONST CHAR8 *, IN CHAR8 *, IN UINT32);
};
UINT32
@@ -332,6 +332,7 @@ struct SVfrQuestionNode {
EFI_QUESTION_ID mQuestionId;
UINT32 mBitMask;
SVfrQuestionNode *mNext;
+ EFI_QUESION_TYPE mQtype;
SVfrQuestionNode (IN CHAR8 *, IN CHAR8 *, IN UINT32 BitMask = 0);
~SVfrQuestionNode ();
@@ -358,7 +359,7 @@ public:
VOID RegisterOldTimeQuestion (IN CHAR8 *, IN CHAR8 *, IN CHAR8 *, IN OUT EFI_QUESTION_ID &);
VOID RegisterNewTimeQuestion (IN CHAR8 *, IN CHAR8 *, IN OUT EFI_QUESTION_ID &);
EFI_VFR_RETURN_CODE UpdateQuestionId (IN EFI_QUESTION_ID, IN EFI_QUESTION_ID);
- VOID GetQuestionId (IN CHAR8 *, IN CHAR8 *, OUT EFI_QUESTION_ID &, OUT UINT32 &);
+ VOID GetQuestionId (IN CHAR8 *, IN CHAR8 *, OUT EFI_QUESTION_ID &, OUT UINT32 &, OUT EFI_QUESION_TYPE *QType = NULL);
EFI_VFR_RETURN_CODE FindQuestion (IN EFI_QUESTION_ID);
EFI_VFR_RETURN_CODE FindQuestion (IN CHAR8 *);
VOID PrintAllQuestion (IN VOID);
diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c
index fc3dd113ac..60a443cced 100644
--- a/BaseTools/Source/C/VolInfo/VolInfo.c
+++ b/BaseTools/Source/C/VolInfo/VolInfo.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 1999 - 2008, Intel Corporation
+Copyright (c) 1999 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1801,7 +1801,7 @@ Returns:
//
// Copyright declaration
//
- fprintf (stdout, "Copyright (c) 2007, Intel Corporation. All rights reserved.\n\n");
+ fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index ba026a9b26..4755e31e96 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1,2331 +1,2047 @@
-## @file
-# Generate AutoGen.h, AutoGen.c and *.depex files
-#
-# Copyright (c) 2007 - 2009, Intel Corporation
-# All rights reserved. This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-## Import Modules
-#
-import os
-import re
-import os.path as path
-import copy
-
-import GenC
-import GenMake
-import GenDepex
-from StringIO import StringIO
-
-from StrGather import *
-from BuildEngine import BuildRule
-
-from Common.BuildToolError import *
-from Common.DataType import *
-from Common.Misc import *
-from Common.String import *
-import Common.GlobalData as GlobalData
-from GenFds.FdfParser import *
-from CommonDataClass.CommonClass import SkuInfoClass
-from Workspace.BuildClassObject import *
-
-## Regular expression for splitting Dependency Expression stirng into tokens
-gDepexTokenPattern = re.compile("(\(|\)|\w+| \S+\.inf)")
-
-## Mapping Makefile type
-gMakeTypeMap = {"MSFT":"nmake", "GCC":"gmake"}
-
-
-## Build rule configuration file
-gBuildRuleFile = 'Conf/build_rule.txt'
-
-## default file name for AutoGen
-gAutoGenCodeFileName = "AutoGen.c"
-gAutoGenHeaderFileName = "AutoGen.h"
-gAutoGenStringFileName = "%(module_name)sStrDefs.h"
-gAutoGenStringFormFileName = "%(module_name)sStrDefs.hpk"
-gAutoGenDepexFileName = "%(module_name)s.depex"
-
-## Base class for AutoGen
-#
-# This class just implements the cache mechanism of AutoGen objects.
-#
-class AutoGen(object):
- # database to maintain the objects of xxxAutoGen
- _CACHE_ = {} # (BuildTarget, ToolChain) : {ARCH : {platform file: AutoGen object}}}
-
- ## Factory method
- #
- # @param Class class object of real AutoGen class
- # (WorkspaceAutoGen, ModuleAutoGen or PlatformAutoGen)
- # @param Workspace Workspace directory or WorkspaceAutoGen object
- # @param MetaFile The path of meta file
- # @param Target Build target
- # @param Toolchain Tool chain name
- # @param Arch Target arch
- # @param *args The specific class related parameters
- # @param **kwargs The specific class related dict parameters
- #
- def __new__(Class, Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs):
- # check if the object has been created
- Key = (Target, Toolchain)
- if Key not in Class._CACHE_ or Arch not in Class._CACHE_[Key] \
- or MetaFile not in Class._CACHE_[Key][Arch]:
- AutoGenObject = super(AutoGen, Class).__new__(Class)
- # call real constructor
- if not AutoGenObject._Init(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs):
- return None
- if Key not in Class._CACHE_:
- Class._CACHE_[Key] = {}
- if Arch not in Class._CACHE_[Key]:
- Class._CACHE_[Key][Arch] = {}
- Class._CACHE_[Key][Arch][MetaFile] = AutoGenObject
- else:
- AutoGenObject = Class._CACHE_[Key][Arch][MetaFile]
-
- return AutoGenObject
-
- ## hash() operator
- #
- # The file path of platform file will be used to represent hash value of this object
- #
- # @retval int Hash value of the file path of platform file
- #
- def __hash__(self):
- return hash(self.MetaFile)
-
- ## str() operator
- #
- # The file path of platform file will be used to represent this object
- #
- # @retval string String of platform file path
- #
- def __str__(self):
- return str(self.MetaFile)
-
- ## "==" operator
- def __eq__(self, Other):
- return Other and self.MetaFile == Other
-
-## Workspace AutoGen class
-#
-# This class is used mainly to control the whole platform build for different
-# architecture. This class will generate top level makefile.
-#
-class WorkspaceAutoGen(AutoGen):
- ## Real constructor of WorkspaceAutoGen
- #
- # This method behaves the same as __init__ except that it needs explict invoke
- # (in super class's __new__ method)
- #
- # @param WorkspaceDir Root directory of workspace
- # @param ActivePlatform Meta-file of active platform
- # @param Target Build target
- # @param Toolchain Tool chain name
- # @param ArchList List of architecture of current build
- # @param MetaFileDb Database containing meta-files
- # @param BuildConfig Configuration of build
- # @param ToolDefinition Tool chain definitions
- # @param FlashDefinitionFile File of flash definition
- # @param Fds FD list to be generated
- # @param Fvs FV list to be generated
- # @param SkuId SKU id from command line
- #
- def _Init(self, WorkspaceDir, ActivePlatform, Target, Toolchain, ArchList, MetaFileDb,
- BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=[], Fvs=[], SkuId='',
- ReportFile=None, ReportType=None):
- self.MetaFile = ActivePlatform.MetaFile
- self.WorkspaceDir = WorkspaceDir
- self.Platform = ActivePlatform
- self.BuildTarget = Target
- self.ToolChain = Toolchain
- self.ArchList = ArchList
- self.SkuId = SkuId
- self.ReportFile = ReportFile
- self.ReportType = ReportType
-
- self.BuildDatabase = MetaFileDb
- self.TargetTxt = BuildConfig
- self.ToolDef = ToolDefinition
- self.FdfFile = FlashDefinitionFile
- self.FdTargetList = Fds
- self.FvTargetList = Fvs
- self.AutoGenObjectList = []
-
- # there's many relative directory operations, so ...
- os.chdir(self.WorkspaceDir)
-
- # parse FDF file to get PCDs in it, if any
- if self.FdfFile != None and self.FdfFile != '':
- Fdf = FdfParser(self.FdfFile.Path)
- Fdf.ParseFile()
- PcdSet = Fdf.Profile.PcdDict
- ModuleList = Fdf.Profile.InfList
- else:
- PcdSet = {}
- ModuleList = []
-
- # apply SKU and inject PCDs from Flash Definition file
- for Arch in self.ArchList:
- Platform = self.BuildDatabase[self.MetaFile, Arch]
- Platform.SkuName = self.SkuId
- for Name, Guid in PcdSet:
- Platform.AddPcd(Name, Guid, PcdSet[Name, Guid])
-
- Pa = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
- #
- # Explicitly collect platform's dynamic PCDs
- #
- Pa.CollectPlatformDynamicPcds()
- self.AutoGenObjectList.append(Pa)
-
- AllPcds = {}
- MaxLen = 0
- for Pcd in Pa._DynaPcdList_ + Pa._NonDynaPcdList_:
- if Pcd.TokenSpaceGuidCName not in AllPcds:
- AllPcds[Pcd.TokenSpaceGuidCName] = {}
- if Pcd.Type not in AllPcds[Pcd.TokenSpaceGuidCName]:
- AllPcds[Pcd.TokenSpaceGuidCName][Pcd.Type] = []
- AllPcds[Pcd.TokenSpaceGuidCName][Pcd.Type] += [Pcd]
- if len(Pcd.TokenCName) > MaxLen:
- MaxLen = len(Pcd.TokenCName)
-
- if self.ReportFile <> None:
- try:
- if os.path.exists(self.ReportFile):
- os.remove(self.ReportFile)
-
- Fd = open(self.ReportFile, "w")
-
- Fd.write ('===============================================================================\n')
- Fd.write ('Platform Configuration Database Report\n')
- Fd.write ('===============================================================================\n')
- Fd.write (' *P - Platform scoped PCD override in DSC file\n')
- Fd.write (' *F - Platform scoped PCD override in FDF file\n')
- Fd.write (' *M - Module scoped PCD override in DSC file\n')
- Fd.write (' *C - Library has a constructor\n')
- Fd.write (' *D - Library has a destructor\n')
- Fd.write (' *CD - Library has both a constructor and a destructor\n')
- Fd.write ('===============================================================================\n')
- Fd.write ('\n')
- Fd.write ('===============================================================================\n')
- Fd.write ('PLATFORM: %s\n' % (ActivePlatform.MetaFile))
- Fd.write ('===============================================================================\n')
- for Key in AllPcds:
- Fd.write ('%s\n' % (Key))
- for Type in AllPcds[Key]:
- TypeName = ''
- DecType = Type
- if Type == 'FixedAtBuild':
- TypeName = 'FIXED'
- if Type == 'PatchableInModule':
- TypeName = 'PATCH'
- if Type == 'FeatureFlag':
- TypeName = 'FLAG'
- if Type == 'Dynamic':
- TypeName = 'DYN'
- if Type == 'DynamicHii':
- TypeName = 'DYNHII'
- DecType = 'Dynamic'
- if Type == 'DynamicVpd':
- TypeName = 'DYNVPD'
- DecType = 'Dynamic'
- if Type == 'DynamicEx':
- TypeName = 'DEX'
- DecType = 'Dynamic'
- if Type == 'DynamicExHii':
- TypeName = 'DEXHII'
- DecType = 'Dynamic'
- if Type == 'DynamicExVpd':
- TypeName = 'DEXVPD'
- DecType = 'Dynamic'
- for Pcd in AllPcds[Key][Type]:
-
- DecDefaultValue = None
- for F in Pa.Platform.Modules.keys():
- for Package in Pa.Platform.Modules[F].M.Module.Packages:
- if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType) in Package.Pcds:
- if DecDefaultValue == None:
- DecDefaultValue = Package.Pcds[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType].DefaultValue
-
- DscDefaultValue = None
- if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in self.BuildDatabase.WorkspaceDb.PlatformList[0].Pcds:
- DscDefaultValue = self.BuildDatabase.WorkspaceDb.PlatformList[0].Pcds[(Pcd.TokenCName, Pcd.TokenSpaceGuidCName)].DefaultValue
-
- if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
- if Pcd.DefaultValue.strip()[0:2].upper() == '0X':
- PcdDefaultValueNumber = int(Pcd.DefaultValue.strip(), 16)
- else:
- PcdDefaultValueNumber = int(Pcd.DefaultValue.strip())
-
- if DecDefaultValue == None:
- DecMatch = True
- else:
- if DecDefaultValue.strip()[0:2].upper() == '0X':
- DecDefaultValueNumber = int(DecDefaultValue.strip(), 16)
- else:
- DecDefaultValueNumber = int(DecDefaultValue.strip())
- DecMatch = (DecDefaultValueNumber == PcdDefaultValueNumber)
-
- if DscDefaultValue == None:
- DscMatch = True
- else:
- if DscDefaultValue.strip()[0:2].upper() == '0X':
- DscDefaultValueNumber = int(DscDefaultValue.strip(), 16)
- else:
- DscDefaultValueNumber = int(DscDefaultValue.strip())
- DscMatch = (DscDefaultValueNumber == PcdDefaultValueNumber)
- else:
- if DecDefaultValue == None:
- DecMatch = True
- else:
- DecMatch = (DecDefaultValue == Pcd.DefaultValue)
-
- if DscDefaultValue == None:
- DscMatch = True
- else:
- DscMatch = (DscDefaultValue == Pcd.DefaultValue)
-
- if DecMatch:
- Fd.write (' %-*s: %6s %10s = %-22s\n' % (MaxLen + 2, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
- else:
- if DscMatch:
- if (Pcd.TokenCName, Key) in PcdSet:
- Fd.write (' *F %-*s: %6s %10s = %-22s\n' % (MaxLen + 2, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
- else:
- Fd.write (' *P %-*s: %6s %10s = %-22s\n' % (MaxLen + 2, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
-
- for F in Pa.Platform.Modules.keys():
- for ModulePcd in Pa.Platform.Modules[F].M.ModulePcdList + Pa.Platform.Modules[F].M.LibraryPcdList:
- if ModulePcd.TokenSpaceGuidCName <> Pcd.TokenSpaceGuidCName:
- continue
- if ModulePcd.TokenCName <> Pcd.TokenCName:
- continue
- if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
- if ModulePcd.DefaultValue.strip()[0:2].upper() == '0X':
- ModulePcdDefaultValueNumber = int(ModulePcd.DefaultValue.strip(), 16)
- else:
- ModulePcdDefaultValueNumber = int(ModulePcd.DefaultValue.strip())
- Match = (ModulePcdDefaultValueNumber == PcdDefaultValueNumber)
- else:
- Match = (ModulePcd.DefaultValue == Pcd.DefaultValue)
- if Match:
- continue
- Fd.write (' *M %*s = %s\n' % (MaxLen + 21, str(F).split('\\')[-1], ModulePcd.DefaultValue))
-
- if not DecMatch and DscMatch and DecDefaultValue <> None:
- Fd.write (' %*s = %s\n' % (MaxLen + 21, 'DEC DEFAULT', DecDefaultValue))
-
- Fd.write ('\n')
-
- Fd.write ('===============================================================================\n')
- Fd.write ('===============================================================================\n')
-
- for F in Pa.Platform.Modules.keys():
- Fd.write ('\n')
- Fd.write ('===============================================================================\n')
- Fd.write ('MODULE: %s\n' % (F))
- Fd.write ('===============================================================================\n')
-
- Fd.write ('PLATFORM CONFIGURATION DATABASE\n')
- Fd.write ('-------------------------------------------------------------------------------\n')
- ModuleFirst = True
- for Key in AllPcds:
- First = True
- for Type in AllPcds[Key]:
- TypeName = ''
- DecType = Type
- if Type == 'FixedAtBuild':
- TypeName = 'FIXED'
- if Type == 'PatchableInModule':
- TypeName = 'PATCH'
- if Type == 'FeatureFlag':
- TypeName = 'FLAG'
- if Type == 'Dynamic':
- TypeName = 'DYN'
- if Type == 'DynamicHii':
- TypeName = 'DYNHII'
- DecType = 'Dynamic'
- if Type == 'DynamicVpd':
- TypeName = 'DYNVPD'
- DecType = 'Dynamic'
- if Type == 'DynamicEx':
- TypeName = 'DEX'
- DecType = 'Dynamic'
- if Type == 'DynamicExHii':
- TypeName = 'DEXHII'
- DecType = 'Dynamic'
- if Type == 'DynamicExVpd':
- TypeName = 'DEXVPD'
- DecType = 'Dynamic'
- for Pcd in AllPcds[Key][Type]:
- for ModulePcd in Pa.Platform.Modules[F].M.ModulePcdList + Pa.Platform.Modules[F].M.LibraryPcdList:
- if ModulePcd.TokenSpaceGuidCName <> Pcd.TokenSpaceGuidCName:
- continue
- if ModulePcd.TokenCName <> Pcd.TokenCName:
- continue
- if ModulePcd.Type <> Pcd.Type:
- continue
- if First:
- if ModuleFirst:
- ModuleFirst = False
- else:
- Fd.write ('\n')
- Fd.write ('%s\n' % (Key))
- First = False
-
- InfDefaultValue = ModulePcd.InfDefaultValue
- if InfDefaultValue == '':
- InfDefaultValue = None
-
- DecDefaultValue = None
- for Package in Pa.Platform.Modules[F].M.Module.Packages:
- if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType) in Package.Pcds:
- if DecDefaultValue == None:
- DecDefaultValue = Package.Pcds[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType].DefaultValue
-
- DscDefaultValue = None
- if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in self.BuildDatabase.WorkspaceDb.PlatformList[0].Pcds:
- DscDefaultValue = self.BuildDatabase.WorkspaceDb.PlatformList[0].Pcds[(Pcd.TokenCName, Pcd.TokenSpaceGuidCName)].DefaultValue
-
- DscModuleOverrideDefaultValue = None
- if F in self.BuildDatabase.WorkspaceDb.PlatformList[0].Modules:
- if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in self.BuildDatabase.WorkspaceDb.PlatformList[0].Modules[F].Pcds:
- DscModuleOverrideDefaultValue = self.BuildDatabase.WorkspaceDb.PlatformList[0].Modules[F].Pcds[(Pcd.TokenCName, Pcd.TokenSpaceGuidCName)].DefaultValue
-
- if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
- if ModulePcd.DefaultValue.strip()[0:2].upper() == '0X':
- ModulePcdDefaultValueNumber = int(ModulePcd.DefaultValue.strip(), 16)
- else:
- ModulePcdDefaultValueNumber = int(ModulePcd.DefaultValue.strip())
-
- if DecDefaultValue == None:
- DecMatch = True
- else:
- if DecDefaultValue.strip()[0:2].upper() == '0X':
- DecDefaultValueNumber = int(DecDefaultValue.strip(), 16)
- else:
- DecDefaultValueNumber = int(DecDefaultValue.strip())
- DecMatch = (DecDefaultValueNumber == ModulePcdDefaultValueNumber)
-
- if InfDefaultValue == None:
- InfMatch = True
- else:
- if InfDefaultValue.strip()[0:2].upper() == '0X':
- InfDefaultValueNumber = int(InfDefaultValue.strip(), 16)
- else:
- InfDefaultValueNumber = int(InfDefaultValue.strip())
- InfMatch = (InfDefaultValueNumber == ModulePcdDefaultValueNumber)
-
- if DscDefaultValue == None:
- DscMatch = True
- else:
- if DscDefaultValue.strip()[0:2].upper() == '0X':
- DscDefaultValueNumber = int(DscDefaultValue.strip(), 16)
- else:
- DscDefaultValueNumber = int(DscDefaultValue.strip())
- DscMatch = (DscDefaultValueNumber == ModulePcdDefaultValueNumber)
- else:
- if DecDefaultValue == None:
- DecMatch = True
- else:
- DecMatch = (DecDefaultValue == ModulePcd.DefaultValue)
-
- if InfDefaultValue == None:
- InfMatch = True
- else:
- InfMatch = (InfDefaultValue == ModulePcd.DefaultValue)
-
- if DscDefaultValue == None:
- DscMatch = True
- else:
- DscMatch = (DscDefaultValue == ModulePcd.DefaultValue)
-
- if DecMatch and InfMatch:
- Fd.write (' %-*s: %6s %10s = %-22s\n' % (MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', ModulePcd.DefaultValue))
- else:
- if DscMatch and DscModuleOverrideDefaultValue == None:
- if (Pcd.TokenCName, Key) in PcdSet:
- Fd.write (' *F %-*s: %6s %10s = %-22s\n' % (MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', ModulePcd.DefaultValue))
- else:
- Fd.write (' *P %-*s: %6s %10s = %-22s\n' % (MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', ModulePcd.DefaultValue))
- else:
- Fd.write (' *M %-*s: %6s %10s = %-22s\n' % (MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', ModulePcd.DefaultValue))
- if DscDefaultValue <> None:
- Fd.write (' %*s = %s\n' % (MaxLen + 19, 'DSC DEFAULT', DscDefaultValue))
- if InfDefaultValue <> None:
- Fd.write (' %*s = %s\n' % (MaxLen + 19, 'INF DEFAULT', InfDefaultValue))
- if DecDefaultValue <> None and not DecMatch:
- Fd.write (' %*s = %s\n' % (MaxLen + 19, 'DEC DEFAULT', DecDefaultValue))
- Fd.write ('-------------------------------------------------------------------------------\n')
- Fd.write ('LIBRARIES\n')
- Fd.write ('-------------------------------------------------------------------------------\n')
- for Lib in Pa.Platform.Modules[F].M.DependentLibraryList:
- if len(Lib.ConstructorList) > 0:
- if len(Lib.DestructorList) > 0:
- Fd.write (' *CD')
- else:
- Fd.write (' *C ')
- else:
- if len(Lib.DestructorList) > 0:
- Fd.write (' *D ')
- else:
- Fd.write (' ')
- Fd.write (' %s\n' % (Lib))
- for Depex in Lib.DepexExpression[Pa.Platform.Modules[F].M.Arch, Pa.Platform.Modules[F].M.ModuleType]:
- Fd.write (' DEPEX = %s\n' % (Depex))
- Fd.write ('-------------------------------------------------------------------------------\n')
-
- Fd.write ('MODULE DEPENDENCY EXPRESSION\n')
- if len(Pa.Platform.Modules[F].M.Module.DepexExpression[Pa.Platform.Modules[F].M.Arch, Pa.Platform.Modules[F].M.ModuleType]) == 0:
- Fd.write (' NONE\n')
- else:
- for Depex in Pa.Platform.Modules[F].M.Module.DepexExpression[Pa.Platform.Modules[F].M.Arch, Pa.Platform.Modules[F].M.ModuleType]:
- Fd.write (' %s\n' % (Depex))
- Fd.write ('-------------------------------------------------------------------------------\n')
-
- Fd.write ('MODULE + LIBRARY DEPENDENCY EXPRESSION\n')
- if Pa.Platform.Modules[F].M.ModuleType in Pa.Platform.Modules[F].M.DepexExpressionList:
- if Pa.Platform.Modules[F].M.DepexExpressionList[Pa.Platform.Modules[F].M.ModuleType] == '':
- Fd.write (' NONE\n')
- else:
- Fd.write (' %s\n' % (Pa.Platform.Modules[F].M.DepexExpressionList[Pa.Platform.Modules[F].M.ModuleType]))
- else:
- Fd.write (' NONE\n')
- Fd.write ('-------------------------------------------------------------------------------\n')
-
- Fd.close()
- except:
- EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)
-
- self._BuildDir = None
- self._FvDir = None
- self._MakeFileDir = None
- self._BuildCommand = None
-
- return True
-
- def __repr__(self):
- return "%s [%s]" % (self.MetaFile, ", ".join(self.ArchList))
-
- ## Return the directory to store FV files
- def _GetFvDir(self):
- if self._FvDir == None:
- self._FvDir = path.join(self.BuildDir, 'FV')
- return self._FvDir
-
- ## Return the directory to store all intermediate and final files built
- def _GetBuildDir(self):
- return self.AutoGenObjectList[0].BuildDir
-
- ## Return the build output directory platform specifies
- def _GetOutputDir(self):
- return self.Platform.OutputDirectory
-
- ## Return platform name
- def _GetName(self):
- return self.Platform.PlatformName
-
- ## Return meta-file GUID
- def _GetGuid(self):
- return self.Platform.Guid
-
- ## Return platform version
- def _GetVersion(self):
- return self.Platform.Version
-
- ## Return paths of tools
- def _GetToolDefinition(self):
- return self.AutoGenObjectList[0].ToolDefinition
-
- ## Return directory of platform makefile
- #
- # @retval string Makefile directory
- #
- def _GetMakeFileDir(self):
- if self._MakeFileDir == None:
- self._MakeFileDir = self.BuildDir
- return self._MakeFileDir
-
- ## Return build command string
- #
- # @retval string Build command string
- #
- def _GetBuildCommand(self):
- if self._BuildCommand == None:
- # BuildCommand should be all the same. So just get one from platform AutoGen
- self._BuildCommand = self.AutoGenObjectList[0].BuildCommand
- return self._BuildCommand
-
- ## Create makefile for the platform and mdoules in it
- #
- # @param CreateDepsMakeFile Flag indicating if the makefile for
- # modules will be created as well
- #
- def CreateMakeFile(self, CreateDepsMakeFile=False):
- # create makefile for platform
- Makefile = GenMake.TopLevelMakefile(self)
- if Makefile.Generate():
- EdkLogger.debug(EdkLogger.DEBUG_9, "Generated makefile for platform [%s] %s\n" %
- (self.MetaFile, self.ArchList))
- else:
- EdkLogger.debug(EdkLogger.DEBUG_9, "Skipped the generation of makefile for platform [%s] %s\n" %
- (self.MetaFile, self.ArchList))
-
- if CreateDepsMakeFile:
- for Pa in self.AutoGenObjectList:
- Pa.CreateMakeFile(CreateDepsMakeFile)
-
- ## Create autogen code for platform and modules
- #
- # Since there's no autogen code for platform, this method will do nothing
- # if CreateModuleCodeFile is set to False.
- #
- # @param CreateDepsCodeFile Flag indicating if creating module's
- # autogen code file or not
- #
- def CreateCodeFile(self, CreateDepsCodeFile=False):
- if not CreateDepsCodeFile:
- return
- for Pa in self.AutoGenObjectList:
- Pa.CreateCodeFile(CreateDepsCodeFile)
-
- Name = property(_GetName)
- Guid = property(_GetGuid)
- Version = property(_GetVersion)
- OutputDir = property(_GetOutputDir)
-
- ToolDefinition = property(_GetToolDefinition) # toolcode : tool path
-
- BuildDir = property(_GetBuildDir)
- FvDir = property(_GetFvDir)
- MakeFileDir = property(_GetMakeFileDir)
- BuildCommand = property(_GetBuildCommand)
-
-## AutoGen class for platform
-#
-# PlatformAutoGen class will process the original information in platform
-# file in order to generate makefile for platform.
-#
-class PlatformAutoGen(AutoGen):
- #
- # Used to store all PCDs for both PEI and DXE phase, in order to generate
- # correct PCD database
- #
- _DynaPcdList_ = []
- _NonDynaPcdList_ = []
-
- ## The real constructor of PlatformAutoGen
- #
- # This method is not supposed to be called by users of PlatformAutoGen. It's
- # only used by factory method __new__() to do real initialization work for an
- # object of PlatformAutoGen
- #
- # @param Workspace WorkspaceAutoGen object
- # @param PlatformFile Platform file (DSC file)
- # @param Target Build target (DEBUG, RELEASE)
- # @param Toolchain Name of tool chain
- # @param Arch arch of the platform supports
- #
- def _Init(self, Workspace, PlatformFile, Target, Toolchain, Arch):
- EdkLogger.debug(EdkLogger.DEBUG_9, "AutoGen platform [%s] [%s]" % (PlatformFile, Arch))
- GlobalData.gProcessingFile = "%s [%s, %s, %s]" % (PlatformFile, Arch, Toolchain, Target)
-
- self.MetaFile = PlatformFile
- self.Workspace = Workspace
- self.WorkspaceDir = Workspace.WorkspaceDir
- self.ToolChain = Toolchain
- self.BuildTarget = Target
- self.Arch = Arch
- self.SourceDir = PlatformFile.SubDir
- self.SourceOverrideDir = None
- self.FdTargetList = self.Workspace.FdTargetList
- self.FvTargetList = self.Workspace.FvTargetList
-
- # flag indicating if the makefile/C-code file has been created or not
- self.IsMakeFileCreated = False
- self.IsCodeFileCreated = False
-
- self._Platform = None
- self._Name = None
- self._Guid = None
- self._Version = None
-
- self._BuildRule = None
- self._SourceDir = None
- self._BuildDir = None
- self._OutputDir = None
- self._FvDir = None
- self._MakeFileDir = None
- self._FdfFile = None
-
- self._PcdTokenNumber = None # (TokenCName, TokenSpaceGuidCName) : GeneratedTokenNumber
- self._DynamicPcdList = None # [(TokenCName1, TokenSpaceGuidCName1), (TokenCName2, TokenSpaceGuidCName2), ...]
- self._NonDynamicPcdList = None # [(TokenCName1, TokenSpaceGuidCName1), (TokenCName2, TokenSpaceGuidCName2), ...]
-
- self._ToolDefinitions = None
- self._ToolDefFile = None # toolcode : tool path
- self._ToolChainFamily = None
- self._BuildRuleFamily = None
- self._BuildOption = None # toolcode : option
- self._PackageList = None
- self._ModuleAutoGenList = None
- self._LibraryAutoGenList = None
- self._BuildCommand = None
-
- # get the original module/package/platform objects
- self.BuildDatabase = Workspace.BuildDatabase
- return True
-
- def __repr__(self):
- return "%s [%s]" % (self.MetaFile, self.Arch)
-
- ## Create autogen code for platform and modules
- #
- # Since there's no autogen code for platform, this method will do nothing
- # if CreateModuleCodeFile is set to False.
- #
- # @param CreateModuleCodeFile Flag indicating if creating module's
- # autogen code file or not
- #
- def CreateCodeFile(self, CreateModuleCodeFile=False):
- # only module has code to be greated, so do nothing if CreateModuleCodeFile is False
- if self.IsCodeFileCreated or not CreateModuleCodeFile:
- return
-
- for Ma in self.ModuleAutoGenList:
- Ma.CreateCodeFile(True)
-
- # don't do this twice
- self.IsCodeFileCreated = True
-
- ## Create makefile for the platform and mdoules in it
- #
- # @param CreateModuleMakeFile Flag indicating if the makefile for
- # modules will be created as well
- #
- def CreateMakeFile(self, CreateModuleMakeFile=False):
- if CreateModuleMakeFile:
- for ModuleFile in self.Platform.Modules:
- Ma = ModuleAutoGen(self.Workspace, ModuleFile, self.BuildTarget,
- self.ToolChain, self.Arch, self.MetaFile)
- Ma.CreateMakeFile(True)
-
- # no need to create makefile for the platform more than once
- if self.IsMakeFileCreated:
- return
-
- # create makefile for platform
- Makefile = GenMake.PlatformMakefile(self)
- if Makefile.Generate():
- EdkLogger.debug(EdkLogger.DEBUG_9, "Generated makefile for platform [%s] [%s]\n" %
- (self.MetaFile, self.Arch))
- else:
- EdkLogger.debug(EdkLogger.DEBUG_9, "Skipped the generation of makefile for platform [%s] [%s]\n" %
- (self.MetaFile, self.Arch))
- self.IsMakeFileCreated = True
-
- ## Collect dynamic PCDs
- #
- # Gather dynamic PCDs list from each module and their settings from platform
- # This interface should be invoked explicitly when platform action is created.
- #
- def CollectPlatformDynamicPcds(self):
- # for gathering error information
- NoDatumTypePcdList = set()
-
- self._GuidValue = {}
- for F in self.Platform.Modules.keys():
- M = ModuleAutoGen(self.Workspace, F, self.BuildTarget, self.ToolChain, self.Arch, self.MetaFile)
- #GuidValue.update(M.Guids)
-
- self.Platform.Modules[F].M = M
-
- for PcdFromModule in M.ModulePcdList+M.LibraryPcdList:
- # make sure that the "VOID*" kind of datum has MaxDatumSize set
- if PcdFromModule.DatumType == "VOID*" and PcdFromModule.MaxDatumSize == None:
- NoDatumTypePcdList.add("%s.%s [%s]" % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, F))
-
- if PcdFromModule.Type in GenC.gDynamicPcd or PcdFromModule.Type in GenC.gDynamicExPcd:
- #
- # If a dynamic PCD used by a PEM module/PEI module & DXE module,
- # it should be stored in Pcd PEI database, If a dynamic only
- # used by DXE module, it should be stored in DXE PCD database.
- # The default Phase is DXE
- #
- if M.ModuleType in ["PEIM", "PEI_CORE"]:
- PcdFromModule.Phase = "PEI"
- if PcdFromModule not in self._DynaPcdList_:
- self._DynaPcdList_.append(PcdFromModule)
- elif PcdFromModule.Phase == 'PEI':
- # overwrite any the same PCD existing, if Phase is PEI
- Index = self._DynaPcdList_.index(PcdFromModule)
- self._DynaPcdList_[Index] = PcdFromModule
- elif PcdFromModule not in self._NonDynaPcdList_:
- self._NonDynaPcdList_.append(PcdFromModule)
-
- # print out error information and break the build, if error found
- if len(NoDatumTypePcdList) > 0:
- NoDatumTypePcdListString = "\n\t\t".join(NoDatumTypePcdList)
- EdkLogger.error("build", AUTOGEN_ERROR, "PCD setting error",
- File=self.MetaFile,
- ExtraData="\n\tPCD(s) without MaxDatumSize:\n\t\t%s\n"
- % NoDatumTypePcdListString)
- self._NonDynamicPcdList = self._NonDynaPcdList_
- self._DynamicPcdList = self._DynaPcdList_
-
- #
- # Sort dynamic PCD list to:
- # 1) If PCD's datum type is VOID* and value is unicode string which starts with L, the PCD item should
- # try to be put header of dynamicd List
- # 2) If PCD is HII type, the PCD item should be put after unicode type PCD
- #
- # The reason of sorting is make sure the unicode string is in double-byte alignment in string table.
- #
- UnicodePcdArray = []
- HiiPcdArray = []
- OtherPcdArray = []
- for Pcd in self._DynamicPcdList:
- # just pick the a value to determine whether is unicode string type
- Sku = Pcd.SkuInfoList[Pcd.SkuInfoList.keys()[0]]
- PcdValue = Sku.DefaultValue
- if Pcd.DatumType == 'VOID*' and PcdValue.startswith("L"):
- # if found PCD which datum value is unicode string the insert to left size of UnicodeIndex
- UnicodePcdArray.append(Pcd)
- elif len(Sku.VariableName) > 0:
- # if found HII type PCD then insert to right of UnicodeIndex
- HiiPcdArray.append(Pcd)
- else:
- OtherPcdArray.append(Pcd)
- del self._DynamicPcdList[:]
- self._DynamicPcdList.extend(UnicodePcdArray)
- self._DynamicPcdList.extend(HiiPcdArray)
- self._DynamicPcdList.extend(OtherPcdArray)
-
-
- ## Return the platform build data object
- def _GetPlatform(self):
- if self._Platform == None:
- self._Platform = self.BuildDatabase[self.MetaFile, self.Arch]
- return self._Platform
-
- ## Return platform name
- def _GetName(self):
- return self.Platform.PlatformName
-
- ## Return the meta file GUID
- def _GetGuid(self):
- return self.Platform.Guid
-
- ## Return the platform version
- def _GetVersion(self):
- return self.Platform.Version
-
- ## Return the FDF file name
- def _GetFdfFile(self):
- if self._FdfFile == None:
- if self.Workspace.FdfFile != "":
- self._FdfFile= path.join(self.WorkspaceDir, self.Workspace.FdfFile)
- else:
- self._FdfFile = ''
- return self._FdfFile
-
- ## Return the build output directory platform specifies
- def _GetOutputDir(self):
- return self.Platform.OutputDirectory
-
- ## Return the directory to store all intermediate and final files built
- def _GetBuildDir(self):
- if self._BuildDir == None:
- if os.path.isabs(self.OutputDir):
- self._BuildDir = path.join(
- path.abspath(self.OutputDir),
- self.BuildTarget + "_" + self.ToolChain,
- )
- else:
- self._BuildDir = path.join(
- self.WorkspaceDir,
- self.OutputDir,
- self.BuildTarget + "_" + self.ToolChain,
- )
- return self._BuildDir
-
- ## Return directory of platform makefile
- #
- # @retval string Makefile directory
- #
- def _GetMakeFileDir(self):
- if self._MakeFileDir == None:
- self._MakeFileDir = path.join(self.BuildDir, self.Arch)
- return self._MakeFileDir
-
- ## Return build command string
- #
- # @retval string Build command string
- #
- def _GetBuildCommand(self):
- if self._BuildCommand == None:
- self._BuildCommand = []
- if "MAKE" in self.ToolDefinition and "PATH" in self.ToolDefinition["MAKE"]:
- self._BuildCommand += SplitOption(self.ToolDefinition["MAKE"]["PATH"])
- if "FLAGS" in self.ToolDefinition["MAKE"]:
- NewOption = self.ToolDefinition["MAKE"]["FLAGS"].strip()
- if NewOption != '':
- self._BuildCommand += SplitOption(NewOption)
- return self._BuildCommand
-
- ## Get tool chain definition
- #
- # Get each tool defition for given tool chain from tools_def.txt and platform
- #
- def _GetToolDefinition(self):
- if self._ToolDefinitions == None:
- ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDictionary
- if TAB_TOD_DEFINES_COMMAND_TYPE not in self.Workspace.ToolDef.ToolsDefTxtDatabase:
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "No tools found in configuration",
- ExtraData="[%s]" % self.MetaFile)
- self._ToolDefinitions = {}
- DllPathList = set()
- for Def in ToolDefinition:
- Target, Tag, Arch, Tool, Attr = Def.split("_")
- if Target != self.BuildTarget or Tag != self.ToolChain or Arch != self.Arch:
- continue
-
- Value = ToolDefinition[Def]
- # don't record the DLL
- if Attr == "DLL":
- DllPathList.add(Value)
- continue
-
- if Tool not in self._ToolDefinitions:
- self._ToolDefinitions[Tool] = {}
- self._ToolDefinitions[Tool][Attr] = Value
-
- ToolsDef = ''
- MakePath = ''
- if GlobalData.gOptions.SilentMode and "MAKE" in self._ToolDefinitions:
- if "FLAGS" not in self._ToolDefinitions["MAKE"]:
- self._ToolDefinitions["MAKE"]["FLAGS"] = ""
- self._ToolDefinitions["MAKE"]["FLAGS"] += " -s"
- MakeFlags = ''
- for Tool in self._ToolDefinitions:
- for Attr in self._ToolDefinitions[Tool]:
- Value = self._ToolDefinitions[Tool][Attr]
- if Tool in self.BuildOption and Attr in self.BuildOption[Tool]:
- # check if override is indicated
- if self.BuildOption[Tool][Attr].startswith('='):
- Value = self.BuildOption[Tool][Attr][1:]
- else:
- Value += " " + self.BuildOption[Tool][Attr]
-
- if Attr == "PATH":
- # Don't put MAKE definition in the file
- if Tool == "MAKE":
- MakePath = Value
- else:
- ToolsDef += "%s = %s\n" % (Tool, Value)
- elif Attr != "DLL":
- # Don't put MAKE definition in the file
- if Tool == "MAKE":
- if Attr == "FLAGS":
- MakeFlags = Value
- else:
- ToolsDef += "%s_%s = %s\n" % (Tool, Attr, Value)
- ToolsDef += "\n"
-
- SaveFileOnChange(self.ToolDefinitionFile, ToolsDef)
- for DllPath in DllPathList:
- os.environ["PATH"] = DllPath + os.pathsep + os.environ["PATH"]
- os.environ["MAKE_FLAGS"] = MakeFlags
-
- return self._ToolDefinitions
-
- ## Return the paths of tools
- def _GetToolDefFile(self):
- if self._ToolDefFile == None:
- self._ToolDefFile = os.path.join(self.MakeFileDir, "TOOLS_DEF." + self.Arch)
- return self._ToolDefFile
-
- ## Retrieve the toolchain family of given toolchain tag. Default to 'MSFT'.
- def _GetToolChainFamily(self):
- if self._ToolChainFamily == None:
- ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDatabase
- if TAB_TOD_DEFINES_FAMILY not in ToolDefinition \
- or self.ToolChain not in ToolDefinition[TAB_TOD_DEFINES_FAMILY] \
- or not ToolDefinition[TAB_TOD_DEFINES_FAMILY][self.ToolChain]:
- EdkLogger.verbose("No tool chain family found in configuration for %s. Default to MSFT." \
- % self.ToolChain)
- self._ToolChainFamily = "MSFT"
- else:
- self._ToolChainFamily = ToolDefinition[TAB_TOD_DEFINES_FAMILY][self.ToolChain]
- return self._ToolChainFamily
-
- def _GetBuildRuleFamily(self):
- if self._BuildRuleFamily == None:
- ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDatabase
- if TAB_TOD_DEFINES_BUILDRULEFAMILY not in ToolDefinition \
- or self.ToolChain not in ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY] \
- or not ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY][self.ToolChain]:
- EdkLogger.verbose("No tool chain family found in configuration for %s. Default to MSFT." \
- % self.ToolChain)
- self._BuildRuleFamily = "MSFT"
- else:
- self._BuildRuleFamily = ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY][self.ToolChain]
- return self._BuildRuleFamily
-
- ## Return the build options specific to this platform
- def _GetBuildOptions(self):
- if self._BuildOption == None:
- self._BuildOption = self._ExpandBuildOption(self.Platform.BuildOptions)
- return self._BuildOption
-
- ## Parse build_rule.txt in $(WORKSPACE)/Conf/build_rule.txt
- #
- # @retval BuildRule object
- #
- def _GetBuildRule(self):
- if self._BuildRule == None:
- BuildRuleFile = None
- if TAB_TAT_DEFINES_BUILD_RULE_CONF in self.Workspace.TargetTxt.TargetTxtDictionary:
- BuildRuleFile = self.Workspace.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_BUILD_RULE_CONF]
- if BuildRuleFile in [None, '']:
- BuildRuleFile = gBuildRuleFile
- self._BuildRule = BuildRule(BuildRuleFile)
- return self._BuildRule
-
- ## Summarize the packages used by modules in this platform
- def _GetPackageList(self):
- if self._PackageList == None:
- self._PackageList = set()
- for La in self.LibraryAutoGenList:
- self._PackageList.update(La.DependentPackageList)
- for Ma in self.ModuleAutoGenList:
- self._PackageList.update(Ma.DependentPackageList)
- self._PackageList = list(self._PackageList)
- return self._PackageList
-
- ## Get list of non-dynamic PCDs
- def _GetNonDynamicPcdList(self):
- return self._NonDynamicPcdList
-
- ## Get list of dynamic PCDs
- def _GetDynamicPcdList(self):
- return self._DynamicPcdList
-
- ## Generate Token Number for all PCD
- def _GetPcdTokenNumbers(self):
- if self._PcdTokenNumber == None:
- self._PcdTokenNumber = sdict()
- TokenNumber = 1
- for Pcd in self.DynamicPcdList:
- if Pcd.Phase == "PEI":
- EdkLogger.debug(EdkLogger.DEBUG_5, "%s %s (%s) -> %d" % (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Pcd.Phase, TokenNumber))
- self._PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
- TokenNumber += 1
-
- for Pcd in self.DynamicPcdList:
- if Pcd.Phase == "DXE":
- EdkLogger.debug(EdkLogger.DEBUG_5, "%s %s (%s) -> %d" % (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Pcd.Phase, TokenNumber))
- self._PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
- TokenNumber += 1
-
- for Pcd in self.NonDynamicPcdList:
- self._PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
- TokenNumber += 1
- return self._PcdTokenNumber
-
- ## Summarize ModuleAutoGen objects of all modules/libraries to be built for this platform
- def _GetAutoGenObjectList(self):
- self._ModuleAutoGenList = []
- self._LibraryAutoGenList = []
- for ModuleFile in self.Platform.Modules:
- Ma = ModuleAutoGen(
- self.Workspace,
- ModuleFile,
- self.BuildTarget,
- self.ToolChain,
- self.Arch,
- self.MetaFile
- )
- if Ma not in self._ModuleAutoGenList:
- self._ModuleAutoGenList.append(Ma)
- for La in Ma.LibraryAutoGenList:
- if La not in self._LibraryAutoGenList:
- self._LibraryAutoGenList.append(La)
-
- ## Summarize ModuleAutoGen objects of all modules to be built for this platform
- def _GetModuleAutoGenList(self):
- if self._ModuleAutoGenList == None:
- self._GetAutoGenObjectList()
- return self._ModuleAutoGenList
-
- ## Summarize ModuleAutoGen objects of all libraries to be built for this platform
- def _GetLibraryAutoGenList(self):
- if self._LibraryAutoGenList == None:
- self._GetAutoGenObjectList()
- return self._LibraryAutoGenList
-
- ## Test if a module is supported by the platform
- #
- # An error will be raised directly if the module or its arch is not supported
- # by the platform or current configuration
- #
- def ValidModule(self, Module):
- return Module in self.Platform.Modules or Module in self.Platform.LibraryInstances
-
- ## Resolve the library classes in a module to library instances
- #
- # This method will not only resolve library classes but also sort the library
- # instances according to the dependency-ship.
- #
- # @param Module The module from which the library classes will be resolved
- #
- # @retval library_list List of library instances sorted
- #
- def ApplyLibraryInstance(self, Module):
- ModuleType = Module.ModuleType
-
- # for overridding library instances with module specific setting
- PlatformModule = self.Platform.Modules[str(Module)]
-
- # add forced library instances (specified under LibraryClasses sections)
- for LibraryClass in self.Platform.LibraryClasses.GetKeys():
- if LibraryClass.startswith("NULL"):
- Module.LibraryClasses[LibraryClass] = self.Platform.LibraryClasses[LibraryClass]
-
- # add forced library instances (specified in module overrides)
- for LibraryClass in PlatformModule.LibraryClasses:
- if LibraryClass.startswith("NULL"):
- Module.LibraryClasses[LibraryClass] = PlatformModule.LibraryClasses[LibraryClass]
-
- # R9 module
- LibraryConsumerList = [Module]
- Constructor = []
- ConsumedByList = sdict()
- LibraryInstance = sdict()
-
- EdkLogger.verbose("")
- EdkLogger.verbose("Library instances of module [%s] [%s]:" % (str(Module), self.Arch))
- while len(LibraryConsumerList) > 0:
- M = LibraryConsumerList.pop()
- for LibraryClassName in M.LibraryClasses:
- if LibraryClassName not in LibraryInstance:
- # override library instance for this module
- if LibraryClassName in PlatformModule.LibraryClasses:
- LibraryPath = PlatformModule.LibraryClasses[LibraryClassName]
- else:
- LibraryPath = self.Platform.LibraryClasses[LibraryClassName, ModuleType]
- if LibraryPath == None or LibraryPath == "":
- LibraryPath = M.LibraryClasses[LibraryClassName]
- if LibraryPath == None or LibraryPath == "":
- EdkLogger.error("build", RESOURCE_NOT_AVAILABLE,
- "Instance of library class [%s] is not found" % LibraryClassName,
- File=self.MetaFile,
- ExtraData="in [%s] [%s]\n\tconsumed by module [%s]" % (str(M), self.Arch, str(Module)))
-
- LibraryModule = self.BuildDatabase[LibraryPath, self.Arch]
- # for those forced library instance (NULL library), add a fake library class
- if LibraryClassName.startswith("NULL"):
- LibraryModule.LibraryClass.append(LibraryClassObject(LibraryClassName, [ModuleType]))
- elif LibraryModule.LibraryClass == None \
- or len(LibraryModule.LibraryClass) == 0 \
- or (ModuleType != 'USER_DEFINED'
- and ModuleType not in LibraryModule.LibraryClass[0].SupModList):
- # only USER_DEFINED can link against any library instance despite of its SupModList
- EdkLogger.error("build", OPTION_MISSING,
- "Module type [%s] is not supported by library instance [%s]" \
- % (ModuleType, LibraryPath), File=self.MetaFile,
- ExtraData="consumed by [%s]" % str(Module))
-
- LibraryInstance[LibraryClassName] = LibraryModule
- LibraryConsumerList.append(LibraryModule)
- EdkLogger.verbose("\t" + str(LibraryClassName) + " : " + str(LibraryModule))
- else:
- LibraryModule = LibraryInstance[LibraryClassName]
-
- if LibraryModule == None:
- continue
-
- if LibraryModule.ConstructorList != [] and LibraryModule not in Constructor:
- Constructor.append(LibraryModule)
-
- if LibraryModule not in ConsumedByList:
- ConsumedByList[LibraryModule] = []
- # don't add current module itself to consumer list
- if M != Module:
- if M in ConsumedByList[LibraryModule]:
- continue
- ConsumedByList[LibraryModule].append(M)
- #
- # Initialize the sorted output list to the empty set
- #
- SortedLibraryList = []
- #
- # Q <- Set of all nodes with no incoming edges
- #
- LibraryList = [] #LibraryInstance.values()
- Q = []
- for LibraryClassName in LibraryInstance:
- M = LibraryInstance[LibraryClassName]
- LibraryList.append(M)
- if ConsumedByList[M] == []:
- Q.append(M)
-
- #
- # start the DAG algorithm
- #
- while True:
- EdgeRemoved = True
- while Q == [] and EdgeRemoved:
- EdgeRemoved = False
- # for each node Item with a Constructor
- for Item in LibraryList:
- if Item not in Constructor:
- continue
- # for each Node without a constructor with an edge e from Item to Node
- for Node in ConsumedByList[Item]:
- if Node in Constructor:
- continue
- # remove edge e from the graph if Node has no constructor
- ConsumedByList[Item].remove(Node)
- EdgeRemoved = True
- if ConsumedByList[Item] == []:
- # insert Item into Q
- Q.insert(0, Item)
- break
- if Q != []:
- break
- # DAG is done if there's no more incoming edge for all nodes
- if Q == []:
- break
-
- # remove node from Q
- Node = Q.pop()
- # output Node
- SortedLibraryList.append(Node)
-
- # for each node Item with an edge e from Node to Item do
- for Item in LibraryList:
- if Node not in ConsumedByList[Item]:
- continue
- # remove edge e from the graph
- ConsumedByList[Item].remove(Node)
-
- if ConsumedByList[Item] != []:
- continue
- # insert Item into Q, if Item has no other incoming edges
- Q.insert(0, Item)
-
- #
- # if any remaining node Item in the graph has a constructor and an incoming edge, then the graph has a cycle
- #
- for Item in LibraryList:
- if ConsumedByList[Item] != [] and Item in Constructor and len(Constructor) > 1:
- ErrorMessage = "\tconsumed by " + "\n\tconsumed by ".join([str(L) for L in ConsumedByList[Item]])
- EdkLogger.error("build", BUILD_ERROR, 'Library [%s] with constructors has a cycle' % str(Item),
- ExtraData=ErrorMessage, File=self.MetaFile)
- if Item not in SortedLibraryList:
- SortedLibraryList.append(Item)
-
- #
- # Build the list of constructor and destructir names
- # The DAG Topo sort produces the destructor order, so the list of constructors must generated in the reverse order
- #
- SortedLibraryList.reverse()
- return SortedLibraryList
-
-
- ## Override PCD setting (type, value, ...)
- #
- # @param ToPcd The PCD to be overrided
- # @param FromPcd The PCD overrideing from
- #
- def _OverridePcd(self, ToPcd, FromPcd, Module=""):
- #
- # in case there's PCDs coming from FDF file, which have no type given.
- # at this point, ToPcd.Type has the type found from dependent
- # package
- #
- if FromPcd != None:
- if ToPcd.Pending and FromPcd.Type not in [None, '']:
- ToPcd.Type = FromPcd.Type
- elif ToPcd.Type not in [None, ''] and FromPcd.Type not in [None, ''] \
- and ToPcd.Type != FromPcd.Type:
- EdkLogger.error("build", OPTION_CONFLICT, "Mismatched PCD type",
- ExtraData="%s.%s is defined as [%s] in module %s, but as [%s] in platform."\
- % (ToPcd.TokenSpaceGuidCName, ToPcd.TokenCName,
- ToPcd.Type, Module, FromPcd.Type),
- File=self.MetaFile)
-
- if FromPcd.MaxDatumSize not in [None, '']:
- ToPcd.MaxDatumSize = FromPcd.MaxDatumSize
- if FromPcd.DefaultValue not in [None, '']:
- ToPcd.DefaultValue = FromPcd.DefaultValue
- if FromPcd.TokenValue not in [None, '']:
- ToPcd.TokenValue = FromPcd.TokenValue
- if FromPcd.MaxDatumSize not in [None, '']:
- ToPcd.MaxDatumSize = FromPcd.MaxDatumSize
- if FromPcd.DatumType not in [None, '']:
- ToPcd.DatumType = FromPcd.DatumType
- if FromPcd.SkuInfoList not in [None, '', []]:
- ToPcd.SkuInfoList = FromPcd.SkuInfoList
-
- # check the validation of datum
- IsValid, Cause = CheckPcdDatum(ToPcd.DatumType, ToPcd.DefaultValue)
- if not IsValid:
- EdkLogger.error('build', FORMAT_INVALID, Cause, File=self.MetaFile,
- ExtraData="%s.%s" % (ToPcd.TokenSpaceGuidCName, ToPcd.TokenCName))
-
- if ToPcd.DatumType == "VOID*" and ToPcd.MaxDatumSize in ['', None]:
- EdkLogger.debug(EdkLogger.DEBUG_9, "No MaxDatumSize specified for PCD %s.%s" \
- % (ToPcd.TokenSpaceGuidCName, ToPcd.TokenCName))
- Value = ToPcd.DefaultValue
- if Value in [None, '']:
- ToPcd.MaxDatumSize = 1
- elif Value[0] == 'L':
- ToPcd.MaxDatumSize = str(len(Value) * 2)
- elif Value[0] == '{':
- ToPcd.MaxDatumSize = str(len(Value.split(',')))
- else:
- ToPcd.MaxDatumSize = str(len(Value))
-
- # apply default SKU for dynamic PCDS if specified one is not available
- if (ToPcd.Type in PCD_DYNAMIC_TYPE_LIST or ToPcd.Type in PCD_DYNAMIC_EX_TYPE_LIST) \
- and ToPcd.SkuInfoList in [None, {}, '']:
- if self.Platform.SkuName in self.Platform.SkuIds:
- SkuName = self.Platform.SkuName
- else:
- SkuName = 'DEFAULT'
- ToPcd.SkuInfoList = {
- SkuName : SkuInfoClass(SkuName, self.Platform.SkuIds[SkuName], '', '', '', '', '', ToPcd.DefaultValue)
- }
-
- ## Apply PCD setting defined platform to a module
- #
- # @param Module The module from which the PCD setting will be overrided
- #
- # @retval PCD_list The list PCDs with settings from platform
- #
- def ApplyPcdSetting(self, Module, Pcds):
- # for each PCD in module
- for Name,Guid in Pcds:
- PcdInModule = Pcds[Name,Guid]
- # find out the PCD setting in platform
- if (Name,Guid) in self.Platform.Pcds:
- PcdInPlatform = self.Platform.Pcds[Name,Guid]
- else:
- PcdInPlatform = None
- # then override the settings if any
- self._OverridePcd(PcdInModule, PcdInPlatform, Module)
- # resolve the VariableGuid value
- for SkuId in PcdInModule.SkuInfoList:
- Sku = PcdInModule.SkuInfoList[SkuId]
- if Sku.VariableGuid == '': continue
- Sku.VariableGuidValue = GuidValue(Sku.VariableGuid, self.PackageList)
- if Sku.VariableGuidValue == None:
- PackageList = "\n\t".join([str(P) for P in self.PackageList])
- EdkLogger.error(
- 'build',
- RESOURCE_NOT_AVAILABLE,
- "Value of GUID [%s] is not found in" % Sku.VariableGuid,
- ExtraData=PackageList + "\n\t(used with %s.%s from module %s)" \
- % (Guid, Name, str(Module)),
- File=self.MetaFile
- )
-
- # override PCD settings with module specific setting
- if Module in self.Platform.Modules:
- PlatformModule = self.Platform.Modules[str(Module)]
- for Key in PlatformModule.Pcds:
- if Key in Pcds:
- self._OverridePcd(Pcds[Key], PlatformModule.Pcds[Key], Module)
- return Pcds.values()
-
- ## Resolve library names to library modules
- #
- # (for R8.x modules)
- #
- # @param Module The module from which the library names will be resolved
- #
- # @retval library_list The list of library modules
- #
- def ResolveLibraryReference(self, Module):
- EdkLogger.verbose("")
- EdkLogger.verbose("Library instances of module [%s] [%s]:" % (str(Module), self.Arch))
- LibraryConsumerList = [Module]
-
- # "CompilerStub" is a must for R8 modules
- if Module.Libraries:
- Module.Libraries.append("CompilerStub")
- LibraryList = []
- while len(LibraryConsumerList) > 0:
- M = LibraryConsumerList.pop()
- for LibraryName in M.Libraries:
- Library = self.Platform.LibraryClasses[LibraryName, ':dummy:']
- if Library == None:
- for Key in self.Platform.LibraryClasses.data.keys():
- if LibraryName.upper() == Key.upper():
- Library = self.Platform.LibraryClasses[Key, ':dummy:']
- break
- if Library == None:
- EdkLogger.warn("build", "Library [%s] is not found" % LibraryName, File=str(M),
- ExtraData="\t%s [%s]" % (str(Module), self.Arch))
- continue
-
- if Library not in LibraryList:
- LibraryList.append(Library)
- LibraryConsumerList.append(Library)
- EdkLogger.verbose("\t" + LibraryName + " : " + str(Library) + ' ' + str(type(Library)))
- return LibraryList
-
- ## Expand * in build option key
- #
- # @param Options Options to be expanded
- #
- # @retval options Options expanded
- #
- def _ExpandBuildOption(self, Options):
- BuildOptions = {}
- FamilyMatch = False
- FamilyIsNull = True
- for Key in Options:
- Family = Key[0]
- Target, Tag, Arch, Tool, Attr = Key[1].split("_")
- # if tool chain family doesn't match, skip it
- if Tool in self.ToolDefinition and Family != "":
- FamilyIsNull = False
- if self.ToolDefinition[Tool].get(TAB_TOD_DEFINES_BUILDRULEFAMILY, "") != "":
- if Family != self.ToolDefinition[Tool][TAB_TOD_DEFINES_BUILDRULEFAMILY]:
- continue
- elif Family != self.ToolDefinition[Tool][TAB_TOD_DEFINES_FAMILY]:
- continue
- FamilyMatch = True
- # expand any wildcard
- if Target == "*" or Target == self.BuildTarget:
- if Tag == "*" or Tag == self.ToolChain:
- if Arch == "*" or Arch == self.Arch:
- if Tool not in BuildOptions:
- BuildOptions[Tool] = {}
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
- BuildOptions[Tool][Attr] = Options[Key]
- else:
- # append options for the same tool
- BuildOptions[Tool][Attr] += " " + Options[Key]
- # Build Option Family has been checked, which need't to be checked again for family.
- if FamilyMatch or FamilyIsNull:
- return BuildOptions
-
- for Key in Options:
- Family = Key[0]
- Target, Tag, Arch, Tool, Attr = Key[1].split("_")
- # if tool chain family doesn't match, skip it
- if Tool not in self.ToolDefinition or Family =="":
- continue
- # option has been added before
- if Family != self.ToolDefinition[Tool][TAB_TOD_DEFINES_FAMILY]:
- continue
-
- # expand any wildcard
- if Target == "*" or Target == self.BuildTarget:
- if Tag == "*" or Tag == self.ToolChain:
- if Arch == "*" or Arch == self.Arch:
- if Tool not in BuildOptions:
- BuildOptions[Tool] = {}
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
- BuildOptions[Tool][Attr] = Options[Key]
- else:
- # append options for the same tool
- BuildOptions[Tool][Attr] += " " + Options[Key]
- return BuildOptions
-
- ## Append build options in platform to a module
- #
- # @param Module The module to which the build options will be appened
- #
- # @retval options The options appended with build options in platform
- #
- def ApplyBuildOption(self, Module):
- PlatformOptions = self.BuildOption
- ModuleOptions = self._ExpandBuildOption(Module.BuildOptions)
- if Module in self.Platform.Modules:
- PlatformModule = self.Platform.Modules[str(Module)]
- PlatformModuleOptions = self._ExpandBuildOption(PlatformModule.BuildOptions)
- else:
- PlatformModuleOptions = {}
-
- AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() + PlatformModuleOptions.keys() + self.ToolDefinition.keys())
- BuildOptions = {}
- for Tool in AllTools:
- if Tool not in BuildOptions:
- BuildOptions[Tool] = {}
-
- for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, PlatformModuleOptions]:
- if Tool not in Options:
- continue
- for Attr in Options[Tool]:
- Value = Options[Tool][Attr]
- if Attr not in BuildOptions[Tool]:
- BuildOptions[Tool][Attr] = ""
- # check if override is indicated
- if Value.startswith('='):
- BuildOptions[Tool][Attr] = Value[1:]
- else:
- BuildOptions[Tool][Attr] += " " + Value
- return BuildOptions
-
- Platform = property(_GetPlatform)
- Name = property(_GetName)
- Guid = property(_GetGuid)
- Version = property(_GetVersion)
-
- OutputDir = property(_GetOutputDir)
- BuildDir = property(_GetBuildDir)
- MakeFileDir = property(_GetMakeFileDir)
- FdfFile = property(_GetFdfFile)
-
- PcdTokenNumber = property(_GetPcdTokenNumbers) # (TokenCName, TokenSpaceGuidCName) : GeneratedTokenNumber
- DynamicPcdList = property(_GetDynamicPcdList) # [(TokenCName1, TokenSpaceGuidCName1), (TokenCName2, TokenSpaceGuidCName2), ...]
- NonDynamicPcdList = property(_GetNonDynamicPcdList) # [(TokenCName1, TokenSpaceGuidCName1), (TokenCName2, TokenSpaceGuidCName2), ...]
- PackageList = property(_GetPackageList)
-
- ToolDefinition = property(_GetToolDefinition) # toolcode : tool path
- ToolDefinitionFile = property(_GetToolDefFile) # toolcode : lib path
- ToolChainFamily = property(_GetToolChainFamily)
- BuildRuleFamily = property(_GetBuildRuleFamily)
- BuildOption = property(_GetBuildOptions) # toolcode : option
-
- BuildCommand = property(_GetBuildCommand)
- BuildRule = property(_GetBuildRule)
- ModuleAutoGenList = property(_GetModuleAutoGenList)
- LibraryAutoGenList = property(_GetLibraryAutoGenList)
-
-## ModuleAutoGen class
-#
-# This class encapsules the AutoGen behaviors for the build tools. In addition to
-# the generation of AutoGen.h and AutoGen.c, it will generate *.depex file according
-# to the [depex] section in module's inf file.
-#
-class ModuleAutoGen(AutoGen):
- ## The real constructor of ModuleAutoGen
- #
- # This method is not supposed to be called by users of ModuleAutoGen. It's
- # only used by factory method __new__() to do real initialization work for an
- # object of ModuleAutoGen
- #
- # @param Workspace EdkIIWorkspaceBuild object
- # @param ModuleFile The path of module file
- # @param Target Build target (DEBUG, RELEASE)
- # @param Toolchain Name of tool chain
- # @param Arch The arch the module supports
- # @param PlatformFile Platform meta-file
- #
- def _Init(self, Workspace, ModuleFile, Target, Toolchain, Arch, PlatformFile):
- EdkLogger.debug(EdkLogger.DEBUG_9, "AutoGen module [%s] [%s]" % (ModuleFile, Arch))
- GlobalData.gProcessingFile = "%s [%s, %s, %s]" % (ModuleFile, Arch, Toolchain, Target)
-
- self.Workspace = Workspace
- self.WorkspaceDir = Workspace.WorkspaceDir
-
- self.MetaFile = ModuleFile
- self.PlatformInfo = PlatformAutoGen(Workspace, PlatformFile, Target, Toolchain, Arch)
- # check if this module is employed by active platform
- if not self.PlatformInfo.ValidModule(self.MetaFile):
- EdkLogger.verbose("Module [%s] for [%s] is not employed by active platform\n" \
- % (self.MetaFile, Arch))
- return False
-
- self.SourceDir = self.MetaFile.SubDir
- self.SourceOverrideDir = None
- # use overrided path defined in DSC file
- if self.MetaFile.Key in GlobalData.gOverrideDir:
- self.SourceOverrideDir = GlobalData.gOverrideDir[self.MetaFile.Key]
-
- self.ToolChain = Toolchain
- self.BuildTarget = Target
- self.Arch = Arch
- self.ToolChainFamily = self.PlatformInfo.ToolChainFamily
- self.BuildRuleFamily = self.PlatformInfo.BuildRuleFamily
-
- self.IsMakeFileCreated = False
- self.IsCodeFileCreated = False
-
- self.BuildDatabase = self.Workspace.BuildDatabase
-
- self._Module = None
- self._Name = None
- self._Guid = None
- self._Version = None
- self._ModuleType = None
- self._ComponentType = None
- self._PcdIsDriver = None
- self._AutoGenVersion = None
- self._LibraryFlag = None
- self._CustomMakefile = None
- self._Macro = None
-
- self._BuildDir = None
- self._OutputDir = None
- self._DebugDir = None
- self._MakeFileDir = None
-
- self._IncludePathList = None
- self._AutoGenFileList = None
- self._UnicodeFileList = None
- self._SourceFileList = None
- self._ObjectFileList = None
- self._BinaryFileList = None
-
- self._DependentPackageList = None
- self._DependentLibraryList = None
- self._LibraryAutoGenList = None
- self._DerivedPackageList = None
- self._ModulePcdList = None
- self._LibraryPcdList = None
- self._GuidList = None
- self._ProtocolList = None
- self._PpiList = None
- self._DepexList = None
- self._DepexExpressionList = None
- self._BuildOption = None
- self._BuildTargets = None
- self._IntroBuildTargetList = None
- self._FinalBuildTargetList = None
- self._FileTypes = None
- self._BuildRules = None
-
- return True
-
- def __repr__(self):
- return "%s [%s]" % (self.MetaFile, self.Arch)
-
- # Macros could be used in build_rule.txt (also Makefile)
- def _GetMacros(self):
- if self._Macro == None:
- self._Macro = sdict()
- self._Macro["WORKSPACE" ] = self.WorkspaceDir
- self._Macro["MODULE_NAME" ] = self.Name
- self._Macro["MODULE_GUID" ] = self.Guid
- self._Macro["MODULE_VERSION" ] = self.Version
- self._Macro["MODULE_TYPE" ] = self.ModuleType
- self._Macro["MODULE_FILE" ] = str(self.MetaFile)
- self._Macro["MODULE_FILE_BASE_NAME" ] = self.MetaFile.BaseName
- self._Macro["MODULE_RELATIVE_DIR" ] = self.SourceDir
- self._Macro["MODULE_DIR" ] = self.SourceDir
-
- self._Macro["BASE_NAME" ] = self.Name
-
- self._Macro["ARCH" ] = self.Arch
- self._Macro["TOOLCHAIN" ] = self.ToolChain
- self._Macro["TOOLCHAIN_TAG" ] = self.ToolChain
- self._Macro["TARGET" ] = self.BuildTarget
-
- self._Macro["BUILD_DIR" ] = self.PlatformInfo.BuildDir
- self._Macro["BIN_DIR" ] = os.path.join(self.PlatformInfo.BuildDir, self.Arch)
- self._Macro["LIB_DIR" ] = os.path.join(self.PlatformInfo.BuildDir, self.Arch)
- self._Macro["MODULE_BUILD_DIR" ] = self.BuildDir
- self._Macro["OUTPUT_DIR" ] = self.OutputDir
- self._Macro["DEBUG_DIR" ] = self.DebugDir
- return self._Macro
-
- ## Return the module build data object
- def _GetModule(self):
- if self._Module == None:
- self._Module = self.Workspace.BuildDatabase[self.MetaFile, self.Arch]
- return self._Module
-
- ## Return the module name
- def _GetBaseName(self):
- return self.Module.BaseName
-
- ## Return the module SourceOverridePath
- def _GetSourceOverridePath(self):
- return self.Module.SourceOverridePath
-
- ## Return the module meta-file GUID
- def _GetGuid(self):
- return self.Module.Guid
-
- ## Return the module version
- def _GetVersion(self):
- return self.Module.Version
-
- ## Return the module type
- def _GetModuleType(self):
- return self.Module.ModuleType
-
- ## Return the component type (for R8.x style of module)
- def _GetComponentType(self):
- return self.Module.ComponentType
-
- ## Return the build type
- def _GetBuildType(self):
- return self.Module.BuildType
-
- ## Return the PCD_IS_DRIVER setting
- def _GetPcdIsDriver(self):
- return self.Module.PcdIsDriver
-
- ## Return the autogen version, i.e. module meta-file version
- def _GetAutoGenVersion(self):
- return self.Module.AutoGenVersion
-
- ## Check if the module is library or not
- def _IsLibrary(self):
- if self._LibraryFlag == None:
- if self.Module.LibraryClass != None and self.Module.LibraryClass != []:
- self._LibraryFlag = True
- else:
- self._LibraryFlag = False
- return self._LibraryFlag
-
- ## Return the directory to store intermediate files of the module
- def _GetBuildDir(self):
- if self._BuildDir == None:
- self._BuildDir = path.join(
- self.PlatformInfo.BuildDir,
- self.Arch,
- self.SourceDir,
- self.MetaFile.BaseName
- )
- CreateDirectory(self._BuildDir)
- return self._BuildDir
-
- ## Return the directory to store the intermediate object files of the mdoule
- def _GetOutputDir(self):
- if self._OutputDir == None:
- self._OutputDir = path.join(self.BuildDir, "OUTPUT")
- CreateDirectory(self._OutputDir)
- return self._OutputDir
-
- ## Return the directory to store auto-gened source files of the mdoule
- def _GetDebugDir(self):
- if self._DebugDir == None:
- self._DebugDir = path.join(self.BuildDir, "DEBUG")
- CreateDirectory(self._DebugDir)
- return self._DebugDir
-
- ## Return the path of custom file
- def _GetCustomMakefile(self):
- if self._CustomMakefile == None:
- self._CustomMakefile = {}
- for Type in self.Module.CustomMakefile:
- if Type in gMakeTypeMap:
- MakeType = gMakeTypeMap[Type]
- else:
- MakeType = 'nmake'
- if self.SourceOverrideDir != None:
- File = os.path.join(self.SourceOverrideDir, self.Module.CustomMakefile[Type])
- if not os.path.exists(File):
- File = os.path.join(self.SourceDir, self.Module.CustomMakefile[Type])
- else:
- File = os.path.join(self.SourceDir, self.Module.CustomMakefile[Type])
- self._CustomMakefile[MakeType] = File
- return self._CustomMakefile
-
- ## Return the directory of the makefile
- #
- # @retval string The directory string of module's makefile
- #
- def _GetMakeFileDir(self):
- return self.BuildDir
-
- ## Return build command string
- #
- # @retval string Build command string
- #
- def _GetBuildCommand(self):
- return self.PlatformInfo.BuildCommand
-
- ## Get object list of all packages the module and its dependent libraries belong to
- #
- # @retval list The list of package object
- #
- def _GetDerivedPackageList(self):
- PackageList = []
- for M in [self.Module] + self.DependentLibraryList:
- for Package in M.Packages:
- if Package in PackageList:
- continue
- PackageList.append(Package)
- return PackageList
-
- ## Merge dependency expression
- #
- # @retval list The token list of the dependency expression after parsed
- #
- def _GetDepexTokenList(self):
- if self._DepexList == None:
- self._DepexList = {}
- if self.IsLibrary or TAB_DEPENDENCY_EXPRESSION_FILE in self.FileTypes:
- return self._DepexList
-
- self._DepexList[self.ModuleType] = []
-
- for ModuleType in self._DepexList:
- DepexList = self._DepexList[ModuleType]
- #
- # Append depex from dependent libraries, if not "BEFORE", "AFTER" expresion
- #
- for M in [self.Module] + self.DependentLibraryList:
- Inherited = False
- for D in M.Depex[self.Arch, ModuleType]:
- if DepexList != []:
- DepexList.append('AND')
- DepexList.append('(')
- DepexList.extend(D)
- if DepexList[-1] == 'END': # no need of a END at this time
- DepexList.pop()
- DepexList.append(')')
- Inherited = True
- if Inherited:
- EdkLogger.verbose("DEPEX[%s] (+%s) = %s" % (self.Name, M.BaseName, DepexList))
- if 'BEFORE' in DepexList or 'AFTER' in DepexList:
- break
- if len(DepexList) > 0:
- EdkLogger.verbose('')
- return self._DepexList
-
- ## Merge dependency expression
- #
- # @retval list The token list of the dependency expression after parsed
- #
- def _GetDepexExpressionTokenList(self):
- if self._DepexExpressionList == None:
- self._DepexExpressionList = {}
- if self.IsLibrary or TAB_DEPENDENCY_EXPRESSION_FILE in self.FileTypes:
- return self._DepexExpressionList
-
- self._DepexExpressionList[self.ModuleType] = ''
-
- for ModuleType in self._DepexExpressionList:
- DepexExpressionList = self._DepexExpressionList[ModuleType]
- #
- # Append depex from dependent libraries, if not "BEFORE", "AFTER" expresion
- #
- for M in [self.Module] + self.DependentLibraryList:
- Inherited = False
- for D in M.DepexExpression[self.Arch, ModuleType]:
- if DepexExpressionList != '':
- DepexExpressionList += ' AND '
- DepexExpressionList += '('
- DepexExpressionList += D
- DepexExpressionList = DepexExpressionList.rstrip('END').strip()
- DepexExpressionList += ')'
- Inherited = True
- if Inherited:
- EdkLogger.verbose("DEPEX[%s] (+%s) = %s" % (self.Name, M.BaseName, DepexExpressionList))
- if 'BEFORE' in DepexExpressionList or 'AFTER' in DepexExpressionList:
- break
- if len(DepexExpressionList) > 0:
- EdkLogger.verbose('')
- self._DepexExpressionList[ModuleType] = DepexExpressionList
- return self._DepexExpressionList
-
- ## Return the list of specification version required for the module
- #
- # @retval list The list of specification defined in module file
- #
- def _GetSpecification(self):
- return self.Module.Specification
-
- ## Tool option for the module build
- #
- # @param PlatformInfo The object of PlatformBuildInfo
- # @retval dict The dict containing valid options
- #
- def _GetModuleBuildOption(self):
- if self._BuildOption == None:
- self._BuildOption = self.PlatformInfo.ApplyBuildOption(self.Module)
- return self._BuildOption
-
- ## Return a list of files which can be built from source
- #
- # What kind of files can be built is determined by build rules in
- # $(WORKSPACE)/Conf/build_rule.txt and toolchain family.
- #
- def _GetSourceFileList(self):
- if self._SourceFileList == None:
- self._SourceFileList = []
- for F in self.Module.Sources:
- # match tool chain
- if F.TagName != "" and F.TagName != self.ToolChain:
- EdkLogger.debug(EdkLogger.DEBUG_9, "The toolchain [%s] for processing file [%s] is found, "
- "but [%s] is needed" % (F.TagName, str(F), self.ToolChain))
- continue
- # match tool chain family
- if F.ToolChainFamily != "" and F.ToolChainFamily != self.ToolChainFamily:
- EdkLogger.debug(
- EdkLogger.DEBUG_0,
- "The file [%s] must be built by tools of [%s], " \
- "but current toolchain family is [%s]" \
- % (str(F), F.ToolChainFamily, self.ToolChainFamily))
- continue
-
- # add the file path into search path list for file including
- if F.Dir not in self.IncludePathList and self.AutoGenVersion >= 0x00010005:
- self.IncludePathList.insert(0, F.Dir)
- self._SourceFileList.append(F)
- self._ApplyBuildRule(F, TAB_UNKNOWN_FILE)
- return self._SourceFileList
-
- ## Return the list of unicode files
- def _GetUnicodeFileList(self):
- if self._UnicodeFileList == None:
- if TAB_UNICODE_FILE in self.FileTypes:
- self._UnicodeFileList = self.FileTypes[TAB_UNICODE_FILE]
- else:
- self._UnicodeFileList = []
- return self._UnicodeFileList
-
- ## Return a list of files which can be built from binary
- #
- # "Build" binary files are just to copy them to build directory.
- #
- # @retval list The list of files which can be built later
- #
- def _GetBinaryFiles(self):
- if self._BinaryFileList == None:
- self._BinaryFileList = []
- for F in self.Module.Binaries:
- if F.Target not in ['COMMON', '*'] and F.Target != self.BuildTarget:
- continue
- self._BinaryFileList.append(F)
- self._ApplyBuildRule(F, F.Type)
- return self._BinaryFileList
-
- def _GetBuildRules(self):
- if self._BuildRules == None:
- BuildRules = {}
- BuildRuleDatabase = self.PlatformInfo.BuildRule
- for Type in BuildRuleDatabase.FileTypeList:
- #first try getting build rule by BuildRuleFamily
- RuleObject = BuildRuleDatabase[Type, self.BuildType, self.Arch, self.BuildRuleFamily]
- if not RuleObject:
- # build type is always module type, but ...
- if self.ModuleType != self.BuildType:
- RuleObject = BuildRuleDatabase[Type, self.ModuleType, self.Arch, self.BuildRuleFamily]
- #second try getting build rule by ToolChainFamily
- if not RuleObject:
- RuleObject = BuildRuleDatabase[Type, self.BuildType, self.Arch, self.ToolChainFamily]
- if not RuleObject:
- # build type is always module type, but ...
- if self.ModuleType != self.BuildType:
- RuleObject = BuildRuleDatabase[Type, self.ModuleType, self.Arch, self.ToolChainFamily]
- if not RuleObject:
- continue
- RuleObject = RuleObject.Instantiate(self.Macros)
- BuildRules[Type] = RuleObject
- for Ext in RuleObject.SourceFileExtList:
- BuildRules[Ext] = RuleObject
- self._BuildRules = BuildRules
- return self._BuildRules
-
- def _ApplyBuildRule(self, File, FileType):
- if self._BuildTargets == None:
- self._IntroBuildTargetList = set()
- self._FinalBuildTargetList = set()
- self._BuildTargets = {}
- self._FileTypes = {}
-
- LastTarget = None
- RuleChain = []
- SourceList = [File]
- Index = 0
- while Index < len(SourceList):
- Source = SourceList[Index]
- Index = Index + 1
-
- if Source != File:
- CreateDirectory(Source.Dir)
-
- if File.IsBinary and File == Source and self._BinaryFileList != None and File in self._BinaryFileList:
- RuleObject = self.BuildRules[TAB_DEFAULT_BINARY_FILE]
- elif FileType in self.BuildRules:
- RuleObject = self.BuildRules[FileType]
- elif Source.Ext in self.BuildRules:
- RuleObject = self.BuildRules[Source.Ext]
- else:
- # stop at no more rules
- if LastTarget:
- self._FinalBuildTargetList.add(LastTarget)
- break
-
- FileType = RuleObject.SourceFileType
- if FileType not in self._FileTypes:
- self._FileTypes[FileType] = set()
- self._FileTypes[FileType].add(Source)
-
- # stop at STATIC_LIBRARY for library
- if self.IsLibrary and FileType == TAB_STATIC_LIBRARY:
- if LastTarget:
- self._FinalBuildTargetList.add(LastTarget)
- break
-
- Target = RuleObject.Apply(Source)
- if not Target:
- if LastTarget:
- self._FinalBuildTargetList.add(LastTarget)
- break
- elif not Target.Outputs:
- # Only do build for target with outputs
- self._FinalBuildTargetList.add(Target)
-
- if FileType not in self._BuildTargets:
- self._BuildTargets[FileType] = set()
- self._BuildTargets[FileType].add(Target)
-
- if not Source.IsBinary and Source == File:
- self._IntroBuildTargetList.add(Target)
-
- # to avoid cyclic rule
- if FileType in RuleChain:
- break
-
- RuleChain.append(FileType)
- SourceList.extend(Target.Outputs)
- LastTarget = Target
- FileType = TAB_UNKNOWN_FILE
-
- def _GetTargets(self):
- if self._BuildTargets == None:
- self._IntroBuildTargetList = set()
- self._FinalBuildTargetList = set()
- self._BuildTargets = {}
- self._FileTypes = {}
-
- #TRICK: call _GetSourceFileList to apply build rule for binary files
- if self.SourceFileList:
- pass
-
- #TRICK: call _GetBinaryFileList to apply build rule for binary files
- if self.BinaryFileList:
- pass
-
- return self._BuildTargets
-
- def _GetIntroTargetList(self):
- self._GetTargets()
- return self._IntroBuildTargetList
-
- def _GetFinalTargetList(self):
- self._GetTargets()
- return self._FinalBuildTargetList
-
- def _GetFileTypes(self):
- self._GetTargets()
- return self._FileTypes
-
- ## Get the list of package object the module depends on
- #
- # @retval list The package object list
- #
- def _GetDependentPackageList(self):
- return self.Module.Packages
-
- ## Return the list of auto-generated code file
- #
- # @retval list The list of auto-generated file
- #
- def _GetAutoGenFileList(self):
- UniStringAutoGenC = True
- UniStringBinBuffer = None
- if self.BuildType == 'UEFI_HII':
- UniStringBinBuffer = StringIO()
- UniStringAutoGenC = False
- if self._AutoGenFileList == None:
- self._AutoGenFileList = {}
- AutoGenC = TemplateString()
- AutoGenH = TemplateString()
- StringH = TemplateString()
- GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, UniStringAutoGenC, UniStringBinBuffer)
- if str(AutoGenC) != "" and TAB_C_CODE_FILE in self.FileTypes:
- AutoFile = PathClass(gAutoGenCodeFileName, self.DebugDir)
- self._AutoGenFileList[AutoFile] = str(AutoGenC)
- self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
- if str(AutoGenH) != "":
- AutoFile = PathClass(gAutoGenHeaderFileName, self.DebugDir)
- self._AutoGenFileList[AutoFile] = str(AutoGenH)
- self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
- if str(StringH) != "":
- AutoFile = PathClass(gAutoGenStringFileName % {"module_name":self.Name}, self.DebugDir)
- self._AutoGenFileList[AutoFile] = str(StringH)
- self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
- if UniStringBinBuffer != None and UniStringBinBuffer.getvalue() != "":
- AutoFile = PathClass(gAutoGenStringFormFileName % {"module_name":self.Name}, self.OutputDir)
- self._AutoGenFileList[AutoFile] = UniStringBinBuffer.getvalue()
- AutoFile.IsBinary = True
- self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
- if UniStringBinBuffer != None:
- UniStringBinBuffer.close()
- return self._AutoGenFileList
-
- ## Return the list of library modules explicitly or implicityly used by this module
- def _GetLibraryList(self):
- if self._DependentLibraryList == None:
- # only merge library classes and PCD for non-library module
- if self.IsLibrary:
- self._DependentLibraryList = []
- else:
- if self.AutoGenVersion < 0x00010005:
- self._DependentLibraryList = self.PlatformInfo.ResolveLibraryReference(self.Module)
- else:
- self._DependentLibraryList = self.PlatformInfo.ApplyLibraryInstance(self.Module)
- return self._DependentLibraryList
-
- ## Get the list of PCDs from current module
- #
- # @retval list The list of PCD
- #
- def _GetModulePcdList(self):
- if self._ModulePcdList == None:
- # apply PCD settings from platform
- self._ModulePcdList = self.PlatformInfo.ApplyPcdSetting(self.Module, self.Module.Pcds)
- return self._ModulePcdList
-
- ## Get the list of PCDs from dependent libraries
- #
- # @retval list The list of PCD
- #
- def _GetLibraryPcdList(self):
- if self._LibraryPcdList == None:
- Pcds = {}
- if not self.IsLibrary:
- # get PCDs from dependent libraries
- for Library in self.DependentLibraryList:
- for Key in Library.Pcds:
- # skip duplicated PCDs
- if Key in self.Module.Pcds or Key in Pcds:
- continue
- Pcds[Key] = copy.copy(Library.Pcds[Key])
- # apply PCD settings from platform
- self._LibraryPcdList = self.PlatformInfo.ApplyPcdSetting(self.Module, Pcds)
- else:
- self._LibraryPcdList = []
- return self._LibraryPcdList
-
- ## Get the GUID value mapping
- #
- # @retval dict The mapping between GUID cname and its value
- #
- def _GetGuidList(self):
- if self._GuidList == None:
- self._GuidList = self.Module.Guids
- for Library in self.DependentLibraryList:
- self._GuidList.update(Library.Guids)
- return self._GuidList
-
- ## Get the protocol value mapping
- #
- # @retval dict The mapping between protocol cname and its value
- #
- def _GetProtocolList(self):
- if self._ProtocolList == None:
- self._ProtocolList = self.Module.Protocols
- for Library in self.DependentLibraryList:
- self._ProtocolList.update(Library.Protocols)
- return self._ProtocolList
-
- ## Get the PPI value mapping
- #
- # @retval dict The mapping between PPI cname and its value
- #
- def _GetPpiList(self):
- if self._PpiList == None:
- self._PpiList = self.Module.Ppis
- for Library in self.DependentLibraryList:
- self._PpiList.update(Library.Ppis)
- return self._PpiList
-
- ## Get the list of include search path
- #
- # @retval list The list path
- #
- def _GetIncludePathList(self):
- if self._IncludePathList == None:
- self._IncludePathList = []
- if self.AutoGenVersion < 0x00010005:
- for Inc in self.Module.Includes:
- if Inc not in self._IncludePathList:
- self._IncludePathList.append(Inc)
- # for r8 modules
- Inc = path.join(Inc, self.Arch.capitalize())
- if os.path.exists(Inc) and Inc not in self._IncludePathList:
- self._IncludePathList.append(Inc)
- # r8 module needs to put DEBUG_DIR at the end of search path and not to use SOURCE_DIR all the time
- self._IncludePathList.append(self.DebugDir)
- else:
- self._IncludePathList.append(self.MetaFile.Dir)
- self._IncludePathList.append(self.DebugDir)
-
- for Package in self.Module.Packages:
- PackageDir = path.join(self.WorkspaceDir, Package.MetaFile.Dir)
- if PackageDir not in self._IncludePathList:
- self._IncludePathList.append(PackageDir)
- for Inc in Package.Includes:
- if Inc not in self._IncludePathList:
- self._IncludePathList.append(str(Inc))
- return self._IncludePathList
-
- ## Create makefile for the module and its dependent libraries
- #
- # @param CreateLibraryMakeFile Flag indicating if or not the makefiles of
- # dependent libraries will be created
- #
- def CreateMakeFile(self, CreateLibraryMakeFile=True):
- if self.IsMakeFileCreated:
- return
-
- if not self.IsLibrary and CreateLibraryMakeFile:
- for LibraryAutoGen in self.LibraryAutoGenList:
- LibraryAutoGen.CreateMakeFile()
-
- if len(self.CustomMakefile) == 0:
- Makefile = GenMake.ModuleMakefile(self)
- else:
- Makefile = GenMake.CustomMakefile(self)
- if Makefile.Generate():
- EdkLogger.debug(EdkLogger.DEBUG_9, "Generated makefile for module %s [%s]" %
- (self.Name, self.Arch))
- else:
- EdkLogger.debug(EdkLogger.DEBUG_9, "Skipped the generation of makefile for module %s [%s]" %
- (self.Name, self.Arch))
-
- self.IsMakeFileCreated = True
-
- ## Create autogen code for the module and its dependent libraries
- #
- # @param CreateLibraryCodeFile Flag indicating if or not the code of
- # dependent libraries will be created
- #
- def CreateCodeFile(self, CreateLibraryCodeFile=True):
- if self.IsCodeFileCreated:
- return
-
- if not self.IsLibrary and CreateLibraryCodeFile:
- for LibraryAutoGen in self.LibraryAutoGenList:
- LibraryAutoGen.CreateCodeFile()
-
- AutoGenList = []
- IgoredAutoGenList = []
-
- for File in self.AutoGenFileList:
- if GenC.Generate(File.Path, self.AutoGenFileList[File], File.IsBinary):
- #Ignore R8 AutoGen.c
- if self.AutoGenVersion < 0x00010005 and File.Name == 'AutoGen.c':
- continue
-
- AutoGenList.append(str(File))
- else:
- IgoredAutoGenList.append(str(File))
-
- # Skip the following code for EDK I inf
- if self.AutoGenVersion < 0x00010005:
- return
-
- for ModuleType in self.DepexList:
- if len(self.DepexList[ModuleType]) == 0:
- continue
- Dpx = GenDepex.DependencyExpression(self.DepexList[ModuleType], ModuleType, True)
- DpxFile = gAutoGenDepexFileName % {"module_name" : self.Name}
-
- if Dpx.Generate(path.join(self.OutputDir, DpxFile)):
- AutoGenList.append(str(DpxFile))
- else:
- IgoredAutoGenList.append(str(DpxFile))
-
- if IgoredAutoGenList == []:
- EdkLogger.debug(EdkLogger.DEBUG_9, "Generated [%s] files for module %s [%s]" %
- (" ".join(AutoGenList), self.Name, self.Arch))
- elif AutoGenList == []:
- EdkLogger.debug(EdkLogger.DEBUG_9, "Skipped the generation of [%s] files for module %s [%s]" %
- (" ".join(IgoredAutoGenList), self.Name, self.Arch))
- else:
- EdkLogger.debug(EdkLogger.DEBUG_9, "Generated [%s] (skipped %s) files for module %s [%s]" %
- (" ".join(AutoGenList), " ".join(IgoredAutoGenList), self.Name, self.Arch))
-
- self.IsCodeFileCreated = True
- return AutoGenList
-
- ## Summarize the ModuleAutoGen objects of all libraries used by this module
- def _GetLibraryAutoGenList(self):
- if self._LibraryAutoGenList == None:
- self._LibraryAutoGenList = []
- for Library in self.DependentLibraryList:
- La = ModuleAutoGen(
- self.Workspace,
- Library.MetaFile,
- self.BuildTarget,
- self.ToolChain,
- self.Arch,
- self.PlatformInfo.MetaFile
- )
- if La not in self._LibraryAutoGenList:
- self._LibraryAutoGenList.append(La)
- for Lib in La.CodaTargetList:
- self._ApplyBuildRule(Lib.Target, TAB_UNKNOWN_FILE)
- return self._LibraryAutoGenList
-
- ## Return build command string
- #
- # @retval string Build command string
- #
- def _GetBuildCommand(self):
- return self.PlatformInfo.BuildCommand
-
-
- Module = property(_GetModule)
- Name = property(_GetBaseName)
- Guid = property(_GetGuid)
- Version = property(_GetVersion)
- ModuleType = property(_GetModuleType)
- ComponentType = property(_GetComponentType)
- BuildType = property(_GetBuildType)
- PcdIsDriver = property(_GetPcdIsDriver)
- AutoGenVersion = property(_GetAutoGenVersion)
- Macros = property(_GetMacros)
- Specification = property(_GetSpecification)
-
- IsLibrary = property(_IsLibrary)
-
- BuildDir = property(_GetBuildDir)
- OutputDir = property(_GetOutputDir)
- DebugDir = property(_GetDebugDir)
- MakeFileDir = property(_GetMakeFileDir)
- CustomMakefile = property(_GetCustomMakefile)
-
- IncludePathList = property(_GetIncludePathList)
- AutoGenFileList = property(_GetAutoGenFileList)
- UnicodeFileList = property(_GetUnicodeFileList)
- SourceFileList = property(_GetSourceFileList)
- BinaryFileList = property(_GetBinaryFiles) # FileType : [File List]
- Targets = property(_GetTargets)
- IntroTargetList = property(_GetIntroTargetList)
- CodaTargetList = property(_GetFinalTargetList)
- FileTypes = property(_GetFileTypes)
- BuildRules = property(_GetBuildRules)
-
- DependentPackageList = property(_GetDependentPackageList)
- DependentLibraryList = property(_GetLibraryList)
- LibraryAutoGenList = property(_GetLibraryAutoGenList)
- DerivedPackageList = property(_GetDerivedPackageList)
-
- ModulePcdList = property(_GetModulePcdList)
- LibraryPcdList = property(_GetLibraryPcdList)
- GuidList = property(_GetGuidList)
- ProtocolList = property(_GetProtocolList)
- PpiList = property(_GetPpiList)
- DepexList = property(_GetDepexTokenList)
- DepexExpressionList = property(_GetDepexExpressionTokenList)
- BuildOption = property(_GetModuleBuildOption)
- BuildCommand = property(_GetBuildCommand)
-
-# This acts like the main() function for the script, unless it is 'import'ed into another script.
-if __name__ == '__main__':
- pass
-
+## @file
+# Generate AutoGen.h, AutoGen.c and *.depex files
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+## Import Modules
+#
+import os
+import re
+import os.path as path
+import copy
+
+import GenC
+import GenMake
+import GenDepex
+from StringIO import StringIO
+
+from StrGather import *
+from BuildEngine import BuildRule
+
+from Common.BuildToolError import *
+from Common.DataType import *
+from Common.Misc import *
+from Common.String import *
+import Common.GlobalData as GlobalData
+from GenFds.FdfParser import *
+from CommonDataClass.CommonClass import SkuInfoClass
+from Workspace.BuildClassObject import *
+
+## Regular expression for splitting Dependency Expression stirng into tokens
+gDepexTokenPattern = re.compile("(\(|\)|\w+| \S+\.inf)")
+
+## Mapping Makefile type
+gMakeTypeMap = {"MSFT":"nmake", "GCC":"gmake"}
+
+
+## Build rule configuration file
+gBuildRuleFile = 'Conf/build_rule.txt'
+
+## default file name for AutoGen
+gAutoGenCodeFileName = "AutoGen.c"
+gAutoGenHeaderFileName = "AutoGen.h"
+gAutoGenStringFileName = "%(module_name)sStrDefs.h"
+gAutoGenStringFormFileName = "%(module_name)sStrDefs.hpk"
+gAutoGenDepexFileName = "%(module_name)s.depex"
+
+## Base class for AutoGen
+#
+# This class just implements the cache mechanism of AutoGen objects.
+#
+class AutoGen(object):
+ # database to maintain the objects of xxxAutoGen
+ _CACHE_ = {} # (BuildTarget, ToolChain) : {ARCH : {platform file: AutoGen object}}}
+
+ ## Factory method
+ #
+ # @param Class class object of real AutoGen class
+ # (WorkspaceAutoGen, ModuleAutoGen or PlatformAutoGen)
+ # @param Workspace Workspace directory or WorkspaceAutoGen object
+ # @param MetaFile The path of meta file
+ # @param Target Build target
+ # @param Toolchain Tool chain name
+ # @param Arch Target arch
+ # @param *args The specific class related parameters
+ # @param **kwargs The specific class related dict parameters
+ #
+ def __new__(Class, Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs):
+ # check if the object has been created
+ Key = (Target, Toolchain)
+ if Key not in Class._CACHE_ or Arch not in Class._CACHE_[Key] \
+ or MetaFile not in Class._CACHE_[Key][Arch]:
+ AutoGenObject = super(AutoGen, Class).__new__(Class)
+ # call real constructor
+ if not AutoGenObject._Init(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs):
+ return None
+ if Key not in Class._CACHE_:
+ Class._CACHE_[Key] = {}
+ if Arch not in Class._CACHE_[Key]:
+ Class._CACHE_[Key][Arch] = {}
+ Class._CACHE_[Key][Arch][MetaFile] = AutoGenObject
+ else:
+ AutoGenObject = Class._CACHE_[Key][Arch][MetaFile]
+
+ return AutoGenObject
+
+ ## hash() operator
+ #
+ # The file path of platform file will be used to represent hash value of this object
+ #
+ # @retval int Hash value of the file path of platform file
+ #
+ def __hash__(self):
+ return hash(self.MetaFile)
+
+ ## str() operator
+ #
+ # The file path of platform file will be used to represent this object
+ #
+ # @retval string String of platform file path
+ #
+ def __str__(self):
+ return str(self.MetaFile)
+
+ ## "==" operator
+ def __eq__(self, Other):
+ return Other and self.MetaFile == Other
+
+## Workspace AutoGen class
+#
+# This class is used mainly to control the whole platform build for different
+# architecture. This class will generate top level makefile.
+#
+class WorkspaceAutoGen(AutoGen):
+ ## Real constructor of WorkspaceAutoGen
+ #
+ # This method behaves the same as __init__ except that it needs explict invoke
+ # (in super class's __new__ method)
+ #
+ # @param WorkspaceDir Root directory of workspace
+ # @param ActivePlatform Meta-file of active platform
+ # @param Target Build target
+ # @param Toolchain Tool chain name
+ # @param ArchList List of architecture of current build
+ # @param MetaFileDb Database containing meta-files
+ # @param BuildConfig Configuration of build
+ # @param ToolDefinition Tool chain definitions
+ # @param FlashDefinitionFile File of flash definition
+ # @param Fds FD list to be generated
+ # @param Fvs FV list to be generated
+ # @param SkuId SKU id from command line
+ #
+ def _Init(self, WorkspaceDir, ActivePlatform, Target, Toolchain, ArchList, MetaFileDb,
+ BuildConfig, ToolDefinition, FlashDefinitionFile='', Fds=[], Fvs=[], SkuId=''):
+ self.MetaFile = ActivePlatform.MetaFile
+ self.WorkspaceDir = WorkspaceDir
+ self.Platform = ActivePlatform
+ self.BuildTarget = Target
+ self.ToolChain = Toolchain
+ self.ArchList = ArchList
+ self.SkuId = SkuId
+
+ self.BuildDatabase = MetaFileDb
+ self.TargetTxt = BuildConfig
+ self.ToolDef = ToolDefinition
+ self.FdfFile = FlashDefinitionFile
+ self.FdTargetList = Fds
+ self.FvTargetList = Fvs
+ self.AutoGenObjectList = []
+
+ # there's many relative directory operations, so ...
+ os.chdir(self.WorkspaceDir)
+
+ # parse FDF file to get PCDs in it, if any
+ if self.FdfFile != None and self.FdfFile != '':
+ Fdf = FdfParser(self.FdfFile.Path)
+ Fdf.ParseFile()
+ PcdSet = Fdf.Profile.PcdDict
+ ModuleList = Fdf.Profile.InfList
+ self.FdfProfile = Fdf.Profile
+ else:
+ PcdSet = {}
+ ModuleList = []
+ self.FdfProfile = None
+
+ # apply SKU and inject PCDs from Flash Definition file
+ for Arch in self.ArchList:
+ Platform = self.BuildDatabase[self.MetaFile, Arch]
+ Platform.SkuName = self.SkuId
+ for Name, Guid in PcdSet:
+ Platform.AddPcd(Name, Guid, PcdSet[Name, Guid])
+
+ Pa = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
+ #
+ # Explicitly collect platform's dynamic PCDs
+ #
+ Pa.CollectPlatformDynamicPcds()
+ self.AutoGenObjectList.append(Pa)
+
+ self._BuildDir = None
+ self._FvDir = None
+ self._MakeFileDir = None
+ self._BuildCommand = None
+
+ return True
+
+ def __repr__(self):
+ return "%s [%s]" % (self.MetaFile, ", ".join(self.ArchList))
+
+ ## Return the directory to store FV files
+ def _GetFvDir(self):
+ if self._FvDir == None:
+ self._FvDir = path.join(self.BuildDir, 'FV')
+ return self._FvDir
+
+ ## Return the directory to store all intermediate and final files built
+ def _GetBuildDir(self):
+ return self.AutoGenObjectList[0].BuildDir
+
+ ## Return the build output directory platform specifies
+ def _GetOutputDir(self):
+ return self.Platform.OutputDirectory
+
+ ## Return platform name
+ def _GetName(self):
+ return self.Platform.PlatformName
+
+ ## Return meta-file GUID
+ def _GetGuid(self):
+ return self.Platform.Guid
+
+ ## Return platform version
+ def _GetVersion(self):
+ return self.Platform.Version
+
+ ## Return paths of tools
+ def _GetToolDefinition(self):
+ return self.AutoGenObjectList[0].ToolDefinition
+
+ ## Return directory of platform makefile
+ #
+ # @retval string Makefile directory
+ #
+ def _GetMakeFileDir(self):
+ if self._MakeFileDir == None:
+ self._MakeFileDir = self.BuildDir
+ return self._MakeFileDir
+
+ ## Return build command string
+ #
+ # @retval string Build command string
+ #
+ def _GetBuildCommand(self):
+ if self._BuildCommand == None:
+ # BuildCommand should be all the same. So just get one from platform AutoGen
+ self._BuildCommand = self.AutoGenObjectList[0].BuildCommand
+ return self._BuildCommand
+
+ ## Create makefile for the platform and mdoules in it
+ #
+ # @param CreateDepsMakeFile Flag indicating if the makefile for
+ # modules will be created as well
+ #
+ def CreateMakeFile(self, CreateDepsMakeFile=False):
+ # create makefile for platform
+ Makefile = GenMake.TopLevelMakefile(self)
+ if Makefile.Generate():
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Generated makefile for platform [%s] %s\n" %
+ (self.MetaFile, self.ArchList))
+ else:
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Skipped the generation of makefile for platform [%s] %s\n" %
+ (self.MetaFile, self.ArchList))
+
+ if CreateDepsMakeFile:
+ for Pa in self.AutoGenObjectList:
+ Pa.CreateMakeFile(CreateDepsMakeFile)
+
+ ## Create autogen code for platform and modules
+ #
+ # Since there's no autogen code for platform, this method will do nothing
+ # if CreateModuleCodeFile is set to False.
+ #
+ # @param CreateDepsCodeFile Flag indicating if creating module's
+ # autogen code file or not
+ #
+ def CreateCodeFile(self, CreateDepsCodeFile=False):
+ if not CreateDepsCodeFile:
+ return
+ for Pa in self.AutoGenObjectList:
+ Pa.CreateCodeFile(CreateDepsCodeFile)
+
+ Name = property(_GetName)
+ Guid = property(_GetGuid)
+ Version = property(_GetVersion)
+ OutputDir = property(_GetOutputDir)
+
+ ToolDefinition = property(_GetToolDefinition) # toolcode : tool path
+
+ BuildDir = property(_GetBuildDir)
+ FvDir = property(_GetFvDir)
+ MakeFileDir = property(_GetMakeFileDir)
+ BuildCommand = property(_GetBuildCommand)
+
+## AutoGen class for platform
+#
+# PlatformAutoGen class will process the original information in platform
+# file in order to generate makefile for platform.
+#
+class PlatformAutoGen(AutoGen):
+ #
+ # Used to store all PCDs for both PEI and DXE phase, in order to generate
+ # correct PCD database
+ #
+ _DynaPcdList_ = []
+ _NonDynaPcdList_ = []
+
+ ## The real constructor of PlatformAutoGen
+ #
+ # This method is not supposed to be called by users of PlatformAutoGen. It's
+ # only used by factory method __new__() to do real initialization work for an
+ # object of PlatformAutoGen
+ #
+ # @param Workspace WorkspaceAutoGen object
+ # @param PlatformFile Platform file (DSC file)
+ # @param Target Build target (DEBUG, RELEASE)
+ # @param Toolchain Name of tool chain
+ # @param Arch arch of the platform supports
+ #
+ def _Init(self, Workspace, PlatformFile, Target, Toolchain, Arch):
+ EdkLogger.debug(EdkLogger.DEBUG_9, "AutoGen platform [%s] [%s]" % (PlatformFile, Arch))
+ GlobalData.gProcessingFile = "%s [%s, %s, %s]" % (PlatformFile, Arch, Toolchain, Target)
+
+ self.MetaFile = PlatformFile
+ self.Workspace = Workspace
+ self.WorkspaceDir = Workspace.WorkspaceDir
+ self.ToolChain = Toolchain
+ self.BuildTarget = Target
+ self.Arch = Arch
+ self.SourceDir = PlatformFile.SubDir
+ self.SourceOverrideDir = None
+ self.FdTargetList = self.Workspace.FdTargetList
+ self.FvTargetList = self.Workspace.FvTargetList
+ self.AllPcdList = []
+
+ # flag indicating if the makefile/C-code file has been created or not
+ self.IsMakeFileCreated = False
+ self.IsCodeFileCreated = False
+
+ self._Platform = None
+ self._Name = None
+ self._Guid = None
+ self._Version = None
+
+ self._BuildRule = None
+ self._SourceDir = None
+ self._BuildDir = None
+ self._OutputDir = None
+ self._FvDir = None
+ self._MakeFileDir = None
+ self._FdfFile = None
+
+ self._PcdTokenNumber = None # (TokenCName, TokenSpaceGuidCName) : GeneratedTokenNumber
+ self._DynamicPcdList = None # [(TokenCName1, TokenSpaceGuidCName1), (TokenCName2, TokenSpaceGuidCName2), ...]
+ self._NonDynamicPcdList = None # [(TokenCName1, TokenSpaceGuidCName1), (TokenCName2, TokenSpaceGuidCName2), ...]
+
+ self._ToolDefinitions = None
+ self._ToolDefFile = None # toolcode : tool path
+ self._ToolChainFamily = None
+ self._BuildRuleFamily = None
+ self._BuildOption = None # toolcode : option
+ self._EdkBuildOption = None # edktoolcode : option
+ self._EdkIIBuildOption = None # edkiitoolcode : option
+ self._PackageList = None
+ self._ModuleAutoGenList = None
+ self._LibraryAutoGenList = None
+ self._BuildCommand = None
+
+ # get the original module/package/platform objects
+ self.BuildDatabase = Workspace.BuildDatabase
+ return True
+
+ def __repr__(self):
+ return "%s [%s]" % (self.MetaFile, self.Arch)
+
+ ## Create autogen code for platform and modules
+ #
+ # Since there's no autogen code for platform, this method will do nothing
+ # if CreateModuleCodeFile is set to False.
+ #
+ # @param CreateModuleCodeFile Flag indicating if creating module's
+ # autogen code file or not
+ #
+ def CreateCodeFile(self, CreateModuleCodeFile=False):
+ # only module has code to be greated, so do nothing if CreateModuleCodeFile is False
+ if self.IsCodeFileCreated or not CreateModuleCodeFile:
+ return
+
+ for Ma in self.ModuleAutoGenList:
+ Ma.CreateCodeFile(True)
+
+ # don't do this twice
+ self.IsCodeFileCreated = True
+
+ ## Create makefile for the platform and mdoules in it
+ #
+ # @param CreateModuleMakeFile Flag indicating if the makefile for
+ # modules will be created as well
+ #
+ def CreateMakeFile(self, CreateModuleMakeFile=False):
+ if CreateModuleMakeFile:
+ for ModuleFile in self.Platform.Modules:
+ Ma = ModuleAutoGen(self.Workspace, ModuleFile, self.BuildTarget,
+ self.ToolChain, self.Arch, self.MetaFile)
+ Ma.CreateMakeFile(True)
+
+ # no need to create makefile for the platform more than once
+ if self.IsMakeFileCreated:
+ return
+
+ # create makefile for platform
+ Makefile = GenMake.PlatformMakefile(self)
+ if Makefile.Generate():
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Generated makefile for platform [%s] [%s]\n" %
+ (self.MetaFile, self.Arch))
+ else:
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Skipped the generation of makefile for platform [%s] [%s]\n" %
+ (self.MetaFile, self.Arch))
+ self.IsMakeFileCreated = True
+
+ ## Collect dynamic PCDs
+ #
+ # Gather dynamic PCDs list from each module and their settings from platform
+ # This interface should be invoked explicitly when platform action is created.
+ #
+ def CollectPlatformDynamicPcds(self):
+ # for gathering error information
+ NoDatumTypePcdList = set()
+
+ self._GuidValue = {}
+ for F in self.Platform.Modules.keys():
+ M = ModuleAutoGen(self.Workspace, F, self.BuildTarget, self.ToolChain, self.Arch, self.MetaFile)
+ #GuidValue.update(M.Guids)
+
+ self.Platform.Modules[F].M = M
+
+ for PcdFromModule in M.ModulePcdList+M.LibraryPcdList:
+ # make sure that the "VOID*" kind of datum has MaxDatumSize set
+ if PcdFromModule.DatumType == "VOID*" and PcdFromModule.MaxDatumSize == None:
+ NoDatumTypePcdList.add("%s.%s [%s]" % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, F))
+
+ if PcdFromModule.Type in GenC.gDynamicPcd or PcdFromModule.Type in GenC.gDynamicExPcd:
+ #
+ # If a dynamic PCD used by a PEM module/PEI module & DXE module,
+ # it should be stored in Pcd PEI database, If a dynamic only
+ # used by DXE module, it should be stored in DXE PCD database.
+ # The default Phase is DXE
+ #
+ if M.ModuleType in ["PEIM", "PEI_CORE"]:
+ PcdFromModule.Phase = "PEI"
+ if PcdFromModule not in self._DynaPcdList_:
+ self._DynaPcdList_.append(PcdFromModule)
+ elif PcdFromModule.Phase == 'PEI':
+ # overwrite any the same PCD existing, if Phase is PEI
+ Index = self._DynaPcdList_.index(PcdFromModule)
+ self._DynaPcdList_[Index] = PcdFromModule
+ elif PcdFromModule not in self._NonDynaPcdList_:
+ self._NonDynaPcdList_.append(PcdFromModule)
+
+ # print out error information and break the build, if error found
+ if len(NoDatumTypePcdList) > 0:
+ NoDatumTypePcdListString = "\n\t\t".join(NoDatumTypePcdList)
+ EdkLogger.error("build", AUTOGEN_ERROR, "PCD setting error",
+ File=self.MetaFile,
+ ExtraData="\n\tPCD(s) without MaxDatumSize:\n\t\t%s\n"
+ % NoDatumTypePcdListString)
+ self._NonDynamicPcdList = self._NonDynaPcdList_
+ self._DynamicPcdList = self._DynaPcdList_
+ self.AllPcdList = self._NonDynamicPcdList + self._DynamicPcdList
+
+ #
+ # Sort dynamic PCD list to:
+ # 1) If PCD's datum type is VOID* and value is unicode string which starts with L, the PCD item should
+ # try to be put header of dynamicd List
+ # 2) If PCD is HII type, the PCD item should be put after unicode type PCD
+ #
+ # The reason of sorting is make sure the unicode string is in double-byte alignment in string table.
+ #
+ UnicodePcdArray = []
+ HiiPcdArray = []
+ OtherPcdArray = []
+ for Pcd in self._DynamicPcdList:
+ # just pick the a value to determine whether is unicode string type
+ Sku = Pcd.SkuInfoList[Pcd.SkuInfoList.keys()[0]]
+ PcdValue = Sku.DefaultValue
+ if Pcd.DatumType == 'VOID*' and PcdValue.startswith("L"):
+ # if found PCD which datum value is unicode string the insert to left size of UnicodeIndex
+ UnicodePcdArray.append(Pcd)
+ elif len(Sku.VariableName) > 0:
+ # if found HII type PCD then insert to right of UnicodeIndex
+ HiiPcdArray.append(Pcd)
+ else:
+ OtherPcdArray.append(Pcd)
+ del self._DynamicPcdList[:]
+ self._DynamicPcdList.extend(UnicodePcdArray)
+ self._DynamicPcdList.extend(HiiPcdArray)
+ self._DynamicPcdList.extend(OtherPcdArray)
+
+
+ ## Return the platform build data object
+ def _GetPlatform(self):
+ if self._Platform == None:
+ self._Platform = self.BuildDatabase[self.MetaFile, self.Arch]
+ return self._Platform
+
+ ## Return platform name
+ def _GetName(self):
+ return self.Platform.PlatformName
+
+ ## Return the meta file GUID
+ def _GetGuid(self):
+ return self.Platform.Guid
+
+ ## Return the platform version
+ def _GetVersion(self):
+ return self.Platform.Version
+
+ ## Return the FDF file name
+ def _GetFdfFile(self):
+ if self._FdfFile == None:
+ if self.Workspace.FdfFile != "":
+ self._FdfFile= path.join(self.WorkspaceDir, self.Workspace.FdfFile)
+ else:
+ self._FdfFile = ''
+ return self._FdfFile
+
+ ## Return the build output directory platform specifies
+ def _GetOutputDir(self):
+ return self.Platform.OutputDirectory
+
+ ## Return the directory to store all intermediate and final files built
+ def _GetBuildDir(self):
+ if self._BuildDir == None:
+ if os.path.isabs(self.OutputDir):
+ self._BuildDir = path.join(
+ path.abspath(self.OutputDir),
+ self.BuildTarget + "_" + self.ToolChain,
+ )
+ else:
+ self._BuildDir = path.join(
+ self.WorkspaceDir,
+ self.OutputDir,
+ self.BuildTarget + "_" + self.ToolChain,
+ )
+ return self._BuildDir
+
+ ## Return directory of platform makefile
+ #
+ # @retval string Makefile directory
+ #
+ def _GetMakeFileDir(self):
+ if self._MakeFileDir == None:
+ self._MakeFileDir = path.join(self.BuildDir, self.Arch)
+ return self._MakeFileDir
+
+ ## Return build command string
+ #
+ # @retval string Build command string
+ #
+ def _GetBuildCommand(self):
+ if self._BuildCommand == None:
+ self._BuildCommand = []
+ if "MAKE" in self.ToolDefinition and "PATH" in self.ToolDefinition["MAKE"]:
+ self._BuildCommand += SplitOption(self.ToolDefinition["MAKE"]["PATH"])
+ if "FLAGS" in self.ToolDefinition["MAKE"]:
+ NewOption = self.ToolDefinition["MAKE"]["FLAGS"].strip()
+ if NewOption != '':
+ self._BuildCommand += SplitOption(NewOption)
+ return self._BuildCommand
+
+ ## Get tool chain definition
+ #
+ # Get each tool defition for given tool chain from tools_def.txt and platform
+ #
+ def _GetToolDefinition(self):
+ if self._ToolDefinitions == None:
+ ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDictionary
+ if TAB_TOD_DEFINES_COMMAND_TYPE not in self.Workspace.ToolDef.ToolsDefTxtDatabase:
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "No tools found in configuration",
+ ExtraData="[%s]" % self.MetaFile)
+ self._ToolDefinitions = {}
+ DllPathList = set()
+ for Def in ToolDefinition:
+ Target, Tag, Arch, Tool, Attr = Def.split("_")
+ if Target != self.BuildTarget or Tag != self.ToolChain or Arch != self.Arch:
+ continue
+
+ Value = ToolDefinition[Def]
+ # don't record the DLL
+ if Attr == "DLL":
+ DllPathList.add(Value)
+ continue
+
+ if Tool not in self._ToolDefinitions:
+ self._ToolDefinitions[Tool] = {}
+ self._ToolDefinitions[Tool][Attr] = Value
+
+ ToolsDef = ''
+ MakePath = ''
+ if GlobalData.gOptions.SilentMode and "MAKE" in self._ToolDefinitions:
+ if "FLAGS" not in self._ToolDefinitions["MAKE"]:
+ self._ToolDefinitions["MAKE"]["FLAGS"] = ""
+ self._ToolDefinitions["MAKE"]["FLAGS"] += " -s"
+ MakeFlags = ''
+ for Tool in self._ToolDefinitions:
+ for Attr in self._ToolDefinitions[Tool]:
+ Value = self._ToolDefinitions[Tool][Attr]
+ if Tool in self.BuildOption and Attr in self.BuildOption[Tool]:
+ # check if override is indicated
+ if self.BuildOption[Tool][Attr].startswith('='):
+ Value = self.BuildOption[Tool][Attr][1:]
+ else:
+ Value += " " + self.BuildOption[Tool][Attr]
+
+ if Attr == "PATH":
+ # Don't put MAKE definition in the file
+ if Tool == "MAKE":
+ MakePath = Value
+ else:
+ ToolsDef += "%s = %s\n" % (Tool, Value)
+ elif Attr != "DLL":
+ # Don't put MAKE definition in the file
+ if Tool == "MAKE":
+ if Attr == "FLAGS":
+ MakeFlags = Value
+ else:
+ ToolsDef += "%s_%s = %s\n" % (Tool, Attr, Value)
+ ToolsDef += "\n"
+
+ SaveFileOnChange(self.ToolDefinitionFile, ToolsDef)
+ for DllPath in DllPathList:
+ os.environ["PATH"] = DllPath + os.pathsep + os.environ["PATH"]
+ os.environ["MAKE_FLAGS"] = MakeFlags
+
+ return self._ToolDefinitions
+
+ ## Return the paths of tools
+ def _GetToolDefFile(self):
+ if self._ToolDefFile == None:
+ self._ToolDefFile = os.path.join(self.MakeFileDir, "TOOLS_DEF." + self.Arch)
+ return self._ToolDefFile
+
+ ## Retrieve the toolchain family of given toolchain tag. Default to 'MSFT'.
+ def _GetToolChainFamily(self):
+ if self._ToolChainFamily == None:
+ ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDatabase
+ if TAB_TOD_DEFINES_FAMILY not in ToolDefinition \
+ or self.ToolChain not in ToolDefinition[TAB_TOD_DEFINES_FAMILY] \
+ or not ToolDefinition[TAB_TOD_DEFINES_FAMILY][self.ToolChain]:
+ EdkLogger.verbose("No tool chain family found in configuration for %s. Default to MSFT." \
+ % self.ToolChain)
+ self._ToolChainFamily = "MSFT"
+ else:
+ self._ToolChainFamily = ToolDefinition[TAB_TOD_DEFINES_FAMILY][self.ToolChain]
+ return self._ToolChainFamily
+
+ def _GetBuildRuleFamily(self):
+ if self._BuildRuleFamily == None:
+ ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDatabase
+ if TAB_TOD_DEFINES_BUILDRULEFAMILY not in ToolDefinition \
+ or self.ToolChain not in ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY] \
+ or not ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY][self.ToolChain]:
+ EdkLogger.verbose("No tool chain family found in configuration for %s. Default to MSFT." \
+ % self.ToolChain)
+ self._BuildRuleFamily = "MSFT"
+ else:
+ self._BuildRuleFamily = ToolDefinition[TAB_TOD_DEFINES_BUILDRULEFAMILY][self.ToolChain]
+ return self._BuildRuleFamily
+
+ ## Return the build options specific for all modules in this platform
+ def _GetBuildOptions(self):
+ if self._BuildOption == None:
+ self._BuildOption = self._ExpandBuildOption(self.Platform.BuildOptions)
+ return self._BuildOption
+
+ ## Return the build options specific for EDK modules in this platform
+ def _GetEdkBuildOptions(self):
+ if self._EdkBuildOption == None:
+ self._EdkBuildOption = self._ExpandBuildOption(self.Platform.BuildOptions, EDK_NAME)
+ return self._EdkBuildOption
+
+ ## Return the build options specific for EDKII modules in this platform
+ def _GetEdkIIBuildOptions(self):
+ if self._EdkIIBuildOption == None:
+ self._EdkIIBuildOption = self._ExpandBuildOption(self.Platform.BuildOptions, EDKII_NAME)
+ return self._EdkIIBuildOption
+
+ ## Parse build_rule.txt in $(WORKSPACE)/Conf/build_rule.txt
+ #
+ # @retval BuildRule object
+ #
+ def _GetBuildRule(self):
+ if self._BuildRule == None:
+ BuildRuleFile = None
+ if TAB_TAT_DEFINES_BUILD_RULE_CONF in self.Workspace.TargetTxt.TargetTxtDictionary:
+ BuildRuleFile = self.Workspace.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_BUILD_RULE_CONF]
+ if BuildRuleFile in [None, '']:
+ BuildRuleFile = gBuildRuleFile
+ self._BuildRule = BuildRule(BuildRuleFile)
+ return self._BuildRule
+
+ ## Summarize the packages used by modules in this platform
+ def _GetPackageList(self):
+ if self._PackageList == None:
+ self._PackageList = set()
+ for La in self.LibraryAutoGenList:
+ self._PackageList.update(La.DependentPackageList)
+ for Ma in self.ModuleAutoGenList:
+ self._PackageList.update(Ma.DependentPackageList)
+ self._PackageList = list(self._PackageList)
+ return self._PackageList
+
+ ## Get list of non-dynamic PCDs
+ def _GetNonDynamicPcdList(self):
+ return self._NonDynamicPcdList
+
+ ## Get list of dynamic PCDs
+ def _GetDynamicPcdList(self):
+ return self._DynamicPcdList
+
+ ## Generate Token Number for all PCD
+ def _GetPcdTokenNumbers(self):
+ if self._PcdTokenNumber == None:
+ self._PcdTokenNumber = sdict()
+ TokenNumber = 1
+ for Pcd in self.DynamicPcdList:
+ if Pcd.Phase == "PEI":
+ EdkLogger.debug(EdkLogger.DEBUG_5, "%s %s (%s) -> %d" % (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Pcd.Phase, TokenNumber))
+ self._PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
+ TokenNumber += 1
+
+ for Pcd in self.DynamicPcdList:
+ if Pcd.Phase == "DXE":
+ EdkLogger.debug(EdkLogger.DEBUG_5, "%s %s (%s) -> %d" % (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Pcd.Phase, TokenNumber))
+ self._PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
+ TokenNumber += 1
+
+ for Pcd in self.NonDynamicPcdList:
+ self._PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
+ TokenNumber += 1
+ return self._PcdTokenNumber
+
+ ## Summarize ModuleAutoGen objects of all modules/libraries to be built for this platform
+ def _GetAutoGenObjectList(self):
+ self._ModuleAutoGenList = []
+ self._LibraryAutoGenList = []
+ for ModuleFile in self.Platform.Modules:
+ Ma = ModuleAutoGen(
+ self.Workspace,
+ ModuleFile,
+ self.BuildTarget,
+ self.ToolChain,
+ self.Arch,
+ self.MetaFile
+ )
+ if Ma not in self._ModuleAutoGenList:
+ self._ModuleAutoGenList.append(Ma)
+ for La in Ma.LibraryAutoGenList:
+ if La not in self._LibraryAutoGenList:
+ self._LibraryAutoGenList.append(La)
+
+ ## Summarize ModuleAutoGen objects of all modules to be built for this platform
+ def _GetModuleAutoGenList(self):
+ if self._ModuleAutoGenList == None:
+ self._GetAutoGenObjectList()
+ return self._ModuleAutoGenList
+
+ ## Summarize ModuleAutoGen objects of all libraries to be built for this platform
+ def _GetLibraryAutoGenList(self):
+ if self._LibraryAutoGenList == None:
+ self._GetAutoGenObjectList()
+ return self._LibraryAutoGenList
+
+ ## Test if a module is supported by the platform
+ #
+ # An error will be raised directly if the module or its arch is not supported
+ # by the platform or current configuration
+ #
+ def ValidModule(self, Module):
+ return Module in self.Platform.Modules or Module in self.Platform.LibraryInstances
+
+ ## Resolve the library classes in a module to library instances
+ #
+ # This method will not only resolve library classes but also sort the library
+ # instances according to the dependency-ship.
+ #
+ # @param Module The module from which the library classes will be resolved
+ #
+ # @retval library_list List of library instances sorted
+ #
+ def ApplyLibraryInstance(self, Module):
+ ModuleType = Module.ModuleType
+
+ # for overridding library instances with module specific setting
+ PlatformModule = self.Platform.Modules[str(Module)]
+
+ # add forced library instances (specified under LibraryClasses sections)
+ for LibraryClass in self.Platform.LibraryClasses.GetKeys():
+ if LibraryClass.startswith("NULL"):
+ Module.LibraryClasses[LibraryClass] = self.Platform.LibraryClasses[LibraryClass]
+
+ # add forced library instances (specified in module overrides)
+ for LibraryClass in PlatformModule.LibraryClasses:
+ if LibraryClass.startswith("NULL"):
+ Module.LibraryClasses[LibraryClass] = PlatformModule.LibraryClasses[LibraryClass]
+
+ # R9 module
+ LibraryConsumerList = [Module]
+ Constructor = []
+ ConsumedByList = sdict()
+ LibraryInstance = sdict()
+
+ EdkLogger.verbose("")
+ EdkLogger.verbose("Library instances of module [%s] [%s]:" % (str(Module), self.Arch))
+ while len(LibraryConsumerList) > 0:
+ M = LibraryConsumerList.pop()
+ for LibraryClassName in M.LibraryClasses:
+ if LibraryClassName not in LibraryInstance:
+ # override library instance for this module
+ if LibraryClassName in PlatformModule.LibraryClasses:
+ LibraryPath = PlatformModule.LibraryClasses[LibraryClassName]
+ else:
+ LibraryPath = self.Platform.LibraryClasses[LibraryClassName, ModuleType]
+ if LibraryPath == None or LibraryPath == "":
+ LibraryPath = M.LibraryClasses[LibraryClassName]
+ if LibraryPath == None or LibraryPath == "":
+ EdkLogger.error("build", RESOURCE_NOT_AVAILABLE,
+ "Instance of library class [%s] is not found" % LibraryClassName,
+ File=self.MetaFile,
+ ExtraData="in [%s] [%s]\n\tconsumed by module [%s]" % (str(M), self.Arch, str(Module)))
+
+ LibraryModule = self.BuildDatabase[LibraryPath, self.Arch]
+ # for those forced library instance (NULL library), add a fake library class
+ if LibraryClassName.startswith("NULL"):
+ LibraryModule.LibraryClass.append(LibraryClassObject(LibraryClassName, [ModuleType]))
+ elif LibraryModule.LibraryClass == None \
+ or len(LibraryModule.LibraryClass) == 0 \
+ or (ModuleType != 'USER_DEFINED'
+ and ModuleType not in LibraryModule.LibraryClass[0].SupModList):
+ # only USER_DEFINED can link against any library instance despite of its SupModList
+ EdkLogger.error("build", OPTION_MISSING,
+ "Module type [%s] is not supported by library instance [%s]" \
+ % (ModuleType, LibraryPath), File=self.MetaFile,
+ ExtraData="consumed by [%s]" % str(Module))
+
+ LibraryInstance[LibraryClassName] = LibraryModule
+ LibraryConsumerList.append(LibraryModule)
+ EdkLogger.verbose("\t" + str(LibraryClassName) + " : " + str(LibraryModule))
+ else:
+ LibraryModule = LibraryInstance[LibraryClassName]
+
+ if LibraryModule == None:
+ continue
+
+ if LibraryModule.ConstructorList != [] and LibraryModule not in Constructor:
+ Constructor.append(LibraryModule)
+
+ if LibraryModule not in ConsumedByList:
+ ConsumedByList[LibraryModule] = []
+ # don't add current module itself to consumer list
+ if M != Module:
+ if M in ConsumedByList[LibraryModule]:
+ continue
+ ConsumedByList[LibraryModule].append(M)
+ #
+ # Initialize the sorted output list to the empty set
+ #
+ SortedLibraryList = []
+ #
+ # Q <- Set of all nodes with no incoming edges
+ #
+ LibraryList = [] #LibraryInstance.values()
+ Q = []
+ for LibraryClassName in LibraryInstance:
+ M = LibraryInstance[LibraryClassName]
+ LibraryList.append(M)
+ if ConsumedByList[M] == []:
+ Q.append(M)
+
+ #
+ # start the DAG algorithm
+ #
+ while True:
+ EdgeRemoved = True
+ while Q == [] and EdgeRemoved:
+ EdgeRemoved = False
+ # for each node Item with a Constructor
+ for Item in LibraryList:
+ if Item not in Constructor:
+ continue
+ # for each Node without a constructor with an edge e from Item to Node
+ for Node in ConsumedByList[Item]:
+ if Node in Constructor:
+ continue
+ # remove edge e from the graph if Node has no constructor
+ ConsumedByList[Item].remove(Node)
+ EdgeRemoved = True
+ if ConsumedByList[Item] == []:
+ # insert Item into Q
+ Q.insert(0, Item)
+ break
+ if Q != []:
+ break
+ # DAG is done if there's no more incoming edge for all nodes
+ if Q == []:
+ break
+
+ # remove node from Q
+ Node = Q.pop()
+ # output Node
+ SortedLibraryList.append(Node)
+
+ # for each node Item with an edge e from Node to Item do
+ for Item in LibraryList:
+ if Node not in ConsumedByList[Item]:
+ continue
+ # remove edge e from the graph
+ ConsumedByList[Item].remove(Node)
+
+ if ConsumedByList[Item] != []:
+ continue
+ # insert Item into Q, if Item has no other incoming edges
+ Q.insert(0, Item)
+
+ #
+ # if any remaining node Item in the graph has a constructor and an incoming edge, then the graph has a cycle
+ #
+ for Item in LibraryList:
+ if ConsumedByList[Item] != [] and Item in Constructor and len(Constructor) > 1:
+ ErrorMessage = "\tconsumed by " + "\n\tconsumed by ".join([str(L) for L in ConsumedByList[Item]])
+ EdkLogger.error("build", BUILD_ERROR, 'Library [%s] with constructors has a cycle' % str(Item),
+ ExtraData=ErrorMessage, File=self.MetaFile)
+ if Item not in SortedLibraryList:
+ SortedLibraryList.append(Item)
+
+ #
+ # Build the list of constructor and destructir names
+ # The DAG Topo sort produces the destructor order, so the list of constructors must generated in the reverse order
+ #
+ SortedLibraryList.reverse()
+ return SortedLibraryList
+
+
+ ## Override PCD setting (type, value, ...)
+ #
+ # @param ToPcd The PCD to be overrided
+ # @param FromPcd The PCD overrideing from
+ #
+ def _OverridePcd(self, ToPcd, FromPcd, Module=""):
+ #
+ # in case there's PCDs coming from FDF file, which have no type given.
+ # at this point, ToPcd.Type has the type found from dependent
+ # package
+ #
+ if FromPcd != None:
+ if ToPcd.Pending and FromPcd.Type not in [None, '']:
+ ToPcd.Type = FromPcd.Type
+ elif ToPcd.Type not in [None, ''] and FromPcd.Type not in [None, ''] \
+ and ToPcd.Type != FromPcd.Type:
+ EdkLogger.error("build", OPTION_CONFLICT, "Mismatched PCD type",
+ ExtraData="%s.%s is defined as [%s] in module %s, but as [%s] in platform."\
+ % (ToPcd.TokenSpaceGuidCName, ToPcd.TokenCName,
+ ToPcd.Type, Module, FromPcd.Type),
+ File=self.MetaFile)
+
+ if FromPcd.MaxDatumSize not in [None, '']:
+ ToPcd.MaxDatumSize = FromPcd.MaxDatumSize
+ if FromPcd.DefaultValue not in [None, '']:
+ ToPcd.DefaultValue = FromPcd.DefaultValue
+ if FromPcd.TokenValue not in [None, '']:
+ ToPcd.TokenValue = FromPcd.TokenValue
+ if FromPcd.MaxDatumSize not in [None, '']:
+ ToPcd.MaxDatumSize = FromPcd.MaxDatumSize
+ if FromPcd.DatumType not in [None, '']:
+ ToPcd.DatumType = FromPcd.DatumType
+ if FromPcd.SkuInfoList not in [None, '', []]:
+ ToPcd.SkuInfoList = FromPcd.SkuInfoList
+
+ # check the validation of datum
+ IsValid, Cause = CheckPcdDatum(ToPcd.DatumType, ToPcd.DefaultValue)
+ if not IsValid:
+ EdkLogger.error('build', FORMAT_INVALID, Cause, File=self.MetaFile,
+ ExtraData="%s.%s" % (ToPcd.TokenSpaceGuidCName, ToPcd.TokenCName))
+
+ if ToPcd.DatumType == "VOID*" and ToPcd.MaxDatumSize in ['', None]:
+ EdkLogger.debug(EdkLogger.DEBUG_9, "No MaxDatumSize specified for PCD %s.%s" \
+ % (ToPcd.TokenSpaceGuidCName, ToPcd.TokenCName))
+ Value = ToPcd.DefaultValue
+ if Value in [None, '']:
+ ToPcd.MaxDatumSize = 1
+ elif Value[0] == 'L':
+ ToPcd.MaxDatumSize = str(len(Value) * 2)
+ elif Value[0] == '{':
+ ToPcd.MaxDatumSize = str(len(Value.split(',')))
+ else:
+ ToPcd.MaxDatumSize = str(len(Value))
+
+ # apply default SKU for dynamic PCDS if specified one is not available
+ if (ToPcd.Type in PCD_DYNAMIC_TYPE_LIST or ToPcd.Type in PCD_DYNAMIC_EX_TYPE_LIST) \
+ and ToPcd.SkuInfoList in [None, {}, '']:
+ if self.Platform.SkuName in self.Platform.SkuIds:
+ SkuName = self.Platform.SkuName
+ else:
+ SkuName = 'DEFAULT'
+ ToPcd.SkuInfoList = {
+ SkuName : SkuInfoClass(SkuName, self.Platform.SkuIds[SkuName], '', '', '', '', '', ToPcd.DefaultValue)
+ }
+
+ ## Apply PCD setting defined platform to a module
+ #
+ # @param Module The module from which the PCD setting will be overrided
+ #
+ # @retval PCD_list The list PCDs with settings from platform
+ #
+ def ApplyPcdSetting(self, Module, Pcds):
+ # for each PCD in module
+ for Name,Guid in Pcds:
+ PcdInModule = Pcds[Name,Guid]
+ # find out the PCD setting in platform
+ if (Name,Guid) in self.Platform.Pcds:
+ PcdInPlatform = self.Platform.Pcds[Name,Guid]
+ else:
+ PcdInPlatform = None
+ # then override the settings if any
+ self._OverridePcd(PcdInModule, PcdInPlatform, Module)
+ # resolve the VariableGuid value
+ for SkuId in PcdInModule.SkuInfoList:
+ Sku = PcdInModule.SkuInfoList[SkuId]
+ if Sku.VariableGuid == '': continue
+ Sku.VariableGuidValue = GuidValue(Sku.VariableGuid, self.PackageList)
+ if Sku.VariableGuidValue == None:
+ PackageList = "\n\t".join([str(P) for P in self.PackageList])
+ EdkLogger.error(
+ 'build',
+ RESOURCE_NOT_AVAILABLE,
+ "Value of GUID [%s] is not found in" % Sku.VariableGuid,
+ ExtraData=PackageList + "\n\t(used with %s.%s from module %s)" \
+ % (Guid, Name, str(Module)),
+ File=self.MetaFile
+ )
+
+ # override PCD settings with module specific setting
+ if Module in self.Platform.Modules:
+ PlatformModule = self.Platform.Modules[str(Module)]
+ for Key in PlatformModule.Pcds:
+ if Key in Pcds:
+ self._OverridePcd(Pcds[Key], PlatformModule.Pcds[Key], Module)
+ return Pcds.values()
+
+ ## Resolve library names to library modules
+ #
+ # (for R8.x modules)
+ #
+ # @param Module The module from which the library names will be resolved
+ #
+ # @retval library_list The list of library modules
+ #
+ def ResolveLibraryReference(self, Module):
+ EdkLogger.verbose("")
+ EdkLogger.verbose("Library instances of module [%s] [%s]:" % (str(Module), self.Arch))
+ LibraryConsumerList = [Module]
+
+ # "CompilerStub" is a must for R8 modules
+ if Module.Libraries:
+ Module.Libraries.append("CompilerStub")
+ LibraryList = []
+ while len(LibraryConsumerList) > 0:
+ M = LibraryConsumerList.pop()
+ for LibraryName in M.Libraries:
+ Library = self.Platform.LibraryClasses[LibraryName, ':dummy:']
+ if Library == None:
+ for Key in self.Platform.LibraryClasses.data.keys():
+ if LibraryName.upper() == Key.upper():
+ Library = self.Platform.LibraryClasses[Key, ':dummy:']
+ break
+ if Library == None:
+ EdkLogger.warn("build", "Library [%s] is not found" % LibraryName, File=str(M),
+ ExtraData="\t%s [%s]" % (str(Module), self.Arch))
+ continue
+
+ if Library not in LibraryList:
+ LibraryList.append(Library)
+ LibraryConsumerList.append(Library)
+ EdkLogger.verbose("\t" + LibraryName + " : " + str(Library) + ' ' + str(type(Library)))
+ return LibraryList
+
+ ## Expand * in build option key
+ #
+ # @param Options Options to be expanded
+ #
+ # @retval options Options expanded
+ #
+ def _ExpandBuildOption(self, Options, ModuleStyle=None):
+ BuildOptions = {}
+ FamilyMatch = False
+ FamilyIsNull = True
+ for Key in Options:
+ if ModuleStyle != None and len (Key) > 2:
+ # Check Module style is EDK or EDKII.
+ # Only append build option for the matched style module.
+ if ModuleStyle == EDK_NAME and Key[2] != EDK_NAME:
+ continue
+ elif ModuleStyle == EDKII_NAME and Key[2] != EDKII_NAME:
+ continue
+ Family = Key[0]
+ Target, Tag, Arch, Tool, Attr = Key[1].split("_")
+ # if tool chain family doesn't match, skip it
+ if Tool in self.ToolDefinition and Family != "":
+ FamilyIsNull = False
+ if self.ToolDefinition[Tool].get(TAB_TOD_DEFINES_BUILDRULEFAMILY, "") != "":
+ if Family != self.ToolDefinition[Tool][TAB_TOD_DEFINES_BUILDRULEFAMILY]:
+ continue
+ elif Family != self.ToolDefinition[Tool][TAB_TOD_DEFINES_FAMILY]:
+ continue
+ FamilyMatch = True
+ # expand any wildcard
+ if Target == "*" or Target == self.BuildTarget:
+ if Tag == "*" or Tag == self.ToolChain:
+ if Arch == "*" or Arch == self.Arch:
+ if Tool not in BuildOptions:
+ BuildOptions[Tool] = {}
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
+ BuildOptions[Tool][Attr] = Options[Key]
+ else:
+ # append options for the same tool
+ BuildOptions[Tool][Attr] += " " + Options[Key]
+ # Build Option Family has been checked, which need't to be checked again for family.
+ if FamilyMatch or FamilyIsNull:
+ return BuildOptions
+
+ for Key in Options:
+ if ModuleStyle != None and len (Key) > 2:
+ # Check Module style is EDK or EDKII.
+ # Only append build option for the matched style module.
+ if ModuleStyle == EDK_NAME and Key[2] != EDK_NAME:
+ continue
+ elif ModuleStyle == EDKII_NAME and Key[2] != EDKII_NAME:
+ continue
+ Family = Key[0]
+ Target, Tag, Arch, Tool, Attr = Key[1].split("_")
+ # if tool chain family doesn't match, skip it
+ if Tool not in self.ToolDefinition or Family =="":
+ continue
+ # option has been added before
+ if Family != self.ToolDefinition[Tool][TAB_TOD_DEFINES_FAMILY]:
+ continue
+
+ # expand any wildcard
+ if Target == "*" or Target == self.BuildTarget:
+ if Tag == "*" or Tag == self.ToolChain:
+ if Arch == "*" or Arch == self.Arch:
+ if Tool not in BuildOptions:
+ BuildOptions[Tool] = {}
+ if Attr != "FLAGS" or Attr not in BuildOptions[Tool]:
+ BuildOptions[Tool][Attr] = Options[Key]
+ else:
+ # append options for the same tool
+ BuildOptions[Tool][Attr] += " " + Options[Key]
+ return BuildOptions
+
+ ## Append build options in platform to a module
+ #
+ # @param Module The module to which the build options will be appened
+ #
+ # @retval options The options appended with build options in platform
+ #
+ def ApplyBuildOption(self, Module):
+ # Get the different options for the different style module
+ if Module.AutoGenVersion < 0x00010005:
+ PlatformOptions = self.EdkBuildOption
+ else:
+ PlatformOptions = self.EdkIIBuildOption
+ ModuleOptions = self._ExpandBuildOption(Module.BuildOptions)
+ if Module in self.Platform.Modules:
+ PlatformModule = self.Platform.Modules[str(Module)]
+ PlatformModuleOptions = self._ExpandBuildOption(PlatformModule.BuildOptions)
+ else:
+ PlatformModuleOptions = {}
+
+ AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() + PlatformModuleOptions.keys() + self.ToolDefinition.keys())
+ BuildOptions = {}
+ for Tool in AllTools:
+ if Tool not in BuildOptions:
+ BuildOptions[Tool] = {}
+
+ for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, PlatformModuleOptions]:
+ if Tool not in Options:
+ continue
+ for Attr in Options[Tool]:
+ Value = Options[Tool][Attr]
+ if Attr not in BuildOptions[Tool]:
+ BuildOptions[Tool][Attr] = ""
+ # check if override is indicated
+ if Value.startswith('='):
+ BuildOptions[Tool][Attr] = Value[1:]
+ else:
+ BuildOptions[Tool][Attr] += " " + Value
+ return BuildOptions
+
+ Platform = property(_GetPlatform)
+ Name = property(_GetName)
+ Guid = property(_GetGuid)
+ Version = property(_GetVersion)
+
+ OutputDir = property(_GetOutputDir)
+ BuildDir = property(_GetBuildDir)
+ MakeFileDir = property(_GetMakeFileDir)
+ FdfFile = property(_GetFdfFile)
+
+ PcdTokenNumber = property(_GetPcdTokenNumbers) # (TokenCName, TokenSpaceGuidCName) : GeneratedTokenNumber
+ DynamicPcdList = property(_GetDynamicPcdList) # [(TokenCName1, TokenSpaceGuidCName1), (TokenCName2, TokenSpaceGuidCName2), ...]
+ NonDynamicPcdList = property(_GetNonDynamicPcdList) # [(TokenCName1, TokenSpaceGuidCName1), (TokenCName2, TokenSpaceGuidCName2), ...]
+ PackageList = property(_GetPackageList)
+
+ ToolDefinition = property(_GetToolDefinition) # toolcode : tool path
+ ToolDefinitionFile = property(_GetToolDefFile) # toolcode : lib path
+ ToolChainFamily = property(_GetToolChainFamily)
+ BuildRuleFamily = property(_GetBuildRuleFamily)
+ BuildOption = property(_GetBuildOptions) # toolcode : option
+ EdkBuildOption = property(_GetEdkBuildOptions) # edktoolcode : option
+ EdkIIBuildOption = property(_GetEdkIIBuildOptions) # edkiitoolcode : option
+
+ BuildCommand = property(_GetBuildCommand)
+ BuildRule = property(_GetBuildRule)
+ ModuleAutoGenList = property(_GetModuleAutoGenList)
+ LibraryAutoGenList = property(_GetLibraryAutoGenList)
+
+## ModuleAutoGen class
+#
+# This class encapsules the AutoGen behaviors for the build tools. In addition to
+# the generation of AutoGen.h and AutoGen.c, it will generate *.depex file according
+# to the [depex] section in module's inf file.
+#
+class ModuleAutoGen(AutoGen):
+ ## The real constructor of ModuleAutoGen
+ #
+ # This method is not supposed to be called by users of ModuleAutoGen. It's
+ # only used by factory method __new__() to do real initialization work for an
+ # object of ModuleAutoGen
+ #
+ # @param Workspace EdkIIWorkspaceBuild object
+ # @param ModuleFile The path of module file
+ # @param Target Build target (DEBUG, RELEASE)
+ # @param Toolchain Name of tool chain
+ # @param Arch The arch the module supports
+ # @param PlatformFile Platform meta-file
+ #
+ def _Init(self, Workspace, ModuleFile, Target, Toolchain, Arch, PlatformFile):
+ EdkLogger.debug(EdkLogger.DEBUG_9, "AutoGen module [%s] [%s]" % (ModuleFile, Arch))
+ GlobalData.gProcessingFile = "%s [%s, %s, %s]" % (ModuleFile, Arch, Toolchain, Target)
+
+ self.Workspace = Workspace
+ self.WorkspaceDir = Workspace.WorkspaceDir
+
+ self.MetaFile = ModuleFile
+ self.PlatformInfo = PlatformAutoGen(Workspace, PlatformFile, Target, Toolchain, Arch)
+ # check if this module is employed by active platform
+ if not self.PlatformInfo.ValidModule(self.MetaFile):
+ EdkLogger.verbose("Module [%s] for [%s] is not employed by active platform\n" \
+ % (self.MetaFile, Arch))
+ return False
+
+ self.SourceDir = self.MetaFile.SubDir
+ self.SourceOverrideDir = None
+ # use overrided path defined in DSC file
+ if self.MetaFile.Key in GlobalData.gOverrideDir:
+ self.SourceOverrideDir = GlobalData.gOverrideDir[self.MetaFile.Key]
+
+ self.ToolChain = Toolchain
+ self.BuildTarget = Target
+ self.Arch = Arch
+ self.ToolChainFamily = self.PlatformInfo.ToolChainFamily
+ self.BuildRuleFamily = self.PlatformInfo.BuildRuleFamily
+
+ self.IsMakeFileCreated = False
+ self.IsCodeFileCreated = False
+
+ self.BuildDatabase = self.Workspace.BuildDatabase
+
+ self._Module = None
+ self._Name = None
+ self._Guid = None
+ self._Version = None
+ self._ModuleType = None
+ self._ComponentType = None
+ self._PcdIsDriver = None
+ self._AutoGenVersion = None
+ self._LibraryFlag = None
+ self._CustomMakefile = None
+ self._Macro = None
+
+ self._BuildDir = None
+ self._OutputDir = None
+ self._DebugDir = None
+ self._MakeFileDir = None
+
+ self._IncludePathList = None
+ self._AutoGenFileList = None
+ self._UnicodeFileList = None
+ self._SourceFileList = None
+ self._ObjectFileList = None
+ self._BinaryFileList = None
+
+ self._DependentPackageList = None
+ self._DependentLibraryList = None
+ self._LibraryAutoGenList = None
+ self._DerivedPackageList = None
+ self._ModulePcdList = None
+ self._LibraryPcdList = None
+ self._GuidList = None
+ self._ProtocolList = None
+ self._PpiList = None
+ self._DepexList = None
+ self._DepexExpressionList = None
+ self._BuildOption = None
+ self._BuildTargets = None
+ self._IntroBuildTargetList = None
+ self._FinalBuildTargetList = None
+ self._FileTypes = None
+ self._BuildRules = None
+
+ return True
+
+ def __repr__(self):
+ return "%s [%s]" % (self.MetaFile, self.Arch)
+
+ # Macros could be used in build_rule.txt (also Makefile)
+ def _GetMacros(self):
+ if self._Macro == None:
+ self._Macro = sdict()
+ self._Macro["WORKSPACE" ] = self.WorkspaceDir
+ self._Macro["MODULE_NAME" ] = self.Name
+ self._Macro["MODULE_GUID" ] = self.Guid
+ self._Macro["MODULE_VERSION" ] = self.Version
+ self._Macro["MODULE_TYPE" ] = self.ModuleType
+ self._Macro["MODULE_FILE" ] = str(self.MetaFile)
+ self._Macro["MODULE_FILE_BASE_NAME" ] = self.MetaFile.BaseName
+ self._Macro["MODULE_RELATIVE_DIR" ] = self.SourceDir
+ self._Macro["MODULE_DIR" ] = self.SourceDir
+
+ self._Macro["BASE_NAME" ] = self.Name
+
+ self._Macro["ARCH" ] = self.Arch
+ self._Macro["TOOLCHAIN" ] = self.ToolChain
+ self._Macro["TOOLCHAIN_TAG" ] = self.ToolChain
+ self._Macro["TARGET" ] = self.BuildTarget
+
+ self._Macro["BUILD_DIR" ] = self.PlatformInfo.BuildDir
+ self._Macro["BIN_DIR" ] = os.path.join(self.PlatformInfo.BuildDir, self.Arch)
+ self._Macro["LIB_DIR" ] = os.path.join(self.PlatformInfo.BuildDir, self.Arch)
+ self._Macro["MODULE_BUILD_DIR" ] = self.BuildDir
+ self._Macro["OUTPUT_DIR" ] = self.OutputDir
+ self._Macro["DEBUG_DIR" ] = self.DebugDir
+ return self._Macro
+
+ ## Return the module build data object
+ def _GetModule(self):
+ if self._Module == None:
+ self._Module = self.Workspace.BuildDatabase[self.MetaFile, self.Arch]
+ return self._Module
+
+ ## Return the module name
+ def _GetBaseName(self):
+ return self.Module.BaseName
+
+ ## Return the module SourceOverridePath
+ def _GetSourceOverridePath(self):
+ return self.Module.SourceOverridePath
+
+ ## Return the module meta-file GUID
+ def _GetGuid(self):
+ return self.Module.Guid
+
+ ## Return the module version
+ def _GetVersion(self):
+ return self.Module.Version
+
+ ## Return the module type
+ def _GetModuleType(self):
+ return self.Module.ModuleType
+
+ ## Return the component type (for R8.x style of module)
+ def _GetComponentType(self):
+ return self.Module.ComponentType
+
+ ## Return the build type
+ def _GetBuildType(self):
+ return self.Module.BuildType
+
+ ## Return the PCD_IS_DRIVER setting
+ def _GetPcdIsDriver(self):
+ return self.Module.PcdIsDriver
+
+ ## Return the autogen version, i.e. module meta-file version
+ def _GetAutoGenVersion(self):
+ return self.Module.AutoGenVersion
+
+ ## Check if the module is library or not
+ def _IsLibrary(self):
+ if self._LibraryFlag == None:
+ if self.Module.LibraryClass != None and self.Module.LibraryClass != []:
+ self._LibraryFlag = True
+ else:
+ self._LibraryFlag = False
+ return self._LibraryFlag
+
+ ## Return the directory to store intermediate files of the module
+ def _GetBuildDir(self):
+ if self._BuildDir == None:
+ self._BuildDir = path.join(
+ self.PlatformInfo.BuildDir,
+ self.Arch,
+ self.SourceDir,
+ self.MetaFile.BaseName
+ )
+ CreateDirectory(self._BuildDir)
+ return self._BuildDir
+
+ ## Return the directory to store the intermediate object files of the mdoule
+ def _GetOutputDir(self):
+ if self._OutputDir == None:
+ self._OutputDir = path.join(self.BuildDir, "OUTPUT")
+ CreateDirectory(self._OutputDir)
+ return self._OutputDir
+
+ ## Return the directory to store auto-gened source files of the mdoule
+ def _GetDebugDir(self):
+ if self._DebugDir == None:
+ self._DebugDir = path.join(self.BuildDir, "DEBUG")
+ CreateDirectory(self._DebugDir)
+ return self._DebugDir
+
+ ## Return the path of custom file
+ def _GetCustomMakefile(self):
+ if self._CustomMakefile == None:
+ self._CustomMakefile = {}
+ for Type in self.Module.CustomMakefile:
+ if Type in gMakeTypeMap:
+ MakeType = gMakeTypeMap[Type]
+ else:
+ MakeType = 'nmake'
+ if self.SourceOverrideDir != None:
+ File = os.path.join(self.SourceOverrideDir, self.Module.CustomMakefile[Type])
+ if not os.path.exists(File):
+ File = os.path.join(self.SourceDir, self.Module.CustomMakefile[Type])
+ else:
+ File = os.path.join(self.SourceDir, self.Module.CustomMakefile[Type])
+ self._CustomMakefile[MakeType] = File
+ return self._CustomMakefile
+
+ ## Return the directory of the makefile
+ #
+ # @retval string The directory string of module's makefile
+ #
+ def _GetMakeFileDir(self):
+ return self.BuildDir
+
+ ## Return build command string
+ #
+ # @retval string Build command string
+ #
+ def _GetBuildCommand(self):
+ return self.PlatformInfo.BuildCommand
+
+ ## Get object list of all packages the module and its dependent libraries belong to
+ #
+ # @retval list The list of package object
+ #
+ def _GetDerivedPackageList(self):
+ PackageList = []
+ for M in [self.Module] + self.DependentLibraryList:
+ for Package in M.Packages:
+ if Package in PackageList:
+ continue
+ PackageList.append(Package)
+ return PackageList
+
+ ## Merge dependency expression
+ #
+ # @retval list The token list of the dependency expression after parsed
+ #
+ def _GetDepexTokenList(self):
+ if self._DepexList == None:
+ self._DepexList = {}
+ if self.IsLibrary or TAB_DEPENDENCY_EXPRESSION_FILE in self.FileTypes:
+ return self._DepexList
+
+ self._DepexList[self.ModuleType] = []
+
+ for ModuleType in self._DepexList:
+ DepexList = self._DepexList[ModuleType]
+ #
+ # Append depex from dependent libraries, if not "BEFORE", "AFTER" expresion
+ #
+ for M in [self.Module] + self.DependentLibraryList:
+ Inherited = False
+ for D in M.Depex[self.Arch, ModuleType]:
+ if DepexList != []:
+ DepexList.append('AND')
+ DepexList.append('(')
+ DepexList.extend(D)
+ if DepexList[-1] == 'END': # no need of a END at this time
+ DepexList.pop()
+ DepexList.append(')')
+ Inherited = True
+ if Inherited:
+ EdkLogger.verbose("DEPEX[%s] (+%s) = %s" % (self.Name, M.BaseName, DepexList))
+ if 'BEFORE' in DepexList or 'AFTER' in DepexList:
+ break
+ if len(DepexList) > 0:
+ EdkLogger.verbose('')
+ return self._DepexList
+
+ ## Merge dependency expression
+ #
+ # @retval list The token list of the dependency expression after parsed
+ #
+ def _GetDepexExpressionTokenList(self):
+ if self._DepexExpressionList == None:
+ self._DepexExpressionList = {}
+ if self.IsLibrary or TAB_DEPENDENCY_EXPRESSION_FILE in self.FileTypes:
+ return self._DepexExpressionList
+
+ self._DepexExpressionList[self.ModuleType] = ''
+
+ for ModuleType in self._DepexExpressionList:
+ DepexExpressionList = self._DepexExpressionList[ModuleType]
+ #
+ # Append depex from dependent libraries, if not "BEFORE", "AFTER" expresion
+ #
+ for M in [self.Module] + self.DependentLibraryList:
+ Inherited = False
+ for D in M.DepexExpression[self.Arch, ModuleType]:
+ if DepexExpressionList != '':
+ DepexExpressionList += ' AND '
+ DepexExpressionList += '('
+ DepexExpressionList += D
+ DepexExpressionList = DepexExpressionList.rstrip('END').strip()
+ DepexExpressionList += ')'
+ Inherited = True
+ if Inherited:
+ EdkLogger.verbose("DEPEX[%s] (+%s) = %s" % (self.Name, M.BaseName, DepexExpressionList))
+ if 'BEFORE' in DepexExpressionList or 'AFTER' in DepexExpressionList:
+ break
+ if len(DepexExpressionList) > 0:
+ EdkLogger.verbose('')
+ self._DepexExpressionList[ModuleType] = DepexExpressionList
+ return self._DepexExpressionList
+
+ ## Return the list of specification version required for the module
+ #
+ # @retval list The list of specification defined in module file
+ #
+ def _GetSpecification(self):
+ return self.Module.Specification
+
+ ## Tool option for the module build
+ #
+ # @param PlatformInfo The object of PlatformBuildInfo
+ # @retval dict The dict containing valid options
+ #
+ def _GetModuleBuildOption(self):
+ if self._BuildOption == None:
+ self._BuildOption = self.PlatformInfo.ApplyBuildOption(self.Module)
+ return self._BuildOption
+
+ ## Return a list of files which can be built from source
+ #
+ # What kind of files can be built is determined by build rules in
+ # $(WORKSPACE)/Conf/build_rule.txt and toolchain family.
+ #
+ def _GetSourceFileList(self):
+ if self._SourceFileList == None:
+ self._SourceFileList = []
+ for F in self.Module.Sources:
+ # match tool chain
+ if F.TagName != "" and F.TagName != self.ToolChain:
+ EdkLogger.debug(EdkLogger.DEBUG_9, "The toolchain [%s] for processing file [%s] is found, "
+ "but [%s] is needed" % (F.TagName, str(F), self.ToolChain))
+ continue
+ # match tool chain family
+ if F.ToolChainFamily != "" and F.ToolChainFamily != self.ToolChainFamily:
+ EdkLogger.debug(
+ EdkLogger.DEBUG_0,
+ "The file [%s] must be built by tools of [%s], " \
+ "but current toolchain family is [%s]" \
+ % (str(F), F.ToolChainFamily, self.ToolChainFamily))
+ continue
+
+ # add the file path into search path list for file including
+ if F.Dir not in self.IncludePathList and self.AutoGenVersion >= 0x00010005:
+ self.IncludePathList.insert(0, F.Dir)
+ self._SourceFileList.append(F)
+ self._ApplyBuildRule(F, TAB_UNKNOWN_FILE)
+ return self._SourceFileList
+
+ ## Return the list of unicode files
+ def _GetUnicodeFileList(self):
+ if self._UnicodeFileList == None:
+ if TAB_UNICODE_FILE in self.FileTypes:
+ self._UnicodeFileList = self.FileTypes[TAB_UNICODE_FILE]
+ else:
+ self._UnicodeFileList = []
+ return self._UnicodeFileList
+
+ ## Return a list of files which can be built from binary
+ #
+ # "Build" binary files are just to copy them to build directory.
+ #
+ # @retval list The list of files which can be built later
+ #
+ def _GetBinaryFiles(self):
+ if self._BinaryFileList == None:
+ self._BinaryFileList = []
+ for F in self.Module.Binaries:
+ if F.Target not in ['COMMON', '*'] and F.Target != self.BuildTarget:
+ continue
+ self._BinaryFileList.append(F)
+ self._ApplyBuildRule(F, F.Type)
+ return self._BinaryFileList
+
+ def _GetBuildRules(self):
+ if self._BuildRules == None:
+ BuildRules = {}
+ BuildRuleDatabase = self.PlatformInfo.BuildRule
+ for Type in BuildRuleDatabase.FileTypeList:
+ #first try getting build rule by BuildRuleFamily
+ RuleObject = BuildRuleDatabase[Type, self.BuildType, self.Arch, self.BuildRuleFamily]
+ if not RuleObject:
+ # build type is always module type, but ...
+ if self.ModuleType != self.BuildType:
+ RuleObject = BuildRuleDatabase[Type, self.ModuleType, self.Arch, self.BuildRuleFamily]
+ #second try getting build rule by ToolChainFamily
+ if not RuleObject:
+ RuleObject = BuildRuleDatabase[Type, self.BuildType, self.Arch, self.ToolChainFamily]
+ if not RuleObject:
+ # build type is always module type, but ...
+ if self.ModuleType != self.BuildType:
+ RuleObject = BuildRuleDatabase[Type, self.ModuleType, self.Arch, self.ToolChainFamily]
+ if not RuleObject:
+ continue
+ RuleObject = RuleObject.Instantiate(self.Macros)
+ BuildRules[Type] = RuleObject
+ for Ext in RuleObject.SourceFileExtList:
+ BuildRules[Ext] = RuleObject
+ self._BuildRules = BuildRules
+ return self._BuildRules
+
+ def _ApplyBuildRule(self, File, FileType):
+ if self._BuildTargets == None:
+ self._IntroBuildTargetList = set()
+ self._FinalBuildTargetList = set()
+ self._BuildTargets = {}
+ self._FileTypes = {}
+
+ LastTarget = None
+ RuleChain = []
+ SourceList = [File]
+ Index = 0
+ while Index < len(SourceList):
+ Source = SourceList[Index]
+ Index = Index + 1
+
+ if Source != File:
+ CreateDirectory(Source.Dir)
+
+ if File.IsBinary and File == Source and self._BinaryFileList != None and File in self._BinaryFileList:
+ RuleObject = self.BuildRules[TAB_DEFAULT_BINARY_FILE]
+ elif FileType in self.BuildRules:
+ RuleObject = self.BuildRules[FileType]
+ elif Source.Ext in self.BuildRules:
+ RuleObject = self.BuildRules[Source.Ext]
+ else:
+ # stop at no more rules
+ if LastTarget:
+ self._FinalBuildTargetList.add(LastTarget)
+ break
+
+ FileType = RuleObject.SourceFileType
+ if FileType not in self._FileTypes:
+ self._FileTypes[FileType] = set()
+ self._FileTypes[FileType].add(Source)
+
+ # stop at STATIC_LIBRARY for library
+ if self.IsLibrary and FileType == TAB_STATIC_LIBRARY:
+ if LastTarget:
+ self._FinalBuildTargetList.add(LastTarget)
+ break
+
+ Target = RuleObject.Apply(Source)
+ if not Target:
+ if LastTarget:
+ self._FinalBuildTargetList.add(LastTarget)
+ break
+ elif not Target.Outputs:
+ # Only do build for target with outputs
+ self._FinalBuildTargetList.add(Target)
+
+ if FileType not in self._BuildTargets:
+ self._BuildTargets[FileType] = set()
+ self._BuildTargets[FileType].add(Target)
+
+ if not Source.IsBinary and Source == File:
+ self._IntroBuildTargetList.add(Target)
+
+ # to avoid cyclic rule
+ if FileType in RuleChain:
+ break
+
+ RuleChain.append(FileType)
+ SourceList.extend(Target.Outputs)
+ LastTarget = Target
+ FileType = TAB_UNKNOWN_FILE
+
+ def _GetTargets(self):
+ if self._BuildTargets == None:
+ self._IntroBuildTargetList = set()
+ self._FinalBuildTargetList = set()
+ self._BuildTargets = {}
+ self._FileTypes = {}
+
+ #TRICK: call _GetSourceFileList to apply build rule for binary files
+ if self.SourceFileList:
+ pass
+
+ #TRICK: call _GetBinaryFileList to apply build rule for binary files
+ if self.BinaryFileList:
+ pass
+
+ return self._BuildTargets
+
+ def _GetIntroTargetList(self):
+ self._GetTargets()
+ return self._IntroBuildTargetList
+
+ def _GetFinalTargetList(self):
+ self._GetTargets()
+ return self._FinalBuildTargetList
+
+ def _GetFileTypes(self):
+ self._GetTargets()
+ return self._FileTypes
+
+ ## Get the list of package object the module depends on
+ #
+ # @retval list The package object list
+ #
+ def _GetDependentPackageList(self):
+ return self.Module.Packages
+
+ ## Return the list of auto-generated code file
+ #
+ # @retval list The list of auto-generated file
+ #
+ def _GetAutoGenFileList(self):
+ UniStringAutoGenC = True
+ UniStringBinBuffer = None
+ if self.BuildType == 'UEFI_HII':
+ UniStringBinBuffer = StringIO()
+ UniStringAutoGenC = False
+ if self._AutoGenFileList == None:
+ self._AutoGenFileList = {}
+ AutoGenC = TemplateString()
+ AutoGenH = TemplateString()
+ StringH = TemplateString()
+ GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, UniStringAutoGenC, UniStringBinBuffer)
+ if str(AutoGenC) != "" and TAB_C_CODE_FILE in self.FileTypes:
+ AutoFile = PathClass(gAutoGenCodeFileName, self.DebugDir)
+ self._AutoGenFileList[AutoFile] = str(AutoGenC)
+ self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
+ if str(AutoGenH) != "":
+ AutoFile = PathClass(gAutoGenHeaderFileName, self.DebugDir)
+ self._AutoGenFileList[AutoFile] = str(AutoGenH)
+ self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
+ if str(StringH) != "":
+ AutoFile = PathClass(gAutoGenStringFileName % {"module_name":self.Name}, self.DebugDir)
+ self._AutoGenFileList[AutoFile] = str(StringH)
+ self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
+ if UniStringBinBuffer != None and UniStringBinBuffer.getvalue() != "":
+ AutoFile = PathClass(gAutoGenStringFormFileName % {"module_name":self.Name}, self.OutputDir)
+ self._AutoGenFileList[AutoFile] = UniStringBinBuffer.getvalue()
+ AutoFile.IsBinary = True
+ self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
+ if UniStringBinBuffer != None:
+ UniStringBinBuffer.close()
+ return self._AutoGenFileList
+
+ ## Return the list of library modules explicitly or implicityly used by this module
+ def _GetLibraryList(self):
+ if self._DependentLibraryList == None:
+ # only merge library classes and PCD for non-library module
+ if self.IsLibrary:
+ self._DependentLibraryList = []
+ else:
+ if self.AutoGenVersion < 0x00010005:
+ self._DependentLibraryList = self.PlatformInfo.ResolveLibraryReference(self.Module)
+ else:
+ self._DependentLibraryList = self.PlatformInfo.ApplyLibraryInstance(self.Module)
+ return self._DependentLibraryList
+
+ ## Get the list of PCDs from current module
+ #
+ # @retval list The list of PCD
+ #
+ def _GetModulePcdList(self):
+ if self._ModulePcdList == None:
+ # apply PCD settings from platform
+ self._ModulePcdList = self.PlatformInfo.ApplyPcdSetting(self.Module, self.Module.Pcds)
+ return self._ModulePcdList
+
+ ## Get the list of PCDs from dependent libraries
+ #
+ # @retval list The list of PCD
+ #
+ def _GetLibraryPcdList(self):
+ if self._LibraryPcdList == None:
+ Pcds = {}
+ if not self.IsLibrary:
+ # get PCDs from dependent libraries
+ for Library in self.DependentLibraryList:
+ for Key in Library.Pcds:
+ # skip duplicated PCDs
+ if Key in self.Module.Pcds or Key in Pcds:
+ continue
+ Pcds[Key] = copy.copy(Library.Pcds[Key])
+ # apply PCD settings from platform
+ self._LibraryPcdList = self.PlatformInfo.ApplyPcdSetting(self.Module, Pcds)
+ else:
+ self._LibraryPcdList = []
+ return self._LibraryPcdList
+
+ ## Get the GUID value mapping
+ #
+ # @retval dict The mapping between GUID cname and its value
+ #
+ def _GetGuidList(self):
+ if self._GuidList == None:
+ self._GuidList = self.Module.Guids
+ for Library in self.DependentLibraryList:
+ self._GuidList.update(Library.Guids)
+ return self._GuidList
+
+ ## Get the protocol value mapping
+ #
+ # @retval dict The mapping between protocol cname and its value
+ #
+ def _GetProtocolList(self):
+ if self._ProtocolList == None:
+ self._ProtocolList = self.Module.Protocols
+ for Library in self.DependentLibraryList:
+ self._ProtocolList.update(Library.Protocols)
+ return self._ProtocolList
+
+ ## Get the PPI value mapping
+ #
+ # @retval dict The mapping between PPI cname and its value
+ #
+ def _GetPpiList(self):
+ if self._PpiList == None:
+ self._PpiList = self.Module.Ppis
+ for Library in self.DependentLibraryList:
+ self._PpiList.update(Library.Ppis)
+ return self._PpiList
+
+ ## Get the list of include search path
+ #
+ # @retval list The list path
+ #
+ def _GetIncludePathList(self):
+ if self._IncludePathList == None:
+ self._IncludePathList = []
+ if self.AutoGenVersion < 0x00010005:
+ for Inc in self.Module.Includes:
+ if Inc not in self._IncludePathList:
+ self._IncludePathList.append(Inc)
+ # for r8 modules
+ Inc = path.join(Inc, self.Arch.capitalize())
+ if os.path.exists(Inc) and Inc not in self._IncludePathList:
+ self._IncludePathList.append(Inc)
+ # r8 module needs to put DEBUG_DIR at the end of search path and not to use SOURCE_DIR all the time
+ self._IncludePathList.append(self.DebugDir)
+ else:
+ self._IncludePathList.append(self.MetaFile.Dir)
+ self._IncludePathList.append(self.DebugDir)
+
+ for Package in self.Module.Packages:
+ PackageDir = path.join(self.WorkspaceDir, Package.MetaFile.Dir)
+ if PackageDir not in self._IncludePathList:
+ self._IncludePathList.append(PackageDir)
+ for Inc in Package.Includes:
+ if Inc not in self._IncludePathList:
+ self._IncludePathList.append(str(Inc))
+ return self._IncludePathList
+
+ ## Create makefile for the module and its dependent libraries
+ #
+ # @param CreateLibraryMakeFile Flag indicating if or not the makefiles of
+ # dependent libraries will be created
+ #
+ def CreateMakeFile(self, CreateLibraryMakeFile=True):
+ if self.IsMakeFileCreated:
+ return
+
+ if not self.IsLibrary and CreateLibraryMakeFile:
+ for LibraryAutoGen in self.LibraryAutoGenList:
+ LibraryAutoGen.CreateMakeFile()
+
+ if len(self.CustomMakefile) == 0:
+ Makefile = GenMake.ModuleMakefile(self)
+ else:
+ Makefile = GenMake.CustomMakefile(self)
+ if Makefile.Generate():
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Generated makefile for module %s [%s]" %
+ (self.Name, self.Arch))
+ else:
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Skipped the generation of makefile for module %s [%s]" %
+ (self.Name, self.Arch))
+
+ self.IsMakeFileCreated = True
+
+ ## Create autogen code for the module and its dependent libraries
+ #
+ # @param CreateLibraryCodeFile Flag indicating if or not the code of
+ # dependent libraries will be created
+ #
+ def CreateCodeFile(self, CreateLibraryCodeFile=True):
+ if self.IsCodeFileCreated:
+ return
+
+ if not self.IsLibrary and CreateLibraryCodeFile:
+ for LibraryAutoGen in self.LibraryAutoGenList:
+ LibraryAutoGen.CreateCodeFile()
+
+ AutoGenList = []
+ IgoredAutoGenList = []
+
+ for File in self.AutoGenFileList:
+ if GenC.Generate(File.Path, self.AutoGenFileList[File], File.IsBinary):
+ #Ignore R8 AutoGen.c
+ if self.AutoGenVersion < 0x00010005 and File.Name == 'AutoGen.c':
+ continue
+
+ AutoGenList.append(str(File))
+ else:
+ IgoredAutoGenList.append(str(File))
+
+ # Skip the following code for EDK I inf
+ if self.AutoGenVersion < 0x00010005:
+ return
+
+ for ModuleType in self.DepexList:
+ if len(self.DepexList[ModuleType]) == 0:
+ continue
+ Dpx = GenDepex.DependencyExpression(self.DepexList[ModuleType], ModuleType, True)
+ DpxFile = gAutoGenDepexFileName % {"module_name" : self.Name}
+
+ if Dpx.Generate(path.join(self.OutputDir, DpxFile)):
+ AutoGenList.append(str(DpxFile))
+ else:
+ IgoredAutoGenList.append(str(DpxFile))
+
+ if IgoredAutoGenList == []:
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Generated [%s] files for module %s [%s]" %
+ (" ".join(AutoGenList), self.Name, self.Arch))
+ elif AutoGenList == []:
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Skipped the generation of [%s] files for module %s [%s]" %
+ (" ".join(IgoredAutoGenList), self.Name, self.Arch))
+ else:
+ EdkLogger.debug(EdkLogger.DEBUG_9, "Generated [%s] (skipped %s) files for module %s [%s]" %
+ (" ".join(AutoGenList), " ".join(IgoredAutoGenList), self.Name, self.Arch))
+
+ self.IsCodeFileCreated = True
+ return AutoGenList
+
+ ## Summarize the ModuleAutoGen objects of all libraries used by this module
+ def _GetLibraryAutoGenList(self):
+ if self._LibraryAutoGenList == None:
+ self._LibraryAutoGenList = []
+ for Library in self.DependentLibraryList:
+ La = ModuleAutoGen(
+ self.Workspace,
+ Library.MetaFile,
+ self.BuildTarget,
+ self.ToolChain,
+ self.Arch,
+ self.PlatformInfo.MetaFile
+ )
+ if La not in self._LibraryAutoGenList:
+ self._LibraryAutoGenList.append(La)
+ for Lib in La.CodaTargetList:
+ self._ApplyBuildRule(Lib.Target, TAB_UNKNOWN_FILE)
+ return self._LibraryAutoGenList
+
+ ## Return build command string
+ #
+ # @retval string Build command string
+ #
+ def _GetBuildCommand(self):
+ return self.PlatformInfo.BuildCommand
+
+
+ Module = property(_GetModule)
+ Name = property(_GetBaseName)
+ Guid = property(_GetGuid)
+ Version = property(_GetVersion)
+ ModuleType = property(_GetModuleType)
+ ComponentType = property(_GetComponentType)
+ BuildType = property(_GetBuildType)
+ PcdIsDriver = property(_GetPcdIsDriver)
+ AutoGenVersion = property(_GetAutoGenVersion)
+ Macros = property(_GetMacros)
+ Specification = property(_GetSpecification)
+
+ IsLibrary = property(_IsLibrary)
+
+ BuildDir = property(_GetBuildDir)
+ OutputDir = property(_GetOutputDir)
+ DebugDir = property(_GetDebugDir)
+ MakeFileDir = property(_GetMakeFileDir)
+ CustomMakefile = property(_GetCustomMakefile)
+
+ IncludePathList = property(_GetIncludePathList)
+ AutoGenFileList = property(_GetAutoGenFileList)
+ UnicodeFileList = property(_GetUnicodeFileList)
+ SourceFileList = property(_GetSourceFileList)
+ BinaryFileList = property(_GetBinaryFiles) # FileType : [File List]
+ Targets = property(_GetTargets)
+ IntroTargetList = property(_GetIntroTargetList)
+ CodaTargetList = property(_GetFinalTargetList)
+ FileTypes = property(_GetFileTypes)
+ BuildRules = property(_GetBuildRules)
+
+ DependentPackageList = property(_GetDependentPackageList)
+ DependentLibraryList = property(_GetLibraryList)
+ LibraryAutoGenList = property(_GetLibraryAutoGenList)
+ DerivedPackageList = property(_GetDerivedPackageList)
+
+ ModulePcdList = property(_GetModulePcdList)
+ LibraryPcdList = property(_GetLibraryPcdList)
+ GuidList = property(_GetGuidList)
+ ProtocolList = property(_GetProtocolList)
+ PpiList = property(_GetPpiList)
+ DepexList = property(_GetDepexTokenList)
+ DepexExpressionList = property(_GetDepexExpressionTokenList)
+ BuildOption = property(_GetModuleBuildOption)
+ BuildCommand = property(_GetBuildCommand)
+
+# This acts like the main() function for the script, unless it is 'import'ed into another script.
+if __name__ == '__main__':
+ pass
+
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 0a2bb623d8..a913cf4e5a 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1,7 +1,7 @@
## @file
# Routines for generating AutoGen.h and AutoGen.c
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -162,7 +162,7 @@ ${END}
GUID GuidTable[${PHASE}_GUID_TABLE_SIZE];
${BEGIN} STRING_HEAD ${STRING_HEAD_CNAME_DECL}_${STRING_HEAD_GUID_DECL}[${STRING_HEAD_NUMSKUS_DECL}];
${END}
-${BEGIN} VARIABLE_HEAD ${VARIABLE_HEAD_CNAME_DECL}_${VARIABLE_HEAD_GUID_DECL}[${VARIABLE_HEAD_NUMSKUS_DECL}];
+${BEGIN} VARIABLE_HEAD ${VARIABLE_HEAD_CNAME_DECL}_${VARIABLE_HEAD_GUID_DECL}_Variable_Header[${VARIABLE_HEAD_NUMSKUS_DECL}];
${END}
${BEGIN} UINT8 StringTable${STRING_TABLE_INDEX}[${STRING_TABLE_LENGTH}]; /* ${STRING_TABLE_CNAME}_${STRING_TABLE_GUID} */
${END}
@@ -253,7 +253,7 @@ ${END}
},
/* LocalTokenNumberTable */
{
-${BEGIN} offsetof(${PHASE}_PCD_DATABASE, ${TOKEN_INIT}.${TOKEN_CNAME}_${TOKEN_GUID}) | ${TOKEN_TYPE},
+${BEGIN} offsetof(${PHASE}_PCD_DATABASE, ${TOKEN_INIT}.${TOKEN_CNAME}_${TOKEN_GUID}${VARDEF_HEADER}) | ${TOKEN_TYPE},
${END}
},
/* GuidTable */
@@ -263,7 +263,7 @@ ${END}
},
${BEGIN} { ${STRING_HEAD_VALUE} }, /* ${STRING_HEAD_CNAME_DECL}_${STRING_HEAD_GUID_DECL}[${STRING_HEAD_NUMSKUS_DECL}] */
${END}
-${BEGIN} /* ${VARIABLE_HEAD_CNAME_DECL}_${VARIABLE_HEAD_GUID_DECL}[${VARIABLE_HEAD_NUMSKUS_DECL}] */
+${BEGIN} /* ${VARIABLE_HEAD_CNAME_DECL}_${VARIABLE_HEAD_GUID_DECL}_Variable_Header[${VARIABLE_HEAD_NUMSKUS_DECL}] */
{
${VARIABLE_HEAD_VALUE}
},
@@ -453,7 +453,7 @@ ${END}
gSmmCoreEntryPointString = TemplateString("""
${BEGIN}
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
const UINT32 _gDxeRevision = ${PiSpecVersion};
EFI_STATUS
@@ -482,7 +482,7 @@ ${END}
gDxeSmmEntryPointString = [
TemplateString("""
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
const UINT32 _gDxeRevision = ${PiSpecVersion};
EFI_STATUS
@@ -497,11 +497,11 @@ ProcessModuleEntryPointList (
}
"""),
TemplateString("""
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
const UINT32 _gDxeRevision = ${PiSpecVersion};
static BASE_LIBRARY_JUMP_BUFFER mJumpContext;
-static EFI_STATUS mDriverEntryPointStatus = EFI_LOAD_ERROR;
+static EFI_STATUS mDriverEntryPointStatus;
VOID
EFIAPI
@@ -522,8 +522,9 @@ ProcessModuleEntryPointList (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-
{
+ mDriverEntryPointStatus = EFI_LOAD_ERROR;
+
${BEGIN}
if (SetJump (&mJumpContext) == 0) {
ExitDriver (${Function} (ImageHandle, SystemTable));
@@ -550,7 +551,7 @@ ${END}
gUefiDriverEntryPointString = [
TemplateString("""
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
const UINT32 _gDxeRevision = ${PiSpecVersion};
EFI_STATUS
@@ -564,7 +565,7 @@ ProcessModuleEntryPointList (
}
"""),
TemplateString("""
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
const UINT32 _gDxeRevision = ${PiSpecVersion};
${BEGIN}
@@ -592,17 +593,20 @@ ExitDriver (
}
"""),
TemplateString("""
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
const UINT32 _gDxeRevision = ${PiSpecVersion};
+static BASE_LIBRARY_JUMP_BUFFER mJumpContext;
+static EFI_STATUS mDriverEntryPointStatus;
+
EFI_STATUS
EFIAPI
ProcessModuleEntryPointList (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-
{
+ mDriverEntryPointStatus = EFI_LOAD_ERROR;
${BEGIN}
if (SetJump (&mJumpContext) == 0) {
ExitDriver (${Function} (ImageHandle, SystemTable));
@@ -612,9 +616,6 @@ ProcessModuleEntryPointList (
return mDriverEntryPointStatus;
}
-static BASE_LIBRARY_JUMP_BUFFER mJumpContext;
-static EFI_STATUS mDriverEntryPointStatus = EFI_LOAD_ERROR;
-
VOID
EFIAPI
ExitDriver (
@@ -645,7 +646,7 @@ ${END}
gUefiApplicationEntryPointString = [
TemplateString("""
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
EFI_STATUS
EFIAPI
@@ -658,7 +659,7 @@ ProcessModuleEntryPointList (
}
"""),
TemplateString("""
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
${BEGIN}
EFI_STATUS
@@ -685,7 +686,7 @@ ExitDriver (
}
"""),
TemplateString("""
-const UINT32 _gUefiDriverRevision = ${EfiSpecVersion};
+const UINT32 _gUefiDriverRevision = ${UefiSpecVersion};
EFI_STATUS
EFIAPI
@@ -876,13 +877,6 @@ ${FunctionCall}${END}
"""),
}
-gSpecificationString = TemplateString("""
-${BEGIN}
-#undef ${SpecificationName}
-#define ${SpecificationName} ${SpecificationValue}
-${END}
-""")
-
gBasicHeaderFile = "Base.h"
gModuleTypeHeaderFile = {
@@ -959,11 +953,57 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
Const = ''
Type = ''
Array = ''
- Value = Pcd.DefaultValue
+ Value = Pcd.DefaultValue
Unicode = False
- if Pcd.DatumType == 'UINT64':
- if not Value.endswith('ULL'):
- Value += 'ULL'
+ ValueNumber = 0
+ if Pcd.DatumType in ['UINT64', 'UINT32', 'UINT16', 'UINT8']:
+ try:
+ if Value.upper().startswith('0X'):
+ ValueNumber = int (Value, 16)
+ else:
+ ValueNumber = int (Value)
+ except:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "PCD value is not valid dec or hex number for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
+ if Pcd.DatumType == 'UINT64':
+ if ValueNumber < 0:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "PCD can't be set to negative value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
+ elif ValueNumber >= 0x10000000000000000:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "Too large PCD value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
+ if not Value.endswith('ULL'):
+ Value += 'ULL'
+ elif Pcd.DatumType == 'UINT32':
+ if ValueNumber < 0:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "PCD can't be set to negative value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
+ elif ValueNumber >= 0x100000000:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "Too large PCD value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
+ elif Pcd.DatumType == 'UINT16':
+ if ValueNumber < 0:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "PCD can't be set to negative value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
+ elif ValueNumber >= 0x10000:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "Too large PCD value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
+ elif Pcd.DatumType == 'UINT8':
+ if ValueNumber < 0:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "PCD can't be set to negative value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
+ elif ValueNumber >= 0x100:
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ "Too large PCD value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
+ ExtraData="[%s]" % str(Info))
if Pcd.DatumType == 'VOID*':
if Pcd.MaxDatumSize == None or Pcd.MaxDatumSize == '':
EdkLogger.error("build", AUTOGEN_ERROR,
@@ -973,7 +1013,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
ArraySize = int(Pcd.MaxDatumSize, 0)
if Value[0] == '{':
Type = '(VOID *)'
- else:
+ else:
if Value[0] == 'L':
Unicode = True
Value = Value.lstrip('L') #.strip('"')
@@ -981,15 +1021,15 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
NewValue = '{'
for Index in range(0,len(Value)):
if Unicode:
- NewValue = NewValue + str(ord(Value[Index]) % 0x10000) + ', '
- else:
+ NewValue = NewValue + str(ord(Value[Index]) % 0x10000) + ', '
+ else:
NewValue = NewValue + str(ord(Value[Index]) % 0x100) + ', '
- if Unicode:
- ArraySize = ArraySize / 2;
-
+ if Unicode:
+ ArraySize = ArraySize / 2;
+
if ArraySize < (len(Value) + 1):
ArraySize = len(Value) + 1
- Value = NewValue + '0 }'
+ Value = NewValue + '0 }'
Array = '[%d]' % ArraySize
#
# skip casting for fixed at build since it breaks ARM assembly.
@@ -1003,16 +1043,16 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
else:
PcdValueName = '_PCD_VALUE_' + Pcd.TokenCName
- if Pcd.DatumType == 'VOID*':
- #
- # For unicode, UINT16 array will be generated, so the alignment of unicode is guaranteed.
- #
- if Unicode:
- AutoGenH.Append('#define _PCD_PATCHABLE_%s_SIZE %s\n' % (Pcd.TokenCName, Pcd.MaxDatumSize))
- AutoGenH.Append('#define %s %s%s\n' %(PcdValueName, Type, PcdVariableName))
- AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s UINT16 %s%s = %s;\n' % (Const, PcdVariableName, Array, Value))
- AutoGenH.Append('extern %s UINT16 %s%s;\n' %(Const, PcdVariableName, Array))
- AutoGenH.Append('#define %s %s%s\n' %(GetModeName, Type, PcdVariableName))
+ if Pcd.DatumType == 'VOID*':
+ #
+ # For unicode, UINT16 array will be generated, so the alignment of unicode is guaranteed.
+ #
+ if Unicode:
+ AutoGenH.Append('#define _PCD_PATCHABLE_%s_SIZE %s\n' % (Pcd.TokenCName, Pcd.MaxDatumSize))
+ AutoGenH.Append('#define %s %s%s\n' %(PcdValueName, Type, PcdVariableName))
+ AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s UINT16 %s%s = %s;\n' % (Const, PcdVariableName, Array, Value))
+ AutoGenH.Append('extern %s UINT16 %s%s;\n' %(Const, PcdVariableName, Array))
+ AutoGenH.Append('#define %s %s%s\n' %(GetModeName, Type, PcdVariableName))
else:
AutoGenH.Append('#define _PCD_PATCHABLE_%s_SIZE %s\n' % (Pcd.TokenCName, Pcd.MaxDatumSize))
AutoGenH.Append('#define %s %s%s\n' %(PcdValueName, Type, PcdVariableName))
@@ -1021,7 +1061,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
AutoGenH.Append('#define %s %s%s\n' %(GetModeName, Type, PcdVariableName))
elif Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:
AutoGenH.Append('#define %s %s\n' %(PcdValueName, Value))
- AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED volatile %s %s %s = %s;\n' %(Const, Pcd.DatumType, PcdVariableName, PcdValueName))
+ AutoGenC.Append('volatile %s %s %s = %s;\n' %(Const, Pcd.DatumType, PcdVariableName, PcdValueName))
AutoGenH.Append('extern volatile %s %s %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array))
AutoGenH.Append('#define %s %s%s\n' % (GetModeName, Type, PcdVariableName))
else:
@@ -1139,7 +1179,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase):
'SYSTEM_SKU_ID_VALUE' : '0'
}
- for DatumType in ['UINT64','UINT32','UINT16','UINT8','BOOLEAN']:
+ for DatumType in ['UINT64','UINT32','UINT16','UINT8','BOOLEAN', "VOID*"]:
Dict['VARDEF_CNAME_' + DatumType] = []
Dict['VARDEF_GUID_' + DatumType] = []
Dict['VARDEF_SKUID_' + DatumType] = []
@@ -1174,7 +1214,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase):
Dict['GUID_STRUCTURE'] = []
Dict['SKUID_VALUE'] = []
-
+ Dict['VARDEF_HEADER'] = []
if Phase == 'DXE':
Dict['SYSTEM_SKU_ID'] = ''
Dict['SYSTEM_SKU_ID_VALUE'] = ''
@@ -1223,7 +1263,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase):
Pcd.InitString = 'UNINIT'
if Pcd.DatumType == 'VOID*':
- Pcd.TokenTypeList = ['PCD_DATUM_TYPE_POINTER']
+ Pcd.TokenTypeList = ['PCD_TYPE_STRING']
elif Pcd.DatumType == 'BOOLEAN':
Pcd.TokenTypeList = ['PCD_DATUM_TYPE_UINT8']
else:
@@ -1270,53 +1310,65 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase):
Dict['GUID_STRUCTURE'].append(VariableGuidStructure)
VariableHeadGuidIndex = GuidList.index(VariableGuid)
- VariableHeadValueList.append('%d, %d, %s, offsetof(%s_PCD_DATABASE, Init.%s_%s_VariableDefault_%s)' %
- (VariableHeadGuidIndex, VariableHeadStringIndex, Sku.VariableOffset,
- Phase, CName, TokenSpaceGuid, SkuIdIndex))
+ if "PCD_TYPE_STRING" in Pcd.TokenTypeList:
+ VariableHeadValueList.append('%d, %d, %s, offsetof(%s_PCD_DATABASE, Init.%s_%s)' %
+ (VariableHeadGuidIndex, VariableHeadStringIndex, Sku.VariableOffset,
+ Phase, CName, TokenSpaceGuid))
+ else:
+ VariableHeadValueList.append('%d, %d, %s, offsetof(%s_PCD_DATABASE, Init.%s_%s_VariableDefault_%s)' %
+ (VariableHeadGuidIndex, VariableHeadStringIndex, Sku.VariableOffset,
+ Phase, CName, TokenSpaceGuid, SkuIdIndex))
Dict['VARDEF_CNAME_'+Pcd.DatumType].append(CName)
Dict['VARDEF_GUID_'+Pcd.DatumType].append(TokenSpaceGuid)
Dict['VARDEF_SKUID_'+Pcd.DatumType].append(SkuIdIndex)
- Dict['VARDEF_VALUE_'+Pcd.DatumType].append(Sku.HiiDefaultValue)
+ if "PCD_TYPE_STRING" in Pcd.TokenTypeList:
+ Dict['VARDEF_VALUE_' + Pcd.DatumType].append("%s_%s[%d]" % (Pcd.TokenCName, TokenSpaceGuid, SkuIdIndex))
+ else:
+ Dict['VARDEF_VALUE_'+Pcd.DatumType].append(Sku.HiiDefaultValue)
elif Sku.VpdOffset != '':
Pcd.TokenTypeList += ['PCD_TYPE_VPD']
Pcd.InitString = 'INIT'
VpdHeadOffsetList.append(Sku.VpdOffset)
+
+
+ if Pcd.DatumType == 'VOID*':
+ Pcd.TokenTypeList += ['PCD_TYPE_STRING']
+ Pcd.InitString = 'INIT'
+ if Sku.HiiDefaultValue != '' and Sku.DefaultValue == '':
+ Sku.DefaultValue = Sku.HiiDefaultValue
+ if Sku.DefaultValue != '':
+ NumberOfSizeItems += 1
+ Dict['STRING_TABLE_CNAME'].append(CName)
+ Dict['STRING_TABLE_GUID'].append(TokenSpaceGuid)
+
+ if StringTableIndex == 0:
+ Dict['STRING_TABLE_INDEX'].append('')
+ else:
+ Dict['STRING_TABLE_INDEX'].append('_%d' % StringTableIndex)
+ if Sku.DefaultValue[0] == 'L':
+ Size = (len(Sku.DefaultValue) - 3 + 1) * 2
+ Dict['STRING_TABLE_VALUE'].append(StringToArray(Sku.DefaultValue))
+ elif Sku.DefaultValue[0] == '"':
+ Size = len(Sku.DefaultValue) - 2 + 1
+ Dict['STRING_TABLE_VALUE'].append(StringToArray(Sku.DefaultValue))
+ elif Sku.DefaultValue[0] == '{':
+ Size = len(Sku.DefaultValue.replace(',',' ').split())
+ Dict['STRING_TABLE_VALUE'].append(Sku.DefaultValue)
+
+ StringHeadOffsetList.append(str(StringTableSize))
+ Dict['SIZE_TABLE_CNAME'].append(CName)
+ Dict['SIZE_TABLE_GUID'].append(TokenSpaceGuid)
+ Dict['SIZE_TABLE_CURRENT_LENGTH'].append(Size)
+ Dict['SIZE_TABLE_MAXIMUM_LENGTH'].append(Pcd.MaxDatumSize)
+ if Pcd.MaxDatumSize != '':
+ MaxDatumSize = int(Pcd.MaxDatumSize, 0)
+ if MaxDatumSize > Size:
+ Size = MaxDatumSize
+ Dict['STRING_TABLE_LENGTH'].append(Size)
+ StringTableIndex += 1
+ StringTableSize += (Size)
else:
- if Pcd.DatumType == 'VOID*':
- Pcd.TokenTypeList += ['PCD_TYPE_STRING']
- Pcd.InitString = 'INIT'
- if Sku.DefaultValue != '':
- NumberOfSizeItems += 1
- Dict['STRING_TABLE_CNAME'].append(CName)
- Dict['STRING_TABLE_GUID'].append(TokenSpaceGuid)
-
- if StringTableIndex == 0:
- Dict['STRING_TABLE_INDEX'].append('')
- else:
- Dict['STRING_TABLE_INDEX'].append('_%d' % StringTableIndex)
- if Sku.DefaultValue[0] == 'L':
- Size = (len(Sku.DefaultValue) - 3 + 1) * 2
- Dict['STRING_TABLE_VALUE'].append(StringToArray(Sku.DefaultValue))
- elif Sku.DefaultValue[0] == '"':
- Size = len(Sku.DefaultValue) - 2 + 1
- Dict['STRING_TABLE_VALUE'].append(StringToArray(Sku.DefaultValue))
- elif Sku.DefaultValue[0] == '{':
- Size = len(Sku.DefaultValue.replace(',',' ').split())
- Dict['STRING_TABLE_VALUE'].append(Sku.DefaultValue)
-
- StringHeadOffsetList.append(str(StringTableSize))
- Dict['SIZE_TABLE_CNAME'].append(CName)
- Dict['SIZE_TABLE_GUID'].append(TokenSpaceGuid)
- Dict['SIZE_TABLE_CURRENT_LENGTH'].append(Size)
- Dict['SIZE_TABLE_MAXIMUM_LENGTH'].append(Pcd.MaxDatumSize)
- if Pcd.MaxDatumSize != '':
- MaxDatumSize = int(Pcd.MaxDatumSize, 0)
- if MaxDatumSize > Size:
- Size = MaxDatumSize
- Dict['STRING_TABLE_LENGTH'].append(Size)
- StringTableIndex += 1
- StringTableSize += (Size)
- else:
+ if "PCD_TYPE_HII" not in Pcd.TokenTypeList:
Pcd.TokenTypeList += ['PCD_TYPE_DATA']
if Sku.DefaultValue == 'TRUE':
Pcd.InitString = 'INIT'
@@ -1326,23 +1378,27 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase):
Pcd.InitString = 'INIT'
except:
pass
-
- #
- # For UNIT64 type PCD's value, ULL should be append to avoid
- # warning under linux building environment.
- #
- if Pcd.DatumType == "UINT64":
- ValueList.append(Sku.DefaultValue + "ULL")
- else:
- ValueList.append(Sku.DefaultValue)
+
+ #
+ # For UNIT64 type PCD's value, ULL should be append to avoid
+ # warning under linux building environment.
+ #
+ if Pcd.DatumType == "UINT64":
+ ValueList.append(Sku.DefaultValue + "ULL")
+ else:
+ ValueList.append(Sku.DefaultValue)
Pcd.TokenTypeList = list(set(Pcd.TokenTypeList))
+
if 'PCD_TYPE_HII' in Pcd.TokenTypeList:
Dict['VARIABLE_HEAD_CNAME_DECL'].append(CName)
Dict['VARIABLE_HEAD_GUID_DECL'].append(TokenSpaceGuid)
Dict['VARIABLE_HEAD_NUMSKUS_DECL'].append(len(Pcd.SkuInfoList))
Dict['VARIABLE_HEAD_VALUE'].append('{ %s }\n' % ' },\n { '.join(VariableHeadValueList))
+ Dict['VARDEF_HEADER'].append('_Variable_Header')
+ else:
+ Dict['VARDEF_HEADER'].append('')
if 'PCD_TYPE_VPD' in Pcd.TokenTypeList:
Dict['VPD_HEAD_CNAME_DECL'].append(CName)
Dict['VPD_HEAD_GUID_DECL'].append(TokenSpaceGuid)
@@ -1371,7 +1427,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase):
Dict['TOKEN_CNAME'] = ['' for x in range(NumberOfLocalTokens)]
Dict['TOKEN_GUID'] = ['' for x in range(NumberOfLocalTokens)]
Dict['TOKEN_TYPE'] = ['' for x in range(NumberOfLocalTokens)]
-
+
for Pcd in Platform.DynamicPcdList:
CName = Pcd.TokenCName
TokenSpaceGuidCName = Pcd.TokenSpaceGuidCName
@@ -1614,14 +1670,14 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH):
PiSpecVersion = Info.Module.Specification['PI_SPECIFICATION_VERSION']
else:
PiSpecVersion = 0
- if 'EFI_SPECIFICATION_VERSION' in Info.Module.Specification:
- EfiSpecVersion = Info.Module.Specification['EFI_SPECIFICATION_VERSION']
+ if 'UEFI_SPECIFICATION_VERSION' in Info.Module.Specification:
+ UefiSpecVersion = Info.Module.Specification['UEFI_SPECIFICATION_VERSION']
else:
- EfiSpecVersion = 0
+ UefiSpecVersion = 0
Dict = {
- 'Function' : Info.Module.ModuleEntryPointList,
- 'PiSpecVersion' : PiSpecVersion,
- 'EfiSpecVersion': EfiSpecVersion
+ 'Function' : Info.Module.ModuleEntryPointList,
+ 'PiSpecVersion' : PiSpecVersion,
+ 'UefiSpecVersion': UefiSpecVersion
}
if Info.ModuleType in ['PEI_CORE', 'DXE_CORE', 'SMM_CORE']:
@@ -1853,9 +1909,6 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
# header file Prologue
AutoGenH.Append(gAutoGenHPrologueString.Replace({'File':'AUTOGENH','Guid':Info.Guid.replace('-','_')}))
if Info.AutoGenVersion >= 0x00010005:
- # specification macros
- AutoGenH.Append(gSpecificationString.Replace({'SpecificationName':Info.Specification.keys(),
- 'SpecificationValue':Info.Specification.values()}))
# header files includes
AutoGenH.Append("#include <%s>\n" % gBasicHeaderFile)
if Info.ModuleType in gModuleTypeHeaderFile \
diff --git a/BaseTools/Source/Python/AutoGen/GenDepex.py b/BaseTools/Source/Python/AutoGen/GenDepex.py
index 9ee615cdc8..f456f0d25e 100644
--- a/BaseTools/Source/Python/AutoGen/GenDepex.py
+++ b/BaseTools/Source/Python/AutoGen/GenDepex.py
@@ -1,7 +1,7 @@
## @file
# This file is used to generate DEPEX file for module's dependency expression
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -356,7 +356,7 @@ class DependencyExpression:
versionNumber = "0.04"
__version__ = "%prog Version " + versionNumber
-__copyright__ = "Copyright (c) 2007-2008, Intel Corporation All rights reserved."
+__copyright__ = "Copyright (c) 2007-2010, Intel Corporation All rights reserved."
__usage__ = "%prog [options] [dependency_expression_file]"
## Parse command line options
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index dcfa264025..de2f93b8ea 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -406,18 +406,10 @@ class UniFileClassObject(object):
#
# Load multiple .uni files
#
- def LoadUniFiles(self, FileList = []):
+ def LoadUniFiles(self, FileList):
if len(FileList) > 0:
- if len(FileList) > 1:
- NewList = [];
- for File in FileList:
- NewList.append (File)
- NewList.sort()
- for File in NewList:
- self.LoadUniFile(File)
- else:
- for File in FileList:
- self.LoadUniFile(File)
+ for File in FileList:
+ self.LoadUniFile(File)
#
# Add a string to list
@@ -488,7 +480,6 @@ class UniFileClassObject(object):
EdkLogger.debug(EdkLogger.DEBUG_5, Name)
Token = len(self.OrderedStringList[LangFind])
self.AddStringToList(Name, LangFind, Value, Token, Referenced, LangKey, Index)
-
#
# Retoken
#
@@ -497,7 +488,17 @@ class UniFileClassObject(object):
ReferencedStringList = []
NotReferencedStringList = []
Token = 0
+
+ #
+ # Order UNI token by their String Name
+ #
+ StringNameList = []
for Item in self.OrderedStringList[LangName]:
+ StringNameList.append (Item.StringName)
+ StringNameList.sort()
+
+ for Name in StringNameList:
+ Item = self.FindStringValue (Name, LangName)
if Item.Referenced == True:
Item.Token = Token
ReferencedStringList.append(Item)
diff --git a/BaseTools/Source/Python/AutoGen/__init__.py b/BaseTools/Source/Python/AutoGen/__init__.py
index d6fa5ec126..737cb0c9ab 100644
--- a/BaseTools/Source/Python/AutoGen/__init__.py
+++ b/BaseTools/Source/Python/AutoGen/__init__.py
@@ -1,4 +1,10 @@
-# Copyright (c) 2007, Intel Corporation
+## @file
+# Python 'AutoGen' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -6,5 +12,6 @@
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
__all__ = ["AutoGen"]
diff --git a/BaseTools/Source/Python/Common/BuildToolError.py b/BaseTools/Source/Python/Common/BuildToolError.py
index 982ea93659..a49de46401 100644
--- a/BaseTools/Source/Python/Common/BuildToolError.py
+++ b/BaseTools/Source/Python/Common/BuildToolError.py
@@ -84,7 +84,7 @@ UNKNOWN_ERROR = 0xFFFF
## Error message of each error code
gErrorMessage = {
- FILE_NOT_FOUND : "File/directory not found",
+ FILE_NOT_FOUND : "File/directory not found in workspace",
FILE_OPEN_FAILURE : "File open failure",
FILE_WRITE_FAILURE : "File write failure",
FILE_PARSE_FAILURE : "File parse failure",
diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common/DataType.py
index c2da992059..dd33380a1e 100644
--- a/BaseTools/Source/Python/Common/DataType.py
+++ b/BaseTools/Source/Python/Common/DataType.py
@@ -73,6 +73,8 @@ EDK_COMPONENT_TYPE_BS_DRIVER = 'BS_DRIVER'
EDK_COMPONENT_TYPE_RT_DRIVER = 'RT_DRIVER'
EDK_COMPONENT_TYPE_SAL_RT_DRIVER = 'SAL_RT_DRIVER'
EDK_COMPONENT_TYPE_APPLICATION = 'APPLICATION'
+EDK_NAME = 'EDK'
+EDKII_NAME = 'EDKII'
BINARY_FILE_TYPE_FW = 'FW'
BINARY_FILE_TYPE_GUID = 'GUID'
@@ -230,6 +232,19 @@ TAB_PCDS_DYNAMIC_EBC = TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARCH_EBC
TAB_PCD_DYNAMIC_TYPE_LIST = [TAB_PCDS_DYNAMIC_DEFAULT_NULL, TAB_PCDS_DYNAMIC_VPD_NULL, TAB_PCDS_DYNAMIC_HII_NULL]
TAB_PCD_DYNAMIC_EX_TYPE_LIST = [TAB_PCDS_DYNAMIC_EX_DEFAULT_NULL, TAB_PCDS_DYNAMIC_EX_VPD_NULL, TAB_PCDS_DYNAMIC_EX_HII_NULL]
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE = 'PcdLoadFixAddressPeiCodePageNumber'
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE_DATA_TYPE = 'UINT32'
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_DXE_PAGE_SIZE = 'PcdLoadFixAddressBootTimeCodePageNumber'
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_DXE_PAGE_SIZE_DATA_TYPE = 'UINT32'
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE = 'PcdLoadFixAddressRuntimeCodePageNumber'
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE_DATA_TYPE = 'UINT32'
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE = 'PcdLoadFixAddressSmmCodePageNumber'
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE_DATA_TYPE = 'UINT32'
+TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_LIST = [TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE, \
+ TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_DXE_PAGE_SIZE, \
+ TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE, \
+ TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE]
+
TAB_DEPEX = 'Depex'
TAB_DEPEX_COMMON = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_COMMON
TAB_DEPEX_IA32 = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_IA32
@@ -338,6 +353,7 @@ TAB_DSC_DEFINES_MAKEFILE_NAME = 'MAKEFILE_NAME'
TAB_DSC_DEFINES_BS_BASE_ADDRESS = 'BsBaseAddress'
TAB_DSC_DEFINES_RT_BASE_ADDRESS = 'RtBaseAddress'
TAB_DSC_DEFINES_DEFINE = 'DEFINE'
+TAB_FIX_LOAD_TOP_MEMORY_ADDRESS = 'FIX_LOAD_TOP_MEMORY_ADDRESS'
#
# TargetTxt Definitions
diff --git a/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py b/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
index 82ab1796ad..c33b9bff0b 100644
--- a/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
+++ b/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
@@ -1,7 +1,7 @@
## @file
# This file is used to define each component of the build database
#
-# Copyright (c) 2007 ~ 2008, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -748,7 +748,8 @@ class WorkspaceBuild(object):
#
Pb.Specification = ModuleHeader.Specification
Pb.Specification[TAB_INF_DEFINES_EDK_RELEASE_VERSION] = ModuleHeader.EdkReleaseVersion
- Pb.Specification[TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION] = ModuleHeader.EfiSpecificationVersion
+ Pb.Specification[TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION] = ModuleHeader.UefiSpecificationVersion
+ Pb.Specification[TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION] = ModuleHeader.UefiSpecificationVersion
Pb.AutoGenVersion = int(ModuleHeader.InfVersion, 0)
#
diff --git a/BaseTools/Source/Python/Common/FdfParserLite.py b/BaseTools/Source/Python/Common/FdfParserLite.py
index b397b16b42..e9b69ff1b9 100644
--- a/BaseTools/Source/Python/Common/FdfParserLite.py
+++ b/BaseTools/Source/Python/Common/FdfParserLite.py
@@ -1439,10 +1439,17 @@ class FdfParser(object):
def __GetBlockStatements(self, Obj):
if not self.__GetBlockStatement(Obj):
- raise Warning("expected block statement At Line ", self.FileName, self.CurrentLineNumber)
-
+ #set default block size is 1
+ Obj.BlockSizeList.append((1, Obj.Size, None))
+ return True
+
while self.__GetBlockStatement(Obj):
pass
+
+ for Item in Obj.BlockSizeList:
+ if Item[0] == None or Item[1] == None:
+ raise Warning("expected block statement for Fd Section", self.FileName, self.CurrentLineNumber)
+
return True
## __GetBlockStatement() method
@@ -2329,6 +2336,8 @@ class FdfParser(object):
AlignValue = None
if self.__GetAlignment():
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
BuildNum = None
@@ -2342,6 +2351,8 @@ class FdfParser(object):
BuildNum = self.__Token
if self.__IsKeyword( "VERSION"):
+ if AlignValue == 'Auto':
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
if not self.__IsToken( "="):
raise Warning("expected '=' At Line ", self.FileName, self.CurrentLineNumber)
if not self.__GetNextToken():
@@ -2356,6 +2367,8 @@ class FdfParser(object):
Obj.SectionList.append(VerSectionObj)
elif self.__IsKeyword( "UI"):
+ if AlignValue == 'Auto':
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
if not self.__IsToken( "="):
raise Warning("expected '=' At Line ", self.FileName, self.CurrentLineNumber)
if not self.__GetNextToken():
@@ -2369,6 +2382,8 @@ class FdfParser(object):
Obj.SectionList.append(UiSectionObj)
elif self.__IsKeyword( "FV_IMAGE"):
+ if AlignValue == 'Auto':
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
if not self.__IsToken( "="):
raise Warning("expected '=' At Line ", self.FileName, self.CurrentLineNumber)
if not self.__GetNextWord():
@@ -2409,6 +2424,8 @@ class FdfParser(object):
Obj.SectionList.append(FvImageSectionObj)
elif self.__IsKeyword("PEI_DEPEX_EXP") or self.__IsKeyword("DXE_DEPEX_EXP") or self.__IsKeyword("SMM_DEPEX_EXP"):
+ if AlignValue == 'Auto':
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
DepexSectionObj = CommonDataClass.FdfClass.DepexSectionClassObject()
DepexSectionObj.Alignment = AlignValue
DepexSectionObj.DepexType = self.__Token
@@ -2436,6 +2453,8 @@ class FdfParser(object):
if self.__Token not in ("COMPAT16", "PE32", "PIC", "TE", "FV_IMAGE", "RAW", "DXE_DEPEX",\
"UI", "VERSION", "PEI_DEPEX", "SUBTYPE_GUID", "SMM_DEPEX"):
raise Warning("Unknown section type '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
+ if AlignValue == 'Auto'and (not self.__Token == 'PE32') and (not self.__Token == 'TE'):
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
# DataSection
DataSectionObj = CommonDataClass.FdfClass.DataSectionClassObject()
DataSectionObj.Alignment = AlignValue
@@ -2585,6 +2604,8 @@ class FdfParser(object):
AlignValue = None
if self.__GetAlignment():
+ if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
if not self.__GetCglSection(FfsFileObj, AlignValue):
@@ -2899,7 +2920,7 @@ class FdfParser(object):
AlignValue = ""
if self.__GetAlignment():
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
@@ -2963,8 +2984,10 @@ class FdfParser(object):
CheckSum = True
if self.__GetAlignment():
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)
+ if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
if not self.__GetNextToken():
@@ -3039,14 +3062,6 @@ class FdfParser(object):
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)
FvImageSectionObj.Alignment = self.__Token
- if self.__IsKeyword("FV"):
- FvImageSectionObj.FvFileType = self.__Token
-
- if self.__GetAlignment():
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
- raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)
- FvImageSectionObj.Alignment = self.__Token
-
if self.__IsToken('|'):
FvImageSectionObj.FvFileExtension = self.__GetFileExtension()
elif self.__GetNextToken():
@@ -3110,6 +3125,10 @@ class FdfParser(object):
EfiSectionObj.BuildNum = self.__Token
if self.__GetAlignment():
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
+ if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
EfiSectionObj.Alignment = self.__Token
if self.__IsKeyword('RELOCS_STRIPPED') or self.__IsKeyword('RELOCS_RETAINED'):
diff --git a/BaseTools/Source/Python/Common/InfClassObject.py b/BaseTools/Source/Python/Common/InfClassObject.py
index 27e67f3a1d..7127cc5cff 100644
--- a/BaseTools/Source/Python/Common/InfClassObject.py
+++ b/BaseTools/Source/Python/Common/InfClassObject.py
@@ -1,7 +1,7 @@
## @file
# This file is used to define each component of INF file
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -85,7 +85,8 @@ class InfHeader(ModuleHeaderClass):
TAB_INF_DEFINES_BASE_NAME : "Name",
TAB_INF_DEFINES_FILE_GUID : "Guid",
TAB_INF_DEFINES_MODULE_TYPE : "ModuleType",
- TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION : "EfiSpecificationVersion",
+ TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION : "UefiSpecificationVersion",
+ TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION : "UefiSpecificationVersion",
TAB_INF_DEFINES_EDK_RELEASE_VERSION : "EdkReleaseVersion",
#
# Optional Fields
@@ -452,7 +453,7 @@ class Inf(InfObject):
print 'Guid =', M.Header[Arch].Guid
print 'Version =', M.Header[Arch].Version
print 'InfVersion =', M.Header[Arch].InfVersion
- print 'EfiSpecificationVersion =', M.Header[Arch].EfiSpecificationVersion
+ print 'UefiSpecificationVersion =', M.Header[Arch].UefiSpecificationVersion
print 'EdkReleaseVersion =', M.Header[Arch].EdkReleaseVersion
print 'ModuleType =', M.Header[Arch].ModuleType
print 'BinaryModule =', M.Header[Arch].BinaryModule
diff --git a/BaseTools/Source/Python/Common/InfClassObjectLight.py b/BaseTools/Source/Python/Common/InfClassObjectLight.py
index a655828e6a..179b75e28a 100644
--- a/BaseTools/Source/Python/Common/InfClassObjectLight.py
+++ b/BaseTools/Source/Python/Common/InfClassObjectLight.py
@@ -1,7 +1,7 @@
## @file
# This file is used to define each component of INF file
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -71,7 +71,8 @@ class InfHeader(ModuleHeaderClass):
TAB_INF_DEFINES_BASE_NAME : "Name",
TAB_INF_DEFINES_FILE_GUID : "Guid",
TAB_INF_DEFINES_MODULE_TYPE : "ModuleType",
- TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION : "EfiSpecificationVersion",
+ TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION : "UefiSpecificationVersion",
+ TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION : "UefiSpecificationVersion",
TAB_INF_DEFINES_EDK_RELEASE_VERSION : "EdkReleaseVersion",
# Optional Fields
@@ -583,7 +584,7 @@ class Inf(InfObject):
ModuleHeader.PcdIsDriver = Value
elif Name == TAB_INF_DEFINES_MODULE_TYPE:
ModuleHeader.ModuleType = Value
- elif Name == TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION:
+ elif Name in (TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION, TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION):
ModuleHeader.UefiSpecificationVersion = Value
elif Name == TAB_INF_DEFINES_PI_SPECIFICATION_VERSION:
ModuleHeader.PiSpecificationVersion = Value
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 2883169f3c..546dd37772 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -22,6 +22,7 @@ import threading
import time
import re
import cPickle
+import array
from UserDict import IterableUserDict
from UserList import UserList
@@ -1343,6 +1344,90 @@ class PathClass(object):
Key = property(_GetFileKey)
+## Parse PE image to get the required PE informaion.
+#
+class PeImageClass():
+ ## Constructor
+ #
+ # @param File FilePath of PeImage
+ #
+ def __init__(self, PeFile):
+ self.FileName = PeFile
+ self.IsValid = False
+ self.Size = 0
+ self.EntryPoint = 0
+ self.SectionAlignment = 0
+ self.SectionHeaderList = []
+ self.ErrorInfo = ''
+ try:
+ PeObject = open(PeFile, 'rb')
+ except:
+ self.ErrorInfo = self.FileName + ' can not be found\n'
+ return
+ # Read DOS header
+ ByteArray = array.array('B')
+ ByteArray.fromfile(PeObject, 0x3E)
+ ByteList = ByteArray.tolist()
+ # DOS signature should be 'MZ'
+ if self._ByteListToStr (ByteList[0x0:0x2]) != 'MZ':
+ self.ErrorInfo = self.FileName + ' has no valid DOS signature MZ'
+ return
+
+ # Read 4 byte PE Signature
+ PeOffset = self._ByteListToInt(ByteList[0x3C:0x3E])
+ PeObject.seek(PeOffset)
+ ByteArray = array.array('B')
+ ByteArray.fromfile(PeObject, 4)
+ # PE signature should be 'PE\0\0'
+ if ByteArray.tostring() != 'PE\0\0':
+ self.ErrorInfo = self.FileName + ' has no valid PE signature PE00'
+ return
+
+ # Read PE file header
+ ByteArray = array.array('B')
+ ByteArray.fromfile(PeObject, 0x14)
+ ByteList = ByteArray.tolist()
+ SecNumber = self._ByteListToInt(ByteList[0x2:0x4])
+ if SecNumber == 0:
+ self.ErrorInfo = self.FileName + ' has no section header'
+ return
+
+ # Read PE optional header
+ OptionalHeaderSize = self._ByteListToInt(ByteArray[0x10:0x12])
+ ByteArray = array.array('B')
+ ByteArray.fromfile(PeObject, OptionalHeaderSize)
+ ByteList = ByteArray.tolist()
+ self.EntryPoint = self._ByteListToInt(ByteList[0x10:0x14])
+ self.SectionAlignment = self._ByteListToInt(ByteList[0x20:0x24])
+ self.Size = self._ByteListToInt(ByteList[0x38:0x3C])
+
+ # Read each Section Header
+ for Index in range(SecNumber):
+ ByteArray = array.array('B')
+ ByteArray.fromfile(PeObject, 0x28)
+ ByteList = ByteArray.tolist()
+ SecName = self._ByteListToStr(ByteList[0:8])
+ SecVirtualSize = self._ByteListToInt(ByteList[8:12])
+ SecRawAddress = self._ByteListToInt(ByteList[20:24])
+ SecVirtualAddress = self._ByteListToInt(ByteList[12:16])
+ self.SectionHeaderList.append((SecName, SecVirtualAddress, SecRawAddress, SecVirtualSize))
+ self.IsValid = True
+ PeObject.close()
+
+ def _ByteListToStr(self, ByteList):
+ String = ''
+ for index in range(len(ByteList)):
+ if ByteList[index] == 0:
+ break
+ String += chr(ByteList[index])
+ return String
+
+ def _ByteListToInt(self, ByteList):
+ Value = 0
+ for index in range(len(ByteList) - 1, -1, -1):
+ Value = (Value << 8) | int(ByteList[index])
+ return Value
+
##
#
# This acts like the main() function for the script, unless it is 'import'ed into another
diff --git a/BaseTools/Source/Python/Common/Parsing.py b/BaseTools/Source/Python/Common/Parsing.py
index 755f7901b5..6ab91fbc33 100644
--- a/BaseTools/Source/Python/Common/Parsing.py
+++ b/BaseTools/Source/Python/Common/Parsing.py
@@ -1,7 +1,7 @@
## @file
-# This file is used to define common parsing related functions used in parsing INF/DEC/DSC process
+# This file is used to define common parsing related functions used in parsing INF/DEC/DSC process
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008 ~ 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -31,7 +31,7 @@ def ParseContent(Lines, ):
Line = CleanString(Line)
if Line == '':
continue
-
+
#
# Find a new section tab
# First insert previous section items
@@ -48,7 +48,7 @@ def ParseContent(Lines, ):
SectionItemList = []
ArchList = []
ThirdList = []
-
+
LineList = GetSplitValueList(Line[len(TAB_SECTION_START):len(Line) - len(TAB_SECTION_END)], TAB_COMMA_SPLIT)
for Item in LineList:
ItemList = GetSplitValueList(Item, TAB_SPLIT)
@@ -66,7 +66,7 @@ def ParseContent(Lines, ):
ThirdList.append(ItemList[2])
continue
-
+
#
# Not in any defined section
#
@@ -97,13 +97,13 @@ def ParseDefineMacro2(Table, RecordSets, GlobalMacro):
RecordSet = Table.Exec(SqlCommand)
for Record in RecordSet:
Macros[Record[0]] = Record[1]
-
+
#
# Overrided by Global Macros
#
for Key in GlobalMacro.keys():
Macros[Key] = GlobalMacro[Key]
-
+
#
# Replace the Macros
#
@@ -111,7 +111,7 @@ def ParseDefineMacro2(Table, RecordSets, GlobalMacro):
if RecordSets[Key] != []:
for Item in RecordSets[Key]:
Item[0] = ReplaceMacro(Item[0], Macros)
-
+
## ParseDefineMacro
#
# Search whole table to find all defined Macro and replaced them with the real values
@@ -130,22 +130,22 @@ def ParseDefineMacro(Table, GlobalMacro):
# The follow SqlCommand (expr replace) is not supported in Sqlite 3.3.4 which is used in Python 2.5 *
# Reserved Only *
# SqlCommand = """update %s set Value1 = replace(Value1, '%s', '%s') *
-# where ID in (select ID from %s *
+# where ID in (select ID from %s *
# where Model = %s *
# and Value1 like '%%%s%%' *
# and StartLine > %s *
# and Enabled > -1 *
-# and Arch = '%s')""" % \ *
+# and Arch = '%s')""" % \ *
# (self.TblDsc.Table, Record[0], Record[1], self.TblDsc.Table, Record[2], Record[1], Record[3], Record[4]) *
#***************************************************************************************************************************************************
Macros[Record[0]] = Record[1]
-
+
#
# Overrided by Global Macros
#
for Key in GlobalMacro.keys():
Macros[Key] = GlobalMacro[Key]
-
+
#
# Found all defined macro and replaced
#
@@ -228,7 +228,7 @@ def QueryDefinesItem2(Table, Arch, BelongsToFile):
and BelongsToFile = %s
and Enabled > -1""" % (Table.Table, MODEL_META_DATA_HEADER, ConvertToSqlString2(TAB_ARCH_COMMON), BelongsToFile)
RecordSet = Table.Exec(SqlCommand)
-
+
return RecordSet
##QueryDscItem
@@ -307,7 +307,7 @@ def GetBuildOption(String, File, LineNo = -1):
## Get Library Class
#
# Get Library of Dsc as <LibraryClassKeyWord>|<LibraryInstance>
-#
+#
# @param Item: String as <LibraryClassKeyWord>|<LibraryInstance>
# @param ContainerFile: The file which describes the library class, used for error report
#
@@ -329,7 +329,7 @@ def GetLibraryClass(Item, ContainerFile, WorkspaceDir, LineNo = -1):
## Get Library Class
#
# Get Library of Dsc as <LibraryClassKeyWord>[|<LibraryInstance>][|<TokenSpaceGuidCName>.<PcdCName>]
-#
+#
# @param Item: String as <LibraryClassKeyWord>|<LibraryInstance>
# @param ContainerFile: The file which describes the library class, used for error report
#
@@ -349,7 +349,7 @@ def GetLibraryClassOfInf(Item, ContainerFile, WorkspaceDir, LineNo = -1):
if Item[1] != '':
SupMod = Item[1]
- return (ItemList[0], ItemList[1], ItemList[2], SupMod)
+ return (ItemList[0], ItemList[1], ItemList[2], SupMod)
## CheckPcdTokenInfo
#
@@ -373,7 +373,7 @@ def CheckPcdTokenInfo(TokenInfoString, Section, File, LineNo = -1):
## Get Pcd
#
# Get Pcd of Dsc as <PcdTokenSpaceGuidCName>.<TokenCName>|<Value>[|<Type>|<MaximumDatumSize>]
-#
+#
# @param Item: String as <PcdTokenSpaceGuidCName>.<TokenCName>|<Value>[|<Type>|<MaximumDatumSize>]
# @param ContainerFile: The file which describes the pcd, used for error report
#
@@ -382,23 +382,23 @@ def CheckPcdTokenInfo(TokenInfoString, Section, File, LineNo = -1):
def GetPcd(Item, Type, ContainerFile, LineNo = -1):
TokenGuid, TokenName, Value, MaximumDatumSize, Token = '', '', '', '', ''
List = GetSplitValueList(Item + TAB_VALUE_SPLIT * 2)
-
+
if len(List) < 4 or len(List) > 6:
RaiseParserError(Item, 'Pcds' + Type, ContainerFile, '<PcdTokenSpaceGuidCName>.<TokenCName>|<Value>[|<Type>|<MaximumDatumSize>]', LineNo)
else:
Value = List[1]
MaximumDatumSize = List[2]
Token = List[3]
-
+
if CheckPcdTokenInfo(List[0], 'Pcds' + Type, ContainerFile, LineNo):
(TokenGuid, TokenName) = GetSplitValueList(List[0], TAB_SPLIT)
-
+
return (TokenName, TokenGuid, Value, MaximumDatumSize, Token, Type)
## Get FeatureFlagPcd
#
# Get FeatureFlagPcd of Dsc as <PcdTokenSpaceGuidCName>.<TokenCName>|TRUE/FALSE
-#
+#
# @param Item: String as <PcdTokenSpaceGuidCName>.<TokenCName>|TRUE/FALSE
# @param ContainerFile: The file which describes the pcd, used for error report
#
@@ -413,13 +413,13 @@ def GetFeatureFlagPcd(Item, Type, ContainerFile, LineNo = -1):
Value = List[1]
if CheckPcdTokenInfo(List[0], 'Pcds' + Type, ContainerFile, LineNo):
(TokenGuid, TokenName) = GetSplitValueList(List[0], DataType.TAB_SPLIT)
-
+
return (TokenName, TokenGuid, Value, Type)
## Get DynamicDefaultPcd
#
# Get DynamicDefaultPcd of Dsc as <PcdTokenSpaceGuidCName>.<TokenCName>|<Value>[|<DatumTyp>[|<MaxDatumSize>]]
-#
+#
# @param Item: String as <PcdTokenSpaceGuidCName>.<TokenCName>|TRUE/FALSE
# @param ContainerFile: The file which describes the pcd, used for error report
#
@@ -436,13 +436,13 @@ def GetDynamicDefaultPcd(Item, Type, ContainerFile, LineNo = -1):
MaxDatumSize = List[3]
if CheckPcdTokenInfo(List[0], 'Pcds' + Type, ContainerFile, LineNo):
(TokenGuid, TokenName) = GetSplitValueList(List[0], TAB_SPLIT)
-
+
return (TokenName, TokenGuid, Value, DatumTyp, MaxDatumSize, Type)
## Get DynamicHiiPcd
#
# Get DynamicHiiPcd of Dsc as <PcdTokenSpaceGuidCName>.<TokenCName>|<String>|<VariableGuidCName>|<VariableOffset>[|<DefaultValue>[|<MaximumDatumSize>]]
-#
+#
# @param Item: String as <PcdTokenSpaceGuidCName>.<TokenCName>|TRUE/FALSE
# @param ContainerFile: The file which describes the pcd, used for error report
#
@@ -457,13 +457,13 @@ def GetDynamicHiiPcd(Item, Type, ContainerFile, LineNo = -1):
L1, L2, L3, L4, L5 = List[1], List[2], List[3], List[4], List[5]
if CheckPcdTokenInfo(List[0], 'Pcds' + Type, ContainerFile, LineNo):
(TokenGuid, TokenName) = GetSplitValueList(List[0], DataType.TAB_SPLIT)
-
+
return (TokenName, TokenGuid, L1, L2, L3, L4, L5, Type)
## Get DynamicVpdPcd
#
# Get DynamicVpdPcd of Dsc as <PcdTokenSpaceGuidCName>.<TokenCName>|<VpdOffset>[|<MaximumDatumSize>]
-#
+#
# @param Item: String as <PcdTokenSpaceGuidCName>.<TokenCName>|TRUE/FALSE
# @param ContainerFile: The file which describes the pcd, used for error report
#
@@ -478,7 +478,7 @@ def GetDynamicVpdPcd(Item, Type, ContainerFile, LineNo = -1):
L1, L2 = List[1], List[2]
if CheckPcdTokenInfo(List[0], 'Pcds' + Type, ContainerFile, LineNo):
(TokenGuid, TokenName) = GetSplitValueList(List[0], DataType.TAB_SPLIT)
-
+
return (TokenName, TokenGuid, L1, L2, Type)
## GetComponent
@@ -500,13 +500,13 @@ def GetComponent(Lines, KeyValues):
for Line in Lines:
Line = Line[0]
-
+
#
# Ignore !include statement
#
if Line.upper().find(TAB_INCLUDE.upper() + ' ') > -1 or Line.upper().find(TAB_DEFINE + ' ') > -1:
continue
-
+
if findBlock == False:
ListItem = Line
#
@@ -596,7 +596,7 @@ def GetExec(String):
# Set KeyValues as [ ['component name', [lib1, lib2, lib3], [bo1, bo2, bo3], [pcd1, pcd2, pcd3]], ...]
#
# @param Lines: The content to be parsed
-# @param Key: Reserved
+# @param Key: Reserved
# @param KeyValues: To store data after parsing
# @param CommentCharacter: Comment char, used to ignore comment content
#
@@ -683,7 +683,7 @@ def GetComponents(Lines, Key, KeyValues, CommentCharacter):
## Get Source
#
# Get Source of Inf as <Filename>[|<Family>[|<TagName>[|<ToolCode>[|<PcdFeatureFlag>]]]]
-#
+#
# @param Item: String as <Filename>[|<Family>[|<TagName>[|<ToolCode>[|<PcdFeatureFlag>]]]]
# @param ContainerFile: The file which describes the library class, used for error report
#
@@ -704,11 +704,12 @@ def GetSource(Item, ContainerFile, FileRelativePath, LineNo = -1):
## Get Binary
#
# Get Binary of Inf as <Filename>[|<Family>[|<TagName>[|<ToolCode>[|<PcdFeatureFlag>]]]]
-#
+#
# @param Item: String as <Filename>[|<Family>[|<TagName>[|<ToolCode>[|<PcdFeatureFlag>]]]]
# @param ContainerFile: The file which describes the library class, used for error report
#
# @retval (List[0], List[1], List[2], List[3])
+# @retval List
#
def GetBinary(Item, ContainerFile, FileRelativePath, LineNo = -1):
ItemNew = Item + DataType.TAB_VALUE_SPLIT
@@ -718,15 +719,22 @@ def GetBinary(Item, ContainerFile, FileRelativePath, LineNo = -1):
else:
if List[3] != '':
CheckPcdTokenInfo(List[3], 'Binaries', ContainerFile, LineNo)
-
- return (List[0], List[1], List[2], List[3])
+
+ if len(List) == 4:
+ return (List[0], List[1], List[2], List[3])
+ elif len(List) == 3:
+ return (List[0], List[1], List[2], '')
+ elif len(List) == 2:
+ return (List[0], List[1], '', '')
+ elif len(List) == 1:
+ return (List[0], '', '', '')
## Get Guids/Protocols/Ppis
#
# Get Guids/Protocols/Ppis of Inf as <GuidCName>[|<PcdFeatureFlag>]
#
# @param Item: String as <GuidCName>[|<PcdFeatureFlag>]
-# @param Type: Type of parsing string
+# @param Type: Type of parsing string
# @param ContainerFile: The file which describes the library class, used for error report
#
# @retval (List[0], List[1])
@@ -736,7 +744,7 @@ def GetGuidsProtocolsPpisOfInf(Item, Type, ContainerFile, LineNo = -1):
List = GetSplitValueList(ItemNew)
if List[1] != '':
CheckPcdTokenInfo(List[1], Type, ContainerFile, LineNo)
-
+
return (List[0], List[1])
## Get Guids/Protocols/Ppis
@@ -744,7 +752,7 @@ def GetGuidsProtocolsPpisOfInf(Item, Type, ContainerFile, LineNo = -1):
# Get Guids/Protocols/Ppis of Dec as <GuidCName>=<GuidValue>
#
# @param Item: String as <GuidCName>=<GuidValue>
-# @param Type: Type of parsing string
+# @param Type: Type of parsing string
# @param ContainerFile: The file which describes the library class, used for error report
#
# @retval (List[0], List[1])
@@ -753,7 +761,7 @@ def GetGuidsProtocolsPpisOfDec(Item, Type, ContainerFile, LineNo = -1):
List = GetSplitValueList(Item, DataType.TAB_EQUAL_SPLIT)
if len(List) != 2:
RaiseParserError(Item, Type, ContainerFile, '<CName>=<GuidValue>', LineNo)
-
+
return (List[0], List[1])
## GetPackage
@@ -761,7 +769,7 @@ def GetGuidsProtocolsPpisOfDec(Item, Type, ContainerFile, LineNo = -1):
# Get Package of Inf as <PackagePath>[|<PcdFeatureFlag>]
#
# @param Item: String as <PackagePath>[|<PcdFeatureFlag>]
-# @param Type: Type of parsing string
+# @param Type: Type of parsing string
# @param ContainerFile: The file which describes the library class, used for error report
#
# @retval (List[0], List[1])
@@ -771,10 +779,10 @@ def GetPackage(Item, ContainerFile, FileRelativePath, LineNo = -1):
List = GetSplitValueList(ItemNew)
CheckFileType(List[0], '.Dec', ContainerFile, 'package', List[0], LineNo)
CheckFileExist(FileRelativePath, List[0], ContainerFile, 'Packages', List[0], LineNo)
-
+
if List[1] != '':
CheckPcdTokenInfo(List[1], 'Packages', ContainerFile, LineNo)
-
+
return (List[0], List[1])
## Get Pcd Values of Inf
@@ -790,15 +798,15 @@ def GetPackage(Item, ContainerFile, FileRelativePath, LineNo = -1):
def GetPcdOfInf(Item, Type, File, LineNo):
Format = '<TokenSpaceGuidCName>.<PcdCName>[|<Value>]'
TokenGuid, TokenName, Value, InfType = '', '', '', ''
-
+
if Type == TAB_PCDS_FIXED_AT_BUILD:
InfType = TAB_INF_FIXED_PCD
elif Type == TAB_PCDS_PATCHABLE_IN_MODULE:
InfType = TAB_INF_PATCH_PCD
elif Type == TAB_PCDS_FEATURE_FLAG:
- InfType = TAB_INF_FEATURE_PCD
+ InfType = TAB_INF_FEATURE_PCD
elif Type == TAB_PCDS_DYNAMIC_EX:
- InfType = TAB_INF_PCD_EX
+ InfType = TAB_INF_PCD_EX
elif Type == TAB_PCDS_DYNAMIC:
InfType = TAB_INF_PCD
List = GetSplitValueList(Item + DataType.TAB_VALUE_SPLIT)
@@ -815,7 +823,7 @@ def GetPcdOfInf(Item, Type, File, LineNo):
return (TokenGuid, TokenName, Value, Type)
-
+
## Get Pcd Values of Dec
#
# Get Pcd of Dec as <TokenSpcCName>.<TokenCName>|<Value>|<DatumType>|<Token>
@@ -837,7 +845,7 @@ def GetPcdOfDec(Item, Type, File, LineNo = -1):
else:
TokenGuid = TokenInfo[0]
TokenName = TokenInfo[1]
-
+
return (TokenGuid, TokenName, Value, DatumType, Token, Type)
## Parse DEFINE statement
@@ -854,7 +862,7 @@ def ParseDefine(LineValue, StartLine, Table, FileID, Filename, SectionName, Sect
Table.Insert(MODEL_META_DATA_DEFINE, Define[0], Define[1], '', '', '', Arch, SectionModel, FileID, StartLine, -1, StartLine, -1, 0)
## InsertSectionItems
-#
+#
# Insert item data of a section to a dict
#
def InsertSectionItems(Model, CurrentSection, SectionItemList, ArchList, ThirdList, RecordSet):
@@ -869,23 +877,23 @@ def InsertSectionItems(Model, CurrentSection, SectionItemList, ArchList, ThirdLi
for SectionItem in SectionItemList:
BelongsToItem, EndLine, EndColumn = -1, -1, -1
LineValue, StartLine, EndLine, Comment = SectionItem[0], SectionItem[1], SectionItem[1], SectionItem[2]
-
+
EdkLogger.debug(4, "Parsing %s ..." %LineValue)
# And then parse DEFINE statement
if LineValue.upper().find(DataType.TAB_DEFINE.upper() + ' ') > -1:
continue
-
+
# At last parse other sections
ID = -1
Records.append([LineValue, Arch, StartLine, ID, Third, Comment])
-
+
if RecordSet != {}:
RecordSet[Model] = Records
## Insert records to database
-#
+#
# Insert item data of a section to database
-# @param Table: The Table to be inserted
+# @param Table: The Table to be inserted
# @param FileID: The ID of belonging file
# @param Filename: The name of belonging file
# @param CurrentSection: The name of currect section
@@ -893,7 +901,7 @@ def InsertSectionItems(Model, CurrentSection, SectionItemList, ArchList, ThirdLi
# @param ArchList: A list of arches
# @param ThirdList: A list of third parameters, ModuleType for LibraryClass and SkuId for Dynamic Pcds
# @param IfDefList: A list of all conditional statements
-# @param RecordSet: A dict of all parsed records
+# @param RecordSet: A dict of all parsed records
#
def InsertSectionItemsIntoDatabase(Table, FileID, Filename, Model, CurrentSection, SectionItemList, ArchList, ThirdList, IfDefList, RecordSet):
#
@@ -909,7 +917,7 @@ def InsertSectionItemsIntoDatabase(Table, FileID, Filename, Model, CurrentSectio
for SectionItem in SectionItemList:
BelongsToItem, EndLine, EndColumn = -1, -1, -1
LineValue, StartLine, EndLine = SectionItem[0], SectionItem[1], SectionItem[1]
-
+
EdkLogger.debug(4, "Parsing %s ..." %LineValue)
#
# And then parse DEFINE statement
@@ -917,13 +925,13 @@ def InsertSectionItemsIntoDatabase(Table, FileID, Filename, Model, CurrentSectio
if LineValue.upper().find(DataType.TAB_DEFINE.upper() + ' ') > -1:
ParseDefine(LineValue, StartLine, Table, FileID, Filename, CurrentSection, Model, Arch)
continue
-
+
#
# At last parse other sections
#
ID = Table.Insert(Model, LineValue, Third, Third, '', '', Arch, -1, FileID, StartLine, -1, StartLine, -1, 0)
Records.append([LineValue, Arch, StartLine, ID, Third])
-
+
if RecordSet != {}:
RecordSet[Model] = Records
@@ -932,4 +940,4 @@ def GenMetaDatSectionItem(Key, Value, List):
if Key not in List:
List[Key] = [Value]
else:
- List[Key].append(Value) \ No newline at end of file
+ List[Key].append(Value) \ No newline at end of file
diff --git a/BaseTools/Source/Python/Common/__init__.py b/BaseTools/Source/Python/Common/__init__.py
index e69de29bb2..b289a2b0d8 100644
--- a/BaseTools/Source/Python/Common/__init__.py
+++ b/BaseTools/Source/Python/Common/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'Common' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/CommonDataClass/FdfClass.py b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
index a9e12ed46d..a6953b8c5a 100644
--- a/BaseTools/Source/Python/CommonDataClass/FdfClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
@@ -1,7 +1,7 @@
## @file
# classes represent data in FDF
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -168,6 +168,7 @@ class DepexSectionClassObject (SectionClassObject):
def __init__(self):
self.DepexType = None
self.Expression = None
+ self.ExpressionProcessed = False
## Compress section data in FDF
#
@@ -231,6 +232,7 @@ class FvImageSectionClassObject (SectionClassObject):
self.FvFileType = None
self.FvFileName = None
self.FvFileExtension = None
+ self.FvAddr = None
## GUIDed section data in FDF
#
@@ -247,6 +249,9 @@ class GuidSectionClassObject (SectionClassObject) :
self.SectionType = None
self.ProcessRequired = False
self.AuthStatusValid = False
+ self.FvAddr = []
+ self.FvParentAddr = None
+ self.IncludeFvSection = False
## UI section data in FDF
#
@@ -290,6 +295,7 @@ class RuleClassObject :
self.NameGuid = None
self.Fixed = False
self.Alignment = None
+ self.SectAlignment = None
self.CheckSum = False
self.FvFileType = None # for Ffs File Type
self.KeyStringList = []
@@ -399,4 +405,4 @@ class OptionRomClassObject:
def __init__(self):
self.DriverName = None
self.FfsList = []
- \ No newline at end of file
+
diff --git a/BaseTools/Source/Python/CommonDataClass/ModuleClass.py b/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
index 49d052dc45..350350bdf4 100644
--- a/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
@@ -1,7 +1,7 @@
## @file
# This file is used to define a class object to describe a module
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -34,7 +34,7 @@ from CommonClass import *
# PEI_PCD_DRIVER | DXE_PCD_DRIVER
# @var TianoR8FlashMap_h: To store value for TianoR8FlashMap_h
# @var InfVersion: To store value for InfVersion
-# @var EfiSpecificationVersion: To store value for EfiSpecificationVersion
+# @var UefiSpecificationVersion: To store value for UefiSpecificationVersion
# @var EdkReleaseVersion: To store value for EdkReleaseVersion
# @var LibraryClass: To store value for LibraryClass, it is a set structure as
# [ LibraryClassClass, ...]
@@ -65,7 +65,6 @@ class ModuleHeaderClass(IdentificationClass, CommonHeaderClass, DefineClass):
self.PcdIsDriver = ''
self.TianoR8FlashMap_h = False
self.InfVersion = ''
- self.EfiSpecificationVersion = ''
self.PiSpecificationVersion = ''
self.UefiSpecificationVersion = ''
self.EdkReleaseVersion = ''
diff --git a/BaseTools/Source/Python/CommonDataClass/__init__.py b/BaseTools/Source/Python/CommonDataClass/__init__.py
index e69de29bb2..8f81773a95 100644
--- a/BaseTools/Source/Python/CommonDataClass/__init__.py
+++ b/BaseTools/Source/Python/CommonDataClass/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'CommonDataClass' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/Ecc/C.g b/BaseTools/Source/Python/Ecc/C.g
index 6aa50460de..a34f5902bb 100644
--- a/BaseTools/Source/Python/Ecc/C.g
+++ b/BaseTools/Source/Python/Ecc/C.g
@@ -1,3 +1,15 @@
+/* @file
+ This file is used to be the grammar file of ECC tool
+
+ Copyright (c) 2009 - 2010, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*/
grammar C;
options {
@@ -7,9 +19,49 @@ options {
k=2;
}
+@lexer::header{
+## @file
+# The file defines the Lexer for C source files.
+#
+# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.
+# This file is generated by running:
+# java org.antlr.Tool C.g
+#
+# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+#
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at:
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+}
+
@header {
- import CodeFragment
- import FileProfile
+## @file
+# The file defines the parser for C source files.
+#
+# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.
+# This file is generated by running:
+# java org.antlr.Tool C.g
+#
+# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+#
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at:
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+import CodeFragment
+import FileProfile
}
@members {
@@ -238,6 +290,7 @@ type_qualifier
| 'EFIAPI'
| 'EFI_BOOTSERVICE'
| 'EFI_RUNTIMESERVICE'
+ | 'PACKED'
;
declarator
diff --git a/BaseTools/Source/Python/Ecc/CLexer.py b/BaseTools/Source/Python/Ecc/CLexer.py
index cc437e0821..947ac4c8e3 100644
--- a/BaseTools/Source/Python/Ecc/CLexer.py
+++ b/BaseTools/Source/Python/Ecc/CLexer.py
@@ -1,128 +1,149 @@
-# $ANTLR 3.0.1 C.g 2009-02-16 16:02:51
+# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53
from antlr3 import *
from antlr3.compat import set, frozenset
+
+## @file
+# The file defines the Lexer for C source files.
+#
+# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.
+# This file is generated by running:
+# java org.antlr.Tool C.g
+#
+# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+#
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at:
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
# for convenience in actions
HIDDEN = BaseRecognizer.HIDDEN
# token types
-T29=29
-HexDigit=13
-T70=70
-T74=74
-T85=85
-T102=102
T114=114
-T103=103
+T115=115
+T116=116
+T117=117
+FloatTypeSuffix=16
+LETTER=11
+T29=29
+T28=28
+T27=27
+T26=26
+T25=25
+EOF=-1
STRING_LITERAL=9
+FLOATING_POINT_LITERAL=10
+T38=38
+T37=37
+T39=39
+T34=34
+COMMENT=22
+T33=33
+T36=36
+T35=35
+T30=30
T32=32
-T81=81
+T31=31
+LINE_COMMENT=23
+IntegerTypeSuffix=14
+CHARACTER_LITERAL=8
+T49=49
+T48=48
+T100=100
+T43=43
+T42=42
+T102=102
T41=41
-FloatTypeSuffix=16
-T113=113
-T62=62
+T101=101
+T40=40
+T47=47
+T46=46
+T45=45
+T44=44
T109=109
+T107=107
+T108=108
+T105=105
+WS=19
+T106=106
+T103=103
+T104=104
+T50=50
+LINE_COMMAND=24
+T59=59
+T113=113
+T52=52
+T112=112
+T51=51
+T111=111
+T54=54
+T110=110
+EscapeSequence=12
DECIMAL_LITERAL=7
-IntegerTypeSuffix=14
-T68=68
+T53=53
+T56=56
+T55=55
+T58=58
+T57=57
+T75=75
+T76=76
T73=73
-T84=84
-T33=33
-UnicodeVocabulary=21
+T74=74
+T79=79
+T77=77
T78=78
-T115=115
-WS=19
-LINE_COMMAND=24
-T42=42
-T96=96
-T71=71
-LINE_COMMENT=23
+Exponent=15
+HexDigit=13
T72=72
-T94=94
-FLOATING_POINT_LITERAL=10
-T76=76
-UnicodeEscape=18
-T75=75
-T89=89
+T71=71
+T70=70
+T62=62
+T63=63
+T64=64
+T65=65
+T66=66
T67=67
-T31=31
-T60=60
-T82=82
-T100=100
-T49=49
+T68=68
+T69=69
IDENTIFIER=4
-T30=30
-CHARACTER_LITERAL=8
-T79=79
-T36=36
-T58=58
-T93=93
-T35=35
-T107=107
-OCTAL_LITERAL=6
-T83=83
-T61=61
+UnicodeVocabulary=21
HEX_LITERAL=5
-T45=45
-T34=34
-T101=101
-T64=64
-T25=25
-T91=91
-T105=105
-T37=37
-T86=86
-T116=116
-EscapeSequence=12
-T26=26
-T51=51
-T111=111
-T46=46
-T77=77
-T38=38
-T106=106
-T112=112
-T69=69
-T39=39
-T44=44
-T55=55
-LETTER=11
-Exponent=15
-T95=95
-T50=50
-T110=110
-T108=108
+T61=61
+T60=60
+T99=99
+T97=97
BS=20
+T98=98
+T95=95
+T96=96
+OCTAL_LITERAL=6
+T94=94
+Tokens=118
+T93=93
T92=92
-T43=43
-T28=28
-T40=40
-T66=66
-COMMENT=22
+T91=91
+T90=90
T88=88
-T63=63
-T57=57
-T65=65
-T98=98
-T56=56
+T89=89
+T84=84
+T85=85
+T86=86
T87=87
+UnicodeEscape=18
+T81=81
T80=80
-T59=59
-T97=97
-T48=48
-T54=54
-EOF=-1
-T104=104
-T47=47
-Tokens=117
-T53=53
+T83=83
OctalEscape=17
-T99=99
-T27=27
-T52=52
-T90=90
+T82=82
class CLexer(Lexer):
@@ -162,8 +183,8 @@ class CLexer(Lexer):
try:
self.type = T25
- # C.g:7:5: ( ';' )
- # C.g:7:7: ';'
+ # C.g:27:5: ( ';' )
+ # C.g:27:7: ';'
self.match(u';')
@@ -184,8 +205,8 @@ class CLexer(Lexer):
try:
self.type = T26
- # C.g:8:5: ( 'typedef' )
- # C.g:8:7: 'typedef'
+ # C.g:28:5: ( 'typedef' )
+ # C.g:28:7: 'typedef'
self.match("typedef")
@@ -207,8 +228,8 @@ class CLexer(Lexer):
try:
self.type = T27
- # C.g:9:5: ( ',' )
- # C.g:9:7: ','
+ # C.g:29:5: ( ',' )
+ # C.g:29:7: ','
self.match(u',')
@@ -229,8 +250,8 @@ class CLexer(Lexer):
try:
self.type = T28
- # C.g:10:5: ( '=' )
- # C.g:10:7: '='
+ # C.g:30:5: ( '=' )
+ # C.g:30:7: '='
self.match(u'=')
@@ -251,8 +272,8 @@ class CLexer(Lexer):
try:
self.type = T29
- # C.g:11:5: ( 'extern' )
- # C.g:11:7: 'extern'
+ # C.g:31:5: ( 'extern' )
+ # C.g:31:7: 'extern'
self.match("extern")
@@ -274,8 +295,8 @@ class CLexer(Lexer):
try:
self.type = T30
- # C.g:12:5: ( 'static' )
- # C.g:12:7: 'static'
+ # C.g:32:5: ( 'static' )
+ # C.g:32:7: 'static'
self.match("static")
@@ -297,8 +318,8 @@ class CLexer(Lexer):
try:
self.type = T31
- # C.g:13:5: ( 'auto' )
- # C.g:13:7: 'auto'
+ # C.g:33:5: ( 'auto' )
+ # C.g:33:7: 'auto'
self.match("auto")
@@ -320,8 +341,8 @@ class CLexer(Lexer):
try:
self.type = T32
- # C.g:14:5: ( 'register' )
- # C.g:14:7: 'register'
+ # C.g:34:5: ( 'register' )
+ # C.g:34:7: 'register'
self.match("register")
@@ -343,8 +364,8 @@ class CLexer(Lexer):
try:
self.type = T33
- # C.g:15:5: ( 'STATIC' )
- # C.g:15:7: 'STATIC'
+ # C.g:35:5: ( 'STATIC' )
+ # C.g:35:7: 'STATIC'
self.match("STATIC")
@@ -366,8 +387,8 @@ class CLexer(Lexer):
try:
self.type = T34
- # C.g:16:5: ( 'void' )
- # C.g:16:7: 'void'
+ # C.g:36:5: ( 'void' )
+ # C.g:36:7: 'void'
self.match("void")
@@ -389,8 +410,8 @@ class CLexer(Lexer):
try:
self.type = T35
- # C.g:17:5: ( 'char' )
- # C.g:17:7: 'char'
+ # C.g:37:5: ( 'char' )
+ # C.g:37:7: 'char'
self.match("char")
@@ -412,8 +433,8 @@ class CLexer(Lexer):
try:
self.type = T36
- # C.g:18:5: ( 'short' )
- # C.g:18:7: 'short'
+ # C.g:38:5: ( 'short' )
+ # C.g:38:7: 'short'
self.match("short")
@@ -435,8 +456,8 @@ class CLexer(Lexer):
try:
self.type = T37
- # C.g:19:5: ( 'int' )
- # C.g:19:7: 'int'
+ # C.g:39:5: ( 'int' )
+ # C.g:39:7: 'int'
self.match("int")
@@ -458,8 +479,8 @@ class CLexer(Lexer):
try:
self.type = T38
- # C.g:20:5: ( 'long' )
- # C.g:20:7: 'long'
+ # C.g:40:5: ( 'long' )
+ # C.g:40:7: 'long'
self.match("long")
@@ -481,8 +502,8 @@ class CLexer(Lexer):
try:
self.type = T39
- # C.g:21:5: ( 'float' )
- # C.g:21:7: 'float'
+ # C.g:41:5: ( 'float' )
+ # C.g:41:7: 'float'
self.match("float")
@@ -504,8 +525,8 @@ class CLexer(Lexer):
try:
self.type = T40
- # C.g:22:5: ( 'double' )
- # C.g:22:7: 'double'
+ # C.g:42:5: ( 'double' )
+ # C.g:42:7: 'double'
self.match("double")
@@ -527,8 +548,8 @@ class CLexer(Lexer):
try:
self.type = T41
- # C.g:23:5: ( 'signed' )
- # C.g:23:7: 'signed'
+ # C.g:43:5: ( 'signed' )
+ # C.g:43:7: 'signed'
self.match("signed")
@@ -550,8 +571,8 @@ class CLexer(Lexer):
try:
self.type = T42
- # C.g:24:5: ( 'unsigned' )
- # C.g:24:7: 'unsigned'
+ # C.g:44:5: ( 'unsigned' )
+ # C.g:44:7: 'unsigned'
self.match("unsigned")
@@ -573,8 +594,8 @@ class CLexer(Lexer):
try:
self.type = T43
- # C.g:25:5: ( '{' )
- # C.g:25:7: '{'
+ # C.g:45:5: ( '{' )
+ # C.g:45:7: '{'
self.match(u'{')
@@ -595,8 +616,8 @@ class CLexer(Lexer):
try:
self.type = T44
- # C.g:26:5: ( '}' )
- # C.g:26:7: '}'
+ # C.g:46:5: ( '}' )
+ # C.g:46:7: '}'
self.match(u'}')
@@ -617,8 +638,8 @@ class CLexer(Lexer):
try:
self.type = T45
- # C.g:27:5: ( 'struct' )
- # C.g:27:7: 'struct'
+ # C.g:47:5: ( 'struct' )
+ # C.g:47:7: 'struct'
self.match("struct")
@@ -640,8 +661,8 @@ class CLexer(Lexer):
try:
self.type = T46
- # C.g:28:5: ( 'union' )
- # C.g:28:7: 'union'
+ # C.g:48:5: ( 'union' )
+ # C.g:48:7: 'union'
self.match("union")
@@ -663,8 +684,8 @@ class CLexer(Lexer):
try:
self.type = T47
- # C.g:29:5: ( ':' )
- # C.g:29:7: ':'
+ # C.g:49:5: ( ':' )
+ # C.g:49:7: ':'
self.match(u':')
@@ -685,8 +706,8 @@ class CLexer(Lexer):
try:
self.type = T48
- # C.g:30:5: ( 'enum' )
- # C.g:30:7: 'enum'
+ # C.g:50:5: ( 'enum' )
+ # C.g:50:7: 'enum'
self.match("enum")
@@ -708,8 +729,8 @@ class CLexer(Lexer):
try:
self.type = T49
- # C.g:31:5: ( 'const' )
- # C.g:31:7: 'const'
+ # C.g:51:5: ( 'const' )
+ # C.g:51:7: 'const'
self.match("const")
@@ -731,8 +752,8 @@ class CLexer(Lexer):
try:
self.type = T50
- # C.g:32:5: ( 'volatile' )
- # C.g:32:7: 'volatile'
+ # C.g:52:5: ( 'volatile' )
+ # C.g:52:7: 'volatile'
self.match("volatile")
@@ -754,8 +775,8 @@ class CLexer(Lexer):
try:
self.type = T51
- # C.g:33:5: ( 'IN' )
- # C.g:33:7: 'IN'
+ # C.g:53:5: ( 'IN' )
+ # C.g:53:7: 'IN'
self.match("IN")
@@ -777,8 +798,8 @@ class CLexer(Lexer):
try:
self.type = T52
- # C.g:34:5: ( 'OUT' )
- # C.g:34:7: 'OUT'
+ # C.g:54:5: ( 'OUT' )
+ # C.g:54:7: 'OUT'
self.match("OUT")
@@ -800,8 +821,8 @@ class CLexer(Lexer):
try:
self.type = T53
- # C.g:35:5: ( 'OPTIONAL' )
- # C.g:35:7: 'OPTIONAL'
+ # C.g:55:5: ( 'OPTIONAL' )
+ # C.g:55:7: 'OPTIONAL'
self.match("OPTIONAL")
@@ -823,8 +844,8 @@ class CLexer(Lexer):
try:
self.type = T54
- # C.g:36:5: ( 'CONST' )
- # C.g:36:7: 'CONST'
+ # C.g:56:5: ( 'CONST' )
+ # C.g:56:7: 'CONST'
self.match("CONST")
@@ -846,8 +867,8 @@ class CLexer(Lexer):
try:
self.type = T55
- # C.g:37:5: ( 'UNALIGNED' )
- # C.g:37:7: 'UNALIGNED'
+ # C.g:57:5: ( 'UNALIGNED' )
+ # C.g:57:7: 'UNALIGNED'
self.match("UNALIGNED")
@@ -869,8 +890,8 @@ class CLexer(Lexer):
try:
self.type = T56
- # C.g:38:5: ( 'VOLATILE' )
- # C.g:38:7: 'VOLATILE'
+ # C.g:58:5: ( 'VOLATILE' )
+ # C.g:58:7: 'VOLATILE'
self.match("VOLATILE")
@@ -892,8 +913,8 @@ class CLexer(Lexer):
try:
self.type = T57
- # C.g:39:5: ( 'GLOBAL_REMOVE_IF_UNREFERENCED' )
- # C.g:39:7: 'GLOBAL_REMOVE_IF_UNREFERENCED'
+ # C.g:59:5: ( 'GLOBAL_REMOVE_IF_UNREFERENCED' )
+ # C.g:59:7: 'GLOBAL_REMOVE_IF_UNREFERENCED'
self.match("GLOBAL_REMOVE_IF_UNREFERENCED")
@@ -915,8 +936,8 @@ class CLexer(Lexer):
try:
self.type = T58
- # C.g:40:5: ( 'EFIAPI' )
- # C.g:40:7: 'EFIAPI'
+ # C.g:60:5: ( 'EFIAPI' )
+ # C.g:60:7: 'EFIAPI'
self.match("EFIAPI")
@@ -938,8 +959,8 @@ class CLexer(Lexer):
try:
self.type = T59
- # C.g:41:5: ( 'EFI_BOOTSERVICE' )
- # C.g:41:7: 'EFI_BOOTSERVICE'
+ # C.g:61:5: ( 'EFI_BOOTSERVICE' )
+ # C.g:61:7: 'EFI_BOOTSERVICE'
self.match("EFI_BOOTSERVICE")
@@ -961,8 +982,8 @@ class CLexer(Lexer):
try:
self.type = T60
- # C.g:42:5: ( 'EFI_RUNTIMESERVICE' )
- # C.g:42:7: 'EFI_RUNTIMESERVICE'
+ # C.g:62:5: ( 'EFI_RUNTIMESERVICE' )
+ # C.g:62:7: 'EFI_RUNTIMESERVICE'
self.match("EFI_RUNTIMESERVICE")
@@ -984,9 +1005,10 @@ class CLexer(Lexer):
try:
self.type = T61
- # C.g:43:5: ( '(' )
- # C.g:43:7: '('
- self.match(u'(')
+ # C.g:63:5: ( 'PACKED' )
+ # C.g:63:7: 'PACKED'
+ self.match("PACKED")
+
@@ -1006,9 +1028,9 @@ class CLexer(Lexer):
try:
self.type = T62
- # C.g:44:5: ( ')' )
- # C.g:44:7: ')'
- self.match(u')')
+ # C.g:64:5: ( '(' )
+ # C.g:64:7: '('
+ self.match(u'(')
@@ -1028,9 +1050,9 @@ class CLexer(Lexer):
try:
self.type = T63
- # C.g:45:5: ( '[' )
- # C.g:45:7: '['
- self.match(u'[')
+ # C.g:65:5: ( ')' )
+ # C.g:65:7: ')'
+ self.match(u')')
@@ -1050,9 +1072,9 @@ class CLexer(Lexer):
try:
self.type = T64
- # C.g:46:5: ( ']' )
- # C.g:46:7: ']'
- self.match(u']')
+ # C.g:66:5: ( '[' )
+ # C.g:66:7: '['
+ self.match(u'[')
@@ -1072,9 +1094,9 @@ class CLexer(Lexer):
try:
self.type = T65
- # C.g:47:5: ( '*' )
- # C.g:47:7: '*'
- self.match(u'*')
+ # C.g:67:5: ( ']' )
+ # C.g:67:7: ']'
+ self.match(u']')
@@ -1094,10 +1116,9 @@ class CLexer(Lexer):
try:
self.type = T66
- # C.g:48:5: ( '...' )
- # C.g:48:7: '...'
- self.match("...")
-
+ # C.g:68:5: ( '*' )
+ # C.g:68:7: '*'
+ self.match(u'*')
@@ -1117,9 +1138,10 @@ class CLexer(Lexer):
try:
self.type = T67
- # C.g:49:5: ( '+' )
- # C.g:49:7: '+'
- self.match(u'+')
+ # C.g:69:5: ( '...' )
+ # C.g:69:7: '...'
+ self.match("...")
+
@@ -1139,9 +1161,9 @@ class CLexer(Lexer):
try:
self.type = T68
- # C.g:50:5: ( '-' )
- # C.g:50:7: '-'
- self.match(u'-')
+ # C.g:70:5: ( '+' )
+ # C.g:70:7: '+'
+ self.match(u'+')
@@ -1161,9 +1183,9 @@ class CLexer(Lexer):
try:
self.type = T69
- # C.g:51:5: ( '/' )
- # C.g:51:7: '/'
- self.match(u'/')
+ # C.g:71:5: ( '-' )
+ # C.g:71:7: '-'
+ self.match(u'-')
@@ -1183,9 +1205,9 @@ class CLexer(Lexer):
try:
self.type = T70
- # C.g:52:5: ( '%' )
- # C.g:52:7: '%'
- self.match(u'%')
+ # C.g:72:5: ( '/' )
+ # C.g:72:7: '/'
+ self.match(u'/')
@@ -1205,10 +1227,9 @@ class CLexer(Lexer):
try:
self.type = T71
- # C.g:53:5: ( '++' )
- # C.g:53:7: '++'
- self.match("++")
-
+ # C.g:73:5: ( '%' )
+ # C.g:73:7: '%'
+ self.match(u'%')
@@ -1228,9 +1249,9 @@ class CLexer(Lexer):
try:
self.type = T72
- # C.g:54:5: ( '--' )
- # C.g:54:7: '--'
- self.match("--")
+ # C.g:74:5: ( '++' )
+ # C.g:74:7: '++'
+ self.match("++")
@@ -1251,9 +1272,9 @@ class CLexer(Lexer):
try:
self.type = T73
- # C.g:55:5: ( 'sizeof' )
- # C.g:55:7: 'sizeof'
- self.match("sizeof")
+ # C.g:75:5: ( '--' )
+ # C.g:75:7: '--'
+ self.match("--")
@@ -1274,9 +1295,10 @@ class CLexer(Lexer):
try:
self.type = T74
- # C.g:56:5: ( '.' )
- # C.g:56:7: '.'
- self.match(u'.')
+ # C.g:76:5: ( 'sizeof' )
+ # C.g:76:7: 'sizeof'
+ self.match("sizeof")
+
@@ -1296,10 +1318,9 @@ class CLexer(Lexer):
try:
self.type = T75
- # C.g:57:5: ( '->' )
- # C.g:57:7: '->'
- self.match("->")
-
+ # C.g:77:5: ( '.' )
+ # C.g:77:7: '.'
+ self.match(u'.')
@@ -1319,9 +1340,10 @@ class CLexer(Lexer):
try:
self.type = T76
- # C.g:58:5: ( '&' )
- # C.g:58:7: '&'
- self.match(u'&')
+ # C.g:78:5: ( '->' )
+ # C.g:78:7: '->'
+ self.match("->")
+
@@ -1341,9 +1363,9 @@ class CLexer(Lexer):
try:
self.type = T77
- # C.g:59:5: ( '~' )
- # C.g:59:7: '~'
- self.match(u'~')
+ # C.g:79:5: ( '&' )
+ # C.g:79:7: '&'
+ self.match(u'&')
@@ -1363,9 +1385,9 @@ class CLexer(Lexer):
try:
self.type = T78
- # C.g:60:5: ( '!' )
- # C.g:60:7: '!'
- self.match(u'!')
+ # C.g:80:5: ( '~' )
+ # C.g:80:7: '~'
+ self.match(u'~')
@@ -1385,10 +1407,9 @@ class CLexer(Lexer):
try:
self.type = T79
- # C.g:61:5: ( '*=' )
- # C.g:61:7: '*='
- self.match("*=")
-
+ # C.g:81:5: ( '!' )
+ # C.g:81:7: '!'
+ self.match(u'!')
@@ -1408,9 +1429,9 @@ class CLexer(Lexer):
try:
self.type = T80
- # C.g:62:5: ( '/=' )
- # C.g:62:7: '/='
- self.match("/=")
+ # C.g:82:5: ( '*=' )
+ # C.g:82:7: '*='
+ self.match("*=")
@@ -1431,9 +1452,9 @@ class CLexer(Lexer):
try:
self.type = T81
- # C.g:63:5: ( '%=' )
- # C.g:63:7: '%='
- self.match("%=")
+ # C.g:83:5: ( '/=' )
+ # C.g:83:7: '/='
+ self.match("/=")
@@ -1454,9 +1475,9 @@ class CLexer(Lexer):
try:
self.type = T82
- # C.g:64:5: ( '+=' )
- # C.g:64:7: '+='
- self.match("+=")
+ # C.g:84:5: ( '%=' )
+ # C.g:84:7: '%='
+ self.match("%=")
@@ -1477,9 +1498,9 @@ class CLexer(Lexer):
try:
self.type = T83
- # C.g:65:5: ( '-=' )
- # C.g:65:7: '-='
- self.match("-=")
+ # C.g:85:5: ( '+=' )
+ # C.g:85:7: '+='
+ self.match("+=")
@@ -1500,9 +1521,9 @@ class CLexer(Lexer):
try:
self.type = T84
- # C.g:66:5: ( '<<=' )
- # C.g:66:7: '<<='
- self.match("<<=")
+ # C.g:86:5: ( '-=' )
+ # C.g:86:7: '-='
+ self.match("-=")
@@ -1523,9 +1544,9 @@ class CLexer(Lexer):
try:
self.type = T85
- # C.g:67:5: ( '>>=' )
- # C.g:67:7: '>>='
- self.match(">>=")
+ # C.g:87:5: ( '<<=' )
+ # C.g:87:7: '<<='
+ self.match("<<=")
@@ -1546,9 +1567,9 @@ class CLexer(Lexer):
try:
self.type = T86
- # C.g:68:5: ( '&=' )
- # C.g:68:7: '&='
- self.match("&=")
+ # C.g:88:5: ( '>>=' )
+ # C.g:88:7: '>>='
+ self.match(">>=")
@@ -1569,9 +1590,9 @@ class CLexer(Lexer):
try:
self.type = T87
- # C.g:69:5: ( '^=' )
- # C.g:69:7: '^='
- self.match("^=")
+ # C.g:89:5: ( '&=' )
+ # C.g:89:7: '&='
+ self.match("&=")
@@ -1592,9 +1613,9 @@ class CLexer(Lexer):
try:
self.type = T88
- # C.g:70:5: ( '|=' )
- # C.g:70:7: '|='
- self.match("|=")
+ # C.g:90:5: ( '^=' )
+ # C.g:90:7: '^='
+ self.match("^=")
@@ -1615,9 +1636,10 @@ class CLexer(Lexer):
try:
self.type = T89
- # C.g:71:5: ( '?' )
- # C.g:71:7: '?'
- self.match(u'?')
+ # C.g:91:5: ( '|=' )
+ # C.g:91:7: '|='
+ self.match("|=")
+
@@ -1637,10 +1659,9 @@ class CLexer(Lexer):
try:
self.type = T90
- # C.g:72:5: ( '||' )
- # C.g:72:7: '||'
- self.match("||")
-
+ # C.g:92:5: ( '?' )
+ # C.g:92:7: '?'
+ self.match(u'?')
@@ -1660,9 +1681,9 @@ class CLexer(Lexer):
try:
self.type = T91
- # C.g:73:5: ( '&&' )
- # C.g:73:7: '&&'
- self.match("&&")
+ # C.g:93:5: ( '||' )
+ # C.g:93:7: '||'
+ self.match("||")
@@ -1683,9 +1704,10 @@ class CLexer(Lexer):
try:
self.type = T92
- # C.g:74:5: ( '|' )
- # C.g:74:7: '|'
- self.match(u'|')
+ # C.g:94:5: ( '&&' )
+ # C.g:94:7: '&&'
+ self.match("&&")
+
@@ -1705,9 +1727,9 @@ class CLexer(Lexer):
try:
self.type = T93
- # C.g:75:5: ( '^' )
- # C.g:75:7: '^'
- self.match(u'^')
+ # C.g:95:5: ( '|' )
+ # C.g:95:7: '|'
+ self.match(u'|')
@@ -1727,10 +1749,9 @@ class CLexer(Lexer):
try:
self.type = T94
- # C.g:76:5: ( '==' )
- # C.g:76:7: '=='
- self.match("==")
-
+ # C.g:96:5: ( '^' )
+ # C.g:96:7: '^'
+ self.match(u'^')
@@ -1750,9 +1771,9 @@ class CLexer(Lexer):
try:
self.type = T95
- # C.g:77:5: ( '!=' )
- # C.g:77:7: '!='
- self.match("!=")
+ # C.g:97:5: ( '==' )
+ # C.g:97:7: '=='
+ self.match("==")
@@ -1773,9 +1794,10 @@ class CLexer(Lexer):
try:
self.type = T96
- # C.g:78:5: ( '<' )
- # C.g:78:7: '<'
- self.match(u'<')
+ # C.g:98:5: ( '!=' )
+ # C.g:98:7: '!='
+ self.match("!=")
+
@@ -1795,9 +1817,9 @@ class CLexer(Lexer):
try:
self.type = T97
- # C.g:79:5: ( '>' )
- # C.g:79:7: '>'
- self.match(u'>')
+ # C.g:99:5: ( '<' )
+ # C.g:99:7: '<'
+ self.match(u'<')
@@ -1817,10 +1839,9 @@ class CLexer(Lexer):
try:
self.type = T98
- # C.g:80:5: ( '<=' )
- # C.g:80:7: '<='
- self.match("<=")
-
+ # C.g:100:5: ( '>' )
+ # C.g:100:7: '>'
+ self.match(u'>')
@@ -1840,9 +1861,9 @@ class CLexer(Lexer):
try:
self.type = T99
- # C.g:81:5: ( '>=' )
- # C.g:81:7: '>='
- self.match(">=")
+ # C.g:101:5: ( '<=' )
+ # C.g:101:7: '<='
+ self.match("<=")
@@ -1863,9 +1884,9 @@ class CLexer(Lexer):
try:
self.type = T100
- # C.g:82:6: ( '<<' )
- # C.g:82:8: '<<'
- self.match("<<")
+ # C.g:102:6: ( '>=' )
+ # C.g:102:8: '>='
+ self.match(">=")
@@ -1886,9 +1907,9 @@ class CLexer(Lexer):
try:
self.type = T101
- # C.g:83:6: ( '>>' )
- # C.g:83:8: '>>'
- self.match(">>")
+ # C.g:103:6: ( '<<' )
+ # C.g:103:8: '<<'
+ self.match("<<")
@@ -1909,9 +1930,9 @@ class CLexer(Lexer):
try:
self.type = T102
- # C.g:84:6: ( '__asm__' )
- # C.g:84:8: '__asm__'
- self.match("__asm__")
+ # C.g:104:6: ( '>>' )
+ # C.g:104:8: '>>'
+ self.match(">>")
@@ -1932,9 +1953,9 @@ class CLexer(Lexer):
try:
self.type = T103
- # C.g:85:6: ( '_asm' )
- # C.g:85:8: '_asm'
- self.match("_asm")
+ # C.g:105:6: ( '__asm__' )
+ # C.g:105:8: '__asm__'
+ self.match("__asm__")
@@ -1955,9 +1976,9 @@ class CLexer(Lexer):
try:
self.type = T104
- # C.g:86:6: ( '__asm' )
- # C.g:86:8: '__asm'
- self.match("__asm")
+ # C.g:106:6: ( '_asm' )
+ # C.g:106:8: '_asm'
+ self.match("_asm")
@@ -1978,9 +1999,9 @@ class CLexer(Lexer):
try:
self.type = T105
- # C.g:87:6: ( 'case' )
- # C.g:87:8: 'case'
- self.match("case")
+ # C.g:107:6: ( '__asm' )
+ # C.g:107:8: '__asm'
+ self.match("__asm")
@@ -2001,9 +2022,9 @@ class CLexer(Lexer):
try:
self.type = T106
- # C.g:88:6: ( 'default' )
- # C.g:88:8: 'default'
- self.match("default")
+ # C.g:108:6: ( 'case' )
+ # C.g:108:8: 'case'
+ self.match("case")
@@ -2024,9 +2045,9 @@ class CLexer(Lexer):
try:
self.type = T107
- # C.g:89:6: ( 'if' )
- # C.g:89:8: 'if'
- self.match("if")
+ # C.g:109:6: ( 'default' )
+ # C.g:109:8: 'default'
+ self.match("default")
@@ -2047,9 +2068,9 @@ class CLexer(Lexer):
try:
self.type = T108
- # C.g:90:6: ( 'else' )
- # C.g:90:8: 'else'
- self.match("else")
+ # C.g:110:6: ( 'if' )
+ # C.g:110:8: 'if'
+ self.match("if")
@@ -2070,9 +2091,9 @@ class CLexer(Lexer):
try:
self.type = T109
- # C.g:91:6: ( 'switch' )
- # C.g:91:8: 'switch'
- self.match("switch")
+ # C.g:111:6: ( 'else' )
+ # C.g:111:8: 'else'
+ self.match("else")
@@ -2093,9 +2114,9 @@ class CLexer(Lexer):
try:
self.type = T110
- # C.g:92:6: ( 'while' )
- # C.g:92:8: 'while'
- self.match("while")
+ # C.g:112:6: ( 'switch' )
+ # C.g:112:8: 'switch'
+ self.match("switch")
@@ -2116,9 +2137,9 @@ class CLexer(Lexer):
try:
self.type = T111
- # C.g:93:6: ( 'do' )
- # C.g:93:8: 'do'
- self.match("do")
+ # C.g:113:6: ( 'while' )
+ # C.g:113:8: 'while'
+ self.match("while")
@@ -2139,9 +2160,9 @@ class CLexer(Lexer):
try:
self.type = T112
- # C.g:94:6: ( 'for' )
- # C.g:94:8: 'for'
- self.match("for")
+ # C.g:114:6: ( 'do' )
+ # C.g:114:8: 'do'
+ self.match("do")
@@ -2162,9 +2183,9 @@ class CLexer(Lexer):
try:
self.type = T113
- # C.g:95:6: ( 'goto' )
- # C.g:95:8: 'goto'
- self.match("goto")
+ # C.g:115:6: ( 'for' )
+ # C.g:115:8: 'for'
+ self.match("for")
@@ -2185,9 +2206,9 @@ class CLexer(Lexer):
try:
self.type = T114
- # C.g:96:6: ( 'continue' )
- # C.g:96:8: 'continue'
- self.match("continue")
+ # C.g:116:6: ( 'goto' )
+ # C.g:116:8: 'goto'
+ self.match("goto")
@@ -2208,9 +2229,9 @@ class CLexer(Lexer):
try:
self.type = T115
- # C.g:97:6: ( 'break' )
- # C.g:97:8: 'break'
- self.match("break")
+ # C.g:117:6: ( 'continue' )
+ # C.g:117:8: 'continue'
+ self.match("continue")
@@ -2231,9 +2252,9 @@ class CLexer(Lexer):
try:
self.type = T116
- # C.g:98:6: ( 'return' )
- # C.g:98:8: 'return'
- self.match("return")
+ # C.g:118:6: ( 'break' )
+ # C.g:118:8: 'break'
+ self.match("break")
@@ -2248,17 +2269,40 @@ class CLexer(Lexer):
+ # $ANTLR start T117
+ def mT117(self, ):
+
+ try:
+ self.type = T117
+
+ # C.g:119:6: ( 'return' )
+ # C.g:119:8: 'return'
+ self.match("return")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T117
+
+
+
# $ANTLR start IDENTIFIER
def mIDENTIFIER(self, ):
try:
self.type = IDENTIFIER
- # C.g:533:2: ( LETTER ( LETTER | '0' .. '9' )* )
- # C.g:533:4: LETTER ( LETTER | '0' .. '9' )*
+ # C.g:586:2: ( LETTER ( LETTER | '0' .. '9' )* )
+ # C.g:586:4: LETTER ( LETTER | '0' .. '9' )*
self.mLETTER()
- # C.g:533:11: ( LETTER | '0' .. '9' )*
+ # C.g:586:11: ( LETTER | '0' .. '9' )*
while True: #loop1
alt1 = 2
LA1_0 = self.input.LA(1)
@@ -2300,7 +2344,7 @@ class CLexer(Lexer):
def mLETTER(self, ):
try:
- # C.g:538:2: ( '$' | 'A' .. 'Z' | 'a' .. 'z' | '_' )
+ # C.g:591:2: ( '$' | 'A' .. 'Z' | 'a' .. 'z' | '_' )
# C.g:
if self.input.LA(1) == u'$' or (u'A' <= self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (u'a' <= self.input.LA(1) <= u'z'):
self.input.consume();
@@ -2329,16 +2373,16 @@ class CLexer(Lexer):
try:
self.type = CHARACTER_LITERAL
- # C.g:545:5: ( ( 'L' )? '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\'' )
- # C.g:545:9: ( 'L' )? '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\''
- # C.g:545:9: ( 'L' )?
+ # C.g:598:5: ( ( 'L' )? '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\'' )
+ # C.g:598:9: ( 'L' )? '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\''
+ # C.g:598:9: ( 'L' )?
alt2 = 2
LA2_0 = self.input.LA(1)
if (LA2_0 == u'L') :
alt2 = 1
if alt2 == 1:
- # C.g:545:10: 'L'
+ # C.g:598:10: 'L'
self.match(u'L')
@@ -2346,7 +2390,7 @@ class CLexer(Lexer):
self.match(u'\'')
- # C.g:545:21: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )
+ # C.g:598:21: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )
alt3 = 2
LA3_0 = self.input.LA(1)
@@ -2355,18 +2399,18 @@ class CLexer(Lexer):
elif ((u'\u0000' <= LA3_0 <= u'&') or (u'(' <= LA3_0 <= u'[') or (u']' <= LA3_0 <= u'\uFFFE')) :
alt3 = 2
else:
- nvae = NoViableAltException("545:21: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )", 3, 0, self.input)
+ nvae = NoViableAltException("598:21: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )", 3, 0, self.input)
raise nvae
if alt3 == 1:
- # C.g:545:23: EscapeSequence
+ # C.g:598:23: EscapeSequence
self.mEscapeSequence()
elif alt3 == 2:
- # C.g:545:40: ~ ( '\\'' | '\\\\' )
+ # C.g:598:40: ~ ( '\\'' | '\\\\' )
if (u'\u0000' <= self.input.LA(1) <= u'&') or (u'(' <= self.input.LA(1) <= u'[') or (u']' <= self.input.LA(1) <= u'\uFFFE'):
self.input.consume();
@@ -2399,16 +2443,16 @@ class CLexer(Lexer):
try:
self.type = STRING_LITERAL
- # C.g:549:5: ( ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
- # C.g:549:8: ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
- # C.g:549:8: ( 'L' )?
+ # C.g:602:5: ( ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ # C.g:602:8: ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+ # C.g:602:8: ( 'L' )?
alt4 = 2
LA4_0 = self.input.LA(1)
if (LA4_0 == u'L') :
alt4 = 1
if alt4 == 1:
- # C.g:549:9: 'L'
+ # C.g:602:9: 'L'
self.match(u'L')
@@ -2416,7 +2460,7 @@ class CLexer(Lexer):
self.match(u'"')
- # C.g:549:19: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+ # C.g:602:19: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
while True: #loop5
alt5 = 3
LA5_0 = self.input.LA(1)
@@ -2428,13 +2472,13 @@ class CLexer(Lexer):
if alt5 == 1:
- # C.g:549:21: EscapeSequence
+ # C.g:602:21: EscapeSequence
self.mEscapeSequence()
elif alt5 == 2:
- # C.g:549:38: ~ ( '\\\\' | '\"' )
+ # C.g:602:38: ~ ( '\\\\' | '\"' )
if (u'\u0000' <= self.input.LA(1) <= u'!') or (u'#' <= self.input.LA(1) <= u'[') or (u']' <= self.input.LA(1) <= u'\uFFFE'):
self.input.consume();
@@ -2470,8 +2514,8 @@ class CLexer(Lexer):
try:
self.type = HEX_LITERAL
- # C.g:552:13: ( '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )? )
- # C.g:552:15: '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )?
+ # C.g:605:13: ( '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )? )
+ # C.g:605:15: '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )?
self.match(u'0')
if self.input.LA(1) == u'X' or self.input.LA(1) == u'x':
@@ -2483,7 +2527,7 @@ class CLexer(Lexer):
raise mse
- # C.g:552:29: ( HexDigit )+
+ # C.g:605:29: ( HexDigit )+
cnt6 = 0
while True: #loop6
alt6 = 2
@@ -2494,7 +2538,7 @@ class CLexer(Lexer):
if alt6 == 1:
- # C.g:552:29: HexDigit
+ # C.g:605:29: HexDigit
self.mHexDigit()
@@ -2509,14 +2553,14 @@ class CLexer(Lexer):
cnt6 += 1
- # C.g:552:39: ( IntegerTypeSuffix )?
+ # C.g:605:39: ( IntegerTypeSuffix )?
alt7 = 2
LA7_0 = self.input.LA(1)
if (LA7_0 == u'L' or LA7_0 == u'U' or LA7_0 == u'l' or LA7_0 == u'u') :
alt7 = 1
if alt7 == 1:
- # C.g:552:39: IntegerTypeSuffix
+ # C.g:605:39: IntegerTypeSuffix
self.mIntegerTypeSuffix()
@@ -2540,9 +2584,9 @@ class CLexer(Lexer):
try:
self.type = DECIMAL_LITERAL
- # C.g:554:17: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? )
- # C.g:554:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )?
- # C.g:554:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )
+ # C.g:607:17: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? )
+ # C.g:607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )?
+ # C.g:607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )
alt9 = 2
LA9_0 = self.input.LA(1)
@@ -2551,21 +2595,21 @@ class CLexer(Lexer):
elif ((u'1' <= LA9_0 <= u'9')) :
alt9 = 2
else:
- nvae = NoViableAltException("554:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )", 9, 0, self.input)
+ nvae = NoViableAltException("607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )", 9, 0, self.input)
raise nvae
if alt9 == 1:
- # C.g:554:20: '0'
+ # C.g:607:20: '0'
self.match(u'0')
elif alt9 == 2:
- # C.g:554:26: '1' .. '9' ( '0' .. '9' )*
+ # C.g:607:26: '1' .. '9' ( '0' .. '9' )*
self.matchRange(u'1', u'9')
- # C.g:554:35: ( '0' .. '9' )*
+ # C.g:607:35: ( '0' .. '9' )*
while True: #loop8
alt8 = 2
LA8_0 = self.input.LA(1)
@@ -2575,7 +2619,7 @@ class CLexer(Lexer):
if alt8 == 1:
- # C.g:554:35: '0' .. '9'
+ # C.g:607:35: '0' .. '9'
self.matchRange(u'0', u'9')
@@ -2587,14 +2631,14 @@ class CLexer(Lexer):
- # C.g:554:46: ( IntegerTypeSuffix )?
+ # C.g:607:46: ( IntegerTypeSuffix )?
alt10 = 2
LA10_0 = self.input.LA(1)
if (LA10_0 == u'L' or LA10_0 == u'U' or LA10_0 == u'l' or LA10_0 == u'u') :
alt10 = 1
if alt10 == 1:
- # C.g:554:46: IntegerTypeSuffix
+ # C.g:607:46: IntegerTypeSuffix
self.mIntegerTypeSuffix()
@@ -2618,11 +2662,11 @@ class CLexer(Lexer):
try:
self.type = OCTAL_LITERAL
- # C.g:556:15: ( '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )? )
- # C.g:556:17: '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )?
+ # C.g:609:15: ( '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )? )
+ # C.g:609:17: '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )?
self.match(u'0')
- # C.g:556:21: ( '0' .. '7' )+
+ # C.g:609:21: ( '0' .. '7' )+
cnt11 = 0
while True: #loop11
alt11 = 2
@@ -2633,7 +2677,7 @@ class CLexer(Lexer):
if alt11 == 1:
- # C.g:556:22: '0' .. '7'
+ # C.g:609:22: '0' .. '7'
self.matchRange(u'0', u'7')
@@ -2648,14 +2692,14 @@ class CLexer(Lexer):
cnt11 += 1
- # C.g:556:33: ( IntegerTypeSuffix )?
+ # C.g:609:33: ( IntegerTypeSuffix )?
alt12 = 2
LA12_0 = self.input.LA(1)
if (LA12_0 == u'L' or LA12_0 == u'U' or LA12_0 == u'l' or LA12_0 == u'u') :
alt12 = 1
if alt12 == 1:
- # C.g:556:33: IntegerTypeSuffix
+ # C.g:609:33: IntegerTypeSuffix
self.mIntegerTypeSuffix()
@@ -2677,8 +2721,8 @@ class CLexer(Lexer):
def mHexDigit(self, ):
try:
- # C.g:559:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
- # C.g:559:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+ # C.g:612:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+ # C.g:612:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
if (u'0' <= self.input.LA(1) <= u'9') or (u'A' <= self.input.LA(1) <= u'F') or (u'a' <= self.input.LA(1) <= u'f'):
self.input.consume();
@@ -2704,7 +2748,7 @@ class CLexer(Lexer):
def mIntegerTypeSuffix(self, ):
try:
- # C.g:563:2: ( ( 'u' | 'U' ) | ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' ) )
+ # C.g:616:2: ( ( 'u' | 'U' ) | ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' ) )
alt13 = 4
LA13_0 = self.input.LA(1)
@@ -2723,12 +2767,12 @@ class CLexer(Lexer):
elif (LA13_0 == u'L' or LA13_0 == u'l') :
alt13 = 2
else:
- nvae = NoViableAltException("561:1: fragment IntegerTypeSuffix : ( ( 'u' | 'U' ) | ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' ) );", 13, 0, self.input)
+ nvae = NoViableAltException("614:1: fragment IntegerTypeSuffix : ( ( 'u' | 'U' ) | ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' ) );", 13, 0, self.input)
raise nvae
if alt13 == 1:
- # C.g:563:4: ( 'u' | 'U' )
+ # C.g:616:4: ( 'u' | 'U' )
if self.input.LA(1) == u'U' or self.input.LA(1) == u'u':
self.input.consume();
@@ -2741,7 +2785,7 @@ class CLexer(Lexer):
elif alt13 == 2:
- # C.g:564:4: ( 'l' | 'L' )
+ # C.g:617:4: ( 'l' | 'L' )
if self.input.LA(1) == u'L' or self.input.LA(1) == u'l':
self.input.consume();
@@ -2754,7 +2798,7 @@ class CLexer(Lexer):
elif alt13 == 3:
- # C.g:565:4: ( 'u' | 'U' ) ( 'l' | 'L' )
+ # C.g:618:4: ( 'u' | 'U' ) ( 'l' | 'L' )
if self.input.LA(1) == u'U' or self.input.LA(1) == u'u':
self.input.consume();
@@ -2776,7 +2820,7 @@ class CLexer(Lexer):
elif alt13 == 4:
- # C.g:566:4: ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' )
+ # C.g:619:4: ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' )
if self.input.LA(1) == u'U' or self.input.LA(1) == u'u':
self.input.consume();
@@ -2821,12 +2865,12 @@ class CLexer(Lexer):
try:
self.type = FLOATING_POINT_LITERAL
- # C.g:570:5: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? | '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? | ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? | ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix )
+ # C.g:623:5: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? | '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? | ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? | ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix )
alt25 = 4
alt25 = self.dfa25.predict(self.input)
if alt25 == 1:
- # C.g:570:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )?
- # C.g:570:9: ( '0' .. '9' )+
+ # C.g:623:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )?
+ # C.g:623:9: ( '0' .. '9' )+
cnt14 = 0
while True: #loop14
alt14 = 2
@@ -2837,7 +2881,7 @@ class CLexer(Lexer):
if alt14 == 1:
- # C.g:570:10: '0' .. '9'
+ # C.g:623:10: '0' .. '9'
self.matchRange(u'0', u'9')
@@ -2854,7 +2898,7 @@ class CLexer(Lexer):
self.match(u'.')
- # C.g:570:25: ( '0' .. '9' )*
+ # C.g:623:25: ( '0' .. '9' )*
while True: #loop15
alt15 = 2
LA15_0 = self.input.LA(1)
@@ -2864,7 +2908,7 @@ class CLexer(Lexer):
if alt15 == 1:
- # C.g:570:26: '0' .. '9'
+ # C.g:623:26: '0' .. '9'
self.matchRange(u'0', u'9')
@@ -2873,27 +2917,27 @@ class CLexer(Lexer):
break #loop15
- # C.g:570:37: ( Exponent )?
+ # C.g:623:37: ( Exponent )?
alt16 = 2
LA16_0 = self.input.LA(1)
if (LA16_0 == u'E' or LA16_0 == u'e') :
alt16 = 1
if alt16 == 1:
- # C.g:570:37: Exponent
+ # C.g:623:37: Exponent
self.mExponent()
- # C.g:570:47: ( FloatTypeSuffix )?
+ # C.g:623:47: ( FloatTypeSuffix )?
alt17 = 2
LA17_0 = self.input.LA(1)
if (LA17_0 == u'D' or LA17_0 == u'F' or LA17_0 == u'd' or LA17_0 == u'f') :
alt17 = 1
if alt17 == 1:
- # C.g:570:47: FloatTypeSuffix
+ # C.g:623:47: FloatTypeSuffix
self.mFloatTypeSuffix()
@@ -2902,10 +2946,10 @@ class CLexer(Lexer):
elif alt25 == 2:
- # C.g:571:9: '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )?
+ # C.g:624:9: '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )?
self.match(u'.')
- # C.g:571:13: ( '0' .. '9' )+
+ # C.g:624:13: ( '0' .. '9' )+
cnt18 = 0
while True: #loop18
alt18 = 2
@@ -2916,7 +2960,7 @@ class CLexer(Lexer):
if alt18 == 1:
- # C.g:571:14: '0' .. '9'
+ # C.g:624:14: '0' .. '9'
self.matchRange(u'0', u'9')
@@ -2931,27 +2975,27 @@ class CLexer(Lexer):
cnt18 += 1
- # C.g:571:25: ( Exponent )?
+ # C.g:624:25: ( Exponent )?
alt19 = 2
LA19_0 = self.input.LA(1)
if (LA19_0 == u'E' or LA19_0 == u'e') :
alt19 = 1
if alt19 == 1:
- # C.g:571:25: Exponent
+ # C.g:624:25: Exponent
self.mExponent()
- # C.g:571:35: ( FloatTypeSuffix )?
+ # C.g:624:35: ( FloatTypeSuffix )?
alt20 = 2
LA20_0 = self.input.LA(1)
if (LA20_0 == u'D' or LA20_0 == u'F' or LA20_0 == u'd' or LA20_0 == u'f') :
alt20 = 1
if alt20 == 1:
- # C.g:571:35: FloatTypeSuffix
+ # C.g:624:35: FloatTypeSuffix
self.mFloatTypeSuffix()
@@ -2960,8 +3004,8 @@ class CLexer(Lexer):
elif alt25 == 3:
- # C.g:572:9: ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )?
- # C.g:572:9: ( '0' .. '9' )+
+ # C.g:625:9: ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )?
+ # C.g:625:9: ( '0' .. '9' )+
cnt21 = 0
while True: #loop21
alt21 = 2
@@ -2972,7 +3016,7 @@ class CLexer(Lexer):
if alt21 == 1:
- # C.g:572:10: '0' .. '9'
+ # C.g:625:10: '0' .. '9'
self.matchRange(u'0', u'9')
@@ -2989,14 +3033,14 @@ class CLexer(Lexer):
self.mExponent()
- # C.g:572:30: ( FloatTypeSuffix )?
+ # C.g:625:30: ( FloatTypeSuffix )?
alt22 = 2
LA22_0 = self.input.LA(1)
if (LA22_0 == u'D' or LA22_0 == u'F' or LA22_0 == u'd' or LA22_0 == u'f') :
alt22 = 1
if alt22 == 1:
- # C.g:572:30: FloatTypeSuffix
+ # C.g:625:30: FloatTypeSuffix
self.mFloatTypeSuffix()
@@ -3005,8 +3049,8 @@ class CLexer(Lexer):
elif alt25 == 4:
- # C.g:573:9: ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix
- # C.g:573:9: ( '0' .. '9' )+
+ # C.g:626:9: ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix
+ # C.g:626:9: ( '0' .. '9' )+
cnt23 = 0
while True: #loop23
alt23 = 2
@@ -3017,7 +3061,7 @@ class CLexer(Lexer):
if alt23 == 1:
- # C.g:573:10: '0' .. '9'
+ # C.g:626:10: '0' .. '9'
self.matchRange(u'0', u'9')
@@ -3032,14 +3076,14 @@ class CLexer(Lexer):
cnt23 += 1
- # C.g:573:21: ( Exponent )?
+ # C.g:626:21: ( Exponent )?
alt24 = 2
LA24_0 = self.input.LA(1)
if (LA24_0 == u'E' or LA24_0 == u'e') :
alt24 = 1
if alt24 == 1:
- # C.g:573:21: Exponent
+ # C.g:626:21: Exponent
self.mExponent()
@@ -3062,8 +3106,8 @@ class CLexer(Lexer):
def mExponent(self, ):
try:
- # C.g:577:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
- # C.g:577:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
+ # C.g:630:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
+ # C.g:630:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
if self.input.LA(1) == u'E' or self.input.LA(1) == u'e':
self.input.consume();
@@ -3073,7 +3117,7 @@ class CLexer(Lexer):
raise mse
- # C.g:577:22: ( '+' | '-' )?
+ # C.g:630:22: ( '+' | '-' )?
alt26 = 2
LA26_0 = self.input.LA(1)
@@ -3093,7 +3137,7 @@ class CLexer(Lexer):
- # C.g:577:33: ( '0' .. '9' )+
+ # C.g:630:33: ( '0' .. '9' )+
cnt27 = 0
while True: #loop27
alt27 = 2
@@ -3104,7 +3148,7 @@ class CLexer(Lexer):
if alt27 == 1:
- # C.g:577:34: '0' .. '9'
+ # C.g:630:34: '0' .. '9'
self.matchRange(u'0', u'9')
@@ -3135,8 +3179,8 @@ class CLexer(Lexer):
def mFloatTypeSuffix(self, ):
try:
- # C.g:580:17: ( ( 'f' | 'F' | 'd' | 'D' ) )
- # C.g:580:19: ( 'f' | 'F' | 'd' | 'D' )
+ # C.g:633:17: ( ( 'f' | 'F' | 'd' | 'D' ) )
+ # C.g:633:19: ( 'f' | 'F' | 'd' | 'D' )
if self.input.LA(1) == u'D' or self.input.LA(1) == u'F' or self.input.LA(1) == u'd' or self.input.LA(1) == u'f':
self.input.consume();
@@ -3162,7 +3206,7 @@ class CLexer(Lexer):
def mEscapeSequence(self, ):
try:
- # C.g:584:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape )
+ # C.g:637:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape )
alt28 = 2
LA28_0 = self.input.LA(1)
@@ -3174,17 +3218,17 @@ class CLexer(Lexer):
elif ((u'0' <= LA28_1 <= u'7')) :
alt28 = 2
else:
- nvae = NoViableAltException("582:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 28, 1, self.input)
+ nvae = NoViableAltException("635:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 28, 1, self.input)
raise nvae
else:
- nvae = NoViableAltException("582:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 28, 0, self.input)
+ nvae = NoViableAltException("635:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 28, 0, self.input)
raise nvae
if alt28 == 1:
- # C.g:584:8: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ # C.g:637:8: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
self.match(u'\\')
if self.input.LA(1) == u'"' or self.input.LA(1) == u'\'' or self.input.LA(1) == u'\\' or self.input.LA(1) == u'b' or self.input.LA(1) == u'f' or self.input.LA(1) == u'n' or self.input.LA(1) == u'r' or self.input.LA(1) == u't':
@@ -3199,7 +3243,7 @@ class CLexer(Lexer):
elif alt28 == 2:
- # C.g:585:9: OctalEscape
+ # C.g:638:9: OctalEscape
self.mOctalEscape()
@@ -3217,7 +3261,7 @@ class CLexer(Lexer):
def mOctalEscape(self, ):
try:
- # C.g:590:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+ # C.g:643:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
alt29 = 3
LA29_0 = self.input.LA(1)
@@ -3244,35 +3288,35 @@ class CLexer(Lexer):
else:
alt29 = 3
else:
- nvae = NoViableAltException("588:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 29, 1, self.input)
+ nvae = NoViableAltException("641:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 29, 1, self.input)
raise nvae
else:
- nvae = NoViableAltException("588:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 29, 0, self.input)
+ nvae = NoViableAltException("641:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 29, 0, self.input)
raise nvae
if alt29 == 1:
- # C.g:590:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ # C.g:643:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
self.match(u'\\')
- # C.g:590:14: ( '0' .. '3' )
- # C.g:590:15: '0' .. '3'
+ # C.g:643:14: ( '0' .. '3' )
+ # C.g:643:15: '0' .. '3'
self.matchRange(u'0', u'3')
- # C.g:590:25: ( '0' .. '7' )
- # C.g:590:26: '0' .. '7'
+ # C.g:643:25: ( '0' .. '7' )
+ # C.g:643:26: '0' .. '7'
self.matchRange(u'0', u'7')
- # C.g:590:36: ( '0' .. '7' )
- # C.g:590:37: '0' .. '7'
+ # C.g:643:36: ( '0' .. '7' )
+ # C.g:643:37: '0' .. '7'
self.matchRange(u'0', u'7')
@@ -3281,18 +3325,18 @@ class CLexer(Lexer):
elif alt29 == 2:
- # C.g:591:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ # C.g:644:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
self.match(u'\\')
- # C.g:591:14: ( '0' .. '7' )
- # C.g:591:15: '0' .. '7'
+ # C.g:644:14: ( '0' .. '7' )
+ # C.g:644:15: '0' .. '7'
self.matchRange(u'0', u'7')
- # C.g:591:25: ( '0' .. '7' )
- # C.g:591:26: '0' .. '7'
+ # C.g:644:25: ( '0' .. '7' )
+ # C.g:644:26: '0' .. '7'
self.matchRange(u'0', u'7')
@@ -3301,11 +3345,11 @@ class CLexer(Lexer):
elif alt29 == 3:
- # C.g:592:9: '\\\\' ( '0' .. '7' )
+ # C.g:645:9: '\\\\' ( '0' .. '7' )
self.match(u'\\')
- # C.g:592:14: ( '0' .. '7' )
- # C.g:592:15: '0' .. '7'
+ # C.g:645:14: ( '0' .. '7' )
+ # C.g:645:15: '0' .. '7'
self.matchRange(u'0', u'7')
@@ -3326,8 +3370,8 @@ class CLexer(Lexer):
def mUnicodeEscape(self, ):
try:
- # C.g:597:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
- # C.g:597:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ # C.g:650:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ # C.g:650:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
self.match(u'\\')
self.match(u'u')
@@ -3358,8 +3402,8 @@ class CLexer(Lexer):
try:
self.type = WS
- # C.g:600:5: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) )
- # C.g:600:8: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' )
+ # C.g:653:5: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) )
+ # C.g:653:8: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' )
if (u'\t' <= self.input.LA(1) <= u'\n') or (u'\f' <= self.input.LA(1) <= u'\r') or self.input.LA(1) == u' ':
self.input.consume();
@@ -3390,10 +3434,10 @@ class CLexer(Lexer):
try:
self.type = BS
- # C.g:604:5: ( ( '\\\\' ) )
- # C.g:604:7: ( '\\\\' )
- # C.g:604:7: ( '\\\\' )
- # C.g:604:8: '\\\\'
+ # C.g:657:5: ( ( '\\\\' ) )
+ # C.g:657:7: ( '\\\\' )
+ # C.g:657:7: ( '\\\\' )
+ # C.g:657:8: '\\\\'
self.match(u'\\')
@@ -3420,8 +3464,8 @@ class CLexer(Lexer):
try:
self.type = UnicodeVocabulary
- # C.g:612:5: ( '\\u0003' .. '\\uFFFE' )
- # C.g:612:7: '\\u0003' .. '\\uFFFE'
+ # C.g:665:5: ( '\\u0003' .. '\\uFFFE' )
+ # C.g:665:7: '\\u0003' .. '\\uFFFE'
self.matchRange(u'\u0003', u'\uFFFE')
@@ -3442,12 +3486,12 @@ class CLexer(Lexer):
try:
self.type = COMMENT
- # C.g:615:5: ( '/*' ( options {greedy=false; } : . )* '*/' )
- # C.g:615:9: '/*' ( options {greedy=false; } : . )* '*/'
+ # C.g:668:5: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ # C.g:668:9: '/*' ( options {greedy=false; } : . )* '*/'
self.match("/*")
- # C.g:615:14: ( options {greedy=false; } : . )*
+ # C.g:668:14: ( options {greedy=false; } : . )*
while True: #loop30
alt30 = 2
LA30_0 = self.input.LA(1)
@@ -3466,7 +3510,7 @@ class CLexer(Lexer):
if alt30 == 1:
- # C.g:615:42: .
+ # C.g:668:42: .
self.matchAny()
@@ -3499,12 +3543,12 @@ class CLexer(Lexer):
try:
self.type = LINE_COMMENT
- # C.g:620:5: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
- # C.g:620:7: '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
+ # C.g:673:5: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
+ # C.g:673:7: '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
self.match("//")
- # C.g:620:12: (~ ( '\\n' | '\\r' ) )*
+ # C.g:673:12: (~ ( '\\n' | '\\r' ) )*
while True: #loop31
alt31 = 2
LA31_0 = self.input.LA(1)
@@ -3514,7 +3558,7 @@ class CLexer(Lexer):
if alt31 == 1:
- # C.g:620:12: ~ ( '\\n' | '\\r' )
+ # C.g:673:12: ~ ( '\\n' | '\\r' )
if (u'\u0000' <= self.input.LA(1) <= u'\t') or (u'\u000B' <= self.input.LA(1) <= u'\f') or (u'\u000E' <= self.input.LA(1) <= u'\uFFFE'):
self.input.consume();
@@ -3530,14 +3574,14 @@ class CLexer(Lexer):
break #loop31
- # C.g:620:26: ( '\\r' )?
+ # C.g:673:26: ( '\\r' )?
alt32 = 2
LA32_0 = self.input.LA(1)
if (LA32_0 == u'\r') :
alt32 = 1
if alt32 == 1:
- # C.g:620:26: '\\r'
+ # C.g:673:26: '\\r'
self.match(u'\r')
@@ -3566,11 +3610,11 @@ class CLexer(Lexer):
try:
self.type = LINE_COMMAND
- # C.g:625:5: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
- # C.g:625:7: '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
+ # C.g:678:5: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
+ # C.g:678:7: '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
self.match(u'#')
- # C.g:625:11: (~ ( '\\n' | '\\r' ) )*
+ # C.g:678:11: (~ ( '\\n' | '\\r' ) )*
while True: #loop33
alt33 = 2
LA33_0 = self.input.LA(1)
@@ -3580,7 +3624,7 @@ class CLexer(Lexer):
if alt33 == 1:
- # C.g:625:11: ~ ( '\\n' | '\\r' )
+ # C.g:678:11: ~ ( '\\n' | '\\r' )
if (u'\u0000' <= self.input.LA(1) <= u'\t') or (u'\u000B' <= self.input.LA(1) <= u'\f') or (u'\u000E' <= self.input.LA(1) <= u'\uFFFE'):
self.input.consume();
@@ -3596,14 +3640,14 @@ class CLexer(Lexer):
break #loop33
- # C.g:625:25: ( '\\r' )?
+ # C.g:678:25: ( '\\r' )?
alt34 = 2
LA34_0 = self.input.LA(1)
if (LA34_0 == u'\r') :
alt34 = 1
if alt34 == 1:
- # C.g:625:25: '\\r'
+ # C.g:678:25: '\\r'
self.match(u'\r')
@@ -3627,8 +3671,8 @@ class CLexer(Lexer):
def mTokens(self):
- # C.g:1:8: ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | T80 | T81 | T82 | T83 | T84 | T85 | T86 | T87 | T88 | T89 | T90 | T91 | T92 | T93 | T94 | T95 | T96 | T97 | T98 | T99 | T100 | T101 | T102 | T103 | T104 | T105 | T106 | T107 | T108 | T109 | T110 | T111 | T112 | T113 | T114 | T115 | T116 | IDENTIFIER | CHARACTER_LITERAL | STRING_LITERAL | HEX_LITERAL | DECIMAL_LITERAL | OCTAL_LITERAL | FLOATING_POINT_LITERAL | WS | BS | UnicodeVocabulary | COMMENT | LINE_COMMENT | LINE_COMMAND )
- alt35 = 105
+ # C.g:1:8: ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | T80 | T81 | T82 | T83 | T84 | T85 | T86 | T87 | T88 | T89 | T90 | T91 | T92 | T93 | T94 | T95 | T96 | T97 | T98 | T99 | T100 | T101 | T102 | T103 | T104 | T105 | T106 | T107 | T108 | T109 | T110 | T111 | T112 | T113 | T114 | T115 | T116 | T117 | IDENTIFIER | CHARACTER_LITERAL | STRING_LITERAL | HEX_LITERAL | DECIMAL_LITERAL | OCTAL_LITERAL | FLOATING_POINT_LITERAL | WS | BS | UnicodeVocabulary | COMMENT | LINE_COMMENT | LINE_COMMAND )
+ alt35 = 106
alt35 = self.dfa35.predict(self.input)
if alt35 == 1:
# C.g:1:10: T25
@@ -4183,79 +4227,85 @@ class CLexer(Lexer):
elif alt35 == 93:
- # C.g:1:395: IDENTIFIER
- self.mIDENTIFIER()
+ # C.g:1:395: T117
+ self.mT117()
elif alt35 == 94:
- # C.g:1:406: CHARACTER_LITERAL
- self.mCHARACTER_LITERAL()
+ # C.g:1:400: IDENTIFIER
+ self.mIDENTIFIER()
elif alt35 == 95:
- # C.g:1:424: STRING_LITERAL
- self.mSTRING_LITERAL()
+ # C.g:1:411: CHARACTER_LITERAL
+ self.mCHARACTER_LITERAL()
elif alt35 == 96:
- # C.g:1:439: HEX_LITERAL
- self.mHEX_LITERAL()
+ # C.g:1:429: STRING_LITERAL
+ self.mSTRING_LITERAL()
elif alt35 == 97:
- # C.g:1:451: DECIMAL_LITERAL
- self.mDECIMAL_LITERAL()
+ # C.g:1:444: HEX_LITERAL
+ self.mHEX_LITERAL()
elif alt35 == 98:
- # C.g:1:467: OCTAL_LITERAL
- self.mOCTAL_LITERAL()
+ # C.g:1:456: DECIMAL_LITERAL
+ self.mDECIMAL_LITERAL()
elif alt35 == 99:
- # C.g:1:481: FLOATING_POINT_LITERAL
- self.mFLOATING_POINT_LITERAL()
+ # C.g:1:472: OCTAL_LITERAL
+ self.mOCTAL_LITERAL()
elif alt35 == 100:
- # C.g:1:504: WS
- self.mWS()
+ # C.g:1:486: FLOATING_POINT_LITERAL
+ self.mFLOATING_POINT_LITERAL()
elif alt35 == 101:
- # C.g:1:507: BS
- self.mBS()
+ # C.g:1:509: WS
+ self.mWS()
elif alt35 == 102:
- # C.g:1:510: UnicodeVocabulary
- self.mUnicodeVocabulary()
+ # C.g:1:512: BS
+ self.mBS()
elif alt35 == 103:
- # C.g:1:528: COMMENT
- self.mCOMMENT()
+ # C.g:1:515: UnicodeVocabulary
+ self.mUnicodeVocabulary()
elif alt35 == 104:
- # C.g:1:536: LINE_COMMENT
- self.mLINE_COMMENT()
+ # C.g:1:533: COMMENT
+ self.mCOMMENT()
elif alt35 == 105:
- # C.g:1:549: LINE_COMMAND
+ # C.g:1:541: LINE_COMMENT
+ self.mLINE_COMMENT()
+
+
+
+ elif alt35 == 106:
+ # C.g:1:554: LINE_COMMAND
self.mLINE_COMMAND()
@@ -4276,15 +4326,15 @@ class CLexer(Lexer):
)
DFA25_min = DFA.unpack(
- u"\2\56\1\uffff\1\53\2\uffff\2\60\2\uffff"
+ u"\2\56\2\uffff\1\53\1\uffff\2\60\2\uffff"
)
DFA25_max = DFA.unpack(
- u"\1\71\1\146\1\uffff\1\71\2\uffff\1\71\1\146\2\uffff"
+ u"\1\71\1\146\2\uffff\1\71\1\uffff\1\71\1\146\2\uffff"
)
DFA25_accept = DFA.unpack(
- u"\2\uffff\1\2\1\uffff\1\4\1\1\2\uffff\2\3"
+ u"\2\uffff\1\2\1\1\1\uffff\1\4\2\uffff\2\3"
)
DFA25_special = DFA.unpack(
@@ -4294,11 +4344,11 @@ class CLexer(Lexer):
DFA25_transition = [
DFA.unpack(u"\1\2\1\uffff\12\1"),
- DFA.unpack(u"\1\5\1\uffff\12\1\12\uffff\1\4\1\3\1\4\35\uffff\1\4"
- u"\1\3\1\4"),
+ DFA.unpack(u"\1\3\1\uffff\12\1\12\uffff\1\5\1\4\1\5\35\uffff\1\5"
+ u"\1\4\1\5"),
DFA.unpack(u""),
- DFA.unpack(u"\1\6\1\uffff\1\6\2\uffff\12\7"),
DFA.unpack(u""),
+ DFA.unpack(u"\1\6\1\uffff\1\6\2\uffff\12\7"),
DFA.unpack(u""),
DFA.unpack(u"\12\7"),
DFA.unpack(u"\12\7\12\uffff\1\11\1\uffff\1\11\35\uffff\1\11\1\uffff"
@@ -4313,230 +4363,234 @@ class CLexer(Lexer):
# lookup tables for DFA #35
DFA35_eot = DFA.unpack(
- u"\2\uffff\1\75\1\uffff\1\100\14\75\3\uffff\7\75\4\uffff\1\147\1"
- u"\151\1\155\1\161\1\165\1\167\1\172\1\uffff\1\175\1\u0080\1\u0083"
- u"\1\u0085\1\u0088\1\uffff\5\75\1\uffff\2\72\2\u0092\2\uffff\1\72"
- u"\2\uffff\1\75\4\uffff\16\75\1\u00ab\4\75\1\u00b1\2\75\3\uffff\1"
- u"\u00b5\7\75\35\uffff\1\u00be\1\uffff\1\u00c0\10\uffff\5\75\4\uffff"
- u"\1\u00c6\1\u0092\3\uffff\23\75\1\uffff\1\u00db\1\75\1\u00dd\2\75"
- u"\1\uffff\3\75\1\uffff\1\u00e3\6\75\4\uffff\5\75\1\uffff\1\75\1"
- u"\u00f1\1\u00f2\7\75\1\u00fa\3\75\1\u00fe\3\75\1\u0102\1\u0103\1"
- u"\uffff\1\u0104\1\uffff\5\75\1\uffff\10\75\1\u0113\1\75\1\u0115"
- u"\2\75\2\uffff\6\75\1\u011e\1\uffff\3\75\1\uffff\2\75\1\u0124\3"
- u"\uffff\1\u0125\3\75\1\u0129\1\75\1\u012b\6\75\1\u0133\1\uffff\1"
- u"\u0134\1\uffff\1\u0135\1\75\1\u0137\1\u0138\1\u0139\1\u013a\1\u013b"
- u"\1\u013c\1\uffff\1\75\1\u013e\1\u013f\2\75\2\uffff\1\u0142\2\75"
- u"\1\uffff\1\75\1\uffff\5\75\1\u014b\1\75\3\uffff\1\u014d\6\uffff"
- u"\1\75\2\uffff\2\75\1\uffff\1\u0151\7\75\1\uffff\1\u0159\1\uffff"
- u"\1\u015a\1\u015b\1\u015c\1\uffff\1\u015d\1\u015e\1\75\1\u0160\3"
- u"\75\6\uffff\1\u0164\1\uffff\3\75\1\uffff\20\75\1\u0178\2\75\1\uffff"
- u"\4\75\1\u017f\1\75\1\uffff\11\75\1\u018a\1\uffff"
+ u"\2\uffff\1\76\1\uffff\1\101\14\76\3\uffff\10\76\4\uffff\1\151\1"
+ u"\153\1\157\1\163\1\167\1\171\1\174\1\uffff\1\177\1\u0082\1\u0085"
+ u"\1\u0087\1\u008a\1\uffff\5\76\1\uffff\2\73\2\u0095\2\uffff\1\73"
+ u"\2\uffff\1\76\4\uffff\16\76\1\u00ad\5\76\1\u00b4\1\76\3\uffff\1"
+ u"\u00b7\10\76\34\uffff\1\u00c1\2\uffff\1\u00c3\10\uffff\5\76\3\uffff"
+ u"\1\u00c9\1\uffff\1\u0095\3\uffff\23\76\1\uffff\1\u00de\1\76\1\u00e0"
+ u"\3\76\1\uffff\2\76\1\uffff\1\76\1\u00e7\6\76\4\uffff\5\76\1\uffff"
+ u"\1\76\1\u00f5\1\76\1\u00f7\6\76\1\u00fe\4\76\1\u0103\1\u0104\2"
+ u"\76\1\u0107\1\uffff\1\u0108\1\uffff\6\76\1\uffff\10\76\1\u0118"
+ u"\1\76\1\u011a\2\76\1\uffff\1\76\1\uffff\5\76\1\u0123\1\uffff\4"
+ u"\76\2\uffff\1\76\1\u0129\2\uffff\1\u012a\3\76\1\u012e\1\76\1\u0130"
+ u"\7\76\1\u0139\1\uffff\1\u013a\1\uffff\1\u013b\1\76\1\u013d\1\u013e"
+ u"\1\u013f\1\u0140\1\u0141\1\u0142\1\uffff\1\76\1\u0144\1\u0145\2"
+ u"\76\2\uffff\1\76\1\u0149\1\76\1\uffff\1\76\1\uffff\5\76\1\u0151"
+ u"\1\u0152\1\76\3\uffff\1\u0154\6\uffff\1\76\2\uffff\2\76\1\u0158"
+ u"\1\uffff\7\76\2\uffff\1\u0160\1\uffff\1\u0161\1\u0162\1\u0163\1"
+ u"\uffff\1\u0164\1\u0165\1\76\1\u0167\3\76\6\uffff\1\u016b\1\uffff"
+ u"\3\76\1\uffff\21\76\1\u0180\2\76\1\uffff\3\76\1\u0186\1\76\1\uffff"
+ u"\11\76\1\u0191\1\uffff"
)
DFA35_eof = DFA.unpack(
- u"\u018b\uffff"
+ u"\u0192\uffff"
)
DFA35_min = DFA.unpack(
u"\1\3\1\uffff\1\171\1\uffff\1\75\1\154\1\150\1\165\1\145\1\124\1"
u"\157\1\141\1\146\1\157\1\154\1\145\1\156\3\uffff\1\116\1\120\1"
- u"\117\1\116\1\117\1\114\1\106\4\uffff\1\75\1\56\1\53\1\55\1\52\1"
- u"\75\1\46\1\uffff\1\75\1\74\3\75\1\uffff\1\137\1\150\1\157\1\162"
- u"\1\42\1\uffff\2\0\2\56\2\uffff\1\0\2\uffff\1\160\4\uffff\1\165"
- u"\1\163\1\164\1\141\1\151\1\147\1\157\1\164\1\147\1\101\1\151\1"
- u"\156\1\163\1\141\1\44\1\164\1\156\1\162\1\157\1\44\1\146\1\151"
- u"\3\uffff\1\44\2\124\1\116\1\101\1\114\1\117\1\111\35\uffff\1\75"
- u"\1\uffff\1\75\10\uffff\1\141\1\163\1\151\1\164\1\145\4\uffff\2"
- u"\56\3\uffff\1\145\1\155\2\145\1\165\2\164\1\156\1\145\1\162\1\157"
- u"\1\151\1\165\1\124\1\144\1\141\1\163\1\145\1\162\1\uffff\1\44\1"
- u"\147\1\44\1\141\1\142\1\uffff\1\141\1\151\1\157\1\uffff\1\44\1"
- u"\111\1\123\1\114\1\101\1\102\1\101\4\uffff\1\163\1\155\1\154\1"
- u"\157\1\141\1\uffff\1\144\2\44\1\162\1\143\1\151\1\143\1\145\1\157"
- u"\1\164\1\44\1\163\1\162\1\111\1\44\1\164\1\151\1\164\2\44\1\uffff"
- u"\1\44\1\uffff\1\164\1\154\1\165\1\147\1\156\1\uffff\1\117\1\124"
- u"\1\111\1\124\1\101\1\102\1\120\1\155\1\44\1\145\1\44\1\153\1\145"
- u"\2\uffff\1\156\1\164\1\143\1\150\1\144\1\146\1\44\1\uffff\1\164"
- u"\1\156\1\103\1\uffff\1\151\1\156\1\44\3\uffff\1\44\1\145\1\154"
- u"\1\156\1\44\1\116\1\44\1\107\1\111\1\114\1\117\1\125\1\111\1\44"
- u"\1\uffff\1\44\1\uffff\1\44\1\146\6\44\1\uffff\1\145\2\44\1\154"
- u"\1\165\2\uffff\1\44\1\164\1\145\1\uffff\1\101\1\uffff\1\116\1\114"
- u"\1\137\1\117\1\116\1\44\1\137\3\uffff\1\44\6\uffff\1\162\2\uffff"
- u"\2\145\1\uffff\1\44\1\144\1\114\2\105\1\122\2\124\1\uffff\1\44"
- u"\1\uffff\3\44\1\uffff\2\44\1\104\1\44\1\105\1\123\1\111\6\uffff"
- u"\1\44\1\uffff\1\115\1\105\1\115\1\uffff\1\117\1\122\1\105\2\126"
- u"\1\123\1\105\1\111\1\105\1\137\1\103\1\122\1\111\1\105\1\126\1"
- u"\106\1\44\1\111\1\137\1\uffff\1\103\1\125\1\105\1\116\1\44\1\122"
- u"\1\uffff\1\105\1\106\1\105\1\122\1\105\1\116\1\103\1\105\1\104"
- u"\1\44\1\uffff"
+ u"\117\1\116\1\117\1\114\1\106\1\101\4\uffff\1\75\1\56\1\53\1\55"
+ u"\1\52\1\75\1\46\1\uffff\1\75\1\74\3\75\1\uffff\1\137\1\150\1\157"
+ u"\1\162\1\42\1\uffff\2\0\2\56\2\uffff\1\0\2\uffff\1\160\4\uffff"
+ u"\1\163\1\164\1\165\1\151\1\141\1\147\1\157\1\164\1\147\1\101\1"
+ u"\151\1\163\1\156\1\141\1\44\1\164\1\156\1\162\1\157\1\146\1\44"
+ u"\1\151\3\uffff\1\44\2\124\1\116\1\101\1\114\1\117\1\111\1\103\34"
+ u"\uffff\1\75\2\uffff\1\75\10\uffff\1\141\1\163\1\151\1\164\1\145"
+ u"\3\uffff\1\56\1\uffff\1\56\3\uffff\3\145\1\155\2\164\1\165\1\145"
+ u"\1\156\1\162\1\157\1\151\1\165\1\124\1\141\1\144\1\145\1\163\1"
+ u"\162\1\uffff\1\44\1\147\1\44\2\141\1\142\1\uffff\1\151\1\157\1"
+ u"\uffff\1\111\1\44\1\123\1\114\1\101\1\102\1\101\1\113\4\uffff\1"
+ u"\163\1\155\1\154\1\157\1\141\1\uffff\1\144\1\44\1\162\1\44\1\143"
+ u"\1\151\1\143\1\157\1\145\1\164\1\44\1\163\1\162\1\111\1\164\2\44"
+ u"\1\151\1\164\1\44\1\uffff\1\44\1\uffff\1\164\1\165\1\154\1\147"
+ u"\1\156\1\117\1\uffff\1\124\1\111\1\124\1\101\1\102\1\120\1\105"
+ u"\1\155\1\44\1\145\1\44\1\153\1\145\1\uffff\1\156\1\uffff\1\150"
+ u"\1\143\1\164\1\146\1\144\1\44\1\uffff\1\164\1\156\1\103\1\151\2"
+ u"\uffff\1\156\1\44\2\uffff\1\44\1\154\1\145\1\156\1\44\1\116\1\44"
+ u"\1\107\1\111\1\114\1\125\1\117\1\111\1\104\1\44\1\uffff\1\44\1"
+ u"\uffff\1\44\1\146\6\44\1\uffff\1\145\2\44\1\154\1\165\2\uffff\1"
+ u"\164\1\44\1\145\1\uffff\1\101\1\uffff\1\116\1\114\1\137\1\116\1"
+ u"\117\2\44\1\137\3\uffff\1\44\6\uffff\1\162\2\uffff\2\145\1\44\1"
+ u"\uffff\1\144\1\114\2\105\1\122\2\124\2\uffff\1\44\1\uffff\3\44"
+ u"\1\uffff\2\44\1\104\1\44\1\105\1\111\1\123\6\uffff\1\44\1\uffff"
+ u"\2\115\1\105\1\uffff\1\117\1\105\1\122\1\126\1\123\1\126\2\105"
+ u"\1\111\1\137\1\122\1\103\1\111\1\126\1\105\1\106\1\111\1\44\1\137"
+ u"\1\103\1\uffff\1\125\1\105\1\116\1\44\1\122\1\uffff\1\105\1\106"
+ u"\1\105\1\122\1\105\1\116\1\103\1\105\1\104\1\44\1\uffff"
)
DFA35_max = DFA.unpack(
u"\1\ufffe\1\uffff\1\171\1\uffff\1\75\1\170\1\167\1\165\1\145\1\124"
u"\2\157\1\156\3\157\1\156\3\uffff\1\116\1\125\1\117\1\116\1\117"
- u"\1\114\1\106\4\uffff\1\75\1\71\1\75\1\76\3\75\1\uffff\2\75\1\76"
- u"\1\75\1\174\1\uffff\1\141\1\150\1\157\1\162\1\47\1\uffff\2\ufffe"
- u"\1\170\1\146\2\uffff\1\ufffe\2\uffff\1\160\4\uffff\1\165\1\163"
- u"\1\164\1\162\1\151\1\172\1\157\2\164\1\101\1\154\1\156\1\163\1"
- u"\141\1\172\1\164\1\156\1\162\1\157\1\172\1\146\1\163\3\uffff\1"
- u"\172\2\124\1\116\1\101\1\114\1\117\1\111\35\uffff\1\75\1\uffff"
- u"\1\75\10\uffff\1\141\1\163\1\151\1\164\1\145\4\uffff\2\146\3\uffff"
- u"\1\145\1\155\2\145\1\165\2\164\1\156\1\145\1\162\1\157\1\151\1"
- u"\165\1\124\1\144\1\141\1\164\1\145\1\162\1\uffff\1\172\1\147\1"
- u"\172\1\141\1\142\1\uffff\1\141\1\151\1\157\1\uffff\1\172\1\111"
- u"\1\123\1\114\1\101\1\102\1\137\4\uffff\1\163\1\155\1\154\1\157"
- u"\1\141\1\uffff\1\144\2\172\1\162\1\143\1\151\1\143\1\145\1\157"
- u"\1\164\1\172\1\163\1\162\1\111\1\172\1\164\1\151\1\164\2\172\1"
- u"\uffff\1\172\1\uffff\1\164\1\154\1\165\1\147\1\156\1\uffff\1\117"
- u"\1\124\1\111\1\124\1\101\1\122\1\120\1\155\1\172\1\145\1\172\1"
- u"\153\1\145\2\uffff\1\156\1\164\1\143\1\150\1\144\1\146\1\172\1"
- u"\uffff\1\164\1\156\1\103\1\uffff\1\151\1\156\1\172\3\uffff\1\172"
- u"\1\145\1\154\1\156\1\172\1\116\1\172\1\107\1\111\1\114\1\117\1"
- u"\125\1\111\1\172\1\uffff\1\172\1\uffff\1\172\1\146\6\172\1\uffff"
- u"\1\145\2\172\1\154\1\165\2\uffff\1\172\1\164\1\145\1\uffff\1\101"
- u"\1\uffff\1\116\1\114\1\137\1\117\1\116\1\172\1\137\3\uffff\1\172"
- u"\6\uffff\1\162\2\uffff\2\145\1\uffff\1\172\1\144\1\114\2\105\1"
- u"\122\2\124\1\uffff\1\172\1\uffff\3\172\1\uffff\2\172\1\104\1\172"
- u"\1\105\1\123\1\111\6\uffff\1\172\1\uffff\1\115\1\105\1\115\1\uffff"
- u"\1\117\1\122\1\105\2\126\1\123\1\105\1\111\1\105\1\137\1\103\1"
- u"\122\1\111\1\105\1\126\1\106\1\172\1\111\1\137\1\uffff\1\103\1"
- u"\125\1\105\1\116\1\172\1\122\1\uffff\1\105\1\106\1\105\1\122\1"
- u"\105\1\116\1\103\1\105\1\104\1\172\1\uffff"
+ u"\1\114\1\106\1\101\4\uffff\1\75\1\71\1\75\1\76\3\75\1\uffff\2\75"
+ u"\1\76\1\75\1\174\1\uffff\1\141\1\150\1\157\1\162\1\47\1\uffff\2"
+ u"\ufffe\1\170\1\146\2\uffff\1\ufffe\2\uffff\1\160\4\uffff\1\163"
+ u"\1\164\1\165\1\151\1\162\1\172\1\157\2\164\1\101\1\154\1\163\1"
+ u"\156\1\141\1\172\1\164\1\156\1\162\1\157\1\146\1\172\1\163\3\uffff"
+ u"\1\172\2\124\1\116\1\101\1\114\1\117\1\111\1\103\34\uffff\1\75"
+ u"\2\uffff\1\75\10\uffff\1\141\1\163\1\151\1\164\1\145\3\uffff\1"
+ u"\146\1\uffff\1\146\3\uffff\3\145\1\155\2\164\1\165\1\145\1\156"
+ u"\1\162\1\157\1\151\1\165\1\124\1\141\1\144\1\145\1\164\1\162\1"
+ u"\uffff\1\172\1\147\1\172\2\141\1\142\1\uffff\1\151\1\157\1\uffff"
+ u"\1\111\1\172\1\123\1\114\1\101\1\102\1\137\1\113\4\uffff\1\163"
+ u"\1\155\1\154\1\157\1\141\1\uffff\1\144\1\172\1\162\1\172\1\143"
+ u"\1\151\1\143\1\157\1\145\1\164\1\172\1\163\1\162\1\111\1\164\2"
+ u"\172\1\151\1\164\1\172\1\uffff\1\172\1\uffff\1\164\1\165\1\154"
+ u"\1\147\1\156\1\117\1\uffff\1\124\1\111\1\124\1\101\1\122\1\120"
+ u"\1\105\1\155\1\172\1\145\1\172\1\153\1\145\1\uffff\1\156\1\uffff"
+ u"\1\150\1\143\1\164\1\146\1\144\1\172\1\uffff\1\164\1\156\1\103"
+ u"\1\151\2\uffff\1\156\1\172\2\uffff\1\172\1\154\1\145\1\156\1\172"
+ u"\1\116\1\172\1\107\1\111\1\114\1\125\1\117\1\111\1\104\1\172\1"
+ u"\uffff\1\172\1\uffff\1\172\1\146\6\172\1\uffff\1\145\2\172\1\154"
+ u"\1\165\2\uffff\1\164\1\172\1\145\1\uffff\1\101\1\uffff\1\116\1"
+ u"\114\1\137\1\116\1\117\2\172\1\137\3\uffff\1\172\6\uffff\1\162"
+ u"\2\uffff\2\145\1\172\1\uffff\1\144\1\114\2\105\1\122\2\124\2\uffff"
+ u"\1\172\1\uffff\3\172\1\uffff\2\172\1\104\1\172\1\105\1\111\1\123"
+ u"\6\uffff\1\172\1\uffff\2\115\1\105\1\uffff\1\117\1\105\1\122\1"
+ u"\126\1\123\1\126\2\105\1\111\1\137\1\122\1\103\1\111\1\126\1\105"
+ u"\1\106\1\111\1\172\1\137\1\103\1\uffff\1\125\1\105\1\116\1\172"
+ u"\1\122\1\uffff\1\105\1\106\1\105\1\122\1\105\1\116\1\103\1\105"
+ u"\1\104\1\172\1\uffff"
)
DFA35_accept = DFA.unpack(
- u"\1\uffff\1\1\1\uffff\1\3\15\uffff\1\23\1\24\1\27\7\uffff\1\45\1"
- u"\46\1\47\1\50\7\uffff\1\65\5\uffff\1\101\5\uffff\1\135\4\uffff"
- u"\1\144\1\145\1\uffff\1\146\1\1\1\uffff\1\135\1\3\1\106\1\4\26\uffff"
- u"\1\23\1\24\1\27\10\uffff\1\45\1\46\1\47\1\50\1\67\1\51\1\52\1\62"
- u"\1\143\1\57\1\72\1\53\1\63\1\73\1\60\1\54\1\70\1\150\1\147\1\55"
- u"\1\71\1\56\1\76\1\103\1\64\1\65\1\107\1\66\1\112\1\uffff\1\110"
- u"\1\uffff\1\113\1\111\1\77\1\105\1\100\1\102\1\104\1\101\5\uffff"
- u"\1\136\1\137\1\140\1\141\2\uffff\1\144\1\145\1\151\23\uffff\1\123"
- u"\5\uffff\1\127\3\uffff\1\33\7\uffff\1\74\1\114\1\75\1\115\5\uffff"
- u"\1\142\24\uffff\1\15\1\uffff\1\130\5\uffff\1\34\15\uffff\1\30\1"
- u"\124\7\uffff\1\7\3\uffff\1\12\3\uffff\1\121\1\13\1\16\16\uffff"
- u"\1\117\1\uffff\1\131\10\uffff\1\14\5\uffff\1\31\1\17\3\uffff\1"
- u"\26\1\uffff\1\36\7\uffff\1\120\1\126\1\133\1\uffff\1\5\1\25\1\6"
- u"\1\125\1\21\1\61\1\uffff\1\134\1\11\2\uffff\1\20\10\uffff\1\42"
- u"\1\uffff\1\2\3\uffff\1\122\7\uffff\1\116\1\10\1\32\1\132\1\22\1"
- u"\35\1\uffff\1\40\3\uffff\1\37\23\uffff\1\43\6\uffff\1\44\12\uffff"
- u"\1\41"
+ u"\1\uffff\1\1\1\uffff\1\3\15\uffff\1\23\1\24\1\27\10\uffff\1\46"
+ u"\1\47\1\50\1\51\7\uffff\1\66\5\uffff\1\102\5\uffff\1\136\4\uffff"
+ u"\1\145\1\146\1\uffff\1\147\1\1\1\uffff\1\136\1\3\1\107\1\4\26\uffff"
+ u"\1\23\1\24\1\27\11\uffff\1\46\1\47\1\50\1\51\1\70\1\52\1\53\1\63"
+ u"\1\144\1\73\1\60\1\54\1\74\1\64\1\61\1\55\1\150\1\151\1\71\1\56"
+ u"\1\72\1\57\1\77\1\104\1\65\1\66\1\110\1\67\1\uffff\1\113\1\111"
+ u"\1\uffff\1\114\1\112\1\100\1\106\1\103\1\101\1\105\1\102\5\uffff"
+ u"\1\140\1\137\1\141\1\uffff\1\142\1\uffff\1\145\1\146\1\152\23\uffff"
+ u"\1\124\6\uffff\1\130\2\uffff\1\33\10\uffff\1\75\1\115\1\76\1\116"
+ u"\5\uffff\1\143\24\uffff\1\15\1\uffff\1\131\6\uffff\1\34\15\uffff"
+ u"\1\125\1\uffff\1\30\6\uffff\1\7\4\uffff\1\12\1\122\2\uffff\1\13"
+ u"\1\16\17\uffff\1\120\1\uffff\1\132\10\uffff\1\14\5\uffff\1\31\1"
+ u"\17\3\uffff\1\26\1\uffff\1\36\10\uffff\1\121\1\127\1\134\1\uffff"
+ u"\1\5\1\126\1\6\1\25\1\62\1\21\1\uffff\1\135\1\11\3\uffff\1\20\7"
+ u"\uffff\1\42\1\45\1\uffff\1\2\3\uffff\1\123\7\uffff\1\117\1\10\1"
+ u"\32\1\133\1\22\1\35\1\uffff\1\40\3\uffff\1\37\24\uffff\1\43\5\uffff"
+ u"\1\44\12\uffff\1\41"
)
DFA35_special = DFA.unpack(
- u"\u018b\uffff"
+ u"\u0192\uffff"
)
DFA35_transition = [
- DFA.unpack(u"\6\72\2\67\1\72\2\67\22\72\1\67\1\47\1\64\1\71\1\62"
- u"\1\44\1\45\1\63\1\33\1\34\1\37\1\41\1\3\1\42\1\40\1\43\1\65\11"
- u"\66\1\23\1\1\1\50\1\4\1\51\1\54\1\72\2\62\1\26\1\62\1\32\1\62\1"
- u"\31\1\62\1\24\2\62\1\61\2\62\1\25\3\62\1\11\1\62\1\27\1\30\4\62"
- u"\1\35\1\70\1\36\1\52\1\55\1\72\1\7\1\60\1\13\1\17\1\5\1\16\1\57"
- u"\1\62\1\14\2\62\1\15\5\62\1\10\1\6\1\2\1\20\1\12\1\56\3\62\1\21"
- u"\1\53\1\22\1\46\uff80\72"),
+ DFA.unpack(u"\6\73\2\70\1\73\2\70\22\73\1\70\1\50\1\65\1\72\1\63"
+ u"\1\45\1\46\1\64\1\34\1\35\1\40\1\42\1\3\1\43\1\41\1\44\1\66\11"
+ u"\67\1\23\1\1\1\51\1\4\1\52\1\55\1\73\2\63\1\26\1\63\1\32\1\63\1"
+ u"\31\1\63\1\24\2\63\1\62\2\63\1\25\1\33\2\63\1\11\1\63\1\27\1\30"
+ u"\4\63\1\36\1\71\1\37\1\53\1\56\1\73\1\7\1\61\1\13\1\17\1\5\1\16"
+ u"\1\60\1\63\1\14\2\63\1\15\5\63\1\10\1\6\1\2\1\20\1\12\1\57\3\63"
+ u"\1\21\1\54\1\22\1\47\uff80\73"),
DFA.unpack(u""),
- DFA.unpack(u"\1\74"),
+ DFA.unpack(u"\1\75"),
DFA.unpack(u""),
- DFA.unpack(u"\1\77"),
- DFA.unpack(u"\1\102\1\uffff\1\101\11\uffff\1\103"),
- DFA.unpack(u"\1\107\1\106\12\uffff\1\104\2\uffff\1\105"),
- DFA.unpack(u"\1\110"),
+ DFA.unpack(u"\1\100"),
+ DFA.unpack(u"\1\102\1\uffff\1\104\11\uffff\1\103"),
+ DFA.unpack(u"\1\110\1\107\12\uffff\1\106\2\uffff\1\105"),
DFA.unpack(u"\1\111"),
DFA.unpack(u"\1\112"),
DFA.unpack(u"\1\113"),
- DFA.unpack(u"\1\115\6\uffff\1\116\6\uffff\1\114"),
- DFA.unpack(u"\1\117\7\uffff\1\120"),
- DFA.unpack(u"\1\121"),
- DFA.unpack(u"\1\123\2\uffff\1\122"),
- DFA.unpack(u"\1\125\11\uffff\1\124"),
- DFA.unpack(u"\1\126"),
+ DFA.unpack(u"\1\114"),
+ DFA.unpack(u"\1\115\6\uffff\1\117\6\uffff\1\116"),
+ DFA.unpack(u"\1\120\7\uffff\1\121"),
+ DFA.unpack(u"\1\122"),
+ DFA.unpack(u"\1\124\2\uffff\1\123"),
+ DFA.unpack(u"\1\125\11\uffff\1\126"),
+ DFA.unpack(u"\1\127"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\132"),
- DFA.unpack(u"\1\134\4\uffff\1\133"),
- DFA.unpack(u"\1\135"),
+ DFA.unpack(u"\1\133"),
+ DFA.unpack(u"\1\134\4\uffff\1\135"),
DFA.unpack(u"\1\136"),
DFA.unpack(u"\1\137"),
DFA.unpack(u"\1\140"),
DFA.unpack(u"\1\141"),
+ DFA.unpack(u"\1\142"),
+ DFA.unpack(u"\1\143"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\146"),
- DFA.unpack(u"\1\150\1\uffff\12\152"),
- DFA.unpack(u"\1\153\21\uffff\1\154"),
- DFA.unpack(u"\1\160\17\uffff\1\157\1\156"),
- DFA.unpack(u"\1\164\4\uffff\1\163\15\uffff\1\162"),
- DFA.unpack(u"\1\166"),
- DFA.unpack(u"\1\171\26\uffff\1\170"),
+ DFA.unpack(u"\1\150"),
+ DFA.unpack(u"\1\152\1\uffff\12\154"),
+ DFA.unpack(u"\1\156\21\uffff\1\155"),
+ DFA.unpack(u"\1\162\17\uffff\1\160\1\161"),
+ DFA.unpack(u"\1\164\4\uffff\1\165\15\uffff\1\166"),
+ DFA.unpack(u"\1\170"),
+ DFA.unpack(u"\1\173\26\uffff\1\172"),
DFA.unpack(u""),
- DFA.unpack(u"\1\174"),
- DFA.unpack(u"\1\177\1\176"),
- DFA.unpack(u"\1\u0082\1\u0081"),
- DFA.unpack(u"\1\u0084"),
- DFA.unpack(u"\1\u0086\76\uffff\1\u0087"),
+ DFA.unpack(u"\1\176"),
+ DFA.unpack(u"\1\u0080\1\u0081"),
+ DFA.unpack(u"\1\u0084\1\u0083"),
+ DFA.unpack(u"\1\u0086"),
+ DFA.unpack(u"\1\u0089\76\uffff\1\u0088"),
DFA.unpack(u""),
- DFA.unpack(u"\1\u008a\1\uffff\1\u008b"),
- DFA.unpack(u"\1\u008c"),
- DFA.unpack(u"\1\u008d"),
+ DFA.unpack(u"\1\u008c\1\uffff\1\u008d"),
DFA.unpack(u"\1\u008e"),
- DFA.unpack(u"\1\u0090\4\uffff\1\u008f"),
+ DFA.unpack(u"\1\u008f"),
+ DFA.unpack(u"\1\u0090"),
+ DFA.unpack(u"\1\u0091\4\uffff\1\u0092"),
DFA.unpack(u""),
- DFA.unpack(u"\47\u008f\1\uffff\uffd7\u008f"),
- DFA.unpack(u"\uffff\u0090"),
- DFA.unpack(u"\1\152\1\uffff\10\u0093\2\152\12\uffff\3\152\21\uffff"
- u"\1\u0091\13\uffff\3\152\21\uffff\1\u0091"),
- DFA.unpack(u"\1\152\1\uffff\12\u0094\12\uffff\3\152\35\uffff\3\152"),
+ DFA.unpack(u"\47\u0092\1\uffff\uffd7\u0092"),
+ DFA.unpack(u"\uffff\u0091"),
+ DFA.unpack(u"\1\154\1\uffff\10\u0094\2\154\12\uffff\3\154\21\uffff"
+ u"\1\u0093\13\uffff\3\154\21\uffff\1\u0093"),
+ DFA.unpack(u"\1\154\1\uffff\12\u0096\12\uffff\3\154\35\uffff\3\154"),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\uffff\u0097"),
+ DFA.unpack(u"\uffff\u0099"),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\u0098"),
+ DFA.unpack(u"\1\u009a"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\u0099"),
- DFA.unpack(u"\1\u009a"),
DFA.unpack(u"\1\u009b"),
- DFA.unpack(u"\1\u009d\20\uffff\1\u009c"),
+ DFA.unpack(u"\1\u009c"),
+ DFA.unpack(u"\1\u009d"),
DFA.unpack(u"\1\u009e"),
- DFA.unpack(u"\1\u009f\22\uffff\1\u00a0"),
- DFA.unpack(u"\1\u00a1"),
- DFA.unpack(u"\1\u00a2"),
- DFA.unpack(u"\1\u00a3\14\uffff\1\u00a4"),
- DFA.unpack(u"\1\u00a5"),
- DFA.unpack(u"\1\u00a6\2\uffff\1\u00a7"),
- DFA.unpack(u"\1\u00a8"),
- DFA.unpack(u"\1\u00a9"),
+ DFA.unpack(u"\1\u009f\20\uffff\1\u00a0"),
+ DFA.unpack(u"\1\u00a2\22\uffff\1\u00a1"),
+ DFA.unpack(u"\1\u00a3"),
+ DFA.unpack(u"\1\u00a4"),
+ DFA.unpack(u"\1\u00a5\14\uffff\1\u00a6"),
+ DFA.unpack(u"\1\u00a7"),
+ DFA.unpack(u"\1\u00a9\2\uffff\1\u00a8"),
DFA.unpack(u"\1\u00aa"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u00ab"),
DFA.unpack(u"\1\u00ac"),
- DFA.unpack(u"\1\u00ad"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u00ae"),
DFA.unpack(u"\1\u00af"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\24\75\1\u00b0\5\75"),
+ DFA.unpack(u"\1\u00b0"),
+ DFA.unpack(u"\1\u00b1"),
DFA.unpack(u"\1\u00b2"),
- DFA.unpack(u"\1\u00b4\11\uffff\1\u00b3"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\24\76\1\u00b3\5\76"),
+ DFA.unpack(u"\1\u00b6\11\uffff\1\u00b5"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u00b6"),
- DFA.unpack(u"\1\u00b7"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u00b8"),
DFA.unpack(u"\1\u00b9"),
DFA.unpack(u"\1\u00ba"),
DFA.unpack(u"\1\u00bb"),
DFA.unpack(u"\1\u00bc"),
+ DFA.unpack(u"\1\u00bd"),
+ DFA.unpack(u"\1\u00be"),
+ DFA.unpack(u"\1\u00bf"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
@@ -4565,10 +4619,10 @@ class CLexer(Lexer):
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
+ DFA.unpack(u"\1\u00c0"),
DFA.unpack(u""),
- DFA.unpack(u"\1\u00bd"),
DFA.unpack(u""),
- DFA.unpack(u"\1\u00bf"),
+ DFA.unpack(u"\1\u00c2"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
@@ -4577,24 +4631,21 @@ class CLexer(Lexer):
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\u00c1"),
- DFA.unpack(u"\1\u00c2"),
- DFA.unpack(u"\1\u00c3"),
DFA.unpack(u"\1\u00c4"),
DFA.unpack(u"\1\u00c5"),
+ DFA.unpack(u"\1\u00c6"),
+ DFA.unpack(u"\1\u00c7"),
+ DFA.unpack(u"\1\u00c8"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
+ DFA.unpack(u"\1\154\1\uffff\10\u0094\2\154\12\uffff\3\154\35\uffff"
+ u"\3\154"),
DFA.unpack(u""),
- DFA.unpack(u"\1\152\1\uffff\10\u0093\2\152\12\uffff\3\152\35\uffff"
- u"\3\152"),
- DFA.unpack(u"\1\152\1\uffff\12\u0094\12\uffff\3\152\35\uffff\3\152"),
+ DFA.unpack(u"\1\154\1\uffff\12\u0096\12\uffff\3\154\35\uffff\3\154"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\u00c7"),
- DFA.unpack(u"\1\u00c8"),
- DFA.unpack(u"\1\u00c9"),
DFA.unpack(u"\1\u00ca"),
DFA.unpack(u"\1\u00cb"),
DFA.unpack(u"\1\u00cc"),
@@ -4608,242 +4659,244 @@ class CLexer(Lexer):
DFA.unpack(u"\1\u00d4"),
DFA.unpack(u"\1\u00d5"),
DFA.unpack(u"\1\u00d6"),
- DFA.unpack(u"\1\u00d8\1\u00d7"),
+ DFA.unpack(u"\1\u00d7"),
+ DFA.unpack(u"\1\u00d8"),
DFA.unpack(u"\1\u00d9"),
DFA.unpack(u"\1\u00da"),
+ DFA.unpack(u"\1\u00dc\1\u00db"),
+ DFA.unpack(u"\1\u00dd"),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u00dc"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u00de"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u00df"),
- DFA.unpack(u""),
- DFA.unpack(u"\1\u00e0"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u00e1"),
DFA.unpack(u"\1\u00e2"),
+ DFA.unpack(u"\1\u00e3"),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
DFA.unpack(u"\1\u00e4"),
DFA.unpack(u"\1\u00e5"),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u00e6"),
- DFA.unpack(u"\1\u00e7"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u00e8"),
- DFA.unpack(u"\1\u00ea\35\uffff\1\u00e9"),
+ DFA.unpack(u"\1\u00e9"),
+ DFA.unpack(u"\1\u00ea"),
+ DFA.unpack(u"\1\u00eb"),
+ DFA.unpack(u"\1\u00ed\35\uffff\1\u00ec"),
+ DFA.unpack(u"\1\u00ee"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\u00eb"),
- DFA.unpack(u"\1\u00ec"),
- DFA.unpack(u"\1\u00ed"),
- DFA.unpack(u"\1\u00ee"),
DFA.unpack(u"\1\u00ef"),
- DFA.unpack(u""),
DFA.unpack(u"\1\u00f0"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u00f1"),
+ DFA.unpack(u"\1\u00f2"),
DFA.unpack(u"\1\u00f3"),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u00f4"),
- DFA.unpack(u"\1\u00f5"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u00f6"),
- DFA.unpack(u"\1\u00f7"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u00f8"),
DFA.unpack(u"\1\u00f9"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u00fa"),
DFA.unpack(u"\1\u00fb"),
DFA.unpack(u"\1\u00fc"),
DFA.unpack(u"\1\u00fd"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u00ff"),
DFA.unpack(u"\1\u0100"),
DFA.unpack(u"\1\u0101"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u""),
+ DFA.unpack(u"\1\u0102"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u0105"),
DFA.unpack(u"\1\u0106"),
- DFA.unpack(u"\1\u0107"),
- DFA.unpack(u"\1\u0108"),
- DFA.unpack(u"\1\u0109"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u""),
+ DFA.unpack(u"\1\u0109"),
DFA.unpack(u"\1\u010a"),
DFA.unpack(u"\1\u010b"),
DFA.unpack(u"\1\u010c"),
DFA.unpack(u"\1\u010d"),
DFA.unpack(u"\1\u010e"),
- DFA.unpack(u"\1\u010f\17\uffff\1\u0110"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u010f"),
+ DFA.unpack(u"\1\u0110"),
DFA.unpack(u"\1\u0111"),
DFA.unpack(u"\1\u0112"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u0114"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u0114\17\uffff\1\u0113"),
+ DFA.unpack(u"\1\u0115"),
DFA.unpack(u"\1\u0116"),
DFA.unpack(u"\1\u0117"),
- DFA.unpack(u""),
- DFA.unpack(u""),
- DFA.unpack(u"\1\u0118"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u0119"),
- DFA.unpack(u"\1\u011a"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u011b"),
DFA.unpack(u"\1\u011c"),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u011d"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
DFA.unpack(u""),
+ DFA.unpack(u"\1\u011e"),
DFA.unpack(u"\1\u011f"),
DFA.unpack(u"\1\u0120"),
DFA.unpack(u"\1\u0121"),
- DFA.unpack(u""),
DFA.unpack(u"\1\u0122"),
- DFA.unpack(u"\1\u0123"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u""),
- DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u0124"),
+ DFA.unpack(u"\1\u0125"),
DFA.unpack(u"\1\u0126"),
DFA.unpack(u"\1\u0127"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u0128"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u012a"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u012b"),
DFA.unpack(u"\1\u012c"),
DFA.unpack(u"\1\u012d"),
- DFA.unpack(u"\1\u012e"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u012f"),
- DFA.unpack(u"\1\u0130"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u0131"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\u0132\1"
- u"\uffff\32\75"),
- DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u0132"),
+ DFA.unpack(u"\1\u0133"),
+ DFA.unpack(u"\1\u0134"),
+ DFA.unpack(u"\1\u0135"),
DFA.unpack(u"\1\u0136"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u0137"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\u0138\1"
+ u"\uffff\32\76"),
DFA.unpack(u""),
- DFA.unpack(u"\1\u013d"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u0140"),
- DFA.unpack(u"\1\u0141"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u013c"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
DFA.unpack(u"\1\u0143"),
- DFA.unpack(u"\1\u0144"),
- DFA.unpack(u""),
- DFA.unpack(u"\1\u0145"),
- DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u0146"),
DFA.unpack(u"\1\u0147"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u0148"),
- DFA.unpack(u"\1\u0149"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u014a"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u014c"),
- DFA.unpack(u""),
DFA.unpack(u""),
+ DFA.unpack(u"\1\u014b"),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u014c"),
+ DFA.unpack(u"\1\u014d"),
+ DFA.unpack(u"\1\u014e"),
+ DFA.unpack(u"\1\u014f"),
+ DFA.unpack(u"\1\u0150"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0153"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\u014e"),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\u014f"),
- DFA.unpack(u"\1\u0150"),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u0152"),
- DFA.unpack(u"\1\u0153"),
- DFA.unpack(u"\1\u0154"),
DFA.unpack(u"\1\u0155"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u0156"),
DFA.unpack(u"\1\u0157"),
- DFA.unpack(u"\1\u0158"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u0159"),
+ DFA.unpack(u"\1\u015a"),
+ DFA.unpack(u"\1\u015b"),
+ DFA.unpack(u"\1\u015c"),
+ DFA.unpack(u"\1\u015d"),
+ DFA.unpack(u"\1\u015e"),
+ DFA.unpack(u"\1\u015f"),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u015f"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u0161"),
- DFA.unpack(u"\1\u0162"),
- DFA.unpack(u"\1\u0163"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0166"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0168"),
+ DFA.unpack(u"\1\u0169"),
+ DFA.unpack(u"\1\u016a"),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
DFA.unpack(u""),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
DFA.unpack(u""),
- DFA.unpack(u"\1\u0165"),
- DFA.unpack(u"\1\u0166"),
- DFA.unpack(u"\1\u0167"),
DFA.unpack(u""),
- DFA.unpack(u"\1\u0168"),
- DFA.unpack(u"\1\u0169"),
- DFA.unpack(u"\1\u016a"),
- DFA.unpack(u"\1\u016b"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u016c"),
DFA.unpack(u"\1\u016d"),
DFA.unpack(u"\1\u016e"),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u016f"),
DFA.unpack(u"\1\u0170"),
DFA.unpack(u"\1\u0171"),
@@ -4853,30 +4906,37 @@ class CLexer(Lexer):
DFA.unpack(u"\1\u0175"),
DFA.unpack(u"\1\u0176"),
DFA.unpack(u"\1\u0177"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u0178"),
DFA.unpack(u"\1\u0179"),
DFA.unpack(u"\1\u017a"),
- DFA.unpack(u""),
DFA.unpack(u"\1\u017b"),
DFA.unpack(u"\1\u017c"),
DFA.unpack(u"\1\u017d"),
DFA.unpack(u"\1\u017e"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
- DFA.unpack(u"\1\u0180"),
- DFA.unpack(u""),
+ DFA.unpack(u"\1\u017f"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u0181"),
DFA.unpack(u"\1\u0182"),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u0183"),
DFA.unpack(u"\1\u0184"),
DFA.unpack(u"\1\u0185"),
- DFA.unpack(u"\1\u0186"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"\1\u0187"),
+ DFA.unpack(u""),
DFA.unpack(u"\1\u0188"),
DFA.unpack(u"\1\u0189"),
- DFA.unpack(u"\1\75\13\uffff\12\75\7\uffff\32\75\4\uffff\1\75\1\uffff"
- u"\32\75"),
+ DFA.unpack(u"\1\u018a"),
+ DFA.unpack(u"\1\u018b"),
+ DFA.unpack(u"\1\u018c"),
+ DFA.unpack(u"\1\u018d"),
+ DFA.unpack(u"\1\u018e"),
+ DFA.unpack(u"\1\u018f"),
+ DFA.unpack(u"\1\u0190"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
DFA.unpack(u"")
]
diff --git a/BaseTools/Source/Python/Ecc/CParser.py b/BaseTools/Source/Python/Ecc/CParser.py
index 194a6aa451..e56a79a43d 100644
--- a/BaseTools/Source/Python/Ecc/CParser.py
+++ b/BaseTools/Source/Python/Ecc/CParser.py
@@ -1,8 +1,27 @@
-# $ANTLR 3.0.1 C.g 2009-02-16 16:02:50
+# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53
from antlr3 import *
from antlr3.compat import set, frozenset
+## @file
+# The file defines the parser for C source files.
+#
+# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.
+# This file is generated by running:
+# java org.antlr.Tool C.g
+#
+# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+#
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at:
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
import CodeFragment
import FileProfile
@@ -12,28 +31,28 @@ import FileProfile
HIDDEN = BaseRecognizer.HIDDEN
# token types
-CHARACTER_LITERAL=8
+BS=20
+LINE_COMMENT=23
+FloatTypeSuffix=16
+IntegerTypeSuffix=14
LETTER=11
+OCTAL_LITERAL=6
+CHARACTER_LITERAL=8
Exponent=15
-DECIMAL_LITERAL=7
-IntegerTypeSuffix=14
-UnicodeVocabulary=21
+EOF=-1
HexDigit=13
-BS=20
+STRING_LITERAL=9
WS=19
-LINE_COMMAND=24
-COMMENT=22
-LINE_COMMENT=23
-OCTAL_LITERAL=6
-HEX_LITERAL=5
FLOATING_POINT_LITERAL=10
+IDENTIFIER=4
UnicodeEscape=18
+LINE_COMMAND=24
+UnicodeVocabulary=21
+HEX_LITERAL=5
+COMMENT=22
+DECIMAL_LITERAL=7
EscapeSequence=12
-EOF=-1
-STRING_LITERAL=9
OctalEscape=17
-IDENTIFIER=4
-FloatTypeSuffix=16
# token names
tokenNames = [
@@ -47,14 +66,14 @@ tokenNames = [
"'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'",
"'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'",
"'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'",
- "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'('", "')'",
- "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'", "'++'", "'--'",
- "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='", "'/='", "'%='",
- "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='", "'?'", "'||'",
- "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='", "'>='",
- "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'", "'default'",
- "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'", "'goto'",
- "'continue'", "'break'", "'return'"
+ "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'",
+ "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'",
+ "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='",
+ "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='",
+ "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='",
+ "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'",
+ "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'",
+ "'goto'", "'continue'", "'break'", "'return'"
]
@@ -124,7 +143,7 @@ class CParser(Parser):
# $ANTLR start translation_unit
- # C.g:50:1: translation_unit : ( external_declaration )* ;
+ # C.g:102:1: translation_unit : ( external_declaration )* ;
def translation_unit(self, ):
translation_unit_StartIndex = self.input.index()
@@ -133,20 +152,20 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 1):
return
- # C.g:51:2: ( ( external_declaration )* )
- # C.g:51:4: ( external_declaration )*
- # C.g:51:4: ( external_declaration )*
+ # C.g:103:2: ( ( external_declaration )* )
+ # C.g:103:4: ( external_declaration )*
+ # C.g:103:4: ( external_declaration )*
while True: #loop1
alt1 = 2
LA1_0 = self.input.LA(1)
- if (LA1_0 == IDENTIFIER or LA1_0 == 26 or (29 <= LA1_0 <= 42) or (45 <= LA1_0 <= 46) or (48 <= LA1_0 <= 61) or LA1_0 == 65) :
+ if (LA1_0 == IDENTIFIER or LA1_0 == 26 or (29 <= LA1_0 <= 42) or (45 <= LA1_0 <= 46) or (48 <= LA1_0 <= 62) or LA1_0 == 66) :
alt1 = 1
if alt1 == 1:
# C.g:0:0: external_declaration
- self.following.append(self.FOLLOW_external_declaration_in_translation_unit64)
+ self.following.append(self.FOLLOW_external_declaration_in_translation_unit74)
self.external_declaration()
self.following.pop()
if self.failed:
@@ -176,7 +195,7 @@ class CParser(Parser):
# $ANTLR start external_declaration
- # C.g:62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );
+ # C.g:114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );
def external_declaration(self, ):
external_declaration_StartIndex = self.input.index()
@@ -185,7 +204,7 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 2):
return
- # C.g:67:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? )
+ # C.g:119:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? )
alt3 = 3
LA3_0 = self.input.LA(1)
@@ -201,7 +220,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 1, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 1, self.input)
raise nvae
@@ -217,7 +236,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 2, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 2, self.input)
raise nvae
@@ -233,7 +252,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 3, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 3, self.input)
raise nvae
@@ -249,7 +268,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 4, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 4, self.input)
raise nvae
@@ -265,7 +284,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 5, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 5, self.input)
raise nvae
@@ -281,7 +300,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 6, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 6, self.input)
raise nvae
@@ -297,7 +316,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 7, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 7, self.input)
raise nvae
@@ -313,7 +332,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 8, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 8, self.input)
raise nvae
@@ -329,7 +348,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 9, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 9, self.input)
raise nvae
@@ -345,7 +364,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 10, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 10, self.input)
raise nvae
@@ -361,7 +380,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 11, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 11, self.input)
raise nvae
@@ -377,7 +396,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 12, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 12, self.input)
raise nvae
@@ -395,7 +414,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 13, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 13, self.input)
raise nvae
@@ -411,11 +430,11 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 14, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 14, self.input)
raise nvae
- elif (LA3_0 == 65) and (self.synpred4()):
+ elif (LA3_0 == 66) and (self.synpred4()):
alt3 = 1
elif (LA3_0 == 59) :
LA3_16 = self.input.LA(2)
@@ -429,7 +448,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 16, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 16, self.input)
raise nvae
@@ -445,11 +464,11 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 17, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 17, self.input)
raise nvae
- elif ((49 <= LA3_0 <= 57)) :
+ elif ((49 <= LA3_0 <= 57) or LA3_0 == 61) :
LA3_18 = self.input.LA(2)
if (self.synpred4()) :
@@ -461,11 +480,11 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 18, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 18, self.input)
raise nvae
- elif (LA3_0 == 61) and (self.synpred4()):
+ elif (LA3_0 == 62) and (self.synpred4()):
alt3 = 1
elif (LA3_0 == 26) :
alt3 = 2
@@ -474,13 +493,13 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("62:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 0, self.input)
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 0, self.input)
raise nvae
if alt3 == 1:
- # C.g:67:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition
- self.following.append(self.FOLLOW_function_definition_in_external_declaration103)
+ # C.g:119:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition
+ self.following.append(self.FOLLOW_function_definition_in_external_declaration113)
self.function_definition()
self.following.pop()
if self.failed:
@@ -488,8 +507,8 @@ class CParser(Parser):
elif alt3 == 2:
- # C.g:68:4: declaration
- self.following.append(self.FOLLOW_declaration_in_external_declaration108)
+ # C.g:120:4: declaration
+ self.following.append(self.FOLLOW_declaration_in_external_declaration118)
self.declaration()
self.following.pop()
if self.failed:
@@ -497,21 +516,21 @@ class CParser(Parser):
elif alt3 == 3:
- # C.g:69:4: macro_statement ( ';' )?
- self.following.append(self.FOLLOW_macro_statement_in_external_declaration113)
+ # C.g:121:4: macro_statement ( ';' )?
+ self.following.append(self.FOLLOW_macro_statement_in_external_declaration123)
self.macro_statement()
self.following.pop()
if self.failed:
return
- # C.g:69:20: ( ';' )?
+ # C.g:121:20: ( ';' )?
alt2 = 2
LA2_0 = self.input.LA(1)
if (LA2_0 == 25) :
alt2 = 1
if alt2 == 1:
- # C.g:69:21: ';'
- self.match(self.input, 25, self.FOLLOW_25_in_external_declaration116)
+ # C.g:121:21: ';'
+ self.match(self.input, 25, self.FOLLOW_25_in_external_declaration126)
if self.failed:
return
@@ -541,7 +560,7 @@ class CParser(Parser):
# $ANTLR start function_definition
- # C.g:74:1: function_definition : (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement ) ;
+ # C.g:126:1: function_definition : (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement ) ;
def function_definition(self, ):
self.function_definition_stack.append(function_definition_scope())
retval = self.function_definition_return()
@@ -569,16 +588,16 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 3):
return retval
- # C.g:94:2: ( (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement ) )
- # C.g:94:4: (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement )
- # C.g:94:5: (d= declaration_specifiers )?
+ # C.g:146:2: ( (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement ) )
+ # C.g:146:4: (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement )
+ # C.g:146:5: (d= declaration_specifiers )?
alt4 = 2
LA4 = self.input.LA(1)
- if LA4 == 29 or LA4 == 30 or LA4 == 31 or LA4 == 32 or LA4 == 33 or LA4 == 34 or LA4 == 35 or LA4 == 36 or LA4 == 37 or LA4 == 38 or LA4 == 39 or LA4 == 40 or LA4 == 41 or LA4 == 42 or LA4 == 45 or LA4 == 46 or LA4 == 48 or LA4 == 49 or LA4 == 50 or LA4 == 51 or LA4 == 52 or LA4 == 53 or LA4 == 54 or LA4 == 55 or LA4 == 56 or LA4 == 57:
+ if LA4 == 29 or LA4 == 30 or LA4 == 31 or LA4 == 32 or LA4 == 33 or LA4 == 34 or LA4 == 35 or LA4 == 36 or LA4 == 37 or LA4 == 38 or LA4 == 39 or LA4 == 40 or LA4 == 41 or LA4 == 42 or LA4 == 45 or LA4 == 46 or LA4 == 48 or LA4 == 49 or LA4 == 50 or LA4 == 51 or LA4 == 52 or LA4 == 53 or LA4 == 54 or LA4 == 55 or LA4 == 56 or LA4 == 57 or LA4 == 61:
alt4 = 1
elif LA4 == IDENTIFIER:
LA4 = self.input.LA(2)
- if LA4 == 65:
+ if LA4 == 66:
alt4 = 1
elif LA4 == 58:
LA4_21 = self.input.LA(3)
@@ -600,7 +619,7 @@ class CParser(Parser):
if (self.synpred7()) :
alt4 = 1
- elif LA4 == 61:
+ elif LA4 == 62:
LA4_25 = self.input.LA(3)
if (self.synpred7()) :
@@ -665,7 +684,7 @@ class CParser(Parser):
if (self.synpred7()) :
alt4 = 1
- elif LA4 == 49 or LA4 == 50 or LA4 == 51 or LA4 == 52 or LA4 == 53 or LA4 == 54 or LA4 == 55 or LA4 == 56 or LA4 == 57:
+ elif LA4 == 49 or LA4 == 50 or LA4 == 51 or LA4 == 52 or LA4 == 53 or LA4 == 54 or LA4 == 55 or LA4 == 56 or LA4 == 57 or LA4 == 61:
LA4_38 = self.input.LA(3)
if (self.synpred7()) :
@@ -687,7 +706,7 @@ class CParser(Parser):
alt4 = 1
if alt4 == 1:
# C.g:0:0: d= declaration_specifiers
- self.following.append(self.FOLLOW_declaration_specifiers_in_function_definition147)
+ self.following.append(self.FOLLOW_declaration_specifiers_in_function_definition157)
d = self.declaration_specifiers()
self.following.pop()
if self.failed:
@@ -695,16 +714,16 @@ class CParser(Parser):
- self.following.append(self.FOLLOW_declarator_in_function_definition150)
+ self.following.append(self.FOLLOW_declarator_in_function_definition160)
declarator1 = self.declarator()
self.following.pop()
if self.failed:
return retval
- # C.g:95:3: ( ( declaration )+ a= compound_statement | b= compound_statement )
+ # C.g:147:3: ( ( declaration )+ a= compound_statement | b= compound_statement )
alt6 = 2
LA6_0 = self.input.LA(1)
- if (LA6_0 == IDENTIFIER or LA6_0 == 26 or (29 <= LA6_0 <= 42) or (45 <= LA6_0 <= 46) or (48 <= LA6_0 <= 60)) :
+ if (LA6_0 == IDENTIFIER or LA6_0 == 26 or (29 <= LA6_0 <= 42) or (45 <= LA6_0 <= 46) or (48 <= LA6_0 <= 61)) :
alt6 = 1
elif (LA6_0 == 43) :
alt6 = 2
@@ -713,25 +732,25 @@ class CParser(Parser):
self.failed = True
return retval
- nvae = NoViableAltException("95:3: ( ( declaration )+ a= compound_statement | b= compound_statement )", 6, 0, self.input)
+ nvae = NoViableAltException("147:3: ( ( declaration )+ a= compound_statement | b= compound_statement )", 6, 0, self.input)
raise nvae
if alt6 == 1:
- # C.g:95:5: ( declaration )+ a= compound_statement
- # C.g:95:5: ( declaration )+
+ # C.g:147:5: ( declaration )+ a= compound_statement
+ # C.g:147:5: ( declaration )+
cnt5 = 0
while True: #loop5
alt5 = 2
LA5_0 = self.input.LA(1)
- if (LA5_0 == IDENTIFIER or LA5_0 == 26 or (29 <= LA5_0 <= 42) or (45 <= LA5_0 <= 46) or (48 <= LA5_0 <= 60)) :
+ if (LA5_0 == IDENTIFIER or LA5_0 == 26 or (29 <= LA5_0 <= 42) or (45 <= LA5_0 <= 46) or (48 <= LA5_0 <= 61)) :
alt5 = 1
if alt5 == 1:
# C.g:0:0: declaration
- self.following.append(self.FOLLOW_declaration_in_function_definition156)
+ self.following.append(self.FOLLOW_declaration_in_function_definition166)
self.declaration()
self.following.pop()
if self.failed:
@@ -752,7 +771,7 @@ class CParser(Parser):
cnt5 += 1
- self.following.append(self.FOLLOW_compound_statement_in_function_definition161)
+ self.following.append(self.FOLLOW_compound_statement_in_function_definition171)
a = self.compound_statement()
self.following.pop()
if self.failed:
@@ -760,8 +779,8 @@ class CParser(Parser):
elif alt6 == 2:
- # C.g:96:5: b= compound_statement
- self.following.append(self.FOLLOW_compound_statement_in_function_definition170)
+ # C.g:148:5: b= compound_statement
+ self.following.append(self.FOLLOW_compound_statement_in_function_definition180)
b = self.compound_statement()
self.following.pop()
if self.failed:
@@ -813,7 +832,7 @@ class CParser(Parser):
# $ANTLR start declaration
- # C.g:114:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );
+ # C.g:166:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );
def declaration(self, ):
declaration_StartIndex = self.input.index()
@@ -834,44 +853,44 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 4):
return
- # C.g:115:2: (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' )
+ # C.g:167:2: (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' )
alt9 = 2
LA9_0 = self.input.LA(1)
if (LA9_0 == 26) :
alt9 = 1
- elif (LA9_0 == IDENTIFIER or (29 <= LA9_0 <= 42) or (45 <= LA9_0 <= 46) or (48 <= LA9_0 <= 60)) :
+ elif (LA9_0 == IDENTIFIER or (29 <= LA9_0 <= 42) or (45 <= LA9_0 <= 46) or (48 <= LA9_0 <= 61)) :
alt9 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("114:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );", 9, 0, self.input)
+ nvae = NoViableAltException("166:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );", 9, 0, self.input)
raise nvae
if alt9 == 1:
- # C.g:115:4: a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';'
+ # C.g:167:4: a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';'
a = self.input.LT(1)
- self.match(self.input, 26, self.FOLLOW_26_in_declaration193)
+ self.match(self.input, 26, self.FOLLOW_26_in_declaration203)
if self.failed:
return
- # C.g:115:17: (b= declaration_specifiers )?
+ # C.g:167:17: (b= declaration_specifiers )?
alt7 = 2
LA7 = self.input.LA(1)
- if LA7 == 29 or LA7 == 30 or LA7 == 31 or LA7 == 32 or LA7 == 33 or LA7 == 34 or LA7 == 35 or LA7 == 36 or LA7 == 37 or LA7 == 38 or LA7 == 39 or LA7 == 40 or LA7 == 41 or LA7 == 42 or LA7 == 45 or LA7 == 46 or LA7 == 48 or LA7 == 49 or LA7 == 50 or LA7 == 51 or LA7 == 52 or LA7 == 53 or LA7 == 54 or LA7 == 55 or LA7 == 56 or LA7 == 57:
+ if LA7 == 29 or LA7 == 30 or LA7 == 31 or LA7 == 32 or LA7 == 33 or LA7 == 34 or LA7 == 35 or LA7 == 36 or LA7 == 37 or LA7 == 38 or LA7 == 39 or LA7 == 40 or LA7 == 41 or LA7 == 42 or LA7 == 45 or LA7 == 46 or LA7 == 48 or LA7 == 49 or LA7 == 50 or LA7 == 51 or LA7 == 52 or LA7 == 53 or LA7 == 54 or LA7 == 55 or LA7 == 56 or LA7 == 57 or LA7 == 61:
alt7 = 1
elif LA7 == IDENTIFIER:
LA7_13 = self.input.LA(2)
- if (LA7_13 == IDENTIFIER or (29 <= LA7_13 <= 42) or (45 <= LA7_13 <= 46) or (48 <= LA7_13 <= 60) or LA7_13 == 65) :
- alt7 = 1
- elif (LA7_13 == 61) :
- LA7_25 = self.input.LA(3)
+ if (LA7_13 == 62) :
+ LA7_21 = self.input.LA(3)
if (self.synpred10()) :
alt7 = 1
+ elif (LA7_13 == IDENTIFIER or (29 <= LA7_13 <= 42) or (45 <= LA7_13 <= 46) or (48 <= LA7_13 <= 61) or LA7_13 == 66) :
+ alt7 = 1
elif LA7 == 58:
LA7_14 = self.input.LA(2)
@@ -889,7 +908,7 @@ class CParser(Parser):
alt7 = 1
if alt7 == 1:
# C.g:0:0: b= declaration_specifiers
- self.following.append(self.FOLLOW_declaration_specifiers_in_declaration197)
+ self.following.append(self.FOLLOW_declaration_specifiers_in_declaration207)
b = self.declaration_specifiers()
self.following.pop()
if self.failed:
@@ -897,13 +916,13 @@ class CParser(Parser):
- self.following.append(self.FOLLOW_init_declarator_list_in_declaration206)
+ self.following.append(self.FOLLOW_init_declarator_list_in_declaration216)
c = self.init_declarator_list()
self.following.pop()
if self.failed:
return
d = self.input.LT(1)
- self.match(self.input, 25, self.FOLLOW_25_in_declaration210)
+ self.match(self.input, 25, self.FOLLOW_25_in_declaration220)
if self.failed:
return
if self.backtracking == 0:
@@ -917,21 +936,21 @@ class CParser(Parser):
elif alt9 == 2:
- # C.g:123:4: s= declaration_specifiers (t= init_declarator_list )? e= ';'
- self.following.append(self.FOLLOW_declaration_specifiers_in_declaration224)
+ # C.g:175:4: s= declaration_specifiers (t= init_declarator_list )? e= ';'
+ self.following.append(self.FOLLOW_declaration_specifiers_in_declaration234)
s = self.declaration_specifiers()
self.following.pop()
if self.failed:
return
- # C.g:123:30: (t= init_declarator_list )?
+ # C.g:175:30: (t= init_declarator_list )?
alt8 = 2
LA8_0 = self.input.LA(1)
- if (LA8_0 == IDENTIFIER or (58 <= LA8_0 <= 61) or LA8_0 == 65) :
+ if (LA8_0 == IDENTIFIER or (58 <= LA8_0 <= 60) or LA8_0 == 62 or LA8_0 == 66) :
alt8 = 1
if alt8 == 1:
# C.g:0:0: t= init_declarator_list
- self.following.append(self.FOLLOW_init_declarator_list_in_declaration228)
+ self.following.append(self.FOLLOW_init_declarator_list_in_declaration238)
t = self.init_declarator_list()
self.following.pop()
if self.failed:
@@ -940,7 +959,7 @@ class CParser(Parser):
e = self.input.LT(1)
- self.match(self.input, 25, self.FOLLOW_25_in_declaration233)
+ self.match(self.input, 25, self.FOLLOW_25_in_declaration243)
if self.failed:
return
if self.backtracking == 0:
@@ -973,7 +992,7 @@ class CParser(Parser):
# $ANTLR start declaration_specifiers
- # C.g:130:1: declaration_specifiers : ( storage_class_specifier | type_specifier | type_qualifier )+ ;
+ # C.g:182:1: declaration_specifiers : ( storage_class_specifier | type_specifier | type_qualifier )+ ;
def declaration_specifiers(self, ):
retval = self.declaration_specifiers_return()
@@ -984,9 +1003,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 5):
return retval
- # C.g:131:2: ( ( storage_class_specifier | type_specifier | type_qualifier )+ )
- # C.g:131:6: ( storage_class_specifier | type_specifier | type_qualifier )+
- # C.g:131:6: ( storage_class_specifier | type_specifier | type_qualifier )+
+ # C.g:183:2: ( ( storage_class_specifier | type_specifier | type_qualifier )+ )
+ # C.g:183:6: ( storage_class_specifier | type_specifier | type_qualifier )+
+ # C.g:183:6: ( storage_class_specifier | type_specifier | type_qualifier )+
cnt10 = 0
while True: #loop10
alt10 = 4
@@ -1030,12 +1049,12 @@ class CParser(Parser):
alt10 = 1
elif LA10 == 34 or LA10 == 35 or LA10 == 36 or LA10 == 37 or LA10 == 38 or LA10 == 39 or LA10 == 40 or LA10 == 41 or LA10 == 42 or LA10 == 45 or LA10 == 46 or LA10 == 48:
alt10 = 2
- elif LA10 == 49 or LA10 == 50 or LA10 == 51 or LA10 == 52 or LA10 == 54 or LA10 == 55 or LA10 == 56 or LA10 == 57:
+ elif LA10 == 49 or LA10 == 50 or LA10 == 51 or LA10 == 52 or LA10 == 54 or LA10 == 55 or LA10 == 56 or LA10 == 57 or LA10 == 61:
alt10 = 3
if alt10 == 1:
- # C.g:131:10: storage_class_specifier
- self.following.append(self.FOLLOW_storage_class_specifier_in_declaration_specifiers254)
+ # C.g:183:10: storage_class_specifier
+ self.following.append(self.FOLLOW_storage_class_specifier_in_declaration_specifiers264)
self.storage_class_specifier()
self.following.pop()
if self.failed:
@@ -1043,8 +1062,8 @@ class CParser(Parser):
elif alt10 == 2:
- # C.g:132:7: type_specifier
- self.following.append(self.FOLLOW_type_specifier_in_declaration_specifiers262)
+ # C.g:184:7: type_specifier
+ self.following.append(self.FOLLOW_type_specifier_in_declaration_specifiers272)
self.type_specifier()
self.following.pop()
if self.failed:
@@ -1052,8 +1071,8 @@ class CParser(Parser):
elif alt10 == 3:
- # C.g:133:13: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_declaration_specifiers276)
+ # C.g:185:13: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_declaration_specifiers286)
self.type_qualifier()
self.following.pop()
if self.failed:
@@ -1101,7 +1120,7 @@ class CParser(Parser):
# $ANTLR start init_declarator_list
- # C.g:137:1: init_declarator_list : init_declarator ( ',' init_declarator )* ;
+ # C.g:189:1: init_declarator_list : init_declarator ( ',' init_declarator )* ;
def init_declarator_list(self, ):
retval = self.init_declarator_list_return()
@@ -1112,14 +1131,14 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 6):
return retval
- # C.g:138:2: ( init_declarator ( ',' init_declarator )* )
- # C.g:138:4: init_declarator ( ',' init_declarator )*
- self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list298)
+ # C.g:190:2: ( init_declarator ( ',' init_declarator )* )
+ # C.g:190:4: init_declarator ( ',' init_declarator )*
+ self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list308)
self.init_declarator()
self.following.pop()
if self.failed:
return retval
- # C.g:138:20: ( ',' init_declarator )*
+ # C.g:190:20: ( ',' init_declarator )*
while True: #loop11
alt11 = 2
LA11_0 = self.input.LA(1)
@@ -1129,11 +1148,11 @@ class CParser(Parser):
if alt11 == 1:
- # C.g:138:21: ',' init_declarator
- self.match(self.input, 27, self.FOLLOW_27_in_init_declarator_list301)
+ # C.g:190:21: ',' init_declarator
+ self.match(self.input, 27, self.FOLLOW_27_in_init_declarator_list311)
if self.failed:
return retval
- self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list303)
+ self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list313)
self.init_declarator()
self.following.pop()
if self.failed:
@@ -1165,7 +1184,7 @@ class CParser(Parser):
# $ANTLR start init_declarator
- # C.g:141:1: init_declarator : declarator ( '=' initializer )? ;
+ # C.g:193:1: init_declarator : declarator ( '=' initializer )? ;
def init_declarator(self, ):
init_declarator_StartIndex = self.input.index()
@@ -1174,25 +1193,25 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 7):
return
- # C.g:142:2: ( declarator ( '=' initializer )? )
- # C.g:142:4: declarator ( '=' initializer )?
- self.following.append(self.FOLLOW_declarator_in_init_declarator316)
+ # C.g:194:2: ( declarator ( '=' initializer )? )
+ # C.g:194:4: declarator ( '=' initializer )?
+ self.following.append(self.FOLLOW_declarator_in_init_declarator326)
self.declarator()
self.following.pop()
if self.failed:
return
- # C.g:142:15: ( '=' initializer )?
+ # C.g:194:15: ( '=' initializer )?
alt12 = 2
LA12_0 = self.input.LA(1)
if (LA12_0 == 28) :
alt12 = 1
if alt12 == 1:
- # C.g:142:16: '=' initializer
- self.match(self.input, 28, self.FOLLOW_28_in_init_declarator319)
+ # C.g:194:16: '=' initializer
+ self.match(self.input, 28, self.FOLLOW_28_in_init_declarator329)
if self.failed:
return
- self.following.append(self.FOLLOW_initializer_in_init_declarator321)
+ self.following.append(self.FOLLOW_initializer_in_init_declarator331)
self.initializer()
self.following.pop()
if self.failed:
@@ -1219,7 +1238,7 @@ class CParser(Parser):
# $ANTLR start storage_class_specifier
- # C.g:145:1: storage_class_specifier : ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' );
+ # C.g:197:1: storage_class_specifier : ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' );
def storage_class_specifier(self, ):
storage_class_specifier_StartIndex = self.input.index()
@@ -1228,7 +1247,7 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 8):
return
- # C.g:146:2: ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' )
+ # C.g:198:2: ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' )
# C.g:
if (29 <= self.input.LA(1) <= 33):
self.input.consume();
@@ -1266,7 +1285,7 @@ class CParser(Parser):
# $ANTLR start type_specifier
- # C.g:153:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );
+ # C.g:205:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );
def type_specifier(self, ):
type_specifier_StartIndex = self.input.index()
@@ -1280,7 +1299,7 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 9):
return
- # C.g:154:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id )
+ # C.g:206:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id )
alt13 = 12
LA13_0 = self.input.LA(1)
@@ -1313,76 +1332,76 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("153:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );", 13, 0, self.input)
+ nvae = NoViableAltException("205:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );", 13, 0, self.input)
raise nvae
if alt13 == 1:
- # C.g:154:4: 'void'
- self.match(self.input, 34, self.FOLLOW_34_in_type_specifier366)
+ # C.g:206:4: 'void'
+ self.match(self.input, 34, self.FOLLOW_34_in_type_specifier376)
if self.failed:
return
elif alt13 == 2:
- # C.g:155:4: 'char'
- self.match(self.input, 35, self.FOLLOW_35_in_type_specifier371)
+ # C.g:207:4: 'char'
+ self.match(self.input, 35, self.FOLLOW_35_in_type_specifier381)
if self.failed:
return
elif alt13 == 3:
- # C.g:156:4: 'short'
- self.match(self.input, 36, self.FOLLOW_36_in_type_specifier376)
+ # C.g:208:4: 'short'
+ self.match(self.input, 36, self.FOLLOW_36_in_type_specifier386)
if self.failed:
return
elif alt13 == 4:
- # C.g:157:4: 'int'
- self.match(self.input, 37, self.FOLLOW_37_in_type_specifier381)
+ # C.g:209:4: 'int'
+ self.match(self.input, 37, self.FOLLOW_37_in_type_specifier391)
if self.failed:
return
elif alt13 == 5:
- # C.g:158:4: 'long'
- self.match(self.input, 38, self.FOLLOW_38_in_type_specifier386)
+ # C.g:210:4: 'long'
+ self.match(self.input, 38, self.FOLLOW_38_in_type_specifier396)
if self.failed:
return
elif alt13 == 6:
- # C.g:159:4: 'float'
- self.match(self.input, 39, self.FOLLOW_39_in_type_specifier391)
+ # C.g:211:4: 'float'
+ self.match(self.input, 39, self.FOLLOW_39_in_type_specifier401)
if self.failed:
return
elif alt13 == 7:
- # C.g:160:4: 'double'
- self.match(self.input, 40, self.FOLLOW_40_in_type_specifier396)
+ # C.g:212:4: 'double'
+ self.match(self.input, 40, self.FOLLOW_40_in_type_specifier406)
if self.failed:
return
elif alt13 == 8:
- # C.g:161:4: 'signed'
- self.match(self.input, 41, self.FOLLOW_41_in_type_specifier401)
+ # C.g:213:4: 'signed'
+ self.match(self.input, 41, self.FOLLOW_41_in_type_specifier411)
if self.failed:
return
elif alt13 == 9:
- # C.g:162:4: 'unsigned'
- self.match(self.input, 42, self.FOLLOW_42_in_type_specifier406)
+ # C.g:214:4: 'unsigned'
+ self.match(self.input, 42, self.FOLLOW_42_in_type_specifier416)
if self.failed:
return
elif alt13 == 10:
- # C.g:163:4: s= struct_or_union_specifier
- self.following.append(self.FOLLOW_struct_or_union_specifier_in_type_specifier413)
+ # C.g:215:4: s= struct_or_union_specifier
+ self.following.append(self.FOLLOW_struct_or_union_specifier_in_type_specifier423)
s = self.struct_or_union_specifier()
self.following.pop()
if self.failed:
@@ -1396,8 +1415,8 @@ class CParser(Parser):
elif alt13 == 11:
- # C.g:168:4: e= enum_specifier
- self.following.append(self.FOLLOW_enum_specifier_in_type_specifier423)
+ # C.g:220:4: e= enum_specifier
+ self.following.append(self.FOLLOW_enum_specifier_in_type_specifier433)
e = self.enum_specifier()
self.following.pop()
if self.failed:
@@ -1411,8 +1430,8 @@ class CParser(Parser):
elif alt13 == 12:
- # C.g:173:4: ( IDENTIFIER ( type_qualifier )* declarator )=> type_id
- self.following.append(self.FOLLOW_type_id_in_type_specifier441)
+ # C.g:225:4: ( IDENTIFIER ( type_qualifier )* declarator )=> type_id
+ self.following.append(self.FOLLOW_type_id_in_type_specifier451)
self.type_id()
self.following.pop()
if self.failed:
@@ -1435,7 +1454,7 @@ class CParser(Parser):
# $ANTLR start type_id
- # C.g:176:1: type_id : IDENTIFIER ;
+ # C.g:228:1: type_id : IDENTIFIER ;
def type_id(self, ):
type_id_StartIndex = self.input.index()
@@ -1444,9 +1463,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 10):
return
- # C.g:177:5: ( IDENTIFIER )
- # C.g:177:9: IDENTIFIER
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id457)
+ # C.g:229:5: ( IDENTIFIER )
+ # C.g:229:9: IDENTIFIER
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id467)
if self.failed:
return
@@ -1474,7 +1493,7 @@ class CParser(Parser):
# $ANTLR start struct_or_union_specifier
- # C.g:181:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );
+ # C.g:233:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );
def struct_or_union_specifier(self, ):
retval = self.struct_or_union_specifier_return()
@@ -1485,7 +1504,7 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 11):
return retval
- # C.g:183:2: ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER )
+ # C.g:235:2: ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER )
alt15 = 2
LA15_0 = self.input.LA(1)
@@ -1497,14 +1516,14 @@ class CParser(Parser):
if (LA15_2 == 43) :
alt15 = 1
- elif (LA15_2 == EOF or LA15_2 == IDENTIFIER or LA15_2 == 25 or LA15_2 == 27 or (29 <= LA15_2 <= 42) or (45 <= LA15_2 <= 63) or LA15_2 == 65) :
+ elif (LA15_2 == EOF or LA15_2 == IDENTIFIER or LA15_2 == 25 or LA15_2 == 27 or (29 <= LA15_2 <= 42) or (45 <= LA15_2 <= 64) or LA15_2 == 66) :
alt15 = 2
else:
if self.backtracking > 0:
self.failed = True
return retval
- nvae = NoViableAltException("181:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 2, self.input)
+ nvae = NoViableAltException("233:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 2, self.input)
raise nvae
@@ -1515,7 +1534,7 @@ class CParser(Parser):
self.failed = True
return retval
- nvae = NoViableAltException("181:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 1, self.input)
+ nvae = NoViableAltException("233:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 1, self.input)
raise nvae
@@ -1524,18 +1543,18 @@ class CParser(Parser):
self.failed = True
return retval
- nvae = NoViableAltException("181:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 0, self.input)
+ nvae = NoViableAltException("233:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 0, self.input)
raise nvae
if alt15 == 1:
- # C.g:183:4: struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}'
- self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier484)
+ # C.g:235:4: struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}'
+ self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier494)
self.struct_or_union()
self.following.pop()
if self.failed:
return retval
- # C.g:183:20: ( IDENTIFIER )?
+ # C.g:235:20: ( IDENTIFIER )?
alt14 = 2
LA14_0 = self.input.LA(1)
@@ -1543,33 +1562,33 @@ class CParser(Parser):
alt14 = 1
if alt14 == 1:
# C.g:0:0: IDENTIFIER
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier486)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier496)
if self.failed:
return retval
- self.match(self.input, 43, self.FOLLOW_43_in_struct_or_union_specifier489)
+ self.match(self.input, 43, self.FOLLOW_43_in_struct_or_union_specifier499)
if self.failed:
return retval
- self.following.append(self.FOLLOW_struct_declaration_list_in_struct_or_union_specifier491)
+ self.following.append(self.FOLLOW_struct_declaration_list_in_struct_or_union_specifier501)
self.struct_declaration_list()
self.following.pop()
if self.failed:
return retval
- self.match(self.input, 44, self.FOLLOW_44_in_struct_or_union_specifier493)
+ self.match(self.input, 44, self.FOLLOW_44_in_struct_or_union_specifier503)
if self.failed:
return retval
elif alt15 == 2:
- # C.g:184:4: struct_or_union IDENTIFIER
- self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier498)
+ # C.g:236:4: struct_or_union IDENTIFIER
+ self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier508)
self.struct_or_union()
self.following.pop()
if self.failed:
return retval
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier500)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier510)
if self.failed:
return retval
@@ -1592,7 +1611,7 @@ class CParser(Parser):
# $ANTLR start struct_or_union
- # C.g:187:1: struct_or_union : ( 'struct' | 'union' );
+ # C.g:239:1: struct_or_union : ( 'struct' | 'union' );
def struct_or_union(self, ):
struct_or_union_StartIndex = self.input.index()
@@ -1601,7 +1620,7 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 12):
return
- # C.g:188:2: ( 'struct' | 'union' )
+ # C.g:240:2: ( 'struct' | 'union' )
# C.g:
if (45 <= self.input.LA(1) <= 46):
self.input.consume();
@@ -1639,7 +1658,7 @@ class CParser(Parser):
# $ANTLR start struct_declaration_list
- # C.g:192:1: struct_declaration_list : ( struct_declaration )+ ;
+ # C.g:244:1: struct_declaration_list : ( struct_declaration )+ ;
def struct_declaration_list(self, ):
struct_declaration_list_StartIndex = self.input.index()
@@ -1648,21 +1667,21 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 13):
return
- # C.g:193:2: ( ( struct_declaration )+ )
- # C.g:193:4: ( struct_declaration )+
- # C.g:193:4: ( struct_declaration )+
+ # C.g:245:2: ( ( struct_declaration )+ )
+ # C.g:245:4: ( struct_declaration )+
+ # C.g:245:4: ( struct_declaration )+
cnt16 = 0
while True: #loop16
alt16 = 2
LA16_0 = self.input.LA(1)
- if (LA16_0 == IDENTIFIER or (34 <= LA16_0 <= 42) or (45 <= LA16_0 <= 46) or (48 <= LA16_0 <= 60)) :
+ if (LA16_0 == IDENTIFIER or (34 <= LA16_0 <= 42) or (45 <= LA16_0 <= 46) or (48 <= LA16_0 <= 61)) :
alt16 = 1
if alt16 == 1:
# C.g:0:0: struct_declaration
- self.following.append(self.FOLLOW_struct_declaration_in_struct_declaration_list527)
+ self.following.append(self.FOLLOW_struct_declaration_in_struct_declaration_list537)
self.struct_declaration()
self.following.pop()
if self.failed:
@@ -1702,7 +1721,7 @@ class CParser(Parser):
# $ANTLR start struct_declaration
- # C.g:196:1: struct_declaration : specifier_qualifier_list struct_declarator_list ';' ;
+ # C.g:248:1: struct_declaration : specifier_qualifier_list struct_declarator_list ';' ;
def struct_declaration(self, ):
struct_declaration_StartIndex = self.input.index()
@@ -1711,19 +1730,19 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 14):
return
- # C.g:197:2: ( specifier_qualifier_list struct_declarator_list ';' )
- # C.g:197:4: specifier_qualifier_list struct_declarator_list ';'
- self.following.append(self.FOLLOW_specifier_qualifier_list_in_struct_declaration539)
+ # C.g:249:2: ( specifier_qualifier_list struct_declarator_list ';' )
+ # C.g:249:4: specifier_qualifier_list struct_declarator_list ';'
+ self.following.append(self.FOLLOW_specifier_qualifier_list_in_struct_declaration549)
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
return
- self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration541)
+ self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration551)
self.struct_declarator_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 25, self.FOLLOW_25_in_struct_declaration543)
+ self.match(self.input, 25, self.FOLLOW_25_in_struct_declaration553)
if self.failed:
return
@@ -1745,7 +1764,7 @@ class CParser(Parser):
# $ANTLR start specifier_qualifier_list
- # C.g:200:1: specifier_qualifier_list : ( type_qualifier | type_specifier )+ ;
+ # C.g:252:1: specifier_qualifier_list : ( type_qualifier | type_specifier )+ ;
def specifier_qualifier_list(self, ):
specifier_qualifier_list_StartIndex = self.input.index()
@@ -1754,9 +1773,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 15):
return
- # C.g:201:2: ( ( type_qualifier | type_specifier )+ )
- # C.g:201:4: ( type_qualifier | type_specifier )+
- # C.g:201:4: ( type_qualifier | type_specifier )+
+ # C.g:253:2: ( ( type_qualifier | type_specifier )+ )
+ # C.g:253:4: ( type_qualifier | type_specifier )+
+ # C.g:253:4: ( type_qualifier | type_specifier )+
cnt17 = 0
while True: #loop17
alt17 = 3
@@ -1784,9 +1803,9 @@ class CParser(Parser):
elif LA17 == IDENTIFIER:
LA17 = self.input.LA(2)
- if LA17 == EOF or LA17 == IDENTIFIER or LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 41 or LA17 == 42 or LA17 == 45 or LA17 == 46 or LA17 == 48 or LA17 == 49 or LA17 == 50 or LA17 == 51 or LA17 == 52 or LA17 == 53 or LA17 == 54 or LA17 == 55 or LA17 == 56 or LA17 == 57 or LA17 == 58 or LA17 == 59 or LA17 == 60 or LA17 == 62 or LA17 == 65:
+ if LA17 == EOF or LA17 == IDENTIFIER or LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 41 or LA17 == 42 or LA17 == 45 or LA17 == 46 or LA17 == 48 or LA17 == 49 or LA17 == 50 or LA17 == 51 or LA17 == 52 or LA17 == 53 or LA17 == 54 or LA17 == 55 or LA17 == 56 or LA17 == 57 or LA17 == 58 or LA17 == 59 or LA17 == 60 or LA17 == 61 or LA17 == 63 or LA17 == 66:
alt17 = 2
- elif LA17 == 61:
+ elif LA17 == 62:
LA17_94 = self.input.LA(3)
if (self.synpred40()) :
@@ -1800,7 +1819,7 @@ class CParser(Parser):
alt17 = 2
- elif LA17 == 63:
+ elif LA17 == 64:
LA17_96 = self.input.LA(3)
if (self.synpred40()) :
@@ -1808,14 +1827,14 @@ class CParser(Parser):
- elif LA17 == 49 or LA17 == 50 or LA17 == 51 or LA17 == 52 or LA17 == 53 or LA17 == 54 or LA17 == 55 or LA17 == 56 or LA17 == 57:
+ elif LA17 == 49 or LA17 == 50 or LA17 == 51 or LA17 == 52 or LA17 == 53 or LA17 == 54 or LA17 == 55 or LA17 == 56 or LA17 == 57 or LA17 == 61:
alt17 = 1
elif LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 41 or LA17 == 42 or LA17 == 45 or LA17 == 46 or LA17 == 48:
alt17 = 2
if alt17 == 1:
- # C.g:201:6: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_specifier_qualifier_list556)
+ # C.g:253:6: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_specifier_qualifier_list566)
self.type_qualifier()
self.following.pop()
if self.failed:
@@ -1823,8 +1842,8 @@ class CParser(Parser):
elif alt17 == 2:
- # C.g:201:23: type_specifier
- self.following.append(self.FOLLOW_type_specifier_in_specifier_qualifier_list560)
+ # C.g:253:23: type_specifier
+ self.following.append(self.FOLLOW_type_specifier_in_specifier_qualifier_list570)
self.type_specifier()
self.following.pop()
if self.failed:
@@ -1864,7 +1883,7 @@ class CParser(Parser):
# $ANTLR start struct_declarator_list
- # C.g:204:1: struct_declarator_list : struct_declarator ( ',' struct_declarator )* ;
+ # C.g:256:1: struct_declarator_list : struct_declarator ( ',' struct_declarator )* ;
def struct_declarator_list(self, ):
struct_declarator_list_StartIndex = self.input.index()
@@ -1873,14 +1892,14 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 16):
return
- # C.g:205:2: ( struct_declarator ( ',' struct_declarator )* )
- # C.g:205:4: struct_declarator ( ',' struct_declarator )*
- self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list574)
+ # C.g:257:2: ( struct_declarator ( ',' struct_declarator )* )
+ # C.g:257:4: struct_declarator ( ',' struct_declarator )*
+ self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list584)
self.struct_declarator()
self.following.pop()
if self.failed:
return
- # C.g:205:22: ( ',' struct_declarator )*
+ # C.g:257:22: ( ',' struct_declarator )*
while True: #loop18
alt18 = 2
LA18_0 = self.input.LA(1)
@@ -1890,11 +1909,11 @@ class CParser(Parser):
if alt18 == 1:
- # C.g:205:23: ',' struct_declarator
- self.match(self.input, 27, self.FOLLOW_27_in_struct_declarator_list577)
+ # C.g:257:23: ',' struct_declarator
+ self.match(self.input, 27, self.FOLLOW_27_in_struct_declarator_list587)
if self.failed:
return
- self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list579)
+ self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list589)
self.struct_declarator()
self.following.pop()
if self.failed:
@@ -1924,7 +1943,7 @@ class CParser(Parser):
# $ANTLR start struct_declarator
- # C.g:208:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );
+ # C.g:260:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );
def struct_declarator(self, ):
struct_declarator_StartIndex = self.input.index()
@@ -1933,11 +1952,11 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 17):
return
- # C.g:209:2: ( declarator ( ':' constant_expression )? | ':' constant_expression )
+ # C.g:261:2: ( declarator ( ':' constant_expression )? | ':' constant_expression )
alt20 = 2
LA20_0 = self.input.LA(1)
- if (LA20_0 == IDENTIFIER or (58 <= LA20_0 <= 61) or LA20_0 == 65) :
+ if (LA20_0 == IDENTIFIER or (58 <= LA20_0 <= 60) or LA20_0 == 62 or LA20_0 == 66) :
alt20 = 1
elif (LA20_0 == 47) :
alt20 = 2
@@ -1946,29 +1965,29 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("208:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 20, 0, self.input)
+ nvae = NoViableAltException("260:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 20, 0, self.input)
raise nvae
if alt20 == 1:
- # C.g:209:4: declarator ( ':' constant_expression )?
- self.following.append(self.FOLLOW_declarator_in_struct_declarator592)
+ # C.g:261:4: declarator ( ':' constant_expression )?
+ self.following.append(self.FOLLOW_declarator_in_struct_declarator602)
self.declarator()
self.following.pop()
if self.failed:
return
- # C.g:209:15: ( ':' constant_expression )?
+ # C.g:261:15: ( ':' constant_expression )?
alt19 = 2
LA19_0 = self.input.LA(1)
if (LA19_0 == 47) :
alt19 = 1
if alt19 == 1:
- # C.g:209:16: ':' constant_expression
- self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator595)
+ # C.g:261:16: ':' constant_expression
+ self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator605)
if self.failed:
return
- self.following.append(self.FOLLOW_constant_expression_in_struct_declarator597)
+ self.following.append(self.FOLLOW_constant_expression_in_struct_declarator607)
self.constant_expression()
self.following.pop()
if self.failed:
@@ -1979,11 +1998,11 @@ class CParser(Parser):
elif alt20 == 2:
- # C.g:210:4: ':' constant_expression
- self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator604)
+ # C.g:262:4: ':' constant_expression
+ self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator614)
if self.failed:
return
- self.following.append(self.FOLLOW_constant_expression_in_struct_declarator606)
+ self.following.append(self.FOLLOW_constant_expression_in_struct_declarator616)
self.constant_expression()
self.following.pop()
if self.failed:
@@ -2012,7 +2031,7 @@ class CParser(Parser):
# $ANTLR start enum_specifier
- # C.g:213:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );
+ # C.g:265:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );
def enum_specifier(self, ):
retval = self.enum_specifier_return()
@@ -2023,7 +2042,7 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 18):
return retval
- # C.g:215:2: ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER )
+ # C.g:267:2: ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER )
alt23 = 3
LA23_0 = self.input.LA(1)
@@ -2035,14 +2054,14 @@ class CParser(Parser):
if (LA23_2 == 43) :
alt23 = 2
- elif (LA23_2 == EOF or LA23_2 == IDENTIFIER or LA23_2 == 25 or LA23_2 == 27 or (29 <= LA23_2 <= 42) or (45 <= LA23_2 <= 63) or LA23_2 == 65) :
+ elif (LA23_2 == EOF or LA23_2 == IDENTIFIER or LA23_2 == 25 or LA23_2 == 27 or (29 <= LA23_2 <= 42) or (45 <= LA23_2 <= 64) or LA23_2 == 66) :
alt23 = 3
else:
if self.backtracking > 0:
self.failed = True
return retval
- nvae = NoViableAltException("213:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 2, self.input)
+ nvae = NoViableAltException("265:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 2, self.input)
raise nvae
@@ -2053,7 +2072,7 @@ class CParser(Parser):
self.failed = True
return retval
- nvae = NoViableAltException("213:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 1, self.input)
+ nvae = NoViableAltException("265:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 1, self.input)
raise nvae
@@ -2062,24 +2081,24 @@ class CParser(Parser):
self.failed = True
return retval
- nvae = NoViableAltException("213:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 0, self.input)
+ nvae = NoViableAltException("265:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 0, self.input)
raise nvae
if alt23 == 1:
- # C.g:215:4: 'enum' '{' enumerator_list ( ',' )? '}'
- self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier624)
+ # C.g:267:4: 'enum' '{' enumerator_list ( ',' )? '}'
+ self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier634)
if self.failed:
return retval
- self.match(self.input, 43, self.FOLLOW_43_in_enum_specifier626)
+ self.match(self.input, 43, self.FOLLOW_43_in_enum_specifier636)
if self.failed:
return retval
- self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier628)
+ self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier638)
self.enumerator_list()
self.following.pop()
if self.failed:
return retval
- # C.g:215:31: ( ',' )?
+ # C.g:267:31: ( ',' )?
alt21 = 2
LA21_0 = self.input.LA(1)
@@ -2087,34 +2106,34 @@ class CParser(Parser):
alt21 = 1
if alt21 == 1:
# C.g:0:0: ','
- self.match(self.input, 27, self.FOLLOW_27_in_enum_specifier630)
+ self.match(self.input, 27, self.FOLLOW_27_in_enum_specifier640)
if self.failed:
return retval
- self.match(self.input, 44, self.FOLLOW_44_in_enum_specifier633)
+ self.match(self.input, 44, self.FOLLOW_44_in_enum_specifier643)
if self.failed:
return retval
elif alt23 == 2:
- # C.g:216:4: 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}'
- self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier638)
+ # C.g:268:4: 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}'
+ self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier648)
if self.failed:
return retval
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier640)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier650)
if self.failed:
return retval
- self.match(self.input, 43, self.FOLLOW_43_in_enum_specifier642)
+ self.match(self.input, 43, self.FOLLOW_43_in_enum_specifier652)
if self.failed:
return retval
- self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier644)
+ self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier654)
self.enumerator_list()
self.following.pop()
if self.failed:
return retval
- # C.g:216:42: ( ',' )?
+ # C.g:268:42: ( ',' )?
alt22 = 2
LA22_0 = self.input.LA(1)
@@ -2122,23 +2141,23 @@ class CParser(Parser):
alt22 = 1
if alt22 == 1:
# C.g:0:0: ','
- self.match(self.input, 27, self.FOLLOW_27_in_enum_specifier646)
+ self.match(self.input, 27, self.FOLLOW_27_in_enum_specifier656)
if self.failed:
return retval
- self.match(self.input, 44, self.FOLLOW_44_in_enum_specifier649)
+ self.match(self.input, 44, self.FOLLOW_44_in_enum_specifier659)
if self.failed:
return retval
elif alt23 == 3:
- # C.g:217:4: 'enum' IDENTIFIER
- self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier654)
+ # C.g:269:4: 'enum' IDENTIFIER
+ self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier664)
if self.failed:
return retval
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier656)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier666)
if self.failed:
return retval
@@ -2161,7 +2180,7 @@ class CParser(Parser):
# $ANTLR start enumerator_list
- # C.g:220:1: enumerator_list : enumerator ( ',' enumerator )* ;
+ # C.g:272:1: enumerator_list : enumerator ( ',' enumerator )* ;
def enumerator_list(self, ):
enumerator_list_StartIndex = self.input.index()
@@ -2170,14 +2189,14 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 19):
return
- # C.g:221:2: ( enumerator ( ',' enumerator )* )
- # C.g:221:4: enumerator ( ',' enumerator )*
- self.following.append(self.FOLLOW_enumerator_in_enumerator_list667)
+ # C.g:273:2: ( enumerator ( ',' enumerator )* )
+ # C.g:273:4: enumerator ( ',' enumerator )*
+ self.following.append(self.FOLLOW_enumerator_in_enumerator_list677)
self.enumerator()
self.following.pop()
if self.failed:
return
- # C.g:221:15: ( ',' enumerator )*
+ # C.g:273:15: ( ',' enumerator )*
while True: #loop24
alt24 = 2
LA24_0 = self.input.LA(1)
@@ -2192,11 +2211,11 @@ class CParser(Parser):
if alt24 == 1:
- # C.g:221:16: ',' enumerator
- self.match(self.input, 27, self.FOLLOW_27_in_enumerator_list670)
+ # C.g:273:16: ',' enumerator
+ self.match(self.input, 27, self.FOLLOW_27_in_enumerator_list680)
if self.failed:
return
- self.following.append(self.FOLLOW_enumerator_in_enumerator_list672)
+ self.following.append(self.FOLLOW_enumerator_in_enumerator_list682)
self.enumerator()
self.following.pop()
if self.failed:
@@ -2226,7 +2245,7 @@ class CParser(Parser):
# $ANTLR start enumerator
- # C.g:224:1: enumerator : IDENTIFIER ( '=' constant_expression )? ;
+ # C.g:276:1: enumerator : IDENTIFIER ( '=' constant_expression )? ;
def enumerator(self, ):
enumerator_StartIndex = self.input.index()
@@ -2235,23 +2254,23 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 20):
return
- # C.g:225:2: ( IDENTIFIER ( '=' constant_expression )? )
- # C.g:225:4: IDENTIFIER ( '=' constant_expression )?
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator685)
+ # C.g:277:2: ( IDENTIFIER ( '=' constant_expression )? )
+ # C.g:277:4: IDENTIFIER ( '=' constant_expression )?
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator695)
if self.failed:
return
- # C.g:225:15: ( '=' constant_expression )?
+ # C.g:277:15: ( '=' constant_expression )?
alt25 = 2
LA25_0 = self.input.LA(1)
if (LA25_0 == 28) :
alt25 = 1
if alt25 == 1:
- # C.g:225:16: '=' constant_expression
- self.match(self.input, 28, self.FOLLOW_28_in_enumerator688)
+ # C.g:277:16: '=' constant_expression
+ self.match(self.input, 28, self.FOLLOW_28_in_enumerator698)
if self.failed:
return
- self.following.append(self.FOLLOW_constant_expression_in_enumerator690)
+ self.following.append(self.FOLLOW_constant_expression_in_enumerator700)
self.constant_expression()
self.following.pop()
if self.failed:
@@ -2278,7 +2297,7 @@ class CParser(Parser):
# $ANTLR start type_qualifier
- # C.g:228:1: type_qualifier : ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' );
+ # C.g:280:1: type_qualifier : ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' | 'PACKED' );
def type_qualifier(self, ):
type_qualifier_StartIndex = self.input.index()
@@ -2287,9 +2306,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 21):
return
- # C.g:229:2: ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' )
+ # C.g:281:2: ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' | 'PACKED' )
# C.g:
- if (49 <= self.input.LA(1) <= 60):
+ if (49 <= self.input.LA(1) <= 61):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -2331,7 +2350,7 @@ class CParser(Parser):
# $ANTLR start declarator
- # C.g:243:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );
+ # C.g:296:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );
def declarator(self, ):
retval = self.declarator_return()
@@ -2342,14 +2361,14 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 22):
return retval
- # C.g:244:2: ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer )
+ # C.g:297:2: ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer )
alt30 = 2
LA30_0 = self.input.LA(1)
- if (LA30_0 == 65) :
+ if (LA30_0 == 66) :
LA30_1 = self.input.LA(2)
- if (self.synpred65()) :
+ if (self.synpred66()) :
alt30 = 1
elif (True) :
alt30 = 2
@@ -2358,32 +2377,32 @@ class CParser(Parser):
self.failed = True
return retval
- nvae = NoViableAltException("243:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );", 30, 1, self.input)
+ nvae = NoViableAltException("296:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );", 30, 1, self.input)
raise nvae
- elif (LA30_0 == IDENTIFIER or (58 <= LA30_0 <= 61)) :
+ elif (LA30_0 == IDENTIFIER or (58 <= LA30_0 <= 60) or LA30_0 == 62) :
alt30 = 1
else:
if self.backtracking > 0:
self.failed = True
return retval
- nvae = NoViableAltException("243:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );", 30, 0, self.input)
+ nvae = NoViableAltException("296:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );", 30, 0, self.input)
raise nvae
if alt30 == 1:
- # C.g:244:4: ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator
- # C.g:244:4: ( pointer )?
+ # C.g:297:4: ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator
+ # C.g:297:4: ( pointer )?
alt26 = 2
LA26_0 = self.input.LA(1)
- if (LA26_0 == 65) :
+ if (LA26_0 == 66) :
alt26 = 1
if alt26 == 1:
# C.g:0:0: pointer
- self.following.append(self.FOLLOW_pointer_in_declarator769)
+ self.following.append(self.FOLLOW_pointer_in_declarator784)
self.pointer()
self.following.pop()
if self.failed:
@@ -2391,49 +2410,49 @@ class CParser(Parser):
- # C.g:244:13: ( 'EFIAPI' )?
+ # C.g:297:13: ( 'EFIAPI' )?
alt27 = 2
LA27_0 = self.input.LA(1)
if (LA27_0 == 58) :
alt27 = 1
if alt27 == 1:
- # C.g:244:14: 'EFIAPI'
- self.match(self.input, 58, self.FOLLOW_58_in_declarator773)
+ # C.g:297:14: 'EFIAPI'
+ self.match(self.input, 58, self.FOLLOW_58_in_declarator788)
if self.failed:
return retval
- # C.g:244:25: ( 'EFI_BOOTSERVICE' )?
+ # C.g:297:25: ( 'EFI_BOOTSERVICE' )?
alt28 = 2
LA28_0 = self.input.LA(1)
if (LA28_0 == 59) :
alt28 = 1
if alt28 == 1:
- # C.g:244:26: 'EFI_BOOTSERVICE'
- self.match(self.input, 59, self.FOLLOW_59_in_declarator778)
+ # C.g:297:26: 'EFI_BOOTSERVICE'
+ self.match(self.input, 59, self.FOLLOW_59_in_declarator793)
if self.failed:
return retval
- # C.g:244:46: ( 'EFI_RUNTIMESERVICE' )?
+ # C.g:297:46: ( 'EFI_RUNTIMESERVICE' )?
alt29 = 2
LA29_0 = self.input.LA(1)
if (LA29_0 == 60) :
alt29 = 1
if alt29 == 1:
- # C.g:244:47: 'EFI_RUNTIMESERVICE'
- self.match(self.input, 60, self.FOLLOW_60_in_declarator783)
+ # C.g:297:47: 'EFI_RUNTIMESERVICE'
+ self.match(self.input, 60, self.FOLLOW_60_in_declarator798)
if self.failed:
return retval
- self.following.append(self.FOLLOW_direct_declarator_in_declarator787)
+ self.following.append(self.FOLLOW_direct_declarator_in_declarator802)
self.direct_declarator()
self.following.pop()
if self.failed:
@@ -2441,8 +2460,8 @@ class CParser(Parser):
elif alt30 == 2:
- # C.g:246:4: pointer
- self.following.append(self.FOLLOW_pointer_in_declarator793)
+ # C.g:299:4: pointer
+ self.following.append(self.FOLLOW_pointer_in_declarator808)
self.pointer()
self.following.pop()
if self.failed:
@@ -2467,7 +2486,7 @@ class CParser(Parser):
# $ANTLR start direct_declarator
- # C.g:249:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );
+ # C.g:302:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );
def direct_declarator(self, ):
direct_declarator_StartIndex = self.input.index()
@@ -2476,259 +2495,259 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 23):
return
- # C.g:250:2: ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ )
+ # C.g:303:2: ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ )
alt34 = 2
LA34_0 = self.input.LA(1)
if (LA34_0 == IDENTIFIER) :
alt34 = 1
- elif (LA34_0 == 61) :
+ elif (LA34_0 == 62) :
alt34 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("249:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );", 34, 0, self.input)
+ nvae = NoViableAltException("302:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );", 34, 0, self.input)
raise nvae
if alt34 == 1:
- # C.g:250:4: IDENTIFIER ( declarator_suffix )*
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator804)
+ # C.g:303:4: IDENTIFIER ( declarator_suffix )*
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator819)
if self.failed:
return
- # C.g:250:15: ( declarator_suffix )*
+ # C.g:303:15: ( declarator_suffix )*
while True: #loop31
alt31 = 2
LA31_0 = self.input.LA(1)
- if (LA31_0 == 61) :
+ if (LA31_0 == 62) :
LA31 = self.input.LA(2)
- if LA31 == 62:
+ if LA31 == 63:
LA31_30 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 58:
LA31_31 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
- elif LA31 == 65:
+ elif LA31 == 66:
LA31_32 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 59:
LA31_33 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 60:
LA31_34 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == IDENTIFIER:
LA31_35 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 29 or LA31 == 30 or LA31 == 31 or LA31 == 32 or LA31 == 33:
LA31_37 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 34:
LA31_38 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 35:
LA31_39 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 36:
LA31_40 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 37:
LA31_41 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 38:
LA31_42 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 39:
LA31_43 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 40:
LA31_44 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 41:
LA31_45 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 42:
LA31_46 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 45 or LA31 == 46:
LA31_47 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == 48:
LA31_48 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
- elif LA31 == 49 or LA31 == 50 or LA31 == 51 or LA31 == 52 or LA31 == 53 or LA31 == 54 or LA31 == 55 or LA31 == 56 or LA31 == 57:
+ elif LA31 == 49 or LA31 == 50 or LA31 == 51 or LA31 == 52 or LA31 == 53 or LA31 == 54 or LA31 == 55 or LA31 == 56 or LA31 == 57 or LA31 == 61:
LA31_49 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
- elif (LA31_0 == 63) :
+ elif (LA31_0 == 64) :
LA31 = self.input.LA(2)
- if LA31 == 64:
+ if LA31 == 65:
LA31_51 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
- elif LA31 == 61:
+ elif LA31 == 62:
LA31_52 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == IDENTIFIER:
LA31_53 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == HEX_LITERAL:
LA31_54 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == OCTAL_LITERAL:
LA31_55 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == DECIMAL_LITERAL:
LA31_56 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == CHARACTER_LITERAL:
LA31_57 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == STRING_LITERAL:
LA31_58 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
elif LA31 == FLOATING_POINT_LITERAL:
LA31_59 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
- elif LA31 == 71:
+ elif LA31 == 72:
LA31_60 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
- elif LA31 == 72:
+ elif LA31 == 73:
LA31_61 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
- elif LA31 == 65 or LA31 == 67 or LA31 == 68 or LA31 == 76 or LA31 == 77 or LA31 == 78:
+ elif LA31 == 66 or LA31 == 68 or LA31 == 69 or LA31 == 77 or LA31 == 78 or LA31 == 79:
LA31_62 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
- elif LA31 == 73:
+ elif LA31 == 74:
LA31_63 = self.input.LA(3)
- if (self.synpred66()) :
+ if (self.synpred67()) :
alt31 = 1
@@ -2737,7 +2756,7 @@ class CParser(Parser):
if alt31 == 1:
# C.g:0:0: declarator_suffix
- self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator806)
+ self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator821)
self.declarator_suffix()
self.following.pop()
if self.failed:
@@ -2751,267 +2770,267 @@ class CParser(Parser):
elif alt34 == 2:
- # C.g:251:4: '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+
- self.match(self.input, 61, self.FOLLOW_61_in_direct_declarator812)
+ # C.g:304:4: '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+
+ self.match(self.input, 62, self.FOLLOW_62_in_direct_declarator827)
if self.failed:
return
- # C.g:251:8: ( 'EFIAPI' )?
+ # C.g:304:8: ( 'EFIAPI' )?
alt32 = 2
LA32_0 = self.input.LA(1)
if (LA32_0 == 58) :
LA32_1 = self.input.LA(2)
- if (self.synpred68()) :
+ if (self.synpred69()) :
alt32 = 1
if alt32 == 1:
- # C.g:251:9: 'EFIAPI'
- self.match(self.input, 58, self.FOLLOW_58_in_direct_declarator815)
+ # C.g:304:9: 'EFIAPI'
+ self.match(self.input, 58, self.FOLLOW_58_in_direct_declarator830)
if self.failed:
return
- self.following.append(self.FOLLOW_declarator_in_direct_declarator819)
+ self.following.append(self.FOLLOW_declarator_in_direct_declarator834)
self.declarator()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_direct_declarator821)
+ self.match(self.input, 63, self.FOLLOW_63_in_direct_declarator836)
if self.failed:
return
- # C.g:251:35: ( declarator_suffix )+
+ # C.g:304:35: ( declarator_suffix )+
cnt33 = 0
while True: #loop33
alt33 = 2
LA33_0 = self.input.LA(1)
- if (LA33_0 == 61) :
+ if (LA33_0 == 62) :
LA33 = self.input.LA(2)
- if LA33 == 62:
+ if LA33 == 63:
LA33_30 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 58:
LA33_31 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
- elif LA33 == 65:
+ elif LA33 == 66:
LA33_32 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 59:
LA33_33 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 60:
LA33_34 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == IDENTIFIER:
LA33_35 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 29 or LA33 == 30 or LA33 == 31 or LA33 == 32 or LA33 == 33:
LA33_37 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 34:
LA33_38 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 35:
LA33_39 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 36:
LA33_40 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 37:
LA33_41 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 38:
LA33_42 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 39:
LA33_43 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 40:
LA33_44 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 41:
LA33_45 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 42:
LA33_46 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 45 or LA33 == 46:
LA33_47 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == 48:
LA33_48 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
- elif LA33 == 49 or LA33 == 50 or LA33 == 51 or LA33 == 52 or LA33 == 53 or LA33 == 54 or LA33 == 55 or LA33 == 56 or LA33 == 57:
+ elif LA33 == 49 or LA33 == 50 or LA33 == 51 or LA33 == 52 or LA33 == 53 or LA33 == 54 or LA33 == 55 or LA33 == 56 or LA33 == 57 or LA33 == 61:
LA33_49 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
- elif (LA33_0 == 63) :
+ elif (LA33_0 == 64) :
LA33 = self.input.LA(2)
- if LA33 == 64:
+ if LA33 == 65:
LA33_51 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
- elif LA33 == 61:
+ elif LA33 == 62:
LA33_52 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == IDENTIFIER:
LA33_53 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == HEX_LITERAL:
LA33_54 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == OCTAL_LITERAL:
LA33_55 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == DECIMAL_LITERAL:
LA33_56 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == CHARACTER_LITERAL:
LA33_57 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == STRING_LITERAL:
LA33_58 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
elif LA33 == FLOATING_POINT_LITERAL:
LA33_59 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
- elif LA33 == 71:
+ elif LA33 == 72:
LA33_60 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
- elif LA33 == 72:
+ elif LA33 == 73:
LA33_61 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
- elif LA33 == 65 or LA33 == 67 or LA33 == 68 or LA33 == 76 or LA33 == 77 or LA33 == 78:
+ elif LA33 == 66 or LA33 == 68 or LA33 == 69 or LA33 == 77 or LA33 == 78 or LA33 == 79:
LA33_62 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
- elif LA33 == 73:
+ elif LA33 == 74:
LA33_63 = self.input.LA(3)
- if (self.synpred69()) :
+ if (self.synpred70()) :
alt33 = 1
@@ -3020,7 +3039,7 @@ class CParser(Parser):
if alt33 == 1:
# C.g:0:0: declarator_suffix
- self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator823)
+ self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator838)
self.declarator_suffix()
self.following.pop()
if self.failed:
@@ -3059,7 +3078,7 @@ class CParser(Parser):
# $ANTLR start declarator_suffix
- # C.g:254:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );
+ # C.g:307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );
def declarator_suffix(self, ):
declarator_suffix_StartIndex = self.input.index()
@@ -3068,54 +3087,54 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 24):
return
- # C.g:255:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' )
+ # C.g:308:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' )
alt35 = 5
LA35_0 = self.input.LA(1)
- if (LA35_0 == 63) :
+ if (LA35_0 == 64) :
LA35_1 = self.input.LA(2)
- if (LA35_1 == 64) :
+ if (LA35_1 == 65) :
alt35 = 2
- elif ((IDENTIFIER <= LA35_1 <= FLOATING_POINT_LITERAL) or LA35_1 == 61 or LA35_1 == 65 or (67 <= LA35_1 <= 68) or (71 <= LA35_1 <= 73) or (76 <= LA35_1 <= 78)) :
+ elif ((IDENTIFIER <= LA35_1 <= FLOATING_POINT_LITERAL) or LA35_1 == 62 or LA35_1 == 66 or (68 <= LA35_1 <= 69) or (72 <= LA35_1 <= 74) or (77 <= LA35_1 <= 79)) :
alt35 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("254:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 1, self.input)
+ nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 1, self.input)
raise nvae
- elif (LA35_0 == 61) :
+ elif (LA35_0 == 62) :
LA35 = self.input.LA(2)
- if LA35 == 62:
+ if LA35 == 63:
alt35 = 5
+ elif LA35 == 29 or LA35 == 30 or LA35 == 31 or LA35 == 32 or LA35 == 33 or LA35 == 34 or LA35 == 35 or LA35 == 36 or LA35 == 37 or LA35 == 38 or LA35 == 39 or LA35 == 40 or LA35 == 41 or LA35 == 42 or LA35 == 45 or LA35 == 46 or LA35 == 48 or LA35 == 49 or LA35 == 50 or LA35 == 51 or LA35 == 52 or LA35 == 53 or LA35 == 54 or LA35 == 55 or LA35 == 56 or LA35 == 57 or LA35 == 58 or LA35 == 59 or LA35 == 60 or LA35 == 61 or LA35 == 66:
+ alt35 = 3
elif LA35 == IDENTIFIER:
- LA35_17 = self.input.LA(3)
+ LA35_29 = self.input.LA(3)
- if (self.synpred72()) :
+ if (self.synpred73()) :
alt35 = 3
- elif (self.synpred73()) :
+ elif (self.synpred74()) :
alt35 = 4
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("254:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 17, self.input)
+ nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 29, self.input)
raise nvae
- elif LA35 == 29 or LA35 == 30 or LA35 == 31 or LA35 == 32 or LA35 == 33 or LA35 == 34 or LA35 == 35 or LA35 == 36 or LA35 == 37 or LA35 == 38 or LA35 == 39 or LA35 == 40 or LA35 == 41 or LA35 == 42 or LA35 == 45 or LA35 == 46 or LA35 == 48 or LA35 == 49 or LA35 == 50 or LA35 == 51 or LA35 == 52 or LA35 == 53 or LA35 == 54 or LA35 == 55 or LA35 == 56 or LA35 == 57 or LA35 == 58 or LA35 == 59 or LA35 == 60 or LA35 == 65:
- alt35 = 3
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("254:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 2, self.input)
+ nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 2, self.input)
raise nvae
@@ -3124,71 +3143,71 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("254:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 0, self.input)
+ nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 0, self.input)
raise nvae
if alt35 == 1:
- # C.g:255:6: '[' constant_expression ']'
- self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix837)
+ # C.g:308:6: '[' constant_expression ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix852)
if self.failed:
return
- self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix839)
+ self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix854)
self.constant_expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix841)
+ self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix856)
if self.failed:
return
elif alt35 == 2:
- # C.g:256:9: '[' ']'
- self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix851)
+ # C.g:309:9: '[' ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix866)
if self.failed:
return
- self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix853)
+ self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix868)
if self.failed:
return
elif alt35 == 3:
- # C.g:257:9: '(' parameter_type_list ')'
- self.match(self.input, 61, self.FOLLOW_61_in_declarator_suffix863)
+ # C.g:310:9: '(' parameter_type_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix878)
if self.failed:
return
- self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix865)
+ self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix880)
self.parameter_type_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix867)
+ self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix882)
if self.failed:
return
elif alt35 == 4:
- # C.g:258:9: '(' identifier_list ')'
- self.match(self.input, 61, self.FOLLOW_61_in_declarator_suffix877)
+ # C.g:311:9: '(' identifier_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix892)
if self.failed:
return
- self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix879)
+ self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix894)
self.identifier_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix881)
+ self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix896)
if self.failed:
return
elif alt35 == 5:
- # C.g:259:9: '(' ')'
- self.match(self.input, 61, self.FOLLOW_61_in_declarator_suffix891)
+ # C.g:312:9: '(' ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix906)
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix893)
+ self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix908)
if self.failed:
return
@@ -3209,7 +3228,7 @@ class CParser(Parser):
# $ANTLR start pointer
- # C.g:262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );
+ # C.g:315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );
def pointer(self, ):
pointer_StartIndex = self.input.index()
@@ -3218,17 +3237,17 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 25):
return
- # C.g:263:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' )
+ # C.g:316:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' )
alt38 = 3
LA38_0 = self.input.LA(1)
- if (LA38_0 == 65) :
+ if (LA38_0 == 66) :
LA38 = self.input.LA(2)
- if LA38 == 58:
+ if LA38 == 66:
LA38_2 = self.input.LA(3)
- if (self.synpred76()) :
- alt38 = 1
+ if (self.synpred78()) :
+ alt38 = 2
elif (True) :
alt38 = 3
else:
@@ -3236,14 +3255,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 2, self.input)
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 2, self.input)
raise nvae
- elif LA38 == 59:
+ elif LA38 == 58:
LA38_3 = self.input.LA(3)
- if (self.synpred76()) :
+ if (self.synpred77()) :
alt38 = 1
elif (True) :
alt38 = 3
@@ -3252,14 +3271,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 3, self.input)
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 3, self.input)
raise nvae
- elif LA38 == 60:
+ elif LA38 == 59:
LA38_4 = self.input.LA(3)
- if (self.synpred76()) :
+ if (self.synpred77()) :
alt38 = 1
elif (True) :
alt38 = 3
@@ -3268,16 +3287,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 4, self.input)
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 4, self.input)
raise nvae
- elif LA38 == EOF or LA38 == IDENTIFIER or LA38 == 25 or LA38 == 26 or LA38 == 27 or LA38 == 28 or LA38 == 29 or LA38 == 30 or LA38 == 31 or LA38 == 32 or LA38 == 33 or LA38 == 34 or LA38 == 35 or LA38 == 36 or LA38 == 37 or LA38 == 38 or LA38 == 39 or LA38 == 40 or LA38 == 41 or LA38 == 42 or LA38 == 43 or LA38 == 45 or LA38 == 46 or LA38 == 47 or LA38 == 48 or LA38 == 61 or LA38 == 62 or LA38 == 63:
- alt38 = 3
- elif LA38 == 53:
- LA38_20 = self.input.LA(3)
+ elif LA38 == 60:
+ LA38_5 = self.input.LA(3)
- if (self.synpred76()) :
+ if (self.synpred77()) :
alt38 = 1
elif (True) :
alt38 = 3
@@ -3286,14 +3303,16 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 20, self.input)
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 5, self.input)
raise nvae
- elif LA38 == 49 or LA38 == 50 or LA38 == 51 or LA38 == 52 or LA38 == 54 or LA38 == 55 or LA38 == 56 or LA38 == 57:
- LA38_28 = self.input.LA(3)
+ elif LA38 == EOF or LA38 == IDENTIFIER or LA38 == 25 or LA38 == 26 or LA38 == 27 or LA38 == 28 or LA38 == 29 or LA38 == 30 or LA38 == 31 or LA38 == 32 or LA38 == 33 or LA38 == 34 or LA38 == 35 or LA38 == 36 or LA38 == 37 or LA38 == 38 or LA38 == 39 or LA38 == 40 or LA38 == 41 or LA38 == 42 or LA38 == 43 or LA38 == 45 or LA38 == 46 or LA38 == 47 or LA38 == 48 or LA38 == 62 or LA38 == 63 or LA38 == 64:
+ alt38 = 3
+ elif LA38 == 53:
+ LA38_21 = self.input.LA(3)
- if (self.synpred76()) :
+ if (self.synpred77()) :
alt38 = 1
elif (True) :
alt38 = 3
@@ -3302,15 +3321,15 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 28, self.input)
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 21, self.input)
raise nvae
- elif LA38 == 65:
+ elif LA38 == 49 or LA38 == 50 or LA38 == 51 or LA38 == 52 or LA38 == 54 or LA38 == 55 or LA38 == 56 or LA38 == 57 or LA38 == 61:
LA38_29 = self.input.LA(3)
if (self.synpred77()) :
- alt38 = 2
+ alt38 = 1
elif (True) :
alt38 = 3
else:
@@ -3318,7 +3337,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 29, self.input)
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 29, self.input)
raise nvae
@@ -3327,7 +3346,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 1, self.input)
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 1, self.input)
raise nvae
@@ -3336,16 +3355,16 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("262:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 0, self.input)
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 0, self.input)
raise nvae
if alt38 == 1:
- # C.g:263:4: '*' ( type_qualifier )+ ( pointer )?
- self.match(self.input, 65, self.FOLLOW_65_in_pointer904)
+ # C.g:316:4: '*' ( type_qualifier )+ ( pointer )?
+ self.match(self.input, 66, self.FOLLOW_66_in_pointer919)
if self.failed:
return
- # C.g:263:8: ( type_qualifier )+
+ # C.g:316:8: ( type_qualifier )+
cnt36 = 0
while True: #loop36
alt36 = 2
@@ -3353,42 +3372,42 @@ class CParser(Parser):
if LA36 == 58:
LA36_2 = self.input.LA(2)
- if (self.synpred74()) :
+ if (self.synpred75()) :
alt36 = 1
elif LA36 == 59:
LA36_3 = self.input.LA(2)
- if (self.synpred74()) :
+ if (self.synpred75()) :
alt36 = 1
elif LA36 == 60:
LA36_4 = self.input.LA(2)
- if (self.synpred74()) :
+ if (self.synpred75()) :
alt36 = 1
elif LA36 == 53:
LA36_20 = self.input.LA(2)
- if (self.synpred74()) :
+ if (self.synpred75()) :
alt36 = 1
- elif LA36 == 49 or LA36 == 50 or LA36 == 51 or LA36 == 52 or LA36 == 54 or LA36 == 55 or LA36 == 56 or LA36 == 57:
+ elif LA36 == 49 or LA36 == 50 or LA36 == 51 or LA36 == 52 or LA36 == 54 or LA36 == 55 or LA36 == 56 or LA36 == 57 or LA36 == 61:
LA36_28 = self.input.LA(2)
- if (self.synpred74()) :
+ if (self.synpred75()) :
alt36 = 1
if alt36 == 1:
# C.g:0:0: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_pointer906)
+ self.following.append(self.FOLLOW_type_qualifier_in_pointer921)
self.type_qualifier()
self.following.pop()
if self.failed:
@@ -3409,18 +3428,18 @@ class CParser(Parser):
cnt36 += 1
- # C.g:263:24: ( pointer )?
+ # C.g:316:24: ( pointer )?
alt37 = 2
LA37_0 = self.input.LA(1)
- if (LA37_0 == 65) :
+ if (LA37_0 == 66) :
LA37_1 = self.input.LA(2)
- if (self.synpred75()) :
+ if (self.synpred76()) :
alt37 = 1
if alt37 == 1:
# C.g:0:0: pointer
- self.following.append(self.FOLLOW_pointer_in_pointer909)
+ self.following.append(self.FOLLOW_pointer_in_pointer924)
self.pointer()
self.following.pop()
if self.failed:
@@ -3431,11 +3450,11 @@ class CParser(Parser):
elif alt38 == 2:
- # C.g:264:4: '*' pointer
- self.match(self.input, 65, self.FOLLOW_65_in_pointer915)
+ # C.g:317:4: '*' pointer
+ self.match(self.input, 66, self.FOLLOW_66_in_pointer930)
if self.failed:
return
- self.following.append(self.FOLLOW_pointer_in_pointer917)
+ self.following.append(self.FOLLOW_pointer_in_pointer932)
self.pointer()
self.following.pop()
if self.failed:
@@ -3443,8 +3462,8 @@ class CParser(Parser):
elif alt38 == 3:
- # C.g:265:4: '*'
- self.match(self.input, 65, self.FOLLOW_65_in_pointer922)
+ # C.g:318:4: '*'
+ self.match(self.input, 66, self.FOLLOW_66_in_pointer937)
if self.failed:
return
@@ -3465,7 +3484,7 @@ class CParser(Parser):
# $ANTLR start parameter_type_list
- # C.g:268:1: parameter_type_list : parameter_list ( ',' ( 'OPTIONAL' )? '...' )? ;
+ # C.g:321:1: parameter_type_list : parameter_list ( ',' ( 'OPTIONAL' )? '...' )? ;
def parameter_type_list(self, ):
parameter_type_list_StartIndex = self.input.index()
@@ -3474,39 +3493,39 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 26):
return
- # C.g:269:2: ( parameter_list ( ',' ( 'OPTIONAL' )? '...' )? )
- # C.g:269:4: parameter_list ( ',' ( 'OPTIONAL' )? '...' )?
- self.following.append(self.FOLLOW_parameter_list_in_parameter_type_list933)
+ # C.g:322:2: ( parameter_list ( ',' ( 'OPTIONAL' )? '...' )? )
+ # C.g:322:4: parameter_list ( ',' ( 'OPTIONAL' )? '...' )?
+ self.following.append(self.FOLLOW_parameter_list_in_parameter_type_list948)
self.parameter_list()
self.following.pop()
if self.failed:
return
- # C.g:269:19: ( ',' ( 'OPTIONAL' )? '...' )?
+ # C.g:322:19: ( ',' ( 'OPTIONAL' )? '...' )?
alt40 = 2
LA40_0 = self.input.LA(1)
if (LA40_0 == 27) :
alt40 = 1
if alt40 == 1:
- # C.g:269:20: ',' ( 'OPTIONAL' )? '...'
- self.match(self.input, 27, self.FOLLOW_27_in_parameter_type_list936)
+ # C.g:322:20: ',' ( 'OPTIONAL' )? '...'
+ self.match(self.input, 27, self.FOLLOW_27_in_parameter_type_list951)
if self.failed:
return
- # C.g:269:24: ( 'OPTIONAL' )?
+ # C.g:322:24: ( 'OPTIONAL' )?
alt39 = 2
LA39_0 = self.input.LA(1)
if (LA39_0 == 53) :
alt39 = 1
if alt39 == 1:
- # C.g:269:25: 'OPTIONAL'
- self.match(self.input, 53, self.FOLLOW_53_in_parameter_type_list939)
+ # C.g:322:25: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_parameter_type_list954)
if self.failed:
return
- self.match(self.input, 66, self.FOLLOW_66_in_parameter_type_list943)
+ self.match(self.input, 67, self.FOLLOW_67_in_parameter_type_list958)
if self.failed:
return
@@ -3531,7 +3550,7 @@ class CParser(Parser):
# $ANTLR start parameter_list
- # C.g:272:1: parameter_list : parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* ;
+ # C.g:325:1: parameter_list : parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* ;
def parameter_list(self, ):
parameter_list_StartIndex = self.input.index()
@@ -3540,14 +3559,14 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 27):
return
- # C.g:273:2: ( parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* )
- # C.g:273:4: parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )*
- self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list956)
+ # C.g:326:2: ( parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* )
+ # C.g:326:4: parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )*
+ self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list971)
self.parameter_declaration()
self.following.pop()
if self.failed:
return
- # C.g:273:26: ( ',' ( 'OPTIONAL' )? parameter_declaration )*
+ # C.g:326:26: ( ',' ( 'OPTIONAL' )? parameter_declaration )*
while True: #loop42
alt42 = 2
LA42_0 = self.input.LA(1)
@@ -3558,39 +3577,39 @@ class CParser(Parser):
if (LA42_1 == 53) :
LA42_3 = self.input.LA(3)
- if (self.synpred81()) :
+ if (self.synpred82()) :
alt42 = 1
- elif (LA42_1 == IDENTIFIER or (29 <= LA42_1 <= 42) or (45 <= LA42_1 <= 46) or (48 <= LA42_1 <= 52) or (54 <= LA42_1 <= 60) or LA42_1 == 65) :
+ elif (LA42_1 == IDENTIFIER or (29 <= LA42_1 <= 42) or (45 <= LA42_1 <= 46) or (48 <= LA42_1 <= 52) or (54 <= LA42_1 <= 61) or LA42_1 == 66) :
alt42 = 1
if alt42 == 1:
- # C.g:273:27: ',' ( 'OPTIONAL' )? parameter_declaration
- self.match(self.input, 27, self.FOLLOW_27_in_parameter_list959)
+ # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
+ self.match(self.input, 27, self.FOLLOW_27_in_parameter_list974)
if self.failed:
return
- # C.g:273:31: ( 'OPTIONAL' )?
+ # C.g:326:31: ( 'OPTIONAL' )?
alt41 = 2
LA41_0 = self.input.LA(1)
if (LA41_0 == 53) :
LA41_1 = self.input.LA(2)
- if (self.synpred80()) :
+ if (self.synpred81()) :
alt41 = 1
if alt41 == 1:
- # C.g:273:32: 'OPTIONAL'
- self.match(self.input, 53, self.FOLLOW_53_in_parameter_list962)
+ # C.g:326:32: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_parameter_list977)
if self.failed:
return
- self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list966)
+ self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list981)
self.parameter_declaration()
self.following.pop()
if self.failed:
@@ -3620,7 +3639,7 @@ class CParser(Parser):
# $ANTLR start parameter_declaration
- # C.g:276:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );
+ # C.g:329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );
def parameter_declaration(self, ):
parameter_declaration_StartIndex = self.input.index()
@@ -3629,15 +3648,15 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 28):
return
- # C.g:277:2: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER )
+ # C.g:330:2: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER )
alt46 = 2
LA46 = self.input.LA(1)
- if LA46 == 29 or LA46 == 30 or LA46 == 31 or LA46 == 32 or LA46 == 33 or LA46 == 34 or LA46 == 35 or LA46 == 36 or LA46 == 37 or LA46 == 38 or LA46 == 39 or LA46 == 40 or LA46 == 41 or LA46 == 42 or LA46 == 45 or LA46 == 46 or LA46 == 48 or LA46 == 49 or LA46 == 50 or LA46 == 51 or LA46 == 52 or LA46 == 53 or LA46 == 54 or LA46 == 55 or LA46 == 56 or LA46 == 57 or LA46 == 58 or LA46 == 59 or LA46 == 60:
+ if LA46 == 29 or LA46 == 30 or LA46 == 31 or LA46 == 32 or LA46 == 33 or LA46 == 34 or LA46 == 35 or LA46 == 36 or LA46 == 37 or LA46 == 38 or LA46 == 39 or LA46 == 40 or LA46 == 41 or LA46 == 42 or LA46 == 45 or LA46 == 46 or LA46 == 48 or LA46 == 49 or LA46 == 50 or LA46 == 51 or LA46 == 52 or LA46 == 53 or LA46 == 54 or LA46 == 55 or LA46 == 56 or LA46 == 57 or LA46 == 58 or LA46 == 59 or LA46 == 60 or LA46 == 61:
alt46 = 1
elif LA46 == IDENTIFIER:
LA46_13 = self.input.LA(2)
- if (self.synpred85()) :
+ if (self.synpred86()) :
alt46 = 1
elif (True) :
alt46 = 2
@@ -3646,108 +3665,108 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("276:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 13, self.input)
+ nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 13, self.input)
raise nvae
- elif LA46 == 65:
+ elif LA46 == 66:
alt46 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("276:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 0, self.input)
+ nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 0, self.input)
raise nvae
if alt46 == 1:
- # C.g:277:4: declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )?
- self.following.append(self.FOLLOW_declaration_specifiers_in_parameter_declaration979)
+ # C.g:330:4: declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )?
+ self.following.append(self.FOLLOW_declaration_specifiers_in_parameter_declaration994)
self.declaration_specifiers()
self.following.pop()
if self.failed:
return
- # C.g:277:27: ( declarator | abstract_declarator )*
+ # C.g:330:27: ( declarator | abstract_declarator )*
while True: #loop43
alt43 = 3
LA43 = self.input.LA(1)
- if LA43 == 65:
+ if LA43 == 66:
LA43_5 = self.input.LA(2)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt43 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt43 = 2
elif LA43 == IDENTIFIER or LA43 == 58 or LA43 == 59 or LA43 == 60:
alt43 = 1
- elif LA43 == 61:
+ elif LA43 == 62:
LA43 = self.input.LA(2)
- if LA43 == 29 or LA43 == 30 or LA43 == 31 or LA43 == 32 or LA43 == 33 or LA43 == 34 or LA43 == 35 or LA43 == 36 or LA43 == 37 or LA43 == 38 or LA43 == 39 or LA43 == 40 or LA43 == 41 or LA43 == 42 or LA43 == 45 or LA43 == 46 or LA43 == 48 or LA43 == 49 or LA43 == 50 or LA43 == 51 or LA43 == 52 or LA43 == 53 or LA43 == 54 or LA43 == 55 or LA43 == 56 or LA43 == 57 or LA43 == 62 or LA43 == 63:
+ if LA43 == 29 or LA43 == 30 or LA43 == 31 or LA43 == 32 or LA43 == 33 or LA43 == 34 or LA43 == 35 or LA43 == 36 or LA43 == 37 or LA43 == 38 or LA43 == 39 or LA43 == 40 or LA43 == 41 or LA43 == 42 or LA43 == 45 or LA43 == 46 or LA43 == 48 or LA43 == 49 or LA43 == 50 or LA43 == 51 or LA43 == 52 or LA43 == 53 or LA43 == 54 or LA43 == 55 or LA43 == 56 or LA43 == 57 or LA43 == 61 or LA43 == 63 or LA43 == 64:
alt43 = 2
elif LA43 == IDENTIFIER:
LA43_37 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt43 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt43 = 2
elif LA43 == 58:
LA43_38 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt43 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt43 = 2
- elif LA43 == 65:
+ elif LA43 == 66:
LA43_39 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt43 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt43 = 2
elif LA43 == 59:
LA43_40 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt43 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt43 = 2
elif LA43 == 60:
LA43_41 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt43 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt43 = 2
- elif LA43 == 61:
+ elif LA43 == 62:
LA43_43 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt43 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt43 = 2
- elif LA43 == 63:
+ elif LA43 == 64:
alt43 = 2
if alt43 == 1:
- # C.g:277:28: declarator
- self.following.append(self.FOLLOW_declarator_in_parameter_declaration982)
+ # C.g:330:28: declarator
+ self.following.append(self.FOLLOW_declarator_in_parameter_declaration997)
self.declarator()
self.following.pop()
if self.failed:
@@ -3755,8 +3774,8 @@ class CParser(Parser):
elif alt43 == 2:
- # C.g:277:39: abstract_declarator
- self.following.append(self.FOLLOW_abstract_declarator_in_parameter_declaration984)
+ # C.g:330:39: abstract_declarator
+ self.following.append(self.FOLLOW_abstract_declarator_in_parameter_declaration999)
self.abstract_declarator()
self.following.pop()
if self.failed:
@@ -3767,15 +3786,15 @@ class CParser(Parser):
break #loop43
- # C.g:277:61: ( 'OPTIONAL' )?
+ # C.g:330:61: ( 'OPTIONAL' )?
alt44 = 2
LA44_0 = self.input.LA(1)
if (LA44_0 == 53) :
alt44 = 1
if alt44 == 1:
- # C.g:277:62: 'OPTIONAL'
- self.match(self.input, 53, self.FOLLOW_53_in_parameter_declaration989)
+ # C.g:330:62: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_parameter_declaration1004)
if self.failed:
return
@@ -3784,19 +3803,19 @@ class CParser(Parser):
elif alt46 == 2:
- # C.g:279:4: ( pointer )* IDENTIFIER
- # C.g:279:4: ( pointer )*
+ # C.g:332:4: ( pointer )* IDENTIFIER
+ # C.g:332:4: ( pointer )*
while True: #loop45
alt45 = 2
LA45_0 = self.input.LA(1)
- if (LA45_0 == 65) :
+ if (LA45_0 == 66) :
alt45 = 1
if alt45 == 1:
# C.g:0:0: pointer
- self.following.append(self.FOLLOW_pointer_in_parameter_declaration998)
+ self.following.append(self.FOLLOW_pointer_in_parameter_declaration1013)
self.pointer()
self.following.pop()
if self.failed:
@@ -3807,7 +3826,7 @@ class CParser(Parser):
break #loop45
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_parameter_declaration1001)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_parameter_declaration1016)
if self.failed:
return
@@ -3828,7 +3847,7 @@ class CParser(Parser):
# $ANTLR start identifier_list
- # C.g:282:1: identifier_list : IDENTIFIER ( ',' IDENTIFIER )* ;
+ # C.g:335:1: identifier_list : IDENTIFIER ( ',' IDENTIFIER )* ;
def identifier_list(self, ):
identifier_list_StartIndex = self.input.index()
@@ -3837,12 +3856,12 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 29):
return
- # C.g:283:2: ( IDENTIFIER ( ',' IDENTIFIER )* )
- # C.g:283:4: IDENTIFIER ( ',' IDENTIFIER )*
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1012)
+ # C.g:336:2: ( IDENTIFIER ( ',' IDENTIFIER )* )
+ # C.g:336:4: IDENTIFIER ( ',' IDENTIFIER )*
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1027)
if self.failed:
return
- # C.g:284:2: ( ',' IDENTIFIER )*
+ # C.g:337:2: ( ',' IDENTIFIER )*
while True: #loop47
alt47 = 2
LA47_0 = self.input.LA(1)
@@ -3852,11 +3871,11 @@ class CParser(Parser):
if alt47 == 1:
- # C.g:284:3: ',' IDENTIFIER
- self.match(self.input, 27, self.FOLLOW_27_in_identifier_list1016)
+ # C.g:337:3: ',' IDENTIFIER
+ self.match(self.input, 27, self.FOLLOW_27_in_identifier_list1031)
if self.failed:
return
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1018)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1033)
if self.failed:
return
@@ -3884,7 +3903,7 @@ class CParser(Parser):
# $ANTLR start type_name
- # C.g:287:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );
+ # C.g:340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );
def type_name(self, ):
type_name_StartIndex = self.input.index()
@@ -3893,16 +3912,16 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 30):
return
- # C.g:288:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id )
+ # C.g:341:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id )
alt49 = 2
LA49_0 = self.input.LA(1)
- if ((34 <= LA49_0 <= 42) or (45 <= LA49_0 <= 46) or (48 <= LA49_0 <= 60)) :
+ if ((34 <= LA49_0 <= 42) or (45 <= LA49_0 <= 46) or (48 <= LA49_0 <= 61)) :
alt49 = 1
elif (LA49_0 == IDENTIFIER) :
LA49_13 = self.input.LA(2)
- if (self.synpred89()) :
+ if (self.synpred90()) :
alt49 = 1
elif (True) :
alt49 = 2
@@ -3911,7 +3930,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("287:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 13, self.input)
+ nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 13, self.input)
raise nvae
@@ -3920,26 +3939,26 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("287:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 0, self.input)
+ nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 0, self.input)
raise nvae
if alt49 == 1:
- # C.g:288:4: specifier_qualifier_list ( abstract_declarator )?
- self.following.append(self.FOLLOW_specifier_qualifier_list_in_type_name1031)
+ # C.g:341:4: specifier_qualifier_list ( abstract_declarator )?
+ self.following.append(self.FOLLOW_specifier_qualifier_list_in_type_name1046)
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
return
- # C.g:288:29: ( abstract_declarator )?
+ # C.g:341:29: ( abstract_declarator )?
alt48 = 2
LA48_0 = self.input.LA(1)
- if (LA48_0 == 61 or LA48_0 == 63 or LA48_0 == 65) :
+ if (LA48_0 == 62 or LA48_0 == 64 or LA48_0 == 66) :
alt48 = 1
if alt48 == 1:
# C.g:0:0: abstract_declarator
- self.following.append(self.FOLLOW_abstract_declarator_in_type_name1033)
+ self.following.append(self.FOLLOW_abstract_declarator_in_type_name1048)
self.abstract_declarator()
self.following.pop()
if self.failed:
@@ -3950,8 +3969,8 @@ class CParser(Parser):
elif alt49 == 2:
- # C.g:289:4: type_id
- self.following.append(self.FOLLOW_type_id_in_type_name1039)
+ # C.g:342:4: type_id
+ self.following.append(self.FOLLOW_type_id_in_type_name1054)
self.type_id()
self.following.pop()
if self.failed:
@@ -3974,7 +3993,7 @@ class CParser(Parser):
# $ANTLR start abstract_declarator
- # C.g:292:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );
+ # C.g:345:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );
def abstract_declarator(self, ):
abstract_declarator_StartIndex = self.input.index()
@@ -3983,211 +4002,211 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 31):
return
- # C.g:293:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator )
+ # C.g:346:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator )
alt51 = 2
LA51_0 = self.input.LA(1)
- if (LA51_0 == 65) :
+ if (LA51_0 == 66) :
alt51 = 1
- elif (LA51_0 == 61 or LA51_0 == 63) :
+ elif (LA51_0 == 62 or LA51_0 == 64) :
alt51 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("292:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 51, 0, self.input)
+ nvae = NoViableAltException("345:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 51, 0, self.input)
raise nvae
if alt51 == 1:
- # C.g:293:4: pointer ( direct_abstract_declarator )?
- self.following.append(self.FOLLOW_pointer_in_abstract_declarator1050)
+ # C.g:346:4: pointer ( direct_abstract_declarator )?
+ self.following.append(self.FOLLOW_pointer_in_abstract_declarator1065)
self.pointer()
self.following.pop()
if self.failed:
return
- # C.g:293:12: ( direct_abstract_declarator )?
+ # C.g:346:12: ( direct_abstract_declarator )?
alt50 = 2
LA50_0 = self.input.LA(1)
- if (LA50_0 == 61) :
+ if (LA50_0 == 62) :
LA50 = self.input.LA(2)
- if LA50 == 62:
+ if LA50 == 63:
LA50_12 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == 58:
LA50_13 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 65:
+ elif LA50 == 66:
LA50_14 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == 59:
LA50_15 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == 60:
LA50_16 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == IDENTIFIER:
LA50_17 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 61:
+ elif LA50 == 62:
LA50_18 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 29 or LA50 == 30 or LA50 == 31 or LA50 == 32 or LA50 == 33:
+ elif LA50 == 64:
LA50_19 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 34:
+ elif LA50 == 29 or LA50 == 30 or LA50 == 31 or LA50 == 32 or LA50 == 33:
LA50_20 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 35:
+ elif LA50 == 34:
LA50_21 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 36:
+ elif LA50 == 35:
LA50_22 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 37:
+ elif LA50 == 36:
LA50_23 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 38:
+ elif LA50 == 37:
LA50_24 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 39:
+ elif LA50 == 38:
LA50_25 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 40:
+ elif LA50 == 39:
LA50_26 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 41:
+ elif LA50 == 40:
LA50_27 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 42:
+ elif LA50 == 41:
LA50_28 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 45 or LA50 == 46:
+ elif LA50 == 42:
LA50_29 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 48:
+ elif LA50 == 45 or LA50 == 46:
LA50_30 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 49 or LA50 == 50 or LA50 == 51 or LA50 == 52 or LA50 == 53 or LA50 == 54 or LA50 == 55 or LA50 == 56 or LA50 == 57:
+ elif LA50 == 48:
LA50_31 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 63:
+ elif LA50 == 49 or LA50 == 50 or LA50 == 51 or LA50 == 52 or LA50 == 53 or LA50 == 54 or LA50 == 55 or LA50 == 56 or LA50 == 57 or LA50 == 61:
LA50_32 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif (LA50_0 == 63) :
+ elif (LA50_0 == 64) :
LA50 = self.input.LA(2)
- if LA50 == 64:
+ if LA50 == 65:
LA50_33 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 61:
+ elif LA50 == 62:
LA50_34 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == IDENTIFIER:
LA50_35 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == HEX_LITERAL:
LA50_36 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == OCTAL_LITERAL:
LA50_37 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == DECIMAL_LITERAL:
LA50_38 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == CHARACTER_LITERAL:
LA50_39 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == STRING_LITERAL:
LA50_40 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
elif LA50 == FLOATING_POINT_LITERAL:
LA50_41 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 71:
+ elif LA50 == 72:
LA50_42 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 72:
+ elif LA50 == 73:
LA50_43 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 65 or LA50 == 67 or LA50 == 68 or LA50 == 76 or LA50 == 77 or LA50 == 78:
+ elif LA50 == 66 or LA50 == 68 or LA50 == 69 or LA50 == 77 or LA50 == 78 or LA50 == 79:
LA50_44 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
- elif LA50 == 73:
+ elif LA50 == 74:
LA50_45 = self.input.LA(3)
- if (self.synpred90()) :
+ if (self.synpred91()) :
alt50 = 1
if alt50 == 1:
# C.g:0:0: direct_abstract_declarator
- self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator1052)
+ self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator1067)
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
@@ -4198,8 +4217,8 @@ class CParser(Parser):
elif alt51 == 2:
- # C.g:294:4: direct_abstract_declarator
- self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator1058)
+ # C.g:347:4: direct_abstract_declarator
+ self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator1073)
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
@@ -4222,7 +4241,7 @@ class CParser(Parser):
# $ANTLR start direct_abstract_declarator
- # C.g:297:1: direct_abstract_declarator : ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* ;
+ # C.g:350:1: direct_abstract_declarator : ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* ;
def direct_abstract_declarator(self, ):
direct_abstract_declarator_StartIndex = self.input.index()
@@ -4231,20 +4250,20 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 32):
return
- # C.g:298:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* )
- # C.g:298:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )*
- # C.g:298:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )
+ # C.g:351:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* )
+ # C.g:351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )*
+ # C.g:351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )
alt52 = 2
LA52_0 = self.input.LA(1)
- if (LA52_0 == 61) :
+ if (LA52_0 == 62) :
LA52 = self.input.LA(2)
- if LA52 == IDENTIFIER or LA52 == 29 or LA52 == 30 or LA52 == 31 or LA52 == 32 or LA52 == 33 or LA52 == 34 or LA52 == 35 or LA52 == 36 or LA52 == 37 or LA52 == 38 or LA52 == 39 or LA52 == 40 or LA52 == 41 or LA52 == 42 or LA52 == 45 or LA52 == 46 or LA52 == 48 or LA52 == 49 or LA52 == 50 or LA52 == 51 or LA52 == 52 or LA52 == 53 or LA52 == 54 or LA52 == 55 or LA52 == 56 or LA52 == 57 or LA52 == 58 or LA52 == 59 or LA52 == 60 or LA52 == 62:
+ if LA52 == IDENTIFIER or LA52 == 29 or LA52 == 30 or LA52 == 31 or LA52 == 32 or LA52 == 33 or LA52 == 34 or LA52 == 35 or LA52 == 36 or LA52 == 37 or LA52 == 38 or LA52 == 39 or LA52 == 40 or LA52 == 41 or LA52 == 42 or LA52 == 45 or LA52 == 46 or LA52 == 48 or LA52 == 49 or LA52 == 50 or LA52 == 51 or LA52 == 52 or LA52 == 53 or LA52 == 54 or LA52 == 55 or LA52 == 56 or LA52 == 57 or LA52 == 58 or LA52 == 59 or LA52 == 60 or LA52 == 61 or LA52 == 63:
alt52 = 2
- elif LA52 == 65:
+ elif LA52 == 66:
LA52_18 = self.input.LA(3)
- if (self.synpred92()) :
+ if (self.synpred93()) :
alt52 = 1
elif (True) :
alt52 = 2
@@ -4253,50 +4272,50 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("298:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 18, self.input)
+ nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 18, self.input)
raise nvae
- elif LA52 == 61 or LA52 == 63:
+ elif LA52 == 62 or LA52 == 64:
alt52 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("298:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 1, self.input)
+ nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 1, self.input)
raise nvae
- elif (LA52_0 == 63) :
+ elif (LA52_0 == 64) :
alt52 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("298:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 0, self.input)
+ nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 0, self.input)
raise nvae
if alt52 == 1:
- # C.g:298:6: '(' abstract_declarator ')'
- self.match(self.input, 61, self.FOLLOW_61_in_direct_abstract_declarator1071)
+ # C.g:351:6: '(' abstract_declarator ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_direct_abstract_declarator1086)
if self.failed:
return
- self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator1073)
+ self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator1088)
self.abstract_declarator()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_direct_abstract_declarator1075)
+ self.match(self.input, 63, self.FOLLOW_63_in_direct_abstract_declarator1090)
if self.failed:
return
elif alt52 == 2:
- # C.g:298:36: abstract_declarator_suffix
- self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1079)
+ # C.g:351:36: abstract_declarator_suffix
+ self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1094)
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
@@ -4304,237 +4323,237 @@ class CParser(Parser):
- # C.g:298:65: ( abstract_declarator_suffix )*
+ # C.g:351:65: ( abstract_declarator_suffix )*
while True: #loop53
alt53 = 2
LA53_0 = self.input.LA(1)
- if (LA53_0 == 61) :
+ if (LA53_0 == 62) :
LA53 = self.input.LA(2)
- if LA53 == 62:
+ if LA53 == 63:
LA53_12 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 58:
LA53_13 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
- elif LA53 == 65:
+ elif LA53 == 66:
LA53_14 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 59:
LA53_15 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 60:
LA53_16 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == IDENTIFIER:
LA53_17 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 29 or LA53 == 30 or LA53 == 31 or LA53 == 32 or LA53 == 33:
LA53_19 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 34:
LA53_20 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 35:
LA53_21 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 36:
LA53_22 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 37:
LA53_23 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 38:
LA53_24 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 39:
LA53_25 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 40:
LA53_26 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 41:
LA53_27 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 42:
LA53_28 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 45 or LA53 == 46:
LA53_29 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == 48:
LA53_30 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
- elif LA53 == 49 or LA53 == 50 or LA53 == 51 or LA53 == 52 or LA53 == 53 or LA53 == 54 or LA53 == 55 or LA53 == 56 or LA53 == 57:
+ elif LA53 == 49 or LA53 == 50 or LA53 == 51 or LA53 == 52 or LA53 == 53 or LA53 == 54 or LA53 == 55 or LA53 == 56 or LA53 == 57 or LA53 == 61:
LA53_31 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
- elif (LA53_0 == 63) :
+ elif (LA53_0 == 64) :
LA53 = self.input.LA(2)
- if LA53 == 64:
+ if LA53 == 65:
LA53_33 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
- elif LA53 == 61:
+ elif LA53 == 62:
LA53_34 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == IDENTIFIER:
LA53_35 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == HEX_LITERAL:
LA53_36 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == OCTAL_LITERAL:
LA53_37 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == DECIMAL_LITERAL:
LA53_38 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == CHARACTER_LITERAL:
LA53_39 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == STRING_LITERAL:
LA53_40 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
elif LA53 == FLOATING_POINT_LITERAL:
LA53_41 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
- elif LA53 == 71:
+ elif LA53 == 72:
LA53_42 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
- elif LA53 == 72:
+ elif LA53 == 73:
LA53_43 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
- elif LA53 == 65 or LA53 == 67 or LA53 == 68 or LA53 == 76 or LA53 == 77 or LA53 == 78:
+ elif LA53 == 66 or LA53 == 68 or LA53 == 69 or LA53 == 77 or LA53 == 78 or LA53 == 79:
LA53_44 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
- elif LA53 == 73:
+ elif LA53 == 74:
LA53_45 = self.input.LA(3)
- if (self.synpred93()) :
+ if (self.synpred94()) :
alt53 = 1
@@ -4543,7 +4562,7 @@ class CParser(Parser):
if alt53 == 1:
# C.g:0:0: abstract_declarator_suffix
- self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1083)
+ self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1098)
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
@@ -4573,7 +4592,7 @@ class CParser(Parser):
# $ANTLR start abstract_declarator_suffix
- # C.g:301:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );
+ # C.g:354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );
def abstract_declarator_suffix(self, ):
abstract_declarator_suffix_StartIndex = self.input.index()
@@ -4582,39 +4601,39 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 33):
return
- # C.g:302:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' )
+ # C.g:355:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' )
alt54 = 4
LA54_0 = self.input.LA(1)
- if (LA54_0 == 63) :
+ if (LA54_0 == 64) :
LA54_1 = self.input.LA(2)
- if (LA54_1 == 64) :
+ if (LA54_1 == 65) :
alt54 = 1
- elif ((IDENTIFIER <= LA54_1 <= FLOATING_POINT_LITERAL) or LA54_1 == 61 or LA54_1 == 65 or (67 <= LA54_1 <= 68) or (71 <= LA54_1 <= 73) or (76 <= LA54_1 <= 78)) :
+ elif ((IDENTIFIER <= LA54_1 <= FLOATING_POINT_LITERAL) or LA54_1 == 62 or LA54_1 == 66 or (68 <= LA54_1 <= 69) or (72 <= LA54_1 <= 74) or (77 <= LA54_1 <= 79)) :
alt54 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("301:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 1, self.input)
+ nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 1, self.input)
raise nvae
- elif (LA54_0 == 61) :
+ elif (LA54_0 == 62) :
LA54_2 = self.input.LA(2)
- if (LA54_2 == 62) :
+ if (LA54_2 == 63) :
alt54 = 3
- elif (LA54_2 == IDENTIFIER or (29 <= LA54_2 <= 42) or (45 <= LA54_2 <= 46) or (48 <= LA54_2 <= 60) or LA54_2 == 65) :
+ elif (LA54_2 == IDENTIFIER or (29 <= LA54_2 <= 42) or (45 <= LA54_2 <= 46) or (48 <= LA54_2 <= 61) or LA54_2 == 66) :
alt54 = 4
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("301:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 2, self.input)
+ nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 2, self.input)
raise nvae
@@ -4623,56 +4642,56 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("301:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 0, self.input)
+ nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 0, self.input)
raise nvae
if alt54 == 1:
- # C.g:302:4: '[' ']'
- self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1095)
+ # C.g:355:4: '[' ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1110)
if self.failed:
return
- self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1097)
+ self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1112)
if self.failed:
return
elif alt54 == 2:
- # C.g:303:4: '[' constant_expression ']'
- self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1102)
+ # C.g:356:4: '[' constant_expression ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1117)
if self.failed:
return
- self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix1104)
+ self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix1119)
self.constant_expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1106)
+ self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1121)
if self.failed:
return
elif alt54 == 3:
- # C.g:304:4: '(' ')'
- self.match(self.input, 61, self.FOLLOW_61_in_abstract_declarator_suffix1111)
+ # C.g:357:4: '(' ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1126)
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1113)
+ self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1128)
if self.failed:
return
elif alt54 == 4:
- # C.g:305:4: '(' parameter_type_list ')'
- self.match(self.input, 61, self.FOLLOW_61_in_abstract_declarator_suffix1118)
+ # C.g:358:4: '(' parameter_type_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1133)
if self.failed:
return
- self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1120)
+ self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1135)
self.parameter_type_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1122)
+ self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1137)
if self.failed:
return
@@ -4693,7 +4712,7 @@ class CParser(Parser):
# $ANTLR start initializer
- # C.g:308:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );
+ # C.g:361:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );
def initializer(self, ):
initializer_StartIndex = self.input.index()
@@ -4702,11 +4721,11 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 34):
return
- # C.g:310:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' )
+ # C.g:363:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' )
alt56 = 2
LA56_0 = self.input.LA(1)
- if ((IDENTIFIER <= LA56_0 <= FLOATING_POINT_LITERAL) or LA56_0 == 61 or LA56_0 == 65 or (67 <= LA56_0 <= 68) or (71 <= LA56_0 <= 73) or (76 <= LA56_0 <= 78)) :
+ if ((IDENTIFIER <= LA56_0 <= FLOATING_POINT_LITERAL) or LA56_0 == 62 or LA56_0 == 66 or (68 <= LA56_0 <= 69) or (72 <= LA56_0 <= 74) or (77 <= LA56_0 <= 79)) :
alt56 = 1
elif (LA56_0 == 43) :
alt56 = 2
@@ -4715,13 +4734,13 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("308:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 56, 0, self.input)
+ nvae = NoViableAltException("361:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 56, 0, self.input)
raise nvae
if alt56 == 1:
- # C.g:310:4: assignment_expression
- self.following.append(self.FOLLOW_assignment_expression_in_initializer1135)
+ # C.g:363:4: assignment_expression
+ self.following.append(self.FOLLOW_assignment_expression_in_initializer1150)
self.assignment_expression()
self.following.pop()
if self.failed:
@@ -4729,16 +4748,16 @@ class CParser(Parser):
elif alt56 == 2:
- # C.g:311:4: '{' initializer_list ( ',' )? '}'
- self.match(self.input, 43, self.FOLLOW_43_in_initializer1140)
+ # C.g:364:4: '{' initializer_list ( ',' )? '}'
+ self.match(self.input, 43, self.FOLLOW_43_in_initializer1155)
if self.failed:
return
- self.following.append(self.FOLLOW_initializer_list_in_initializer1142)
+ self.following.append(self.FOLLOW_initializer_list_in_initializer1157)
self.initializer_list()
self.following.pop()
if self.failed:
return
- # C.g:311:25: ( ',' )?
+ # C.g:364:25: ( ',' )?
alt55 = 2
LA55_0 = self.input.LA(1)
@@ -4746,13 +4765,13 @@ class CParser(Parser):
alt55 = 1
if alt55 == 1:
# C.g:0:0: ','
- self.match(self.input, 27, self.FOLLOW_27_in_initializer1144)
+ self.match(self.input, 27, self.FOLLOW_27_in_initializer1159)
if self.failed:
return
- self.match(self.input, 44, self.FOLLOW_44_in_initializer1147)
+ self.match(self.input, 44, self.FOLLOW_44_in_initializer1162)
if self.failed:
return
@@ -4773,7 +4792,7 @@ class CParser(Parser):
# $ANTLR start initializer_list
- # C.g:314:1: initializer_list : initializer ( ',' initializer )* ;
+ # C.g:367:1: initializer_list : initializer ( ',' initializer )* ;
def initializer_list(self, ):
initializer_list_StartIndex = self.input.index()
@@ -4782,14 +4801,14 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 35):
return
- # C.g:315:2: ( initializer ( ',' initializer )* )
- # C.g:315:4: initializer ( ',' initializer )*
- self.following.append(self.FOLLOW_initializer_in_initializer_list1158)
+ # C.g:368:2: ( initializer ( ',' initializer )* )
+ # C.g:368:4: initializer ( ',' initializer )*
+ self.following.append(self.FOLLOW_initializer_in_initializer_list1173)
self.initializer()
self.following.pop()
if self.failed:
return
- # C.g:315:16: ( ',' initializer )*
+ # C.g:368:16: ( ',' initializer )*
while True: #loop57
alt57 = 2
LA57_0 = self.input.LA(1)
@@ -4797,18 +4816,18 @@ class CParser(Parser):
if (LA57_0 == 27) :
LA57_1 = self.input.LA(2)
- if ((IDENTIFIER <= LA57_1 <= FLOATING_POINT_LITERAL) or LA57_1 == 43 or LA57_1 == 61 or LA57_1 == 65 or (67 <= LA57_1 <= 68) or (71 <= LA57_1 <= 73) or (76 <= LA57_1 <= 78)) :
+ if ((IDENTIFIER <= LA57_1 <= FLOATING_POINT_LITERAL) or LA57_1 == 43 or LA57_1 == 62 or LA57_1 == 66 or (68 <= LA57_1 <= 69) or (72 <= LA57_1 <= 74) or (77 <= LA57_1 <= 79)) :
alt57 = 1
if alt57 == 1:
- # C.g:315:17: ',' initializer
- self.match(self.input, 27, self.FOLLOW_27_in_initializer_list1161)
+ # C.g:368:17: ',' initializer
+ self.match(self.input, 27, self.FOLLOW_27_in_initializer_list1176)
if self.failed:
return
- self.following.append(self.FOLLOW_initializer_in_initializer_list1163)
+ self.following.append(self.FOLLOW_initializer_in_initializer_list1178)
self.initializer()
self.following.pop()
if self.failed:
@@ -4844,7 +4863,7 @@ class CParser(Parser):
# $ANTLR start argument_expression_list
- # C.g:320:1: argument_expression_list : assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )* ;
+ # C.g:373:1: argument_expression_list : assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )* ;
def argument_expression_list(self, ):
retval = self.argument_expression_list_return()
@@ -4855,28 +4874,28 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 36):
return retval
- # C.g:321:2: ( assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )* )
- # C.g:321:6: assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )*
- self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1181)
+ # C.g:374:2: ( assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )* )
+ # C.g:374:6: assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )*
+ self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1196)
self.assignment_expression()
self.following.pop()
if self.failed:
return retval
- # C.g:321:28: ( 'OPTIONAL' )?
+ # C.g:374:28: ( 'OPTIONAL' )?
alt58 = 2
LA58_0 = self.input.LA(1)
if (LA58_0 == 53) :
alt58 = 1
if alt58 == 1:
- # C.g:321:29: 'OPTIONAL'
- self.match(self.input, 53, self.FOLLOW_53_in_argument_expression_list1184)
+ # C.g:374:29: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_argument_expression_list1199)
if self.failed:
return retval
- # C.g:321:42: ( ',' assignment_expression ( 'OPTIONAL' )? )*
+ # C.g:374:42: ( ',' assignment_expression ( 'OPTIONAL' )? )*
while True: #loop60
alt60 = 2
LA60_0 = self.input.LA(1)
@@ -4886,24 +4905,24 @@ class CParser(Parser):
if alt60 == 1:
- # C.g:321:43: ',' assignment_expression ( 'OPTIONAL' )?
- self.match(self.input, 27, self.FOLLOW_27_in_argument_expression_list1189)
+ # C.g:374:43: ',' assignment_expression ( 'OPTIONAL' )?
+ self.match(self.input, 27, self.FOLLOW_27_in_argument_expression_list1204)
if self.failed:
return retval
- self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1191)
+ self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1206)
self.assignment_expression()
self.following.pop()
if self.failed:
return retval
- # C.g:321:69: ( 'OPTIONAL' )?
+ # C.g:374:69: ( 'OPTIONAL' )?
alt59 = 2
LA59_0 = self.input.LA(1)
if (LA59_0 == 53) :
alt59 = 1
if alt59 == 1:
- # C.g:321:70: 'OPTIONAL'
- self.match(self.input, 53, self.FOLLOW_53_in_argument_expression_list1194)
+ # C.g:374:70: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_argument_expression_list1209)
if self.failed:
return retval
@@ -4936,7 +4955,7 @@ class CParser(Parser):
# $ANTLR start additive_expression
- # C.g:324:1: additive_expression : ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* ;
+ # C.g:377:1: additive_expression : ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* ;
def additive_expression(self, ):
additive_expression_StartIndex = self.input.index()
@@ -4945,11 +4964,11 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 37):
return
- # C.g:325:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* )
- # C.g:325:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )*
- # C.g:325:4: ( multiplicative_expression )
- # C.g:325:5: multiplicative_expression
- self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1210)
+ # C.g:378:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* )
+ # C.g:378:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )*
+ # C.g:378:4: ( multiplicative_expression )
+ # C.g:378:5: multiplicative_expression
+ self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1225)
self.multiplicative_expression()
self.following.pop()
if self.failed:
@@ -4957,23 +4976,23 @@ class CParser(Parser):
- # C.g:325:32: ( '+' multiplicative_expression | '-' multiplicative_expression )*
+ # C.g:378:32: ( '+' multiplicative_expression | '-' multiplicative_expression )*
while True: #loop61
alt61 = 3
LA61_0 = self.input.LA(1)
- if (LA61_0 == 67) :
+ if (LA61_0 == 68) :
alt61 = 1
- elif (LA61_0 == 68) :
+ elif (LA61_0 == 69) :
alt61 = 2
if alt61 == 1:
- # C.g:325:33: '+' multiplicative_expression
- self.match(self.input, 67, self.FOLLOW_67_in_additive_expression1214)
+ # C.g:378:33: '+' multiplicative_expression
+ self.match(self.input, 68, self.FOLLOW_68_in_additive_expression1229)
if self.failed:
return
- self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1216)
+ self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1231)
self.multiplicative_expression()
self.following.pop()
if self.failed:
@@ -4981,11 +5000,11 @@ class CParser(Parser):
elif alt61 == 2:
- # C.g:325:65: '-' multiplicative_expression
- self.match(self.input, 68, self.FOLLOW_68_in_additive_expression1220)
+ # C.g:378:65: '-' multiplicative_expression
+ self.match(self.input, 69, self.FOLLOW_69_in_additive_expression1235)
if self.failed:
return
- self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1222)
+ self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1237)
self.multiplicative_expression()
self.following.pop()
if self.failed:
@@ -5015,7 +5034,7 @@ class CParser(Parser):
# $ANTLR start multiplicative_expression
- # C.g:328:1: multiplicative_expression : ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* ;
+ # C.g:381:1: multiplicative_expression : ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* ;
def multiplicative_expression(self, ):
multiplicative_expression_StartIndex = self.input.index()
@@ -5024,11 +5043,11 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 38):
return
- # C.g:329:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* )
- # C.g:329:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*
- # C.g:329:4: ( cast_expression )
- # C.g:329:5: cast_expression
- self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1236)
+ # C.g:382:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* )
+ # C.g:382:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*
+ # C.g:382:4: ( cast_expression )
+ # C.g:382:5: cast_expression
+ self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1251)
self.cast_expression()
self.following.pop()
if self.failed:
@@ -5036,23 +5055,23 @@ class CParser(Parser):
- # C.g:329:22: ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*
+ # C.g:382:22: ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*
while True: #loop62
alt62 = 4
LA62 = self.input.LA(1)
- if LA62 == 65:
+ if LA62 == 66:
alt62 = 1
- elif LA62 == 69:
- alt62 = 2
elif LA62 == 70:
+ alt62 = 2
+ elif LA62 == 71:
alt62 = 3
if alt62 == 1:
- # C.g:329:23: '*' cast_expression
- self.match(self.input, 65, self.FOLLOW_65_in_multiplicative_expression1240)
+ # C.g:382:23: '*' cast_expression
+ self.match(self.input, 66, self.FOLLOW_66_in_multiplicative_expression1255)
if self.failed:
return
- self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1242)
+ self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1257)
self.cast_expression()
self.following.pop()
if self.failed:
@@ -5060,11 +5079,11 @@ class CParser(Parser):
elif alt62 == 2:
- # C.g:329:45: '/' cast_expression
- self.match(self.input, 69, self.FOLLOW_69_in_multiplicative_expression1246)
+ # C.g:382:45: '/' cast_expression
+ self.match(self.input, 70, self.FOLLOW_70_in_multiplicative_expression1261)
if self.failed:
return
- self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1248)
+ self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1263)
self.cast_expression()
self.following.pop()
if self.failed:
@@ -5072,11 +5091,11 @@ class CParser(Parser):
elif alt62 == 3:
- # C.g:329:67: '%' cast_expression
- self.match(self.input, 70, self.FOLLOW_70_in_multiplicative_expression1252)
+ # C.g:382:67: '%' cast_expression
+ self.match(self.input, 71, self.FOLLOW_71_in_multiplicative_expression1267)
if self.failed:
return
- self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1254)
+ self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1269)
self.cast_expression()
self.following.pop()
if self.failed:
@@ -5106,7 +5125,7 @@ class CParser(Parser):
# $ANTLR start cast_expression
- # C.g:332:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );
+ # C.g:385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );
def cast_expression(self, ):
cast_expression_StartIndex = self.input.index()
@@ -5115,16 +5134,18 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 39):
return
- # C.g:333:2: ( '(' type_name ')' cast_expression | unary_expression )
+ # C.g:386:2: ( '(' type_name ')' cast_expression | unary_expression )
alt63 = 2
LA63_0 = self.input.LA(1)
- if (LA63_0 == 61) :
+ if (LA63_0 == 62) :
LA63 = self.input.LA(2)
- if LA63 == IDENTIFIER:
- LA63_13 = self.input.LA(3)
+ if LA63 == 34 or LA63 == 35 or LA63 == 36 or LA63 == 37 or LA63 == 38 or LA63 == 39 or LA63 == 40 or LA63 == 41 or LA63 == 42 or LA63 == 45 or LA63 == 46 or LA63 == 48 or LA63 == 49 or LA63 == 50 or LA63 == 51 or LA63 == 52 or LA63 == 53 or LA63 == 54 or LA63 == 55 or LA63 == 56 or LA63 == 57 or LA63 == 58 or LA63 == 59 or LA63 == 60 or LA63 == 61:
+ alt63 = 1
+ elif LA63 == IDENTIFIER:
+ LA63_25 = self.input.LA(3)
- if (self.synpred108()) :
+ if (self.synpred109()) :
alt63 = 1
elif (True) :
alt63 = 2
@@ -5133,48 +5154,46 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("332:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 13, self.input)
+ nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 25, self.input)
raise nvae
- elif LA63 == HEX_LITERAL or LA63 == OCTAL_LITERAL or LA63 == DECIMAL_LITERAL or LA63 == CHARACTER_LITERAL or LA63 == STRING_LITERAL or LA63 == FLOATING_POINT_LITERAL or LA63 == 61 or LA63 == 65 or LA63 == 67 or LA63 == 68 or LA63 == 71 or LA63 == 72 or LA63 == 73 or LA63 == 76 or LA63 == 77 or LA63 == 78:
+ elif LA63 == HEX_LITERAL or LA63 == OCTAL_LITERAL or LA63 == DECIMAL_LITERAL or LA63 == CHARACTER_LITERAL or LA63 == STRING_LITERAL or LA63 == FLOATING_POINT_LITERAL or LA63 == 62 or LA63 == 66 or LA63 == 68 or LA63 == 69 or LA63 == 72 or LA63 == 73 or LA63 == 74 or LA63 == 77 or LA63 == 78 or LA63 == 79:
alt63 = 2
- elif LA63 == 34 or LA63 == 35 or LA63 == 36 or LA63 == 37 or LA63 == 38 or LA63 == 39 or LA63 == 40 or LA63 == 41 or LA63 == 42 or LA63 == 45 or LA63 == 46 or LA63 == 48 or LA63 == 49 or LA63 == 50 or LA63 == 51 or LA63 == 52 or LA63 == 53 or LA63 == 54 or LA63 == 55 or LA63 == 56 or LA63 == 57 or LA63 == 58 or LA63 == 59 or LA63 == 60:
- alt63 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("332:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 1, self.input)
+ nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 1, self.input)
raise nvae
- elif ((IDENTIFIER <= LA63_0 <= FLOATING_POINT_LITERAL) or LA63_0 == 65 or (67 <= LA63_0 <= 68) or (71 <= LA63_0 <= 73) or (76 <= LA63_0 <= 78)) :
+ elif ((IDENTIFIER <= LA63_0 <= FLOATING_POINT_LITERAL) or LA63_0 == 66 or (68 <= LA63_0 <= 69) or (72 <= LA63_0 <= 74) or (77 <= LA63_0 <= 79)) :
alt63 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("332:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 0, self.input)
+ nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 0, self.input)
raise nvae
if alt63 == 1:
- # C.g:333:4: '(' type_name ')' cast_expression
- self.match(self.input, 61, self.FOLLOW_61_in_cast_expression1267)
+ # C.g:386:4: '(' type_name ')' cast_expression
+ self.match(self.input, 62, self.FOLLOW_62_in_cast_expression1282)
if self.failed:
return
- self.following.append(self.FOLLOW_type_name_in_cast_expression1269)
+ self.following.append(self.FOLLOW_type_name_in_cast_expression1284)
self.type_name()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_cast_expression1271)
+ self.match(self.input, 63, self.FOLLOW_63_in_cast_expression1286)
if self.failed:
return
- self.following.append(self.FOLLOW_cast_expression_in_cast_expression1273)
+ self.following.append(self.FOLLOW_cast_expression_in_cast_expression1288)
self.cast_expression()
self.following.pop()
if self.failed:
@@ -5182,8 +5201,8 @@ class CParser(Parser):
elif alt63 == 2:
- # C.g:334:4: unary_expression
- self.following.append(self.FOLLOW_unary_expression_in_cast_expression1278)
+ # C.g:387:4: unary_expression
+ self.following.append(self.FOLLOW_unary_expression_in_cast_expression1293)
self.unary_expression()
self.following.pop()
if self.failed:
@@ -5206,7 +5225,7 @@ class CParser(Parser):
# $ANTLR start unary_expression
- # C.g:337:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );
+ # C.g:390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );
def unary_expression(self, ):
unary_expression_StartIndex = self.input.index()
@@ -5215,24 +5234,24 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 40):
return
- # C.g:338:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' )
+ # C.g:391:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' )
alt64 = 6
LA64 = self.input.LA(1)
- if LA64 == IDENTIFIER or LA64 == HEX_LITERAL or LA64 == OCTAL_LITERAL or LA64 == DECIMAL_LITERAL or LA64 == CHARACTER_LITERAL or LA64 == STRING_LITERAL or LA64 == FLOATING_POINT_LITERAL or LA64 == 61:
+ if LA64 == IDENTIFIER or LA64 == HEX_LITERAL or LA64 == OCTAL_LITERAL or LA64 == DECIMAL_LITERAL or LA64 == CHARACTER_LITERAL or LA64 == STRING_LITERAL or LA64 == FLOATING_POINT_LITERAL or LA64 == 62:
alt64 = 1
- elif LA64 == 71:
- alt64 = 2
elif LA64 == 72:
+ alt64 = 2
+ elif LA64 == 73:
alt64 = 3
- elif LA64 == 65 or LA64 == 67 or LA64 == 68 or LA64 == 76 or LA64 == 77 or LA64 == 78:
+ elif LA64 == 66 or LA64 == 68 or LA64 == 69 or LA64 == 77 or LA64 == 78 or LA64 == 79:
alt64 = 4
- elif LA64 == 73:
+ elif LA64 == 74:
LA64_12 = self.input.LA(2)
- if (LA64_12 == 61) :
+ if (LA64_12 == 62) :
LA64_13 = self.input.LA(3)
- if (self.synpred113()) :
+ if (self.synpred114()) :
alt64 = 5
elif (True) :
alt64 = 6
@@ -5241,18 +5260,18 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("337:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 13, self.input)
+ nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 13, self.input)
raise nvae
- elif ((IDENTIFIER <= LA64_12 <= FLOATING_POINT_LITERAL) or LA64_12 == 65 or (67 <= LA64_12 <= 68) or (71 <= LA64_12 <= 73) or (76 <= LA64_12 <= 78)) :
+ elif ((IDENTIFIER <= LA64_12 <= FLOATING_POINT_LITERAL) or LA64_12 == 66 or (68 <= LA64_12 <= 69) or (72 <= LA64_12 <= 74) or (77 <= LA64_12 <= 79)) :
alt64 = 5
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("337:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 12, self.input)
+ nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 12, self.input)
raise nvae
@@ -5261,13 +5280,13 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("337:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 0, self.input)
+ nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 0, self.input)
raise nvae
if alt64 == 1:
- # C.g:338:4: postfix_expression
- self.following.append(self.FOLLOW_postfix_expression_in_unary_expression1289)
+ # C.g:391:4: postfix_expression
+ self.following.append(self.FOLLOW_postfix_expression_in_unary_expression1304)
self.postfix_expression()
self.following.pop()
if self.failed:
@@ -5275,11 +5294,11 @@ class CParser(Parser):
elif alt64 == 2:
- # C.g:339:4: '++' unary_expression
- self.match(self.input, 71, self.FOLLOW_71_in_unary_expression1294)
+ # C.g:392:4: '++' unary_expression
+ self.match(self.input, 72, self.FOLLOW_72_in_unary_expression1309)
if self.failed:
return
- self.following.append(self.FOLLOW_unary_expression_in_unary_expression1296)
+ self.following.append(self.FOLLOW_unary_expression_in_unary_expression1311)
self.unary_expression()
self.following.pop()
if self.failed:
@@ -5287,11 +5306,11 @@ class CParser(Parser):
elif alt64 == 3:
- # C.g:340:4: '--' unary_expression
- self.match(self.input, 72, self.FOLLOW_72_in_unary_expression1301)
+ # C.g:393:4: '--' unary_expression
+ self.match(self.input, 73, self.FOLLOW_73_in_unary_expression1316)
if self.failed:
return
- self.following.append(self.FOLLOW_unary_expression_in_unary_expression1303)
+ self.following.append(self.FOLLOW_unary_expression_in_unary_expression1318)
self.unary_expression()
self.following.pop()
if self.failed:
@@ -5299,13 +5318,13 @@ class CParser(Parser):
elif alt64 == 4:
- # C.g:341:4: unary_operator cast_expression
- self.following.append(self.FOLLOW_unary_operator_in_unary_expression1308)
+ # C.g:394:4: unary_operator cast_expression
+ self.following.append(self.FOLLOW_unary_operator_in_unary_expression1323)
self.unary_operator()
self.following.pop()
if self.failed:
return
- self.following.append(self.FOLLOW_cast_expression_in_unary_expression1310)
+ self.following.append(self.FOLLOW_cast_expression_in_unary_expression1325)
self.cast_expression()
self.following.pop()
if self.failed:
@@ -5313,11 +5332,11 @@ class CParser(Parser):
elif alt64 == 5:
- # C.g:342:4: 'sizeof' unary_expression
- self.match(self.input, 73, self.FOLLOW_73_in_unary_expression1315)
+ # C.g:395:4: 'sizeof' unary_expression
+ self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1330)
if self.failed:
return
- self.following.append(self.FOLLOW_unary_expression_in_unary_expression1317)
+ self.following.append(self.FOLLOW_unary_expression_in_unary_expression1332)
self.unary_expression()
self.following.pop()
if self.failed:
@@ -5325,19 +5344,19 @@ class CParser(Parser):
elif alt64 == 6:
- # C.g:343:4: 'sizeof' '(' type_name ')'
- self.match(self.input, 73, self.FOLLOW_73_in_unary_expression1322)
+ # C.g:396:4: 'sizeof' '(' type_name ')'
+ self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1337)
if self.failed:
return
- self.match(self.input, 61, self.FOLLOW_61_in_unary_expression1324)
+ self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1339)
if self.failed:
return
- self.following.append(self.FOLLOW_type_name_in_unary_expression1326)
+ self.following.append(self.FOLLOW_type_name_in_unary_expression1341)
self.type_name()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1328)
+ self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1343)
if self.failed:
return
@@ -5358,7 +5377,7 @@ class CParser(Parser):
# $ANTLR start postfix_expression
- # C.g:346:1: postfix_expression : p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* ;
+ # C.g:399:1: postfix_expression : p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* ;
def postfix_expression(self, ):
self.postfix_expression_stack.append(postfix_expression_scope())
postfix_expression_StartIndex = self.input.index()
@@ -5380,9 +5399,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 41):
return
- # C.g:353:2: (p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* )
- # C.g:353:6: p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*
- self.following.append(self.FOLLOW_primary_expression_in_postfix_expression1352)
+ # C.g:406:2: (p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* )
+ # C.g:406:6: p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*
+ self.following.append(self.FOLLOW_primary_expression_in_postfix_expression1367)
p = self.primary_expression()
self.following.pop()
if self.failed:
@@ -5390,82 +5409,82 @@ class CParser(Parser):
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText += self.input.toString(p.start,p.stop)
- # C.g:354:9: ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*
+ # C.g:407:9: ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*
while True: #loop65
alt65 = 10
LA65 = self.input.LA(1)
- if LA65 == 65:
+ if LA65 == 66:
LA65_1 = self.input.LA(2)
if (LA65_1 == IDENTIFIER) :
LA65_30 = self.input.LA(3)
- if (self.synpred119()) :
+ if (self.synpred120()) :
alt65 = 6
- elif LA65 == 63:
+ elif LA65 == 64:
alt65 = 1
- elif LA65 == 61:
+ elif LA65 == 62:
LA65 = self.input.LA(2)
- if LA65 == 62:
+ if LA65 == 63:
alt65 = 2
+ elif LA65 == 29 or LA65 == 30 or LA65 == 31 or LA65 == 32 or LA65 == 33 or LA65 == 34 or LA65 == 35 or LA65 == 36 or LA65 == 37 or LA65 == 38 or LA65 == 39 or LA65 == 40 or LA65 == 41 or LA65 == 42 or LA65 == 45 or LA65 == 46 or LA65 == 48 or LA65 == 49 or LA65 == 50 or LA65 == 51 or LA65 == 52 or LA65 == 53 or LA65 == 54 or LA65 == 55 or LA65 == 56 or LA65 == 57 or LA65 == 58 or LA65 == 59 or LA65 == 60 or LA65 == 61:
+ alt65 = 4
elif LA65 == IDENTIFIER:
- LA65_43 = self.input.LA(3)
+ LA65_55 = self.input.LA(3)
- if (self.synpred116()) :
+ if (self.synpred117()) :
alt65 = 3
- elif (self.synpred117()) :
+ elif (self.synpred118()) :
alt65 = 4
- elif LA65 == HEX_LITERAL or LA65 == OCTAL_LITERAL or LA65 == DECIMAL_LITERAL or LA65 == CHARACTER_LITERAL or LA65 == STRING_LITERAL or LA65 == FLOATING_POINT_LITERAL or LA65 == 61 or LA65 == 67 or LA65 == 68 or LA65 == 71 or LA65 == 72 or LA65 == 73 or LA65 == 76 or LA65 == 77 or LA65 == 78:
- alt65 = 3
- elif LA65 == 65:
- LA65_53 = self.input.LA(3)
+ elif LA65 == 66:
+ LA65_57 = self.input.LA(3)
- if (self.synpred116()) :
+ if (self.synpred117()) :
alt65 = 3
- elif (self.synpred117()) :
+ elif (self.synpred118()) :
alt65 = 4
- elif LA65 == 29 or LA65 == 30 or LA65 == 31 or LA65 == 32 or LA65 == 33 or LA65 == 34 or LA65 == 35 or LA65 == 36 or LA65 == 37 or LA65 == 38 or LA65 == 39 or LA65 == 40 or LA65 == 41 or LA65 == 42 or LA65 == 45 or LA65 == 46 or LA65 == 48 or LA65 == 49 or LA65 == 50 or LA65 == 51 or LA65 == 52 or LA65 == 53 or LA65 == 54 or LA65 == 55 or LA65 == 56 or LA65 == 57 or LA65 == 58 or LA65 == 59 or LA65 == 60:
- alt65 = 4
+ elif LA65 == HEX_LITERAL or LA65 == OCTAL_LITERAL or LA65 == DECIMAL_LITERAL or LA65 == CHARACTER_LITERAL or LA65 == STRING_LITERAL or LA65 == FLOATING_POINT_LITERAL or LA65 == 62 or LA65 == 68 or LA65 == 69 or LA65 == 72 or LA65 == 73 or LA65 == 74 or LA65 == 77 or LA65 == 78 or LA65 == 79:
+ alt65 = 3
- elif LA65 == 74:
- alt65 = 5
elif LA65 == 75:
+ alt65 = 5
+ elif LA65 == 76:
alt65 = 7
- elif LA65 == 71:
- alt65 = 8
elif LA65 == 72:
+ alt65 = 8
+ elif LA65 == 73:
alt65 = 9
if alt65 == 1:
- # C.g:354:13: '[' expression ']'
- self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1368)
+ # C.g:407:13: '[' expression ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1383)
if self.failed:
return
- self.following.append(self.FOLLOW_expression_in_postfix_expression1370)
+ self.following.append(self.FOLLOW_expression_in_postfix_expression1385)
self.expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1372)
+ self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1387)
if self.failed:
return
elif alt65 == 2:
- # C.g:355:13: '(' a= ')'
- self.match(self.input, 61, self.FOLLOW_61_in_postfix_expression1386)
+ # C.g:408:13: '(' a= ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1401)
if self.failed:
return
a = self.input.LT(1)
- self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1390)
+ self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1405)
if self.failed:
return
if self.backtracking == 0:
@@ -5474,17 +5493,17 @@ class CParser(Parser):
elif alt65 == 3:
- # C.g:356:13: '(' c= argument_expression_list b= ')'
- self.match(self.input, 61, self.FOLLOW_61_in_postfix_expression1405)
+ # C.g:409:13: '(' c= argument_expression_list b= ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1420)
if self.failed:
return
- self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1409)
+ self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1424)
c = self.argument_expression_list()
self.following.pop()
if self.failed:
return
b = self.input.LT(1)
- self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1413)
+ self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1428)
if self.failed:
return
if self.backtracking == 0:
@@ -5493,27 +5512,27 @@ class CParser(Parser):
elif alt65 == 4:
- # C.g:357:13: '(' macro_parameter_list ')'
- self.match(self.input, 61, self.FOLLOW_61_in_postfix_expression1429)
+ # C.g:410:13: '(' macro_parameter_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1444)
if self.failed:
return
- self.following.append(self.FOLLOW_macro_parameter_list_in_postfix_expression1431)
+ self.following.append(self.FOLLOW_macro_parameter_list_in_postfix_expression1446)
self.macro_parameter_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1433)
+ self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1448)
if self.failed:
return
elif alt65 == 5:
- # C.g:358:13: '.' x= IDENTIFIER
- self.match(self.input, 74, self.FOLLOW_74_in_postfix_expression1447)
+ # C.g:411:13: '.' x= IDENTIFIER
+ self.match(self.input, 75, self.FOLLOW_75_in_postfix_expression1462)
if self.failed:
return
x = self.input.LT(1)
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1451)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1466)
if self.failed:
return
if self.backtracking == 0:
@@ -5522,12 +5541,12 @@ class CParser(Parser):
elif alt65 == 6:
- # C.g:359:13: '*' y= IDENTIFIER
- self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1467)
+ # C.g:412:13: '*' y= IDENTIFIER
+ self.match(self.input, 66, self.FOLLOW_66_in_postfix_expression1482)
if self.failed:
return
y = self.input.LT(1)
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1471)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1486)
if self.failed:
return
if self.backtracking == 0:
@@ -5536,12 +5555,12 @@ class CParser(Parser):
elif alt65 == 7:
- # C.g:360:13: '->' z= IDENTIFIER
- self.match(self.input, 75, self.FOLLOW_75_in_postfix_expression1487)
+ # C.g:413:13: '->' z= IDENTIFIER
+ self.match(self.input, 76, self.FOLLOW_76_in_postfix_expression1502)
if self.failed:
return
z = self.input.LT(1)
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1491)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1506)
if self.failed:
return
if self.backtracking == 0:
@@ -5550,15 +5569,15 @@ class CParser(Parser):
elif alt65 == 8:
- # C.g:361:13: '++'
- self.match(self.input, 71, self.FOLLOW_71_in_postfix_expression1507)
+ # C.g:414:13: '++'
+ self.match(self.input, 72, self.FOLLOW_72_in_postfix_expression1522)
if self.failed:
return
elif alt65 == 9:
- # C.g:362:13: '--'
- self.match(self.input, 72, self.FOLLOW_72_in_postfix_expression1521)
+ # C.g:415:13: '--'
+ self.match(self.input, 73, self.FOLLOW_73_in_postfix_expression1536)
if self.failed:
return
@@ -5587,7 +5606,7 @@ class CParser(Parser):
# $ANTLR start macro_parameter_list
- # C.g:366:1: macro_parameter_list : parameter_declaration ( ',' parameter_declaration )* ;
+ # C.g:419:1: macro_parameter_list : parameter_declaration ( ',' parameter_declaration )* ;
def macro_parameter_list(self, ):
macro_parameter_list_StartIndex = self.input.index()
@@ -5596,14 +5615,14 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 42):
return
- # C.g:367:2: ( parameter_declaration ( ',' parameter_declaration )* )
- # C.g:367:4: parameter_declaration ( ',' parameter_declaration )*
- self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1544)
+ # C.g:420:2: ( parameter_declaration ( ',' parameter_declaration )* )
+ # C.g:420:4: parameter_declaration ( ',' parameter_declaration )*
+ self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1559)
self.parameter_declaration()
self.following.pop()
if self.failed:
return
- # C.g:367:26: ( ',' parameter_declaration )*
+ # C.g:420:26: ( ',' parameter_declaration )*
while True: #loop66
alt66 = 2
LA66_0 = self.input.LA(1)
@@ -5613,11 +5632,11 @@ class CParser(Parser):
if alt66 == 1:
- # C.g:367:27: ',' parameter_declaration
- self.match(self.input, 27, self.FOLLOW_27_in_macro_parameter_list1547)
+ # C.g:420:27: ',' parameter_declaration
+ self.match(self.input, 27, self.FOLLOW_27_in_macro_parameter_list1562)
if self.failed:
return
- self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1549)
+ self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1564)
self.parameter_declaration()
self.following.pop()
if self.failed:
@@ -5647,7 +5666,7 @@ class CParser(Parser):
# $ANTLR start unary_operator
- # C.g:370:1: unary_operator : ( '&' | '*' | '+' | '-' | '~' | '!' );
+ # C.g:423:1: unary_operator : ( '&' | '*' | '+' | '-' | '~' | '!' );
def unary_operator(self, ):
unary_operator_StartIndex = self.input.index()
@@ -5656,9 +5675,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 43):
return
- # C.g:371:2: ( '&' | '*' | '+' | '-' | '~' | '!' )
+ # C.g:424:2: ( '&' | '*' | '+' | '-' | '~' | '!' )
# C.g:
- if self.input.LA(1) == 65 or (67 <= self.input.LA(1) <= 68) or (76 <= self.input.LA(1) <= 78):
+ if self.input.LA(1) == 66 or (68 <= self.input.LA(1) <= 69) or (77 <= self.input.LA(1) <= 79):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -5700,7 +5719,7 @@ class CParser(Parser):
# $ANTLR start primary_expression
- # C.g:379:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );
+ # C.g:432:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );
def primary_expression(self, ):
retval = self.primary_expression_return()
@@ -5711,48 +5730,48 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 44):
return retval
- # C.g:380:2: ( IDENTIFIER | constant | '(' expression ')' )
+ # C.g:433:2: ( IDENTIFIER | constant | '(' expression ')' )
alt67 = 3
LA67 = self.input.LA(1)
if LA67 == IDENTIFIER:
LA67_1 = self.input.LA(2)
- if (LA67_1 == IDENTIFIER or LA67_1 == STRING_LITERAL) :
- alt67 = 2
- elif (LA67_1 == EOF or LA67_1 == 25 or (27 <= LA67_1 <= 28) or LA67_1 == 44 or LA67_1 == 47 or LA67_1 == 53 or (61 <= LA67_1 <= 65) or (67 <= LA67_1 <= 72) or (74 <= LA67_1 <= 76) or (79 <= LA67_1 <= 101)) :
+ if (LA67_1 == EOF or LA67_1 == 25 or (27 <= LA67_1 <= 28) or LA67_1 == 44 or LA67_1 == 47 or LA67_1 == 53 or (62 <= LA67_1 <= 66) or (68 <= LA67_1 <= 73) or (75 <= LA67_1 <= 77) or (80 <= LA67_1 <= 102)) :
alt67 = 1
+ elif (LA67_1 == IDENTIFIER or LA67_1 == STRING_LITERAL) :
+ alt67 = 2
else:
if self.backtracking > 0:
self.failed = True
return retval
- nvae = NoViableAltException("379:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );", 67, 1, self.input)
+ nvae = NoViableAltException("432:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );", 67, 1, self.input)
raise nvae
elif LA67 == HEX_LITERAL or LA67 == OCTAL_LITERAL or LA67 == DECIMAL_LITERAL or LA67 == CHARACTER_LITERAL or LA67 == STRING_LITERAL or LA67 == FLOATING_POINT_LITERAL:
alt67 = 2
- elif LA67 == 61:
+ elif LA67 == 62:
alt67 = 3
else:
if self.backtracking > 0:
self.failed = True
return retval
- nvae = NoViableAltException("379:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );", 67, 0, self.input)
+ nvae = NoViableAltException("432:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );", 67, 0, self.input)
raise nvae
if alt67 == 1:
- # C.g:380:4: IDENTIFIER
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_primary_expression1598)
+ # C.g:433:4: IDENTIFIER
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_primary_expression1613)
if self.failed:
return retval
elif alt67 == 2:
- # C.g:381:4: constant
- self.following.append(self.FOLLOW_constant_in_primary_expression1603)
+ # C.g:434:4: constant
+ self.following.append(self.FOLLOW_constant_in_primary_expression1618)
self.constant()
self.following.pop()
if self.failed:
@@ -5760,16 +5779,16 @@ class CParser(Parser):
elif alt67 == 3:
- # C.g:382:4: '(' expression ')'
- self.match(self.input, 61, self.FOLLOW_61_in_primary_expression1608)
+ # C.g:435:4: '(' expression ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_primary_expression1623)
if self.failed:
return retval
- self.following.append(self.FOLLOW_expression_in_primary_expression1610)
+ self.following.append(self.FOLLOW_expression_in_primary_expression1625)
self.expression()
self.following.pop()
if self.failed:
return retval
- self.match(self.input, 62, self.FOLLOW_62_in_primary_expression1612)
+ self.match(self.input, 63, self.FOLLOW_63_in_primary_expression1627)
if self.failed:
return retval
@@ -5792,7 +5811,7 @@ class CParser(Parser):
# $ANTLR start constant
- # C.g:385:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );
+ # C.g:438:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );
def constant(self, ):
constant_StartIndex = self.input.index()
@@ -5801,7 +5820,7 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 45):
return
- # C.g:386:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL )
+ # C.g:439:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL )
alt72 = 6
LA72 = self.input.LA(1)
if LA72 == HEX_LITERAL:
@@ -5821,41 +5840,41 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("385:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );", 72, 0, self.input)
+ nvae = NoViableAltException("438:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );", 72, 0, self.input)
raise nvae
if alt72 == 1:
- # C.g:386:9: HEX_LITERAL
- self.match(self.input, HEX_LITERAL, self.FOLLOW_HEX_LITERAL_in_constant1628)
+ # C.g:439:9: HEX_LITERAL
+ self.match(self.input, HEX_LITERAL, self.FOLLOW_HEX_LITERAL_in_constant1643)
if self.failed:
return
elif alt72 == 2:
- # C.g:387:9: OCTAL_LITERAL
- self.match(self.input, OCTAL_LITERAL, self.FOLLOW_OCTAL_LITERAL_in_constant1638)
+ # C.g:440:9: OCTAL_LITERAL
+ self.match(self.input, OCTAL_LITERAL, self.FOLLOW_OCTAL_LITERAL_in_constant1653)
if self.failed:
return
elif alt72 == 3:
- # C.g:388:9: DECIMAL_LITERAL
- self.match(self.input, DECIMAL_LITERAL, self.FOLLOW_DECIMAL_LITERAL_in_constant1648)
+ # C.g:441:9: DECIMAL_LITERAL
+ self.match(self.input, DECIMAL_LITERAL, self.FOLLOW_DECIMAL_LITERAL_in_constant1663)
if self.failed:
return
elif alt72 == 4:
- # C.g:389:7: CHARACTER_LITERAL
- self.match(self.input, CHARACTER_LITERAL, self.FOLLOW_CHARACTER_LITERAL_in_constant1656)
+ # C.g:442:7: CHARACTER_LITERAL
+ self.match(self.input, CHARACTER_LITERAL, self.FOLLOW_CHARACTER_LITERAL_in_constant1671)
if self.failed:
return
elif alt72 == 5:
- # C.g:390:7: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )*
- # C.g:390:7: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+
+ # C.g:443:7: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )*
+ # C.g:443:7: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+
cnt70 = 0
while True: #loop70
alt70 = 2
@@ -5864,15 +5883,15 @@ class CParser(Parser):
if (LA70_0 == IDENTIFIER) :
LA70_1 = self.input.LA(2)
- if (LA70_1 == IDENTIFIER) :
- LA70_61 = self.input.LA(3)
+ if (LA70_1 == STRING_LITERAL) :
+ alt70 = 1
+ elif (LA70_1 == IDENTIFIER) :
+ LA70_33 = self.input.LA(3)
- if (self.synpred137()) :
+ if (self.synpred138()) :
alt70 = 1
- elif (LA70_1 == STRING_LITERAL) :
- alt70 = 1
elif (LA70_0 == STRING_LITERAL) :
@@ -5880,8 +5899,8 @@ class CParser(Parser):
if alt70 == 1:
- # C.g:390:8: ( IDENTIFIER )* ( STRING_LITERAL )+
- # C.g:390:8: ( IDENTIFIER )*
+ # C.g:443:8: ( IDENTIFIER )* ( STRING_LITERAL )+
+ # C.g:443:8: ( IDENTIFIER )*
while True: #loop68
alt68 = 2
LA68_0 = self.input.LA(1)
@@ -5892,7 +5911,7 @@ class CParser(Parser):
if alt68 == 1:
# C.g:0:0: IDENTIFIER
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1665)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1680)
if self.failed:
return
@@ -5901,7 +5920,7 @@ class CParser(Parser):
break #loop68
- # C.g:390:20: ( STRING_LITERAL )+
+ # C.g:443:20: ( STRING_LITERAL )+
cnt69 = 0
while True: #loop69
alt69 = 2
@@ -5910,7 +5929,7 @@ class CParser(Parser):
if (LA69_0 == STRING_LITERAL) :
LA69_31 = self.input.LA(2)
- if (self.synpred136()) :
+ if (self.synpred137()) :
alt69 = 1
@@ -5918,7 +5937,7 @@ class CParser(Parser):
if alt69 == 1:
# C.g:0:0: STRING_LITERAL
- self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_constant1668)
+ self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_constant1683)
if self.failed:
return
@@ -5953,7 +5972,7 @@ class CParser(Parser):
cnt70 += 1
- # C.g:390:38: ( IDENTIFIER )*
+ # C.g:443:38: ( IDENTIFIER )*
while True: #loop71
alt71 = 2
LA71_0 = self.input.LA(1)
@@ -5964,7 +5983,7 @@ class CParser(Parser):
if alt71 == 1:
# C.g:0:0: IDENTIFIER
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1673)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1688)
if self.failed:
return
@@ -5976,8 +5995,8 @@ class CParser(Parser):
elif alt72 == 6:
- # C.g:391:9: FLOATING_POINT_LITERAL
- self.match(self.input, FLOATING_POINT_LITERAL, self.FOLLOW_FLOATING_POINT_LITERAL_in_constant1684)
+ # C.g:444:9: FLOATING_POINT_LITERAL
+ self.match(self.input, FLOATING_POINT_LITERAL, self.FOLLOW_FLOATING_POINT_LITERAL_in_constant1699)
if self.failed:
return
@@ -6004,7 +6023,7 @@ class CParser(Parser):
# $ANTLR start expression
- # C.g:396:1: expression : assignment_expression ( ',' assignment_expression )* ;
+ # C.g:449:1: expression : assignment_expression ( ',' assignment_expression )* ;
def expression(self, ):
retval = self.expression_return()
@@ -6015,14 +6034,14 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 46):
return retval
- # C.g:397:2: ( assignment_expression ( ',' assignment_expression )* )
- # C.g:397:4: assignment_expression ( ',' assignment_expression )*
- self.following.append(self.FOLLOW_assignment_expression_in_expression1700)
+ # C.g:450:2: ( assignment_expression ( ',' assignment_expression )* )
+ # C.g:450:4: assignment_expression ( ',' assignment_expression )*
+ self.following.append(self.FOLLOW_assignment_expression_in_expression1715)
self.assignment_expression()
self.following.pop()
if self.failed:
return retval
- # C.g:397:26: ( ',' assignment_expression )*
+ # C.g:450:26: ( ',' assignment_expression )*
while True: #loop73
alt73 = 2
LA73_0 = self.input.LA(1)
@@ -6032,11 +6051,11 @@ class CParser(Parser):
if alt73 == 1:
- # C.g:397:27: ',' assignment_expression
- self.match(self.input, 27, self.FOLLOW_27_in_expression1703)
+ # C.g:450:27: ',' assignment_expression
+ self.match(self.input, 27, self.FOLLOW_27_in_expression1718)
if self.failed:
return retval
- self.following.append(self.FOLLOW_assignment_expression_in_expression1705)
+ self.following.append(self.FOLLOW_assignment_expression_in_expression1720)
self.assignment_expression()
self.following.pop()
if self.failed:
@@ -6068,7 +6087,7 @@ class CParser(Parser):
# $ANTLR start constant_expression
- # C.g:400:1: constant_expression : conditional_expression ;
+ # C.g:453:1: constant_expression : conditional_expression ;
def constant_expression(self, ):
constant_expression_StartIndex = self.input.index()
@@ -6077,9 +6096,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 47):
return
- # C.g:401:2: ( conditional_expression )
- # C.g:401:4: conditional_expression
- self.following.append(self.FOLLOW_conditional_expression_in_constant_expression1718)
+ # C.g:454:2: ( conditional_expression )
+ # C.g:454:4: conditional_expression
+ self.following.append(self.FOLLOW_conditional_expression_in_constant_expression1733)
self.conditional_expression()
self.following.pop()
if self.failed:
@@ -6103,7 +6122,7 @@ class CParser(Parser):
# $ANTLR start assignment_expression
- # C.g:404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );
+ # C.g:457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );
def assignment_expression(self, ):
assignment_expression_StartIndex = self.input.index()
@@ -6112,15 +6131,15 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 48):
return
- # C.g:405:2: ( lvalue assignment_operator assignment_expression | conditional_expression )
+ # C.g:458:2: ( lvalue assignment_operator assignment_expression | conditional_expression )
alt74 = 2
LA74 = self.input.LA(1)
if LA74 == IDENTIFIER:
LA74 = self.input.LA(2)
- if LA74 == STRING_LITERAL:
+ if LA74 == 64:
LA74_13 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6129,14 +6148,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 13, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 13, self.input)
raise nvae
- elif LA74 == IDENTIFIER:
+ elif LA74 == 62:
LA74_14 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6145,14 +6164,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 14, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 14, self.input)
raise nvae
- elif LA74 == 63:
+ elif LA74 == 75:
LA74_15 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6161,14 +6180,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 15, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 15, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 66:
LA74_16 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6177,14 +6196,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 16, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 16, self.input)
raise nvae
- elif LA74 == 74:
+ elif LA74 == 76:
LA74_17 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6193,14 +6212,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 17, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 17, self.input)
raise nvae
- elif LA74 == 65:
+ elif LA74 == 72:
LA74_18 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6209,14 +6228,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 18, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 18, self.input)
raise nvae
- elif LA74 == 75:
+ elif LA74 == 73:
LA74_19 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6225,14 +6244,16 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 19, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 19, self.input)
raise nvae
- elif LA74 == 71:
- LA74_20 = self.input.LA(3)
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
+ elif LA74 == STRING_LITERAL:
+ LA74_21 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6241,14 +6262,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 20, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 21, self.input)
raise nvae
- elif LA74 == 72:
- LA74_21 = self.input.LA(3)
+ elif LA74 == IDENTIFIER:
+ LA74_22 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6257,29 +6278,27 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 21, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 22, self.input)
raise nvae
- elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 62 or LA74 == 64 or LA74 == 67 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 76 or LA74 == 89 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101:
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
alt74 = 2
- elif LA74 == 28 or LA74 == 79 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88:
- alt74 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 1, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 1, self.input)
raise nvae
elif LA74 == HEX_LITERAL:
LA74 = self.input.LA(2)
- if LA74 == 63:
+ if LA74 == 64:
LA74_44 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6288,14 +6307,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 44, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 44, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_45 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6304,14 +6323,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 45, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 45, self.input)
raise nvae
- elif LA74 == 74:
+ elif LA74 == 75:
LA74_46 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6320,14 +6339,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 46, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 46, self.input)
raise nvae
- elif LA74 == 65:
+ elif LA74 == 66:
LA74_47 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6336,14 +6355,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 47, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 47, self.input)
raise nvae
- elif LA74 == 75:
+ elif LA74 == 76:
LA74_48 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6352,14 +6371,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 48, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 48, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_49 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6368,14 +6387,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 49, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 49, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_50 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6384,29 +6403,29 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 50, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 50, self.input)
raise nvae
- elif LA74 == 28 or LA74 == 79 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88:
- alt74 = 1
- elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 62 or LA74 == 64 or LA74 == 67 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 76 or LA74 == 89 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101:
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
alt74 = 2
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 2, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 2, self.input)
raise nvae
elif LA74 == OCTAL_LITERAL:
LA74 = self.input.LA(2)
- if LA74 == 63:
+ if LA74 == 64:
LA74_73 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6415,14 +6434,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 73, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 73, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_74 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6431,14 +6450,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 74, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 74, self.input)
raise nvae
- elif LA74 == 74:
+ elif LA74 == 75:
LA74_75 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6447,14 +6466,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 75, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 75, self.input)
raise nvae
- elif LA74 == 65:
+ elif LA74 == 66:
LA74_76 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6463,14 +6482,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 76, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 76, self.input)
raise nvae
- elif LA74 == 75:
+ elif LA74 == 76:
LA74_77 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6479,14 +6498,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 77, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 77, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_78 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6495,14 +6514,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 78, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 78, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_79 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6511,29 +6530,29 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 79, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 79, self.input)
raise nvae
- elif LA74 == 28 or LA74 == 79 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88:
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
alt74 = 1
- elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 62 or LA74 == 64 or LA74 == 67 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 76 or LA74 == 89 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101:
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
alt74 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 3, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 3, self.input)
raise nvae
elif LA74 == DECIMAL_LITERAL:
LA74 = self.input.LA(2)
- if LA74 == 63:
+ if LA74 == 64:
LA74_102 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6542,14 +6561,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 102, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 102, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_103 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6558,14 +6577,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 103, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 103, self.input)
raise nvae
- elif LA74 == 74:
+ elif LA74 == 75:
LA74_104 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6574,14 +6593,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 104, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 104, self.input)
raise nvae
- elif LA74 == 65:
+ elif LA74 == 66:
LA74_105 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6590,14 +6609,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 105, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 105, self.input)
raise nvae
- elif LA74 == 75:
+ elif LA74 == 76:
LA74_106 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6606,14 +6625,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 106, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 106, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_107 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6622,14 +6641,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 107, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 107, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_108 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6638,29 +6657,29 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 108, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 108, self.input)
raise nvae
- elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 62 or LA74 == 64 or LA74 == 67 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 76 or LA74 == 89 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101:
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
alt74 = 2
- elif LA74 == 28 or LA74 == 79 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88:
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
alt74 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 4, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 4, self.input)
raise nvae
elif LA74 == CHARACTER_LITERAL:
LA74 = self.input.LA(2)
- if LA74 == 63:
+ if LA74 == 64:
LA74_131 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6669,14 +6688,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 131, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 131, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_132 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6685,14 +6704,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 132, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 132, self.input)
raise nvae
- elif LA74 == 74:
+ elif LA74 == 75:
LA74_133 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6701,14 +6720,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 133, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 133, self.input)
raise nvae
- elif LA74 == 65:
+ elif LA74 == 66:
LA74_134 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6717,14 +6736,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 134, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 134, self.input)
raise nvae
- elif LA74 == 75:
+ elif LA74 == 76:
LA74_135 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6733,14 +6752,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 135, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 135, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_136 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6749,14 +6768,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 136, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 136, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_137 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6765,20 +6784,20 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 137, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 137, self.input)
raise nvae
- elif LA74 == 28 or LA74 == 79 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88:
- alt74 = 1
- elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 62 or LA74 == 64 or LA74 == 67 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 76 or LA74 == 89 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101:
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
alt74 = 2
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 5, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 5, self.input)
raise nvae
@@ -6787,7 +6806,7 @@ class CParser(Parser):
if LA74 == IDENTIFIER:
LA74_160 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6796,14 +6815,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 160, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 160, self.input)
raise nvae
- elif LA74 == 63:
+ elif LA74 == 64:
LA74_161 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6812,14 +6831,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 161, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 161, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_162 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6828,14 +6847,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 162, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 162, self.input)
raise nvae
- elif LA74 == 74:
+ elif LA74 == 75:
LA74_163 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6844,14 +6863,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 163, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 163, self.input)
raise nvae
- elif LA74 == 65:
+ elif LA74 == 66:
LA74_164 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6860,14 +6879,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 164, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 164, self.input)
raise nvae
- elif LA74 == 75:
+ elif LA74 == 76:
LA74_165 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6876,14 +6895,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 165, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 165, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_166 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6892,14 +6911,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 166, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 166, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_167 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6908,16 +6927,16 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 167, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 167, self.input)
raise nvae
- elif LA74 == 28 or LA74 == 79 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88:
- alt74 = 1
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
+ alt74 = 2
elif LA74 == STRING_LITERAL:
- LA74_169 = self.input.LA(3)
+ LA74_189 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6926,27 +6945,27 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 169, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 189, self.input)
raise nvae
- elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 62 or LA74 == 64 or LA74 == 67 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 76 or LA74 == 89 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101:
- alt74 = 2
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 6, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 6, self.input)
raise nvae
elif LA74 == FLOATING_POINT_LITERAL:
LA74 = self.input.LA(2)
- if LA74 == 63:
+ if LA74 == 64:
LA74_191 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6955,14 +6974,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 191, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 191, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_192 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6971,14 +6990,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 192, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 192, self.input)
raise nvae
- elif LA74 == 74:
+ elif LA74 == 75:
LA74_193 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -6987,14 +7006,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 193, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 193, self.input)
raise nvae
- elif LA74 == 65:
+ elif LA74 == 66:
LA74_194 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7003,14 +7022,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 194, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 194, self.input)
raise nvae
- elif LA74 == 75:
+ elif LA74 == 76:
LA74_195 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7019,14 +7038,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 195, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 195, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_196 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7035,14 +7054,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 196, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 196, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_197 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7051,29 +7070,29 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 197, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 197, self.input)
raise nvae
- elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 62 or LA74 == 64 or LA74 == 67 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 76 or LA74 == 89 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101:
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
alt74 = 2
- elif LA74 == 28 or LA74 == 79 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88:
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
alt74 = 1
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 7, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 7, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74 = self.input.LA(2)
if LA74 == IDENTIFIER:
LA74_220 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7082,14 +7101,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 220, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 220, self.input)
raise nvae
elif LA74 == HEX_LITERAL:
LA74_221 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7098,14 +7117,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 221, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 221, self.input)
raise nvae
elif LA74 == OCTAL_LITERAL:
LA74_222 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7114,14 +7133,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 222, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 222, self.input)
raise nvae
elif LA74 == DECIMAL_LITERAL:
LA74_223 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7130,14 +7149,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 223, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 223, self.input)
raise nvae
elif LA74 == CHARACTER_LITERAL:
LA74_224 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7146,14 +7165,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 224, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 224, self.input)
raise nvae
elif LA74 == STRING_LITERAL:
LA74_225 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7162,14 +7181,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 225, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 225, self.input)
raise nvae
elif LA74 == FLOATING_POINT_LITERAL:
LA74_226 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7178,14 +7197,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 226, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 226, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_227 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7194,14 +7213,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 227, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 227, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_228 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7210,14 +7229,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 228, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 228, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_229 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7226,14 +7245,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 229, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 229, self.input)
raise nvae
- elif LA74 == 65 or LA74 == 67 or LA74 == 68 or LA74 == 76 or LA74 == 77 or LA74 == 78:
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
LA74_230 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7242,14 +7261,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 230, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 230, self.input)
raise nvae
- elif LA74 == 73:
+ elif LA74 == 74:
LA74_231 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7258,27 +7277,27 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 231, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 231, self.input)
raise nvae
- elif LA74 == 34 or LA74 == 35 or LA74 == 36 or LA74 == 37 or LA74 == 38 or LA74 == 39 or LA74 == 40 or LA74 == 41 or LA74 == 42 or LA74 == 45 or LA74 == 46 or LA74 == 48 or LA74 == 49 or LA74 == 50 or LA74 == 51 or LA74 == 52 or LA74 == 53 or LA74 == 54 or LA74 == 55 or LA74 == 56 or LA74 == 57 or LA74 == 58 or LA74 == 59 or LA74 == 60:
+ elif LA74 == 34 or LA74 == 35 or LA74 == 36 or LA74 == 37 or LA74 == 38 or LA74 == 39 or LA74 == 40 or LA74 == 41 or LA74 == 42 or LA74 == 45 or LA74 == 46 or LA74 == 48 or LA74 == 49 or LA74 == 50 or LA74 == 51 or LA74 == 52 or LA74 == 53 or LA74 == 54 or LA74 == 55 or LA74 == 56 or LA74 == 57 or LA74 == 58 or LA74 == 59 or LA74 == 60 or LA74 == 61:
alt74 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 8, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 8, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74 = self.input.LA(2)
if LA74 == IDENTIFIER:
LA74_244 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7287,14 +7306,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 244, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 244, self.input)
raise nvae
elif LA74 == HEX_LITERAL:
LA74_245 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7303,14 +7322,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 245, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 245, self.input)
raise nvae
elif LA74 == OCTAL_LITERAL:
LA74_246 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7319,14 +7338,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 246, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 246, self.input)
raise nvae
elif LA74 == DECIMAL_LITERAL:
LA74_247 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7335,14 +7354,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 247, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 247, self.input)
raise nvae
elif LA74 == CHARACTER_LITERAL:
LA74_248 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7351,14 +7370,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 248, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 248, self.input)
raise nvae
elif LA74 == STRING_LITERAL:
LA74_249 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7367,14 +7386,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 249, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 249, self.input)
raise nvae
elif LA74 == FLOATING_POINT_LITERAL:
LA74_250 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7383,14 +7402,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 250, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 250, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_251 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7399,14 +7418,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 251, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 251, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_252 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7415,14 +7434,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 252, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 252, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_253 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7431,14 +7450,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 253, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 253, self.input)
raise nvae
- elif LA74 == 65 or LA74 == 67 or LA74 == 68 or LA74 == 76 or LA74 == 77 or LA74 == 78:
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
LA74_254 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7447,14 +7466,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 254, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 254, self.input)
raise nvae
- elif LA74 == 73:
+ elif LA74 == 74:
LA74_255 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7463,7 +7482,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 255, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 255, self.input)
raise nvae
@@ -7472,16 +7491,16 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 9, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 9, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74 = self.input.LA(2)
if LA74 == IDENTIFIER:
LA74_256 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7490,14 +7509,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 256, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 256, self.input)
raise nvae
elif LA74 == HEX_LITERAL:
LA74_257 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7506,14 +7525,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 257, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 257, self.input)
raise nvae
elif LA74 == OCTAL_LITERAL:
LA74_258 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7522,14 +7541,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 258, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 258, self.input)
raise nvae
elif LA74 == DECIMAL_LITERAL:
LA74_259 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7538,14 +7557,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 259, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 259, self.input)
raise nvae
elif LA74 == CHARACTER_LITERAL:
LA74_260 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7554,14 +7573,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 260, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 260, self.input)
raise nvae
elif LA74 == STRING_LITERAL:
LA74_261 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7570,14 +7589,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 261, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 261, self.input)
raise nvae
elif LA74 == FLOATING_POINT_LITERAL:
LA74_262 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7586,14 +7605,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 262, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 262, self.input)
raise nvae
- elif LA74 == 61:
+ elif LA74 == 62:
LA74_263 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7602,14 +7621,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 263, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 263, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_264 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7618,14 +7637,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 264, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 264, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_265 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7634,14 +7653,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 265, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 265, self.input)
raise nvae
- elif LA74 == 65 or LA74 == 67 or LA74 == 68 or LA74 == 76 or LA74 == 77 or LA74 == 78:
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
LA74_266 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7650,14 +7669,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 266, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 266, self.input)
raise nvae
- elif LA74 == 73:
+ elif LA74 == 74:
LA74_267 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7666,7 +7685,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 267, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 267, self.input)
raise nvae
@@ -7675,16 +7694,16 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 10, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 10, self.input)
raise nvae
- elif LA74 == 65 or LA74 == 67 or LA74 == 68 or LA74 == 76 or LA74 == 77 or LA74 == 78:
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
LA74 = self.input.LA(2)
- if LA74 == 61:
+ if LA74 == 62:
LA74_268 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7693,14 +7712,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 268, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 268, self.input)
raise nvae
elif LA74 == IDENTIFIER:
LA74_269 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7709,14 +7728,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 269, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 269, self.input)
raise nvae
elif LA74 == HEX_LITERAL:
LA74_270 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7725,14 +7744,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 270, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 270, self.input)
raise nvae
elif LA74 == OCTAL_LITERAL:
LA74_271 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7741,14 +7760,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 271, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 271, self.input)
raise nvae
elif LA74 == DECIMAL_LITERAL:
LA74_272 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7757,14 +7776,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 272, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 272, self.input)
raise nvae
elif LA74 == CHARACTER_LITERAL:
LA74_273 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7773,14 +7792,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 273, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 273, self.input)
raise nvae
elif LA74 == STRING_LITERAL:
LA74_274 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7789,14 +7808,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 274, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 274, self.input)
raise nvae
elif LA74 == FLOATING_POINT_LITERAL:
LA74_275 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7805,14 +7824,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 275, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 275, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_276 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7821,14 +7840,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 276, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 276, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_277 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7837,14 +7856,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 277, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 277, self.input)
raise nvae
- elif LA74 == 65 or LA74 == 67 or LA74 == 68 or LA74 == 76 or LA74 == 77 or LA74 == 78:
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
LA74_278 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7853,14 +7872,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 278, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 278, self.input)
raise nvae
- elif LA74 == 73:
+ elif LA74 == 74:
LA74_279 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7869,7 +7888,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 279, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 279, self.input)
raise nvae
@@ -7878,16 +7897,16 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 11, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 11, self.input)
raise nvae
- elif LA74 == 73:
+ elif LA74 == 74:
LA74 = self.input.LA(2)
- if LA74 == 61:
+ if LA74 == 62:
LA74_280 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7896,14 +7915,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 280, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 280, self.input)
raise nvae
elif LA74 == IDENTIFIER:
LA74_281 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7912,14 +7931,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 281, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 281, self.input)
raise nvae
elif LA74 == HEX_LITERAL:
LA74_282 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7928,14 +7947,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 282, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 282, self.input)
raise nvae
elif LA74 == OCTAL_LITERAL:
LA74_283 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7944,14 +7963,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 283, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 283, self.input)
raise nvae
elif LA74 == DECIMAL_LITERAL:
LA74_284 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7960,14 +7979,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 284, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 284, self.input)
raise nvae
elif LA74 == CHARACTER_LITERAL:
LA74_285 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7976,14 +7995,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 285, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 285, self.input)
raise nvae
elif LA74 == STRING_LITERAL:
LA74_286 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -7992,14 +8011,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 286, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 286, self.input)
raise nvae
elif LA74 == FLOATING_POINT_LITERAL:
LA74_287 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -8008,14 +8027,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 287, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 287, self.input)
raise nvae
- elif LA74 == 71:
+ elif LA74 == 72:
LA74_288 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -8024,14 +8043,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 288, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 288, self.input)
raise nvae
- elif LA74 == 72:
+ elif LA74 == 73:
LA74_289 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -8040,14 +8059,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 289, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 289, self.input)
raise nvae
- elif LA74 == 65 or LA74 == 67 or LA74 == 68 or LA74 == 76 or LA74 == 77 or LA74 == 78:
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
LA74_290 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -8056,14 +8075,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 290, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 290, self.input)
raise nvae
- elif LA74 == 73:
+ elif LA74 == 74:
LA74_291 = self.input.LA(3)
- if (self.synpred141()) :
+ if (self.synpred142()) :
alt74 = 1
elif (True) :
alt74 = 2
@@ -8072,7 +8091,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 291, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 291, self.input)
raise nvae
@@ -8081,7 +8100,7 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 12, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 12, self.input)
raise nvae
@@ -8090,23 +8109,23 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("404:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 0, self.input)
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 0, self.input)
raise nvae
if alt74 == 1:
- # C.g:405:4: lvalue assignment_operator assignment_expression
- self.following.append(self.FOLLOW_lvalue_in_assignment_expression1729)
+ # C.g:458:4: lvalue assignment_operator assignment_expression
+ self.following.append(self.FOLLOW_lvalue_in_assignment_expression1744)
self.lvalue()
self.following.pop()
if self.failed:
return
- self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1731)
+ self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1746)
self.assignment_operator()
self.following.pop()
if self.failed:
return
- self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1733)
+ self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1748)
self.assignment_expression()
self.following.pop()
if self.failed:
@@ -8114,8 +8133,8 @@ class CParser(Parser):
elif alt74 == 2:
- # C.g:406:4: conditional_expression
- self.following.append(self.FOLLOW_conditional_expression_in_assignment_expression1738)
+ # C.g:459:4: conditional_expression
+ self.following.append(self.FOLLOW_conditional_expression_in_assignment_expression1753)
self.conditional_expression()
self.following.pop()
if self.failed:
@@ -8138,7 +8157,7 @@ class CParser(Parser):
# $ANTLR start lvalue
- # C.g:409:1: lvalue : unary_expression ;
+ # C.g:462:1: lvalue : unary_expression ;
def lvalue(self, ):
lvalue_StartIndex = self.input.index()
@@ -8147,9 +8166,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 49):
return
- # C.g:410:2: ( unary_expression )
- # C.g:410:4: unary_expression
- self.following.append(self.FOLLOW_unary_expression_in_lvalue1750)
+ # C.g:463:2: ( unary_expression )
+ # C.g:463:4: unary_expression
+ self.following.append(self.FOLLOW_unary_expression_in_lvalue1765)
self.unary_expression()
self.following.pop()
if self.failed:
@@ -8173,7 +8192,7 @@ class CParser(Parser):
# $ANTLR start assignment_operator
- # C.g:413:1: assignment_operator : ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' );
+ # C.g:466:1: assignment_operator : ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' );
def assignment_operator(self, ):
assignment_operator_StartIndex = self.input.index()
@@ -8182,9 +8201,9 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 50):
return
- # C.g:414:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' )
+ # C.g:467:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' )
# C.g:
- if self.input.LA(1) == 28 or (79 <= self.input.LA(1) <= 88):
+ if self.input.LA(1) == 28 or (80 <= self.input.LA(1) <= 89):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -8220,7 +8239,7 @@ class CParser(Parser):
# $ANTLR start conditional_expression
- # C.g:427:1: conditional_expression : e= logical_or_expression ( '?' expression ':' conditional_expression )? ;
+ # C.g:480:1: conditional_expression : e= logical_or_expression ( '?' expression ':' conditional_expression )? ;
def conditional_expression(self, ):
conditional_expression_StartIndex = self.input.index()
@@ -8232,33 +8251,33 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 51):
return
- # C.g:428:2: (e= logical_or_expression ( '?' expression ':' conditional_expression )? )
- # C.g:428:4: e= logical_or_expression ( '?' expression ':' conditional_expression )?
- self.following.append(self.FOLLOW_logical_or_expression_in_conditional_expression1824)
+ # C.g:481:2: (e= logical_or_expression ( '?' expression ':' conditional_expression )? )
+ # C.g:481:4: e= logical_or_expression ( '?' expression ':' conditional_expression )?
+ self.following.append(self.FOLLOW_logical_or_expression_in_conditional_expression1839)
e = self.logical_or_expression()
self.following.pop()
if self.failed:
return
- # C.g:428:28: ( '?' expression ':' conditional_expression )?
+ # C.g:481:28: ( '?' expression ':' conditional_expression )?
alt75 = 2
LA75_0 = self.input.LA(1)
- if (LA75_0 == 89) :
+ if (LA75_0 == 90) :
alt75 = 1
if alt75 == 1:
- # C.g:428:29: '?' expression ':' conditional_expression
- self.match(self.input, 89, self.FOLLOW_89_in_conditional_expression1827)
+ # C.g:481:29: '?' expression ':' conditional_expression
+ self.match(self.input, 90, self.FOLLOW_90_in_conditional_expression1842)
if self.failed:
return
- self.following.append(self.FOLLOW_expression_in_conditional_expression1829)
+ self.following.append(self.FOLLOW_expression_in_conditional_expression1844)
self.expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 47, self.FOLLOW_47_in_conditional_expression1831)
+ self.match(self.input, 47, self.FOLLOW_47_in_conditional_expression1846)
if self.failed:
return
- self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1833)
+ self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1848)
self.conditional_expression()
self.following.pop()
if self.failed:
@@ -8294,7 +8313,7 @@ class CParser(Parser):
# $ANTLR start logical_or_expression
- # C.g:431:1: logical_or_expression : logical_and_expression ( '||' logical_and_expression )* ;
+ # C.g:484:1: logical_or_expression : logical_and_expression ( '||' logical_and_expression )* ;
def logical_or_expression(self, ):
retval = self.logical_or_expression_return()
@@ -8305,28 +8324,28 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 52):
return retval
- # C.g:432:2: ( logical_and_expression ( '||' logical_and_expression )* )
- # C.g:432:4: logical_and_expression ( '||' logical_and_expression )*
- self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1848)
+ # C.g:485:2: ( logical_and_expression ( '||' logical_and_expression )* )
+ # C.g:485:4: logical_and_expression ( '||' logical_and_expression )*
+ self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1863)
self.logical_and_expression()
self.following.pop()
if self.failed:
return retval
- # C.g:432:27: ( '||' logical_and_expression )*
+ # C.g:485:27: ( '||' logical_and_expression )*
while True: #loop76
alt76 = 2
LA76_0 = self.input.LA(1)
- if (LA76_0 == 90) :
+ if (LA76_0 == 91) :
alt76 = 1
if alt76 == 1:
- # C.g:432:28: '||' logical_and_expression
- self.match(self.input, 90, self.FOLLOW_90_in_logical_or_expression1851)
+ # C.g:485:28: '||' logical_and_expression
+ self.match(self.input, 91, self.FOLLOW_91_in_logical_or_expression1866)
if self.failed:
return retval
- self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1853)
+ self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1868)
self.logical_and_expression()
self.following.pop()
if self.failed:
@@ -8358,7 +8377,7 @@ class CParser(Parser):
# $ANTLR start logical_and_expression
- # C.g:435:1: logical_and_expression : inclusive_or_expression ( '&&' inclusive_or_expression )* ;
+ # C.g:488:1: logical_and_expression : inclusive_or_expression ( '&&' inclusive_or_expression )* ;
def logical_and_expression(self, ):
logical_and_expression_StartIndex = self.input.index()
@@ -8367,28 +8386,28 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 53):
return
- # C.g:436:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* )
- # C.g:436:4: inclusive_or_expression ( '&&' inclusive_or_expression )*
- self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1866)
+ # C.g:489:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* )
+ # C.g:489:4: inclusive_or_expression ( '&&' inclusive_or_expression )*
+ self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1881)
self.inclusive_or_expression()
self.following.pop()
if self.failed:
return
- # C.g:436:28: ( '&&' inclusive_or_expression )*
+ # C.g:489:28: ( '&&' inclusive_or_expression )*
while True: #loop77
alt77 = 2
LA77_0 = self.input.LA(1)
- if (LA77_0 == 91) :
+ if (LA77_0 == 92) :
alt77 = 1
if alt77 == 1:
- # C.g:436:29: '&&' inclusive_or_expression
- self.match(self.input, 91, self.FOLLOW_91_in_logical_and_expression1869)
+ # C.g:489:29: '&&' inclusive_or_expression
+ self.match(self.input, 92, self.FOLLOW_92_in_logical_and_expression1884)
if self.failed:
return
- self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1871)
+ self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1886)
self.inclusive_or_expression()
self.following.pop()
if self.failed:
@@ -8418,7 +8437,7 @@ class CParser(Parser):
# $ANTLR start inclusive_or_expression
- # C.g:439:1: inclusive_or_expression : exclusive_or_expression ( '|' exclusive_or_expression )* ;
+ # C.g:492:1: inclusive_or_expression : exclusive_or_expression ( '|' exclusive_or_expression )* ;
def inclusive_or_expression(self, ):
inclusive_or_expression_StartIndex = self.input.index()
@@ -8427,28 +8446,28 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 54):
return
- # C.g:440:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* )
- # C.g:440:4: exclusive_or_expression ( '|' exclusive_or_expression )*
- self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1884)
+ # C.g:493:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* )
+ # C.g:493:4: exclusive_or_expression ( '|' exclusive_or_expression )*
+ self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1899)
self.exclusive_or_expression()
self.following.pop()
if self.failed:
return
- # C.g:440:28: ( '|' exclusive_or_expression )*
+ # C.g:493:28: ( '|' exclusive_or_expression )*
while True: #loop78
alt78 = 2
LA78_0 = self.input.LA(1)
- if (LA78_0 == 92) :
+ if (LA78_0 == 93) :
alt78 = 1
if alt78 == 1:
- # C.g:440:29: '|' exclusive_or_expression
- self.match(self.input, 92, self.FOLLOW_92_in_inclusive_or_expression1887)
+ # C.g:493:29: '|' exclusive_or_expression
+ self.match(self.input, 93, self.FOLLOW_93_in_inclusive_or_expression1902)
if self.failed:
return
- self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1889)
+ self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1904)
self.exclusive_or_expression()
self.following.pop()
if self.failed:
@@ -8478,7 +8497,7 @@ class CParser(Parser):
# $ANTLR start exclusive_or_expression
- # C.g:443:1: exclusive_or_expression : and_expression ( '^' and_expression )* ;
+ # C.g:496:1: exclusive_or_expression : and_expression ( '^' and_expression )* ;
def exclusive_or_expression(self, ):
exclusive_or_expression_StartIndex = self.input.index()
@@ -8487,28 +8506,28 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 55):
return
- # C.g:444:2: ( and_expression ( '^' and_expression )* )
- # C.g:444:4: and_expression ( '^' and_expression )*
- self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1902)
+ # C.g:497:2: ( and_expression ( '^' and_expression )* )
+ # C.g:497:4: and_expression ( '^' and_expression )*
+ self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1917)
self.and_expression()
self.following.pop()
if self.failed:
return
- # C.g:444:19: ( '^' and_expression )*
+ # C.g:497:19: ( '^' and_expression )*
while True: #loop79
alt79 = 2
LA79_0 = self.input.LA(1)
- if (LA79_0 == 93) :
+ if (LA79_0 == 94) :
alt79 = 1
if alt79 == 1:
- # C.g:444:20: '^' and_expression
- self.match(self.input, 93, self.FOLLOW_93_in_exclusive_or_expression1905)
+ # C.g:497:20: '^' and_expression
+ self.match(self.input, 94, self.FOLLOW_94_in_exclusive_or_expression1920)
if self.failed:
return
- self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1907)
+ self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1922)
self.and_expression()
self.following.pop()
if self.failed:
@@ -8538,7 +8557,7 @@ class CParser(Parser):
# $ANTLR start and_expression
- # C.g:447:1: and_expression : equality_expression ( '&' equality_expression )* ;
+ # C.g:500:1: and_expression : equality_expression ( '&' equality_expression )* ;
def and_expression(self, ):
and_expression_StartIndex = self.input.index()
@@ -8547,28 +8566,28 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 56):
return
- # C.g:448:2: ( equality_expression ( '&' equality_expression )* )
- # C.g:448:4: equality_expression ( '&' equality_expression )*
- self.following.append(self.FOLLOW_equality_expression_in_and_expression1920)
+ # C.g:501:2: ( equality_expression ( '&' equality_expression )* )
+ # C.g:501:4: equality_expression ( '&' equality_expression )*
+ self.following.append(self.FOLLOW_equality_expression_in_and_expression1935)
self.equality_expression()
self.following.pop()
if self.failed:
return
- # C.g:448:24: ( '&' equality_expression )*
+ # C.g:501:24: ( '&' equality_expression )*
while True: #loop80
alt80 = 2
LA80_0 = self.input.LA(1)
- if (LA80_0 == 76) :
+ if (LA80_0 == 77) :
alt80 = 1
if alt80 == 1:
- # C.g:448:25: '&' equality_expression
- self.match(self.input, 76, self.FOLLOW_76_in_and_expression1923)
+ # C.g:501:25: '&' equality_expression
+ self.match(self.input, 77, self.FOLLOW_77_in_and_expression1938)
if self.failed:
return
- self.following.append(self.FOLLOW_equality_expression_in_and_expression1925)
+ self.following.append(self.FOLLOW_equality_expression_in_and_expression1940)
self.equality_expression()
self.following.pop()
if self.failed:
@@ -8598,7 +8617,7 @@ class CParser(Parser):
# $ANTLR start equality_expression
- # C.g:450:1: equality_expression : relational_expression ( ( '==' | '!=' ) relational_expression )* ;
+ # C.g:503:1: equality_expression : relational_expression ( ( '==' | '!=' ) relational_expression )* ;
def equality_expression(self, ):
equality_expression_StartIndex = self.input.index()
@@ -8607,25 +8626,25 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 57):
return
- # C.g:451:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* )
- # C.g:451:4: relational_expression ( ( '==' | '!=' ) relational_expression )*
- self.following.append(self.FOLLOW_relational_expression_in_equality_expression1937)
+ # C.g:504:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* )
+ # C.g:504:4: relational_expression ( ( '==' | '!=' ) relational_expression )*
+ self.following.append(self.FOLLOW_relational_expression_in_equality_expression1952)
self.relational_expression()
self.following.pop()
if self.failed:
return
- # C.g:451:26: ( ( '==' | '!=' ) relational_expression )*
+ # C.g:504:26: ( ( '==' | '!=' ) relational_expression )*
while True: #loop81
alt81 = 2
LA81_0 = self.input.LA(1)
- if ((94 <= LA81_0 <= 95)) :
+ if ((95 <= LA81_0 <= 96)) :
alt81 = 1
if alt81 == 1:
- # C.g:451:27: ( '==' | '!=' ) relational_expression
- if (94 <= self.input.LA(1) <= 95):
+ # C.g:504:27: ( '==' | '!=' ) relational_expression
+ if (95 <= self.input.LA(1) <= 96):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -8637,12 +8656,12 @@ class CParser(Parser):
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
- self.input, mse, self.FOLLOW_set_in_equality_expression1940
+ self.input, mse, self.FOLLOW_set_in_equality_expression1955
)
raise mse
- self.following.append(self.FOLLOW_relational_expression_in_equality_expression1946)
+ self.following.append(self.FOLLOW_relational_expression_in_equality_expression1961)
self.relational_expression()
self.following.pop()
if self.failed:
@@ -8672,7 +8691,7 @@ class CParser(Parser):
# $ANTLR start relational_expression
- # C.g:454:1: relational_expression : shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* ;
+ # C.g:507:1: relational_expression : shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* ;
def relational_expression(self, ):
relational_expression_StartIndex = self.input.index()
@@ -8681,25 +8700,25 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 58):
return
- # C.g:455:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* )
- # C.g:455:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
- self.following.append(self.FOLLOW_shift_expression_in_relational_expression1960)
+ # C.g:508:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* )
+ # C.g:508:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
+ self.following.append(self.FOLLOW_shift_expression_in_relational_expression1975)
self.shift_expression()
self.following.pop()
if self.failed:
return
- # C.g:455:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
+ # C.g:508:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
while True: #loop82
alt82 = 2
LA82_0 = self.input.LA(1)
- if ((96 <= LA82_0 <= 99)) :
+ if ((97 <= LA82_0 <= 100)) :
alt82 = 1
if alt82 == 1:
- # C.g:455:22: ( '<' | '>' | '<=' | '>=' ) shift_expression
- if (96 <= self.input.LA(1) <= 99):
+ # C.g:508:22: ( '<' | '>' | '<=' | '>=' ) shift_expression
+ if (97 <= self.input.LA(1) <= 100):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -8711,12 +8730,12 @@ class CParser(Parser):
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
- self.input, mse, self.FOLLOW_set_in_relational_expression1963
+ self.input, mse, self.FOLLOW_set_in_relational_expression1978
)
raise mse
- self.following.append(self.FOLLOW_shift_expression_in_relational_expression1973)
+ self.following.append(self.FOLLOW_shift_expression_in_relational_expression1988)
self.shift_expression()
self.following.pop()
if self.failed:
@@ -8746,7 +8765,7 @@ class CParser(Parser):
# $ANTLR start shift_expression
- # C.g:458:1: shift_expression : additive_expression ( ( '<<' | '>>' ) additive_expression )* ;
+ # C.g:511:1: shift_expression : additive_expression ( ( '<<' | '>>' ) additive_expression )* ;
def shift_expression(self, ):
shift_expression_StartIndex = self.input.index()
@@ -8755,25 +8774,25 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 59):
return
- # C.g:459:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* )
- # C.g:459:4: additive_expression ( ( '<<' | '>>' ) additive_expression )*
- self.following.append(self.FOLLOW_additive_expression_in_shift_expression1986)
+ # C.g:512:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* )
+ # C.g:512:4: additive_expression ( ( '<<' | '>>' ) additive_expression )*
+ self.following.append(self.FOLLOW_additive_expression_in_shift_expression2001)
self.additive_expression()
self.following.pop()
if self.failed:
return
- # C.g:459:24: ( ( '<<' | '>>' ) additive_expression )*
+ # C.g:512:24: ( ( '<<' | '>>' ) additive_expression )*
while True: #loop83
alt83 = 2
LA83_0 = self.input.LA(1)
- if ((100 <= LA83_0 <= 101)) :
+ if ((101 <= LA83_0 <= 102)) :
alt83 = 1
if alt83 == 1:
- # C.g:459:25: ( '<<' | '>>' ) additive_expression
- if (100 <= self.input.LA(1) <= 101):
+ # C.g:512:25: ( '<<' | '>>' ) additive_expression
+ if (101 <= self.input.LA(1) <= 102):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -8785,12 +8804,12 @@ class CParser(Parser):
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
- self.input, mse, self.FOLLOW_set_in_shift_expression1989
+ self.input, mse, self.FOLLOW_set_in_shift_expression2004
)
raise mse
- self.following.append(self.FOLLOW_additive_expression_in_shift_expression1995)
+ self.following.append(self.FOLLOW_additive_expression_in_shift_expression2010)
self.additive_expression()
self.following.pop()
if self.failed:
@@ -8820,7 +8839,7 @@ class CParser(Parser):
# $ANTLR start statement
- # C.g:464:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );
+ # C.g:517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );
def statement(self, ):
statement_StartIndex = self.input.index()
@@ -8829,21 +8848,19 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 60):
return
- # C.g:465:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration )
+ # C.g:518:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration )
alt84 = 11
LA84 = self.input.LA(1)
if LA84 == IDENTIFIER:
LA84 = self.input.LA(2)
- if LA84 == 47:
- alt84 = 1
- elif LA84 == 61:
- LA84_44 = self.input.LA(3)
+ if LA84 == 62:
+ LA84_43 = self.input.LA(3)
- if (self.synpred168()) :
+ if (self.synpred169()) :
alt84 = 3
- elif (self.synpred172()) :
- alt84 = 7
elif (self.synpred173()) :
+ alt84 = 7
+ elif (self.synpred174()) :
alt84 = 8
elif (True) :
alt84 = 11
@@ -8852,16 +8869,18 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("464:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 44, self.input)
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 43, self.input)
raise nvae
- elif LA84 == STRING_LITERAL or LA84 == 27 or LA84 == 28 or LA84 == 63 or LA84 == 67 or LA84 == 68 or LA84 == 69 or LA84 == 70 or LA84 == 71 or LA84 == 72 or LA84 == 74 or LA84 == 75 or LA84 == 76 or LA84 == 79 or LA84 == 80 or LA84 == 81 or LA84 == 82 or LA84 == 83 or LA84 == 84 or LA84 == 85 or LA84 == 86 or LA84 == 87 or LA84 == 88 or LA84 == 89 or LA84 == 90 or LA84 == 91 or LA84 == 92 or LA84 == 93 or LA84 == 94 or LA84 == 95 or LA84 == 96 or LA84 == 97 or LA84 == 98 or LA84 == 99 or LA84 == 100 or LA84 == 101:
+ elif LA84 == 47:
+ alt84 = 1
+ elif LA84 == STRING_LITERAL or LA84 == 27 or LA84 == 28 or LA84 == 64 or LA84 == 68 or LA84 == 69 or LA84 == 70 or LA84 == 71 or LA84 == 72 or LA84 == 73 or LA84 == 75 or LA84 == 76 or LA84 == 77 or LA84 == 80 or LA84 == 81 or LA84 == 82 or LA84 == 83 or LA84 == 84 or LA84 == 85 or LA84 == 86 or LA84 == 87 or LA84 == 88 or LA84 == 89 or LA84 == 90 or LA84 == 91 or LA84 == 92 or LA84 == 93 or LA84 == 94 or LA84 == 95 or LA84 == 96 or LA84 == 97 or LA84 == 98 or LA84 == 99 or LA84 == 100 or LA84 == 101 or LA84 == 102:
alt84 = 3
- elif LA84 == 65:
+ elif LA84 == 66:
LA84_47 = self.input.LA(3)
- if (self.synpred168()) :
+ if (self.synpred169()) :
alt84 = 3
elif (True) :
alt84 = 11
@@ -8870,14 +8889,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("464:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 47, self.input)
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 47, self.input)
raise nvae
- elif LA84 == 25:
- LA84_65 = self.input.LA(3)
+ elif LA84 == IDENTIFIER:
+ LA84_53 = self.input.LA(3)
- if (self.synpred168()) :
+ if (self.synpred169()) :
alt84 = 3
elif (True) :
alt84 = 11
@@ -8886,14 +8905,14 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("464:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 65, self.input)
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 53, self.input)
raise nvae
- elif LA84 == IDENTIFIER:
- LA84_67 = self.input.LA(3)
+ elif LA84 == 25:
+ LA84_68 = self.input.LA(3)
- if (self.synpred168()) :
+ if (self.synpred169()) :
alt84 = 3
elif (True) :
alt84 = 11
@@ -8902,53 +8921,53 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("464:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 67, self.input)
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 68, self.input)
raise nvae
- elif LA84 == 29 or LA84 == 30 or LA84 == 31 or LA84 == 32 or LA84 == 33 or LA84 == 34 or LA84 == 35 or LA84 == 36 or LA84 == 37 or LA84 == 38 or LA84 == 39 or LA84 == 40 or LA84 == 41 or LA84 == 42 or LA84 == 45 or LA84 == 46 or LA84 == 48 or LA84 == 49 or LA84 == 50 or LA84 == 51 or LA84 == 52 or LA84 == 53 or LA84 == 54 or LA84 == 55 or LA84 == 56 or LA84 == 57 or LA84 == 58 or LA84 == 59 or LA84 == 60:
+ elif LA84 == 29 or LA84 == 30 or LA84 == 31 or LA84 == 32 or LA84 == 33 or LA84 == 34 or LA84 == 35 or LA84 == 36 or LA84 == 37 or LA84 == 38 or LA84 == 39 or LA84 == 40 or LA84 == 41 or LA84 == 42 or LA84 == 45 or LA84 == 46 or LA84 == 48 or LA84 == 49 or LA84 == 50 or LA84 == 51 or LA84 == 52 or LA84 == 53 or LA84 == 54 or LA84 == 55 or LA84 == 56 or LA84 == 57 or LA84 == 58 or LA84 == 59 or LA84 == 60 or LA84 == 61:
alt84 = 11
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("464:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 1, self.input)
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 1, self.input)
raise nvae
- elif LA84 == 105 or LA84 == 106:
+ elif LA84 == 106 or LA84 == 107:
alt84 = 1
elif LA84 == 43:
alt84 = 2
- elif LA84 == HEX_LITERAL or LA84 == OCTAL_LITERAL or LA84 == DECIMAL_LITERAL or LA84 == CHARACTER_LITERAL or LA84 == STRING_LITERAL or LA84 == FLOATING_POINT_LITERAL or LA84 == 25 or LA84 == 61 or LA84 == 65 or LA84 == 67 or LA84 == 68 or LA84 == 71 or LA84 == 72 or LA84 == 73 or LA84 == 76 or LA84 == 77 or LA84 == 78:
+ elif LA84 == HEX_LITERAL or LA84 == OCTAL_LITERAL or LA84 == DECIMAL_LITERAL or LA84 == CHARACTER_LITERAL or LA84 == STRING_LITERAL or LA84 == FLOATING_POINT_LITERAL or LA84 == 25 or LA84 == 62 or LA84 == 66 or LA84 == 68 or LA84 == 69 or LA84 == 72 or LA84 == 73 or LA84 == 74 or LA84 == 77 or LA84 == 78 or LA84 == 79:
alt84 = 3
- elif LA84 == 107 or LA84 == 109:
+ elif LA84 == 108 or LA84 == 110:
alt84 = 4
- elif LA84 == 110 or LA84 == 111 or LA84 == 112:
+ elif LA84 == 111 or LA84 == 112 or LA84 == 113:
alt84 = 5
- elif LA84 == 113 or LA84 == 114 or LA84 == 115 or LA84 == 116:
+ elif LA84 == 114 or LA84 == 115 or LA84 == 116 or LA84 == 117:
alt84 = 6
- elif LA84 == 102:
- alt84 = 8
elif LA84 == 103:
- alt84 = 9
+ alt84 = 8
elif LA84 == 104:
+ alt84 = 9
+ elif LA84 == 105:
alt84 = 10
- elif LA84 == 26 or LA84 == 29 or LA84 == 30 or LA84 == 31 or LA84 == 32 or LA84 == 33 or LA84 == 34 or LA84 == 35 or LA84 == 36 or LA84 == 37 or LA84 == 38 or LA84 == 39 or LA84 == 40 or LA84 == 41 or LA84 == 42 or LA84 == 45 or LA84 == 46 or LA84 == 48 or LA84 == 49 or LA84 == 50 or LA84 == 51 or LA84 == 52 or LA84 == 53 or LA84 == 54 or LA84 == 55 or LA84 == 56 or LA84 == 57 or LA84 == 58 or LA84 == 59 or LA84 == 60:
+ elif LA84 == 26 or LA84 == 29 or LA84 == 30 or LA84 == 31 or LA84 == 32 or LA84 == 33 or LA84 == 34 or LA84 == 35 or LA84 == 36 or LA84 == 37 or LA84 == 38 or LA84 == 39 or LA84 == 40 or LA84 == 41 or LA84 == 42 or LA84 == 45 or LA84 == 46 or LA84 == 48 or LA84 == 49 or LA84 == 50 or LA84 == 51 or LA84 == 52 or LA84 == 53 or LA84 == 54 or LA84 == 55 or LA84 == 56 or LA84 == 57 or LA84 == 58 or LA84 == 59 or LA84 == 60 or LA84 == 61:
alt84 = 11
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("464:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 0, self.input)
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 0, self.input)
raise nvae
if alt84 == 1:
- # C.g:465:4: labeled_statement
- self.following.append(self.FOLLOW_labeled_statement_in_statement2010)
+ # C.g:518:4: labeled_statement
+ self.following.append(self.FOLLOW_labeled_statement_in_statement2025)
self.labeled_statement()
self.following.pop()
if self.failed:
@@ -8956,8 +8975,8 @@ class CParser(Parser):
elif alt84 == 2:
- # C.g:466:4: compound_statement
- self.following.append(self.FOLLOW_compound_statement_in_statement2015)
+ # C.g:519:4: compound_statement
+ self.following.append(self.FOLLOW_compound_statement_in_statement2030)
self.compound_statement()
self.following.pop()
if self.failed:
@@ -8965,8 +8984,8 @@ class CParser(Parser):
elif alt84 == 3:
- # C.g:467:4: expression_statement
- self.following.append(self.FOLLOW_expression_statement_in_statement2020)
+ # C.g:520:4: expression_statement
+ self.following.append(self.FOLLOW_expression_statement_in_statement2035)
self.expression_statement()
self.following.pop()
if self.failed:
@@ -8974,8 +8993,8 @@ class CParser(Parser):
elif alt84 == 4:
- # C.g:468:4: selection_statement
- self.following.append(self.FOLLOW_selection_statement_in_statement2025)
+ # C.g:521:4: selection_statement
+ self.following.append(self.FOLLOW_selection_statement_in_statement2040)
self.selection_statement()
self.following.pop()
if self.failed:
@@ -8983,8 +9002,8 @@ class CParser(Parser):
elif alt84 == 5:
- # C.g:469:4: iteration_statement
- self.following.append(self.FOLLOW_iteration_statement_in_statement2030)
+ # C.g:522:4: iteration_statement
+ self.following.append(self.FOLLOW_iteration_statement_in_statement2045)
self.iteration_statement()
self.following.pop()
if self.failed:
@@ -8992,8 +9011,8 @@ class CParser(Parser):
elif alt84 == 6:
- # C.g:470:4: jump_statement
- self.following.append(self.FOLLOW_jump_statement_in_statement2035)
+ # C.g:523:4: jump_statement
+ self.following.append(self.FOLLOW_jump_statement_in_statement2050)
self.jump_statement()
self.following.pop()
if self.failed:
@@ -9001,8 +9020,8 @@ class CParser(Parser):
elif alt84 == 7:
- # C.g:471:4: macro_statement
- self.following.append(self.FOLLOW_macro_statement_in_statement2040)
+ # C.g:524:4: macro_statement
+ self.following.append(self.FOLLOW_macro_statement_in_statement2055)
self.macro_statement()
self.following.pop()
if self.failed:
@@ -9010,8 +9029,8 @@ class CParser(Parser):
elif alt84 == 8:
- # C.g:472:4: asm2_statement
- self.following.append(self.FOLLOW_asm2_statement_in_statement2045)
+ # C.g:525:4: asm2_statement
+ self.following.append(self.FOLLOW_asm2_statement_in_statement2060)
self.asm2_statement()
self.following.pop()
if self.failed:
@@ -9019,8 +9038,8 @@ class CParser(Parser):
elif alt84 == 9:
- # C.g:473:4: asm1_statement
- self.following.append(self.FOLLOW_asm1_statement_in_statement2050)
+ # C.g:526:4: asm1_statement
+ self.following.append(self.FOLLOW_asm1_statement_in_statement2065)
self.asm1_statement()
self.following.pop()
if self.failed:
@@ -9028,8 +9047,8 @@ class CParser(Parser):
elif alt84 == 10:
- # C.g:474:4: asm_statement
- self.following.append(self.FOLLOW_asm_statement_in_statement2055)
+ # C.g:527:4: asm_statement
+ self.following.append(self.FOLLOW_asm_statement_in_statement2070)
self.asm_statement()
self.following.pop()
if self.failed:
@@ -9037,8 +9056,8 @@ class CParser(Parser):
elif alt84 == 11:
- # C.g:475:4: declaration
- self.following.append(self.FOLLOW_declaration_in_statement2060)
+ # C.g:528:4: declaration
+ self.following.append(self.FOLLOW_declaration_in_statement2075)
self.declaration()
self.following.pop()
if self.failed:
@@ -9061,7 +9080,7 @@ class CParser(Parser):
# $ANTLR start asm2_statement
- # C.g:478:1: asm2_statement : ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' ;
+ # C.g:531:1: asm2_statement : ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' ;
def asm2_statement(self, ):
asm2_statement_StartIndex = self.input.index()
@@ -9070,47 +9089,47 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 61):
return
- # C.g:479:2: ( ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' )
- # C.g:479:4: ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';'
- # C.g:479:4: ( '__asm__' )?
+ # C.g:532:2: ( ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' )
+ # C.g:532:4: ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';'
+ # C.g:532:4: ( '__asm__' )?
alt85 = 2
LA85_0 = self.input.LA(1)
- if (LA85_0 == 102) :
+ if (LA85_0 == 103) :
alt85 = 1
if alt85 == 1:
# C.g:0:0: '__asm__'
- self.match(self.input, 102, self.FOLLOW_102_in_asm2_statement2071)
+ self.match(self.input, 103, self.FOLLOW_103_in_asm2_statement2086)
if self.failed:
return
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_asm2_statement2074)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_asm2_statement2089)
if self.failed:
return
- self.match(self.input, 61, self.FOLLOW_61_in_asm2_statement2076)
+ self.match(self.input, 62, self.FOLLOW_62_in_asm2_statement2091)
if self.failed:
return
- # C.g:479:30: (~ ( ';' ) )*
+ # C.g:532:30: (~ ( ';' ) )*
while True: #loop86
alt86 = 2
LA86_0 = self.input.LA(1)
- if (LA86_0 == 62) :
+ if (LA86_0 == 63) :
LA86_1 = self.input.LA(2)
- if ((IDENTIFIER <= LA86_1 <= LINE_COMMAND) or (26 <= LA86_1 <= 116)) :
+ if ((IDENTIFIER <= LA86_1 <= LINE_COMMAND) or (26 <= LA86_1 <= 117)) :
alt86 = 1
- elif ((IDENTIFIER <= LA86_0 <= LINE_COMMAND) or (26 <= LA86_0 <= 61) or (63 <= LA86_0 <= 116)) :
+ elif ((IDENTIFIER <= LA86_0 <= LINE_COMMAND) or (26 <= LA86_0 <= 62) or (64 <= LA86_0 <= 117)) :
alt86 = 1
if alt86 == 1:
- # C.g:479:31: ~ ( ';' )
- if (IDENTIFIER <= self.input.LA(1) <= LINE_COMMAND) or (26 <= self.input.LA(1) <= 116):
+ # C.g:532:31: ~ ( ';' )
+ if (IDENTIFIER <= self.input.LA(1) <= LINE_COMMAND) or (26 <= self.input.LA(1) <= 117):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -9122,7 +9141,7 @@ class CParser(Parser):
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
- self.input, mse, self.FOLLOW_set_in_asm2_statement2079
+ self.input, mse, self.FOLLOW_set_in_asm2_statement2094
)
raise mse
@@ -9133,10 +9152,10 @@ class CParser(Parser):
break #loop86
- self.match(self.input, 62, self.FOLLOW_62_in_asm2_statement2086)
+ self.match(self.input, 63, self.FOLLOW_63_in_asm2_statement2101)
if self.failed:
return
- self.match(self.input, 25, self.FOLLOW_25_in_asm2_statement2088)
+ self.match(self.input, 25, self.FOLLOW_25_in_asm2_statement2103)
if self.failed:
return
@@ -9158,7 +9177,7 @@ class CParser(Parser):
# $ANTLR start asm1_statement
- # C.g:482:1: asm1_statement : '_asm' '{' (~ ( '}' ) )* '}' ;
+ # C.g:535:1: asm1_statement : '_asm' '{' (~ ( '}' ) )* '}' ;
def asm1_statement(self, ):
asm1_statement_StartIndex = self.input.index()
@@ -9167,26 +9186,26 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 62):
return
- # C.g:483:2: ( '_asm' '{' (~ ( '}' ) )* '}' )
- # C.g:483:4: '_asm' '{' (~ ( '}' ) )* '}'
- self.match(self.input, 103, self.FOLLOW_103_in_asm1_statement2100)
+ # C.g:536:2: ( '_asm' '{' (~ ( '}' ) )* '}' )
+ # C.g:536:4: '_asm' '{' (~ ( '}' ) )* '}'
+ self.match(self.input, 104, self.FOLLOW_104_in_asm1_statement2115)
if self.failed:
return
- self.match(self.input, 43, self.FOLLOW_43_in_asm1_statement2102)
+ self.match(self.input, 43, self.FOLLOW_43_in_asm1_statement2117)
if self.failed:
return
- # C.g:483:15: (~ ( '}' ) )*
+ # C.g:536:15: (~ ( '}' ) )*
while True: #loop87
alt87 = 2
LA87_0 = self.input.LA(1)
- if ((IDENTIFIER <= LA87_0 <= 43) or (45 <= LA87_0 <= 116)) :
+ if ((IDENTIFIER <= LA87_0 <= 43) or (45 <= LA87_0 <= 117)) :
alt87 = 1
if alt87 == 1:
- # C.g:483:16: ~ ( '}' )
- if (IDENTIFIER <= self.input.LA(1) <= 43) or (45 <= self.input.LA(1) <= 116):
+ # C.g:536:16: ~ ( '}' )
+ if (IDENTIFIER <= self.input.LA(1) <= 43) or (45 <= self.input.LA(1) <= 117):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -9198,7 +9217,7 @@ class CParser(Parser):
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
- self.input, mse, self.FOLLOW_set_in_asm1_statement2105
+ self.input, mse, self.FOLLOW_set_in_asm1_statement2120
)
raise mse
@@ -9209,7 +9228,7 @@ class CParser(Parser):
break #loop87
- self.match(self.input, 44, self.FOLLOW_44_in_asm1_statement2112)
+ self.match(self.input, 44, self.FOLLOW_44_in_asm1_statement2127)
if self.failed:
return
@@ -9231,7 +9250,7 @@ class CParser(Parser):
# $ANTLR start asm_statement
- # C.g:486:1: asm_statement : '__asm' '{' (~ ( '}' ) )* '}' ;
+ # C.g:539:1: asm_statement : '__asm' '{' (~ ( '}' ) )* '}' ;
def asm_statement(self, ):
asm_statement_StartIndex = self.input.index()
@@ -9240,26 +9259,26 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 63):
return
- # C.g:487:2: ( '__asm' '{' (~ ( '}' ) )* '}' )
- # C.g:487:4: '__asm' '{' (~ ( '}' ) )* '}'
- self.match(self.input, 104, self.FOLLOW_104_in_asm_statement2123)
+ # C.g:540:2: ( '__asm' '{' (~ ( '}' ) )* '}' )
+ # C.g:540:4: '__asm' '{' (~ ( '}' ) )* '}'
+ self.match(self.input, 105, self.FOLLOW_105_in_asm_statement2138)
if self.failed:
return
- self.match(self.input, 43, self.FOLLOW_43_in_asm_statement2125)
+ self.match(self.input, 43, self.FOLLOW_43_in_asm_statement2140)
if self.failed:
return
- # C.g:487:16: (~ ( '}' ) )*
+ # C.g:540:16: (~ ( '}' ) )*
while True: #loop88
alt88 = 2
LA88_0 = self.input.LA(1)
- if ((IDENTIFIER <= LA88_0 <= 43) or (45 <= LA88_0 <= 116)) :
+ if ((IDENTIFIER <= LA88_0 <= 43) or (45 <= LA88_0 <= 117)) :
alt88 = 1
if alt88 == 1:
- # C.g:487:17: ~ ( '}' )
- if (IDENTIFIER <= self.input.LA(1) <= 43) or (45 <= self.input.LA(1) <= 116):
+ # C.g:540:17: ~ ( '}' )
+ if (IDENTIFIER <= self.input.LA(1) <= 43) or (45 <= self.input.LA(1) <= 117):
self.input.consume();
self.errorRecovery = False
self.failed = False
@@ -9271,7 +9290,7 @@ class CParser(Parser):
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
- self.input, mse, self.FOLLOW_set_in_asm_statement2128
+ self.input, mse, self.FOLLOW_set_in_asm_statement2143
)
raise mse
@@ -9282,7 +9301,7 @@ class CParser(Parser):
break #loop88
- self.match(self.input, 44, self.FOLLOW_44_in_asm_statement2135)
+ self.match(self.input, 44, self.FOLLOW_44_in_asm_statement2150)
if self.failed:
return
@@ -9304,7 +9323,7 @@ class CParser(Parser):
# $ANTLR start macro_statement
- # C.g:490:1: macro_statement : IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' ;
+ # C.g:543:1: macro_statement : IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' ;
def macro_statement(self, ):
macro_statement_StartIndex = self.input.index()
@@ -9313,157 +9332,157 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 64):
return
- # C.g:491:2: ( IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' )
- # C.g:491:4: IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')'
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement2147)
+ # C.g:544:2: ( IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' )
+ # C.g:544:4: IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')'
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement2162)
if self.failed:
return
- self.match(self.input, 61, self.FOLLOW_61_in_macro_statement2149)
+ self.match(self.input, 62, self.FOLLOW_62_in_macro_statement2164)
if self.failed:
return
- # C.g:491:19: ( declaration )*
+ # C.g:544:19: ( declaration )*
while True: #loop89
alt89 = 2
LA89 = self.input.LA(1)
if LA89 == IDENTIFIER:
LA89 = self.input.LA(2)
- if LA89 == 61:
+ if LA89 == 62:
LA89_45 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 65:
- LA89_48 = self.input.LA(3)
+ elif LA89 == IDENTIFIER:
+ LA89_47 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 25:
- LA89_66 = self.input.LA(3)
+ elif LA89 == 66:
+ LA89_50 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == IDENTIFIER:
- LA89_69 = self.input.LA(3)
+ elif LA89 == 25:
+ LA89_68 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
- LA89_70 = self.input.LA(3)
+ LA89_71 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
- LA89_71 = self.input.LA(3)
+ LA89_72 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
- LA89_72 = self.input.LA(3)
+ LA89_73 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
- LA89_73 = self.input.LA(3)
+ LA89_74 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
- LA89_74 = self.input.LA(3)
+ LA89_75 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
- LA89_75 = self.input.LA(3)
+ LA89_76 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
- LA89_76 = self.input.LA(3)
+ LA89_77 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
- LA89_77 = self.input.LA(3)
+ LA89_78 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
- LA89_78 = self.input.LA(3)
+ LA89_79 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
- LA89_79 = self.input.LA(3)
+ LA89_80 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
- LA89_80 = self.input.LA(3)
+ LA89_81 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
- LA89_81 = self.input.LA(3)
+ LA89_82 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
- LA89_82 = self.input.LA(3)
+ LA89_83 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
- LA89_83 = self.input.LA(3)
+ LA89_84 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
- LA89_84 = self.input.LA(3)
+ LA89_85 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
- LA89_85 = self.input.LA(3)
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_86 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
@@ -9473,1563 +9492,1563 @@ class CParser(Parser):
if LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_87 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_88 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_89 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_90 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_91 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_92 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_93 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_94 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_95 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_96 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_97 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_98 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_99 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_100 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 65:
+ elif LA89 == 66:
LA89_101 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_102 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_103 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_104 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_105 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_106 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_107 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_108 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_109 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_110 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_111 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_112 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_113 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_114 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_115 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_116 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_117 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_118 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_119 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_120 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_121 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_122 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_123 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_124 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_125 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_126 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_127 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_128 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_129 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_130 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_131 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_132 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_133 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_134 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_135 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_136 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_137 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_138 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_139 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_140 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_141 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_142 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_143 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_144 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_145 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_146 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_147 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_148 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_149 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_150 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_151 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_152 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_153 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_154 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_155 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_156 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_157 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_158 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_159 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_160 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_161 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_162 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_163 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_164 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_165 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_166 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_167 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_168 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_169 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_170 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_171 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_172 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_173 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_174 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_175 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_176 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_177 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_178 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_179 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_180 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_181 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_182 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_183 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_184 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_185 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_186 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_187 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_188 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_189 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_190 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_191 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_192 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_193 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_194 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_195 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_196 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_197 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_198 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_199 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_200 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_201 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_202 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_203 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_204 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_205 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_206 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_207 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_208 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_209 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_210 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_211 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_212 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_213 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_214 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_215 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_216 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_217 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_218 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_219 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_220 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_221 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_222 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_223 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_224 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_225 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_226 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_227 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_228 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_229 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_230 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_231 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_232 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_233 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_234 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_235 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_236 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_237 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_238 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_239 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_240 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_241 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_242 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_243 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_244 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_245 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_246 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_247 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_248 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_249 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_250 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_251 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_252 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_253 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_254 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_255 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_256 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_257 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_258 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_259 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_260 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_261 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_262 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_263 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_264 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_265 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_266 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_267 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_268 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_269 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_270 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_271 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_272 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_273 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_274 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_275 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_276 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_277 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_278 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_279 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_280 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_281 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_282 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_283 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_284 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_285 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_286 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_287 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_288 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_289 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_290 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_291 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_292 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_293 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_294 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_295 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_296 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_297 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_298 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_299 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_300 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_301 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_302 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_303 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_304 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_305 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
@@ -11040,14 +11059,14 @@ class CParser(Parser):
if (LA89_40 == IDENTIFIER) :
LA89_306 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif (LA89_40 == 43) :
LA89_307 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
@@ -11056,161 +11075,161 @@ class CParser(Parser):
elif LA89 == 48:
LA89_41 = self.input.LA(2)
- if (LA89_41 == IDENTIFIER) :
+ if (LA89_41 == 43) :
LA89_308 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif (LA89_41 == 43) :
+ elif (LA89_41 == IDENTIFIER) :
LA89_309 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 58 or LA89 == 59 or LA89 == 60:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 58 or LA89 == 59 or LA89 == 60 or LA89 == 61:
LA89 = self.input.LA(2)
- if LA89 == 65:
+ if LA89 == 66:
LA89_310 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 58:
LA89_311 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 59:
LA89_312 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 60:
LA89_313 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == IDENTIFIER:
LA89_314 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 61:
+ elif LA89 == 62:
LA89_315 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 25:
LA89_316 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
LA89_317 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 34:
LA89_318 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 35:
LA89_319 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 36:
LA89_320 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 37:
LA89_321 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 38:
LA89_322 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 39:
LA89_323 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 40:
LA89_324 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 41:
LA89_325 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 42:
LA89_326 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 45 or LA89 == 46:
LA89_327 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
elif LA89 == 48:
LA89_328 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
- elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57:
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
LA89_329 = self.input.LA(3)
- if (self.synpred180()) :
+ if (self.synpred181()) :
alt89 = 1
@@ -11218,7 +11237,7 @@ class CParser(Parser):
if alt89 == 1:
# C.g:0:0: declaration
- self.following.append(self.FOLLOW_declaration_in_macro_statement2151)
+ self.following.append(self.FOLLOW_declaration_in_macro_statement2166)
self.declaration()
self.following.pop()
if self.failed:
@@ -11229,1202 +11248,1202 @@ class CParser(Parser):
break #loop89
- # C.g:491:33: ( statement_list )?
+ # C.g:544:33: ( statement_list )?
alt90 = 2
LA90 = self.input.LA(1)
if LA90 == IDENTIFIER:
LA90 = self.input.LA(2)
- if LA90 == 61:
- LA90_44 = self.input.LA(3)
+ if LA90 == 25 or LA90 == 29 or LA90 == 30 or LA90 == 31 or LA90 == 32 or LA90 == 33 or LA90 == 34 or LA90 == 35 or LA90 == 36 or LA90 == 37 or LA90 == 38 or LA90 == 39 or LA90 == 40 or LA90 == 41 or LA90 == 42 or LA90 == 45 or LA90 == 46 or LA90 == 47 or LA90 == 48 or LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60 or LA90 == 61:
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_45 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 25 or LA90 == 29 or LA90 == 30 or LA90 == 31 or LA90 == 32 or LA90 == 33 or LA90 == 34 or LA90 == 35 or LA90 == 36 or LA90 == 37 or LA90 == 38 or LA90 == 39 or LA90 == 40 or LA90 == 41 or LA90 == 42 or LA90 == 45 or LA90 == 46 or LA90 == 47 or LA90 == 48 or LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60:
- alt90 = 1
elif LA90 == STRING_LITERAL:
LA90_46 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == IDENTIFIER:
LA90_47 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 63:
+ elif LA90 == 64:
LA90_48 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 74:
+ elif LA90 == 75:
LA90_49 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65:
+ elif LA90 == 66:
LA90_50 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 75:
+ elif LA90 == 76:
LA90_51 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_52 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_53 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 28 or LA90 == 79 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88:
+ elif LA90 == 70:
LA90_54 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 69:
- LA90_72 = self.input.LA(3)
+ elif LA90 == 71:
+ LA90_55 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 70:
- LA90_73 = self.input.LA(3)
+ elif LA90 == 68:
+ LA90_56 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 67:
- LA90_74 = self.input.LA(3)
+ elif LA90 == 69:
+ LA90_57 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 68:
- LA90_75 = self.input.LA(3)
+ elif LA90 == 101 or LA90 == 102:
+ LA90_58 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 100 or LA90 == 101:
- LA90_76 = self.input.LA(3)
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
+ LA90_59 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 96 or LA90 == 97 or LA90 == 98 or LA90 == 99:
- LA90_77 = self.input.LA(3)
+ elif LA90 == 95 or LA90 == 96:
+ LA90_60 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 94 or LA90 == 95:
- LA90_78 = self.input.LA(3)
+ elif LA90 == 77:
+ LA90_61 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 76:
- LA90_79 = self.input.LA(3)
+ elif LA90 == 94:
+ LA90_62 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 93:
- LA90_80 = self.input.LA(3)
+ LA90_63 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 92:
- LA90_81 = self.input.LA(3)
+ LA90_64 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 91:
- LA90_82 = self.input.LA(3)
+ LA90_65 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 90:
- LA90_83 = self.input.LA(3)
+ LA90_66 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 89:
- LA90_84 = self.input.LA(3)
+ elif LA90 == 27:
+ LA90_67 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 27:
- LA90_85 = self.input.LA(3)
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_70 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 25 or LA90 == 26 or LA90 == 29 or LA90 == 30 or LA90 == 31 or LA90 == 32 or LA90 == 33 or LA90 == 34 or LA90 == 35 or LA90 == 36 or LA90 == 37 or LA90 == 38 or LA90 == 39 or LA90 == 40 or LA90 == 41 or LA90 == 42 or LA90 == 43 or LA90 == 45 or LA90 == 46 or LA90 == 48 or LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60 or LA90 == 102 or LA90 == 103 or LA90 == 104 or LA90 == 105 or LA90 == 106 or LA90 == 107 or LA90 == 109 or LA90 == 110 or LA90 == 111 or LA90 == 112 or LA90 == 113 or LA90 == 114 or LA90 == 115 or LA90 == 116:
+ elif LA90 == 25 or LA90 == 26 or LA90 == 29 or LA90 == 30 or LA90 == 31 or LA90 == 32 or LA90 == 33 or LA90 == 34 or LA90 == 35 or LA90 == 36 or LA90 == 37 or LA90 == 38 or LA90 == 39 or LA90 == 40 or LA90 == 41 or LA90 == 42 or LA90 == 43 or LA90 == 45 or LA90 == 46 or LA90 == 48 or LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60 or LA90 == 61 or LA90 == 103 or LA90 == 104 or LA90 == 105 or LA90 == 106 or LA90 == 107 or LA90 == 108 or LA90 == 110 or LA90 == 111 or LA90 == 112 or LA90 == 113 or LA90 == 114 or LA90 == 115 or LA90 == 116 or LA90 == 117:
alt90 = 1
elif LA90 == HEX_LITERAL:
LA90 = self.input.LA(2)
- if LA90 == 63:
+ if LA90 == 64:
LA90_87 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_88 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 74:
+ elif LA90 == 75:
LA90_89 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65:
+ elif LA90 == 66:
LA90_90 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 75:
+ elif LA90 == 76:
LA90_91 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_92 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_93 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 69:
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
LA90_94 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 70:
LA90_95 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 67:
+ elif LA90 == 71:
LA90_96 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 68:
LA90_97 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 100 or LA90 == 101:
+ elif LA90 == 69:
LA90_98 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 96 or LA90 == 97 or LA90 == 98 or LA90 == 99:
+ elif LA90 == 101 or LA90 == 102:
LA90_99 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 94 or LA90 == 95:
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
LA90_100 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 76:
+ elif LA90 == 95 or LA90 == 96:
LA90_101 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 93:
+ elif LA90 == 77:
LA90_102 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 92:
+ elif LA90 == 94:
LA90_103 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 91:
+ elif LA90 == 93:
LA90_104 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 90:
+ elif LA90 == 92:
LA90_105 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 89:
+ elif LA90 == 91:
LA90_106 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 27:
+ elif LA90 == 90:
LA90_107 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 25:
- alt90 = 1
- elif LA90 == 28 or LA90 == 79 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88:
- LA90_110 = self.input.LA(3)
+ elif LA90 == 27:
+ LA90_108 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
+ elif LA90 == 25:
+ alt90 = 1
elif LA90 == OCTAL_LITERAL:
LA90 = self.input.LA(2)
- if LA90 == 63:
+ if LA90 == 64:
LA90_111 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_112 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 74:
+ elif LA90 == 75:
LA90_113 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65:
+ elif LA90 == 66:
LA90_114 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 75:
+ elif LA90 == 76:
LA90_115 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_116 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_117 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 28 or LA90 == 79 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88:
+ elif LA90 == 70:
LA90_118 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 69:
+ elif LA90 == 71:
LA90_119 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 70:
+ elif LA90 == 68:
LA90_120 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 67:
+ elif LA90 == 69:
LA90_121 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 68:
+ elif LA90 == 101 or LA90 == 102:
LA90_122 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 100 or LA90 == 101:
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
LA90_123 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 96 or LA90 == 97 or LA90 == 98 or LA90 == 99:
+ elif LA90 == 95 or LA90 == 96:
LA90_124 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 94 or LA90 == 95:
+ elif LA90 == 77:
LA90_125 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 76:
+ elif LA90 == 94:
LA90_126 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 93:
LA90_127 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 92:
LA90_128 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 91:
LA90_129 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 90:
LA90_130 = self.input.LA(3)
- if (self.synpred181()) :
- alt90 = 1
- elif LA90 == 89:
- LA90_131 = self.input.LA(3)
-
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 27:
- LA90_132 = self.input.LA(3)
+ LA90_131 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 25:
alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_134 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
elif LA90 == DECIMAL_LITERAL:
LA90 = self.input.LA(2)
- if LA90 == 63:
+ if LA90 == 64:
LA90_135 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_136 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 74:
+ elif LA90 == 75:
LA90_137 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65:
+ elif LA90 == 66:
LA90_138 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 75:
+ elif LA90 == 76:
LA90_139 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_140 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_141 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 28 or LA90 == 79 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88:
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
LA90_142 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 69:
+ elif LA90 == 70:
LA90_143 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 70:
+ elif LA90 == 71:
LA90_144 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 67:
+ elif LA90 == 68:
LA90_145 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 68:
+ elif LA90 == 69:
LA90_146 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 100 or LA90 == 101:
+ elif LA90 == 101 or LA90 == 102:
LA90_147 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 96 or LA90 == 97 or LA90 == 98 or LA90 == 99:
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
LA90_148 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 94 or LA90 == 95:
+ elif LA90 == 95 or LA90 == 96:
LA90_149 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 76:
+ elif LA90 == 77:
LA90_150 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 93:
+ elif LA90 == 94:
LA90_151 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 92:
+ elif LA90 == 93:
LA90_152 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 91:
+ elif LA90 == 92:
LA90_153 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 90:
+ elif LA90 == 91:
LA90_154 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 89:
+ elif LA90 == 90:
LA90_155 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 27:
LA90_156 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 25:
alt90 = 1
elif LA90 == CHARACTER_LITERAL:
LA90 = self.input.LA(2)
- if LA90 == 63:
+ if LA90 == 64:
LA90_159 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_160 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 74:
+ elif LA90 == 75:
LA90_161 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65:
+ elif LA90 == 66:
LA90_162 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 75:
+ elif LA90 == 76:
LA90_163 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_164 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_165 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 28 or LA90 == 79 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88:
+ elif LA90 == 70:
LA90_166 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 69:
+ elif LA90 == 71:
LA90_167 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 70:
+ elif LA90 == 68:
LA90_168 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 67:
+ elif LA90 == 69:
LA90_169 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 68:
+ elif LA90 == 101 or LA90 == 102:
LA90_170 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 100 or LA90 == 101:
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
LA90_171 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 96 or LA90 == 97 or LA90 == 98 or LA90 == 99:
+ elif LA90 == 95 or LA90 == 96:
LA90_172 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 94 or LA90 == 95:
+ elif LA90 == 77:
LA90_173 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 76:
+ elif LA90 == 94:
LA90_174 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 93:
LA90_175 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 92:
LA90_176 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 91:
LA90_177 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 90:
LA90_178 = self.input.LA(3)
- if (self.synpred181()) :
- alt90 = 1
- elif LA90 == 89:
- LA90_179 = self.input.LA(3)
-
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 27:
- LA90_180 = self.input.LA(3)
+ LA90_179 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 25:
alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_181 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
elif LA90 == STRING_LITERAL:
LA90 = self.input.LA(2)
if LA90 == IDENTIFIER:
LA90_183 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 63:
+ elif LA90 == 64:
LA90_184 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_185 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 74:
+ elif LA90 == 75:
LA90_186 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65:
+ elif LA90 == 66:
LA90_187 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 75:
+ elif LA90 == 76:
LA90_188 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_189 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_190 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 69:
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
LA90_191 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 70:
+ elif LA90 == STRING_LITERAL:
LA90_192 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 67:
+ elif LA90 == 70:
LA90_193 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 68:
+ elif LA90 == 71:
LA90_194 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 100 or LA90 == 101:
+ elif LA90 == 68:
LA90_195 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 96 or LA90 == 97 or LA90 == 98 or LA90 == 99:
+ elif LA90 == 69:
LA90_196 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 94 or LA90 == 95:
+ elif LA90 == 101 or LA90 == 102:
LA90_197 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 76:
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
LA90_198 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 93:
+ elif LA90 == 95 or LA90 == 96:
LA90_199 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 92:
+ elif LA90 == 77:
LA90_200 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 91:
+ elif LA90 == 94:
LA90_201 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 90:
+ elif LA90 == 93:
LA90_202 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 89:
+ elif LA90 == 92:
LA90_203 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 27:
+ elif LA90 == 91:
LA90_204 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 25:
- alt90 = 1
- elif LA90 == STRING_LITERAL:
- LA90_206 = self.input.LA(3)
+ elif LA90 == 90:
+ LA90_205 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 28 or LA90 == 79 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88:
- LA90_207 = self.input.LA(3)
+ elif LA90 == 27:
+ LA90_206 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
+ elif LA90 == 25:
+ alt90 = 1
elif LA90 == FLOATING_POINT_LITERAL:
LA90 = self.input.LA(2)
- if LA90 == 63:
+ if LA90 == 64:
LA90_209 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_210 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 74:
+ elif LA90 == 75:
LA90_211 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65:
+ elif LA90 == 66:
LA90_212 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 75:
+ elif LA90 == 76:
LA90_213 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_214 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_215 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 69:
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
LA90_216 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 70:
LA90_217 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 67:
+ elif LA90 == 71:
LA90_218 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 68:
LA90_219 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 100 or LA90 == 101:
+ elif LA90 == 69:
LA90_220 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 96 or LA90 == 97 or LA90 == 98 or LA90 == 99:
+ elif LA90 == 101 or LA90 == 102:
LA90_221 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 94 or LA90 == 95:
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
LA90_222 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 76:
+ elif LA90 == 95 or LA90 == 96:
LA90_223 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 93:
+ elif LA90 == 77:
LA90_224 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 92:
+ elif LA90 == 94:
LA90_225 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 91:
+ elif LA90 == 93:
LA90_226 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 90:
+ elif LA90 == 92:
LA90_227 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 89:
+ elif LA90 == 91:
LA90_228 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 27:
+ elif LA90 == 90:
LA90_229 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 25:
- alt90 = 1
- elif LA90 == 28 or LA90 == 79 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88:
- LA90_231 = self.input.LA(3)
+ elif LA90 == 27:
+ LA90_230 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 25:
+ alt90 = 1
+ elif LA90 == 62:
LA90 = self.input.LA(2)
if LA90 == IDENTIFIER:
LA90_233 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == HEX_LITERAL:
LA90_234 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == OCTAL_LITERAL:
LA90_235 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == DECIMAL_LITERAL:
LA90_236 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == CHARACTER_LITERAL:
LA90_237 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == STRING_LITERAL:
LA90_238 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == FLOATING_POINT_LITERAL:
LA90_239 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_240 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_241 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_242 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65 or LA90 == 67 or LA90 == 68 or LA90 == 76 or LA90 == 77 or LA90 == 78:
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
LA90_243 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 73:
+ elif LA90 == 74:
LA90_244 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60:
+ elif LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60 or LA90 == 61:
LA90_245 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 34:
LA90_246 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 35:
LA90_247 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 36:
LA90_248 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 37:
LA90_249 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 38:
LA90_250 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 39:
LA90_251 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 40:
LA90_252 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 41:
LA90_253 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 42:
LA90_254 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 45 or LA90 == 46:
LA90_255 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == 48:
LA90_256 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90 = self.input.LA(2)
if LA90 == IDENTIFIER:
LA90_257 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == HEX_LITERAL:
LA90_258 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == OCTAL_LITERAL:
LA90_259 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == DECIMAL_LITERAL:
LA90_260 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == CHARACTER_LITERAL:
LA90_261 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == STRING_LITERAL:
LA90_262 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == FLOATING_POINT_LITERAL:
LA90_263 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_264 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_265 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_266 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65 or LA90 == 67 or LA90 == 68 or LA90 == 76 or LA90 == 77 or LA90 == 78:
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
LA90_267 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 73:
+ elif LA90 == 74:
LA90_268 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90 = self.input.LA(2)
if LA90 == IDENTIFIER:
LA90_269 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == HEX_LITERAL:
LA90_270 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == OCTAL_LITERAL:
LA90_271 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == DECIMAL_LITERAL:
LA90_272 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == CHARACTER_LITERAL:
LA90_273 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == STRING_LITERAL:
LA90_274 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == FLOATING_POINT_LITERAL:
LA90_275 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 61:
+ elif LA90 == 62:
LA90_276 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_277 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_278 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65 or LA90 == 67 or LA90 == 68 or LA90 == 76 or LA90 == 77 or LA90 == 78:
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
LA90_279 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 73:
+ elif LA90 == 74:
LA90_280 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65 or LA90 == 67 or LA90 == 68 or LA90 == 76 or LA90 == 77 or LA90 == 78:
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
LA90 = self.input.LA(2)
- if LA90 == 61:
+ if LA90 == 62:
LA90_281 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == IDENTIFIER:
LA90_282 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == HEX_LITERAL:
LA90_283 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == OCTAL_LITERAL:
LA90_284 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == DECIMAL_LITERAL:
LA90_285 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == CHARACTER_LITERAL:
LA90_286 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == STRING_LITERAL:
LA90_287 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == FLOATING_POINT_LITERAL:
LA90_288 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_289 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_290 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65 or LA90 == 67 or LA90 == 68 or LA90 == 76 or LA90 == 77 or LA90 == 78:
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
LA90_291 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 73:
+ elif LA90 == 74:
LA90_292 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 73:
+ elif LA90 == 74:
LA90 = self.input.LA(2)
- if LA90 == 61:
+ if LA90 == 62:
LA90_293 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == IDENTIFIER:
LA90_294 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == HEX_LITERAL:
LA90_295 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == OCTAL_LITERAL:
LA90_296 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == DECIMAL_LITERAL:
LA90_297 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == CHARACTER_LITERAL:
LA90_298 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == STRING_LITERAL:
LA90_299 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
elif LA90 == FLOATING_POINT_LITERAL:
LA90_300 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 71:
+ elif LA90 == 72:
LA90_301 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 72:
+ elif LA90 == 73:
LA90_302 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 65 or LA90 == 67 or LA90 == 68 or LA90 == 76 or LA90 == 77 or LA90 == 78:
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
LA90_303 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
- elif LA90 == 73:
+ elif LA90 == 74:
LA90_304 = self.input.LA(3)
- if (self.synpred181()) :
+ if (self.synpred182()) :
alt90 = 1
if alt90 == 1:
# C.g:0:0: statement_list
- self.following.append(self.FOLLOW_statement_list_in_macro_statement2155)
+ self.following.append(self.FOLLOW_statement_list_in_macro_statement2170)
self.statement_list()
self.following.pop()
if self.failed:
@@ -12432,15 +12451,15 @@ class CParser(Parser):
- # C.g:491:49: ( expression )?
+ # C.g:544:49: ( expression )?
alt91 = 2
LA91_0 = self.input.LA(1)
- if ((IDENTIFIER <= LA91_0 <= FLOATING_POINT_LITERAL) or LA91_0 == 61 or LA91_0 == 65 or (67 <= LA91_0 <= 68) or (71 <= LA91_0 <= 73) or (76 <= LA91_0 <= 78)) :
+ if ((IDENTIFIER <= LA91_0 <= FLOATING_POINT_LITERAL) or LA91_0 == 62 or LA91_0 == 66 or (68 <= LA91_0 <= 69) or (72 <= LA91_0 <= 74) or (77 <= LA91_0 <= 79)) :
alt91 = 1
if alt91 == 1:
# C.g:0:0: expression
- self.following.append(self.FOLLOW_expression_in_macro_statement2158)
+ self.following.append(self.FOLLOW_expression_in_macro_statement2173)
self.expression()
self.following.pop()
if self.failed:
@@ -12448,7 +12467,7 @@ class CParser(Parser):
- self.match(self.input, 62, self.FOLLOW_62_in_macro_statement2161)
+ self.match(self.input, 63, self.FOLLOW_63_in_macro_statement2176)
if self.failed:
return
@@ -12470,7 +12489,7 @@ class CParser(Parser):
# $ANTLR start labeled_statement
- # C.g:494:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );
+ # C.g:547:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );
def labeled_statement(self, ):
labeled_statement_StartIndex = self.input.index()
@@ -12479,33 +12498,33 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 65):
return
- # C.g:495:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement )
+ # C.g:548:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement )
alt92 = 3
LA92 = self.input.LA(1)
if LA92 == IDENTIFIER:
alt92 = 1
- elif LA92 == 105:
- alt92 = 2
elif LA92 == 106:
+ alt92 = 2
+ elif LA92 == 107:
alt92 = 3
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("494:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 92, 0, self.input)
+ nvae = NoViableAltException("547:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 92, 0, self.input)
raise nvae
if alt92 == 1:
- # C.g:495:4: IDENTIFIER ':' statement
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement2173)
+ # C.g:548:4: IDENTIFIER ':' statement
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement2188)
if self.failed:
return
- self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2175)
+ self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2190)
if self.failed:
return
- self.following.append(self.FOLLOW_statement_in_labeled_statement2177)
+ self.following.append(self.FOLLOW_statement_in_labeled_statement2192)
self.statement()
self.following.pop()
if self.failed:
@@ -12513,19 +12532,19 @@ class CParser(Parser):
elif alt92 == 2:
- # C.g:496:4: 'case' constant_expression ':' statement
- self.match(self.input, 105, self.FOLLOW_105_in_labeled_statement2182)
+ # C.g:549:4: 'case' constant_expression ':' statement
+ self.match(self.input, 106, self.FOLLOW_106_in_labeled_statement2197)
if self.failed:
return
- self.following.append(self.FOLLOW_constant_expression_in_labeled_statement2184)
+ self.following.append(self.FOLLOW_constant_expression_in_labeled_statement2199)
self.constant_expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2186)
+ self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2201)
if self.failed:
return
- self.following.append(self.FOLLOW_statement_in_labeled_statement2188)
+ self.following.append(self.FOLLOW_statement_in_labeled_statement2203)
self.statement()
self.following.pop()
if self.failed:
@@ -12533,14 +12552,14 @@ class CParser(Parser):
elif alt92 == 3:
- # C.g:497:4: 'default' ':' statement
- self.match(self.input, 106, self.FOLLOW_106_in_labeled_statement2193)
+ # C.g:550:4: 'default' ':' statement
+ self.match(self.input, 107, self.FOLLOW_107_in_labeled_statement2208)
if self.failed:
return
- self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2195)
+ self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2210)
if self.failed:
return
- self.following.append(self.FOLLOW_statement_in_labeled_statement2197)
+ self.following.append(self.FOLLOW_statement_in_labeled_statement2212)
self.statement()
self.following.pop()
if self.failed:
@@ -12569,7 +12588,7 @@ class CParser(Parser):
# $ANTLR start compound_statement
- # C.g:500:1: compound_statement : '{' ( declaration )* ( statement_list )? '}' ;
+ # C.g:553:1: compound_statement : '{' ( declaration )* ( statement_list )? '}' ;
def compound_statement(self, ):
retval = self.compound_statement_return()
@@ -12580,154 +12599,154 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 66):
return retval
- # C.g:501:2: ( '{' ( declaration )* ( statement_list )? '}' )
- # C.g:501:4: '{' ( declaration )* ( statement_list )? '}'
- self.match(self.input, 43, self.FOLLOW_43_in_compound_statement2208)
+ # C.g:554:2: ( '{' ( declaration )* ( statement_list )? '}' )
+ # C.g:554:4: '{' ( declaration )* ( statement_list )? '}'
+ self.match(self.input, 43, self.FOLLOW_43_in_compound_statement2223)
if self.failed:
return retval
- # C.g:501:8: ( declaration )*
+ # C.g:554:8: ( declaration )*
while True: #loop93
alt93 = 2
LA93 = self.input.LA(1)
if LA93 == IDENTIFIER:
LA93 = self.input.LA(2)
- if LA93 == 61:
+ if LA93 == 62:
LA93_44 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 65:
- LA93_48 = self.input.LA(3)
+ elif LA93 == IDENTIFIER:
+ LA93_47 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 25:
- LA93_67 = self.input.LA(3)
+ elif LA93 == 66:
+ LA93_48 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == IDENTIFIER:
- LA93_69 = self.input.LA(3)
+ elif LA93 == 58:
+ LA93_49 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 58:
- LA93_70 = self.input.LA(3)
+ elif LA93 == 59:
+ LA93_50 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 59:
- LA93_71 = self.input.LA(3)
+ elif LA93 == 60:
+ LA93_51 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 60:
- LA93_72 = self.input.LA(3)
+ elif LA93 == 25:
+ LA93_52 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
- LA93_73 = self.input.LA(3)
+ LA93_53 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
- LA93_74 = self.input.LA(3)
+ LA93_54 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
- LA93_75 = self.input.LA(3)
+ LA93_55 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
- LA93_76 = self.input.LA(3)
+ LA93_56 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
- LA93_77 = self.input.LA(3)
+ LA93_57 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
- LA93_78 = self.input.LA(3)
+ LA93_58 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
- LA93_79 = self.input.LA(3)
+ LA93_59 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
- LA93_80 = self.input.LA(3)
+ LA93_60 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
- LA93_81 = self.input.LA(3)
+ LA93_61 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
- LA93_82 = self.input.LA(3)
+ LA93_62 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
- LA93_83 = self.input.LA(3)
+ LA93_63 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
- LA93_84 = self.input.LA(3)
+ LA93_64 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
- LA93_85 = self.input.LA(3)
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_65 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
@@ -12737,1563 +12756,1563 @@ class CParser(Parser):
if LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_86 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_87 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_88 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_89 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_90 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_91 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_92 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_93 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_94 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_95 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_96 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_97 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_98 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_99 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 65:
+ elif LA93 == 66:
LA93_100 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_101 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_102 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_103 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_104 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_105 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_106 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_107 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_108 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_109 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_110 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_111 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_112 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_113 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_114 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_115 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_116 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_117 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_118 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_119 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_120 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_121 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_122 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_123 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_124 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_125 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_126 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_127 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_128 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_129 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_130 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_131 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_132 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_133 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_134 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_135 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_136 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_137 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_138 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_139 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_140 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_141 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_142 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_143 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_144 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_145 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_146 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_147 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_148 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_149 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_150 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_151 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_152 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_153 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_154 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_155 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_156 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_157 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_158 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_159 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_160 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_161 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_162 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_163 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_164 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_165 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_166 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_167 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_168 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_169 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_170 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_171 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_172 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_173 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_174 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_175 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_176 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_177 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_178 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_179 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_180 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_181 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_182 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_183 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_184 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_185 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_186 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_187 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_188 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_189 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_190 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_191 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_192 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_193 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_194 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_195 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_196 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_197 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_198 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_199 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_200 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_201 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_202 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_203 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_204 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_205 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_206 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_207 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_208 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_209 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_210 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_211 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_212 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_213 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_214 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_215 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_216 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_217 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_218 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_219 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_220 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_221 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_222 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_223 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_224 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_225 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_226 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_227 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_228 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_229 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_230 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_231 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_232 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_233 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_234 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_235 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_236 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_237 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_238 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_239 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_240 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_241 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_242 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_243 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_244 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_245 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_246 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_247 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_248 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_249 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_250 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_251 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_252 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_253 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_254 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_255 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_256 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_257 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_258 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_259 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_260 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_261 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_262 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_263 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_264 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_265 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_266 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_267 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_268 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_269 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_270 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_271 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_272 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_273 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_274 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_275 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_276 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_277 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_278 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_279 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_280 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_281 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_282 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_283 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_284 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_285 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_286 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_287 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_288 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_289 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_290 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_291 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_292 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_293 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_294 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_295 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_296 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_297 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_298 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_299 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_300 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_301 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_302 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_303 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_304 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
@@ -14304,14 +14323,14 @@ class CParser(Parser):
if (LA93_40 == IDENTIFIER) :
LA93_305 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif (LA93_40 == 43) :
LA93_306 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
@@ -14320,161 +14339,161 @@ class CParser(Parser):
elif LA93 == 48:
LA93_41 = self.input.LA(2)
- if (LA93_41 == IDENTIFIER) :
+ if (LA93_41 == 43) :
LA93_307 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif (LA93_41 == 43) :
+ elif (LA93_41 == IDENTIFIER) :
LA93_308 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 58 or LA93 == 59 or LA93 == 60:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 58 or LA93 == 59 or LA93 == 60 or LA93 == 61:
LA93 = self.input.LA(2)
- if LA93 == 65:
+ if LA93 == 66:
LA93_309 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 58:
LA93_310 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 59:
LA93_311 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 60:
LA93_312 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == IDENTIFIER:
LA93_313 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 61:
+ elif LA93 == 62:
LA93_314 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 25:
LA93_315 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
LA93_316 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 34:
LA93_317 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 35:
LA93_318 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 36:
LA93_319 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 37:
LA93_320 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 38:
LA93_321 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 39:
LA93_322 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 40:
LA93_323 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 41:
LA93_324 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 42:
LA93_325 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 45 or LA93 == 46:
LA93_326 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
elif LA93 == 48:
LA93_327 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
- elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57:
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
LA93_328 = self.input.LA(3)
- if (self.synpred185()) :
+ if (self.synpred186()) :
alt93 = 1
@@ -14482,7 +14501,7 @@ class CParser(Parser):
if alt93 == 1:
# C.g:0:0: declaration
- self.following.append(self.FOLLOW_declaration_in_compound_statement2210)
+ self.following.append(self.FOLLOW_declaration_in_compound_statement2225)
self.declaration()
self.following.pop()
if self.failed:
@@ -14493,15 +14512,15 @@ class CParser(Parser):
break #loop93
- # C.g:501:21: ( statement_list )?
+ # C.g:554:21: ( statement_list )?
alt94 = 2
LA94_0 = self.input.LA(1)
- if ((IDENTIFIER <= LA94_0 <= FLOATING_POINT_LITERAL) or (25 <= LA94_0 <= 26) or (29 <= LA94_0 <= 43) or (45 <= LA94_0 <= 46) or (48 <= LA94_0 <= 61) or LA94_0 == 65 or (67 <= LA94_0 <= 68) or (71 <= LA94_0 <= 73) or (76 <= LA94_0 <= 78) or (102 <= LA94_0 <= 107) or (109 <= LA94_0 <= 116)) :
+ if ((IDENTIFIER <= LA94_0 <= FLOATING_POINT_LITERAL) or (25 <= LA94_0 <= 26) or (29 <= LA94_0 <= 43) or (45 <= LA94_0 <= 46) or (48 <= LA94_0 <= 62) or LA94_0 == 66 or (68 <= LA94_0 <= 69) or (72 <= LA94_0 <= 74) or (77 <= LA94_0 <= 79) or (103 <= LA94_0 <= 108) or (110 <= LA94_0 <= 117)) :
alt94 = 1
if alt94 == 1:
# C.g:0:0: statement_list
- self.following.append(self.FOLLOW_statement_list_in_compound_statement2213)
+ self.following.append(self.FOLLOW_statement_list_in_compound_statement2228)
self.statement_list()
self.following.pop()
if self.failed:
@@ -14509,7 +14528,7 @@ class CParser(Parser):
- self.match(self.input, 44, self.FOLLOW_44_in_compound_statement2216)
+ self.match(self.input, 44, self.FOLLOW_44_in_compound_statement2231)
if self.failed:
return retval
@@ -14533,7 +14552,7 @@ class CParser(Parser):
# $ANTLR start statement_list
- # C.g:504:1: statement_list : ( statement )+ ;
+ # C.g:557:1: statement_list : ( statement )+ ;
def statement_list(self, ):
statement_list_StartIndex = self.input.index()
@@ -14542,498 +14561,498 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 67):
return
- # C.g:505:2: ( ( statement )+ )
- # C.g:505:4: ( statement )+
- # C.g:505:4: ( statement )+
+ # C.g:558:2: ( ( statement )+ )
+ # C.g:558:4: ( statement )+
+ # C.g:558:4: ( statement )+
cnt95 = 0
while True: #loop95
alt95 = 2
LA95 = self.input.LA(1)
if LA95 == IDENTIFIER:
LA95 = self.input.LA(2)
- if LA95 == 25 or LA95 == 29 or LA95 == 30 or LA95 == 31 or LA95 == 32 or LA95 == 33 or LA95 == 34 or LA95 == 35 or LA95 == 36 or LA95 == 37 or LA95 == 38 or LA95 == 39 or LA95 == 40 or LA95 == 41 or LA95 == 42 or LA95 == 45 or LA95 == 46 or LA95 == 47 or LA95 == 48 or LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60:
- alt95 = 1
- elif LA95 == 61:
- LA95_47 = self.input.LA(3)
+ if LA95 == 62:
+ LA95_46 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 63:
+ elif LA95 == 25 or LA95 == 29 or LA95 == 30 or LA95 == 31 or LA95 == 32 or LA95 == 33 or LA95 == 34 or LA95 == 35 or LA95 == 36 or LA95 == 37 or LA95 == 38 or LA95 == 39 or LA95 == 40 or LA95 == 41 or LA95 == 42 or LA95 == 45 or LA95 == 46 or LA95 == 47 or LA95 == 48 or LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60 or LA95 == 61:
+ alt95 = 1
+ elif LA95 == STRING_LITERAL:
LA95_48 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 74:
+ elif LA95 == IDENTIFIER:
LA95_49 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65:
+ elif LA95 == 64:
LA95_50 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 75:
LA95_51 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 66:
LA95_52 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 76:
LA95_53 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 28 or LA95 == 79 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88:
+ elif LA95 == 72:
LA95_54 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == STRING_LITERAL:
+ elif LA95 == 73:
LA95_55 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == IDENTIFIER:
+ elif LA95 == 70:
LA95_56 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 69:
+ elif LA95 == 71:
LA95_57 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 70:
+ elif LA95 == 68:
LA95_58 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 67:
+ elif LA95 == 69:
LA95_59 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 68:
+ elif LA95 == 101 or LA95 == 102:
LA95_60 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 100 or LA95 == 101:
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
LA95_61 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 96 or LA95 == 97 or LA95 == 98 or LA95 == 99:
+ elif LA95 == 95 or LA95 == 96:
LA95_62 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 94 or LA95 == 95:
+ elif LA95 == 77:
LA95_63 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 76:
+ elif LA95 == 94:
LA95_64 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 93:
LA95_65 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 92:
LA95_66 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 91:
LA95_67 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 90:
LA95_68 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 89:
+ elif LA95 == 27:
LA95_69 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 27:
- LA95_70 = self.input.LA(3)
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_88 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == HEX_LITERAL:
LA95 = self.input.LA(2)
- if LA95 == 63:
+ if LA95 == 64:
LA95_89 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_90 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 74:
+ elif LA95 == 75:
LA95_91 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65:
+ elif LA95 == 66:
LA95_92 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 75:
+ elif LA95 == 76:
LA95_93 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_94 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_95 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 69:
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
LA95_96 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 70:
LA95_97 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 67:
+ elif LA95 == 71:
LA95_98 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 68:
LA95_99 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 100 or LA95 == 101:
+ elif LA95 == 69:
LA95_100 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 96 or LA95 == 97 or LA95 == 98 or LA95 == 99:
+ elif LA95 == 101 or LA95 == 102:
LA95_101 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 94 or LA95 == 95:
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
LA95_102 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 76:
+ elif LA95 == 95 or LA95 == 96:
LA95_103 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 93:
+ elif LA95 == 77:
LA95_104 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 92:
+ elif LA95 == 94:
LA95_105 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 91:
+ elif LA95 == 93:
LA95_106 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 90:
+ elif LA95 == 92:
LA95_107 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 89:
+ elif LA95 == 91:
LA95_108 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 27:
+ elif LA95 == 90:
LA95_109 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 25:
- alt95 = 1
- elif LA95 == 28 or LA95 == 79 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88:
- LA95_112 = self.input.LA(3)
+ elif LA95 == 27:
+ LA95_110 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
+ elif LA95 == 25:
+ alt95 = 1
elif LA95 == OCTAL_LITERAL:
LA95 = self.input.LA(2)
- if LA95 == 63:
+ if LA95 == 64:
LA95_113 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_114 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 74:
+ elif LA95 == 75:
LA95_115 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65:
+ elif LA95 == 66:
LA95_116 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 75:
+ elif LA95 == 76:
LA95_117 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_118 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_119 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 28 or LA95 == 79 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88:
+ elif LA95 == 70:
LA95_120 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 69:
+ elif LA95 == 71:
LA95_121 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 70:
+ elif LA95 == 68:
LA95_122 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 67:
+ elif LA95 == 69:
LA95_123 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 68:
+ elif LA95 == 101 or LA95 == 102:
LA95_124 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 100 or LA95 == 101:
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
LA95_125 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 96 or LA95 == 97 or LA95 == 98 or LA95 == 99:
+ elif LA95 == 95 or LA95 == 96:
LA95_126 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 94 or LA95 == 95:
+ elif LA95 == 77:
LA95_127 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 76:
+ elif LA95 == 94:
LA95_128 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 93:
LA95_129 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 92:
LA95_130 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 91:
LA95_131 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 90:
LA95_132 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 89:
+ elif LA95 == 27:
LA95_133 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 27:
- LA95_134 = self.input.LA(3)
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_135 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
@@ -15042,157 +15061,157 @@ class CParser(Parser):
elif LA95 == DECIMAL_LITERAL:
LA95 = self.input.LA(2)
- if LA95 == 63:
+ if LA95 == 64:
LA95_137 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_138 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 74:
+ elif LA95 == 75:
LA95_139 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65:
+ elif LA95 == 66:
LA95_140 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 75:
+ elif LA95 == 76:
LA95_141 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_142 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_143 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 28 or LA95 == 79 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88:
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
LA95_144 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 69:
+ elif LA95 == 70:
LA95_145 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 70:
+ elif LA95 == 71:
LA95_146 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 67:
+ elif LA95 == 68:
LA95_147 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 68:
+ elif LA95 == 69:
LA95_148 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 100 or LA95 == 101:
+ elif LA95 == 101 or LA95 == 102:
LA95_149 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 96 or LA95 == 97 or LA95 == 98 or LA95 == 99:
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
LA95_150 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 94 or LA95 == 95:
+ elif LA95 == 95 or LA95 == 96:
LA95_151 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 76:
+ elif LA95 == 77:
LA95_152 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 93:
+ elif LA95 == 94:
LA95_153 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 92:
+ elif LA95 == 93:
LA95_154 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 91:
+ elif LA95 == 92:
LA95_155 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 90:
+ elif LA95 == 91:
LA95_156 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 89:
+ elif LA95 == 90:
LA95_157 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 27:
LA95_158 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
@@ -15201,157 +15220,157 @@ class CParser(Parser):
elif LA95 == CHARACTER_LITERAL:
LA95 = self.input.LA(2)
- if LA95 == 63:
+ if LA95 == 64:
LA95_161 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_162 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 74:
+ elif LA95 == 75:
LA95_163 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65:
+ elif LA95 == 66:
LA95_164 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 75:
+ elif LA95 == 76:
LA95_165 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_166 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_167 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 28 or LA95 == 79 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88:
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
LA95_168 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 69:
+ elif LA95 == 70:
LA95_169 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 70:
+ elif LA95 == 71:
LA95_170 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 67:
+ elif LA95 == 68:
LA95_171 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 68:
+ elif LA95 == 69:
LA95_172 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 100 or LA95 == 101:
+ elif LA95 == 101 or LA95 == 102:
LA95_173 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 96 or LA95 == 97 or LA95 == 98 or LA95 == 99:
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
LA95_174 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 94 or LA95 == 95:
+ elif LA95 == 95 or LA95 == 96:
LA95_175 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 76:
+ elif LA95 == 77:
LA95_176 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 93:
+ elif LA95 == 94:
LA95_177 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 92:
+ elif LA95 == 93:
LA95_178 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 91:
+ elif LA95 == 92:
LA95_179 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 90:
+ elif LA95 == 91:
LA95_180 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 89:
+ elif LA95 == 90:
LA95_181 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 27:
LA95_182 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
@@ -15363,154 +15382,154 @@ class CParser(Parser):
if LA95 == IDENTIFIER:
LA95_185 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 63:
+ elif LA95 == 64:
LA95_186 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_187 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 74:
+ elif LA95 == 75:
LA95_188 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65:
+ elif LA95 == 66:
LA95_189 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 75:
+ elif LA95 == 76:
LA95_190 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_191 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_192 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 69:
+ elif LA95 == 70:
LA95_193 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 70:
+ elif LA95 == 71:
LA95_194 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 67:
+ elif LA95 == 68:
LA95_195 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 68:
+ elif LA95 == 69:
LA95_196 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 100 or LA95 == 101:
+ elif LA95 == 101 or LA95 == 102:
LA95_197 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 96 or LA95 == 97 or LA95 == 98 or LA95 == 99:
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
LA95_198 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 94 or LA95 == 95:
+ elif LA95 == 95 or LA95 == 96:
LA95_199 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 76:
+ elif LA95 == 77:
LA95_200 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 93:
+ elif LA95 == 94:
LA95_201 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 92:
+ elif LA95 == 93:
LA95_202 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 91:
+ elif LA95 == 92:
LA95_203 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 90:
+ elif LA95 == 91:
LA95_204 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 89:
+ elif LA95 == 90:
LA95_205 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 27:
LA95_206 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
@@ -15519,702 +15538,702 @@ class CParser(Parser):
elif LA95 == STRING_LITERAL:
LA95_208 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 28 or LA95 == 79 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88:
- LA95_210 = self.input.LA(3)
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_209 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == FLOATING_POINT_LITERAL:
LA95 = self.input.LA(2)
- if LA95 == 63:
+ if LA95 == 64:
LA95_211 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_212 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 74:
+ elif LA95 == 75:
LA95_213 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65:
+ elif LA95 == 66:
LA95_214 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 75:
+ elif LA95 == 76:
LA95_215 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_216 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_217 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 69:
+ elif LA95 == 70:
LA95_218 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 70:
+ elif LA95 == 71:
LA95_219 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 67:
+ elif LA95 == 68:
LA95_220 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 68:
+ elif LA95 == 69:
LA95_221 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 100 or LA95 == 101:
+ elif LA95 == 101 or LA95 == 102:
LA95_222 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 96 or LA95 == 97 or LA95 == 98 or LA95 == 99:
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
LA95_223 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 94 or LA95 == 95:
+ elif LA95 == 95 or LA95 == 96:
LA95_224 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 76:
+ elif LA95 == 77:
LA95_225 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 93:
+ elif LA95 == 94:
LA95_226 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 92:
+ elif LA95 == 93:
LA95_227 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 91:
+ elif LA95 == 92:
LA95_228 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 90:
+ elif LA95 == 91:
LA95_229 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 89:
+ elif LA95 == 90:
LA95_230 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 27:
LA95_231 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 28 or LA95 == 79 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88:
- LA95_233 = self.input.LA(3)
+ elif LA95 == 25:
+ alt95 = 1
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_234 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 25:
- alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95 = self.input.LA(2)
if LA95 == IDENTIFIER:
LA95_235 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == HEX_LITERAL:
LA95_236 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == OCTAL_LITERAL:
LA95_237 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == DECIMAL_LITERAL:
LA95_238 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == CHARACTER_LITERAL:
LA95_239 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == STRING_LITERAL:
LA95_240 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == FLOATING_POINT_LITERAL:
LA95_241 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_242 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_243 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_244 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65 or LA95 == 67 or LA95 == 68 or LA95 == 76 or LA95 == 77 or LA95 == 78:
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
LA95_245 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 73:
+ elif LA95 == 74:
LA95_246 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60:
+ elif LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60 or LA95 == 61:
LA95_247 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 34:
LA95_248 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 35:
LA95_249 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 36:
LA95_250 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 37:
LA95_251 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 38:
LA95_252 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 39:
LA95_253 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 40:
LA95_254 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 41:
LA95_255 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 42:
LA95_256 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 45 or LA95 == 46:
LA95_257 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == 48:
LA95_258 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95 = self.input.LA(2)
if LA95 == IDENTIFIER:
LA95_259 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == HEX_LITERAL:
LA95_260 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == OCTAL_LITERAL:
LA95_261 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == DECIMAL_LITERAL:
LA95_262 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == CHARACTER_LITERAL:
LA95_263 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == STRING_LITERAL:
LA95_264 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == FLOATING_POINT_LITERAL:
LA95_265 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_266 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_267 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_268 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65 or LA95 == 67 or LA95 == 68 or LA95 == 76 or LA95 == 77 or LA95 == 78:
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
LA95_269 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 73:
+ elif LA95 == 74:
LA95_270 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95 = self.input.LA(2)
if LA95 == IDENTIFIER:
LA95_271 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == HEX_LITERAL:
LA95_272 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == OCTAL_LITERAL:
LA95_273 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == DECIMAL_LITERAL:
LA95_274 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == CHARACTER_LITERAL:
LA95_275 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == STRING_LITERAL:
LA95_276 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == FLOATING_POINT_LITERAL:
LA95_277 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 61:
+ elif LA95 == 62:
LA95_278 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_279 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_280 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65 or LA95 == 67 or LA95 == 68 or LA95 == 76 or LA95 == 77 or LA95 == 78:
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
LA95_281 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 73:
+ elif LA95 == 74:
LA95_282 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65 or LA95 == 67 or LA95 == 68 or LA95 == 76 or LA95 == 77 or LA95 == 78:
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
LA95 = self.input.LA(2)
- if LA95 == 61:
+ if LA95 == 62:
LA95_283 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == IDENTIFIER:
LA95_284 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == HEX_LITERAL:
LA95_285 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == OCTAL_LITERAL:
LA95_286 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == DECIMAL_LITERAL:
LA95_287 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == CHARACTER_LITERAL:
LA95_288 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == STRING_LITERAL:
LA95_289 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == FLOATING_POINT_LITERAL:
LA95_290 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_291 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_292 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65 or LA95 == 67 or LA95 == 68 or LA95 == 76 or LA95 == 77 or LA95 == 78:
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
LA95_293 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 73:
+ elif LA95 == 74:
LA95_294 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 73:
+ elif LA95 == 74:
LA95 = self.input.LA(2)
- if LA95 == 61:
+ if LA95 == 62:
LA95_295 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == IDENTIFIER:
LA95_296 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == HEX_LITERAL:
LA95_297 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == OCTAL_LITERAL:
LA95_298 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == DECIMAL_LITERAL:
LA95_299 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == CHARACTER_LITERAL:
LA95_300 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == STRING_LITERAL:
LA95_301 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
elif LA95 == FLOATING_POINT_LITERAL:
LA95_302 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 71:
+ elif LA95 == 72:
LA95_303 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 72:
+ elif LA95 == 73:
LA95_304 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 65 or LA95 == 67 or LA95 == 68 or LA95 == 76 or LA95 == 77 or LA95 == 78:
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
LA95_305 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 73:
+ elif LA95 == 74:
LA95_306 = self.input.LA(3)
- if (self.synpred187()) :
+ if (self.synpred188()) :
alt95 = 1
- elif LA95 == 25 or LA95 == 26 or LA95 == 29 or LA95 == 30 or LA95 == 31 or LA95 == 32 or LA95 == 33 or LA95 == 34 or LA95 == 35 or LA95 == 36 or LA95 == 37 or LA95 == 38 or LA95 == 39 or LA95 == 40 or LA95 == 41 or LA95 == 42 or LA95 == 43 or LA95 == 45 or LA95 == 46 or LA95 == 48 or LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60 or LA95 == 102 or LA95 == 103 or LA95 == 104 or LA95 == 105 or LA95 == 106 or LA95 == 107 or LA95 == 109 or LA95 == 110 or LA95 == 111 or LA95 == 112 or LA95 == 113 or LA95 == 114 or LA95 == 115 or LA95 == 116:
+ elif LA95 == 25 or LA95 == 26 or LA95 == 29 or LA95 == 30 or LA95 == 31 or LA95 == 32 or LA95 == 33 or LA95 == 34 or LA95 == 35 or LA95 == 36 or LA95 == 37 or LA95 == 38 or LA95 == 39 or LA95 == 40 or LA95 == 41 or LA95 == 42 or LA95 == 43 or LA95 == 45 or LA95 == 46 or LA95 == 48 or LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60 or LA95 == 61 or LA95 == 103 or LA95 == 104 or LA95 == 105 or LA95 == 106 or LA95 == 107 or LA95 == 108 or LA95 == 110 or LA95 == 111 or LA95 == 112 or LA95 == 113 or LA95 == 114 or LA95 == 115 or LA95 == 116 or LA95 == 117:
alt95 = 1
if alt95 == 1:
# C.g:0:0: statement
- self.following.append(self.FOLLOW_statement_in_statement_list2227)
+ self.following.append(self.FOLLOW_statement_in_statement_list2242)
self.statement()
self.following.pop()
if self.failed:
@@ -16260,7 +16279,7 @@ class CParser(Parser):
# $ANTLR start expression_statement
- # C.g:508:1: expression_statement : ( ';' | expression ';' );
+ # C.g:561:1: expression_statement : ( ';' | expression ';' );
def expression_statement(self, ):
retval = self.expression_statement_return()
@@ -16271,38 +16290,38 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 68):
return retval
- # C.g:509:2: ( ';' | expression ';' )
+ # C.g:562:2: ( ';' | expression ';' )
alt96 = 2
LA96_0 = self.input.LA(1)
if (LA96_0 == 25) :
alt96 = 1
- elif ((IDENTIFIER <= LA96_0 <= FLOATING_POINT_LITERAL) or LA96_0 == 61 or LA96_0 == 65 or (67 <= LA96_0 <= 68) or (71 <= LA96_0 <= 73) or (76 <= LA96_0 <= 78)) :
+ elif ((IDENTIFIER <= LA96_0 <= FLOATING_POINT_LITERAL) or LA96_0 == 62 or LA96_0 == 66 or (68 <= LA96_0 <= 69) or (72 <= LA96_0 <= 74) or (77 <= LA96_0 <= 79)) :
alt96 = 2
else:
if self.backtracking > 0:
self.failed = True
return retval
- nvae = NoViableAltException("508:1: expression_statement : ( ';' | expression ';' );", 96, 0, self.input)
+ nvae = NoViableAltException("561:1: expression_statement : ( ';' | expression ';' );", 96, 0, self.input)
raise nvae
if alt96 == 1:
- # C.g:509:4: ';'
- self.match(self.input, 25, self.FOLLOW_25_in_expression_statement2239)
+ # C.g:562:4: ';'
+ self.match(self.input, 25, self.FOLLOW_25_in_expression_statement2254)
if self.failed:
return retval
elif alt96 == 2:
- # C.g:510:4: expression ';'
- self.following.append(self.FOLLOW_expression_in_expression_statement2244)
+ # C.g:563:4: expression ';'
+ self.following.append(self.FOLLOW_expression_in_expression_statement2259)
self.expression()
self.following.pop()
if self.failed:
return retval
- self.match(self.input, 25, self.FOLLOW_25_in_expression_statement2246)
+ self.match(self.input, 25, self.FOLLOW_25_in_expression_statement2261)
if self.failed:
return retval
@@ -16325,7 +16344,7 @@ class CParser(Parser):
# $ANTLR start selection_statement
- # C.g:513:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );
+ # C.g:566:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );
def selection_statement(self, ):
selection_statement_StartIndex = self.input.index()
@@ -16337,59 +16356,59 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 69):
return
- # C.g:514:2: ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement )
+ # C.g:567:2: ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement )
alt98 = 2
LA98_0 = self.input.LA(1)
- if (LA98_0 == 107) :
+ if (LA98_0 == 108) :
alt98 = 1
- elif (LA98_0 == 109) :
+ elif (LA98_0 == 110) :
alt98 = 2
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("513:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 98, 0, self.input)
+ nvae = NoViableAltException("566:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 98, 0, self.input)
raise nvae
if alt98 == 1:
- # C.g:514:4: 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )?
- self.match(self.input, 107, self.FOLLOW_107_in_selection_statement2257)
+ # C.g:567:4: 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )?
+ self.match(self.input, 108, self.FOLLOW_108_in_selection_statement2272)
if self.failed:
return
- self.match(self.input, 61, self.FOLLOW_61_in_selection_statement2259)
+ self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2274)
if self.failed:
return
- self.following.append(self.FOLLOW_expression_in_selection_statement2263)
+ self.following.append(self.FOLLOW_expression_in_selection_statement2278)
e = self.expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2265)
+ self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2280)
if self.failed:
return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
- self.following.append(self.FOLLOW_statement_in_selection_statement2269)
+ self.following.append(self.FOLLOW_statement_in_selection_statement2284)
self.statement()
self.following.pop()
if self.failed:
return
- # C.g:514:167: ( options {k=1; backtrack=false; } : 'else' statement )?
+ # C.g:567:167: ( options {k=1; backtrack=false; } : 'else' statement )?
alt97 = 2
LA97_0 = self.input.LA(1)
- if (LA97_0 == 108) :
+ if (LA97_0 == 109) :
alt97 = 1
if alt97 == 1:
- # C.g:514:200: 'else' statement
- self.match(self.input, 108, self.FOLLOW_108_in_selection_statement2284)
+ # C.g:567:200: 'else' statement
+ self.match(self.input, 109, self.FOLLOW_109_in_selection_statement2299)
if self.failed:
return
- self.following.append(self.FOLLOW_statement_in_selection_statement2286)
+ self.following.append(self.FOLLOW_statement_in_selection_statement2301)
self.statement()
self.following.pop()
if self.failed:
@@ -16400,22 +16419,22 @@ class CParser(Parser):
elif alt98 == 2:
- # C.g:515:4: 'switch' '(' expression ')' statement
- self.match(self.input, 109, self.FOLLOW_109_in_selection_statement2293)
+ # C.g:568:4: 'switch' '(' expression ')' statement
+ self.match(self.input, 110, self.FOLLOW_110_in_selection_statement2308)
if self.failed:
return
- self.match(self.input, 61, self.FOLLOW_61_in_selection_statement2295)
+ self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2310)
if self.failed:
return
- self.following.append(self.FOLLOW_expression_in_selection_statement2297)
+ self.following.append(self.FOLLOW_expression_in_selection_statement2312)
self.expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2299)
+ self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2314)
if self.failed:
return
- self.following.append(self.FOLLOW_statement_in_selection_statement2301)
+ self.following.append(self.FOLLOW_statement_in_selection_statement2316)
self.statement()
self.following.pop()
if self.failed:
@@ -16438,7 +16457,7 @@ class CParser(Parser):
# $ANTLR start iteration_statement
- # C.g:518:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );
+ # C.g:571:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );
def iteration_statement(self, ):
iteration_statement_StartIndex = self.input.index()
@@ -16450,41 +16469,41 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 70):
return
- # C.g:519:2: ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement )
+ # C.g:572:2: ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement )
alt100 = 3
LA100 = self.input.LA(1)
- if LA100 == 110:
+ if LA100 == 111:
alt100 = 1
- elif LA100 == 111:
- alt100 = 2
elif LA100 == 112:
+ alt100 = 2
+ elif LA100 == 113:
alt100 = 3
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("518:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );", 100, 0, self.input)
+ nvae = NoViableAltException("571:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );", 100, 0, self.input)
raise nvae
if alt100 == 1:
- # C.g:519:4: 'while' '(' e= expression ')' statement
- self.match(self.input, 110, self.FOLLOW_110_in_iteration_statement2312)
+ # C.g:572:4: 'while' '(' e= expression ')' statement
+ self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2327)
if self.failed:
return
- self.match(self.input, 61, self.FOLLOW_61_in_iteration_statement2314)
+ self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2329)
if self.failed:
return
- self.following.append(self.FOLLOW_expression_in_iteration_statement2318)
+ self.following.append(self.FOLLOW_expression_in_iteration_statement2333)
e = self.expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2320)
+ self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2335)
if self.failed:
return
- self.following.append(self.FOLLOW_statement_in_iteration_statement2322)
+ self.following.append(self.FOLLOW_statement_in_iteration_statement2337)
self.statement()
self.following.pop()
if self.failed:
@@ -16495,30 +16514,30 @@ class CParser(Parser):
elif alt100 == 2:
- # C.g:520:4: 'do' statement 'while' '(' e= expression ')' ';'
- self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2329)
+ # C.g:573:4: 'do' statement 'while' '(' e= expression ')' ';'
+ self.match(self.input, 112, self.FOLLOW_112_in_iteration_statement2344)
if self.failed:
return
- self.following.append(self.FOLLOW_statement_in_iteration_statement2331)
+ self.following.append(self.FOLLOW_statement_in_iteration_statement2346)
self.statement()
self.following.pop()
if self.failed:
return
- self.match(self.input, 110, self.FOLLOW_110_in_iteration_statement2333)
+ self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2348)
if self.failed:
return
- self.match(self.input, 61, self.FOLLOW_61_in_iteration_statement2335)
+ self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2350)
if self.failed:
return
- self.following.append(self.FOLLOW_expression_in_iteration_statement2339)
+ self.following.append(self.FOLLOW_expression_in_iteration_statement2354)
e = self.expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2341)
+ self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2356)
if self.failed:
return
- self.match(self.input, 25, self.FOLLOW_25_in_iteration_statement2343)
+ self.match(self.input, 25, self.FOLLOW_25_in_iteration_statement2358)
if self.failed:
return
if self.backtracking == 0:
@@ -16527,32 +16546,32 @@ class CParser(Parser):
elif alt100 == 3:
- # C.g:521:4: 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement
- self.match(self.input, 112, self.FOLLOW_112_in_iteration_statement2350)
+ # C.g:574:4: 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement
+ self.match(self.input, 113, self.FOLLOW_113_in_iteration_statement2365)
if self.failed:
return
- self.match(self.input, 61, self.FOLLOW_61_in_iteration_statement2352)
+ self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2367)
if self.failed:
return
- self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2354)
+ self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2369)
self.expression_statement()
self.following.pop()
if self.failed:
return
- self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2358)
+ self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2373)
e = self.expression_statement()
self.following.pop()
if self.failed:
return
- # C.g:521:58: ( expression )?
+ # C.g:574:58: ( expression )?
alt99 = 2
LA99_0 = self.input.LA(1)
- if ((IDENTIFIER <= LA99_0 <= FLOATING_POINT_LITERAL) or LA99_0 == 61 or LA99_0 == 65 or (67 <= LA99_0 <= 68) or (71 <= LA99_0 <= 73) or (76 <= LA99_0 <= 78)) :
+ if ((IDENTIFIER <= LA99_0 <= FLOATING_POINT_LITERAL) or LA99_0 == 62 or LA99_0 == 66 or (68 <= LA99_0 <= 69) or (72 <= LA99_0 <= 74) or (77 <= LA99_0 <= 79)) :
alt99 = 1
if alt99 == 1:
# C.g:0:0: expression
- self.following.append(self.FOLLOW_expression_in_iteration_statement2360)
+ self.following.append(self.FOLLOW_expression_in_iteration_statement2375)
self.expression()
self.following.pop()
if self.failed:
@@ -16560,10 +16579,10 @@ class CParser(Parser):
- self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2363)
+ self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2378)
if self.failed:
return
- self.following.append(self.FOLLOW_statement_in_iteration_statement2365)
+ self.following.append(self.FOLLOW_statement_in_iteration_statement2380)
self.statement()
self.following.pop()
if self.failed:
@@ -16589,7 +16608,7 @@ class CParser(Parser):
# $ANTLR start jump_statement
- # C.g:524:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );
+ # C.g:577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );
def jump_statement(self, ):
jump_statement_StartIndex = self.input.index()
@@ -16598,28 +16617,28 @@ class CParser(Parser):
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 71):
return
- # C.g:525:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' )
+ # C.g:578:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' )
alt101 = 5
LA101 = self.input.LA(1)
- if LA101 == 113:
+ if LA101 == 114:
alt101 = 1
- elif LA101 == 114:
- alt101 = 2
elif LA101 == 115:
- alt101 = 3
+ alt101 = 2
elif LA101 == 116:
+ alt101 = 3
+ elif LA101 == 117:
LA101_4 = self.input.LA(2)
if (LA101_4 == 25) :
alt101 = 4
- elif ((IDENTIFIER <= LA101_4 <= FLOATING_POINT_LITERAL) or LA101_4 == 61 or LA101_4 == 65 or (67 <= LA101_4 <= 68) or (71 <= LA101_4 <= 73) or (76 <= LA101_4 <= 78)) :
+ elif ((IDENTIFIER <= LA101_4 <= FLOATING_POINT_LITERAL) or LA101_4 == 62 or LA101_4 == 66 or (68 <= LA101_4 <= 69) or (72 <= LA101_4 <= 74) or (77 <= LA101_4 <= 79)) :
alt101 = 5
else:
if self.backtracking > 0:
self.failed = True
return
- nvae = NoViableAltException("524:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 4, self.input)
+ nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 4, self.input)
raise nvae
@@ -16628,64 +16647,64 @@ class CParser(Parser):
self.failed = True
return
- nvae = NoViableAltException("524:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 0, self.input)
+ nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 0, self.input)
raise nvae
if alt101 == 1:
- # C.g:525:4: 'goto' IDENTIFIER ';'
- self.match(self.input, 113, self.FOLLOW_113_in_jump_statement2378)
+ # C.g:578:4: 'goto' IDENTIFIER ';'
+ self.match(self.input, 114, self.FOLLOW_114_in_jump_statement2393)
if self.failed:
return
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2380)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2395)
if self.failed:
return
- self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2382)
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2397)
if self.failed:
return
elif alt101 == 2:
- # C.g:526:4: 'continue' ';'
- self.match(self.input, 114, self.FOLLOW_114_in_jump_statement2387)
+ # C.g:579:4: 'continue' ';'
+ self.match(self.input, 115, self.FOLLOW_115_in_jump_statement2402)
if self.failed:
return
- self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2389)
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2404)
if self.failed:
return
elif alt101 == 3:
- # C.g:527:4: 'break' ';'
- self.match(self.input, 115, self.FOLLOW_115_in_jump_statement2394)
+ # C.g:580:4: 'break' ';'
+ self.match(self.input, 116, self.FOLLOW_116_in_jump_statement2409)
if self.failed:
return
- self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2396)
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2411)
if self.failed:
return
elif alt101 == 4:
- # C.g:528:4: 'return' ';'
- self.match(self.input, 116, self.FOLLOW_116_in_jump_statement2401)
+ # C.g:581:4: 'return' ';'
+ self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2416)
if self.failed:
return
- self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2403)
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2418)
if self.failed:
return
elif alt101 == 5:
- # C.g:529:4: 'return' expression ';'
- self.match(self.input, 116, self.FOLLOW_116_in_jump_statement2408)
+ # C.g:582:4: 'return' expression ';'
+ self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2423)
if self.failed:
return
- self.following.append(self.FOLLOW_expression_in_jump_statement2410)
+ self.following.append(self.FOLLOW_expression_in_jump_statement2425)
self.expression()
self.following.pop()
if self.failed:
return
- self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2412)
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2427)
if self.failed:
return
@@ -16706,9 +16725,9 @@ class CParser(Parser):
# $ANTLR start synpred2
def synpred2_fragment(self, ):
- # C.g:67:6: ( declaration_specifiers )
- # C.g:67:6: declaration_specifiers
- self.following.append(self.FOLLOW_declaration_specifiers_in_synpred290)
+ # C.g:119:6: ( declaration_specifiers )
+ # C.g:119:6: declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred2100)
self.declaration_specifiers()
self.following.pop()
if self.failed:
@@ -16721,104 +16740,104 @@ class CParser(Parser):
# $ANTLR start synpred4
def synpred4_fragment(self, ):
- # C.g:67:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )
- # C.g:67:6: ( declaration_specifiers )? declarator ( declaration )* '{'
- # C.g:67:6: ( declaration_specifiers )?
+ # C.g:119:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )
+ # C.g:119:6: ( declaration_specifiers )? declarator ( declaration )* '{'
+ # C.g:119:6: ( declaration_specifiers )?
alt102 = 2
LA102 = self.input.LA(1)
- if LA102 == 29 or LA102 == 30 or LA102 == 31 or LA102 == 32 or LA102 == 33 or LA102 == 34 or LA102 == 35 or LA102 == 36 or LA102 == 37 or LA102 == 38 or LA102 == 39 or LA102 == 40 or LA102 == 41 or LA102 == 42 or LA102 == 45 or LA102 == 46 or LA102 == 48 or LA102 == 49 or LA102 == 50 or LA102 == 51 or LA102 == 52 or LA102 == 53 or LA102 == 54 or LA102 == 55 or LA102 == 56 or LA102 == 57:
+ if LA102 == 29 or LA102 == 30 or LA102 == 31 or LA102 == 32 or LA102 == 33 or LA102 == 34 or LA102 == 35 or LA102 == 36 or LA102 == 37 or LA102 == 38 or LA102 == 39 or LA102 == 40 or LA102 == 41 or LA102 == 42 or LA102 == 45 or LA102 == 46 or LA102 == 48 or LA102 == 49 or LA102 == 50 or LA102 == 51 or LA102 == 52 or LA102 == 53 or LA102 == 54 or LA102 == 55 or LA102 == 56 or LA102 == 57 or LA102 == 61:
alt102 = 1
elif LA102 == IDENTIFIER:
LA102 = self.input.LA(2)
- if LA102 == 65:
- alt102 = 1
- elif LA102 == 58:
+ if LA102 == 62:
LA102_21 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 59:
- LA102_22 = self.input.LA(3)
-
- if (self.synpred2()) :
- alt102 = 1
- elif LA102 == 60:
+ elif LA102 == 29 or LA102 == 30 or LA102 == 31 or LA102 == 32 or LA102 == 33:
LA102_23 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == IDENTIFIER:
+ elif LA102 == 34:
LA102_24 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 61:
+ elif LA102 == 35:
LA102_25 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 29 or LA102 == 30 or LA102 == 31 or LA102 == 32 or LA102 == 33:
+ elif LA102 == 36:
LA102_26 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 34:
+ elif LA102 == 37:
LA102_27 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 35:
+ elif LA102 == 38:
LA102_28 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 36:
+ elif LA102 == 39:
LA102_29 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 37:
+ elif LA102 == 40:
LA102_30 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 38:
+ elif LA102 == 41:
LA102_31 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 39:
+ elif LA102 == 42:
LA102_32 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 40:
+ elif LA102 == 45 or LA102 == 46:
LA102_33 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 41:
+ elif LA102 == 48:
LA102_34 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 42:
+ elif LA102 == IDENTIFIER:
LA102_35 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 45 or LA102 == 46:
+ elif LA102 == 58:
LA102_36 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 48:
- LA102_37 = self.input.LA(3)
+ elif LA102 == 66:
+ alt102 = 1
+ elif LA102 == 59:
+ LA102_39 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
- elif LA102 == 49 or LA102 == 50 or LA102 == 51 or LA102 == 52 or LA102 == 53 or LA102 == 54 or LA102 == 55 or LA102 == 56 or LA102 == 57:
- LA102_38 = self.input.LA(3)
+ elif LA102 == 60:
+ LA102_40 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 49 or LA102 == 50 or LA102 == 51 or LA102 == 52 or LA102 == 53 or LA102 == 54 or LA102 == 55 or LA102 == 56 or LA102 == 57 or LA102 == 61:
+ LA102_41 = self.input.LA(3)
if (self.synpred2()) :
alt102 = 1
@@ -16839,7 +16858,7 @@ class CParser(Parser):
alt102 = 1
if alt102 == 1:
# C.g:0:0: declaration_specifiers
- self.following.append(self.FOLLOW_declaration_specifiers_in_synpred490)
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred4100)
self.declaration_specifiers()
self.following.pop()
if self.failed:
@@ -16847,23 +16866,23 @@ class CParser(Parser):
- self.following.append(self.FOLLOW_declarator_in_synpred493)
+ self.following.append(self.FOLLOW_declarator_in_synpred4103)
self.declarator()
self.following.pop()
if self.failed:
return
- # C.g:67:41: ( declaration )*
+ # C.g:119:41: ( declaration )*
while True: #loop103
alt103 = 2
LA103_0 = self.input.LA(1)
- if (LA103_0 == IDENTIFIER or LA103_0 == 26 or (29 <= LA103_0 <= 42) or (45 <= LA103_0 <= 46) or (48 <= LA103_0 <= 60)) :
+ if (LA103_0 == IDENTIFIER or LA103_0 == 26 or (29 <= LA103_0 <= 42) or (45 <= LA103_0 <= 46) or (48 <= LA103_0 <= 61)) :
alt103 = 1
if alt103 == 1:
# C.g:0:0: declaration
- self.following.append(self.FOLLOW_declaration_in_synpred495)
+ self.following.append(self.FOLLOW_declaration_in_synpred4105)
self.declaration()
self.following.pop()
if self.failed:
@@ -16874,7 +16893,7 @@ class CParser(Parser):
break #loop103
- self.match(self.input, 43, self.FOLLOW_43_in_synpred498)
+ self.match(self.input, 43, self.FOLLOW_43_in_synpred4108)
if self.failed:
return
@@ -16885,9 +16904,9 @@ class CParser(Parser):
# $ANTLR start synpred5
def synpred5_fragment(self, ):
- # C.g:68:4: ( declaration )
- # C.g:68:4: declaration
- self.following.append(self.FOLLOW_declaration_in_synpred5108)
+ # C.g:120:4: ( declaration )
+ # C.g:120:4: declaration
+ self.following.append(self.FOLLOW_declaration_in_synpred5118)
self.declaration()
self.following.pop()
if self.failed:
@@ -16900,9 +16919,9 @@ class CParser(Parser):
# $ANTLR start synpred7
def synpred7_fragment(self, ):
- # C.g:94:6: ( declaration_specifiers )
- # C.g:94:6: declaration_specifiers
- self.following.append(self.FOLLOW_declaration_specifiers_in_synpred7147)
+ # C.g:146:6: ( declaration_specifiers )
+ # C.g:146:6: declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred7157)
self.declaration_specifiers()
self.following.pop()
if self.failed:
@@ -16915,9 +16934,9 @@ class CParser(Parser):
# $ANTLR start synpred10
def synpred10_fragment(self, ):
- # C.g:115:18: ( declaration_specifiers )
- # C.g:115:18: declaration_specifiers
- self.following.append(self.FOLLOW_declaration_specifiers_in_synpred10197)
+ # C.g:167:18: ( declaration_specifiers )
+ # C.g:167:18: declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred10207)
self.declaration_specifiers()
self.following.pop()
if self.failed:
@@ -16930,9 +16949,9 @@ class CParser(Parser):
# $ANTLR start synpred14
def synpred14_fragment(self, ):
- # C.g:132:7: ( type_specifier )
- # C.g:132:7: type_specifier
- self.following.append(self.FOLLOW_type_specifier_in_synpred14262)
+ # C.g:184:7: ( type_specifier )
+ # C.g:184:7: type_specifier
+ self.following.append(self.FOLLOW_type_specifier_in_synpred14272)
self.type_specifier()
self.following.pop()
if self.failed:
@@ -16945,9 +16964,9 @@ class CParser(Parser):
# $ANTLR start synpred15
def synpred15_fragment(self, ):
- # C.g:133:13: ( type_qualifier )
- # C.g:133:13: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_synpred15276)
+ # C.g:185:13: ( type_qualifier )
+ # C.g:185:13: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred15286)
self.type_qualifier()
self.following.pop()
if self.failed:
@@ -16960,9 +16979,9 @@ class CParser(Parser):
# $ANTLR start synpred33
def synpred33_fragment(self, ):
- # C.g:173:16: ( type_qualifier )
- # C.g:173:16: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_synpred33434)
+ # C.g:225:16: ( type_qualifier )
+ # C.g:225:16: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred33444)
self.type_qualifier()
self.following.pop()
if self.failed:
@@ -16975,12 +16994,12 @@ class CParser(Parser):
# $ANTLR start synpred34
def synpred34_fragment(self, ):
- # C.g:173:4: ( IDENTIFIER ( type_qualifier )* declarator )
- # C.g:173:5: IDENTIFIER ( type_qualifier )* declarator
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred34432)
+ # C.g:225:4: ( IDENTIFIER ( type_qualifier )* declarator )
+ # C.g:225:5: IDENTIFIER ( type_qualifier )* declarator
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred34442)
if self.failed:
return
- # C.g:173:16: ( type_qualifier )*
+ # C.g:225:16: ( type_qualifier )*
while True: #loop106
alt106 = 2
LA106 = self.input.LA(1)
@@ -17005,12 +17024,12 @@ class CParser(Parser):
alt106 = 1
- elif LA106 == 49 or LA106 == 50 or LA106 == 51 or LA106 == 52 or LA106 == 53 or LA106 == 54 or LA106 == 55 or LA106 == 56 or LA106 == 57:
+ elif LA106 == 49 or LA106 == 50 or LA106 == 51 or LA106 == 52 or LA106 == 53 or LA106 == 54 or LA106 == 55 or LA106 == 56 or LA106 == 57 or LA106 == 61:
alt106 = 1
if alt106 == 1:
# C.g:0:0: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_synpred34434)
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred34444)
self.type_qualifier()
self.following.pop()
if self.failed:
@@ -17021,7 +17040,7 @@ class CParser(Parser):
break #loop106
- self.following.append(self.FOLLOW_declarator_in_synpred34437)
+ self.following.append(self.FOLLOW_declarator_in_synpred34447)
self.declarator()
self.following.pop()
if self.failed:
@@ -17034,9 +17053,9 @@ class CParser(Parser):
# $ANTLR start synpred39
def synpred39_fragment(self, ):
- # C.g:201:6: ( type_qualifier )
- # C.g:201:6: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_synpred39556)
+ # C.g:253:6: ( type_qualifier )
+ # C.g:253:6: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred39566)
self.type_qualifier()
self.following.pop()
if self.failed:
@@ -17049,9 +17068,9 @@ class CParser(Parser):
# $ANTLR start synpred40
def synpred40_fragment(self, ):
- # C.g:201:23: ( type_specifier )
- # C.g:201:23: type_specifier
- self.following.append(self.FOLLOW_type_specifier_in_synpred40560)
+ # C.g:253:23: ( type_specifier )
+ # C.g:253:23: type_specifier
+ self.following.append(self.FOLLOW_type_specifier_in_synpred40570)
self.type_specifier()
self.following.pop()
if self.failed:
@@ -17062,19 +17081,19 @@ class CParser(Parser):
- # $ANTLR start synpred65
- def synpred65_fragment(self, ):
- # C.g:244:4: ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator )
- # C.g:244:4: ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator
- # C.g:244:4: ( pointer )?
+ # $ANTLR start synpred66
+ def synpred66_fragment(self, ):
+ # C.g:297:4: ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator )
+ # C.g:297:4: ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator
+ # C.g:297:4: ( pointer )?
alt111 = 2
LA111_0 = self.input.LA(1)
- if (LA111_0 == 65) :
+ if (LA111_0 == 66) :
alt111 = 1
if alt111 == 1:
# C.g:0:0: pointer
- self.following.append(self.FOLLOW_pointer_in_synpred65769)
+ self.following.append(self.FOLLOW_pointer_in_synpred66784)
self.pointer()
self.following.pop()
if self.failed:
@@ -17082,194 +17101,194 @@ class CParser(Parser):
- # C.g:244:13: ( 'EFIAPI' )?
+ # C.g:297:13: ( 'EFIAPI' )?
alt112 = 2
LA112_0 = self.input.LA(1)
if (LA112_0 == 58) :
alt112 = 1
if alt112 == 1:
- # C.g:244:14: 'EFIAPI'
- self.match(self.input, 58, self.FOLLOW_58_in_synpred65773)
+ # C.g:297:14: 'EFIAPI'
+ self.match(self.input, 58, self.FOLLOW_58_in_synpred66788)
if self.failed:
return
- # C.g:244:25: ( 'EFI_BOOTSERVICE' )?
+ # C.g:297:25: ( 'EFI_BOOTSERVICE' )?
alt113 = 2
LA113_0 = self.input.LA(1)
if (LA113_0 == 59) :
alt113 = 1
if alt113 == 1:
- # C.g:244:26: 'EFI_BOOTSERVICE'
- self.match(self.input, 59, self.FOLLOW_59_in_synpred65778)
+ # C.g:297:26: 'EFI_BOOTSERVICE'
+ self.match(self.input, 59, self.FOLLOW_59_in_synpred66793)
if self.failed:
return
- # C.g:244:46: ( 'EFI_RUNTIMESERVICE' )?
+ # C.g:297:46: ( 'EFI_RUNTIMESERVICE' )?
alt114 = 2
LA114_0 = self.input.LA(1)
if (LA114_0 == 60) :
alt114 = 1
if alt114 == 1:
- # C.g:244:47: 'EFI_RUNTIMESERVICE'
- self.match(self.input, 60, self.FOLLOW_60_in_synpred65783)
+ # C.g:297:47: 'EFI_RUNTIMESERVICE'
+ self.match(self.input, 60, self.FOLLOW_60_in_synpred66798)
if self.failed:
return
- self.following.append(self.FOLLOW_direct_declarator_in_synpred65787)
+ self.following.append(self.FOLLOW_direct_declarator_in_synpred66802)
self.direct_declarator()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred65
+ # $ANTLR end synpred66
- # $ANTLR start synpred66
- def synpred66_fragment(self, ):
- # C.g:250:15: ( declarator_suffix )
- # C.g:250:15: declarator_suffix
- self.following.append(self.FOLLOW_declarator_suffix_in_synpred66806)
+ # $ANTLR start synpred67
+ def synpred67_fragment(self, ):
+ # C.g:303:15: ( declarator_suffix )
+ # C.g:303:15: declarator_suffix
+ self.following.append(self.FOLLOW_declarator_suffix_in_synpred67821)
self.declarator_suffix()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred66
+ # $ANTLR end synpred67
- # $ANTLR start synpred68
- def synpred68_fragment(self, ):
- # C.g:251:9: ( 'EFIAPI' )
- # C.g:251:9: 'EFIAPI'
- self.match(self.input, 58, self.FOLLOW_58_in_synpred68815)
+ # $ANTLR start synpred69
+ def synpred69_fragment(self, ):
+ # C.g:304:9: ( 'EFIAPI' )
+ # C.g:304:9: 'EFIAPI'
+ self.match(self.input, 58, self.FOLLOW_58_in_synpred69830)
if self.failed:
return
- # $ANTLR end synpred68
+ # $ANTLR end synpred69
- # $ANTLR start synpred69
- def synpred69_fragment(self, ):
- # C.g:251:35: ( declarator_suffix )
- # C.g:251:35: declarator_suffix
- self.following.append(self.FOLLOW_declarator_suffix_in_synpred69823)
+ # $ANTLR start synpred70
+ def synpred70_fragment(self, ):
+ # C.g:304:35: ( declarator_suffix )
+ # C.g:304:35: declarator_suffix
+ self.following.append(self.FOLLOW_declarator_suffix_in_synpred70838)
self.declarator_suffix()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred69
+ # $ANTLR end synpred70
- # $ANTLR start synpred72
- def synpred72_fragment(self, ):
- # C.g:257:9: ( '(' parameter_type_list ')' )
- # C.g:257:9: '(' parameter_type_list ')'
- self.match(self.input, 61, self.FOLLOW_61_in_synpred72863)
+ # $ANTLR start synpred73
+ def synpred73_fragment(self, ):
+ # C.g:310:9: ( '(' parameter_type_list ')' )
+ # C.g:310:9: '(' parameter_type_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred73878)
if self.failed:
return
- self.following.append(self.FOLLOW_parameter_type_list_in_synpred72865)
+ self.following.append(self.FOLLOW_parameter_type_list_in_synpred73880)
self.parameter_type_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_synpred72867)
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred73882)
if self.failed:
return
- # $ANTLR end synpred72
+ # $ANTLR end synpred73
- # $ANTLR start synpred73
- def synpred73_fragment(self, ):
- # C.g:258:9: ( '(' identifier_list ')' )
- # C.g:258:9: '(' identifier_list ')'
- self.match(self.input, 61, self.FOLLOW_61_in_synpred73877)
+ # $ANTLR start synpred74
+ def synpred74_fragment(self, ):
+ # C.g:311:9: ( '(' identifier_list ')' )
+ # C.g:311:9: '(' identifier_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred74892)
if self.failed:
return
- self.following.append(self.FOLLOW_identifier_list_in_synpred73879)
+ self.following.append(self.FOLLOW_identifier_list_in_synpred74894)
self.identifier_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_synpred73881)
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred74896)
if self.failed:
return
- # $ANTLR end synpred73
+ # $ANTLR end synpred74
- # $ANTLR start synpred74
- def synpred74_fragment(self, ):
- # C.g:263:8: ( type_qualifier )
- # C.g:263:8: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_synpred74906)
+ # $ANTLR start synpred75
+ def synpred75_fragment(self, ):
+ # C.g:316:8: ( type_qualifier )
+ # C.g:316:8: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred75921)
self.type_qualifier()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred74
+ # $ANTLR end synpred75
- # $ANTLR start synpred75
- def synpred75_fragment(self, ):
- # C.g:263:24: ( pointer )
- # C.g:263:24: pointer
- self.following.append(self.FOLLOW_pointer_in_synpred75909)
+ # $ANTLR start synpred76
+ def synpred76_fragment(self, ):
+ # C.g:316:24: ( pointer )
+ # C.g:316:24: pointer
+ self.following.append(self.FOLLOW_pointer_in_synpred76924)
self.pointer()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred75
+ # $ANTLR end synpred76
- # $ANTLR start synpred76
- def synpred76_fragment(self, ):
- # C.g:263:4: ( '*' ( type_qualifier )+ ( pointer )? )
- # C.g:263:4: '*' ( type_qualifier )+ ( pointer )?
- self.match(self.input, 65, self.FOLLOW_65_in_synpred76904)
+ # $ANTLR start synpred77
+ def synpred77_fragment(self, ):
+ # C.g:316:4: ( '*' ( type_qualifier )+ ( pointer )? )
+ # C.g:316:4: '*' ( type_qualifier )+ ( pointer )?
+ self.match(self.input, 66, self.FOLLOW_66_in_synpred77919)
if self.failed:
return
- # C.g:263:8: ( type_qualifier )+
+ # C.g:316:8: ( type_qualifier )+
cnt116 = 0
while True: #loop116
alt116 = 2
LA116_0 = self.input.LA(1)
- if ((49 <= LA116_0 <= 60)) :
+ if ((49 <= LA116_0 <= 61)) :
alt116 = 1
if alt116 == 1:
# C.g:0:0: type_qualifier
- self.following.append(self.FOLLOW_type_qualifier_in_synpred76906)
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred77921)
self.type_qualifier()
self.following.pop()
if self.failed:
@@ -17290,15 +17309,15 @@ class CParser(Parser):
cnt116 += 1
- # C.g:263:24: ( pointer )?
+ # C.g:316:24: ( pointer )?
alt117 = 2
LA117_0 = self.input.LA(1)
- if (LA117_0 == 65) :
+ if (LA117_0 == 66) :
alt117 = 1
if alt117 == 1:
# C.g:0:0: pointer
- self.following.append(self.FOLLOW_pointer_in_synpred76909)
+ self.following.append(self.FOLLOW_pointer_in_synpred77924)
self.pointer()
self.following.pop()
if self.failed:
@@ -17308,195 +17327,195 @@ class CParser(Parser):
- # $ANTLR end synpred76
+ # $ANTLR end synpred77
- # $ANTLR start synpred77
- def synpred77_fragment(self, ):
- # C.g:264:4: ( '*' pointer )
- # C.g:264:4: '*' pointer
- self.match(self.input, 65, self.FOLLOW_65_in_synpred77915)
+ # $ANTLR start synpred78
+ def synpred78_fragment(self, ):
+ # C.g:317:4: ( '*' pointer )
+ # C.g:317:4: '*' pointer
+ self.match(self.input, 66, self.FOLLOW_66_in_synpred78930)
if self.failed:
return
- self.following.append(self.FOLLOW_pointer_in_synpred77917)
+ self.following.append(self.FOLLOW_pointer_in_synpred78932)
self.pointer()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred77
+ # $ANTLR end synpred78
- # $ANTLR start synpred80
- def synpred80_fragment(self, ):
- # C.g:273:32: ( 'OPTIONAL' )
- # C.g:273:32: 'OPTIONAL'
- self.match(self.input, 53, self.FOLLOW_53_in_synpred80962)
+ # $ANTLR start synpred81
+ def synpred81_fragment(self, ):
+ # C.g:326:32: ( 'OPTIONAL' )
+ # C.g:326:32: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_synpred81977)
if self.failed:
return
- # $ANTLR end synpred80
+ # $ANTLR end synpred81
- # $ANTLR start synpred81
- def synpred81_fragment(self, ):
- # C.g:273:27: ( ',' ( 'OPTIONAL' )? parameter_declaration )
- # C.g:273:27: ',' ( 'OPTIONAL' )? parameter_declaration
- self.match(self.input, 27, self.FOLLOW_27_in_synpred81959)
+ # $ANTLR start synpred82
+ def synpred82_fragment(self, ):
+ # C.g:326:27: ( ',' ( 'OPTIONAL' )? parameter_declaration )
+ # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
+ self.match(self.input, 27, self.FOLLOW_27_in_synpred82974)
if self.failed:
return
- # C.g:273:31: ( 'OPTIONAL' )?
+ # C.g:326:31: ( 'OPTIONAL' )?
alt119 = 2
LA119_0 = self.input.LA(1)
if (LA119_0 == 53) :
LA119_1 = self.input.LA(2)
- if (self.synpred80()) :
+ if (self.synpred81()) :
alt119 = 1
if alt119 == 1:
- # C.g:273:32: 'OPTIONAL'
- self.match(self.input, 53, self.FOLLOW_53_in_synpred81962)
+ # C.g:326:32: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_synpred82977)
if self.failed:
return
- self.following.append(self.FOLLOW_parameter_declaration_in_synpred81966)
+ self.following.append(self.FOLLOW_parameter_declaration_in_synpred82981)
self.parameter_declaration()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred81
+ # $ANTLR end synpred82
- # $ANTLR start synpred82
- def synpred82_fragment(self, ):
- # C.g:277:28: ( declarator )
- # C.g:277:28: declarator
- self.following.append(self.FOLLOW_declarator_in_synpred82982)
+ # $ANTLR start synpred83
+ def synpred83_fragment(self, ):
+ # C.g:330:28: ( declarator )
+ # C.g:330:28: declarator
+ self.following.append(self.FOLLOW_declarator_in_synpred83997)
self.declarator()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred82
+ # $ANTLR end synpred83
- # $ANTLR start synpred83
- def synpred83_fragment(self, ):
- # C.g:277:39: ( abstract_declarator )
- # C.g:277:39: abstract_declarator
- self.following.append(self.FOLLOW_abstract_declarator_in_synpred83984)
+ # $ANTLR start synpred84
+ def synpred84_fragment(self, ):
+ # C.g:330:39: ( abstract_declarator )
+ # C.g:330:39: abstract_declarator
+ self.following.append(self.FOLLOW_abstract_declarator_in_synpred84999)
self.abstract_declarator()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred83
+ # $ANTLR end synpred84
- # $ANTLR start synpred85
- def synpred85_fragment(self, ):
- # C.g:277:4: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? )
- # C.g:277:4: declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )?
- self.following.append(self.FOLLOW_declaration_specifiers_in_synpred85979)
+ # $ANTLR start synpred86
+ def synpred86_fragment(self, ):
+ # C.g:330:4: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? )
+ # C.g:330:4: declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )?
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred86994)
self.declaration_specifiers()
self.following.pop()
if self.failed:
return
- # C.g:277:27: ( declarator | abstract_declarator )*
+ # C.g:330:27: ( declarator | abstract_declarator )*
while True: #loop120
alt120 = 3
LA120 = self.input.LA(1)
- if LA120 == 65:
+ if LA120 == 66:
LA120_3 = self.input.LA(2)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt120 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt120 = 2
elif LA120 == IDENTIFIER or LA120 == 58 or LA120 == 59 or LA120 == 60:
alt120 = 1
- elif LA120 == 61:
+ elif LA120 == 62:
LA120 = self.input.LA(2)
- if LA120 == 29 or LA120 == 30 or LA120 == 31 or LA120 == 32 or LA120 == 33 or LA120 == 34 or LA120 == 35 or LA120 == 36 or LA120 == 37 or LA120 == 38 or LA120 == 39 or LA120 == 40 or LA120 == 41 or LA120 == 42 or LA120 == 45 or LA120 == 46 or LA120 == 48 or LA120 == 49 or LA120 == 50 or LA120 == 51 or LA120 == 52 or LA120 == 53 or LA120 == 54 or LA120 == 55 or LA120 == 56 or LA120 == 57 or LA120 == 62 or LA120 == 63:
+ if LA120 == 29 or LA120 == 30 or LA120 == 31 or LA120 == 32 or LA120 == 33 or LA120 == 34 or LA120 == 35 or LA120 == 36 or LA120 == 37 or LA120 == 38 or LA120 == 39 or LA120 == 40 or LA120 == 41 or LA120 == 42 or LA120 == 45 or LA120 == 46 or LA120 == 48 or LA120 == 49 or LA120 == 50 or LA120 == 51 or LA120 == 52 or LA120 == 53 or LA120 == 54 or LA120 == 55 or LA120 == 56 or LA120 == 57 or LA120 == 61 or LA120 == 63 or LA120 == 64:
alt120 = 2
elif LA120 == 58:
LA120_21 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt120 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt120 = 2
- elif LA120 == 65:
+ elif LA120 == 66:
LA120_22 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt120 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt120 = 2
elif LA120 == 59:
LA120_23 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt120 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt120 = 2
elif LA120 == 60:
LA120_24 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt120 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt120 = 2
elif LA120 == IDENTIFIER:
LA120_25 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt120 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt120 = 2
- elif LA120 == 61:
+ elif LA120 == 62:
LA120_26 = self.input.LA(3)
- if (self.synpred82()) :
+ if (self.synpred83()) :
alt120 = 1
- elif (self.synpred83()) :
+ elif (self.synpred84()) :
alt120 = 2
- elif LA120 == 63:
+ elif LA120 == 64:
alt120 = 2
if alt120 == 1:
- # C.g:277:28: declarator
- self.following.append(self.FOLLOW_declarator_in_synpred85982)
+ # C.g:330:28: declarator
+ self.following.append(self.FOLLOW_declarator_in_synpred86997)
self.declarator()
self.following.pop()
if self.failed:
@@ -17504,8 +17523,8 @@ class CParser(Parser):
elif alt120 == 2:
- # C.g:277:39: abstract_declarator
- self.following.append(self.FOLLOW_abstract_declarator_in_synpred85984)
+ # C.g:330:39: abstract_declarator
+ self.following.append(self.FOLLOW_abstract_declarator_in_synpred86999)
self.abstract_declarator()
self.following.pop()
if self.failed:
@@ -17516,15 +17535,15 @@ class CParser(Parser):
break #loop120
- # C.g:277:61: ( 'OPTIONAL' )?
+ # C.g:330:61: ( 'OPTIONAL' )?
alt121 = 2
LA121_0 = self.input.LA(1)
if (LA121_0 == 53) :
alt121 = 1
if alt121 == 1:
- # C.g:277:62: 'OPTIONAL'
- self.match(self.input, 53, self.FOLLOW_53_in_synpred85989)
+ # C.g:330:62: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_synpred861004)
if self.failed:
return
@@ -17532,28 +17551,28 @@ class CParser(Parser):
- # $ANTLR end synpred85
+ # $ANTLR end synpred86
- # $ANTLR start synpred89
- def synpred89_fragment(self, ):
- # C.g:288:4: ( specifier_qualifier_list ( abstract_declarator )? )
- # C.g:288:4: specifier_qualifier_list ( abstract_declarator )?
- self.following.append(self.FOLLOW_specifier_qualifier_list_in_synpred891031)
+ # $ANTLR start synpred90
+ def synpred90_fragment(self, ):
+ # C.g:341:4: ( specifier_qualifier_list ( abstract_declarator )? )
+ # C.g:341:4: specifier_qualifier_list ( abstract_declarator )?
+ self.following.append(self.FOLLOW_specifier_qualifier_list_in_synpred901046)
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
return
- # C.g:288:29: ( abstract_declarator )?
+ # C.g:341:29: ( abstract_declarator )?
alt122 = 2
LA122_0 = self.input.LA(1)
- if (LA122_0 == 61 or LA122_0 == 63 or LA122_0 == 65) :
+ if (LA122_0 == 62 or LA122_0 == 64 or LA122_0 == 66) :
alt122 = 1
if alt122 == 1:
# C.g:0:0: abstract_declarator
- self.following.append(self.FOLLOW_abstract_declarator_in_synpred891033)
+ self.following.append(self.FOLLOW_abstract_declarator_in_synpred901048)
self.abstract_declarator()
self.following.pop()
if self.failed:
@@ -17563,181 +17582,181 @@ class CParser(Parser):
- # $ANTLR end synpred89
+ # $ANTLR end synpred90
- # $ANTLR start synpred90
- def synpred90_fragment(self, ):
- # C.g:293:12: ( direct_abstract_declarator )
- # C.g:293:12: direct_abstract_declarator
- self.following.append(self.FOLLOW_direct_abstract_declarator_in_synpred901052)
+ # $ANTLR start synpred91
+ def synpred91_fragment(self, ):
+ # C.g:346:12: ( direct_abstract_declarator )
+ # C.g:346:12: direct_abstract_declarator
+ self.following.append(self.FOLLOW_direct_abstract_declarator_in_synpred911067)
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred90
+ # $ANTLR end synpred91
- # $ANTLR start synpred92
- def synpred92_fragment(self, ):
- # C.g:298:6: ( '(' abstract_declarator ')' )
- # C.g:298:6: '(' abstract_declarator ')'
- self.match(self.input, 61, self.FOLLOW_61_in_synpred921071)
+ # $ANTLR start synpred93
+ def synpred93_fragment(self, ):
+ # C.g:351:6: ( '(' abstract_declarator ')' )
+ # C.g:351:6: '(' abstract_declarator ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred931086)
if self.failed:
return
- self.following.append(self.FOLLOW_abstract_declarator_in_synpred921073)
+ self.following.append(self.FOLLOW_abstract_declarator_in_synpred931088)
self.abstract_declarator()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_synpred921075)
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred931090)
if self.failed:
return
- # $ANTLR end synpred92
+ # $ANTLR end synpred93
- # $ANTLR start synpred93
- def synpred93_fragment(self, ):
- # C.g:298:65: ( abstract_declarator_suffix )
- # C.g:298:65: abstract_declarator_suffix
- self.following.append(self.FOLLOW_abstract_declarator_suffix_in_synpred931083)
+ # $ANTLR start synpred94
+ def synpred94_fragment(self, ):
+ # C.g:351:65: ( abstract_declarator_suffix )
+ # C.g:351:65: abstract_declarator_suffix
+ self.following.append(self.FOLLOW_abstract_declarator_suffix_in_synpred941098)
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred93
+ # $ANTLR end synpred94
- # $ANTLR start synpred108
- def synpred108_fragment(self, ):
- # C.g:333:4: ( '(' type_name ')' cast_expression )
- # C.g:333:4: '(' type_name ')' cast_expression
- self.match(self.input, 61, self.FOLLOW_61_in_synpred1081267)
+ # $ANTLR start synpred109
+ def synpred109_fragment(self, ):
+ # C.g:386:4: ( '(' type_name ')' cast_expression )
+ # C.g:386:4: '(' type_name ')' cast_expression
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred1091282)
if self.failed:
return
- self.following.append(self.FOLLOW_type_name_in_synpred1081269)
+ self.following.append(self.FOLLOW_type_name_in_synpred1091284)
self.type_name()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_synpred1081271)
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred1091286)
if self.failed:
return
- self.following.append(self.FOLLOW_cast_expression_in_synpred1081273)
+ self.following.append(self.FOLLOW_cast_expression_in_synpred1091288)
self.cast_expression()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred108
+ # $ANTLR end synpred109
- # $ANTLR start synpred113
- def synpred113_fragment(self, ):
- # C.g:342:4: ( 'sizeof' unary_expression )
- # C.g:342:4: 'sizeof' unary_expression
- self.match(self.input, 73, self.FOLLOW_73_in_synpred1131315)
+ # $ANTLR start synpred114
+ def synpred114_fragment(self, ):
+ # C.g:395:4: ( 'sizeof' unary_expression )
+ # C.g:395:4: 'sizeof' unary_expression
+ self.match(self.input, 74, self.FOLLOW_74_in_synpred1141330)
if self.failed:
return
- self.following.append(self.FOLLOW_unary_expression_in_synpred1131317)
+ self.following.append(self.FOLLOW_unary_expression_in_synpred1141332)
self.unary_expression()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred113
+ # $ANTLR end synpred114
- # $ANTLR start synpred116
- def synpred116_fragment(self, ):
- # C.g:356:13: ( '(' argument_expression_list ')' )
- # C.g:356:13: '(' argument_expression_list ')'
- self.match(self.input, 61, self.FOLLOW_61_in_synpred1161405)
+ # $ANTLR start synpred117
+ def synpred117_fragment(self, ):
+ # C.g:409:13: ( '(' argument_expression_list ')' )
+ # C.g:409:13: '(' argument_expression_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred1171420)
if self.failed:
return
- self.following.append(self.FOLLOW_argument_expression_list_in_synpred1161409)
+ self.following.append(self.FOLLOW_argument_expression_list_in_synpred1171424)
self.argument_expression_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_synpred1161413)
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred1171428)
if self.failed:
return
- # $ANTLR end synpred116
+ # $ANTLR end synpred117
- # $ANTLR start synpred117
- def synpred117_fragment(self, ):
- # C.g:357:13: ( '(' macro_parameter_list ')' )
- # C.g:357:13: '(' macro_parameter_list ')'
- self.match(self.input, 61, self.FOLLOW_61_in_synpred1171429)
+ # $ANTLR start synpred118
+ def synpred118_fragment(self, ):
+ # C.g:410:13: ( '(' macro_parameter_list ')' )
+ # C.g:410:13: '(' macro_parameter_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred1181444)
if self.failed:
return
- self.following.append(self.FOLLOW_macro_parameter_list_in_synpred1171431)
+ self.following.append(self.FOLLOW_macro_parameter_list_in_synpred1181446)
self.macro_parameter_list()
self.following.pop()
if self.failed:
return
- self.match(self.input, 62, self.FOLLOW_62_in_synpred1171433)
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred1181448)
if self.failed:
return
- # $ANTLR end synpred117
+ # $ANTLR end synpred118
- # $ANTLR start synpred119
- def synpred119_fragment(self, ):
- # C.g:359:13: ( '*' IDENTIFIER )
- # C.g:359:13: '*' IDENTIFIER
- self.match(self.input, 65, self.FOLLOW_65_in_synpred1191467)
+ # $ANTLR start synpred120
+ def synpred120_fragment(self, ):
+ # C.g:412:13: ( '*' IDENTIFIER )
+ # C.g:412:13: '*' IDENTIFIER
+ self.match(self.input, 66, self.FOLLOW_66_in_synpred1201482)
if self.failed:
return
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1191471)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1201486)
if self.failed:
return
- # $ANTLR end synpred119
+ # $ANTLR end synpred120
- # $ANTLR start synpred136
- def synpred136_fragment(self, ):
- # C.g:390:20: ( STRING_LITERAL )
- # C.g:390:20: STRING_LITERAL
- self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1361668)
+ # $ANTLR start synpred137
+ def synpred137_fragment(self, ):
+ # C.g:443:20: ( STRING_LITERAL )
+ # C.g:443:20: STRING_LITERAL
+ self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1371683)
if self.failed:
return
- # $ANTLR end synpred136
+ # $ANTLR end synpred137
- # $ANTLR start synpred137
- def synpred137_fragment(self, ):
- # C.g:390:8: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )
- # C.g:390:8: ( IDENTIFIER )* ( STRING_LITERAL )+
- # C.g:390:8: ( IDENTIFIER )*
+ # $ANTLR start synpred138
+ def synpred138_fragment(self, ):
+ # C.g:443:8: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )
+ # C.g:443:8: ( IDENTIFIER )* ( STRING_LITERAL )+
+ # C.g:443:8: ( IDENTIFIER )*
while True: #loop125
alt125 = 2
LA125_0 = self.input.LA(1)
@@ -17748,7 +17767,7 @@ class CParser(Parser):
if alt125 == 1:
# C.g:0:0: IDENTIFIER
- self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1371665)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1381680)
if self.failed:
return
@@ -17757,7 +17776,7 @@ class CParser(Parser):
break #loop125
- # C.g:390:20: ( STRING_LITERAL )+
+ # C.g:443:20: ( STRING_LITERAL )+
cnt126 = 0
while True: #loop126
alt126 = 2
@@ -17769,7 +17788,7 @@ class CParser(Parser):
if alt126 == 1:
# C.g:0:0: STRING_LITERAL
- self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1371668)
+ self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1381683)
if self.failed:
return
@@ -17790,584 +17809,584 @@ class CParser(Parser):
- # $ANTLR end synpred137
+ # $ANTLR end synpred138
- # $ANTLR start synpred141
- def synpred141_fragment(self, ):
- # C.g:405:4: ( lvalue assignment_operator assignment_expression )
- # C.g:405:4: lvalue assignment_operator assignment_expression
- self.following.append(self.FOLLOW_lvalue_in_synpred1411729)
+ # $ANTLR start synpred142
+ def synpred142_fragment(self, ):
+ # C.g:458:4: ( lvalue assignment_operator assignment_expression )
+ # C.g:458:4: lvalue assignment_operator assignment_expression
+ self.following.append(self.FOLLOW_lvalue_in_synpred1421744)
self.lvalue()
self.following.pop()
if self.failed:
return
- self.following.append(self.FOLLOW_assignment_operator_in_synpred1411731)
+ self.following.append(self.FOLLOW_assignment_operator_in_synpred1421746)
self.assignment_operator()
self.following.pop()
if self.failed:
return
- self.following.append(self.FOLLOW_assignment_expression_in_synpred1411733)
+ self.following.append(self.FOLLOW_assignment_expression_in_synpred1421748)
self.assignment_expression()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred141
+ # $ANTLR end synpred142
- # $ANTLR start synpred168
- def synpred168_fragment(self, ):
- # C.g:467:4: ( expression_statement )
- # C.g:467:4: expression_statement
- self.following.append(self.FOLLOW_expression_statement_in_synpred1682020)
+ # $ANTLR start synpred169
+ def synpred169_fragment(self, ):
+ # C.g:520:4: ( expression_statement )
+ # C.g:520:4: expression_statement
+ self.following.append(self.FOLLOW_expression_statement_in_synpred1692035)
self.expression_statement()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred168
+ # $ANTLR end synpred169
- # $ANTLR start synpred172
- def synpred172_fragment(self, ):
- # C.g:471:4: ( macro_statement )
- # C.g:471:4: macro_statement
- self.following.append(self.FOLLOW_macro_statement_in_synpred1722040)
+ # $ANTLR start synpred173
+ def synpred173_fragment(self, ):
+ # C.g:524:4: ( macro_statement )
+ # C.g:524:4: macro_statement
+ self.following.append(self.FOLLOW_macro_statement_in_synpred1732055)
self.macro_statement()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred172
+ # $ANTLR end synpred173
- # $ANTLR start synpred173
- def synpred173_fragment(self, ):
- # C.g:472:4: ( asm2_statement )
- # C.g:472:4: asm2_statement
- self.following.append(self.FOLLOW_asm2_statement_in_synpred1732045)
+ # $ANTLR start synpred174
+ def synpred174_fragment(self, ):
+ # C.g:525:4: ( asm2_statement )
+ # C.g:525:4: asm2_statement
+ self.following.append(self.FOLLOW_asm2_statement_in_synpred1742060)
self.asm2_statement()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred173
+ # $ANTLR end synpred174
- # $ANTLR start synpred180
- def synpred180_fragment(self, ):
- # C.g:491:19: ( declaration )
- # C.g:491:19: declaration
- self.following.append(self.FOLLOW_declaration_in_synpred1802151)
+ # $ANTLR start synpred181
+ def synpred181_fragment(self, ):
+ # C.g:544:19: ( declaration )
+ # C.g:544:19: declaration
+ self.following.append(self.FOLLOW_declaration_in_synpred1812166)
self.declaration()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred180
+ # $ANTLR end synpred181
- # $ANTLR start synpred181
- def synpred181_fragment(self, ):
- # C.g:491:33: ( statement_list )
- # C.g:491:33: statement_list
- self.following.append(self.FOLLOW_statement_list_in_synpred1812155)
+ # $ANTLR start synpred182
+ def synpred182_fragment(self, ):
+ # C.g:544:33: ( statement_list )
+ # C.g:544:33: statement_list
+ self.following.append(self.FOLLOW_statement_list_in_synpred1822170)
self.statement_list()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred181
+ # $ANTLR end synpred182
- # $ANTLR start synpred185
- def synpred185_fragment(self, ):
- # C.g:501:8: ( declaration )
- # C.g:501:8: declaration
- self.following.append(self.FOLLOW_declaration_in_synpred1852210)
+ # $ANTLR start synpred186
+ def synpred186_fragment(self, ):
+ # C.g:554:8: ( declaration )
+ # C.g:554:8: declaration
+ self.following.append(self.FOLLOW_declaration_in_synpred1862225)
self.declaration()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred185
+ # $ANTLR end synpred186
- # $ANTLR start synpred187
- def synpred187_fragment(self, ):
- # C.g:505:4: ( statement )
- # C.g:505:4: statement
- self.following.append(self.FOLLOW_statement_in_synpred1872227)
+ # $ANTLR start synpred188
+ def synpred188_fragment(self, ):
+ # C.g:558:4: ( statement )
+ # C.g:558:4: statement
+ self.following.append(self.FOLLOW_statement_in_synpred1882242)
self.statement()
self.following.pop()
if self.failed:
return
- # $ANTLR end synpred187
+ # $ANTLR end synpred188
- def synpred185(self):
+ def synpred69(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred185_fragment()
+ self.synpred69_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred7(self):
+ def synpred81(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred7_fragment()
+ self.synpred81_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred14(self):
+ def synpred82(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred14_fragment()
+ self.synpred82_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred65(self):
+ def synpred66(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred65_fragment()
+ self.synpred66_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred15(self):
+ def synpred83(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred15_fragment()
+ self.synpred83_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred117(self):
+ def synpred84(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred117_fragment()
+ self.synpred84_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred173(self):
+ def synpred67(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred173_fragment()
+ self.synpred67_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred68(self):
+ def synpred86(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred68_fragment()
+ self.synpred86_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred40(self):
+ def synpred120(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred40_fragment()
+ self.synpred120_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred141(self):
+ def synpred40(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred141_fragment()
+ self.synpred40_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred75(self):
+ def synpred142(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred75_fragment()
+ self.synpred142_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred92(self):
+ def synpred182(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred92_fragment()
+ self.synpred182_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred4(self):
+ def synpred109(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred4_fragment()
+ self.synpred109_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred85(self):
+ def synpred181(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred85_fragment()
+ self.synpred181_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred39(self):
+ def synpred186(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred39_fragment()
+ self.synpred186_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred76(self):
+ def synpred188(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred76_fragment()
+ self.synpred188_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred119(self):
+ def synpred169(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred119_fragment()
+ self.synpred169_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred90(self):
+ def synpred117(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred90_fragment()
+ self.synpred117_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred187(self):
+ def synpred70(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred187_fragment()
+ self.synpred70_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred33(self):
+ def synpred118(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred33_fragment()
+ self.synpred118_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred2(self):
+ def synpred34(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred2_fragment()
+ self.synpred34_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred83(self):
+ def synpred33(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred83_fragment()
+ self.synpred33_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred69(self):
+ def synpred94(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred69_fragment()
+ self.synpred94_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred72(self):
+ def synpred39(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred72_fragment()
+ self.synpred39_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred168(self):
+ def synpred74(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred168_fragment()
+ self.synpred74_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred34(self):
+ def synpred114(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred34_fragment()
+ self.synpred114_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred181(self):
+ def synpred93(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred181_fragment()
+ self.synpred93_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred116(self):
+ def synpred75(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred116_fragment()
+ self.synpred75_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred113(self):
+ def synpred137(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred113_fragment()
+ self.synpred137_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred80(self):
+ def synpred90(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred80_fragment()
+ self.synpred90_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred73(self):
+ def synpred138(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred73_fragment()
+ self.synpred138_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred89(self):
+ def synpred91(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred89_fragment()
+ self.synpred91_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred10(self):
+ def synpred73(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred10_fragment()
+ self.synpred73_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred81(self):
+ def synpred5(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred81_fragment()
+ self.synpred5_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred180(self):
+ def synpred78(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred180_fragment()
+ self.synpred78_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred136(self):
+ def synpred7(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred136_fragment()
+ self.synpred7_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred77(self):
+ def synpred76(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred77_fragment()
+ self.synpred76_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred172(self):
+ def synpred77(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred172_fragment()
+ self.synpred77_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred137(self):
+ def synpred2(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred137_fragment()
+ self.synpred2_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred74(self):
+ def synpred4(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred74_fragment()
+ self.synpred4_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred5(self):
+ def synpred174(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred5_fragment()
+ self.synpred174_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred108(self):
+ def synpred173(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred108_fragment()
+ self.synpred173_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred82(self):
+ def synpred14(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred82_fragment()
+ self.synpred14_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred93(self):
+ def synpred15(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred93_fragment()
+ self.synpred15_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
self.failed = False
return success
- def synpred66(self):
+ def synpred10(self):
self.backtracking += 1
start = self.input.mark()
- self.synpred66_fragment()
+ self.synpred10_fragment()
success = not self.failed
self.input.rewind(start)
self.backtracking -= 1
@@ -18378,448 +18397,448 @@ class CParser(Parser):
- FOLLOW_external_declaration_in_translation_unit64 = frozenset([1, 4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65])
- FOLLOW_function_definition_in_external_declaration103 = frozenset([1])
- FOLLOW_declaration_in_external_declaration108 = frozenset([1])
- FOLLOW_macro_statement_in_external_declaration113 = frozenset([1, 25])
- FOLLOW_25_in_external_declaration116 = frozenset([1])
- FOLLOW_declaration_specifiers_in_function_definition147 = frozenset([4, 58, 59, 60, 61, 65])
- FOLLOW_declarator_in_function_definition150 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_declaration_in_function_definition156 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_compound_statement_in_function_definition161 = frozenset([1])
- FOLLOW_compound_statement_in_function_definition170 = frozenset([1])
- FOLLOW_26_in_declaration193 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65])
- FOLLOW_declaration_specifiers_in_declaration197 = frozenset([4, 58, 59, 60, 61, 65])
- FOLLOW_init_declarator_list_in_declaration206 = frozenset([25])
- FOLLOW_25_in_declaration210 = frozenset([1])
- FOLLOW_declaration_specifiers_in_declaration224 = frozenset([4, 25, 58, 59, 60, 61, 65])
- FOLLOW_init_declarator_list_in_declaration228 = frozenset([25])
- FOLLOW_25_in_declaration233 = frozenset([1])
- FOLLOW_storage_class_specifier_in_declaration_specifiers254 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_type_specifier_in_declaration_specifiers262 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_type_qualifier_in_declaration_specifiers276 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_init_declarator_in_init_declarator_list298 = frozenset([1, 27])
- FOLLOW_27_in_init_declarator_list301 = frozenset([4, 58, 59, 60, 61, 65])
- FOLLOW_init_declarator_in_init_declarator_list303 = frozenset([1, 27])
- FOLLOW_declarator_in_init_declarator316 = frozenset([1, 28])
- FOLLOW_28_in_init_declarator319 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_initializer_in_init_declarator321 = frozenset([1])
+ FOLLOW_external_declaration_in_translation_unit74 = frozenset([1, 4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
+ FOLLOW_function_definition_in_external_declaration113 = frozenset([1])
+ FOLLOW_declaration_in_external_declaration118 = frozenset([1])
+ FOLLOW_macro_statement_in_external_declaration123 = frozenset([1, 25])
+ FOLLOW_25_in_external_declaration126 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_function_definition157 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_declarator_in_function_definition160 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_declaration_in_function_definition166 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_compound_statement_in_function_definition171 = frozenset([1])
+ FOLLOW_compound_statement_in_function_definition180 = frozenset([1])
+ FOLLOW_26_in_declaration203 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
+ FOLLOW_declaration_specifiers_in_declaration207 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_init_declarator_list_in_declaration216 = frozenset([25])
+ FOLLOW_25_in_declaration220 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_declaration234 = frozenset([4, 25, 58, 59, 60, 62, 66])
+ FOLLOW_init_declarator_list_in_declaration238 = frozenset([25])
+ FOLLOW_25_in_declaration243 = frozenset([1])
+ FOLLOW_storage_class_specifier_in_declaration_specifiers264 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_specifier_in_declaration_specifiers272 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_qualifier_in_declaration_specifiers286 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_init_declarator_in_init_declarator_list308 = frozenset([1, 27])
+ FOLLOW_27_in_init_declarator_list311 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_init_declarator_in_init_declarator_list313 = frozenset([1, 27])
+ FOLLOW_declarator_in_init_declarator326 = frozenset([1, 28])
+ FOLLOW_28_in_init_declarator329 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_initializer_in_init_declarator331 = frozenset([1])
FOLLOW_set_in_storage_class_specifier0 = frozenset([1])
- FOLLOW_34_in_type_specifier366 = frozenset([1])
- FOLLOW_35_in_type_specifier371 = frozenset([1])
- FOLLOW_36_in_type_specifier376 = frozenset([1])
- FOLLOW_37_in_type_specifier381 = frozenset([1])
- FOLLOW_38_in_type_specifier386 = frozenset([1])
- FOLLOW_39_in_type_specifier391 = frozenset([1])
- FOLLOW_40_in_type_specifier396 = frozenset([1])
- FOLLOW_41_in_type_specifier401 = frozenset([1])
- FOLLOW_42_in_type_specifier406 = frozenset([1])
- FOLLOW_struct_or_union_specifier_in_type_specifier413 = frozenset([1])
- FOLLOW_enum_specifier_in_type_specifier423 = frozenset([1])
- FOLLOW_type_id_in_type_specifier441 = frozenset([1])
- FOLLOW_IDENTIFIER_in_type_id457 = frozenset([1])
- FOLLOW_struct_or_union_in_struct_or_union_specifier484 = frozenset([4, 43])
- FOLLOW_IDENTIFIER_in_struct_or_union_specifier486 = frozenset([43])
- FOLLOW_43_in_struct_or_union_specifier489 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_struct_declaration_list_in_struct_or_union_specifier491 = frozenset([44])
- FOLLOW_44_in_struct_or_union_specifier493 = frozenset([1])
- FOLLOW_struct_or_union_in_struct_or_union_specifier498 = frozenset([4])
- FOLLOW_IDENTIFIER_in_struct_or_union_specifier500 = frozenset([1])
+ FOLLOW_34_in_type_specifier376 = frozenset([1])
+ FOLLOW_35_in_type_specifier381 = frozenset([1])
+ FOLLOW_36_in_type_specifier386 = frozenset([1])
+ FOLLOW_37_in_type_specifier391 = frozenset([1])
+ FOLLOW_38_in_type_specifier396 = frozenset([1])
+ FOLLOW_39_in_type_specifier401 = frozenset([1])
+ FOLLOW_40_in_type_specifier406 = frozenset([1])
+ FOLLOW_41_in_type_specifier411 = frozenset([1])
+ FOLLOW_42_in_type_specifier416 = frozenset([1])
+ FOLLOW_struct_or_union_specifier_in_type_specifier423 = frozenset([1])
+ FOLLOW_enum_specifier_in_type_specifier433 = frozenset([1])
+ FOLLOW_type_id_in_type_specifier451 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_type_id467 = frozenset([1])
+ FOLLOW_struct_or_union_in_struct_or_union_specifier494 = frozenset([4, 43])
+ FOLLOW_IDENTIFIER_in_struct_or_union_specifier496 = frozenset([43])
+ FOLLOW_43_in_struct_or_union_specifier499 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_struct_declaration_list_in_struct_or_union_specifier501 = frozenset([44])
+ FOLLOW_44_in_struct_or_union_specifier503 = frozenset([1])
+ FOLLOW_struct_or_union_in_struct_or_union_specifier508 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_struct_or_union_specifier510 = frozenset([1])
FOLLOW_set_in_struct_or_union0 = frozenset([1])
- FOLLOW_struct_declaration_in_struct_declaration_list527 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_specifier_qualifier_list_in_struct_declaration539 = frozenset([4, 47, 58, 59, 60, 61, 65])
- FOLLOW_struct_declarator_list_in_struct_declaration541 = frozenset([25])
- FOLLOW_25_in_struct_declaration543 = frozenset([1])
- FOLLOW_type_qualifier_in_specifier_qualifier_list556 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_type_specifier_in_specifier_qualifier_list560 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_struct_declarator_in_struct_declarator_list574 = frozenset([1, 27])
- FOLLOW_27_in_struct_declarator_list577 = frozenset([4, 47, 58, 59, 60, 61, 65])
- FOLLOW_struct_declarator_in_struct_declarator_list579 = frozenset([1, 27])
- FOLLOW_declarator_in_struct_declarator592 = frozenset([1, 47])
- FOLLOW_47_in_struct_declarator595 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_constant_expression_in_struct_declarator597 = frozenset([1])
- FOLLOW_47_in_struct_declarator604 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_constant_expression_in_struct_declarator606 = frozenset([1])
- FOLLOW_48_in_enum_specifier624 = frozenset([43])
- FOLLOW_43_in_enum_specifier626 = frozenset([4])
- FOLLOW_enumerator_list_in_enum_specifier628 = frozenset([27, 44])
- FOLLOW_27_in_enum_specifier630 = frozenset([44])
- FOLLOW_44_in_enum_specifier633 = frozenset([1])
- FOLLOW_48_in_enum_specifier638 = frozenset([4])
- FOLLOW_IDENTIFIER_in_enum_specifier640 = frozenset([43])
- FOLLOW_43_in_enum_specifier642 = frozenset([4])
- FOLLOW_enumerator_list_in_enum_specifier644 = frozenset([27, 44])
- FOLLOW_27_in_enum_specifier646 = frozenset([44])
- FOLLOW_44_in_enum_specifier649 = frozenset([1])
- FOLLOW_48_in_enum_specifier654 = frozenset([4])
- FOLLOW_IDENTIFIER_in_enum_specifier656 = frozenset([1])
- FOLLOW_enumerator_in_enumerator_list667 = frozenset([1, 27])
- FOLLOW_27_in_enumerator_list670 = frozenset([4])
- FOLLOW_enumerator_in_enumerator_list672 = frozenset([1, 27])
- FOLLOW_IDENTIFIER_in_enumerator685 = frozenset([1, 28])
- FOLLOW_28_in_enumerator688 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_constant_expression_in_enumerator690 = frozenset([1])
+ FOLLOW_struct_declaration_in_struct_declaration_list537 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_specifier_qualifier_list_in_struct_declaration549 = frozenset([4, 47, 58, 59, 60, 62, 66])
+ FOLLOW_struct_declarator_list_in_struct_declaration551 = frozenset([25])
+ FOLLOW_25_in_struct_declaration553 = frozenset([1])
+ FOLLOW_type_qualifier_in_specifier_qualifier_list566 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_specifier_in_specifier_qualifier_list570 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_struct_declarator_in_struct_declarator_list584 = frozenset([1, 27])
+ FOLLOW_27_in_struct_declarator_list587 = frozenset([4, 47, 58, 59, 60, 62, 66])
+ FOLLOW_struct_declarator_in_struct_declarator_list589 = frozenset([1, 27])
+ FOLLOW_declarator_in_struct_declarator602 = frozenset([1, 47])
+ FOLLOW_47_in_struct_declarator605 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_struct_declarator607 = frozenset([1])
+ FOLLOW_47_in_struct_declarator614 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_struct_declarator616 = frozenset([1])
+ FOLLOW_48_in_enum_specifier634 = frozenset([43])
+ FOLLOW_43_in_enum_specifier636 = frozenset([4])
+ FOLLOW_enumerator_list_in_enum_specifier638 = frozenset([27, 44])
+ FOLLOW_27_in_enum_specifier640 = frozenset([44])
+ FOLLOW_44_in_enum_specifier643 = frozenset([1])
+ FOLLOW_48_in_enum_specifier648 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_enum_specifier650 = frozenset([43])
+ FOLLOW_43_in_enum_specifier652 = frozenset([4])
+ FOLLOW_enumerator_list_in_enum_specifier654 = frozenset([27, 44])
+ FOLLOW_27_in_enum_specifier656 = frozenset([44])
+ FOLLOW_44_in_enum_specifier659 = frozenset([1])
+ FOLLOW_48_in_enum_specifier664 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_enum_specifier666 = frozenset([1])
+ FOLLOW_enumerator_in_enumerator_list677 = frozenset([1, 27])
+ FOLLOW_27_in_enumerator_list680 = frozenset([4])
+ FOLLOW_enumerator_in_enumerator_list682 = frozenset([1, 27])
+ FOLLOW_IDENTIFIER_in_enumerator695 = frozenset([1, 28])
+ FOLLOW_28_in_enumerator698 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_enumerator700 = frozenset([1])
FOLLOW_set_in_type_qualifier0 = frozenset([1])
- FOLLOW_pointer_in_declarator769 = frozenset([4, 58, 59, 60, 61])
- FOLLOW_58_in_declarator773 = frozenset([4, 59, 60, 61])
- FOLLOW_59_in_declarator778 = frozenset([4, 60, 61])
- FOLLOW_60_in_declarator783 = frozenset([4, 61])
- FOLLOW_direct_declarator_in_declarator787 = frozenset([1])
- FOLLOW_pointer_in_declarator793 = frozenset([1])
- FOLLOW_IDENTIFIER_in_direct_declarator804 = frozenset([1, 61, 63])
- FOLLOW_declarator_suffix_in_direct_declarator806 = frozenset([1, 61, 63])
- FOLLOW_61_in_direct_declarator812 = frozenset([4, 58, 59, 60, 61, 65])
- FOLLOW_58_in_direct_declarator815 = frozenset([4, 58, 59, 60, 61, 65])
- FOLLOW_declarator_in_direct_declarator819 = frozenset([62])
- FOLLOW_62_in_direct_declarator821 = frozenset([61, 63])
- FOLLOW_declarator_suffix_in_direct_declarator823 = frozenset([1, 61, 63])
- FOLLOW_63_in_declarator_suffix837 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_constant_expression_in_declarator_suffix839 = frozenset([64])
- FOLLOW_64_in_declarator_suffix841 = frozenset([1])
- FOLLOW_63_in_declarator_suffix851 = frozenset([64])
- FOLLOW_64_in_declarator_suffix853 = frozenset([1])
- FOLLOW_61_in_declarator_suffix863 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_parameter_type_list_in_declarator_suffix865 = frozenset([62])
- FOLLOW_62_in_declarator_suffix867 = frozenset([1])
- FOLLOW_61_in_declarator_suffix877 = frozenset([4])
- FOLLOW_identifier_list_in_declarator_suffix879 = frozenset([62])
- FOLLOW_62_in_declarator_suffix881 = frozenset([1])
- FOLLOW_61_in_declarator_suffix891 = frozenset([62])
- FOLLOW_62_in_declarator_suffix893 = frozenset([1])
- FOLLOW_65_in_pointer904 = frozenset([49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_type_qualifier_in_pointer906 = frozenset([1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_pointer_in_pointer909 = frozenset([1])
- FOLLOW_65_in_pointer915 = frozenset([65])
- FOLLOW_pointer_in_pointer917 = frozenset([1])
- FOLLOW_65_in_pointer922 = frozenset([1])
- FOLLOW_parameter_list_in_parameter_type_list933 = frozenset([1, 27])
- FOLLOW_27_in_parameter_type_list936 = frozenset([53, 66])
- FOLLOW_53_in_parameter_type_list939 = frozenset([66])
- FOLLOW_66_in_parameter_type_list943 = frozenset([1])
- FOLLOW_parameter_declaration_in_parameter_list956 = frozenset([1, 27])
- FOLLOW_27_in_parameter_list959 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_53_in_parameter_list962 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_parameter_declaration_in_parameter_list966 = frozenset([1, 27])
- FOLLOW_declaration_specifiers_in_parameter_declaration979 = frozenset([1, 4, 53, 58, 59, 60, 61, 63, 65])
- FOLLOW_declarator_in_parameter_declaration982 = frozenset([1, 4, 53, 58, 59, 60, 61, 63, 65])
- FOLLOW_abstract_declarator_in_parameter_declaration984 = frozenset([1, 4, 53, 58, 59, 60, 61, 63, 65])
- FOLLOW_53_in_parameter_declaration989 = frozenset([1])
- FOLLOW_pointer_in_parameter_declaration998 = frozenset([4, 65])
- FOLLOW_IDENTIFIER_in_parameter_declaration1001 = frozenset([1])
- FOLLOW_IDENTIFIER_in_identifier_list1012 = frozenset([1, 27])
- FOLLOW_27_in_identifier_list1016 = frozenset([4])
- FOLLOW_IDENTIFIER_in_identifier_list1018 = frozenset([1, 27])
- FOLLOW_specifier_qualifier_list_in_type_name1031 = frozenset([1, 61, 63, 65])
- FOLLOW_abstract_declarator_in_type_name1033 = frozenset([1])
- FOLLOW_type_id_in_type_name1039 = frozenset([1])
- FOLLOW_pointer_in_abstract_declarator1050 = frozenset([1, 61, 63])
- FOLLOW_direct_abstract_declarator_in_abstract_declarator1052 = frozenset([1])
- FOLLOW_direct_abstract_declarator_in_abstract_declarator1058 = frozenset([1])
- FOLLOW_61_in_direct_abstract_declarator1071 = frozenset([61, 63, 65])
- FOLLOW_abstract_declarator_in_direct_abstract_declarator1073 = frozenset([62])
- FOLLOW_62_in_direct_abstract_declarator1075 = frozenset([1, 61, 63])
- FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1079 = frozenset([1, 61, 63])
- FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1083 = frozenset([1, 61, 63])
- FOLLOW_63_in_abstract_declarator_suffix1095 = frozenset([64])
- FOLLOW_64_in_abstract_declarator_suffix1097 = frozenset([1])
- FOLLOW_63_in_abstract_declarator_suffix1102 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_constant_expression_in_abstract_declarator_suffix1104 = frozenset([64])
- FOLLOW_64_in_abstract_declarator_suffix1106 = frozenset([1])
- FOLLOW_61_in_abstract_declarator_suffix1111 = frozenset([62])
- FOLLOW_62_in_abstract_declarator_suffix1113 = frozenset([1])
- FOLLOW_61_in_abstract_declarator_suffix1118 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_parameter_type_list_in_abstract_declarator_suffix1120 = frozenset([62])
- FOLLOW_62_in_abstract_declarator_suffix1122 = frozenset([1])
- FOLLOW_assignment_expression_in_initializer1135 = frozenset([1])
- FOLLOW_43_in_initializer1140 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_initializer_list_in_initializer1142 = frozenset([27, 44])
- FOLLOW_27_in_initializer1144 = frozenset([44])
- FOLLOW_44_in_initializer1147 = frozenset([1])
- FOLLOW_initializer_in_initializer_list1158 = frozenset([1, 27])
- FOLLOW_27_in_initializer_list1161 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_initializer_in_initializer_list1163 = frozenset([1, 27])
- FOLLOW_assignment_expression_in_argument_expression_list1181 = frozenset([1, 27, 53])
- FOLLOW_53_in_argument_expression_list1184 = frozenset([1, 27])
- FOLLOW_27_in_argument_expression_list1189 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_assignment_expression_in_argument_expression_list1191 = frozenset([1, 27, 53])
- FOLLOW_53_in_argument_expression_list1194 = frozenset([1, 27])
- FOLLOW_multiplicative_expression_in_additive_expression1210 = frozenset([1, 67, 68])
- FOLLOW_67_in_additive_expression1214 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_multiplicative_expression_in_additive_expression1216 = frozenset([1, 67, 68])
- FOLLOW_68_in_additive_expression1220 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_multiplicative_expression_in_additive_expression1222 = frozenset([1, 67, 68])
- FOLLOW_cast_expression_in_multiplicative_expression1236 = frozenset([1, 65, 69, 70])
- FOLLOW_65_in_multiplicative_expression1240 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_cast_expression_in_multiplicative_expression1242 = frozenset([1, 65, 69, 70])
- FOLLOW_69_in_multiplicative_expression1246 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_cast_expression_in_multiplicative_expression1248 = frozenset([1, 65, 69, 70])
- FOLLOW_70_in_multiplicative_expression1252 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_cast_expression_in_multiplicative_expression1254 = frozenset([1, 65, 69, 70])
- FOLLOW_61_in_cast_expression1267 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_type_name_in_cast_expression1269 = frozenset([62])
- FOLLOW_62_in_cast_expression1271 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_cast_expression_in_cast_expression1273 = frozenset([1])
- FOLLOW_unary_expression_in_cast_expression1278 = frozenset([1])
- FOLLOW_postfix_expression_in_unary_expression1289 = frozenset([1])
- FOLLOW_71_in_unary_expression1294 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_unary_expression_in_unary_expression1296 = frozenset([1])
- FOLLOW_72_in_unary_expression1301 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_unary_expression_in_unary_expression1303 = frozenset([1])
- FOLLOW_unary_operator_in_unary_expression1308 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_cast_expression_in_unary_expression1310 = frozenset([1])
- FOLLOW_73_in_unary_expression1315 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_unary_expression_in_unary_expression1317 = frozenset([1])
- FOLLOW_73_in_unary_expression1322 = frozenset([61])
- FOLLOW_61_in_unary_expression1324 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_type_name_in_unary_expression1326 = frozenset([62])
- FOLLOW_62_in_unary_expression1328 = frozenset([1])
- FOLLOW_primary_expression_in_postfix_expression1352 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_63_in_postfix_expression1368 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_postfix_expression1370 = frozenset([64])
- FOLLOW_64_in_postfix_expression1372 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_61_in_postfix_expression1386 = frozenset([62])
- FOLLOW_62_in_postfix_expression1390 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_61_in_postfix_expression1405 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_argument_expression_list_in_postfix_expression1409 = frozenset([62])
- FOLLOW_62_in_postfix_expression1413 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_61_in_postfix_expression1429 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_macro_parameter_list_in_postfix_expression1431 = frozenset([62])
- FOLLOW_62_in_postfix_expression1433 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_74_in_postfix_expression1447 = frozenset([4])
- FOLLOW_IDENTIFIER_in_postfix_expression1451 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_65_in_postfix_expression1467 = frozenset([4])
- FOLLOW_IDENTIFIER_in_postfix_expression1471 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_75_in_postfix_expression1487 = frozenset([4])
- FOLLOW_IDENTIFIER_in_postfix_expression1491 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_71_in_postfix_expression1507 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_72_in_postfix_expression1521 = frozenset([1, 61, 63, 65, 71, 72, 74, 75])
- FOLLOW_parameter_declaration_in_macro_parameter_list1544 = frozenset([1, 27])
- FOLLOW_27_in_macro_parameter_list1547 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_parameter_declaration_in_macro_parameter_list1549 = frozenset([1, 27])
+ FOLLOW_pointer_in_declarator784 = frozenset([4, 58, 59, 60, 62])
+ FOLLOW_58_in_declarator788 = frozenset([4, 59, 60, 62])
+ FOLLOW_59_in_declarator793 = frozenset([4, 60, 62])
+ FOLLOW_60_in_declarator798 = frozenset([4, 62])
+ FOLLOW_direct_declarator_in_declarator802 = frozenset([1])
+ FOLLOW_pointer_in_declarator808 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_direct_declarator819 = frozenset([1, 62, 64])
+ FOLLOW_declarator_suffix_in_direct_declarator821 = frozenset([1, 62, 64])
+ FOLLOW_62_in_direct_declarator827 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_58_in_direct_declarator830 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_declarator_in_direct_declarator834 = frozenset([63])
+ FOLLOW_63_in_direct_declarator836 = frozenset([62, 64])
+ FOLLOW_declarator_suffix_in_direct_declarator838 = frozenset([1, 62, 64])
+ FOLLOW_64_in_declarator_suffix852 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_declarator_suffix854 = frozenset([65])
+ FOLLOW_65_in_declarator_suffix856 = frozenset([1])
+ FOLLOW_64_in_declarator_suffix866 = frozenset([65])
+ FOLLOW_65_in_declarator_suffix868 = frozenset([1])
+ FOLLOW_62_in_declarator_suffix878 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_type_list_in_declarator_suffix880 = frozenset([63])
+ FOLLOW_63_in_declarator_suffix882 = frozenset([1])
+ FOLLOW_62_in_declarator_suffix892 = frozenset([4])
+ FOLLOW_identifier_list_in_declarator_suffix894 = frozenset([63])
+ FOLLOW_63_in_declarator_suffix896 = frozenset([1])
+ FOLLOW_62_in_declarator_suffix906 = frozenset([63])
+ FOLLOW_63_in_declarator_suffix908 = frozenset([1])
+ FOLLOW_66_in_pointer919 = frozenset([49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_qualifier_in_pointer921 = frozenset([1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_pointer_in_pointer924 = frozenset([1])
+ FOLLOW_66_in_pointer930 = frozenset([66])
+ FOLLOW_pointer_in_pointer932 = frozenset([1])
+ FOLLOW_66_in_pointer937 = frozenset([1])
+ FOLLOW_parameter_list_in_parameter_type_list948 = frozenset([1, 27])
+ FOLLOW_27_in_parameter_type_list951 = frozenset([53, 67])
+ FOLLOW_53_in_parameter_type_list954 = frozenset([67])
+ FOLLOW_67_in_parameter_type_list958 = frozenset([1])
+ FOLLOW_parameter_declaration_in_parameter_list971 = frozenset([1, 27])
+ FOLLOW_27_in_parameter_list974 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_53_in_parameter_list977 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_declaration_in_parameter_list981 = frozenset([1, 27])
+ FOLLOW_declaration_specifiers_in_parameter_declaration994 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_declarator_in_parameter_declaration997 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_abstract_declarator_in_parameter_declaration999 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_53_in_parameter_declaration1004 = frozenset([1])
+ FOLLOW_pointer_in_parameter_declaration1013 = frozenset([4, 66])
+ FOLLOW_IDENTIFIER_in_parameter_declaration1016 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_identifier_list1027 = frozenset([1, 27])
+ FOLLOW_27_in_identifier_list1031 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_identifier_list1033 = frozenset([1, 27])
+ FOLLOW_specifier_qualifier_list_in_type_name1046 = frozenset([1, 62, 64, 66])
+ FOLLOW_abstract_declarator_in_type_name1048 = frozenset([1])
+ FOLLOW_type_id_in_type_name1054 = frozenset([1])
+ FOLLOW_pointer_in_abstract_declarator1065 = frozenset([1, 62, 64])
+ FOLLOW_direct_abstract_declarator_in_abstract_declarator1067 = frozenset([1])
+ FOLLOW_direct_abstract_declarator_in_abstract_declarator1073 = frozenset([1])
+ FOLLOW_62_in_direct_abstract_declarator1086 = frozenset([62, 64, 66])
+ FOLLOW_abstract_declarator_in_direct_abstract_declarator1088 = frozenset([63])
+ FOLLOW_63_in_direct_abstract_declarator1090 = frozenset([1, 62, 64])
+ FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1094 = frozenset([1, 62, 64])
+ FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1098 = frozenset([1, 62, 64])
+ FOLLOW_64_in_abstract_declarator_suffix1110 = frozenset([65])
+ FOLLOW_65_in_abstract_declarator_suffix1112 = frozenset([1])
+ FOLLOW_64_in_abstract_declarator_suffix1117 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_abstract_declarator_suffix1119 = frozenset([65])
+ FOLLOW_65_in_abstract_declarator_suffix1121 = frozenset([1])
+ FOLLOW_62_in_abstract_declarator_suffix1126 = frozenset([63])
+ FOLLOW_63_in_abstract_declarator_suffix1128 = frozenset([1])
+ FOLLOW_62_in_abstract_declarator_suffix1133 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_type_list_in_abstract_declarator_suffix1135 = frozenset([63])
+ FOLLOW_63_in_abstract_declarator_suffix1137 = frozenset([1])
+ FOLLOW_assignment_expression_in_initializer1150 = frozenset([1])
+ FOLLOW_43_in_initializer1155 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_initializer_list_in_initializer1157 = frozenset([27, 44])
+ FOLLOW_27_in_initializer1159 = frozenset([44])
+ FOLLOW_44_in_initializer1162 = frozenset([1])
+ FOLLOW_initializer_in_initializer_list1173 = frozenset([1, 27])
+ FOLLOW_27_in_initializer_list1176 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_initializer_in_initializer_list1178 = frozenset([1, 27])
+ FOLLOW_assignment_expression_in_argument_expression_list1196 = frozenset([1, 27, 53])
+ FOLLOW_53_in_argument_expression_list1199 = frozenset([1, 27])
+ FOLLOW_27_in_argument_expression_list1204 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_assignment_expression_in_argument_expression_list1206 = frozenset([1, 27, 53])
+ FOLLOW_53_in_argument_expression_list1209 = frozenset([1, 27])
+ FOLLOW_multiplicative_expression_in_additive_expression1225 = frozenset([1, 68, 69])
+ FOLLOW_68_in_additive_expression1229 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_multiplicative_expression_in_additive_expression1231 = frozenset([1, 68, 69])
+ FOLLOW_69_in_additive_expression1235 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_multiplicative_expression_in_additive_expression1237 = frozenset([1, 68, 69])
+ FOLLOW_cast_expression_in_multiplicative_expression1251 = frozenset([1, 66, 70, 71])
+ FOLLOW_66_in_multiplicative_expression1255 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_multiplicative_expression1257 = frozenset([1, 66, 70, 71])
+ FOLLOW_70_in_multiplicative_expression1261 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_multiplicative_expression1263 = frozenset([1, 66, 70, 71])
+ FOLLOW_71_in_multiplicative_expression1267 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_multiplicative_expression1269 = frozenset([1, 66, 70, 71])
+ FOLLOW_62_in_cast_expression1282 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_name_in_cast_expression1284 = frozenset([63])
+ FOLLOW_63_in_cast_expression1286 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_cast_expression1288 = frozenset([1])
+ FOLLOW_unary_expression_in_cast_expression1293 = frozenset([1])
+ FOLLOW_postfix_expression_in_unary_expression1304 = frozenset([1])
+ FOLLOW_72_in_unary_expression1309 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_unary_expression_in_unary_expression1311 = frozenset([1])
+ FOLLOW_73_in_unary_expression1316 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_unary_expression_in_unary_expression1318 = frozenset([1])
+ FOLLOW_unary_operator_in_unary_expression1323 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_unary_expression1325 = frozenset([1])
+ FOLLOW_74_in_unary_expression1330 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_unary_expression_in_unary_expression1332 = frozenset([1])
+ FOLLOW_74_in_unary_expression1337 = frozenset([62])
+ FOLLOW_62_in_unary_expression1339 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_name_in_unary_expression1341 = frozenset([63])
+ FOLLOW_63_in_unary_expression1343 = frozenset([1])
+ FOLLOW_primary_expression_in_postfix_expression1367 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_64_in_postfix_expression1383 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_postfix_expression1385 = frozenset([65])
+ FOLLOW_65_in_postfix_expression1387 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_62_in_postfix_expression1401 = frozenset([63])
+ FOLLOW_63_in_postfix_expression1405 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_62_in_postfix_expression1420 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_argument_expression_list_in_postfix_expression1424 = frozenset([63])
+ FOLLOW_63_in_postfix_expression1428 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_62_in_postfix_expression1444 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_macro_parameter_list_in_postfix_expression1446 = frozenset([63])
+ FOLLOW_63_in_postfix_expression1448 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_75_in_postfix_expression1462 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_postfix_expression1466 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_66_in_postfix_expression1482 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_postfix_expression1486 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_76_in_postfix_expression1502 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_postfix_expression1506 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_72_in_postfix_expression1522 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_73_in_postfix_expression1536 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_parameter_declaration_in_macro_parameter_list1559 = frozenset([1, 27])
+ FOLLOW_27_in_macro_parameter_list1562 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_declaration_in_macro_parameter_list1564 = frozenset([1, 27])
FOLLOW_set_in_unary_operator0 = frozenset([1])
- FOLLOW_IDENTIFIER_in_primary_expression1598 = frozenset([1])
- FOLLOW_constant_in_primary_expression1603 = frozenset([1])
- FOLLOW_61_in_primary_expression1608 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_primary_expression1610 = frozenset([62])
- FOLLOW_62_in_primary_expression1612 = frozenset([1])
- FOLLOW_HEX_LITERAL_in_constant1628 = frozenset([1])
- FOLLOW_OCTAL_LITERAL_in_constant1638 = frozenset([1])
- FOLLOW_DECIMAL_LITERAL_in_constant1648 = frozenset([1])
- FOLLOW_CHARACTER_LITERAL_in_constant1656 = frozenset([1])
- FOLLOW_IDENTIFIER_in_constant1665 = frozenset([4, 9])
- FOLLOW_STRING_LITERAL_in_constant1668 = frozenset([1, 4, 9])
- FOLLOW_IDENTIFIER_in_constant1673 = frozenset([1, 4])
- FOLLOW_FLOATING_POINT_LITERAL_in_constant1684 = frozenset([1])
- FOLLOW_assignment_expression_in_expression1700 = frozenset([1, 27])
- FOLLOW_27_in_expression1703 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_assignment_expression_in_expression1705 = frozenset([1, 27])
- FOLLOW_conditional_expression_in_constant_expression1718 = frozenset([1])
- FOLLOW_lvalue_in_assignment_expression1729 = frozenset([28, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88])
- FOLLOW_assignment_operator_in_assignment_expression1731 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_assignment_expression_in_assignment_expression1733 = frozenset([1])
- FOLLOW_conditional_expression_in_assignment_expression1738 = frozenset([1])
- FOLLOW_unary_expression_in_lvalue1750 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_primary_expression1613 = frozenset([1])
+ FOLLOW_constant_in_primary_expression1618 = frozenset([1])
+ FOLLOW_62_in_primary_expression1623 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_primary_expression1625 = frozenset([63])
+ FOLLOW_63_in_primary_expression1627 = frozenset([1])
+ FOLLOW_HEX_LITERAL_in_constant1643 = frozenset([1])
+ FOLLOW_OCTAL_LITERAL_in_constant1653 = frozenset([1])
+ FOLLOW_DECIMAL_LITERAL_in_constant1663 = frozenset([1])
+ FOLLOW_CHARACTER_LITERAL_in_constant1671 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_constant1680 = frozenset([4, 9])
+ FOLLOW_STRING_LITERAL_in_constant1683 = frozenset([1, 4, 9])
+ FOLLOW_IDENTIFIER_in_constant1688 = frozenset([1, 4])
+ FOLLOW_FLOATING_POINT_LITERAL_in_constant1699 = frozenset([1])
+ FOLLOW_assignment_expression_in_expression1715 = frozenset([1, 27])
+ FOLLOW_27_in_expression1718 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_assignment_expression_in_expression1720 = frozenset([1, 27])
+ FOLLOW_conditional_expression_in_constant_expression1733 = frozenset([1])
+ FOLLOW_lvalue_in_assignment_expression1744 = frozenset([28, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89])
+ FOLLOW_assignment_operator_in_assignment_expression1746 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_assignment_expression_in_assignment_expression1748 = frozenset([1])
+ FOLLOW_conditional_expression_in_assignment_expression1753 = frozenset([1])
+ FOLLOW_unary_expression_in_lvalue1765 = frozenset([1])
FOLLOW_set_in_assignment_operator0 = frozenset([1])
- FOLLOW_logical_or_expression_in_conditional_expression1824 = frozenset([1, 89])
- FOLLOW_89_in_conditional_expression1827 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_conditional_expression1829 = frozenset([47])
- FOLLOW_47_in_conditional_expression1831 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_conditional_expression_in_conditional_expression1833 = frozenset([1])
- FOLLOW_logical_and_expression_in_logical_or_expression1848 = frozenset([1, 90])
- FOLLOW_90_in_logical_or_expression1851 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_logical_and_expression_in_logical_or_expression1853 = frozenset([1, 90])
- FOLLOW_inclusive_or_expression_in_logical_and_expression1866 = frozenset([1, 91])
- FOLLOW_91_in_logical_and_expression1869 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_inclusive_or_expression_in_logical_and_expression1871 = frozenset([1, 91])
- FOLLOW_exclusive_or_expression_in_inclusive_or_expression1884 = frozenset([1, 92])
- FOLLOW_92_in_inclusive_or_expression1887 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_exclusive_or_expression_in_inclusive_or_expression1889 = frozenset([1, 92])
- FOLLOW_and_expression_in_exclusive_or_expression1902 = frozenset([1, 93])
- FOLLOW_93_in_exclusive_or_expression1905 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_and_expression_in_exclusive_or_expression1907 = frozenset([1, 93])
- FOLLOW_equality_expression_in_and_expression1920 = frozenset([1, 76])
- FOLLOW_76_in_and_expression1923 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_equality_expression_in_and_expression1925 = frozenset([1, 76])
- FOLLOW_relational_expression_in_equality_expression1937 = frozenset([1, 94, 95])
- FOLLOW_set_in_equality_expression1940 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_relational_expression_in_equality_expression1946 = frozenset([1, 94, 95])
- FOLLOW_shift_expression_in_relational_expression1960 = frozenset([1, 96, 97, 98, 99])
- FOLLOW_set_in_relational_expression1963 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_shift_expression_in_relational_expression1973 = frozenset([1, 96, 97, 98, 99])
- FOLLOW_additive_expression_in_shift_expression1986 = frozenset([1, 100, 101])
- FOLLOW_set_in_shift_expression1989 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_additive_expression_in_shift_expression1995 = frozenset([1, 100, 101])
- FOLLOW_labeled_statement_in_statement2010 = frozenset([1])
- FOLLOW_compound_statement_in_statement2015 = frozenset([1])
- FOLLOW_expression_statement_in_statement2020 = frozenset([1])
- FOLLOW_selection_statement_in_statement2025 = frozenset([1])
- FOLLOW_iteration_statement_in_statement2030 = frozenset([1])
- FOLLOW_jump_statement_in_statement2035 = frozenset([1])
- FOLLOW_macro_statement_in_statement2040 = frozenset([1])
- FOLLOW_asm2_statement_in_statement2045 = frozenset([1])
- FOLLOW_asm1_statement_in_statement2050 = frozenset([1])
- FOLLOW_asm_statement_in_statement2055 = frozenset([1])
- FOLLOW_declaration_in_statement2060 = frozenset([1])
- FOLLOW_102_in_asm2_statement2071 = frozenset([4])
- FOLLOW_IDENTIFIER_in_asm2_statement2074 = frozenset([61])
- FOLLOW_61_in_asm2_statement2076 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_set_in_asm2_statement2079 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_62_in_asm2_statement2086 = frozenset([25])
- FOLLOW_25_in_asm2_statement2088 = frozenset([1])
- FOLLOW_103_in_asm1_statement2100 = frozenset([43])
- FOLLOW_43_in_asm1_statement2102 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_set_in_asm1_statement2105 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_44_in_asm1_statement2112 = frozenset([1])
- FOLLOW_104_in_asm_statement2123 = frozenset([43])
- FOLLOW_43_in_asm_statement2125 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_set_in_asm_statement2128 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_44_in_asm_statement2135 = frozenset([1])
- FOLLOW_IDENTIFIER_in_macro_statement2147 = frozenset([61])
- FOLLOW_61_in_macro_statement2149 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_declaration_in_macro_statement2151 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_list_in_macro_statement2155 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 62, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_macro_statement2158 = frozenset([62])
- FOLLOW_62_in_macro_statement2161 = frozenset([1])
- FOLLOW_IDENTIFIER_in_labeled_statement2173 = frozenset([47])
- FOLLOW_47_in_labeled_statement2175 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_in_labeled_statement2177 = frozenset([1])
- FOLLOW_105_in_labeled_statement2182 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_constant_expression_in_labeled_statement2184 = frozenset([47])
- FOLLOW_47_in_labeled_statement2186 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_in_labeled_statement2188 = frozenset([1])
- FOLLOW_106_in_labeled_statement2193 = frozenset([47])
- FOLLOW_47_in_labeled_statement2195 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_in_labeled_statement2197 = frozenset([1])
- FOLLOW_43_in_compound_statement2208 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_declaration_in_compound_statement2210 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_list_in_compound_statement2213 = frozenset([44])
- FOLLOW_44_in_compound_statement2216 = frozenset([1])
- FOLLOW_statement_in_statement_list2227 = frozenset([1, 4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_25_in_expression_statement2239 = frozenset([1])
- FOLLOW_expression_in_expression_statement2244 = frozenset([25])
- FOLLOW_25_in_expression_statement2246 = frozenset([1])
- FOLLOW_107_in_selection_statement2257 = frozenset([61])
- FOLLOW_61_in_selection_statement2259 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_selection_statement2263 = frozenset([62])
- FOLLOW_62_in_selection_statement2265 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_in_selection_statement2269 = frozenset([1, 108])
- FOLLOW_108_in_selection_statement2284 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_in_selection_statement2286 = frozenset([1])
- FOLLOW_109_in_selection_statement2293 = frozenset([61])
- FOLLOW_61_in_selection_statement2295 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_selection_statement2297 = frozenset([62])
- FOLLOW_62_in_selection_statement2299 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
+ FOLLOW_logical_or_expression_in_conditional_expression1839 = frozenset([1, 90])
+ FOLLOW_90_in_conditional_expression1842 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_conditional_expression1844 = frozenset([47])
+ FOLLOW_47_in_conditional_expression1846 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_conditional_expression_in_conditional_expression1848 = frozenset([1])
+ FOLLOW_logical_and_expression_in_logical_or_expression1863 = frozenset([1, 91])
+ FOLLOW_91_in_logical_or_expression1866 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_logical_and_expression_in_logical_or_expression1868 = frozenset([1, 91])
+ FOLLOW_inclusive_or_expression_in_logical_and_expression1881 = frozenset([1, 92])
+ FOLLOW_92_in_logical_and_expression1884 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_inclusive_or_expression_in_logical_and_expression1886 = frozenset([1, 92])
+ FOLLOW_exclusive_or_expression_in_inclusive_or_expression1899 = frozenset([1, 93])
+ FOLLOW_93_in_inclusive_or_expression1902 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_exclusive_or_expression_in_inclusive_or_expression1904 = frozenset([1, 93])
+ FOLLOW_and_expression_in_exclusive_or_expression1917 = frozenset([1, 94])
+ FOLLOW_94_in_exclusive_or_expression1920 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_and_expression_in_exclusive_or_expression1922 = frozenset([1, 94])
+ FOLLOW_equality_expression_in_and_expression1935 = frozenset([1, 77])
+ FOLLOW_77_in_and_expression1938 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_equality_expression_in_and_expression1940 = frozenset([1, 77])
+ FOLLOW_relational_expression_in_equality_expression1952 = frozenset([1, 95, 96])
+ FOLLOW_set_in_equality_expression1955 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_relational_expression_in_equality_expression1961 = frozenset([1, 95, 96])
+ FOLLOW_shift_expression_in_relational_expression1975 = frozenset([1, 97, 98, 99, 100])
+ FOLLOW_set_in_relational_expression1978 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_shift_expression_in_relational_expression1988 = frozenset([1, 97, 98, 99, 100])
+ FOLLOW_additive_expression_in_shift_expression2001 = frozenset([1, 101, 102])
+ FOLLOW_set_in_shift_expression2004 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_additive_expression_in_shift_expression2010 = frozenset([1, 101, 102])
+ FOLLOW_labeled_statement_in_statement2025 = frozenset([1])
+ FOLLOW_compound_statement_in_statement2030 = frozenset([1])
+ FOLLOW_expression_statement_in_statement2035 = frozenset([1])
+ FOLLOW_selection_statement_in_statement2040 = frozenset([1])
+ FOLLOW_iteration_statement_in_statement2045 = frozenset([1])
+ FOLLOW_jump_statement_in_statement2050 = frozenset([1])
+ FOLLOW_macro_statement_in_statement2055 = frozenset([1])
+ FOLLOW_asm2_statement_in_statement2060 = frozenset([1])
+ FOLLOW_asm1_statement_in_statement2065 = frozenset([1])
+ FOLLOW_asm_statement_in_statement2070 = frozenset([1])
+ FOLLOW_declaration_in_statement2075 = frozenset([1])
+ FOLLOW_103_in_asm2_statement2086 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_asm2_statement2089 = frozenset([62])
+ FOLLOW_62_in_asm2_statement2091 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_set_in_asm2_statement2094 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_63_in_asm2_statement2101 = frozenset([25])
+ FOLLOW_25_in_asm2_statement2103 = frozenset([1])
+ FOLLOW_104_in_asm1_statement2115 = frozenset([43])
+ FOLLOW_43_in_asm1_statement2117 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_set_in_asm1_statement2120 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_44_in_asm1_statement2127 = frozenset([1])
+ FOLLOW_105_in_asm_statement2138 = frozenset([43])
+ FOLLOW_43_in_asm_statement2140 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_set_in_asm_statement2143 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_44_in_asm_statement2150 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_macro_statement2162 = frozenset([62])
+ FOLLOW_62_in_macro_statement2164 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_declaration_in_macro_statement2166 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_list_in_macro_statement2170 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 63, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_macro_statement2173 = frozenset([63])
+ FOLLOW_63_in_macro_statement2176 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_labeled_statement2188 = frozenset([47])
+ FOLLOW_47_in_labeled_statement2190 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_labeled_statement2192 = frozenset([1])
+ FOLLOW_106_in_labeled_statement2197 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_labeled_statement2199 = frozenset([47])
+ FOLLOW_47_in_labeled_statement2201 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_labeled_statement2203 = frozenset([1])
+ FOLLOW_107_in_labeled_statement2208 = frozenset([47])
+ FOLLOW_47_in_labeled_statement2210 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_labeled_statement2212 = frozenset([1])
+ FOLLOW_43_in_compound_statement2223 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_declaration_in_compound_statement2225 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_list_in_compound_statement2228 = frozenset([44])
+ FOLLOW_44_in_compound_statement2231 = frozenset([1])
+ FOLLOW_statement_in_statement_list2242 = frozenset([1, 4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_25_in_expression_statement2254 = frozenset([1])
+ FOLLOW_expression_in_expression_statement2259 = frozenset([25])
+ FOLLOW_25_in_expression_statement2261 = frozenset([1])
+ FOLLOW_108_in_selection_statement2272 = frozenset([62])
+ FOLLOW_62_in_selection_statement2274 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_selection_statement2278 = frozenset([63])
+ FOLLOW_63_in_selection_statement2280 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_selection_statement2284 = frozenset([1, 109])
+ FOLLOW_109_in_selection_statement2299 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
FOLLOW_statement_in_selection_statement2301 = frozenset([1])
- FOLLOW_110_in_iteration_statement2312 = frozenset([61])
- FOLLOW_61_in_iteration_statement2314 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_iteration_statement2318 = frozenset([62])
- FOLLOW_62_in_iteration_statement2320 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_in_iteration_statement2322 = frozenset([1])
- FOLLOW_111_in_iteration_statement2329 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_in_iteration_statement2331 = frozenset([110])
- FOLLOW_110_in_iteration_statement2333 = frozenset([61])
- FOLLOW_61_in_iteration_statement2335 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_iteration_statement2339 = frozenset([62])
- FOLLOW_62_in_iteration_statement2341 = frozenset([25])
- FOLLOW_25_in_iteration_statement2343 = frozenset([1])
- FOLLOW_112_in_iteration_statement2350 = frozenset([61])
- FOLLOW_61_in_iteration_statement2352 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_statement_in_iteration_statement2354 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_statement_in_iteration_statement2358 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 62, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_iteration_statement2360 = frozenset([62])
- FOLLOW_62_in_iteration_statement2363 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78, 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116])
- FOLLOW_statement_in_iteration_statement2365 = frozenset([1])
- FOLLOW_113_in_jump_statement2378 = frozenset([4])
- FOLLOW_IDENTIFIER_in_jump_statement2380 = frozenset([25])
- FOLLOW_25_in_jump_statement2382 = frozenset([1])
- FOLLOW_114_in_jump_statement2387 = frozenset([25])
- FOLLOW_25_in_jump_statement2389 = frozenset([1])
- FOLLOW_115_in_jump_statement2394 = frozenset([25])
- FOLLOW_25_in_jump_statement2396 = frozenset([1])
- FOLLOW_116_in_jump_statement2401 = frozenset([25])
- FOLLOW_25_in_jump_statement2403 = frozenset([1])
- FOLLOW_116_in_jump_statement2408 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_expression_in_jump_statement2410 = frozenset([25])
- FOLLOW_25_in_jump_statement2412 = frozenset([1])
- FOLLOW_declaration_specifiers_in_synpred290 = frozenset([1])
- FOLLOW_declaration_specifiers_in_synpred490 = frozenset([4, 58, 59, 60, 61, 65])
- FOLLOW_declarator_in_synpred493 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_declaration_in_synpred495 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_43_in_synpred498 = frozenset([1])
- FOLLOW_declaration_in_synpred5108 = frozenset([1])
- FOLLOW_declaration_specifiers_in_synpred7147 = frozenset([1])
- FOLLOW_declaration_specifiers_in_synpred10197 = frozenset([1])
- FOLLOW_type_specifier_in_synpred14262 = frozenset([1])
- FOLLOW_type_qualifier_in_synpred15276 = frozenset([1])
- FOLLOW_type_qualifier_in_synpred33434 = frozenset([1])
- FOLLOW_IDENTIFIER_in_synpred34432 = frozenset([4, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65])
- FOLLOW_type_qualifier_in_synpred34434 = frozenset([4, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65])
- FOLLOW_declarator_in_synpred34437 = frozenset([1])
- FOLLOW_type_qualifier_in_synpred39556 = frozenset([1])
- FOLLOW_type_specifier_in_synpred40560 = frozenset([1])
- FOLLOW_pointer_in_synpred65769 = frozenset([4, 58, 59, 60, 61])
- FOLLOW_58_in_synpred65773 = frozenset([4, 59, 60, 61])
- FOLLOW_59_in_synpred65778 = frozenset([4, 60, 61])
- FOLLOW_60_in_synpred65783 = frozenset([4, 61])
- FOLLOW_direct_declarator_in_synpred65787 = frozenset([1])
- FOLLOW_declarator_suffix_in_synpred66806 = frozenset([1])
- FOLLOW_58_in_synpred68815 = frozenset([1])
- FOLLOW_declarator_suffix_in_synpred69823 = frozenset([1])
- FOLLOW_61_in_synpred72863 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_parameter_type_list_in_synpred72865 = frozenset([62])
- FOLLOW_62_in_synpred72867 = frozenset([1])
- FOLLOW_61_in_synpred73877 = frozenset([4])
- FOLLOW_identifier_list_in_synpred73879 = frozenset([62])
- FOLLOW_62_in_synpred73881 = frozenset([1])
- FOLLOW_type_qualifier_in_synpred74906 = frozenset([1])
- FOLLOW_pointer_in_synpred75909 = frozenset([1])
- FOLLOW_65_in_synpred76904 = frozenset([49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_type_qualifier_in_synpred76906 = frozenset([1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_pointer_in_synpred76909 = frozenset([1])
- FOLLOW_65_in_synpred77915 = frozenset([65])
- FOLLOW_pointer_in_synpred77917 = frozenset([1])
- FOLLOW_53_in_synpred80962 = frozenset([1])
- FOLLOW_27_in_synpred81959 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_53_in_synpred81962 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_parameter_declaration_in_synpred81966 = frozenset([1])
- FOLLOW_declarator_in_synpred82982 = frozenset([1])
- FOLLOW_abstract_declarator_in_synpred83984 = frozenset([1])
- FOLLOW_declaration_specifiers_in_synpred85979 = frozenset([1, 4, 53, 58, 59, 60, 61, 63, 65])
- FOLLOW_declarator_in_synpred85982 = frozenset([1, 4, 53, 58, 59, 60, 61, 63, 65])
- FOLLOW_abstract_declarator_in_synpred85984 = frozenset([1, 4, 53, 58, 59, 60, 61, 63, 65])
- FOLLOW_53_in_synpred85989 = frozenset([1])
- FOLLOW_specifier_qualifier_list_in_synpred891031 = frozenset([1, 61, 63, 65])
- FOLLOW_abstract_declarator_in_synpred891033 = frozenset([1])
- FOLLOW_direct_abstract_declarator_in_synpred901052 = frozenset([1])
- FOLLOW_61_in_synpred921071 = frozenset([61, 63, 65])
- FOLLOW_abstract_declarator_in_synpred921073 = frozenset([62])
- FOLLOW_62_in_synpred921075 = frozenset([1])
- FOLLOW_abstract_declarator_suffix_in_synpred931083 = frozenset([1])
- FOLLOW_61_in_synpred1081267 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
- FOLLOW_type_name_in_synpred1081269 = frozenset([62])
- FOLLOW_62_in_synpred1081271 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_cast_expression_in_synpred1081273 = frozenset([1])
- FOLLOW_73_in_synpred1131315 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_unary_expression_in_synpred1131317 = frozenset([1])
- FOLLOW_61_in_synpred1161405 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_argument_expression_list_in_synpred1161409 = frozenset([62])
- FOLLOW_62_in_synpred1161413 = frozenset([1])
- FOLLOW_61_in_synpred1171429 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65])
- FOLLOW_macro_parameter_list_in_synpred1171431 = frozenset([62])
- FOLLOW_62_in_synpred1171433 = frozenset([1])
- FOLLOW_65_in_synpred1191467 = frozenset([4])
- FOLLOW_IDENTIFIER_in_synpred1191471 = frozenset([1])
- FOLLOW_STRING_LITERAL_in_synpred1361668 = frozenset([1])
- FOLLOW_IDENTIFIER_in_synpred1371665 = frozenset([4, 9])
- FOLLOW_STRING_LITERAL_in_synpred1371668 = frozenset([1, 9])
- FOLLOW_lvalue_in_synpred1411729 = frozenset([28, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88])
- FOLLOW_assignment_operator_in_synpred1411731 = frozenset([4, 5, 6, 7, 8, 9, 10, 61, 65, 67, 68, 71, 72, 73, 76, 77, 78])
- FOLLOW_assignment_expression_in_synpred1411733 = frozenset([1])
- FOLLOW_expression_statement_in_synpred1682020 = frozenset([1])
- FOLLOW_macro_statement_in_synpred1722040 = frozenset([1])
- FOLLOW_asm2_statement_in_synpred1732045 = frozenset([1])
- FOLLOW_declaration_in_synpred1802151 = frozenset([1])
- FOLLOW_statement_list_in_synpred1812155 = frozenset([1])
- FOLLOW_declaration_in_synpred1852210 = frozenset([1])
- FOLLOW_statement_in_synpred1872227 = frozenset([1])
+ FOLLOW_110_in_selection_statement2308 = frozenset([62])
+ FOLLOW_62_in_selection_statement2310 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_selection_statement2312 = frozenset([63])
+ FOLLOW_63_in_selection_statement2314 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_selection_statement2316 = frozenset([1])
+ FOLLOW_111_in_iteration_statement2327 = frozenset([62])
+ FOLLOW_62_in_iteration_statement2329 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_iteration_statement2333 = frozenset([63])
+ FOLLOW_63_in_iteration_statement2335 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_iteration_statement2337 = frozenset([1])
+ FOLLOW_112_in_iteration_statement2344 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_iteration_statement2346 = frozenset([111])
+ FOLLOW_111_in_iteration_statement2348 = frozenset([62])
+ FOLLOW_62_in_iteration_statement2350 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_iteration_statement2354 = frozenset([63])
+ FOLLOW_63_in_iteration_statement2356 = frozenset([25])
+ FOLLOW_25_in_iteration_statement2358 = frozenset([1])
+ FOLLOW_113_in_iteration_statement2365 = frozenset([62])
+ FOLLOW_62_in_iteration_statement2367 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_statement_in_iteration_statement2369 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_statement_in_iteration_statement2373 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 63, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_iteration_statement2375 = frozenset([63])
+ FOLLOW_63_in_iteration_statement2378 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_iteration_statement2380 = frozenset([1])
+ FOLLOW_114_in_jump_statement2393 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_jump_statement2395 = frozenset([25])
+ FOLLOW_25_in_jump_statement2397 = frozenset([1])
+ FOLLOW_115_in_jump_statement2402 = frozenset([25])
+ FOLLOW_25_in_jump_statement2404 = frozenset([1])
+ FOLLOW_116_in_jump_statement2409 = frozenset([25])
+ FOLLOW_25_in_jump_statement2411 = frozenset([1])
+ FOLLOW_117_in_jump_statement2416 = frozenset([25])
+ FOLLOW_25_in_jump_statement2418 = frozenset([1])
+ FOLLOW_117_in_jump_statement2423 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_jump_statement2425 = frozenset([25])
+ FOLLOW_25_in_jump_statement2427 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred2100 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred4100 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_declarator_in_synpred4103 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_declaration_in_synpred4105 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_43_in_synpred4108 = frozenset([1])
+ FOLLOW_declaration_in_synpred5118 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred7157 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred10207 = frozenset([1])
+ FOLLOW_type_specifier_in_synpred14272 = frozenset([1])
+ FOLLOW_type_qualifier_in_synpred15286 = frozenset([1])
+ FOLLOW_type_qualifier_in_synpred33444 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_synpred34442 = frozenset([4, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
+ FOLLOW_type_qualifier_in_synpred34444 = frozenset([4, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
+ FOLLOW_declarator_in_synpred34447 = frozenset([1])
+ FOLLOW_type_qualifier_in_synpred39566 = frozenset([1])
+ FOLLOW_type_specifier_in_synpred40570 = frozenset([1])
+ FOLLOW_pointer_in_synpred66784 = frozenset([4, 58, 59, 60, 62])
+ FOLLOW_58_in_synpred66788 = frozenset([4, 59, 60, 62])
+ FOLLOW_59_in_synpred66793 = frozenset([4, 60, 62])
+ FOLLOW_60_in_synpred66798 = frozenset([4, 62])
+ FOLLOW_direct_declarator_in_synpred66802 = frozenset([1])
+ FOLLOW_declarator_suffix_in_synpred67821 = frozenset([1])
+ FOLLOW_58_in_synpred69830 = frozenset([1])
+ FOLLOW_declarator_suffix_in_synpred70838 = frozenset([1])
+ FOLLOW_62_in_synpred73878 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_type_list_in_synpred73880 = frozenset([63])
+ FOLLOW_63_in_synpred73882 = frozenset([1])
+ FOLLOW_62_in_synpred74892 = frozenset([4])
+ FOLLOW_identifier_list_in_synpred74894 = frozenset([63])
+ FOLLOW_63_in_synpred74896 = frozenset([1])
+ FOLLOW_type_qualifier_in_synpred75921 = frozenset([1])
+ FOLLOW_pointer_in_synpred76924 = frozenset([1])
+ FOLLOW_66_in_synpred77919 = frozenset([49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_qualifier_in_synpred77921 = frozenset([1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_pointer_in_synpred77924 = frozenset([1])
+ FOLLOW_66_in_synpred78930 = frozenset([66])
+ FOLLOW_pointer_in_synpred78932 = frozenset([1])
+ FOLLOW_53_in_synpred81977 = frozenset([1])
+ FOLLOW_27_in_synpred82974 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_53_in_synpred82977 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_declaration_in_synpred82981 = frozenset([1])
+ FOLLOW_declarator_in_synpred83997 = frozenset([1])
+ FOLLOW_abstract_declarator_in_synpred84999 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred86994 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_declarator_in_synpred86997 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_abstract_declarator_in_synpred86999 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_53_in_synpred861004 = frozenset([1])
+ FOLLOW_specifier_qualifier_list_in_synpred901046 = frozenset([1, 62, 64, 66])
+ FOLLOW_abstract_declarator_in_synpred901048 = frozenset([1])
+ FOLLOW_direct_abstract_declarator_in_synpred911067 = frozenset([1])
+ FOLLOW_62_in_synpred931086 = frozenset([62, 64, 66])
+ FOLLOW_abstract_declarator_in_synpred931088 = frozenset([63])
+ FOLLOW_63_in_synpred931090 = frozenset([1])
+ FOLLOW_abstract_declarator_suffix_in_synpred941098 = frozenset([1])
+ FOLLOW_62_in_synpred1091282 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_name_in_synpred1091284 = frozenset([63])
+ FOLLOW_63_in_synpred1091286 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_synpred1091288 = frozenset([1])
+ FOLLOW_74_in_synpred1141330 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_unary_expression_in_synpred1141332 = frozenset([1])
+ FOLLOW_62_in_synpred1171420 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_argument_expression_list_in_synpred1171424 = frozenset([63])
+ FOLLOW_63_in_synpred1171428 = frozenset([1])
+ FOLLOW_62_in_synpred1181444 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_macro_parameter_list_in_synpred1181446 = frozenset([63])
+ FOLLOW_63_in_synpred1181448 = frozenset([1])
+ FOLLOW_66_in_synpred1201482 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_synpred1201486 = frozenset([1])
+ FOLLOW_STRING_LITERAL_in_synpred1371683 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_synpred1381680 = frozenset([4, 9])
+ FOLLOW_STRING_LITERAL_in_synpred1381683 = frozenset([1, 9])
+ FOLLOW_lvalue_in_synpred1421744 = frozenset([28, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89])
+ FOLLOW_assignment_operator_in_synpred1421746 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_assignment_expression_in_synpred1421748 = frozenset([1])
+ FOLLOW_expression_statement_in_synpred1692035 = frozenset([1])
+ FOLLOW_macro_statement_in_synpred1732055 = frozenset([1])
+ FOLLOW_asm2_statement_in_synpred1742060 = frozenset([1])
+ FOLLOW_declaration_in_synpred1812166 = frozenset([1])
+ FOLLOW_statement_list_in_synpred1822170 = frozenset([1])
+ FOLLOW_declaration_in_synpred1862225 = frozenset([1])
+ FOLLOW_statement_in_synpred1882242 = frozenset([1])
diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py
index c8bc54de3e..a8ec638fce 100644
--- a/BaseTools/Source/Python/Ecc/Check.py
+++ b/BaseTools/Source/Python/Ecc/Check.py
@@ -1,7 +1,7 @@
## @file
# This file is used to define checkpoints used by ECC tool
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -298,7 +298,11 @@ class Check(object):
for Key in RecordDict:
if len(RecordDict[Key]) > 1:
for Item in RecordDict[Key]:
- EccGlobalData.gDb.TblReport.Insert(ERROR_INCLUDE_FILE_CHECK_NAME, OtherMsg = "The file name for '%s' is duplicate" % (Item[1]), BelongsToTable = 'File', BelongsToItem = Item[0])
+ Path = Item[1].replace(EccGlobalData.gWorkspace, '')
+ if Path.startswith('\\') or Path.startswith('/'):
+ Path = Path[1:]
+ if not EccGlobalData.gException.IsException(ERROR_INCLUDE_FILE_CHECK_NAME, Path):
+ EccGlobalData.gDb.TblReport.Insert(ERROR_INCLUDE_FILE_CHECK_NAME, OtherMsg = "The file name for [%s] is duplicate" % Path, BelongsToTable = 'File', BelongsToItem = Item[0])
# Check whether all include file contents is guarded by a #ifndef statement.
def IncludeFileCheckIfndef(self):
@@ -527,7 +531,7 @@ class Check(object):
if EccGlobalData.gConfig.MetaDataFileCheckPcdDuplicate == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
EdkLogger.quiet("Checking for duplicate PCDs defined in both DSC and FDF files ...")
SqlCommand = """
- select A.ID, A.Value2, B.ID, B.Value2 from Dsc as A, Fdf as B
+ select A.ID, A.Value2, A.BelongsToFile, B.ID, B.Value2, B.BelongsToFile from Dsc as A, Fdf as B
where A.Model >= %s and A.Model < %s
and B.Model >= %s and B.Model < %s
and A.Value2 = B.Value2
@@ -537,10 +541,17 @@ class Check(object):
"""% (MODEL_PCD, MODEL_META_DATA_HEADER, MODEL_PCD, MODEL_META_DATA_HEADER)
RecordSet = EccGlobalData.gDb.TblDsc.Exec(SqlCommand)
for Record in RecordSet:
+ SqlCommand1 = """select Name from File where ID = %s""" %Record[2]
+ SqlCommand2 = """select Name from File where ID = %s""" %Record[5]
+ DscFileName = os.path.splitext(EccGlobalData.gDb.TblDsc.Exec(SqlCommand1)[0][0])[0]
+ FdfFileName = os.path.splitext(EccGlobalData.gDb.TblDsc.Exec(SqlCommand2)[0][0])[0]
+ print DscFileName, 111, FdfFileName
+ if DscFileName != FdfFileName:
+ continue
if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_PCD_DUPLICATE, Record[1]):
EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_PCD_DUPLICATE, OtherMsg = "The PCD [%s] is defined in both FDF file and DSC file" % (Record[1]), BelongsToTable = 'Dsc', BelongsToItem = Record[0])
if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_PCD_DUPLICATE, Record[3]):
- EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_PCD_DUPLICATE, OtherMsg = "The PCD [%s] is defined in both FDF file and DSC file" % (Record[3]), BelongsToTable = 'Fdf', BelongsToItem = Record[2])
+ EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_PCD_DUPLICATE, OtherMsg = "The PCD [%s] is defined in both FDF file and DSC file" % (Record[4]), BelongsToTable = 'Fdf', BelongsToItem = Record[3])
EdkLogger.quiet("Checking for duplicate PCDs defined in DEC files ...")
SqlCommand = """
@@ -664,7 +675,7 @@ class Check(object):
for Tbl in TableSet:
TblName = 'Identifier' + str(Tbl[0])
SqlCommand = """
- select Name, ID from %s where value like '%%%s%%' and Model = %s
+ select Name, ID from %s where value like '%s' and Model = %s
""" % (TblName, PcdName, MODEL_IDENTIFIER_FUNCTION_CALLING)
RecordSet = EccGlobalData.gDb.TblInf.Exec(SqlCommand)
TblNumber = TblName.replace('Identifier', '')
@@ -726,29 +737,35 @@ class Check(object):
# Naming Convention Check
def NamingConventionCheck(self):
-
- for Dirpath, Dirnames, Filenames in self.WalkTree():
- for F in Filenames:
- if os.path.splitext(F)[1] in ('.h', '.c'):
- FullName = os.path.join(Dirpath, F)
- Id = c.GetTableID(FullName)
- if Id < 0:
- continue
- FileTable = 'Identifier' + str(Id)
- self.NamingConventionCheckDefineStatement(FileTable)
- self.NamingConventionCheckTypedefStatement(FileTable)
- self.NamingConventionCheckIfndefStatement(FileTable)
- self.NamingConventionCheckVariableName(FileTable)
- self.NamingConventionCheckSingleCharacterVariable(FileTable)
+ if EccGlobalData.gConfig.NamingConventionCheckDefineStatement == '1' \
+ or EccGlobalData.gConfig.NamingConventionCheckTypedefStatement == '1' \
+ or EccGlobalData.gConfig.NamingConventionCheckIfndefStatement == '1' \
+ or EccGlobalData.gConfig.NamingConventionCheckVariableName == '1' \
+ or EccGlobalData.gConfig.NamingConventionCheckSingleCharacterVariable == '1' \
+ or EccGlobalData.gConfig.NamingConventionCheckAll == '1'\
+ or EccGlobalData.gConfig.CheckAll == '1':
+ for Dirpath, Dirnames, Filenames in self.WalkTree():
+ for F in Filenames:
+ if os.path.splitext(F)[1] in ('.h', '.c'):
+ FullName = os.path.join(Dirpath, F)
+ Id = c.GetTableID(FullName)
+ if Id < 0:
+ continue
+ FileTable = 'Identifier' + str(Id)
+ self.NamingConventionCheckDefineStatement(FileTable)
+ self.NamingConventionCheckTypedefStatement(FileTable)
+ self.NamingConventionCheckIfndefStatement(FileTable)
+ self.NamingConventionCheckVariableName(FileTable)
+ self.NamingConventionCheckSingleCharacterVariable(FileTable)
self.NamingConventionCheckPathName()
self.NamingConventionCheckFunctionName()
-
+
# Check whether only capital letters are used for #define declarations
def NamingConventionCheckDefineStatement(self, FileTable):
if EccGlobalData.gConfig.NamingConventionCheckDefineStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
EdkLogger.quiet("Checking naming covention of #define statement ...")
-
+
SqlCommand = """select ID, Value from %s where Model = %s""" %(FileTable, MODEL_IDENTIFIER_MACRO_DEFINE)
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
for Record in RecordSet:
@@ -763,7 +780,7 @@ class Check(object):
def NamingConventionCheckTypedefStatement(self, FileTable):
if EccGlobalData.gConfig.NamingConventionCheckTypedefStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
EdkLogger.quiet("Checking naming covention of #typedef statement ...")
-
+
SqlCommand = """select ID, Name from %s where Model = %s""" %(FileTable, MODEL_IDENTIFIER_TYPEDEF)
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
for Record in RecordSet:
@@ -783,7 +800,7 @@ class Check(object):
def NamingConventionCheckIfndefStatement(self, FileTable):
if EccGlobalData.gConfig.NamingConventionCheckTypedefStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
EdkLogger.quiet("Checking naming covention of #ifndef statement ...")
-
+
SqlCommand = """select ID, Value from %s where Model = %s""" %(FileTable, MODEL_IDENTIFIER_MACRO_IFNDEF)
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
for Record in RecordSet:
@@ -818,7 +835,7 @@ class Check(object):
if EccGlobalData.gConfig.NamingConventionCheckVariableName == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
EdkLogger.quiet("Checking naming covention of variable name ...")
Pattern = re.compile(r'^[A-Zgm]+\S*[a-z]\S*$')
-
+
SqlCommand = """select ID, Name from %s where Model = %s""" %(FileTable, MODEL_IDENTIFIER_VARIABLE)
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
for Record in RecordSet:
@@ -846,7 +863,7 @@ class Check(object):
def NamingConventionCheckSingleCharacterVariable(self, FileTable):
if EccGlobalData.gConfig.NamingConventionCheckSingleCharacterVariable == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
EdkLogger.quiet("Checking naming covention of single character variable name ...")
-
+
SqlCommand = """select ID, Name from %s where Model = %s""" %(FileTable, MODEL_IDENTIFIER_VARIABLE)
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
for Record in RecordSet:
diff --git a/BaseTools/Source/Python/Ecc/Ecc.py b/BaseTools/Source/Python/Ecc/Ecc.py
index ea9d0b343c..4b5c319c35 100644
--- a/BaseTools/Source/Python/Ecc/Ecc.py
+++ b/BaseTools/Source/Python/Ecc/Ecc.py
@@ -1,7 +1,7 @@
## @file
# This file is used to be the main entrance of ECC tool
#
-# Copyright (c) 2009, Intel Corporation
+# Copyright (c) 2009 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -43,7 +43,7 @@ class Ecc(object):
# Version and Copyright
self.VersionNumber = "0.01"
self.Version = "%prog Version " + self.VersionNumber
- self.Copyright = "Copyright (c) 2009, Intel Corporation All rights reserved."
+ self.Copyright = "Copyright (c) 2009 - 2010, Intel Corporation All rights reserved."
self.InitDefaultConfigIni()
self.OutputFile = 'output.txt'
@@ -225,6 +225,9 @@ class Ecc(object):
EdkLogger.quiet("Loading ECC configuration ... done")
(Options, Target) = self.EccOptionParser()
+ if Options.Workspace:
+ os.environ["WORKSPACE"] = Options.Workspace
+
# Check workspace envirnoment
if "WORKSPACE" not in os.environ:
EdkLogger.error("ECC", BuildToolError.ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
@@ -244,6 +247,8 @@ class Ecc(object):
self.OutputFile = Options.OutputFile
if Options.ReportFile != None:
self.ReportFile = Options.ReportFile
+ if Options.ExceptionFile != None:
+ self.ExceptionFile = Options.ExceptionFile
if Options.Target != None:
if not os.path.isdir(Options.Target):
EdkLogger.error("ECC", BuildToolError.OPTION_VALUE_INVALID, ExtraData="Target [%s] does NOT exist" % Options.Target)
@@ -294,6 +299,8 @@ class Ecc(object):
help="Specify the name of an output file, if and only if one filename was specified.")
Parser.add_option("-r", "--reportfile filename", action="store", type="string", dest="ReportFile",
help="Specify the name of an report file, if and only if one filename was specified.")
+ Parser.add_option("-e", "--exceptionfile filename", action="store", type="string", dest="ExceptionFile",
+ help="Specify the name of an exception file, if and only if one filename was specified.")
Parser.add_option("-m", "--metadata", action="store_true", type=None, help="Only scan meta-data files information if this option is specified.")
Parser.add_option("-s", "--sourcecode", action="store_true", type=None, help="Only scan source code files information if this option is specified.")
Parser.add_option("-k", "--keepdatabase", action="store_true", type=None, help="The existing Ecc database will not be cleaned except report information if this option is specified.")
@@ -307,6 +314,7 @@ class Ecc(object):
"including library instances selected, final dependency expression, "\
"and warning messages, etc.")
Parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.")
+ Parser.add_option("-w", "--workspace", action="store", type="string", dest='Workspace', help="Specify workspace.")
(Opt, Args)=Parser.parse_args()
diff --git a/BaseTools/Source/Python/Ecc/EccToolError.py b/BaseTools/Source/Python/Ecc/EccToolError.py
index 9c4d10d55b..f6c4097e78 100644
--- a/BaseTools/Source/Python/Ecc/EccToolError.py
+++ b/BaseTools/Source/Python/Ecc/EccToolError.py
@@ -1,7 +1,7 @@
## @file
# Standardized Error Hanlding infrastructures.
#
-# Copyright (c) 20087, Intel Corporation
+# Copyright (c) 2008 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -40,6 +40,8 @@ ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY = 5005
ERROR_C_FUNCTION_LAYOUT_CHECK_DATA_DECLARATION = 5006
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE = 5007
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC = 5008
+ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2 = 5009
+ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3 = 5010
ERROR_INCLUDE_FILE_CHECK_ALL = 6000
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 = 6001
@@ -102,35 +104,37 @@ gEccErrorMessage = {
ERROR_GENERAL_CHECK_NO_PROGMA : """There should be no use of "#progma" in source file except "#pragma pack(#)\"""",
ERROR_GENERAL_CHECK_CARRIAGE_RETURN : "There should be a carriage return at the end of the file",
ERROR_GENERAL_CHECK_FILE_EXISTENCE : "File not found",
-
+
ERROR_SPACE_CHECK_ALL : "",
-
+
ERROR_PREDICATE_EXPRESSION_CHECK_ALL : "",
ERROR_PREDICATE_EXPRESSION_CHECK_BOOLEAN_VALUE : "Boolean values and variable type BOOLEAN should not use explicit comparisons to TRUE or FALSE",
ERROR_PREDICATE_EXPRESSION_CHECK_NO_BOOLEAN_OPERATOR : "Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)",
ERROR_PREDICATE_EXPRESSION_CHECK_COMPARISON_NULL_TYPE : "A comparison of any pointer to zero must be done via the NULL type",
-
+
ERROR_HEADER_CHECK_ALL : "",
ERROR_HEADER_CHECK_FILE : "File header doesn't exist",
ERROR_HEADER_CHECK_FUNCTION : "Function header doesn't exist",
-
+
ERROR_C_FUNCTION_LAYOUT_CHECK_ALL : "",
ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE : "Return type of a function should exist and in the first line",
ERROR_C_FUNCTION_LAYOUT_CHECK_OPTIONAL_FUNCTIONAL_MODIFIER : "Any optional functional modifiers should exist and next to the return type",
ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_NAME : """Function name should be left justified, followed by the beginning of the parameter list, with the closing parenthesis on its own line, indented two spaces""",
ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE : "Function prototypes in include files have the same form as function definitions",
+ ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2 : "Function prototypes in include files have different parameter number with function definitions",
+ ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3 : "Function prototypes in include files have different parameter modifier with function definitions",
ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY : "The body of a function should be contained by open and close braces that must be in the first column",
ERROR_C_FUNCTION_LAYOUT_CHECK_DATA_DECLARATION : "The data declarations should be the first code in a module",
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE : "There should be no initialization of a variable as part of its declaration",
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC : "There should be no use of STATIC for functions",
-
+
ERROR_INCLUDE_FILE_CHECK_ALL : "",
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 : "All include file contents should be guarded by a #ifndef statement.",
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_2 : "The #ifndef must be the first line of code following the file header comment",
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_3 : "The #endif must appear on the last line in the file",
ERROR_INCLUDE_FILE_CHECK_DATA : "Include files should contain only public or only private data and cannot contain code or define data variables",
ERROR_INCLUDE_FILE_CHECK_NAME : "No permission for the inlcude file with same names",
-
+
ERROR_DECLARATION_DATA_TYPE_CHECK_ALL : "",
ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE : "There should be no use of int, unsigned, char, void, static, long in any .c, .h or .asl files",
ERROR_DECLARATION_DATA_TYPE_CHECK_IN_OUT_MODIFIER : """The modifiers IN, OUT, OPTIONAL, and UNALIGNED should be used only to qualify arguments to a function and should not appear in a data type declaration""",
@@ -140,7 +144,7 @@ gEccErrorMessage = {
ERROR_DECLARATION_DATA_TYPE_CHECK_SAME_STRUCTURE : "No permission for the structure with same names",
ERROR_DECLARATION_DATA_TYPE_CHECK_UNION_TYPE : "Union Type should have a 'typedef' and the name must be in capital letters",
ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE : "Complex types should be typedef-ed",
-
+
ERROR_NAMING_CONVENTION_CHECK_ALL : "",
ERROR_NAMING_CONVENTION_CHECK_DEFINE_STATEMENT : "Only capital letters are allowed to be used for #define declarations",
ERROR_NAMING_CONVENTION_CHECK_TYPEDEF_STATEMENT : "Only capital letters are allowed to be used for typedef declarations",
@@ -149,17 +153,17 @@ gEccErrorMessage = {
ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME : """Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g'""",
ERROR_NAMING_CONVENTION_CHECK_FUNCTION_NAME : """Function name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters""",
ERROR_NAMING_CONVENTION_CHECK_SINGLE_CHARACTER_VARIABLE : "There should be no use of short (single character) variable names",
-
+
ERROR_DOXYGEN_CHECK_ALL : "",
ERROR_DOXYGEN_CHECK_FILE_HEADER : "The file headers should follow Doxygen special documentation blocks in section 2.3.5",
ERROR_DOXYGEN_CHECK_FUNCTION_HEADER : "The function headers should follow Doxygen special documentation blocks in section 2.3.5",
ERROR_DOXYGEN_CHECK_COMMENT_DESCRIPTION : """The first line of text in a comment block should be a brief description of the element being documented and the brief description must end with a period.""",
ERROR_DOXYGEN_CHECK_COMMENT_FORMAT : "For comment line with '///< ... text ...' format, if it is used, it should be after the code section",
- ERROR_DOXYGEN_CHECK_COMMAND : "Only Doxygen commands @bug and @todo are allowed to mark the code",
-
+ ERROR_DOXYGEN_CHECK_COMMAND : "Only Doxygen commands '@bug', '@todo', '@example', '@file', '@attention', '@param', '@post', '@pre', '@retval', '@return', '@sa', '@since', '@test', '@note', '@par' are allowed to mark the code",
+
ERROR_META_DATA_FILE_CHECK_ALL : "",
ERROR_META_DATA_FILE_CHECK_PATH_NAME : "The file defined in meta-data does not exist",
- ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_1 : "A library instances defined for a given module (or dependent library instance) doesn't match the module's type.",
+ ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_1 : "A library instances defined for a given module (or dependent library instance) doesn't match the module's type.",
ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_2 : "A library instance must specify the Supported Module Types in its INF file",
ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_DEPENDENT : "A library instance must be defined for all dependent library classes",
ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_ORDER : "The library Instances specified by the LibraryClasses sections should be listed in order of dependencies",
@@ -171,9 +175,9 @@ gEccErrorMessage = {
ERROR_META_DATA_FILE_CHECK_DUPLICATE_GUID : "Duplicate GUID found",
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PROTOCOL : "Duplicate PROTOCOL found",
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PPI : "Duplicate PPI found",
- ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE : "No used module files found",
+ ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE : "No used module files found",
ERROR_META_DATA_FILE_CHECK_PCD_TYPE : "Wrong C code function used for this kind of PCD",
-
+
ERROR_SPELLING_CHECK_ALL : "",
}
diff --git a/BaseTools/Source/Python/Ecc/ParserWarning.py b/BaseTools/Source/Python/Ecc/ParserWarning.py
index 547360d927..1874739915 100644
--- a/BaseTools/Source/Python/Ecc/ParserWarning.py
+++ b/BaseTools/Source/Python/Ecc/ParserWarning.py
@@ -1,3 +1,16 @@
+## @file
+# This file is used to be the warning class of ECC tool
+#
+# Copyright (c) 2009 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
## The exception class that used to report error messages when preprocessing
#
# Currently the "ToolName" is set to be "ECC PP".
diff --git a/BaseTools/Source/Python/Ecc/__init__.py b/BaseTools/Source/Python/Ecc/__init__.py
index e69de29bb2..f385b1e670 100644
--- a/BaseTools/Source/Python/Ecc/__init__.py
+++ b/BaseTools/Source/Python/Ecc/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'Ecc' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py
index b8b1d2d6f5..1085da942b 100644
--- a/BaseTools/Source/Python/Ecc/c.py
+++ b/BaseTools/Source/Python/Ecc/c.py
@@ -1,3 +1,16 @@
+## @file
+# This file is used to be the c coding style checking of ECC tool
+#
+# Copyright (c) 2009 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
import sys
import os
import re
@@ -82,16 +95,16 @@ def GetIdentifierList():
for comment in FileProfile.CommentList:
IdComment = DataClass.IdentifierClass(-1, '', '', '', comment.Content, DataClass.MODEL_IDENTIFIER_COMMENT, -1, -1, comment.StartPos[0],comment.StartPos[1],comment.EndPos[0],comment.EndPos[1])
IdList.append(IdComment)
-
+
for pp in FileProfile.PPDirectiveList:
Type = GetIdType(pp.Content)
IdPP = DataClass.IdentifierClass(-1, '', '', '', pp.Content, Type, -1, -1, pp.StartPos[0],pp.StartPos[1],pp.EndPos[0],pp.EndPos[1])
IdList.append(IdPP)
-
+
for pe in FileProfile.PredicateExpressionList:
IdPE = DataClass.IdentifierClass(-1, '', '', '', pe.Content, DataClass.MODEL_IDENTIFIER_PREDICATE_EXPRESSION, -1, -1, pe.StartPos[0],pe.StartPos[1],pe.EndPos[0],pe.EndPos[1])
IdList.append(IdPE)
-
+
FuncDeclPattern = GetFuncDeclPattern()
ArrayPattern = GetArrayPattern()
for var in FileProfile.VariableDeclarationList:
@@ -125,10 +138,10 @@ def GetIdentifierList():
DeclText = DeclText[1:]
VarNameStartColumn += 1
FirstChar = DeclText[0]
-
+
var.Declarator = DeclText
if FuncDeclPattern.match(var.Declarator):
- DeclSplitList = var.Declarator.split('(')
+ DeclSplitList = var.Declarator.split('(')
FuncName = DeclSplitList[0].strip()
FuncNamePartList = FuncName.split()
if len(FuncNamePartList) > 1:
@@ -168,8 +181,8 @@ def GetIdentifierList():
IdVar = DataClass.IdentifierClass(-1, var.Modifier, '', var.Declarator, FuncName, DataClass.MODEL_IDENTIFIER_FUNCTION_DECLARATION, -1, -1, var.StartPos[0], var.StartPos[1], VarNameStartLine, VarNameStartColumn)
IdList.append(IdVar)
continue
-
- if var.Declarator.find('{') == -1:
+
+ if var.Declarator.find('{') == -1:
for decl in var.Declarator.split(','):
DeclList = decl.split('=')
Name = DeclList[0].strip()
@@ -177,7 +190,7 @@ def GetIdentifierList():
LSBPos = var.Declarator.find('[')
var.Modifier += ' ' + Name[LSBPos:]
Name = Name[0:LSBPos]
-
+
IdVar = DataClass.IdentifierClass(-1, var.Modifier, '', Name, (len(DeclList) > 1 and [DeclList[1]]or [''])[0], DataClass.MODEL_IDENTIFIER_VARIABLE, -1, -1, var.StartPos[0],var.StartPos[1], VarNameStartLine, VarNameStartColumn)
IdList.append(IdVar)
else:
@@ -189,7 +202,7 @@ def GetIdentifierList():
Name = Name[0:LSBPos]
IdVar = DataClass.IdentifierClass(-1, var.Modifier, '', Name, (len(DeclList) > 1 and [DeclList[1]]or [''])[0], DataClass.MODEL_IDENTIFIER_VARIABLE, -1, -1, var.StartPos[0],var.StartPos[1], VarNameStartLine, VarNameStartColumn)
IdList.append(IdVar)
-
+
for enum in FileProfile.EnumerationDefinitionList:
LBPos = enum.Content.find('{')
RBPos = enum.Content.find('}')
@@ -197,7 +210,7 @@ def GetIdentifierList():
Value = enum.Content[LBPos+1:RBPos]
IdEnum = DataClass.IdentifierClass(-1, '', '', Name, Value, DataClass.MODEL_IDENTIFIER_ENUMERATE, -1, -1, enum.StartPos[0],enum.StartPos[1],enum.EndPos[0],enum.EndPos[1])
IdList.append(IdEnum)
-
+
for su in FileProfile.StructUnionDefinitionList:
if SuOccurInTypedef(su, FileProfile.TypedefDefinitionList):
continue
@@ -216,8 +229,8 @@ def GetIdentifierList():
Value = su.Content[LBPos:RBPos+1]
IdPE = DataClass.IdentifierClass(-1, '', '', Name, Value, Type, -1, -1, su.StartPos[0],su.StartPos[1],su.EndPos[0],su.EndPos[1])
IdList.append(IdPE)
-
- TdFuncPointerPattern = GetTypedefFuncPointerPattern()
+
+ TdFuncPointerPattern = GetTypedefFuncPointerPattern()
for td in FileProfile.TypedefDefinitionList:
Modifier = ''
Name = td.ToType
@@ -240,16 +253,16 @@ def GetIdentifierList():
while Name.startswith('*'):
Value += ' ' + '*'
Name = Name.lstrip('*').strip()
-
+
if Name.find('[') != -1:
LBPos = Name.find('[')
RBPos = Name.rfind(']')
Value += Name[LBPos : RBPos + 1]
Name = Name[0 : LBPos]
-
+
IdTd = DataClass.IdentifierClass(-1, Modifier, '', Name, Value, DataClass.MODEL_IDENTIFIER_TYPEDEF, -1, -1, td.StartPos[0],td.StartPos[1],td.EndPos[0],td.EndPos[1])
IdList.append(IdTd)
-
+
for funcCall in FileProfile.FunctionCallingList:
IdFC = DataClass.IdentifierClass(-1, '', '', funcCall.FuncName, funcCall.ParamList, DataClass.MODEL_IDENTIFIER_FUNCTION_CALLING, -1, -1, funcCall.StartPos[0],funcCall.StartPos[1],funcCall.EndPos[0],funcCall.EndPos[1])
IdList.append(IdFC)
@@ -278,7 +291,7 @@ def GetParamList(FuncDeclarator, FuncNameLine = 0, FuncNameOffset = 0):
OffsetSkipped = 0
TailChar = FuncName[-1]
while not TailChar.isalpha() and TailChar != '_':
-
+
if TailChar == '\n':
FuncName = FuncName.rstrip('\r\n').rstrip('\n')
LineSkipped += 1
@@ -296,9 +309,9 @@ def GetParamList(FuncDeclarator, FuncNameLine = 0, FuncNameOffset = 0):
else:
FuncName = FuncName[:-1]
TailChar = FuncName[-1]
-
+
OffsetSkipped += 1 #skip '('
-
+
for p in ParamStr.split(','):
ListP = p.split()
if len(ListP) == 0:
@@ -325,13 +338,13 @@ def GetParamList(FuncDeclarator, FuncNameLine = 0, FuncNameOffset = 0):
LBIndex = ParamName.find('[')
if LBIndex != -1:
ParamName = ParamName[0:LBIndex]
-
+
Start = RightSpacePos
Index = 0
PreChar = ''
while Index < Start:
FirstChar = p[Index]
-
+
if FirstChar == '\r':
Index += 1
LineSkipped += 1
@@ -351,15 +364,15 @@ def GetParamList(FuncDeclarator, FuncNameLine = 0, FuncNameOffset = 0):
Index += 1
OffsetSkipped += 1
PreChar = FirstChar
-
+
ParamBeginLine = FuncNameLine + LineSkipped
ParamBeginOffset = FuncNameOffset + OffsetSkipped
-
+
Index = Start + len(ParamName)
PreChar = ''
while Index < len(p):
FirstChar = p[Index]
-
+
if FirstChar == '\r':
Index += 1
LineSkipped += 1
@@ -379,18 +392,18 @@ def GetParamList(FuncDeclarator, FuncNameLine = 0, FuncNameOffset = 0):
Index += 1
OffsetSkipped += 1
PreChar = FirstChar
-
+
ParamEndLine = FuncNameLine + LineSkipped
ParamEndOffset = FuncNameOffset + OffsetSkipped
if ParamName != '...':
ParamName = StripNonAlnumChars(ParamName)
IdParam = DataClass.IdentifierClass(-1, ParamModifier, '', ParamName, '', DataClass.MODEL_IDENTIFIER_PARAMETER, -1, -1, ParamBeginLine, ParamBeginOffset, ParamEndLine, ParamEndOffset)
ParamIdList.append(IdParam)
-
+
OffsetSkipped += 1 #skip ','
-
+
return ParamIdList
-
+
def GetFunctionList():
FuncObjList = []
for FuncDef in FileProfile.FunctionDefinitionList:
@@ -422,12 +435,12 @@ def GetFunctionList():
DeclText = DeclText[1:]
FuncNameStartColumn += 1
FirstChar = DeclText[0]
-
+
FuncDef.Declarator = DeclText
DeclSplitList = FuncDef.Declarator.split('(')
if len(DeclSplitList) < 2:
continue
-
+
FuncName = DeclSplitList[0]
FuncNamePartList = FuncName.split()
if len(FuncNamePartList) > 1:
@@ -463,10 +476,10 @@ def GetFunctionList():
Index += 1
FuncNameStartColumn += 1
PreChar = FirstChar
-
+
FuncObj = DataClass.FunctionClass(-1, FuncDef.Declarator, FuncDef.Modifier, FuncName.strip(), '', FuncDef.StartPos[0],FuncDef.StartPos[1],FuncDef.EndPos[0],FuncDef.EndPos[1], FuncDef.LeftBracePos[0], FuncDef.LeftBracePos[1], -1, ParamIdList, [], FuncNameStartLine, FuncNameStartColumn)
FuncObjList.append(FuncObj)
-
+
return FuncObjList
def GetFileModificationTimeFromDB(FullFileName):
@@ -519,13 +532,13 @@ def CollectSourceCodeDataIntoDB(RootDir):
ModifiedTime = os.path.getmtime(FullName)
FileObj = DataClass.FileClass(-1, BaseName, Ext, DirName, FullName, model, ModifiedTime, GetFunctionList(), GetIdentifierList(), [])
FileObjList.append(FileObj)
- collector.CleanFileProfileBuffer()
-
+ collector.CleanFileProfileBuffer()
+
if len(ParseErrorFileList) > 0:
EdkLogger.info("Found unrecoverable error during parsing:\n\t%s\n" % "\n\t".join(ParseErrorFileList))
-
- Db = GetDB()
- for file in FileObjList:
+
+ Db = GetDB()
+ for file in FileObjList:
Db.InsertOneFile(file)
Db.UpdateIdentifierBelongsToFunction()
@@ -533,13 +546,13 @@ def CollectSourceCodeDataIntoDB(RootDir):
def GetTableID(FullFileName, ErrorMsgList = None):
if ErrorMsgList == None:
ErrorMsgList = []
-
+
Db = GetDB()
SqlStatement = """ select ID
from File
where FullPath like '%s'
""" % FullFileName
-
+
ResultSet = Db.TblFile.Exec(SqlStatement)
FileID = -1
@@ -557,11 +570,11 @@ def GetIncludeFileList(FullFileName):
IFList = IncludeFileListDict.get(FullFileName)
if IFList != None:
return IFList
-
+
FileID = GetTableID(FullFileName)
if FileID < 0:
return []
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value
@@ -583,7 +596,7 @@ def GetFullPathOfIncludeFile(Str, IncludePathList):
def GetAllIncludeFiles(FullFileName):
if AllIncludeFileListDict.get(FullFileName) != None:
return AllIncludeFileListDict.get(FullFileName)
-
+
FileDirName = os.path.dirname(FullFileName)
IncludePathList = IncludePathListDict.get(FileDirName)
if IncludePathList == None:
@@ -600,7 +613,7 @@ def GetAllIncludeFiles(FullFileName):
FullPath = GetFullPathOfIncludeFile(FileName, IncludePathList)
if FullPath != None:
IncludeFileQueue.append(FullPath)
-
+
i = 0
while i < len(IncludeFileQueue):
for IncludeFile in GetIncludeFileList(IncludeFileQueue[i]):
@@ -612,7 +625,7 @@ def GetAllIncludeFiles(FullFileName):
if FullPath != None and FullPath not in IncludeFileQueue:
IncludeFileQueue.insert(i + 1, FullPath)
i += 1
-
+
AllIncludeFileListDict[FullFileName] = IncludeFileQueue
return IncludeFileQueue
@@ -637,7 +650,7 @@ def GetPredicateListFromPredicateExpStr(PES):
else:
PredicateList.append(Exp.rstrip(';').rstrip(')').strip())
i += 1
-
+
if PredicateBegin > LogicOpPos:
while PredicateBegin < len(PES):
if PES[PredicateBegin].isalnum() or PES[PredicateBegin] == '_' or PES[PredicateBegin] == '*':
@@ -651,7 +664,7 @@ def GetPredicateListFromPredicateExpStr(PES):
else:
PredicateList.append(Exp.rstrip(';').rstrip(')').strip())
return PredicateList
-
+
def GetCNameList(Lvalue, StarList = []):
Lvalue += ' '
i = 0
@@ -659,7 +672,7 @@ def GetCNameList(Lvalue, StarList = []):
VarStart = -1
VarEnd = -1
VarList = []
-
+
while SearchBegin < len(Lvalue):
while i < len(Lvalue):
if Lvalue[i].isalnum() or Lvalue[i] == '_':
@@ -677,8 +690,8 @@ def GetCNameList(Lvalue, StarList = []):
i += 1
if VarEnd == -1:
break
-
-
+
+
DotIndex = Lvalue[VarEnd:].find('.')
ArrowIndex = Lvalue[VarEnd:].find('->')
if DotIndex == -1 and ArrowIndex == -1:
@@ -688,19 +701,19 @@ def GetCNameList(Lvalue, StarList = []):
elif ArrowIndex == -1 and DotIndex != -1:
SearchBegin = VarEnd + DotIndex
else:
- SearchBegin = VarEnd + ((DotIndex < ArrowIndex) and DotIndex or ArrowIndex)
-
+ SearchBegin = VarEnd + ((DotIndex < ArrowIndex) and DotIndex or ArrowIndex)
+
i = SearchBegin
VarStart = -1
VarEnd = -1
-
- return VarList
+
+ return VarList
def SplitPredicateByOp(Str, Op, IsFuncCalling = False):
Name = Str.strip()
Value = None
-
+
if IsFuncCalling:
Index = 0
LBFound = False
@@ -708,7 +721,7 @@ def SplitPredicateByOp(Str, Op, IsFuncCalling = False):
while Index < len(Str):
while not LBFound and Str[Index] != '_' and not Str[Index].isalnum():
Index += 1
-
+
while not LBFound and (Str[Index].isalnum() or Str[Index] == '_'):
Index += 1
# maybe type-cast at the begining, skip it.
@@ -716,79 +729,81 @@ def SplitPredicateByOp(Str, Op, IsFuncCalling = False):
if RemainingStr.startswith(')') and not LBFound:
Index += 1
continue
-
+
if RemainingStr.startswith('(') and not LBFound:
LBFound = True
-
+
if Str[Index] == '(':
UnmatchedLBCount += 1
Index += 1
continue
-
+
if Str[Index] == ')':
UnmatchedLBCount -= 1
Index += 1
if UnmatchedLBCount == 0:
break
continue
-
+
Index += 1
-
+
if UnmatchedLBCount > 0:
return [Name]
-
+
IndexInRemainingStr = Str[Index:].find(Op)
if IndexInRemainingStr == -1:
return [Name]
-
+
Name = Str[0:Index + IndexInRemainingStr].strip()
- Value = Str[Index+IndexInRemainingStr+len(Op):].strip()
+ Value = Str[Index+IndexInRemainingStr+len(Op):].strip().strip(')')
return [Name, Value]
-
+
TmpStr = Str.rstrip(';').rstrip(')')
while True:
Index = TmpStr.rfind(Op)
if Index == -1:
return [Name]
-
+
if Str[Index - 1].isalnum() or Str[Index - 1].isspace() or Str[Index - 1] == ')':
Name = Str[0:Index].strip()
Value = Str[Index + len(Op):].strip()
- return [Name, Value]
-
+ return [Name, Value]
+
TmpStr = Str[0:Index - 1]
def SplitPredicateStr(Str):
+
+ Str = Str.lstrip('(')
IsFuncCalling = False
p = GetFuncDeclPattern()
TmpStr = Str.replace('.', '').replace('->', '')
if p.match(TmpStr):
IsFuncCalling = True
-
+
PredPartList = SplitPredicateByOp(Str, '==', IsFuncCalling)
if len(PredPartList) > 1:
return [PredPartList, '==']
-
+
PredPartList = SplitPredicateByOp(Str, '!=', IsFuncCalling)
if len(PredPartList) > 1:
return [PredPartList, '!=']
-
+
PredPartList = SplitPredicateByOp(Str, '>=', IsFuncCalling)
if len(PredPartList) > 1:
return [PredPartList, '>=']
-
+
PredPartList = SplitPredicateByOp(Str, '<=', IsFuncCalling)
if len(PredPartList) > 1:
return [PredPartList, '<=']
-
+
PredPartList = SplitPredicateByOp(Str, '>', IsFuncCalling)
if len(PredPartList) > 1:
return [PredPartList, '>']
-
+
PredPartList = SplitPredicateByOp(Str, '<', IsFuncCalling)
if len(PredPartList) > 1:
return [PredPartList, '<']
-
+
return [[Str, None], None]
def GetFuncContainsPE(ExpLine, ResultSet):
@@ -812,11 +827,11 @@ def GetDataTypeFromModifier(ModifierStr):
# remove array sufix
if M.startswith('['):
MList.remove(M)
-
+
ReturnType = ''
for M in MList:
ReturnType += M + ' '
-
+
ReturnType = ReturnType.strip()
if len(ReturnType) == 0:
ReturnType = 'VOID'
@@ -829,13 +844,13 @@ def DiffModifier(Str1, Str2):
return False
else:
return True
-
+
def GetTypedefDict(FullFileName):
-
+
Dict = ComplexTypeDict.get(FullFileName)
if Dict != None:
return Dict
-
+
FileID = GetTableID(FullFileName)
FileTable = 'Identifier' + str(FileID)
Db = GetDB()
@@ -844,25 +859,25 @@ def GetTypedefDict(FullFileName):
where Model = %d
""" % (FileTable, DataClass.MODEL_IDENTIFIER_TYPEDEF)
ResultSet = Db.TblFile.Exec(SqlStatement)
-
+
Dict = {}
for Result in ResultSet:
if len(Result[0]) == 0:
Dict[Result[1]] = Result[2]
-
+
IncludeFileList = GetAllIncludeFiles(FullFileName)
for F in IncludeFileList:
FileID = GetTableID(F)
if FileID < 0:
continue
-
+
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, Name, Value, ID
from %s
where Model = %d
""" % (FileTable, DataClass.MODEL_IDENTIFIER_TYPEDEF)
ResultSet = Db.TblFile.Exec(SqlStatement)
-
+
for Result in ResultSet:
if not Result[2].startswith('FP ('):
Dict[Result[1]] = Result[2]
@@ -871,16 +886,16 @@ def GetTypedefDict(FullFileName):
Dict[Result[1]] = 'VOID'
else:
Dict[Result[1]] = GetDataTypeFromModifier(Result[0])
-
+
ComplexTypeDict[FullFileName] = Dict
return Dict
def GetSUDict(FullFileName):
-
+
Dict = SUDict.get(FullFileName)
if Dict != None:
return Dict
-
+
FileID = GetTableID(FullFileName)
FileTable = 'Identifier' + str(FileID)
Db = GetDB()
@@ -889,36 +904,36 @@ def GetSUDict(FullFileName):
where Model = %d or Model = %d
""" % (FileTable, DataClass.MODEL_IDENTIFIER_STRUCTURE, DataClass.MODEL_IDENTIFIER_UNION)
ResultSet = Db.TblFile.Exec(SqlStatement)
-
+
Dict = {}
for Result in ResultSet:
if len(Result[1]) > 0:
Dict[Result[0]] = Result[1]
-
+
IncludeFileList = GetAllIncludeFiles(FullFileName)
for F in IncludeFileList:
FileID = GetTableID(F)
if FileID < 0:
continue
-
+
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Name, Value, ID
from %s
where Model = %d or Model = %d
""" % (FileTable, DataClass.MODEL_IDENTIFIER_STRUCTURE, DataClass.MODEL_IDENTIFIER_UNION)
ResultSet = Db.TblFile.Exec(SqlStatement)
-
+
for Result in ResultSet:
if len(Result[1]) > 0:
Dict[Result[0]] = Result[1]
-
+
SUDict[FullFileName] = Dict
return Dict
def StripComments(Str):
Str += ' '
ListFromStr = list(Str)
-
+
InComment = False
DoubleSlashComment = False
Index = 0
@@ -944,7 +959,7 @@ def StripComments(Str):
elif ListFromStr[Index] == '/' and ListFromStr[Index+1] == '/' and ListFromStr[Index+2] != '\n':
InComment = True
DoubleSlashComment = True
-
+
# check for /* comment start
elif ListFromStr[Index] == '/' and ListFromStr[Index+1] == '*':
ListFromStr[Index] = ' '
@@ -958,7 +973,7 @@ def StripComments(Str):
# restore from List to String
Str = "".join(ListFromStr)
Str = Str.rstrip(' ')
-
+
return Str
def GetFinalTypeValue(Type, FieldName, TypedefDict, SUDict):
@@ -967,7 +982,7 @@ def GetFinalTypeValue(Type, FieldName, TypedefDict, SUDict):
Value = SUDict.get(Type)
if Value == None:
return None
-
+
LBPos = Value.find('{')
while LBPos == -1:
FTList = Value.split()
@@ -977,12 +992,12 @@ def GetFinalTypeValue(Type, FieldName, TypedefDict, SUDict):
if Value == None:
Value = SUDict.get(FT)
break
-
+
if Value == None:
return None
-
+
LBPos = Value.find('{')
-
+
# RBPos = Value.find('}')
Fields = Value[LBPos + 1:]
Fields = StripComments(Fields)
@@ -997,13 +1012,13 @@ def GetFinalTypeValue(Type, FieldName, TypedefDict, SUDict):
Type = GetDataTypeFromModifier(Field[0:Index])
return Type.strip()
else:
- # For the condition that the field in struct is an array with [] sufixes...
+ # For the condition that the field in struct is an array with [] sufixes...
if not Field[Index + len(FieldName)].isalnum():
Type = GetDataTypeFromModifier(Field[0:Index])
return Type.strip()
-
+
return None
-
+
def GetRealType(Type, TypedefDict, TargetType = None):
if TargetType != None and Type == TargetType:
return Type
@@ -1017,7 +1032,7 @@ def GetTypeInfo(RefList, Modifier, FullFileName, TargetType = None):
TypedefDict = GetTypedefDict(FullFileName)
SUDict = GetSUDict(FullFileName)
Type = GetDataTypeFromModifier(Modifier).replace('*', '').strip()
-
+
Type = Type.split()[-1]
Index = 0
while Index < len(RefList):
@@ -1034,7 +1049,7 @@ def GetTypeInfo(RefList, Modifier, FullFileName, TargetType = None):
if Type.find('*') != -1 and Index == len(RefList)-1:
return Type
Type = FromType.split()[0]
-
+
Index += 1
Type = GetRealType(Type, TypedefDict, TargetType)
@@ -1042,14 +1057,14 @@ def GetTypeInfo(RefList, Modifier, FullFileName, TargetType = None):
return Type
def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall = False, TargetType = None, StarList = None):
-
+
PredVar = PredVarList[0]
FileID = GetTableID(FullFileName)
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
# search variable in include files
-
+
# it is a function call, search function declarations and definitions
if IsFuncCall:
SqlStatement = """ select Modifier, ID
@@ -1057,65 +1072,65 @@ def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall = False, Target
where Model = %d and Value = \'%s\'
""" % (FileTable, DataClass.MODEL_IDENTIFIER_FUNCTION_DECLARATION, PredVar)
ResultSet = Db.TblFile.Exec(SqlStatement)
-
- for Result in ResultSet:
+
+ for Result in ResultSet:
Type = GetDataTypeFromModifier(Result[0]).split()[-1]
TypedefDict = GetTypedefDict(FullFileName)
Type = GetRealType(Type, TypedefDict, TargetType)
return Type
-
+
IncludeFileList = GetAllIncludeFiles(FullFileName)
for F in IncludeFileList:
FileID = GetTableID(F)
if FileID < 0:
continue
-
+
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, ID
from %s
where Model = %d and Value = \'%s\'
""" % (FileTable, DataClass.MODEL_IDENTIFIER_FUNCTION_DECLARATION, PredVar)
ResultSet = Db.TblFile.Exec(SqlStatement)
-
+
for Result in ResultSet:
Type = GetDataTypeFromModifier(Result[0]).split()[-1]
TypedefDict = GetTypedefDict(FullFileName)
Type = GetRealType(Type, TypedefDict, TargetType)
return Type
-
+
FileID = GetTableID(FullFileName)
SqlStatement = """ select Modifier, ID
from Function
where BelongsToFile = %d and Name = \'%s\'
""" % (FileID, PredVar)
ResultSet = Db.TblFile.Exec(SqlStatement)
-
- for Result in ResultSet:
+
+ for Result in ResultSet:
Type = GetDataTypeFromModifier(Result[0]).split()[-1]
TypedefDict = GetTypedefDict(FullFileName)
Type = GetRealType(Type, TypedefDict, TargetType)
return Type
-
+
for F in IncludeFileList:
FileID = GetTableID(F)
if FileID < 0:
continue
-
+
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, ID
from Function
where BelongsToFile = %d and Name = \'%s\'
""" % (FileID, PredVar)
ResultSet = Db.TblFile.Exec(SqlStatement)
-
+
for Result in ResultSet:
Type = GetDataTypeFromModifier(Result[0]).split()[-1]
TypedefDict = GetTypedefDict(FullFileName)
Type = GetRealType(Type, TypedefDict, TargetType)
return Type
-
+
return None
-
+
# really variable, search local variable first
SqlStatement = """ select Modifier, ID
from %s
@@ -1141,7 +1156,7 @@ def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall = False, Target
TypedefDict = GetTypedefDict(FullFileName)
Type = GetRealType(Type, TypedefDict, TargetType)
return Type
-
+
# search function parameters second
ParamList = GetParamList(FuncRecord[2])
for Param in ParamList:
@@ -1162,7 +1177,7 @@ def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall = False, Target
TypedefDict = GetTypedefDict(FullFileName)
Type = GetRealType(Type, TypedefDict, TargetType)
return Type
-
+
# search global variable next
SqlStatement = """ select Modifier, ID
from %s
@@ -1187,13 +1202,13 @@ def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall = False, Target
TypedefDict = GetTypedefDict(FullFileName)
Type = GetRealType(Type, TypedefDict, TargetType)
return Type
-
+
IncludeFileList = GetAllIncludeFiles(FullFileName)
for F in IncludeFileList:
FileID = GetTableID(F)
if FileID < 0:
continue
-
+
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, ID
from %s
@@ -1219,16 +1234,26 @@ def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall = False, Target
Type = GetRealType(Type, TypedefDict, TargetType)
return Type
+def GetTypeFromArray(Type, Var):
+ Count = Var.count('[')
+
+ while Count > 0:
+ Type = Type.strip()
+ Type = Type.rstrip('*')
+ Count = Count - 1
+
+ return Type
+
def CheckFuncLayoutReturnType(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
- SqlStatement = """ select Modifier, ID, StartLine, StartColumn, EndLine, Value
+ SqlStatement = """ select Modifier, ID, StartLine, StartColumn, EndLine, Value
from %s
where Model = %d
""" % (FileTable, DataClass.MODEL_IDENTIFIER_FUNCTION_DECLARATION)
@@ -1242,10 +1267,10 @@ def CheckFuncLayoutReturnType(FullFileName):
Index = Result[0].find(TypeStart)
if Index != 0 or Result[3] != 0:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, '[%s] Return Type should appear at the start of line' % FuncName, FileTable, Result[1])
-
+
if Result[2] == Result[4]:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, '[%s] Return Type should appear on its own line' % FuncName, FileTable, Result[1])
-
+
SqlStatement = """ select Modifier, ID, StartLine, StartColumn, FunNameStartLine, Name
from Function
where BelongsToFile = %d
@@ -1260,17 +1285,17 @@ def CheckFuncLayoutReturnType(FullFileName):
Index = Result[0].find(ReturnType)
if Index != 0 or Result[3] != 0:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, '[%s] Return Type should appear at the start of line' % FuncName, 'Function', Result[1])
-
+
if Result[2] == Result[4]:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, '[%s] Return Type should appear on its own line' % FuncName, 'Function', Result[1])
-
+
def CheckFuncLayoutModifier(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, ID
@@ -1286,7 +1311,7 @@ def CheckFuncLayoutModifier(FullFileName):
Index = Result[0].find(TypeStart)
if Index != 0:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_OPTIONAL_FUNCTIONAL_MODIFIER, '', FileTable, Result[1])
-
+
SqlStatement = """ select Modifier, ID
from Function
where BelongsToFile = %d
@@ -1309,7 +1334,7 @@ def CheckFuncLayoutName(FullFileName):
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Name, ID, EndColumn, Value
@@ -1331,14 +1356,14 @@ def CheckFuncLayoutName(FullFileName):
if Param.StartLine <= StartLine:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_NAME, 'Parameter %s should be in its own line.' % Param.Name, FileTable, Result[1])
if Param.StartLine - StartLine > 1:
- PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_NAME, 'Empty line appears before Parameter %s.' % Param.Name, FileTable, Result[1])
+ PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_NAME, 'Empty line appears before Parameter %s.' % Param.Name, FileTable, Result[1])
if not Pattern.match(Param.Name) and not Param.Name in ParamIgnoreList and not EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, Param.Name):
PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Parameter [%s] NOT follow naming convention.' % Param.Name, FileTable, Result[1])
StartLine = Param.StartLine
-
+
if not Result[0].endswith('\n )') and not Result[0].endswith('\r )'):
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_NAME, '\')\' should be on a new line and indented two spaces', FileTable, Result[1])
-
+
SqlStatement = """ select Modifier, ID, FunNameStartColumn, Name
from Function
where BelongsToFile = %d
@@ -1367,11 +1392,11 @@ def CheckFuncLayoutName(FullFileName):
def CheckFuncLayoutPrototype(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
FileTable = 'Identifier' + str(FileID)
Db = GetDB()
SqlStatement = """ select Modifier, Header, Name, ID
@@ -1381,11 +1406,11 @@ def CheckFuncLayoutPrototype(FullFileName):
ResultSet = Db.TblFile.Exec(SqlStatement)
if len(ResultSet) == 0:
return ErrorMsgList
-
+
FuncDefList = []
for Result in ResultSet:
FuncDefList.append(Result)
-
+
SqlStatement = """ select Modifier, Name, ID
from %s
where Model = %d
@@ -1394,7 +1419,7 @@ def CheckFuncLayoutPrototype(FullFileName):
FuncDeclList = []
for Result in ResultSet:
FuncDeclList.append(Result)
-
+
UndeclFuncList = []
for FuncDef in FuncDefList:
FuncName = FuncDef[2].strip()
@@ -1409,26 +1434,26 @@ def CheckFuncLayoutPrototype(FullFileName):
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE, 'Function [%s] modifier different with prototype.' % FuncName, 'Function', FuncDef[3])
ParamListOfDef = GetParamList(FuncDefHeader)
ParamListOfDecl = GetParamList(FuncDecl[1])
- if len(ParamListOfDef) != len(ParamListOfDecl):
- PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE, 'Parameter number different.', 'Function', FuncDef[3])
+ if len(ParamListOfDef) != len(ParamListOfDecl) and not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2, FuncName):
+ PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2, 'Parameter number different in function [%s].' % FuncName, 'Function', FuncDef[3])
break
Index = 0
while Index < len(ParamListOfDef):
- if DiffModifier(ParamListOfDef[Index].Modifier, ParamListOfDecl[Index].Modifier):
- PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE, 'Parameter %s has different modifier with prototype.' % ParamListOfDef[Index].Name, 'Function', FuncDef[3])
+ if DiffModifier(ParamListOfDef[Index].Modifier, ParamListOfDecl[Index].Modifier) and not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3, FuncName):
+ PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3, 'Parameter %s has different modifier with prototype in function [%s].' % (ParamListOfDef[Index].Name, FuncName), 'Function', FuncDef[3])
Index += 1
break
else:
UndeclFuncList.append(FuncDef)
-
+
IncludeFileList = GetAllIncludeFiles(FullFileName)
FuncDeclList = []
for F in IncludeFileList:
FileID = GetTableID(F, ErrorMsgList)
if FileID < 0:
continue
-
+
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, Name, ID
from %s
@@ -1438,7 +1463,7 @@ def CheckFuncLayoutPrototype(FullFileName):
for Result in ResultSet:
FuncDeclList.append(Result)
-
+
for FuncDef in UndeclFuncList:
FuncName = FuncDef[2].strip()
FuncModifier = FuncDef[0]
@@ -1452,24 +1477,24 @@ def CheckFuncLayoutPrototype(FullFileName):
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE, 'Function [%s] modifier different with prototype.' % FuncName, 'Function', FuncDef[3])
ParamListOfDef = GetParamList(FuncDefHeader)
ParamListOfDecl = GetParamList(FuncDecl[1])
- if len(ParamListOfDef) != len(ParamListOfDecl):
- PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE, 'Parameter number different.', 'Function', FuncDef[3])
+ if len(ParamListOfDef) != len(ParamListOfDecl) and not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2, FuncName):
+ PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2, 'Parameter number different in function [%s].' % FuncName, 'Function', FuncDef[3])
break
Index = 0
while Index < len(ParamListOfDef):
- if DiffModifier(ParamListOfDef[Index].Modifier, ParamListOfDecl[Index].Modifier):
- PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE, 'Parameter %s has different modifier with prototype.' % ParamListOfDef[Index].Name, 'Function', FuncDef[3])
+ if DiffModifier(ParamListOfDef[Index].Modifier, ParamListOfDecl[Index].Modifier) and not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3, FuncName):
+ PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3, 'Parameter %s has different modifier with prototype in function [%s].' % (ParamListOfDef[Index].Name, FuncName), 'Function', FuncDef[3])
Index += 1
break
-
+
def CheckFuncLayoutBody(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
FileTable = 'Identifier' + str(FileID)
Db = GetDB()
SqlStatement = """ select BodyStartColumn, EndColumn, ID
@@ -1487,11 +1512,11 @@ def CheckFuncLayoutBody(FullFileName):
def CheckFuncLayoutLocalVariable(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select ID
@@ -1504,7 +1529,7 @@ def CheckFuncLayoutLocalVariable(FullFileName):
FL = []
for Result in ResultSet:
FL.append(Result)
-
+
for F in FL:
SqlStatement = """ select Name, Value, ID
from %s
@@ -1513,21 +1538,21 @@ def CheckFuncLayoutLocalVariable(FullFileName):
ResultSet = Db.TblFile.Exec(SqlStatement)
if len(ResultSet) == 0:
continue
-
+
for Result in ResultSet:
if len(Result[1]) > 0:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE, 'Variable Name: %s' % Result[0], FileTable, Result[2])
-
+
def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId):
ErrMsgList = []
# Member variable format pattern.
Pattern = re.compile(r'^[A-Z]+\S*[a-z]\S*$')
-
+
LBPos = Value.find('{')
RBPos = Value.rfind('}')
if LBPos == -1 or RBPos == -1:
return ErrMsgList
-
+
Fields = Value[LBPos + 1 : RBPos]
Fields = StripComments(Fields).strip()
NestPos = Fields.find ('struct')
@@ -1548,7 +1573,7 @@ def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId):
if not EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, Name):
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, 'Nested enum in [%s].' % (Name), FileTable, TdId)
return ErrMsgList
-
+
if ModelId == DataClass.MODEL_IDENTIFIER_ENUMERATE:
FieldsList = Fields.split(',')
# deal with enum is pre-assigned a value by function call ( , , , ...)
@@ -1557,34 +1582,34 @@ def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId):
RemoveCurrentElement = False
while Index < len(FieldsList):
Field = FieldsList[Index]
-
+
if Field.find('(') != -1:
QuoteCount += 1
RemoveCurrentElement = True
Index += 1
continue
-
+
if Field.find(')') != -1 and QuoteCount > 0:
QuoteCount -= 1
- if RemoveCurrentElement:
+ if RemoveCurrentElement:
FieldsList.remove(Field)
if QuoteCount == 0:
RemoveCurrentElement = False
continue
-
+
if QuoteCount == 0:
RemoveCurrentElement = False
-
+
Index += 1
else:
FieldsList = Fields.split(';')
-
+
for Field in FieldsList:
Field = Field.strip()
if Field == '':
continue
- # For the condition that the field in struct is an array with [] sufixes...
+ # For the condition that the field in struct is an array with [] sufixes...
if Field[-1] == ']':
LBPos = Field.find('[')
Field = Field[0:LBPos]
@@ -1592,26 +1617,26 @@ def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId):
if Field.find(':') != -1:
ColonPos = Field.find(':')
Field = Field[0:ColonPos]
-
+
Field = Field.strip()
if Field == '':
continue
# Enum could directly assign value to variable
Field = Field.split('=')[0].strip()
- TokenList = Field.split()
+ TokenList = Field.split()
# Remove pointers before variable
if not Pattern.match(TokenList[-1].lstrip('*')):
ErrMsgList.append(TokenList[-1].lstrip('*'))
-
+
return ErrMsgList
def CheckDeclTypedefFormat(FullFileName, ModelId):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Name, StartLine, EndLine, ID, Value
@@ -1622,7 +1647,7 @@ def CheckDeclTypedefFormat(FullFileName, ModelId):
ResultList = []
for Result in ResultSet:
ResultList.append(Result)
-
+
ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_ALL
if ModelId == DataClass.MODEL_IDENTIFIER_STRUCTURE:
ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_STRUCTURE_DECLARATION
@@ -1630,7 +1655,7 @@ def CheckDeclTypedefFormat(FullFileName, ModelId):
ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_ENUMERATED_TYPE
elif ModelId == DataClass.MODEL_IDENTIFIER_UNION:
ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_UNION_TYPE
-
+
SqlStatement = """ select Modifier, Name, Value, StartLine, EndLine, ID
from %s
where Model = %d
@@ -1651,7 +1676,7 @@ def CheckDeclTypedefFormat(FullFileName, ModelId):
ValueModelId = DataClass.MODEL_IDENTIFIER_UNION
else:
continue
-
+
if ValueModelId != ModelId:
continue
# Check member variable format.
@@ -1660,7 +1685,7 @@ def CheckDeclTypedefFormat(FullFileName, ModelId):
if EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, Name+'.'+ErrMsg):
continue
PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Member variable [%s] NOT follow naming convention.' % (Name+'.'+ErrMsg), FileTable, Td[5])
-
+
# First check in current file to see whether struct/union/enum is typedef-ed.
UntypedefedList = []
for Result in ResultList:
@@ -1675,7 +1700,7 @@ def CheckDeclTypedefFormat(FullFileName, ModelId):
ValueModelId = DataClass.MODEL_IDENTIFIER_UNION
else:
continue
-
+
if ValueModelId != ModelId:
continue
ErrMsgList = CheckMemberVariableFormat(Name, Value, FileTable, Result[3], ModelId)
@@ -1699,21 +1724,21 @@ def CheckDeclTypedefFormat(FullFileName, ModelId):
PrintErrorMsg(ErrorType, 'Typedef should be UPPER case', FileTable, Td[5])
if Found:
break
-
+
if not Found:
UntypedefedList.append(Result)
continue
-
+
if len(UntypedefedList) == 0:
return
-
+
IncludeFileList = GetAllIncludeFiles(FullFileName)
TdList = []
for F in IncludeFileList:
FileID = GetTableID(F, ErrorMsgList)
if FileID < 0:
continue
-
+
IncludeFileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, Name, Value, StartLine, EndLine, ID
from %s
@@ -1721,13 +1746,13 @@ def CheckDeclTypedefFormat(FullFileName, ModelId):
""" % (IncludeFileTable, DataClass.MODEL_IDENTIFIER_TYPEDEF)
ResultSet = Db.TblFile.Exec(SqlStatement)
TdList.extend(ResultSet)
-
+
for Result in UntypedefedList:
-
+
# Check whether it is typedefed.
Found = False
for Td in TdList:
-
+
if len(Td[0]) > 0:
continue
if Result[1] >= Td[3] and Td[4] >= Result[2]:
@@ -1740,27 +1765,27 @@ def CheckDeclTypedefFormat(FullFileName, ModelId):
PrintErrorMsg(ErrorType, 'Typedef should be UPPER case', FileTable, Td[5])
if Found:
break
-
+
if not Found:
PrintErrorMsg(ErrorType, 'No Typedef for %s' % Result[0], FileTable, Result[3])
continue
-
+
def CheckDeclStructTypedef(FullFileName):
CheckDeclTypedefFormat(FullFileName, DataClass.MODEL_IDENTIFIER_STRUCTURE)
def CheckDeclEnumTypedef(FullFileName):
CheckDeclTypedefFormat(FullFileName, DataClass.MODEL_IDENTIFIER_ENUMERATE)
-
+
def CheckDeclUnionTypedef(FullFileName):
CheckDeclTypedefFormat(FullFileName, DataClass.MODEL_IDENTIFIER_UNION)
def CheckDeclArgModifier(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, Name, ID
@@ -1775,7 +1800,7 @@ def CheckDeclArgModifier(FullFileName):
if PatternInModifier(Result[0], Modifier) and len(Result[0]) < MAX_MODIFIER_LENGTH:
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_IN_OUT_MODIFIER, 'Variable Modifier %s' % Result[0], FileTable, Result[2])
break
-
+
SqlStatement = """ select Modifier, Name, ID
from %s
where Model = %d
@@ -1786,7 +1811,7 @@ def CheckDeclArgModifier(FullFileName):
if PatternInModifier(Result[0], Modifier):
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_IN_OUT_MODIFIER, 'Return Type Modifier %s' % Result[0], FileTable, Result[2])
break
-
+
SqlStatement = """ select Modifier, Header, ID
from Function
where BelongsToFile = %d
@@ -1800,11 +1825,11 @@ def CheckDeclArgModifier(FullFileName):
def CheckDeclNoUseCType(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Modifier, Name, ID
@@ -1818,7 +1843,7 @@ def CheckDeclNoUseCType(FullFileName):
if PatternInModifier(Result[0], Type):
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, 'Variable type %s' % Type, FileTable, Result[2])
break
-
+
SqlStatement = """ select Modifier, Name, ID, Value
from %s
where Model = %d
@@ -1832,11 +1857,11 @@ def CheckDeclNoUseCType(FullFileName):
for Type in CTypeTuple:
if PatternInModifier(Result[0], Type):
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, '%s Return type %s' % (FuncName, Result[0]), FileTable, Result[2])
-
+
for Param in ParamList:
if PatternInModifier(Param.Modifier, Type):
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, 'Parameter %s' % Param.Name, FileTable, Result[2])
-
+
SqlStatement = """ select Modifier, Header, ID, Name
from Function
where BelongsToFile = %d
@@ -1850,22 +1875,22 @@ def CheckDeclNoUseCType(FullFileName):
for Type in CTypeTuple:
if PatternInModifier(Result[0], Type):
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, '[%s] Return type %s' % (FuncName, Result[0]), FileTable, Result[2])
-
+
for Param in ParamList:
if PatternInModifier(Param.Modifier, Type):
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, 'Parameter %s' % Param.Name, FileTable, Result[2])
-
+
def CheckPointerNullComparison(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
# cache the found function return type to accelerate later checking in this file.
FuncReturnTypeDict = {}
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value, StartLine, ID
@@ -1878,7 +1903,7 @@ def CheckPointerNullComparison(FullFileName):
PSL = []
for Result in ResultSet:
PSL.append([Result[0], Result[1], Result[2]])
-
+
SqlStatement = """ select BodyStartLine, EndLine, Header, Modifier, ID
from Function
where BelongsToFile = %d
@@ -1887,13 +1912,13 @@ def CheckPointerNullComparison(FullFileName):
FL = []
for Result in ResultSet:
FL.append([Result[0], Result[1], Result[2], Result[3], Result[4]])
-
+
p = GetFuncDeclPattern()
for Str in PSL:
FuncRecord = GetFuncContainsPE(Str[1], FL)
if FuncRecord == None:
continue
-
+
for Exp in GetPredicateListFromPredicateExpStr(Str[0]):
PredInfo = SplitPredicateStr(Exp)
if PredInfo[1] == None:
@@ -1906,9 +1931,9 @@ def CheckPointerNullComparison(FullFileName):
PredVarStr = PredVarStr[0:PredVarStr.find('(')]
SearchInCache = True
# Only direct function call using IsFuncCall branch. Multi-level ref. function call is considered a variable.
- if TmpStr.startswith(PredVarStr):
+ if TmpStr.startswith(PredVarStr):
IsFuncCall = True
-
+
if PredVarStr.strip() in IgnoredKeywordList:
continue
StarList = []
@@ -1922,28 +1947,29 @@ def CheckPointerNullComparison(FullFileName):
if Type.find('*') != -1:
PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_COMPARISON_NULL_TYPE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
continue
-
+
if PredVarStr in FuncReturnTypeDict:
continue
-
+
Type = GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall, None, StarList)
if SearchInCache:
FuncReturnTypeDict[PredVarStr] = Type
if Type == None:
continue
+ Type = GetTypeFromArray(Type, PredVarStr)
if Type.find('*') != -1:
PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_COMPARISON_NULL_TYPE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
def CheckNonBooleanValueComparison(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
# cache the found function return type to accelerate later checking in this file.
FuncReturnTypeDict = {}
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value, StartLine, ID
@@ -1956,7 +1982,7 @@ def CheckNonBooleanValueComparison(FullFileName):
PSL = []
for Result in ResultSet:
PSL.append([Result[0], Result[1], Result[2]])
-
+
SqlStatement = """ select BodyStartLine, EndLine, Header, Modifier, ID
from Function
where BelongsToFile = %d
@@ -1965,13 +1991,13 @@ def CheckNonBooleanValueComparison(FullFileName):
FL = []
for Result in ResultSet:
FL.append([Result[0], Result[1], Result[2], Result[3], Result[4]])
-
+
p = GetFuncDeclPattern()
for Str in PSL:
FuncRecord = GetFuncContainsPE(Str[1], FL)
if FuncRecord == None:
continue
-
+
for Exp in GetPredicateListFromPredicateExpStr(Str[0]):
# if p.match(Exp):
# continue
@@ -1986,9 +2012,9 @@ def CheckNonBooleanValueComparison(FullFileName):
PredVarStr = PredVarStr[0:PredVarStr.find('(')]
SearchInCache = True
# Only direct function call using IsFuncCall branch. Multi-level ref. function call is considered a variable.
- if TmpStr.startswith(PredVarStr):
+ if TmpStr.startswith(PredVarStr):
IsFuncCall = True
-
+
if PredVarStr.strip() in IgnoredKeywordList:
continue
StarList = []
@@ -1996,17 +2022,17 @@ def CheckNonBooleanValueComparison(FullFileName):
# No variable found, maybe value first? like (0 == VarName)
if len(PredVarList) == 0:
continue
-
+
if SearchInCache:
Type = FuncReturnTypeDict.get(PredVarStr)
if Type != None:
if Type.find('BOOLEAN') == -1:
PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_NO_BOOLEAN_OPERATOR, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
continue
-
+
if PredVarStr in FuncReturnTypeDict:
continue
-
+
Type = GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall, 'BOOLEAN', StarList)
if SearchInCache:
FuncReturnTypeDict[PredVarStr] = Type
@@ -2014,18 +2040,18 @@ def CheckNonBooleanValueComparison(FullFileName):
continue
if Type.find('BOOLEAN') == -1:
PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_NO_BOOLEAN_OPERATOR, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
-
+
def CheckBooleanValueComparison(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
# cache the found function return type to accelerate later checking in this file.
FuncReturnTypeDict = {}
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value, StartLine, ID
@@ -2038,7 +2064,7 @@ def CheckBooleanValueComparison(FullFileName):
PSL = []
for Result in ResultSet:
PSL.append([Result[0], Result[1], Result[2]])
-
+
SqlStatement = """ select BodyStartLine, EndLine, Header, Modifier, ID
from Function
where BelongsToFile = %d
@@ -2047,13 +2073,13 @@ def CheckBooleanValueComparison(FullFileName):
FL = []
for Result in ResultSet:
FL.append([Result[0], Result[1], Result[2], Result[3], Result[4]])
-
+
p = GetFuncDeclPattern()
for Str in PSL:
FuncRecord = GetFuncContainsPE(Str[1], FL)
if FuncRecord == None:
continue
-
+
for Exp in GetPredicateListFromPredicateExpStr(Str[0]):
PredInfo = SplitPredicateStr(Exp)
if PredInfo[1] in ('==', '!=') and PredInfo[0][1] in ('TRUE', 'FALSE'):
@@ -2066,9 +2092,9 @@ def CheckBooleanValueComparison(FullFileName):
PredVarStr = PredVarStr[0:PredVarStr.find('(')]
SearchInCache = True
# Only direct function call using IsFuncCall branch. Multi-level ref. function call is considered a variable.
- if TmpStr.startswith(PredVarStr):
+ if TmpStr.startswith(PredVarStr):
IsFuncCall = True
-
+
if PredVarStr.strip() in IgnoredKeywordList:
continue
StarList = []
@@ -2076,17 +2102,17 @@ def CheckBooleanValueComparison(FullFileName):
# No variable found, maybe value first? like (0 == VarName)
if len(PredVarList) == 0:
continue
-
+
if SearchInCache:
Type = FuncReturnTypeDict.get(PredVarStr)
if Type != None:
if Type.find('BOOLEAN') != -1:
PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_BOOLEAN_VALUE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
continue
-
+
if PredVarStr in FuncReturnTypeDict:
continue
-
+
Type = GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall, 'BOOLEAN', StarList)
if SearchInCache:
FuncReturnTypeDict[PredVarStr] = Type
@@ -2094,15 +2120,15 @@ def CheckBooleanValueComparison(FullFileName):
continue
if Type.find('BOOLEAN') != -1:
PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_BOOLEAN_VALUE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
-
+
def CheckHeaderFileData(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select ID, Modifier
@@ -2113,7 +2139,7 @@ def CheckHeaderFileData(FullFileName):
for Result in ResultSet:
if not Result[1].startswith('extern'):
PrintErrorMsg(ERROR_INCLUDE_FILE_CHECK_DATA, 'Variable definition appears in header file', FileTable, Result[0])
-
+
SqlStatement = """ select ID
from Function
where BelongsToFile = %d
@@ -2126,11 +2152,11 @@ def CheckHeaderFileData(FullFileName):
def CheckHeaderFileIfndef(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value, StartLine
@@ -2151,7 +2177,7 @@ def CheckHeaderFileIfndef(FullFileName):
if not Result[0].startswith('/*') and not Result[0].startswith('//'):
PrintErrorMsg(ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_2, '', 'File', FileID)
break
-
+
SqlStatement = """ select Value
from %s
where StartLine > (select max(EndLine) from %s where Model = %d)
@@ -2164,11 +2190,11 @@ def CheckHeaderFileIfndef(FullFileName):
def CheckDoxygenCommand(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value, ID
@@ -2198,17 +2224,17 @@ def CheckDoxygenCommand(FullFileName):
RealCmd = Part[1:Index]
if RealCmd not in DoxygenCommandList:
PrintErrorMsg(ERROR_DOXYGEN_CHECK_COMMAND, 'Unknown doxygen command %s' % Part, FileTable, Result[1])
-
-
+
+
def CheckDoxygenTripleForwardSlash(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
-
+
SqlStatement = """ select ID, BodyStartLine, BodyStartColumn, EndLine, EndColumn
from Function
where BelongsToFile = %d
@@ -2216,17 +2242,17 @@ def CheckDoxygenTripleForwardSlash(FullFileName):
ResultSet = Db.TblFile.Exec(SqlStatement)
if len(ResultSet) == 0:
return
-
- FuncDefSet = []
+
+ FuncDefSet = []
for Result in ResultSet:
FuncDefSet.append(Result)
-
-
+
+
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value, ID, StartLine, StartColumn, EndLine, EndColumn
from %s
- where Model = %d
-
+ where Model = %d
+
""" % (FileTable, DataClass.MODEL_IDENTIFIER_COMMENT)
ResultSet = Db.TblFile.Exec(SqlStatement)
CommentSet = []
@@ -2235,8 +2261,8 @@ def CheckDoxygenTripleForwardSlash(FullFileName):
CommentSet.append(Result)
except:
print 'Unrecognized chars in comment of file %s', FullFileName
-
-
+
+
for Result in CommentSet:
CommentStr = Result[0]
StartLine = Result[2]
@@ -2245,7 +2271,7 @@ def CheckDoxygenTripleForwardSlash(FullFileName):
EndColumn = Result[5]
if not CommentStr.startswith('///<'):
continue
-
+
Found = False
for FuncDef in FuncDefSet:
if StartLine == FuncDef[1] and StartColumn > FuncDef[2] and EndLine == FuncDef[3] and EndColumn < FuncDef[4]:
@@ -2266,11 +2292,11 @@ def CheckDoxygenTripleForwardSlash(FullFileName):
def CheckFileHeaderDoxygenComments(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value, ID
@@ -2281,7 +2307,7 @@ def CheckFileHeaderDoxygenComments(FullFileName):
if len(ResultSet) == 0:
PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'No Comment appear at the very beginning of file.', 'File', FileID)
return ErrorMsgList
-
+
for Result in ResultSet:
CommentStr = Result[0]
if not CommentStr.startswith('/** @file'):
@@ -2293,18 +2319,18 @@ def CheckFileHeaderDoxygenComments(FullFileName):
def CheckFuncHeaderDoxygenComments(FullFileName):
ErrorMsgList = []
-
+
FileID = GetTableID(FullFileName, ErrorMsgList)
if FileID < 0:
return ErrorMsgList
-
+
Db = GetDB()
FileTable = 'Identifier' + str(FileID)
SqlStatement = """ select Value, StartLine, EndLine, ID
from %s
where Model = %d
""" % (FileTable, DataClass.MODEL_IDENTIFIER_COMMENT)
-
+
ResultSet = Db.TblFile.Exec(SqlStatement)
CommentSet = []
try:
@@ -2312,7 +2338,7 @@ def CheckFuncHeaderDoxygenComments(FullFileName):
CommentSet.append(Result)
except:
print 'Unrecognized chars in comment of file %s', FullFileName
-
+
# Func Decl check
SqlStatement = """ select Modifier, Name, StartLine, ID, Value
from %s
@@ -2329,13 +2355,13 @@ def CheckFuncHeaderDoxygenComments(FullFileName):
continue
ErrorMsgList.append('Line %d :Function %s has NO comment immediately preceding it.' % (Result[2], Result[1]))
PrintErrorMsg(ERROR_HEADER_CHECK_FUNCTION, 'Function [%s] has NO comment immediately preceding it.' % (FuncName), FileTable, Result[3])
-
+
# Func Def check
SqlStatement = """ select Value, StartLine, EndLine, ID
from %s
where Model = %d
""" % (FileTable, DataClass.MODEL_IDENTIFIER_FUNCTION_HEADER)
-
+
ResultSet = Db.TblFile.Exec(SqlStatement)
CommentSet = []
try:
@@ -2343,7 +2369,7 @@ def CheckFuncHeaderDoxygenComments(FullFileName):
CommentSet.append(Result)
except:
print 'Unrecognized chars in comment of file %s', FullFileName
-
+
SqlStatement = """ select Modifier, Header, StartLine, ID, Name
from Function
where BelongsToFile = %d
@@ -2376,9 +2402,9 @@ def GetDoxygenStrFromComment(Str):
while i < len(ParamTagList):
DoxygenStrList.append('@param' + ParamTagList[i])
i += 1
-
+
Str = ParamTagList[0]
-
+
RetvalTagList = ParamTagList[-1].split('@retval')
if len(RetvalTagList) > 1:
if len(ParamTagList) > 1:
@@ -2387,7 +2413,7 @@ def GetDoxygenStrFromComment(Str):
while i < len(RetvalTagList):
DoxygenStrList.append('@retval' + RetvalTagList[i])
i += 1
-
+
ReturnTagList = RetvalTagList[-1].split('@return')
if len(ReturnTagList) > 1:
if len(RetvalTagList) > 1:
@@ -2398,12 +2424,12 @@ def GetDoxygenStrFromComment(Str):
while i < len(ReturnTagList):
DoxygenStrList.append('@return' + ReturnTagList[i])
i += 1
-
+
if len(DoxygenStrList) > 0:
DoxygenStrList[-1] = DoxygenStrList[-1].rstrip('--*/')
-
+
return DoxygenStrList
-
+
def CheckGeneralDoxygenCommentLayout(Str, StartLine, ErrorMsgList, CommentId = -1, TableName = ''):
#/** --*/ @retval after @param
if not Str.startswith('/**'):
@@ -2417,10 +2443,10 @@ def CheckGeneralDoxygenCommentLayout(Str, StartLine, ErrorMsgList, CommentId = -
if (FirstRetvalIndex > 0) and (LastParamIndex > 0) and (FirstRetvalIndex < LastParamIndex):
ErrorMsgList.append('Line %d : @retval appear before @param ' % StartLine)
PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'in Comment, @retval appear before @param ', TableName, CommentId)
-
+
def CheckFunctionHeaderConsistentWithDoxygenComment(FuncModifier, FuncHeader, FuncStartLine, CommentStr, CommentStartLine, ErrorMsgList, CommentId = -1, TableName = ''):
-
- ParamList = GetParamList(FuncHeader)
+
+ ParamList = GetParamList(FuncHeader)
CheckGeneralDoxygenCommentLayout(CommentStr, CommentStartLine, ErrorMsgList, CommentId, TableName)
DescriptionStr = CommentStr
DoxygenStrList = GetDoxygenStrFromComment(DescriptionStr)
@@ -2456,32 +2482,32 @@ def CheckFunctionHeaderConsistentWithDoxygenComment(FuncModifier, FuncHeader, Fu
if Part.strip() == 'IN':
InOutStr += 'in'
if Part.strip() == 'OUT':
- if InOutStr != '':
+ if InOutStr != '':
InOutStr += ', out'
else:
InOutStr = 'out'
-
+
if InOutStr != '':
if Tag.find('['+InOutStr+']') == -1:
- ErrorMsgList.append('Line %d : in Comment, \"%s\" does NOT have %s ' % (CommentStartLine, (TagPartList[0] + ' ' +TagPartList[1]).replace('\n', '').replace('\r', ''), '['+InOutStr+']'))
+ ErrorMsgList.append('Line %d : in Comment, \"%s\" does NOT have %s ' % (CommentStartLine, (TagPartList[0] + ' ' +TagPartList[1]).replace('\n', '').replace('\r', ''), '['+InOutStr+']'))
PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'in Comment, \"%s\" does NOT have %s ' % ((TagPartList[0] + ' ' +TagPartList[1]).replace('\n', '').replace('\r', ''), '['+InOutStr+']'), TableName, CommentId)
if Tag.find(ParamName) == -1 and ParamName != 'VOID' and ParamName != 'void':
- ErrorMsgList.append('Line %d : in Comment, \"%s\" does NOT consistent with parameter name %s ' % (CommentStartLine, (TagPartList[0] + ' ' +TagPartList[1]).replace('\n', '').replace('\r', ''), ParamName))
+ ErrorMsgList.append('Line %d : in Comment, \"%s\" does NOT consistent with parameter name %s ' % (CommentStartLine, (TagPartList[0] + ' ' +TagPartList[1]).replace('\n', '').replace('\r', ''), ParamName))
PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'in Comment, \"%s\" does NOT consistent with parameter name %s ' % ((TagPartList[0] + ' ' +TagPartList[1]).replace('\n', '').replace('\r', ''), ParamName), TableName, CommentId)
Index += 1
-
+
if Index < ParamNumber:
ErrorMsgList.append('Line %d : Number of doxygen tags in comment less than number of function parameters' % CommentStartLine)
PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'Number of doxygen tags in comment less than number of function parameters ', TableName, CommentId)
# VOID return type, NOT VOID*. VOID* should be matched with a doxygen tag.
if (FuncModifier.find('VOID') != -1 or FuncModifier.find('void') != -1) and FuncModifier.find('*') == -1:
-
+
# assume we allow a return description tag for void func. return. that's why 'DoxygenTagNumber - 1' is used instead of 'DoxygenTagNumber'
if Index < DoxygenTagNumber - 1 or (Index < DoxygenTagNumber and DoxygenStrList[Index].startswith('@retval')):
ErrorMsgList.append('Line %d : VOID return type need NO doxygen tags in comment' % CommentStartLine)
PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'VOID return type need no doxygen tags in comment ', TableName, CommentId)
else:
- if Index < DoxygenTagNumber and not DoxygenStrList[Index].startswith('@retval') and not DoxygenStrList[Index].startswith('@return'):
+ if Index < DoxygenTagNumber and not DoxygenStrList[Index].startswith('@retval') and not DoxygenStrList[Index].startswith('@return'):
ErrorMsgList.append('Line %d : Number of @param doxygen tags in comment does NOT match number of function parameters' % CommentStartLine)
PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'Number of @param doxygen tags in comment does NOT match number of function parameters ', TableName, CommentId)
else:
@@ -2496,7 +2522,7 @@ if __name__ == '__main__':
# EdkLogger.Initialize()
# EdkLogger.SetLevel(EdkLogger.QUIET)
-# CollectSourceCodeDataIntoDB(sys.argv[1])
+# CollectSourceCodeDataIntoDB(sys.argv[1])
MsgList = CheckFuncHeaderDoxygenComments('C:\\Combo\\R9\\LakeportX64Dev\\FlashDevicePkg\\Library\\SpiFlashChipM25P64\\SpiFlashChipM25P64.c')
for Msg in MsgList:
print Msg
diff --git a/BaseTools/Source/Python/Ecc/exception.xml b/BaseTools/Source/Python/Ecc/exception.xml
index 0dc67527b5..58cb600e46 100644
--- a/BaseTools/Source/Python/Ecc/exception.xml
+++ b/BaseTools/Source/Python/Ecc/exception.xml
@@ -1,4 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
<ExceptionList xmlns="http://www.uefi.org/2008/2.1" xmlns:xsi="http:/www.w3.org/2001/XMLSchema-instance">
+ <Copyright>Copyright (c) 2009 - 2010, Intel Corporation.</Copyright>
+ <License>
+ All rights reserved.
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this distribution.
+ The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES
+ OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ </License>
<Exception>
<KeyWord>__debugbreak</KeyWord>
<ErrorID>4002</ErrorID>
diff --git a/BaseTools/Source/Python/Eot/CLexer.py b/BaseTools/Source/Python/Eot/CLexer.py
new file mode 100644
index 0000000000..947ac4c8e3
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/CLexer.py
@@ -0,0 +1,4947 @@
+# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53
+
+from antlr3 import *
+from antlr3.compat import set, frozenset
+
+## @file
+# The file defines the Lexer for C source files.
+#
+# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.
+# This file is generated by running:
+# java org.antlr.Tool C.g
+#
+# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+#
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at:
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+
+
+# for convenience in actions
+HIDDEN = BaseRecognizer.HIDDEN
+
+# token types
+T114=114
+T115=115
+T116=116
+T117=117
+FloatTypeSuffix=16
+LETTER=11
+T29=29
+T28=28
+T27=27
+T26=26
+T25=25
+EOF=-1
+STRING_LITERAL=9
+FLOATING_POINT_LITERAL=10
+T38=38
+T37=37
+T39=39
+T34=34
+COMMENT=22
+T33=33
+T36=36
+T35=35
+T30=30
+T32=32
+T31=31
+LINE_COMMENT=23
+IntegerTypeSuffix=14
+CHARACTER_LITERAL=8
+T49=49
+T48=48
+T100=100
+T43=43
+T42=42
+T102=102
+T41=41
+T101=101
+T40=40
+T47=47
+T46=46
+T45=45
+T44=44
+T109=109
+T107=107
+T108=108
+T105=105
+WS=19
+T106=106
+T103=103
+T104=104
+T50=50
+LINE_COMMAND=24
+T59=59
+T113=113
+T52=52
+T112=112
+T51=51
+T111=111
+T54=54
+T110=110
+EscapeSequence=12
+DECIMAL_LITERAL=7
+T53=53
+T56=56
+T55=55
+T58=58
+T57=57
+T75=75
+T76=76
+T73=73
+T74=74
+T79=79
+T77=77
+T78=78
+Exponent=15
+HexDigit=13
+T72=72
+T71=71
+T70=70
+T62=62
+T63=63
+T64=64
+T65=65
+T66=66
+T67=67
+T68=68
+T69=69
+IDENTIFIER=4
+UnicodeVocabulary=21
+HEX_LITERAL=5
+T61=61
+T60=60
+T99=99
+T97=97
+BS=20
+T98=98
+T95=95
+T96=96
+OCTAL_LITERAL=6
+T94=94
+Tokens=118
+T93=93
+T92=92
+T91=91
+T90=90
+T88=88
+T89=89
+T84=84
+T85=85
+T86=86
+T87=87
+UnicodeEscape=18
+T81=81
+T80=80
+T83=83
+OctalEscape=17
+T82=82
+
+class CLexer(Lexer):
+
+ grammarFileName = "C.g"
+
+ def __init__(self, input=None):
+ Lexer.__init__(self, input)
+ self.dfa25 = self.DFA25(
+ self, 25,
+ eot = self.DFA25_eot,
+ eof = self.DFA25_eof,
+ min = self.DFA25_min,
+ max = self.DFA25_max,
+ accept = self.DFA25_accept,
+ special = self.DFA25_special,
+ transition = self.DFA25_transition
+ )
+ self.dfa35 = self.DFA35(
+ self, 35,
+ eot = self.DFA35_eot,
+ eof = self.DFA35_eof,
+ min = self.DFA35_min,
+ max = self.DFA35_max,
+ accept = self.DFA35_accept,
+ special = self.DFA35_special,
+ transition = self.DFA35_transition
+ )
+
+
+
+
+
+
+ # $ANTLR start T25
+ def mT25(self, ):
+
+ try:
+ self.type = T25
+
+ # C.g:27:5: ( ';' )
+ # C.g:27:7: ';'
+ self.match(u';')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T25
+
+
+
+ # $ANTLR start T26
+ def mT26(self, ):
+
+ try:
+ self.type = T26
+
+ # C.g:28:5: ( 'typedef' )
+ # C.g:28:7: 'typedef'
+ self.match("typedef")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T26
+
+
+
+ # $ANTLR start T27
+ def mT27(self, ):
+
+ try:
+ self.type = T27
+
+ # C.g:29:5: ( ',' )
+ # C.g:29:7: ','
+ self.match(u',')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T27
+
+
+
+ # $ANTLR start T28
+ def mT28(self, ):
+
+ try:
+ self.type = T28
+
+ # C.g:30:5: ( '=' )
+ # C.g:30:7: '='
+ self.match(u'=')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T28
+
+
+
+ # $ANTLR start T29
+ def mT29(self, ):
+
+ try:
+ self.type = T29
+
+ # C.g:31:5: ( 'extern' )
+ # C.g:31:7: 'extern'
+ self.match("extern")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T29
+
+
+
+ # $ANTLR start T30
+ def mT30(self, ):
+
+ try:
+ self.type = T30
+
+ # C.g:32:5: ( 'static' )
+ # C.g:32:7: 'static'
+ self.match("static")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T30
+
+
+
+ # $ANTLR start T31
+ def mT31(self, ):
+
+ try:
+ self.type = T31
+
+ # C.g:33:5: ( 'auto' )
+ # C.g:33:7: 'auto'
+ self.match("auto")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T31
+
+
+
+ # $ANTLR start T32
+ def mT32(self, ):
+
+ try:
+ self.type = T32
+
+ # C.g:34:5: ( 'register' )
+ # C.g:34:7: 'register'
+ self.match("register")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T32
+
+
+
+ # $ANTLR start T33
+ def mT33(self, ):
+
+ try:
+ self.type = T33
+
+ # C.g:35:5: ( 'STATIC' )
+ # C.g:35:7: 'STATIC'
+ self.match("STATIC")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T33
+
+
+
+ # $ANTLR start T34
+ def mT34(self, ):
+
+ try:
+ self.type = T34
+
+ # C.g:36:5: ( 'void' )
+ # C.g:36:7: 'void'
+ self.match("void")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T34
+
+
+
+ # $ANTLR start T35
+ def mT35(self, ):
+
+ try:
+ self.type = T35
+
+ # C.g:37:5: ( 'char' )
+ # C.g:37:7: 'char'
+ self.match("char")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T35
+
+
+
+ # $ANTLR start T36
+ def mT36(self, ):
+
+ try:
+ self.type = T36
+
+ # C.g:38:5: ( 'short' )
+ # C.g:38:7: 'short'
+ self.match("short")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T36
+
+
+
+ # $ANTLR start T37
+ def mT37(self, ):
+
+ try:
+ self.type = T37
+
+ # C.g:39:5: ( 'int' )
+ # C.g:39:7: 'int'
+ self.match("int")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T37
+
+
+
+ # $ANTLR start T38
+ def mT38(self, ):
+
+ try:
+ self.type = T38
+
+ # C.g:40:5: ( 'long' )
+ # C.g:40:7: 'long'
+ self.match("long")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T38
+
+
+
+ # $ANTLR start T39
+ def mT39(self, ):
+
+ try:
+ self.type = T39
+
+ # C.g:41:5: ( 'float' )
+ # C.g:41:7: 'float'
+ self.match("float")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T39
+
+
+
+ # $ANTLR start T40
+ def mT40(self, ):
+
+ try:
+ self.type = T40
+
+ # C.g:42:5: ( 'double' )
+ # C.g:42:7: 'double'
+ self.match("double")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T40
+
+
+
+ # $ANTLR start T41
+ def mT41(self, ):
+
+ try:
+ self.type = T41
+
+ # C.g:43:5: ( 'signed' )
+ # C.g:43:7: 'signed'
+ self.match("signed")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T41
+
+
+
+ # $ANTLR start T42
+ def mT42(self, ):
+
+ try:
+ self.type = T42
+
+ # C.g:44:5: ( 'unsigned' )
+ # C.g:44:7: 'unsigned'
+ self.match("unsigned")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T42
+
+
+
+ # $ANTLR start T43
+ def mT43(self, ):
+
+ try:
+ self.type = T43
+
+ # C.g:45:5: ( '{' )
+ # C.g:45:7: '{'
+ self.match(u'{')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T43
+
+
+
+ # $ANTLR start T44
+ def mT44(self, ):
+
+ try:
+ self.type = T44
+
+ # C.g:46:5: ( '}' )
+ # C.g:46:7: '}'
+ self.match(u'}')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T44
+
+
+
+ # $ANTLR start T45
+ def mT45(self, ):
+
+ try:
+ self.type = T45
+
+ # C.g:47:5: ( 'struct' )
+ # C.g:47:7: 'struct'
+ self.match("struct")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T45
+
+
+
+ # $ANTLR start T46
+ def mT46(self, ):
+
+ try:
+ self.type = T46
+
+ # C.g:48:5: ( 'union' )
+ # C.g:48:7: 'union'
+ self.match("union")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T46
+
+
+
+ # $ANTLR start T47
+ def mT47(self, ):
+
+ try:
+ self.type = T47
+
+ # C.g:49:5: ( ':' )
+ # C.g:49:7: ':'
+ self.match(u':')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T47
+
+
+
+ # $ANTLR start T48
+ def mT48(self, ):
+
+ try:
+ self.type = T48
+
+ # C.g:50:5: ( 'enum' )
+ # C.g:50:7: 'enum'
+ self.match("enum")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T48
+
+
+
+ # $ANTLR start T49
+ def mT49(self, ):
+
+ try:
+ self.type = T49
+
+ # C.g:51:5: ( 'const' )
+ # C.g:51:7: 'const'
+ self.match("const")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T49
+
+
+
+ # $ANTLR start T50
+ def mT50(self, ):
+
+ try:
+ self.type = T50
+
+ # C.g:52:5: ( 'volatile' )
+ # C.g:52:7: 'volatile'
+ self.match("volatile")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T50
+
+
+
+ # $ANTLR start T51
+ def mT51(self, ):
+
+ try:
+ self.type = T51
+
+ # C.g:53:5: ( 'IN' )
+ # C.g:53:7: 'IN'
+ self.match("IN")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T51
+
+
+
+ # $ANTLR start T52
+ def mT52(self, ):
+
+ try:
+ self.type = T52
+
+ # C.g:54:5: ( 'OUT' )
+ # C.g:54:7: 'OUT'
+ self.match("OUT")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T52
+
+
+
+ # $ANTLR start T53
+ def mT53(self, ):
+
+ try:
+ self.type = T53
+
+ # C.g:55:5: ( 'OPTIONAL' )
+ # C.g:55:7: 'OPTIONAL'
+ self.match("OPTIONAL")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T53
+
+
+
+ # $ANTLR start T54
+ def mT54(self, ):
+
+ try:
+ self.type = T54
+
+ # C.g:56:5: ( 'CONST' )
+ # C.g:56:7: 'CONST'
+ self.match("CONST")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T54
+
+
+
+ # $ANTLR start T55
+ def mT55(self, ):
+
+ try:
+ self.type = T55
+
+ # C.g:57:5: ( 'UNALIGNED' )
+ # C.g:57:7: 'UNALIGNED'
+ self.match("UNALIGNED")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T55
+
+
+
+ # $ANTLR start T56
+ def mT56(self, ):
+
+ try:
+ self.type = T56
+
+ # C.g:58:5: ( 'VOLATILE' )
+ # C.g:58:7: 'VOLATILE'
+ self.match("VOLATILE")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T56
+
+
+
+ # $ANTLR start T57
+ def mT57(self, ):
+
+ try:
+ self.type = T57
+
+ # C.g:59:5: ( 'GLOBAL_REMOVE_IF_UNREFERENCED' )
+ # C.g:59:7: 'GLOBAL_REMOVE_IF_UNREFERENCED'
+ self.match("GLOBAL_REMOVE_IF_UNREFERENCED")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T57
+
+
+
+ # $ANTLR start T58
+ def mT58(self, ):
+
+ try:
+ self.type = T58
+
+ # C.g:60:5: ( 'EFIAPI' )
+ # C.g:60:7: 'EFIAPI'
+ self.match("EFIAPI")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T58
+
+
+
+ # $ANTLR start T59
+ def mT59(self, ):
+
+ try:
+ self.type = T59
+
+ # C.g:61:5: ( 'EFI_BOOTSERVICE' )
+ # C.g:61:7: 'EFI_BOOTSERVICE'
+ self.match("EFI_BOOTSERVICE")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T59
+
+
+
+ # $ANTLR start T60
+ def mT60(self, ):
+
+ try:
+ self.type = T60
+
+ # C.g:62:5: ( 'EFI_RUNTIMESERVICE' )
+ # C.g:62:7: 'EFI_RUNTIMESERVICE'
+ self.match("EFI_RUNTIMESERVICE")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T60
+
+
+
+ # $ANTLR start T61
+ def mT61(self, ):
+
+ try:
+ self.type = T61
+
+ # C.g:63:5: ( 'PACKED' )
+ # C.g:63:7: 'PACKED'
+ self.match("PACKED")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T61
+
+
+
+ # $ANTLR start T62
+ def mT62(self, ):
+
+ try:
+ self.type = T62
+
+ # C.g:64:5: ( '(' )
+ # C.g:64:7: '('
+ self.match(u'(')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T62
+
+
+
+ # $ANTLR start T63
+ def mT63(self, ):
+
+ try:
+ self.type = T63
+
+ # C.g:65:5: ( ')' )
+ # C.g:65:7: ')'
+ self.match(u')')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T63
+
+
+
+ # $ANTLR start T64
+ def mT64(self, ):
+
+ try:
+ self.type = T64
+
+ # C.g:66:5: ( '[' )
+ # C.g:66:7: '['
+ self.match(u'[')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T64
+
+
+
+ # $ANTLR start T65
+ def mT65(self, ):
+
+ try:
+ self.type = T65
+
+ # C.g:67:5: ( ']' )
+ # C.g:67:7: ']'
+ self.match(u']')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T65
+
+
+
+ # $ANTLR start T66
+ def mT66(self, ):
+
+ try:
+ self.type = T66
+
+ # C.g:68:5: ( '*' )
+ # C.g:68:7: '*'
+ self.match(u'*')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T66
+
+
+
+ # $ANTLR start T67
+ def mT67(self, ):
+
+ try:
+ self.type = T67
+
+ # C.g:69:5: ( '...' )
+ # C.g:69:7: '...'
+ self.match("...")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T67
+
+
+
+ # $ANTLR start T68
+ def mT68(self, ):
+
+ try:
+ self.type = T68
+
+ # C.g:70:5: ( '+' )
+ # C.g:70:7: '+'
+ self.match(u'+')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T68
+
+
+
+ # $ANTLR start T69
+ def mT69(self, ):
+
+ try:
+ self.type = T69
+
+ # C.g:71:5: ( '-' )
+ # C.g:71:7: '-'
+ self.match(u'-')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T69
+
+
+
+ # $ANTLR start T70
+ def mT70(self, ):
+
+ try:
+ self.type = T70
+
+ # C.g:72:5: ( '/' )
+ # C.g:72:7: '/'
+ self.match(u'/')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T70
+
+
+
+ # $ANTLR start T71
+ def mT71(self, ):
+
+ try:
+ self.type = T71
+
+ # C.g:73:5: ( '%' )
+ # C.g:73:7: '%'
+ self.match(u'%')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T71
+
+
+
+ # $ANTLR start T72
+ def mT72(self, ):
+
+ try:
+ self.type = T72
+
+ # C.g:74:5: ( '++' )
+ # C.g:74:7: '++'
+ self.match("++")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T72
+
+
+
+ # $ANTLR start T73
+ def mT73(self, ):
+
+ try:
+ self.type = T73
+
+ # C.g:75:5: ( '--' )
+ # C.g:75:7: '--'
+ self.match("--")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T73
+
+
+
+ # $ANTLR start T74
+ def mT74(self, ):
+
+ try:
+ self.type = T74
+
+ # C.g:76:5: ( 'sizeof' )
+ # C.g:76:7: 'sizeof'
+ self.match("sizeof")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T74
+
+
+
+ # $ANTLR start T75
+ def mT75(self, ):
+
+ try:
+ self.type = T75
+
+ # C.g:77:5: ( '.' )
+ # C.g:77:7: '.'
+ self.match(u'.')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T75
+
+
+
+ # $ANTLR start T76
+ def mT76(self, ):
+
+ try:
+ self.type = T76
+
+ # C.g:78:5: ( '->' )
+ # C.g:78:7: '->'
+ self.match("->")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T76
+
+
+
+ # $ANTLR start T77
+ def mT77(self, ):
+
+ try:
+ self.type = T77
+
+ # C.g:79:5: ( '&' )
+ # C.g:79:7: '&'
+ self.match(u'&')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T77
+
+
+
+ # $ANTLR start T78
+ def mT78(self, ):
+
+ try:
+ self.type = T78
+
+ # C.g:80:5: ( '~' )
+ # C.g:80:7: '~'
+ self.match(u'~')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T78
+
+
+
+ # $ANTLR start T79
+ def mT79(self, ):
+
+ try:
+ self.type = T79
+
+ # C.g:81:5: ( '!' )
+ # C.g:81:7: '!'
+ self.match(u'!')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T79
+
+
+
+ # $ANTLR start T80
+ def mT80(self, ):
+
+ try:
+ self.type = T80
+
+ # C.g:82:5: ( '*=' )
+ # C.g:82:7: '*='
+ self.match("*=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T80
+
+
+
+ # $ANTLR start T81
+ def mT81(self, ):
+
+ try:
+ self.type = T81
+
+ # C.g:83:5: ( '/=' )
+ # C.g:83:7: '/='
+ self.match("/=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T81
+
+
+
+ # $ANTLR start T82
+ def mT82(self, ):
+
+ try:
+ self.type = T82
+
+ # C.g:84:5: ( '%=' )
+ # C.g:84:7: '%='
+ self.match("%=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T82
+
+
+
+ # $ANTLR start T83
+ def mT83(self, ):
+
+ try:
+ self.type = T83
+
+ # C.g:85:5: ( '+=' )
+ # C.g:85:7: '+='
+ self.match("+=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T83
+
+
+
+ # $ANTLR start T84
+ def mT84(self, ):
+
+ try:
+ self.type = T84
+
+ # C.g:86:5: ( '-=' )
+ # C.g:86:7: '-='
+ self.match("-=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T84
+
+
+
+ # $ANTLR start T85
+ def mT85(self, ):
+
+ try:
+ self.type = T85
+
+ # C.g:87:5: ( '<<=' )
+ # C.g:87:7: '<<='
+ self.match("<<=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T85
+
+
+
+ # $ANTLR start T86
+ def mT86(self, ):
+
+ try:
+ self.type = T86
+
+ # C.g:88:5: ( '>>=' )
+ # C.g:88:7: '>>='
+ self.match(">>=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T86
+
+
+
+ # $ANTLR start T87
+ def mT87(self, ):
+
+ try:
+ self.type = T87
+
+ # C.g:89:5: ( '&=' )
+ # C.g:89:7: '&='
+ self.match("&=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T87
+
+
+
+ # $ANTLR start T88
+ def mT88(self, ):
+
+ try:
+ self.type = T88
+
+ # C.g:90:5: ( '^=' )
+ # C.g:90:7: '^='
+ self.match("^=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T88
+
+
+
+ # $ANTLR start T89
+ def mT89(self, ):
+
+ try:
+ self.type = T89
+
+ # C.g:91:5: ( '|=' )
+ # C.g:91:7: '|='
+ self.match("|=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T89
+
+
+
+ # $ANTLR start T90
+ def mT90(self, ):
+
+ try:
+ self.type = T90
+
+ # C.g:92:5: ( '?' )
+ # C.g:92:7: '?'
+ self.match(u'?')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T90
+
+
+
+ # $ANTLR start T91
+ def mT91(self, ):
+
+ try:
+ self.type = T91
+
+ # C.g:93:5: ( '||' )
+ # C.g:93:7: '||'
+ self.match("||")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T91
+
+
+
+ # $ANTLR start T92
+ def mT92(self, ):
+
+ try:
+ self.type = T92
+
+ # C.g:94:5: ( '&&' )
+ # C.g:94:7: '&&'
+ self.match("&&")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T92
+
+
+
+ # $ANTLR start T93
+ def mT93(self, ):
+
+ try:
+ self.type = T93
+
+ # C.g:95:5: ( '|' )
+ # C.g:95:7: '|'
+ self.match(u'|')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T93
+
+
+
+ # $ANTLR start T94
+ def mT94(self, ):
+
+ try:
+ self.type = T94
+
+ # C.g:96:5: ( '^' )
+ # C.g:96:7: '^'
+ self.match(u'^')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T94
+
+
+
+ # $ANTLR start T95
+ def mT95(self, ):
+
+ try:
+ self.type = T95
+
+ # C.g:97:5: ( '==' )
+ # C.g:97:7: '=='
+ self.match("==")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T95
+
+
+
+ # $ANTLR start T96
+ def mT96(self, ):
+
+ try:
+ self.type = T96
+
+ # C.g:98:5: ( '!=' )
+ # C.g:98:7: '!='
+ self.match("!=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T96
+
+
+
+ # $ANTLR start T97
+ def mT97(self, ):
+
+ try:
+ self.type = T97
+
+ # C.g:99:5: ( '<' )
+ # C.g:99:7: '<'
+ self.match(u'<')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T97
+
+
+
+ # $ANTLR start T98
+ def mT98(self, ):
+
+ try:
+ self.type = T98
+
+ # C.g:100:5: ( '>' )
+ # C.g:100:7: '>'
+ self.match(u'>')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T98
+
+
+
+ # $ANTLR start T99
+ def mT99(self, ):
+
+ try:
+ self.type = T99
+
+ # C.g:101:5: ( '<=' )
+ # C.g:101:7: '<='
+ self.match("<=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T99
+
+
+
+ # $ANTLR start T100
+ def mT100(self, ):
+
+ try:
+ self.type = T100
+
+ # C.g:102:6: ( '>=' )
+ # C.g:102:8: '>='
+ self.match(">=")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T100
+
+
+
+ # $ANTLR start T101
+ def mT101(self, ):
+
+ try:
+ self.type = T101
+
+ # C.g:103:6: ( '<<' )
+ # C.g:103:8: '<<'
+ self.match("<<")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T101
+
+
+
+ # $ANTLR start T102
+ def mT102(self, ):
+
+ try:
+ self.type = T102
+
+ # C.g:104:6: ( '>>' )
+ # C.g:104:8: '>>'
+ self.match(">>")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T102
+
+
+
+ # $ANTLR start T103
+ def mT103(self, ):
+
+ try:
+ self.type = T103
+
+ # C.g:105:6: ( '__asm__' )
+ # C.g:105:8: '__asm__'
+ self.match("__asm__")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T103
+
+
+
+ # $ANTLR start T104
+ def mT104(self, ):
+
+ try:
+ self.type = T104
+
+ # C.g:106:6: ( '_asm' )
+ # C.g:106:8: '_asm'
+ self.match("_asm")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T104
+
+
+
+ # $ANTLR start T105
+ def mT105(self, ):
+
+ try:
+ self.type = T105
+
+ # C.g:107:6: ( '__asm' )
+ # C.g:107:8: '__asm'
+ self.match("__asm")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T105
+
+
+
+ # $ANTLR start T106
+ def mT106(self, ):
+
+ try:
+ self.type = T106
+
+ # C.g:108:6: ( 'case' )
+ # C.g:108:8: 'case'
+ self.match("case")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T106
+
+
+
+ # $ANTLR start T107
+ def mT107(self, ):
+
+ try:
+ self.type = T107
+
+ # C.g:109:6: ( 'default' )
+ # C.g:109:8: 'default'
+ self.match("default")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T107
+
+
+
+ # $ANTLR start T108
+ def mT108(self, ):
+
+ try:
+ self.type = T108
+
+ # C.g:110:6: ( 'if' )
+ # C.g:110:8: 'if'
+ self.match("if")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T108
+
+
+
+ # $ANTLR start T109
+ def mT109(self, ):
+
+ try:
+ self.type = T109
+
+ # C.g:111:6: ( 'else' )
+ # C.g:111:8: 'else'
+ self.match("else")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T109
+
+
+
+ # $ANTLR start T110
+ def mT110(self, ):
+
+ try:
+ self.type = T110
+
+ # C.g:112:6: ( 'switch' )
+ # C.g:112:8: 'switch'
+ self.match("switch")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T110
+
+
+
+ # $ANTLR start T111
+ def mT111(self, ):
+
+ try:
+ self.type = T111
+
+ # C.g:113:6: ( 'while' )
+ # C.g:113:8: 'while'
+ self.match("while")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T111
+
+
+
+ # $ANTLR start T112
+ def mT112(self, ):
+
+ try:
+ self.type = T112
+
+ # C.g:114:6: ( 'do' )
+ # C.g:114:8: 'do'
+ self.match("do")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T112
+
+
+
+ # $ANTLR start T113
+ def mT113(self, ):
+
+ try:
+ self.type = T113
+
+ # C.g:115:6: ( 'for' )
+ # C.g:115:8: 'for'
+ self.match("for")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T113
+
+
+
+ # $ANTLR start T114
+ def mT114(self, ):
+
+ try:
+ self.type = T114
+
+ # C.g:116:6: ( 'goto' )
+ # C.g:116:8: 'goto'
+ self.match("goto")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T114
+
+
+
+ # $ANTLR start T115
+ def mT115(self, ):
+
+ try:
+ self.type = T115
+
+ # C.g:117:6: ( 'continue' )
+ # C.g:117:8: 'continue'
+ self.match("continue")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T115
+
+
+
+ # $ANTLR start T116
+ def mT116(self, ):
+
+ try:
+ self.type = T116
+
+ # C.g:118:6: ( 'break' )
+ # C.g:118:8: 'break'
+ self.match("break")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T116
+
+
+
+ # $ANTLR start T117
+ def mT117(self, ):
+
+ try:
+ self.type = T117
+
+ # C.g:119:6: ( 'return' )
+ # C.g:119:8: 'return'
+ self.match("return")
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end T117
+
+
+
+ # $ANTLR start IDENTIFIER
+ def mIDENTIFIER(self, ):
+
+ try:
+ self.type = IDENTIFIER
+
+ # C.g:586:2: ( LETTER ( LETTER | '0' .. '9' )* )
+ # C.g:586:4: LETTER ( LETTER | '0' .. '9' )*
+ self.mLETTER()
+
+ # C.g:586:11: ( LETTER | '0' .. '9' )*
+ while True: #loop1
+ alt1 = 2
+ LA1_0 = self.input.LA(1)
+
+ if (LA1_0 == u'$' or (u'0' <= LA1_0 <= u'9') or (u'A' <= LA1_0 <= u'Z') or LA1_0 == u'_' or (u'a' <= LA1_0 <= u'z')) :
+ alt1 = 1
+
+
+ if alt1 == 1:
+ # C.g:
+ if self.input.LA(1) == u'$' or (u'0' <= self.input.LA(1) <= u'9') or (u'A' <= self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (u'a' <= self.input.LA(1) <= u'z'):
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ else:
+ break #loop1
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end IDENTIFIER
+
+
+
+ # $ANTLR start LETTER
+ def mLETTER(self, ):
+
+ try:
+ # C.g:591:2: ( '$' | 'A' .. 'Z' | 'a' .. 'z' | '_' )
+ # C.g:
+ if self.input.LA(1) == u'$' or (u'A' <= self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (u'a' <= self.input.LA(1) <= u'z'):
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end LETTER
+
+
+
+ # $ANTLR start CHARACTER_LITERAL
+ def mCHARACTER_LITERAL(self, ):
+
+ try:
+ self.type = CHARACTER_LITERAL
+
+ # C.g:598:5: ( ( 'L' )? '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\'' )
+ # C.g:598:9: ( 'L' )? '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\''
+ # C.g:598:9: ( 'L' )?
+ alt2 = 2
+ LA2_0 = self.input.LA(1)
+
+ if (LA2_0 == u'L') :
+ alt2 = 1
+ if alt2 == 1:
+ # C.g:598:10: 'L'
+ self.match(u'L')
+
+
+
+
+ self.match(u'\'')
+
+ # C.g:598:21: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )
+ alt3 = 2
+ LA3_0 = self.input.LA(1)
+
+ if (LA3_0 == u'\\') :
+ alt3 = 1
+ elif ((u'\u0000' <= LA3_0 <= u'&') or (u'(' <= LA3_0 <= u'[') or (u']' <= LA3_0 <= u'\uFFFE')) :
+ alt3 = 2
+ else:
+ nvae = NoViableAltException("598:21: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )", 3, 0, self.input)
+
+ raise nvae
+
+ if alt3 == 1:
+ # C.g:598:23: EscapeSequence
+ self.mEscapeSequence()
+
+
+
+ elif alt3 == 2:
+ # C.g:598:40: ~ ( '\\'' | '\\\\' )
+ if (u'\u0000' <= self.input.LA(1) <= u'&') or (u'(' <= self.input.LA(1) <= u'[') or (u']' <= self.input.LA(1) <= u'\uFFFE'):
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ self.match(u'\'')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end CHARACTER_LITERAL
+
+
+
+ # $ANTLR start STRING_LITERAL
+ def mSTRING_LITERAL(self, ):
+
+ try:
+ self.type = STRING_LITERAL
+
+ # C.g:602:5: ( ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ # C.g:602:8: ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+ # C.g:602:8: ( 'L' )?
+ alt4 = 2
+ LA4_0 = self.input.LA(1)
+
+ if (LA4_0 == u'L') :
+ alt4 = 1
+ if alt4 == 1:
+ # C.g:602:9: 'L'
+ self.match(u'L')
+
+
+
+
+ self.match(u'"')
+
+ # C.g:602:19: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+ while True: #loop5
+ alt5 = 3
+ LA5_0 = self.input.LA(1)
+
+ if (LA5_0 == u'\\') :
+ alt5 = 1
+ elif ((u'\u0000' <= LA5_0 <= u'!') or (u'#' <= LA5_0 <= u'[') or (u']' <= LA5_0 <= u'\uFFFE')) :
+ alt5 = 2
+
+
+ if alt5 == 1:
+ # C.g:602:21: EscapeSequence
+ self.mEscapeSequence()
+
+
+
+ elif alt5 == 2:
+ # C.g:602:38: ~ ( '\\\\' | '\"' )
+ if (u'\u0000' <= self.input.LA(1) <= u'!') or (u'#' <= self.input.LA(1) <= u'[') or (u']' <= self.input.LA(1) <= u'\uFFFE'):
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ else:
+ break #loop5
+
+
+ self.match(u'"')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end STRING_LITERAL
+
+
+
+ # $ANTLR start HEX_LITERAL
+ def mHEX_LITERAL(self, ):
+
+ try:
+ self.type = HEX_LITERAL
+
+ # C.g:605:13: ( '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )? )
+ # C.g:605:15: '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )?
+ self.match(u'0')
+
+ if self.input.LA(1) == u'X' or self.input.LA(1) == u'x':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+ # C.g:605:29: ( HexDigit )+
+ cnt6 = 0
+ while True: #loop6
+ alt6 = 2
+ LA6_0 = self.input.LA(1)
+
+ if ((u'0' <= LA6_0 <= u'9') or (u'A' <= LA6_0 <= u'F') or (u'a' <= LA6_0 <= u'f')) :
+ alt6 = 1
+
+
+ if alt6 == 1:
+ # C.g:605:29: HexDigit
+ self.mHexDigit()
+
+
+
+ else:
+ if cnt6 >= 1:
+ break #loop6
+
+ eee = EarlyExitException(6, self.input)
+ raise eee
+
+ cnt6 += 1
+
+
+ # C.g:605:39: ( IntegerTypeSuffix )?
+ alt7 = 2
+ LA7_0 = self.input.LA(1)
+
+ if (LA7_0 == u'L' or LA7_0 == u'U' or LA7_0 == u'l' or LA7_0 == u'u') :
+ alt7 = 1
+ if alt7 == 1:
+ # C.g:605:39: IntegerTypeSuffix
+ self.mIntegerTypeSuffix()
+
+
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end HEX_LITERAL
+
+
+
+ # $ANTLR start DECIMAL_LITERAL
+ def mDECIMAL_LITERAL(self, ):
+
+ try:
+ self.type = DECIMAL_LITERAL
+
+ # C.g:607:17: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? )
+ # C.g:607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )?
+ # C.g:607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )
+ alt9 = 2
+ LA9_0 = self.input.LA(1)
+
+ if (LA9_0 == u'0') :
+ alt9 = 1
+ elif ((u'1' <= LA9_0 <= u'9')) :
+ alt9 = 2
+ else:
+ nvae = NoViableAltException("607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )", 9, 0, self.input)
+
+ raise nvae
+
+ if alt9 == 1:
+ # C.g:607:20: '0'
+ self.match(u'0')
+
+
+
+ elif alt9 == 2:
+ # C.g:607:26: '1' .. '9' ( '0' .. '9' )*
+ self.matchRange(u'1', u'9')
+
+ # C.g:607:35: ( '0' .. '9' )*
+ while True: #loop8
+ alt8 = 2
+ LA8_0 = self.input.LA(1)
+
+ if ((u'0' <= LA8_0 <= u'9')) :
+ alt8 = 1
+
+
+ if alt8 == 1:
+ # C.g:607:35: '0' .. '9'
+ self.matchRange(u'0', u'9')
+
+
+
+ else:
+ break #loop8
+
+
+
+
+
+ # C.g:607:46: ( IntegerTypeSuffix )?
+ alt10 = 2
+ LA10_0 = self.input.LA(1)
+
+ if (LA10_0 == u'L' or LA10_0 == u'U' or LA10_0 == u'l' or LA10_0 == u'u') :
+ alt10 = 1
+ if alt10 == 1:
+ # C.g:607:46: IntegerTypeSuffix
+ self.mIntegerTypeSuffix()
+
+
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end DECIMAL_LITERAL
+
+
+
+ # $ANTLR start OCTAL_LITERAL
+ def mOCTAL_LITERAL(self, ):
+
+ try:
+ self.type = OCTAL_LITERAL
+
+ # C.g:609:15: ( '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )? )
+ # C.g:609:17: '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )?
+ self.match(u'0')
+
+ # C.g:609:21: ( '0' .. '7' )+
+ cnt11 = 0
+ while True: #loop11
+ alt11 = 2
+ LA11_0 = self.input.LA(1)
+
+ if ((u'0' <= LA11_0 <= u'7')) :
+ alt11 = 1
+
+
+ if alt11 == 1:
+ # C.g:609:22: '0' .. '7'
+ self.matchRange(u'0', u'7')
+
+
+
+ else:
+ if cnt11 >= 1:
+ break #loop11
+
+ eee = EarlyExitException(11, self.input)
+ raise eee
+
+ cnt11 += 1
+
+
+ # C.g:609:33: ( IntegerTypeSuffix )?
+ alt12 = 2
+ LA12_0 = self.input.LA(1)
+
+ if (LA12_0 == u'L' or LA12_0 == u'U' or LA12_0 == u'l' or LA12_0 == u'u') :
+ alt12 = 1
+ if alt12 == 1:
+ # C.g:609:33: IntegerTypeSuffix
+ self.mIntegerTypeSuffix()
+
+
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end OCTAL_LITERAL
+
+
+
+ # $ANTLR start HexDigit
+ def mHexDigit(self, ):
+
+ try:
+ # C.g:612:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+ # C.g:612:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+ if (u'0' <= self.input.LA(1) <= u'9') or (u'A' <= self.input.LA(1) <= u'F') or (u'a' <= self.input.LA(1) <= u'f'):
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end HexDigit
+
+
+
+ # $ANTLR start IntegerTypeSuffix
+ def mIntegerTypeSuffix(self, ):
+
+ try:
+ # C.g:616:2: ( ( 'u' | 'U' ) | ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' ) )
+ alt13 = 4
+ LA13_0 = self.input.LA(1)
+
+ if (LA13_0 == u'U' or LA13_0 == u'u') :
+ LA13_1 = self.input.LA(2)
+
+ if (LA13_1 == u'L' or LA13_1 == u'l') :
+ LA13_3 = self.input.LA(3)
+
+ if (LA13_3 == u'L' or LA13_3 == u'l') :
+ alt13 = 4
+ else:
+ alt13 = 3
+ else:
+ alt13 = 1
+ elif (LA13_0 == u'L' or LA13_0 == u'l') :
+ alt13 = 2
+ else:
+ nvae = NoViableAltException("614:1: fragment IntegerTypeSuffix : ( ( 'u' | 'U' ) | ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' ) );", 13, 0, self.input)
+
+ raise nvae
+
+ if alt13 == 1:
+ # C.g:616:4: ( 'u' | 'U' )
+ if self.input.LA(1) == u'U' or self.input.LA(1) == u'u':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ elif alt13 == 2:
+ # C.g:617:4: ( 'l' | 'L' )
+ if self.input.LA(1) == u'L' or self.input.LA(1) == u'l':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ elif alt13 == 3:
+ # C.g:618:4: ( 'u' | 'U' ) ( 'l' | 'L' )
+ if self.input.LA(1) == u'U' or self.input.LA(1) == u'u':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+ if self.input.LA(1) == u'L' or self.input.LA(1) == u'l':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ elif alt13 == 4:
+ # C.g:619:4: ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' )
+ if self.input.LA(1) == u'U' or self.input.LA(1) == u'u':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+ if self.input.LA(1) == u'L' or self.input.LA(1) == u'l':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+ if self.input.LA(1) == u'L' or self.input.LA(1) == u'l':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end IntegerTypeSuffix
+
+
+
+ # $ANTLR start FLOATING_POINT_LITERAL
+ def mFLOATING_POINT_LITERAL(self, ):
+
+ try:
+ self.type = FLOATING_POINT_LITERAL
+
+ # C.g:623:5: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? | '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? | ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? | ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix )
+ alt25 = 4
+ alt25 = self.dfa25.predict(self.input)
+ if alt25 == 1:
+ # C.g:623:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )?
+ # C.g:623:9: ( '0' .. '9' )+
+ cnt14 = 0
+ while True: #loop14
+ alt14 = 2
+ LA14_0 = self.input.LA(1)
+
+ if ((u'0' <= LA14_0 <= u'9')) :
+ alt14 = 1
+
+
+ if alt14 == 1:
+ # C.g:623:10: '0' .. '9'
+ self.matchRange(u'0', u'9')
+
+
+
+ else:
+ if cnt14 >= 1:
+ break #loop14
+
+ eee = EarlyExitException(14, self.input)
+ raise eee
+
+ cnt14 += 1
+
+
+ self.match(u'.')
+
+ # C.g:623:25: ( '0' .. '9' )*
+ while True: #loop15
+ alt15 = 2
+ LA15_0 = self.input.LA(1)
+
+ if ((u'0' <= LA15_0 <= u'9')) :
+ alt15 = 1
+
+
+ if alt15 == 1:
+ # C.g:623:26: '0' .. '9'
+ self.matchRange(u'0', u'9')
+
+
+
+ else:
+ break #loop15
+
+
+ # C.g:623:37: ( Exponent )?
+ alt16 = 2
+ LA16_0 = self.input.LA(1)
+
+ if (LA16_0 == u'E' or LA16_0 == u'e') :
+ alt16 = 1
+ if alt16 == 1:
+ # C.g:623:37: Exponent
+ self.mExponent()
+
+
+
+
+ # C.g:623:47: ( FloatTypeSuffix )?
+ alt17 = 2
+ LA17_0 = self.input.LA(1)
+
+ if (LA17_0 == u'D' or LA17_0 == u'F' or LA17_0 == u'd' or LA17_0 == u'f') :
+ alt17 = 1
+ if alt17 == 1:
+ # C.g:623:47: FloatTypeSuffix
+ self.mFloatTypeSuffix()
+
+
+
+
+
+
+ elif alt25 == 2:
+ # C.g:624:9: '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )?
+ self.match(u'.')
+
+ # C.g:624:13: ( '0' .. '9' )+
+ cnt18 = 0
+ while True: #loop18
+ alt18 = 2
+ LA18_0 = self.input.LA(1)
+
+ if ((u'0' <= LA18_0 <= u'9')) :
+ alt18 = 1
+
+
+ if alt18 == 1:
+ # C.g:624:14: '0' .. '9'
+ self.matchRange(u'0', u'9')
+
+
+
+ else:
+ if cnt18 >= 1:
+ break #loop18
+
+ eee = EarlyExitException(18, self.input)
+ raise eee
+
+ cnt18 += 1
+
+
+ # C.g:624:25: ( Exponent )?
+ alt19 = 2
+ LA19_0 = self.input.LA(1)
+
+ if (LA19_0 == u'E' or LA19_0 == u'e') :
+ alt19 = 1
+ if alt19 == 1:
+ # C.g:624:25: Exponent
+ self.mExponent()
+
+
+
+
+ # C.g:624:35: ( FloatTypeSuffix )?
+ alt20 = 2
+ LA20_0 = self.input.LA(1)
+
+ if (LA20_0 == u'D' or LA20_0 == u'F' or LA20_0 == u'd' or LA20_0 == u'f') :
+ alt20 = 1
+ if alt20 == 1:
+ # C.g:624:35: FloatTypeSuffix
+ self.mFloatTypeSuffix()
+
+
+
+
+
+
+ elif alt25 == 3:
+ # C.g:625:9: ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )?
+ # C.g:625:9: ( '0' .. '9' )+
+ cnt21 = 0
+ while True: #loop21
+ alt21 = 2
+ LA21_0 = self.input.LA(1)
+
+ if ((u'0' <= LA21_0 <= u'9')) :
+ alt21 = 1
+
+
+ if alt21 == 1:
+ # C.g:625:10: '0' .. '9'
+ self.matchRange(u'0', u'9')
+
+
+
+ else:
+ if cnt21 >= 1:
+ break #loop21
+
+ eee = EarlyExitException(21, self.input)
+ raise eee
+
+ cnt21 += 1
+
+
+ self.mExponent()
+
+ # C.g:625:30: ( FloatTypeSuffix )?
+ alt22 = 2
+ LA22_0 = self.input.LA(1)
+
+ if (LA22_0 == u'D' or LA22_0 == u'F' or LA22_0 == u'd' or LA22_0 == u'f') :
+ alt22 = 1
+ if alt22 == 1:
+ # C.g:625:30: FloatTypeSuffix
+ self.mFloatTypeSuffix()
+
+
+
+
+
+
+ elif alt25 == 4:
+ # C.g:626:9: ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix
+ # C.g:626:9: ( '0' .. '9' )+
+ cnt23 = 0
+ while True: #loop23
+ alt23 = 2
+ LA23_0 = self.input.LA(1)
+
+ if ((u'0' <= LA23_0 <= u'9')) :
+ alt23 = 1
+
+
+ if alt23 == 1:
+ # C.g:626:10: '0' .. '9'
+ self.matchRange(u'0', u'9')
+
+
+
+ else:
+ if cnt23 >= 1:
+ break #loop23
+
+ eee = EarlyExitException(23, self.input)
+ raise eee
+
+ cnt23 += 1
+
+
+ # C.g:626:21: ( Exponent )?
+ alt24 = 2
+ LA24_0 = self.input.LA(1)
+
+ if (LA24_0 == u'E' or LA24_0 == u'e') :
+ alt24 = 1
+ if alt24 == 1:
+ # C.g:626:21: Exponent
+ self.mExponent()
+
+
+
+
+ self.mFloatTypeSuffix()
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end FLOATING_POINT_LITERAL
+
+
+
+ # $ANTLR start Exponent
+ def mExponent(self, ):
+
+ try:
+ # C.g:630:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
+ # C.g:630:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
+ if self.input.LA(1) == u'E' or self.input.LA(1) == u'e':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+ # C.g:630:22: ( '+' | '-' )?
+ alt26 = 2
+ LA26_0 = self.input.LA(1)
+
+ if (LA26_0 == u'+' or LA26_0 == u'-') :
+ alt26 = 1
+ if alt26 == 1:
+ # C.g:
+ if self.input.LA(1) == u'+' or self.input.LA(1) == u'-':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ # C.g:630:33: ( '0' .. '9' )+
+ cnt27 = 0
+ while True: #loop27
+ alt27 = 2
+ LA27_0 = self.input.LA(1)
+
+ if ((u'0' <= LA27_0 <= u'9')) :
+ alt27 = 1
+
+
+ if alt27 == 1:
+ # C.g:630:34: '0' .. '9'
+ self.matchRange(u'0', u'9')
+
+
+
+ else:
+ if cnt27 >= 1:
+ break #loop27
+
+ eee = EarlyExitException(27, self.input)
+ raise eee
+
+ cnt27 += 1
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end Exponent
+
+
+
+ # $ANTLR start FloatTypeSuffix
+ def mFloatTypeSuffix(self, ):
+
+ try:
+ # C.g:633:17: ( ( 'f' | 'F' | 'd' | 'D' ) )
+ # C.g:633:19: ( 'f' | 'F' | 'd' | 'D' )
+ if self.input.LA(1) == u'D' or self.input.LA(1) == u'F' or self.input.LA(1) == u'd' or self.input.LA(1) == u'f':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end FloatTypeSuffix
+
+
+
+ # $ANTLR start EscapeSequence
+ def mEscapeSequence(self, ):
+
+ try:
+ # C.g:637:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape )
+ alt28 = 2
+ LA28_0 = self.input.LA(1)
+
+ if (LA28_0 == u'\\') :
+ LA28_1 = self.input.LA(2)
+
+ if (LA28_1 == u'"' or LA28_1 == u'\'' or LA28_1 == u'\\' or LA28_1 == u'b' or LA28_1 == u'f' or LA28_1 == u'n' or LA28_1 == u'r' or LA28_1 == u't') :
+ alt28 = 1
+ elif ((u'0' <= LA28_1 <= u'7')) :
+ alt28 = 2
+ else:
+ nvae = NoViableAltException("635:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 28, 1, self.input)
+
+ raise nvae
+
+ else:
+ nvae = NoViableAltException("635:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 28, 0, self.input)
+
+ raise nvae
+
+ if alt28 == 1:
+ # C.g:637:8: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ self.match(u'\\')
+
+ if self.input.LA(1) == u'"' or self.input.LA(1) == u'\'' or self.input.LA(1) == u'\\' or self.input.LA(1) == u'b' or self.input.LA(1) == u'f' or self.input.LA(1) == u'n' or self.input.LA(1) == u'r' or self.input.LA(1) == u't':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ elif alt28 == 2:
+ # C.g:638:9: OctalEscape
+ self.mOctalEscape()
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end EscapeSequence
+
+
+
+ # $ANTLR start OctalEscape
+ def mOctalEscape(self, ):
+
+ try:
+ # C.g:643:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+ alt29 = 3
+ LA29_0 = self.input.LA(1)
+
+ if (LA29_0 == u'\\') :
+ LA29_1 = self.input.LA(2)
+
+ if ((u'0' <= LA29_1 <= u'3')) :
+ LA29_2 = self.input.LA(3)
+
+ if ((u'0' <= LA29_2 <= u'7')) :
+ LA29_4 = self.input.LA(4)
+
+ if ((u'0' <= LA29_4 <= u'7')) :
+ alt29 = 1
+ else:
+ alt29 = 2
+ else:
+ alt29 = 3
+ elif ((u'4' <= LA29_1 <= u'7')) :
+ LA29_3 = self.input.LA(3)
+
+ if ((u'0' <= LA29_3 <= u'7')) :
+ alt29 = 2
+ else:
+ alt29 = 3
+ else:
+ nvae = NoViableAltException("641:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 29, 1, self.input)
+
+ raise nvae
+
+ else:
+ nvae = NoViableAltException("641:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 29, 0, self.input)
+
+ raise nvae
+
+ if alt29 == 1:
+ # C.g:643:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ self.match(u'\\')
+
+ # C.g:643:14: ( '0' .. '3' )
+ # C.g:643:15: '0' .. '3'
+ self.matchRange(u'0', u'3')
+
+
+
+
+ # C.g:643:25: ( '0' .. '7' )
+ # C.g:643:26: '0' .. '7'
+ self.matchRange(u'0', u'7')
+
+
+
+
+ # C.g:643:36: ( '0' .. '7' )
+ # C.g:643:37: '0' .. '7'
+ self.matchRange(u'0', u'7')
+
+
+
+
+
+
+ elif alt29 == 2:
+ # C.g:644:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ self.match(u'\\')
+
+ # C.g:644:14: ( '0' .. '7' )
+ # C.g:644:15: '0' .. '7'
+ self.matchRange(u'0', u'7')
+
+
+
+
+ # C.g:644:25: ( '0' .. '7' )
+ # C.g:644:26: '0' .. '7'
+ self.matchRange(u'0', u'7')
+
+
+
+
+
+
+ elif alt29 == 3:
+ # C.g:645:9: '\\\\' ( '0' .. '7' )
+ self.match(u'\\')
+
+ # C.g:645:14: ( '0' .. '7' )
+ # C.g:645:15: '0' .. '7'
+ self.matchRange(u'0', u'7')
+
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end OctalEscape
+
+
+
+ # $ANTLR start UnicodeEscape
+ def mUnicodeEscape(self, ):
+
+ try:
+ # C.g:650:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ # C.g:650:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ self.match(u'\\')
+
+ self.match(u'u')
+
+ self.mHexDigit()
+
+ self.mHexDigit()
+
+ self.mHexDigit()
+
+ self.mHexDigit()
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end UnicodeEscape
+
+
+
+ # $ANTLR start WS
+ def mWS(self, ):
+
+ try:
+ self.type = WS
+
+ # C.g:653:5: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) )
+ # C.g:653:8: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' )
+ if (u'\t' <= self.input.LA(1) <= u'\n') or (u'\f' <= self.input.LA(1) <= u'\r') or self.input.LA(1) == u' ':
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+ #action start
+ self.channel=HIDDEN;
+ #action end
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end WS
+
+
+
+ # $ANTLR start BS
+ def mBS(self, ):
+
+ try:
+ self.type = BS
+
+ # C.g:657:5: ( ( '\\\\' ) )
+ # C.g:657:7: ( '\\\\' )
+ # C.g:657:7: ( '\\\\' )
+ # C.g:657:8: '\\\\'
+ self.match(u'\\')
+
+
+
+
+ #action start
+ self.channel=HIDDEN;
+ #action end
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end BS
+
+
+
+ # $ANTLR start UnicodeVocabulary
+ def mUnicodeVocabulary(self, ):
+
+ try:
+ self.type = UnicodeVocabulary
+
+ # C.g:665:5: ( '\\u0003' .. '\\uFFFE' )
+ # C.g:665:7: '\\u0003' .. '\\uFFFE'
+ self.matchRange(u'\u0003', u'\uFFFE')
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end UnicodeVocabulary
+
+
+
+ # $ANTLR start COMMENT
+ def mCOMMENT(self, ):
+
+ try:
+ self.type = COMMENT
+
+ # C.g:668:5: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ # C.g:668:9: '/*' ( options {greedy=false; } : . )* '*/'
+ self.match("/*")
+
+
+ # C.g:668:14: ( options {greedy=false; } : . )*
+ while True: #loop30
+ alt30 = 2
+ LA30_0 = self.input.LA(1)
+
+ if (LA30_0 == u'*') :
+ LA30_1 = self.input.LA(2)
+
+ if (LA30_1 == u'/') :
+ alt30 = 2
+ elif ((u'\u0000' <= LA30_1 <= u'.') or (u'0' <= LA30_1 <= u'\uFFFE')) :
+ alt30 = 1
+
+
+ elif ((u'\u0000' <= LA30_0 <= u')') or (u'+' <= LA30_0 <= u'\uFFFE')) :
+ alt30 = 1
+
+
+ if alt30 == 1:
+ # C.g:668:42: .
+ self.matchAny()
+
+
+
+ else:
+ break #loop30
+
+
+ self.match("*/")
+
+
+ #action start
+ self.channel=HIDDEN;
+ #action end
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end COMMENT
+
+
+
+ # $ANTLR start LINE_COMMENT
+ def mLINE_COMMENT(self, ):
+
+ try:
+ self.type = LINE_COMMENT
+
+ # C.g:673:5: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
+ # C.g:673:7: '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
+ self.match("//")
+
+
+ # C.g:673:12: (~ ( '\\n' | '\\r' ) )*
+ while True: #loop31
+ alt31 = 2
+ LA31_0 = self.input.LA(1)
+
+ if ((u'\u0000' <= LA31_0 <= u'\t') or (u'\u000B' <= LA31_0 <= u'\f') or (u'\u000E' <= LA31_0 <= u'\uFFFE')) :
+ alt31 = 1
+
+
+ if alt31 == 1:
+ # C.g:673:12: ~ ( '\\n' | '\\r' )
+ if (u'\u0000' <= self.input.LA(1) <= u'\t') or (u'\u000B' <= self.input.LA(1) <= u'\f') or (u'\u000E' <= self.input.LA(1) <= u'\uFFFE'):
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ else:
+ break #loop31
+
+
+ # C.g:673:26: ( '\\r' )?
+ alt32 = 2
+ LA32_0 = self.input.LA(1)
+
+ if (LA32_0 == u'\r') :
+ alt32 = 1
+ if alt32 == 1:
+ # C.g:673:26: '\\r'
+ self.match(u'\r')
+
+
+
+
+ self.match(u'\n')
+
+ #action start
+ self.channel=HIDDEN;
+ #action end
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end LINE_COMMENT
+
+
+
+ # $ANTLR start LINE_COMMAND
+ def mLINE_COMMAND(self, ):
+
+ try:
+ self.type = LINE_COMMAND
+
+ # C.g:678:5: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
+ # C.g:678:7: '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
+ self.match(u'#')
+
+ # C.g:678:11: (~ ( '\\n' | '\\r' ) )*
+ while True: #loop33
+ alt33 = 2
+ LA33_0 = self.input.LA(1)
+
+ if ((u'\u0000' <= LA33_0 <= u'\t') or (u'\u000B' <= LA33_0 <= u'\f') or (u'\u000E' <= LA33_0 <= u'\uFFFE')) :
+ alt33 = 1
+
+
+ if alt33 == 1:
+ # C.g:678:11: ~ ( '\\n' | '\\r' )
+ if (u'\u0000' <= self.input.LA(1) <= u'\t') or (u'\u000B' <= self.input.LA(1) <= u'\f') or (u'\u000E' <= self.input.LA(1) <= u'\uFFFE'):
+ self.input.consume();
+
+ else:
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ else:
+ break #loop33
+
+
+ # C.g:678:25: ( '\\r' )?
+ alt34 = 2
+ LA34_0 = self.input.LA(1)
+
+ if (LA34_0 == u'\r') :
+ alt34 = 1
+ if alt34 == 1:
+ # C.g:678:25: '\\r'
+ self.match(u'\r')
+
+
+
+
+ self.match(u'\n')
+
+ #action start
+ self.channel=HIDDEN;
+ #action end
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end LINE_COMMAND
+
+
+
+ def mTokens(self):
+ # C.g:1:8: ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | T80 | T81 | T82 | T83 | T84 | T85 | T86 | T87 | T88 | T89 | T90 | T91 | T92 | T93 | T94 | T95 | T96 | T97 | T98 | T99 | T100 | T101 | T102 | T103 | T104 | T105 | T106 | T107 | T108 | T109 | T110 | T111 | T112 | T113 | T114 | T115 | T116 | T117 | IDENTIFIER | CHARACTER_LITERAL | STRING_LITERAL | HEX_LITERAL | DECIMAL_LITERAL | OCTAL_LITERAL | FLOATING_POINT_LITERAL | WS | BS | UnicodeVocabulary | COMMENT | LINE_COMMENT | LINE_COMMAND )
+ alt35 = 106
+ alt35 = self.dfa35.predict(self.input)
+ if alt35 == 1:
+ # C.g:1:10: T25
+ self.mT25()
+
+
+
+ elif alt35 == 2:
+ # C.g:1:14: T26
+ self.mT26()
+
+
+
+ elif alt35 == 3:
+ # C.g:1:18: T27
+ self.mT27()
+
+
+
+ elif alt35 == 4:
+ # C.g:1:22: T28
+ self.mT28()
+
+
+
+ elif alt35 == 5:
+ # C.g:1:26: T29
+ self.mT29()
+
+
+
+ elif alt35 == 6:
+ # C.g:1:30: T30
+ self.mT30()
+
+
+
+ elif alt35 == 7:
+ # C.g:1:34: T31
+ self.mT31()
+
+
+
+ elif alt35 == 8:
+ # C.g:1:38: T32
+ self.mT32()
+
+
+
+ elif alt35 == 9:
+ # C.g:1:42: T33
+ self.mT33()
+
+
+
+ elif alt35 == 10:
+ # C.g:1:46: T34
+ self.mT34()
+
+
+
+ elif alt35 == 11:
+ # C.g:1:50: T35
+ self.mT35()
+
+
+
+ elif alt35 == 12:
+ # C.g:1:54: T36
+ self.mT36()
+
+
+
+ elif alt35 == 13:
+ # C.g:1:58: T37
+ self.mT37()
+
+
+
+ elif alt35 == 14:
+ # C.g:1:62: T38
+ self.mT38()
+
+
+
+ elif alt35 == 15:
+ # C.g:1:66: T39
+ self.mT39()
+
+
+
+ elif alt35 == 16:
+ # C.g:1:70: T40
+ self.mT40()
+
+
+
+ elif alt35 == 17:
+ # C.g:1:74: T41
+ self.mT41()
+
+
+
+ elif alt35 == 18:
+ # C.g:1:78: T42
+ self.mT42()
+
+
+
+ elif alt35 == 19:
+ # C.g:1:82: T43
+ self.mT43()
+
+
+
+ elif alt35 == 20:
+ # C.g:1:86: T44
+ self.mT44()
+
+
+
+ elif alt35 == 21:
+ # C.g:1:90: T45
+ self.mT45()
+
+
+
+ elif alt35 == 22:
+ # C.g:1:94: T46
+ self.mT46()
+
+
+
+ elif alt35 == 23:
+ # C.g:1:98: T47
+ self.mT47()
+
+
+
+ elif alt35 == 24:
+ # C.g:1:102: T48
+ self.mT48()
+
+
+
+ elif alt35 == 25:
+ # C.g:1:106: T49
+ self.mT49()
+
+
+
+ elif alt35 == 26:
+ # C.g:1:110: T50
+ self.mT50()
+
+
+
+ elif alt35 == 27:
+ # C.g:1:114: T51
+ self.mT51()
+
+
+
+ elif alt35 == 28:
+ # C.g:1:118: T52
+ self.mT52()
+
+
+
+ elif alt35 == 29:
+ # C.g:1:122: T53
+ self.mT53()
+
+
+
+ elif alt35 == 30:
+ # C.g:1:126: T54
+ self.mT54()
+
+
+
+ elif alt35 == 31:
+ # C.g:1:130: T55
+ self.mT55()
+
+
+
+ elif alt35 == 32:
+ # C.g:1:134: T56
+ self.mT56()
+
+
+
+ elif alt35 == 33:
+ # C.g:1:138: T57
+ self.mT57()
+
+
+
+ elif alt35 == 34:
+ # C.g:1:142: T58
+ self.mT58()
+
+
+
+ elif alt35 == 35:
+ # C.g:1:146: T59
+ self.mT59()
+
+
+
+ elif alt35 == 36:
+ # C.g:1:150: T60
+ self.mT60()
+
+
+
+ elif alt35 == 37:
+ # C.g:1:154: T61
+ self.mT61()
+
+
+
+ elif alt35 == 38:
+ # C.g:1:158: T62
+ self.mT62()
+
+
+
+ elif alt35 == 39:
+ # C.g:1:162: T63
+ self.mT63()
+
+
+
+ elif alt35 == 40:
+ # C.g:1:166: T64
+ self.mT64()
+
+
+
+ elif alt35 == 41:
+ # C.g:1:170: T65
+ self.mT65()
+
+
+
+ elif alt35 == 42:
+ # C.g:1:174: T66
+ self.mT66()
+
+
+
+ elif alt35 == 43:
+ # C.g:1:178: T67
+ self.mT67()
+
+
+
+ elif alt35 == 44:
+ # C.g:1:182: T68
+ self.mT68()
+
+
+
+ elif alt35 == 45:
+ # C.g:1:186: T69
+ self.mT69()
+
+
+
+ elif alt35 == 46:
+ # C.g:1:190: T70
+ self.mT70()
+
+
+
+ elif alt35 == 47:
+ # C.g:1:194: T71
+ self.mT71()
+
+
+
+ elif alt35 == 48:
+ # C.g:1:198: T72
+ self.mT72()
+
+
+
+ elif alt35 == 49:
+ # C.g:1:202: T73
+ self.mT73()
+
+
+
+ elif alt35 == 50:
+ # C.g:1:206: T74
+ self.mT74()
+
+
+
+ elif alt35 == 51:
+ # C.g:1:210: T75
+ self.mT75()
+
+
+
+ elif alt35 == 52:
+ # C.g:1:214: T76
+ self.mT76()
+
+
+
+ elif alt35 == 53:
+ # C.g:1:218: T77
+ self.mT77()
+
+
+
+ elif alt35 == 54:
+ # C.g:1:222: T78
+ self.mT78()
+
+
+
+ elif alt35 == 55:
+ # C.g:1:226: T79
+ self.mT79()
+
+
+
+ elif alt35 == 56:
+ # C.g:1:230: T80
+ self.mT80()
+
+
+
+ elif alt35 == 57:
+ # C.g:1:234: T81
+ self.mT81()
+
+
+
+ elif alt35 == 58:
+ # C.g:1:238: T82
+ self.mT82()
+
+
+
+ elif alt35 == 59:
+ # C.g:1:242: T83
+ self.mT83()
+
+
+
+ elif alt35 == 60:
+ # C.g:1:246: T84
+ self.mT84()
+
+
+
+ elif alt35 == 61:
+ # C.g:1:250: T85
+ self.mT85()
+
+
+
+ elif alt35 == 62:
+ # C.g:1:254: T86
+ self.mT86()
+
+
+
+ elif alt35 == 63:
+ # C.g:1:258: T87
+ self.mT87()
+
+
+
+ elif alt35 == 64:
+ # C.g:1:262: T88
+ self.mT88()
+
+
+
+ elif alt35 == 65:
+ # C.g:1:266: T89
+ self.mT89()
+
+
+
+ elif alt35 == 66:
+ # C.g:1:270: T90
+ self.mT90()
+
+
+
+ elif alt35 == 67:
+ # C.g:1:274: T91
+ self.mT91()
+
+
+
+ elif alt35 == 68:
+ # C.g:1:278: T92
+ self.mT92()
+
+
+
+ elif alt35 == 69:
+ # C.g:1:282: T93
+ self.mT93()
+
+
+
+ elif alt35 == 70:
+ # C.g:1:286: T94
+ self.mT94()
+
+
+
+ elif alt35 == 71:
+ # C.g:1:290: T95
+ self.mT95()
+
+
+
+ elif alt35 == 72:
+ # C.g:1:294: T96
+ self.mT96()
+
+
+
+ elif alt35 == 73:
+ # C.g:1:298: T97
+ self.mT97()
+
+
+
+ elif alt35 == 74:
+ # C.g:1:302: T98
+ self.mT98()
+
+
+
+ elif alt35 == 75:
+ # C.g:1:306: T99
+ self.mT99()
+
+
+
+ elif alt35 == 76:
+ # C.g:1:310: T100
+ self.mT100()
+
+
+
+ elif alt35 == 77:
+ # C.g:1:315: T101
+ self.mT101()
+
+
+
+ elif alt35 == 78:
+ # C.g:1:320: T102
+ self.mT102()
+
+
+
+ elif alt35 == 79:
+ # C.g:1:325: T103
+ self.mT103()
+
+
+
+ elif alt35 == 80:
+ # C.g:1:330: T104
+ self.mT104()
+
+
+
+ elif alt35 == 81:
+ # C.g:1:335: T105
+ self.mT105()
+
+
+
+ elif alt35 == 82:
+ # C.g:1:340: T106
+ self.mT106()
+
+
+
+ elif alt35 == 83:
+ # C.g:1:345: T107
+ self.mT107()
+
+
+
+ elif alt35 == 84:
+ # C.g:1:350: T108
+ self.mT108()
+
+
+
+ elif alt35 == 85:
+ # C.g:1:355: T109
+ self.mT109()
+
+
+
+ elif alt35 == 86:
+ # C.g:1:360: T110
+ self.mT110()
+
+
+
+ elif alt35 == 87:
+ # C.g:1:365: T111
+ self.mT111()
+
+
+
+ elif alt35 == 88:
+ # C.g:1:370: T112
+ self.mT112()
+
+
+
+ elif alt35 == 89:
+ # C.g:1:375: T113
+ self.mT113()
+
+
+
+ elif alt35 == 90:
+ # C.g:1:380: T114
+ self.mT114()
+
+
+
+ elif alt35 == 91:
+ # C.g:1:385: T115
+ self.mT115()
+
+
+
+ elif alt35 == 92:
+ # C.g:1:390: T116
+ self.mT116()
+
+
+
+ elif alt35 == 93:
+ # C.g:1:395: T117
+ self.mT117()
+
+
+
+ elif alt35 == 94:
+ # C.g:1:400: IDENTIFIER
+ self.mIDENTIFIER()
+
+
+
+ elif alt35 == 95:
+ # C.g:1:411: CHARACTER_LITERAL
+ self.mCHARACTER_LITERAL()
+
+
+
+ elif alt35 == 96:
+ # C.g:1:429: STRING_LITERAL
+ self.mSTRING_LITERAL()
+
+
+
+ elif alt35 == 97:
+ # C.g:1:444: HEX_LITERAL
+ self.mHEX_LITERAL()
+
+
+
+ elif alt35 == 98:
+ # C.g:1:456: DECIMAL_LITERAL
+ self.mDECIMAL_LITERAL()
+
+
+
+ elif alt35 == 99:
+ # C.g:1:472: OCTAL_LITERAL
+ self.mOCTAL_LITERAL()
+
+
+
+ elif alt35 == 100:
+ # C.g:1:486: FLOATING_POINT_LITERAL
+ self.mFLOATING_POINT_LITERAL()
+
+
+
+ elif alt35 == 101:
+ # C.g:1:509: WS
+ self.mWS()
+
+
+
+ elif alt35 == 102:
+ # C.g:1:512: BS
+ self.mBS()
+
+
+
+ elif alt35 == 103:
+ # C.g:1:515: UnicodeVocabulary
+ self.mUnicodeVocabulary()
+
+
+
+ elif alt35 == 104:
+ # C.g:1:533: COMMENT
+ self.mCOMMENT()
+
+
+
+ elif alt35 == 105:
+ # C.g:1:541: LINE_COMMENT
+ self.mLINE_COMMENT()
+
+
+
+ elif alt35 == 106:
+ # C.g:1:554: LINE_COMMAND
+ self.mLINE_COMMAND()
+
+
+
+
+
+
+
+
+ # lookup tables for DFA #25
+
+ DFA25_eot = DFA.unpack(
+ u"\7\uffff\1\10\2\uffff"
+ )
+
+ DFA25_eof = DFA.unpack(
+ u"\12\uffff"
+ )
+
+ DFA25_min = DFA.unpack(
+ u"\2\56\2\uffff\1\53\1\uffff\2\60\2\uffff"
+ )
+
+ DFA25_max = DFA.unpack(
+ u"\1\71\1\146\2\uffff\1\71\1\uffff\1\71\1\146\2\uffff"
+ )
+
+ DFA25_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff\1\4\2\uffff\2\3"
+ )
+
+ DFA25_special = DFA.unpack(
+ u"\12\uffff"
+ )
+
+
+ DFA25_transition = [
+ DFA.unpack(u"\1\2\1\uffff\12\1"),
+ DFA.unpack(u"\1\3\1\uffff\12\1\12\uffff\1\5\1\4\1\5\35\uffff\1\5"
+ u"\1\4\1\5"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\6\1\uffff\1\6\2\uffff\12\7"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\12\7"),
+ DFA.unpack(u"\12\7\12\uffff\1\11\1\uffff\1\11\35\uffff\1\11\1\uffff"
+ u"\1\11"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #25
+
+ DFA25 = DFA
+ # lookup tables for DFA #35
+
+ DFA35_eot = DFA.unpack(
+ u"\2\uffff\1\76\1\uffff\1\101\14\76\3\uffff\10\76\4\uffff\1\151\1"
+ u"\153\1\157\1\163\1\167\1\171\1\174\1\uffff\1\177\1\u0082\1\u0085"
+ u"\1\u0087\1\u008a\1\uffff\5\76\1\uffff\2\73\2\u0095\2\uffff\1\73"
+ u"\2\uffff\1\76\4\uffff\16\76\1\u00ad\5\76\1\u00b4\1\76\3\uffff\1"
+ u"\u00b7\10\76\34\uffff\1\u00c1\2\uffff\1\u00c3\10\uffff\5\76\3\uffff"
+ u"\1\u00c9\1\uffff\1\u0095\3\uffff\23\76\1\uffff\1\u00de\1\76\1\u00e0"
+ u"\3\76\1\uffff\2\76\1\uffff\1\76\1\u00e7\6\76\4\uffff\5\76\1\uffff"
+ u"\1\76\1\u00f5\1\76\1\u00f7\6\76\1\u00fe\4\76\1\u0103\1\u0104\2"
+ u"\76\1\u0107\1\uffff\1\u0108\1\uffff\6\76\1\uffff\10\76\1\u0118"
+ u"\1\76\1\u011a\2\76\1\uffff\1\76\1\uffff\5\76\1\u0123\1\uffff\4"
+ u"\76\2\uffff\1\76\1\u0129\2\uffff\1\u012a\3\76\1\u012e\1\76\1\u0130"
+ u"\7\76\1\u0139\1\uffff\1\u013a\1\uffff\1\u013b\1\76\1\u013d\1\u013e"
+ u"\1\u013f\1\u0140\1\u0141\1\u0142\1\uffff\1\76\1\u0144\1\u0145\2"
+ u"\76\2\uffff\1\76\1\u0149\1\76\1\uffff\1\76\1\uffff\5\76\1\u0151"
+ u"\1\u0152\1\76\3\uffff\1\u0154\6\uffff\1\76\2\uffff\2\76\1\u0158"
+ u"\1\uffff\7\76\2\uffff\1\u0160\1\uffff\1\u0161\1\u0162\1\u0163\1"
+ u"\uffff\1\u0164\1\u0165\1\76\1\u0167\3\76\6\uffff\1\u016b\1\uffff"
+ u"\3\76\1\uffff\21\76\1\u0180\2\76\1\uffff\3\76\1\u0186\1\76\1\uffff"
+ u"\11\76\1\u0191\1\uffff"
+ )
+
+ DFA35_eof = DFA.unpack(
+ u"\u0192\uffff"
+ )
+
+ DFA35_min = DFA.unpack(
+ u"\1\3\1\uffff\1\171\1\uffff\1\75\1\154\1\150\1\165\1\145\1\124\1"
+ u"\157\1\141\1\146\1\157\1\154\1\145\1\156\3\uffff\1\116\1\120\1"
+ u"\117\1\116\1\117\1\114\1\106\1\101\4\uffff\1\75\1\56\1\53\1\55"
+ u"\1\52\1\75\1\46\1\uffff\1\75\1\74\3\75\1\uffff\1\137\1\150\1\157"
+ u"\1\162\1\42\1\uffff\2\0\2\56\2\uffff\1\0\2\uffff\1\160\4\uffff"
+ u"\1\163\1\164\1\165\1\151\1\141\1\147\1\157\1\164\1\147\1\101\1"
+ u"\151\1\163\1\156\1\141\1\44\1\164\1\156\1\162\1\157\1\146\1\44"
+ u"\1\151\3\uffff\1\44\2\124\1\116\1\101\1\114\1\117\1\111\1\103\34"
+ u"\uffff\1\75\2\uffff\1\75\10\uffff\1\141\1\163\1\151\1\164\1\145"
+ u"\3\uffff\1\56\1\uffff\1\56\3\uffff\3\145\1\155\2\164\1\165\1\145"
+ u"\1\156\1\162\1\157\1\151\1\165\1\124\1\141\1\144\1\145\1\163\1"
+ u"\162\1\uffff\1\44\1\147\1\44\2\141\1\142\1\uffff\1\151\1\157\1"
+ u"\uffff\1\111\1\44\1\123\1\114\1\101\1\102\1\101\1\113\4\uffff\1"
+ u"\163\1\155\1\154\1\157\1\141\1\uffff\1\144\1\44\1\162\1\44\1\143"
+ u"\1\151\1\143\1\157\1\145\1\164\1\44\1\163\1\162\1\111\1\164\2\44"
+ u"\1\151\1\164\1\44\1\uffff\1\44\1\uffff\1\164\1\165\1\154\1\147"
+ u"\1\156\1\117\1\uffff\1\124\1\111\1\124\1\101\1\102\1\120\1\105"
+ u"\1\155\1\44\1\145\1\44\1\153\1\145\1\uffff\1\156\1\uffff\1\150"
+ u"\1\143\1\164\1\146\1\144\1\44\1\uffff\1\164\1\156\1\103\1\151\2"
+ u"\uffff\1\156\1\44\2\uffff\1\44\1\154\1\145\1\156\1\44\1\116\1\44"
+ u"\1\107\1\111\1\114\1\125\1\117\1\111\1\104\1\44\1\uffff\1\44\1"
+ u"\uffff\1\44\1\146\6\44\1\uffff\1\145\2\44\1\154\1\165\2\uffff\1"
+ u"\164\1\44\1\145\1\uffff\1\101\1\uffff\1\116\1\114\1\137\1\116\1"
+ u"\117\2\44\1\137\3\uffff\1\44\6\uffff\1\162\2\uffff\2\145\1\44\1"
+ u"\uffff\1\144\1\114\2\105\1\122\2\124\2\uffff\1\44\1\uffff\3\44"
+ u"\1\uffff\2\44\1\104\1\44\1\105\1\111\1\123\6\uffff\1\44\1\uffff"
+ u"\2\115\1\105\1\uffff\1\117\1\105\1\122\1\126\1\123\1\126\2\105"
+ u"\1\111\1\137\1\122\1\103\1\111\1\126\1\105\1\106\1\111\1\44\1\137"
+ u"\1\103\1\uffff\1\125\1\105\1\116\1\44\1\122\1\uffff\1\105\1\106"
+ u"\1\105\1\122\1\105\1\116\1\103\1\105\1\104\1\44\1\uffff"
+ )
+
+ DFA35_max = DFA.unpack(
+ u"\1\ufffe\1\uffff\1\171\1\uffff\1\75\1\170\1\167\1\165\1\145\1\124"
+ u"\2\157\1\156\3\157\1\156\3\uffff\1\116\1\125\1\117\1\116\1\117"
+ u"\1\114\1\106\1\101\4\uffff\1\75\1\71\1\75\1\76\3\75\1\uffff\2\75"
+ u"\1\76\1\75\1\174\1\uffff\1\141\1\150\1\157\1\162\1\47\1\uffff\2"
+ u"\ufffe\1\170\1\146\2\uffff\1\ufffe\2\uffff\1\160\4\uffff\1\163"
+ u"\1\164\1\165\1\151\1\162\1\172\1\157\2\164\1\101\1\154\1\163\1"
+ u"\156\1\141\1\172\1\164\1\156\1\162\1\157\1\146\1\172\1\163\3\uffff"
+ u"\1\172\2\124\1\116\1\101\1\114\1\117\1\111\1\103\34\uffff\1\75"
+ u"\2\uffff\1\75\10\uffff\1\141\1\163\1\151\1\164\1\145\3\uffff\1"
+ u"\146\1\uffff\1\146\3\uffff\3\145\1\155\2\164\1\165\1\145\1\156"
+ u"\1\162\1\157\1\151\1\165\1\124\1\141\1\144\1\145\1\164\1\162\1"
+ u"\uffff\1\172\1\147\1\172\2\141\1\142\1\uffff\1\151\1\157\1\uffff"
+ u"\1\111\1\172\1\123\1\114\1\101\1\102\1\137\1\113\4\uffff\1\163"
+ u"\1\155\1\154\1\157\1\141\1\uffff\1\144\1\172\1\162\1\172\1\143"
+ u"\1\151\1\143\1\157\1\145\1\164\1\172\1\163\1\162\1\111\1\164\2"
+ u"\172\1\151\1\164\1\172\1\uffff\1\172\1\uffff\1\164\1\165\1\154"
+ u"\1\147\1\156\1\117\1\uffff\1\124\1\111\1\124\1\101\1\122\1\120"
+ u"\1\105\1\155\1\172\1\145\1\172\1\153\1\145\1\uffff\1\156\1\uffff"
+ u"\1\150\1\143\1\164\1\146\1\144\1\172\1\uffff\1\164\1\156\1\103"
+ u"\1\151\2\uffff\1\156\1\172\2\uffff\1\172\1\154\1\145\1\156\1\172"
+ u"\1\116\1\172\1\107\1\111\1\114\1\125\1\117\1\111\1\104\1\172\1"
+ u"\uffff\1\172\1\uffff\1\172\1\146\6\172\1\uffff\1\145\2\172\1\154"
+ u"\1\165\2\uffff\1\164\1\172\1\145\1\uffff\1\101\1\uffff\1\116\1"
+ u"\114\1\137\1\116\1\117\2\172\1\137\3\uffff\1\172\6\uffff\1\162"
+ u"\2\uffff\2\145\1\172\1\uffff\1\144\1\114\2\105\1\122\2\124\2\uffff"
+ u"\1\172\1\uffff\3\172\1\uffff\2\172\1\104\1\172\1\105\1\111\1\123"
+ u"\6\uffff\1\172\1\uffff\2\115\1\105\1\uffff\1\117\1\105\1\122\1"
+ u"\126\1\123\1\126\2\105\1\111\1\137\1\122\1\103\1\111\1\126\1\105"
+ u"\1\106\1\111\1\172\1\137\1\103\1\uffff\1\125\1\105\1\116\1\172"
+ u"\1\122\1\uffff\1\105\1\106\1\105\1\122\1\105\1\116\1\103\1\105"
+ u"\1\104\1\172\1\uffff"
+ )
+
+ DFA35_accept = DFA.unpack(
+ u"\1\uffff\1\1\1\uffff\1\3\15\uffff\1\23\1\24\1\27\10\uffff\1\46"
+ u"\1\47\1\50\1\51\7\uffff\1\66\5\uffff\1\102\5\uffff\1\136\4\uffff"
+ u"\1\145\1\146\1\uffff\1\147\1\1\1\uffff\1\136\1\3\1\107\1\4\26\uffff"
+ u"\1\23\1\24\1\27\11\uffff\1\46\1\47\1\50\1\51\1\70\1\52\1\53\1\63"
+ u"\1\144\1\73\1\60\1\54\1\74\1\64\1\61\1\55\1\150\1\151\1\71\1\56"
+ u"\1\72\1\57\1\77\1\104\1\65\1\66\1\110\1\67\1\uffff\1\113\1\111"
+ u"\1\uffff\1\114\1\112\1\100\1\106\1\103\1\101\1\105\1\102\5\uffff"
+ u"\1\140\1\137\1\141\1\uffff\1\142\1\uffff\1\145\1\146\1\152\23\uffff"
+ u"\1\124\6\uffff\1\130\2\uffff\1\33\10\uffff\1\75\1\115\1\76\1\116"
+ u"\5\uffff\1\143\24\uffff\1\15\1\uffff\1\131\6\uffff\1\34\15\uffff"
+ u"\1\125\1\uffff\1\30\6\uffff\1\7\4\uffff\1\12\1\122\2\uffff\1\13"
+ u"\1\16\17\uffff\1\120\1\uffff\1\132\10\uffff\1\14\5\uffff\1\31\1"
+ u"\17\3\uffff\1\26\1\uffff\1\36\10\uffff\1\121\1\127\1\134\1\uffff"
+ u"\1\5\1\126\1\6\1\25\1\62\1\21\1\uffff\1\135\1\11\3\uffff\1\20\7"
+ u"\uffff\1\42\1\45\1\uffff\1\2\3\uffff\1\123\7\uffff\1\117\1\10\1"
+ u"\32\1\133\1\22\1\35\1\uffff\1\40\3\uffff\1\37\24\uffff\1\43\5\uffff"
+ u"\1\44\12\uffff\1\41"
+ )
+
+ DFA35_special = DFA.unpack(
+ u"\u0192\uffff"
+ )
+
+
+ DFA35_transition = [
+ DFA.unpack(u"\6\73\2\70\1\73\2\70\22\73\1\70\1\50\1\65\1\72\1\63"
+ u"\1\45\1\46\1\64\1\34\1\35\1\40\1\42\1\3\1\43\1\41\1\44\1\66\11"
+ u"\67\1\23\1\1\1\51\1\4\1\52\1\55\1\73\2\63\1\26\1\63\1\32\1\63\1"
+ u"\31\1\63\1\24\2\63\1\62\2\63\1\25\1\33\2\63\1\11\1\63\1\27\1\30"
+ u"\4\63\1\36\1\71\1\37\1\53\1\56\1\73\1\7\1\61\1\13\1\17\1\5\1\16"
+ u"\1\60\1\63\1\14\2\63\1\15\5\63\1\10\1\6\1\2\1\20\1\12\1\57\3\63"
+ u"\1\21\1\54\1\22\1\47\uff80\73"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\75"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\100"),
+ DFA.unpack(u"\1\102\1\uffff\1\104\11\uffff\1\103"),
+ DFA.unpack(u"\1\110\1\107\12\uffff\1\106\2\uffff\1\105"),
+ DFA.unpack(u"\1\111"),
+ DFA.unpack(u"\1\112"),
+ DFA.unpack(u"\1\113"),
+ DFA.unpack(u"\1\114"),
+ DFA.unpack(u"\1\115\6\uffff\1\117\6\uffff\1\116"),
+ DFA.unpack(u"\1\120\7\uffff\1\121"),
+ DFA.unpack(u"\1\122"),
+ DFA.unpack(u"\1\124\2\uffff\1\123"),
+ DFA.unpack(u"\1\125\11\uffff\1\126"),
+ DFA.unpack(u"\1\127"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\133"),
+ DFA.unpack(u"\1\134\4\uffff\1\135"),
+ DFA.unpack(u"\1\136"),
+ DFA.unpack(u"\1\137"),
+ DFA.unpack(u"\1\140"),
+ DFA.unpack(u"\1\141"),
+ DFA.unpack(u"\1\142"),
+ DFA.unpack(u"\1\143"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\150"),
+ DFA.unpack(u"\1\152\1\uffff\12\154"),
+ DFA.unpack(u"\1\156\21\uffff\1\155"),
+ DFA.unpack(u"\1\162\17\uffff\1\160\1\161"),
+ DFA.unpack(u"\1\164\4\uffff\1\165\15\uffff\1\166"),
+ DFA.unpack(u"\1\170"),
+ DFA.unpack(u"\1\173\26\uffff\1\172"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\176"),
+ DFA.unpack(u"\1\u0080\1\u0081"),
+ DFA.unpack(u"\1\u0084\1\u0083"),
+ DFA.unpack(u"\1\u0086"),
+ DFA.unpack(u"\1\u0089\76\uffff\1\u0088"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u008c\1\uffff\1\u008d"),
+ DFA.unpack(u"\1\u008e"),
+ DFA.unpack(u"\1\u008f"),
+ DFA.unpack(u"\1\u0090"),
+ DFA.unpack(u"\1\u0091\4\uffff\1\u0092"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\47\u0092\1\uffff\uffd7\u0092"),
+ DFA.unpack(u"\uffff\u0091"),
+ DFA.unpack(u"\1\154\1\uffff\10\u0094\2\154\12\uffff\3\154\21\uffff"
+ u"\1\u0093\13\uffff\3\154\21\uffff\1\u0093"),
+ DFA.unpack(u"\1\154\1\uffff\12\u0096\12\uffff\3\154\35\uffff\3\154"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\uffff\u0099"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u009a"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u009b"),
+ DFA.unpack(u"\1\u009c"),
+ DFA.unpack(u"\1\u009d"),
+ DFA.unpack(u"\1\u009e"),
+ DFA.unpack(u"\1\u009f\20\uffff\1\u00a0"),
+ DFA.unpack(u"\1\u00a2\22\uffff\1\u00a1"),
+ DFA.unpack(u"\1\u00a3"),
+ DFA.unpack(u"\1\u00a4"),
+ DFA.unpack(u"\1\u00a5\14\uffff\1\u00a6"),
+ DFA.unpack(u"\1\u00a7"),
+ DFA.unpack(u"\1\u00a9\2\uffff\1\u00a8"),
+ DFA.unpack(u"\1\u00aa"),
+ DFA.unpack(u"\1\u00ab"),
+ DFA.unpack(u"\1\u00ac"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u00ae"),
+ DFA.unpack(u"\1\u00af"),
+ DFA.unpack(u"\1\u00b0"),
+ DFA.unpack(u"\1\u00b1"),
+ DFA.unpack(u"\1\u00b2"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\24\76\1\u00b3\5\76"),
+ DFA.unpack(u"\1\u00b6\11\uffff\1\u00b5"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u00b8"),
+ DFA.unpack(u"\1\u00b9"),
+ DFA.unpack(u"\1\u00ba"),
+ DFA.unpack(u"\1\u00bb"),
+ DFA.unpack(u"\1\u00bc"),
+ DFA.unpack(u"\1\u00bd"),
+ DFA.unpack(u"\1\u00be"),
+ DFA.unpack(u"\1\u00bf"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00c0"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00c2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00c4"),
+ DFA.unpack(u"\1\u00c5"),
+ DFA.unpack(u"\1\u00c6"),
+ DFA.unpack(u"\1\u00c7"),
+ DFA.unpack(u"\1\u00c8"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\154\1\uffff\10\u0094\2\154\12\uffff\3\154\35\uffff"
+ u"\3\154"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\154\1\uffff\12\u0096\12\uffff\3\154\35\uffff\3\154"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00ca"),
+ DFA.unpack(u"\1\u00cb"),
+ DFA.unpack(u"\1\u00cc"),
+ DFA.unpack(u"\1\u00cd"),
+ DFA.unpack(u"\1\u00ce"),
+ DFA.unpack(u"\1\u00cf"),
+ DFA.unpack(u"\1\u00d0"),
+ DFA.unpack(u"\1\u00d1"),
+ DFA.unpack(u"\1\u00d2"),
+ DFA.unpack(u"\1\u00d3"),
+ DFA.unpack(u"\1\u00d4"),
+ DFA.unpack(u"\1\u00d5"),
+ DFA.unpack(u"\1\u00d6"),
+ DFA.unpack(u"\1\u00d7"),
+ DFA.unpack(u"\1\u00d8"),
+ DFA.unpack(u"\1\u00d9"),
+ DFA.unpack(u"\1\u00da"),
+ DFA.unpack(u"\1\u00dc\1\u00db"),
+ DFA.unpack(u"\1\u00dd"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u00df"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u00e1"),
+ DFA.unpack(u"\1\u00e2"),
+ DFA.unpack(u"\1\u00e3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00e4"),
+ DFA.unpack(u"\1\u00e5"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00e6"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u00e8"),
+ DFA.unpack(u"\1\u00e9"),
+ DFA.unpack(u"\1\u00ea"),
+ DFA.unpack(u"\1\u00eb"),
+ DFA.unpack(u"\1\u00ed\35\uffff\1\u00ec"),
+ DFA.unpack(u"\1\u00ee"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00ef"),
+ DFA.unpack(u"\1\u00f0"),
+ DFA.unpack(u"\1\u00f1"),
+ DFA.unpack(u"\1\u00f2"),
+ DFA.unpack(u"\1\u00f3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00f4"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u00f6"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u00f8"),
+ DFA.unpack(u"\1\u00f9"),
+ DFA.unpack(u"\1\u00fa"),
+ DFA.unpack(u"\1\u00fb"),
+ DFA.unpack(u"\1\u00fc"),
+ DFA.unpack(u"\1\u00fd"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u00ff"),
+ DFA.unpack(u"\1\u0100"),
+ DFA.unpack(u"\1\u0101"),
+ DFA.unpack(u"\1\u0102"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0105"),
+ DFA.unpack(u"\1\u0106"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0109"),
+ DFA.unpack(u"\1\u010a"),
+ DFA.unpack(u"\1\u010b"),
+ DFA.unpack(u"\1\u010c"),
+ DFA.unpack(u"\1\u010d"),
+ DFA.unpack(u"\1\u010e"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u010f"),
+ DFA.unpack(u"\1\u0110"),
+ DFA.unpack(u"\1\u0111"),
+ DFA.unpack(u"\1\u0112"),
+ DFA.unpack(u"\1\u0114\17\uffff\1\u0113"),
+ DFA.unpack(u"\1\u0115"),
+ DFA.unpack(u"\1\u0116"),
+ DFA.unpack(u"\1\u0117"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0119"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u011b"),
+ DFA.unpack(u"\1\u011c"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u011d"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u011e"),
+ DFA.unpack(u"\1\u011f"),
+ DFA.unpack(u"\1\u0120"),
+ DFA.unpack(u"\1\u0121"),
+ DFA.unpack(u"\1\u0122"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0124"),
+ DFA.unpack(u"\1\u0125"),
+ DFA.unpack(u"\1\u0126"),
+ DFA.unpack(u"\1\u0127"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0128"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u012b"),
+ DFA.unpack(u"\1\u012c"),
+ DFA.unpack(u"\1\u012d"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u012f"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0131"),
+ DFA.unpack(u"\1\u0132"),
+ DFA.unpack(u"\1\u0133"),
+ DFA.unpack(u"\1\u0134"),
+ DFA.unpack(u"\1\u0135"),
+ DFA.unpack(u"\1\u0136"),
+ DFA.unpack(u"\1\u0137"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\u0138\1"
+ u"\uffff\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u013c"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0143"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0146"),
+ DFA.unpack(u"\1\u0147"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0148"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u014a"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u014b"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u014c"),
+ DFA.unpack(u"\1\u014d"),
+ DFA.unpack(u"\1\u014e"),
+ DFA.unpack(u"\1\u014f"),
+ DFA.unpack(u"\1\u0150"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0153"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0155"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0156"),
+ DFA.unpack(u"\1\u0157"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0159"),
+ DFA.unpack(u"\1\u015a"),
+ DFA.unpack(u"\1\u015b"),
+ DFA.unpack(u"\1\u015c"),
+ DFA.unpack(u"\1\u015d"),
+ DFA.unpack(u"\1\u015e"),
+ DFA.unpack(u"\1\u015f"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0166"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0168"),
+ DFA.unpack(u"\1\u0169"),
+ DFA.unpack(u"\1\u016a"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u016c"),
+ DFA.unpack(u"\1\u016d"),
+ DFA.unpack(u"\1\u016e"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u016f"),
+ DFA.unpack(u"\1\u0170"),
+ DFA.unpack(u"\1\u0171"),
+ DFA.unpack(u"\1\u0172"),
+ DFA.unpack(u"\1\u0173"),
+ DFA.unpack(u"\1\u0174"),
+ DFA.unpack(u"\1\u0175"),
+ DFA.unpack(u"\1\u0176"),
+ DFA.unpack(u"\1\u0177"),
+ DFA.unpack(u"\1\u0178"),
+ DFA.unpack(u"\1\u0179"),
+ DFA.unpack(u"\1\u017a"),
+ DFA.unpack(u"\1\u017b"),
+ DFA.unpack(u"\1\u017c"),
+ DFA.unpack(u"\1\u017d"),
+ DFA.unpack(u"\1\u017e"),
+ DFA.unpack(u"\1\u017f"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0181"),
+ DFA.unpack(u"\1\u0182"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0183"),
+ DFA.unpack(u"\1\u0184"),
+ DFA.unpack(u"\1\u0185"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"\1\u0187"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0188"),
+ DFA.unpack(u"\1\u0189"),
+ DFA.unpack(u"\1\u018a"),
+ DFA.unpack(u"\1\u018b"),
+ DFA.unpack(u"\1\u018c"),
+ DFA.unpack(u"\1\u018d"),
+ DFA.unpack(u"\1\u018e"),
+ DFA.unpack(u"\1\u018f"),
+ DFA.unpack(u"\1\u0190"),
+ DFA.unpack(u"\1\76\13\uffff\12\76\7\uffff\32\76\4\uffff\1\76\1\uffff"
+ u"\32\76"),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #35
+
+ DFA35 = DFA
+
+
diff --git a/BaseTools/Source/Python/Eot/CParser.py b/BaseTools/Source/Python/Eot/CParser.py
new file mode 100644
index 0000000000..e56a79a43d
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/CParser.py
@@ -0,0 +1,18844 @@
+# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53
+
+from antlr3 import *
+from antlr3.compat import set, frozenset
+
+## @file
+# The file defines the parser for C source files.
+#
+# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.
+# This file is generated by running:
+# java org.antlr.Tool C.g
+#
+# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+#
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at:
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+import CodeFragment
+import FileProfile
+
+
+
+# for convenience in actions
+HIDDEN = BaseRecognizer.HIDDEN
+
+# token types
+BS=20
+LINE_COMMENT=23
+FloatTypeSuffix=16
+IntegerTypeSuffix=14
+LETTER=11
+OCTAL_LITERAL=6
+CHARACTER_LITERAL=8
+Exponent=15
+EOF=-1
+HexDigit=13
+STRING_LITERAL=9
+WS=19
+FLOATING_POINT_LITERAL=10
+IDENTIFIER=4
+UnicodeEscape=18
+LINE_COMMAND=24
+UnicodeVocabulary=21
+HEX_LITERAL=5
+COMMENT=22
+DECIMAL_LITERAL=7
+EscapeSequence=12
+OctalEscape=17
+
+# token names
+tokenNames = [
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>",
+ "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL",
+ "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence",
+ "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape",
+ "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT",
+ "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'",
+ "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'",
+ "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'",
+ "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'",
+ "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'",
+ "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'",
+ "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'",
+ "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='",
+ "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='",
+ "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='",
+ "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'",
+ "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'",
+ "'goto'", "'continue'", "'break'", "'return'"
+]
+
+
+class function_definition_scope(object):
+ def __init__(self):
+ self.ModifierText = None
+ self.DeclText = None
+ self.LBLine = None
+ self.LBOffset = None
+ self.DeclLine = None
+ self.DeclOffset = None
+class postfix_expression_scope(object):
+ def __init__(self):
+ self.FuncCallText = None
+
+
+class CParser(Parser):
+ grammarFileName = "C.g"
+ tokenNames = tokenNames
+
+ def __init__(self, input):
+ Parser.__init__(self, input)
+ self.ruleMemo = {}
+
+ self.function_definition_stack = []
+ self.postfix_expression_stack = []
+
+
+
+
+
+
+
+
+ def printTokenInfo(self, line, offset, tokenText):
+ print str(line)+ ',' + str(offset) + ':' + str(tokenText)
+
+ def StorePredicateExpression(self, StartLine, StartOffset, EndLine, EndOffset, Text):
+ PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset))
+ FileProfile.PredicateExpressionList.append(PredExp)
+
+ def StoreEnumerationDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text):
+ EnumDef = CodeFragment.EnumerationDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))
+ FileProfile.EnumerationDefinitionList.append(EnumDef)
+
+ def StoreStructUnionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text):
+ SUDef = CodeFragment.StructUnionDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))
+ FileProfile.StructUnionDefinitionList.append(SUDef)
+
+ def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText):
+ Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset))
+ FileProfile.TypedefDefinitionList.append(Tdef)
+
+ def StoreFunctionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText, LeftBraceLine, LeftBraceOffset, DeclLine, DeclOffset):
+ FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset), (LeftBraceLine, LeftBraceOffset), (DeclLine, DeclOffset))
+ FileProfile.FunctionDefinitionList.append(FuncDef)
+
+ def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText):
+ VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset))
+ FileProfile.VariableDeclarationList.append(VarDecl)
+
+ def StoreFunctionCalling(self, StartLine, StartOffset, EndLine, EndOffset, FuncName, ParamList):
+ FuncCall = CodeFragment.FunctionCalling(FuncName, ParamList, (StartLine, StartOffset), (EndLine, EndOffset))
+ FileProfile.FunctionCallingList.append(FuncCall)
+
+
+
+
+ # $ANTLR start translation_unit
+ # C.g:102:1: translation_unit : ( external_declaration )* ;
+ def translation_unit(self, ):
+
+ translation_unit_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 1):
+ return
+
+ # C.g:103:2: ( ( external_declaration )* )
+ # C.g:103:4: ( external_declaration )*
+ # C.g:103:4: ( external_declaration )*
+ while True: #loop1
+ alt1 = 2
+ LA1_0 = self.input.LA(1)
+
+ if (LA1_0 == IDENTIFIER or LA1_0 == 26 or (29 <= LA1_0 <= 42) or (45 <= LA1_0 <= 46) or (48 <= LA1_0 <= 62) or LA1_0 == 66) :
+ alt1 = 1
+
+
+ if alt1 == 1:
+ # C.g:0:0: external_declaration
+ self.following.append(self.FOLLOW_external_declaration_in_translation_unit74)
+ self.external_declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop1
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 1, translation_unit_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end translation_unit
+
+
+ # $ANTLR start external_declaration
+ # C.g:114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );
+ def external_declaration(self, ):
+
+ external_declaration_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 2):
+ return
+
+ # C.g:119:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? )
+ alt3 = 3
+ LA3_0 = self.input.LA(1)
+
+ if ((29 <= LA3_0 <= 33)) :
+ LA3_1 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 1, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 34) :
+ LA3_2 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 2, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 35) :
+ LA3_3 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 3, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 36) :
+ LA3_4 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 4, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 37) :
+ LA3_5 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 5, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 38) :
+ LA3_6 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 6, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 39) :
+ LA3_7 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 7, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 40) :
+ LA3_8 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 8, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 41) :
+ LA3_9 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 9, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 42) :
+ LA3_10 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 10, self.input)
+
+ raise nvae
+
+ elif ((45 <= LA3_0 <= 46)) :
+ LA3_11 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 11, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 48) :
+ LA3_12 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 12, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == IDENTIFIER) :
+ LA3_13 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ elif (True) :
+ alt3 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 13, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 58) :
+ LA3_14 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 14, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 66) and (self.synpred4()):
+ alt3 = 1
+ elif (LA3_0 == 59) :
+ LA3_16 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 16, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 60) :
+ LA3_17 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 17, self.input)
+
+ raise nvae
+
+ elif ((49 <= LA3_0 <= 57) or LA3_0 == 61) :
+ LA3_18 = self.input.LA(2)
+
+ if (self.synpred4()) :
+ alt3 = 1
+ elif (self.synpred5()) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 18, self.input)
+
+ raise nvae
+
+ elif (LA3_0 == 62) and (self.synpred4()):
+ alt3 = 1
+ elif (LA3_0 == 26) :
+ alt3 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 0, self.input)
+
+ raise nvae
+
+ if alt3 == 1:
+ # C.g:119:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition
+ self.following.append(self.FOLLOW_function_definition_in_external_declaration113)
+ self.function_definition()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt3 == 2:
+ # C.g:120:4: declaration
+ self.following.append(self.FOLLOW_declaration_in_external_declaration118)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt3 == 3:
+ # C.g:121:4: macro_statement ( ';' )?
+ self.following.append(self.FOLLOW_macro_statement_in_external_declaration123)
+ self.macro_statement()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:121:20: ( ';' )?
+ alt2 = 2
+ LA2_0 = self.input.LA(1)
+
+ if (LA2_0 == 25) :
+ alt2 = 1
+ if alt2 == 1:
+ # C.g:121:21: ';'
+ self.match(self.input, 25, self.FOLLOW_25_in_external_declaration126)
+ if self.failed:
+ return
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 2, external_declaration_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end external_declaration
+
+ class function_definition_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start function_definition
+ # C.g:126:1: function_definition : (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement ) ;
+ def function_definition(self, ):
+ self.function_definition_stack.append(function_definition_scope())
+ retval = self.function_definition_return()
+ retval.start = self.input.LT(1)
+ function_definition_StartIndex = self.input.index()
+ d = None
+
+ a = None
+
+ b = None
+
+ declarator1 = None
+
+
+
+ self.function_definition_stack[-1].ModifierText = ''
+ self.function_definition_stack[-1].DeclText = ''
+ self.function_definition_stack[-1].LBLine = 0
+ self.function_definition_stack[-1].LBOffset = 0
+ self.function_definition_stack[-1].DeclLine = 0
+ self.function_definition_stack[-1].DeclOffset = 0
+
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 3):
+ return retval
+
+ # C.g:146:2: ( (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement ) )
+ # C.g:146:4: (d= declaration_specifiers )? declarator ( ( declaration )+ a= compound_statement | b= compound_statement )
+ # C.g:146:5: (d= declaration_specifiers )?
+ alt4 = 2
+ LA4 = self.input.LA(1)
+ if LA4 == 29 or LA4 == 30 or LA4 == 31 or LA4 == 32 or LA4 == 33 or LA4 == 34 or LA4 == 35 or LA4 == 36 or LA4 == 37 or LA4 == 38 or LA4 == 39 or LA4 == 40 or LA4 == 41 or LA4 == 42 or LA4 == 45 or LA4 == 46 or LA4 == 48 or LA4 == 49 or LA4 == 50 or LA4 == 51 or LA4 == 52 or LA4 == 53 or LA4 == 54 or LA4 == 55 or LA4 == 56 or LA4 == 57 or LA4 == 61:
+ alt4 = 1
+ elif LA4 == IDENTIFIER:
+ LA4 = self.input.LA(2)
+ if LA4 == 66:
+ alt4 = 1
+ elif LA4 == 58:
+ LA4_21 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 59:
+ LA4_22 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 60:
+ LA4_23 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == IDENTIFIER:
+ LA4_24 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 62:
+ LA4_25 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 29 or LA4 == 30 or LA4 == 31 or LA4 == 32 or LA4 == 33:
+ LA4_26 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 34:
+ LA4_27 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 35:
+ LA4_28 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 36:
+ LA4_29 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 37:
+ LA4_30 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 38:
+ LA4_31 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 39:
+ LA4_32 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 40:
+ LA4_33 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 41:
+ LA4_34 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 42:
+ LA4_35 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 45 or LA4 == 46:
+ LA4_36 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 48:
+ LA4_37 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 49 or LA4 == 50 or LA4 == 51 or LA4 == 52 or LA4 == 53 or LA4 == 54 or LA4 == 55 or LA4 == 56 or LA4 == 57 or LA4 == 61:
+ LA4_38 = self.input.LA(3)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 58:
+ LA4_14 = self.input.LA(2)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 59:
+ LA4_16 = self.input.LA(2)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ elif LA4 == 60:
+ LA4_17 = self.input.LA(2)
+
+ if (self.synpred7()) :
+ alt4 = 1
+ if alt4 == 1:
+ # C.g:0:0: d= declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_function_definition157)
+ d = self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+
+ self.following.append(self.FOLLOW_declarator_in_function_definition160)
+ declarator1 = self.declarator()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:147:3: ( ( declaration )+ a= compound_statement | b= compound_statement )
+ alt6 = 2
+ LA6_0 = self.input.LA(1)
+
+ if (LA6_0 == IDENTIFIER or LA6_0 == 26 or (29 <= LA6_0 <= 42) or (45 <= LA6_0 <= 46) or (48 <= LA6_0 <= 61)) :
+ alt6 = 1
+ elif (LA6_0 == 43) :
+ alt6 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("147:3: ( ( declaration )+ a= compound_statement | b= compound_statement )", 6, 0, self.input)
+
+ raise nvae
+
+ if alt6 == 1:
+ # C.g:147:5: ( declaration )+ a= compound_statement
+ # C.g:147:5: ( declaration )+
+ cnt5 = 0
+ while True: #loop5
+ alt5 = 2
+ LA5_0 = self.input.LA(1)
+
+ if (LA5_0 == IDENTIFIER or LA5_0 == 26 or (29 <= LA5_0 <= 42) or (45 <= LA5_0 <= 46) or (48 <= LA5_0 <= 61)) :
+ alt5 = 1
+
+
+ if alt5 == 1:
+ # C.g:0:0: declaration
+ self.following.append(self.FOLLOW_declaration_in_function_definition166)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ else:
+ if cnt5 >= 1:
+ break #loop5
+
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ eee = EarlyExitException(5, self.input)
+ raise eee
+
+ cnt5 += 1
+
+
+ self.following.append(self.FOLLOW_compound_statement_in_function_definition171)
+ a = self.compound_statement()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ elif alt6 == 2:
+ # C.g:148:5: b= compound_statement
+ self.following.append(self.FOLLOW_compound_statement_in_function_definition180)
+ b = self.compound_statement()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+
+ if self.backtracking == 0:
+
+ if d != None:
+ self.function_definition_stack[-1].ModifierText = self.input.toString(d.start,d.stop)
+ else:
+ self.function_definition_stack[-1].ModifierText = ''
+ self.function_definition_stack[-1].DeclText = self.input.toString(declarator1.start,declarator1.stop)
+ self.function_definition_stack[-1].DeclLine = declarator1.start.line
+ self.function_definition_stack[-1].DeclOffset = declarator1.start.charPositionInLine
+ if a != None:
+ self.function_definition_stack[-1].LBLine = a.start.line
+ self.function_definition_stack[-1].LBOffset = a.start.charPositionInLine
+ else:
+ self.function_definition_stack[-1].LBLine = b.start.line
+ self.function_definition_stack[-1].LBOffset = b.start.charPositionInLine
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self.backtracking == 0:
+
+ self.StoreFunctionDefinition(retval.start.line, retval.start.charPositionInLine, retval.stop.line, retval.stop.charPositionInLine, self.function_definition_stack[-1].ModifierText, self.function_definition_stack[-1].DeclText, self.function_definition_stack[-1].LBLine, self.function_definition_stack[-1].LBOffset, self.function_definition_stack[-1].DeclLine, self.function_definition_stack[-1].DeclOffset)
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 3, function_definition_StartIndex)
+
+ self.function_definition_stack.pop()
+ pass
+
+ return retval
+
+ # $ANTLR end function_definition
+
+
+ # $ANTLR start declaration
+ # C.g:166:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );
+ def declaration(self, ):
+
+ declaration_StartIndex = self.input.index()
+ a = None
+ d = None
+ e = None
+ b = None
+
+ c = None
+
+ s = None
+
+ t = None
+
+
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 4):
+ return
+
+ # C.g:167:2: (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' )
+ alt9 = 2
+ LA9_0 = self.input.LA(1)
+
+ if (LA9_0 == 26) :
+ alt9 = 1
+ elif (LA9_0 == IDENTIFIER or (29 <= LA9_0 <= 42) or (45 <= LA9_0 <= 46) or (48 <= LA9_0 <= 61)) :
+ alt9 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("166:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );", 9, 0, self.input)
+
+ raise nvae
+
+ if alt9 == 1:
+ # C.g:167:4: a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';'
+ a = self.input.LT(1)
+ self.match(self.input, 26, self.FOLLOW_26_in_declaration203)
+ if self.failed:
+ return
+ # C.g:167:17: (b= declaration_specifiers )?
+ alt7 = 2
+ LA7 = self.input.LA(1)
+ if LA7 == 29 or LA7 == 30 or LA7 == 31 or LA7 == 32 or LA7 == 33 or LA7 == 34 or LA7 == 35 or LA7 == 36 or LA7 == 37 or LA7 == 38 or LA7 == 39 or LA7 == 40 or LA7 == 41 or LA7 == 42 or LA7 == 45 or LA7 == 46 or LA7 == 48 or LA7 == 49 or LA7 == 50 or LA7 == 51 or LA7 == 52 or LA7 == 53 or LA7 == 54 or LA7 == 55 or LA7 == 56 or LA7 == 57 or LA7 == 61:
+ alt7 = 1
+ elif LA7 == IDENTIFIER:
+ LA7_13 = self.input.LA(2)
+
+ if (LA7_13 == 62) :
+ LA7_21 = self.input.LA(3)
+
+ if (self.synpred10()) :
+ alt7 = 1
+ elif (LA7_13 == IDENTIFIER or (29 <= LA7_13 <= 42) or (45 <= LA7_13 <= 46) or (48 <= LA7_13 <= 61) or LA7_13 == 66) :
+ alt7 = 1
+ elif LA7 == 58:
+ LA7_14 = self.input.LA(2)
+
+ if (self.synpred10()) :
+ alt7 = 1
+ elif LA7 == 59:
+ LA7_16 = self.input.LA(2)
+
+ if (self.synpred10()) :
+ alt7 = 1
+ elif LA7 == 60:
+ LA7_17 = self.input.LA(2)
+
+ if (self.synpred10()) :
+ alt7 = 1
+ if alt7 == 1:
+ # C.g:0:0: b= declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_declaration207)
+ b = self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ self.following.append(self.FOLLOW_init_declarator_list_in_declaration216)
+ c = self.init_declarator_list()
+ self.following.pop()
+ if self.failed:
+ return
+ d = self.input.LT(1)
+ self.match(self.input, 25, self.FOLLOW_25_in_declaration220)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+
+ if b != None:
+ self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, self.input.toString(b.start,b.stop), self.input.toString(c.start,c.stop))
+ else:
+ self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, '', self.input.toString(c.start,c.stop))
+
+
+
+
+ elif alt9 == 2:
+ # C.g:175:4: s= declaration_specifiers (t= init_declarator_list )? e= ';'
+ self.following.append(self.FOLLOW_declaration_specifiers_in_declaration234)
+ s = self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:175:30: (t= init_declarator_list )?
+ alt8 = 2
+ LA8_0 = self.input.LA(1)
+
+ if (LA8_0 == IDENTIFIER or (58 <= LA8_0 <= 60) or LA8_0 == 62 or LA8_0 == 66) :
+ alt8 = 1
+ if alt8 == 1:
+ # C.g:0:0: t= init_declarator_list
+ self.following.append(self.FOLLOW_init_declarator_list_in_declaration238)
+ t = self.init_declarator_list()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ e = self.input.LT(1)
+ self.match(self.input, 25, self.FOLLOW_25_in_declaration243)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+
+ if t != None:
+ self.StoreVariableDeclaration(s.start.line, s.start.charPositionInLine, t.start.line, t.start.charPositionInLine, self.input.toString(s.start,s.stop), self.input.toString(t.start,t.stop))
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 4, declaration_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end declaration
+
+ class declaration_specifiers_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start declaration_specifiers
+ # C.g:182:1: declaration_specifiers : ( storage_class_specifier | type_specifier | type_qualifier )+ ;
+ def declaration_specifiers(self, ):
+
+ retval = self.declaration_specifiers_return()
+ retval.start = self.input.LT(1)
+ declaration_specifiers_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 5):
+ return retval
+
+ # C.g:183:2: ( ( storage_class_specifier | type_specifier | type_qualifier )+ )
+ # C.g:183:6: ( storage_class_specifier | type_specifier | type_qualifier )+
+ # C.g:183:6: ( storage_class_specifier | type_specifier | type_qualifier )+
+ cnt10 = 0
+ while True: #loop10
+ alt10 = 4
+ LA10 = self.input.LA(1)
+ if LA10 == 58:
+ LA10_2 = self.input.LA(2)
+
+ if (self.synpred15()) :
+ alt10 = 3
+
+
+ elif LA10 == 59:
+ LA10_3 = self.input.LA(2)
+
+ if (self.synpred15()) :
+ alt10 = 3
+
+
+ elif LA10 == 60:
+ LA10_4 = self.input.LA(2)
+
+ if (self.synpred15()) :
+ alt10 = 3
+
+
+ elif LA10 == IDENTIFIER:
+ LA10_5 = self.input.LA(2)
+
+ if (self.synpred14()) :
+ alt10 = 2
+
+
+ elif LA10 == 53:
+ LA10_9 = self.input.LA(2)
+
+ if (self.synpred15()) :
+ alt10 = 3
+
+
+ elif LA10 == 29 or LA10 == 30 or LA10 == 31 or LA10 == 32 or LA10 == 33:
+ alt10 = 1
+ elif LA10 == 34 or LA10 == 35 or LA10 == 36 or LA10 == 37 or LA10 == 38 or LA10 == 39 or LA10 == 40 or LA10 == 41 or LA10 == 42 or LA10 == 45 or LA10 == 46 or LA10 == 48:
+ alt10 = 2
+ elif LA10 == 49 or LA10 == 50 or LA10 == 51 or LA10 == 52 or LA10 == 54 or LA10 == 55 or LA10 == 56 or LA10 == 57 or LA10 == 61:
+ alt10 = 3
+
+ if alt10 == 1:
+ # C.g:183:10: storage_class_specifier
+ self.following.append(self.FOLLOW_storage_class_specifier_in_declaration_specifiers264)
+ self.storage_class_specifier()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ elif alt10 == 2:
+ # C.g:184:7: type_specifier
+ self.following.append(self.FOLLOW_type_specifier_in_declaration_specifiers272)
+ self.type_specifier()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ elif alt10 == 3:
+ # C.g:185:13: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_declaration_specifiers286)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ else:
+ if cnt10 >= 1:
+ break #loop10
+
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ eee = EarlyExitException(10, self.input)
+ raise eee
+
+ cnt10 += 1
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 5, declaration_specifiers_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end declaration_specifiers
+
+ class init_declarator_list_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start init_declarator_list
+ # C.g:189:1: init_declarator_list : init_declarator ( ',' init_declarator )* ;
+ def init_declarator_list(self, ):
+
+ retval = self.init_declarator_list_return()
+ retval.start = self.input.LT(1)
+ init_declarator_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 6):
+ return retval
+
+ # C.g:190:2: ( init_declarator ( ',' init_declarator )* )
+ # C.g:190:4: init_declarator ( ',' init_declarator )*
+ self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list308)
+ self.init_declarator()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:190:20: ( ',' init_declarator )*
+ while True: #loop11
+ alt11 = 2
+ LA11_0 = self.input.LA(1)
+
+ if (LA11_0 == 27) :
+ alt11 = 1
+
+
+ if alt11 == 1:
+ # C.g:190:21: ',' init_declarator
+ self.match(self.input, 27, self.FOLLOW_27_in_init_declarator_list311)
+ if self.failed:
+ return retval
+ self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list313)
+ self.init_declarator()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ else:
+ break #loop11
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 6, init_declarator_list_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end init_declarator_list
+
+
+ # $ANTLR start init_declarator
+ # C.g:193:1: init_declarator : declarator ( '=' initializer )? ;
+ def init_declarator(self, ):
+
+ init_declarator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 7):
+ return
+
+ # C.g:194:2: ( declarator ( '=' initializer )? )
+ # C.g:194:4: declarator ( '=' initializer )?
+ self.following.append(self.FOLLOW_declarator_in_init_declarator326)
+ self.declarator()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:194:15: ( '=' initializer )?
+ alt12 = 2
+ LA12_0 = self.input.LA(1)
+
+ if (LA12_0 == 28) :
+ alt12 = 1
+ if alt12 == 1:
+ # C.g:194:16: '=' initializer
+ self.match(self.input, 28, self.FOLLOW_28_in_init_declarator329)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_initializer_in_init_declarator331)
+ self.initializer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 7, init_declarator_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end init_declarator
+
+
+ # $ANTLR start storage_class_specifier
+ # C.g:197:1: storage_class_specifier : ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' );
+ def storage_class_specifier(self, ):
+
+ storage_class_specifier_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 8):
+ return
+
+ # C.g:198:2: ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' )
+ # C.g:
+ if (29 <= self.input.LA(1) <= 33):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_storage_class_specifier0
+ )
+ raise mse
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 8, storage_class_specifier_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end storage_class_specifier
+
+
+ # $ANTLR start type_specifier
+ # C.g:205:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );
+ def type_specifier(self, ):
+
+ type_specifier_StartIndex = self.input.index()
+ s = None
+
+ e = None
+
+
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 9):
+ return
+
+ # C.g:206:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id )
+ alt13 = 12
+ LA13_0 = self.input.LA(1)
+
+ if (LA13_0 == 34) :
+ alt13 = 1
+ elif (LA13_0 == 35) :
+ alt13 = 2
+ elif (LA13_0 == 36) :
+ alt13 = 3
+ elif (LA13_0 == 37) :
+ alt13 = 4
+ elif (LA13_0 == 38) :
+ alt13 = 5
+ elif (LA13_0 == 39) :
+ alt13 = 6
+ elif (LA13_0 == 40) :
+ alt13 = 7
+ elif (LA13_0 == 41) :
+ alt13 = 8
+ elif (LA13_0 == 42) :
+ alt13 = 9
+ elif ((45 <= LA13_0 <= 46)) :
+ alt13 = 10
+ elif (LA13_0 == 48) :
+ alt13 = 11
+ elif (LA13_0 == IDENTIFIER) and (self.synpred34()):
+ alt13 = 12
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("205:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );", 13, 0, self.input)
+
+ raise nvae
+
+ if alt13 == 1:
+ # C.g:206:4: 'void'
+ self.match(self.input, 34, self.FOLLOW_34_in_type_specifier376)
+ if self.failed:
+ return
+
+
+ elif alt13 == 2:
+ # C.g:207:4: 'char'
+ self.match(self.input, 35, self.FOLLOW_35_in_type_specifier381)
+ if self.failed:
+ return
+
+
+ elif alt13 == 3:
+ # C.g:208:4: 'short'
+ self.match(self.input, 36, self.FOLLOW_36_in_type_specifier386)
+ if self.failed:
+ return
+
+
+ elif alt13 == 4:
+ # C.g:209:4: 'int'
+ self.match(self.input, 37, self.FOLLOW_37_in_type_specifier391)
+ if self.failed:
+ return
+
+
+ elif alt13 == 5:
+ # C.g:210:4: 'long'
+ self.match(self.input, 38, self.FOLLOW_38_in_type_specifier396)
+ if self.failed:
+ return
+
+
+ elif alt13 == 6:
+ # C.g:211:4: 'float'
+ self.match(self.input, 39, self.FOLLOW_39_in_type_specifier401)
+ if self.failed:
+ return
+
+
+ elif alt13 == 7:
+ # C.g:212:4: 'double'
+ self.match(self.input, 40, self.FOLLOW_40_in_type_specifier406)
+ if self.failed:
+ return
+
+
+ elif alt13 == 8:
+ # C.g:213:4: 'signed'
+ self.match(self.input, 41, self.FOLLOW_41_in_type_specifier411)
+ if self.failed:
+ return
+
+
+ elif alt13 == 9:
+ # C.g:214:4: 'unsigned'
+ self.match(self.input, 42, self.FOLLOW_42_in_type_specifier416)
+ if self.failed:
+ return
+
+
+ elif alt13 == 10:
+ # C.g:215:4: s= struct_or_union_specifier
+ self.following.append(self.FOLLOW_struct_or_union_specifier_in_type_specifier423)
+ s = self.struct_or_union_specifier()
+ self.following.pop()
+ if self.failed:
+ return
+ if self.backtracking == 0:
+
+ if s.stop != None:
+ self.StoreStructUnionDefinition(s.start.line, s.start.charPositionInLine, s.stop.line, s.stop.charPositionInLine, self.input.toString(s.start,s.stop))
+
+
+
+
+ elif alt13 == 11:
+ # C.g:220:4: e= enum_specifier
+ self.following.append(self.FOLLOW_enum_specifier_in_type_specifier433)
+ e = self.enum_specifier()
+ self.following.pop()
+ if self.failed:
+ return
+ if self.backtracking == 0:
+
+ if e.stop != None:
+ self.StoreEnumerationDefinition(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
+
+
+
+
+ elif alt13 == 12:
+ # C.g:225:4: ( IDENTIFIER ( type_qualifier )* declarator )=> type_id
+ self.following.append(self.FOLLOW_type_id_in_type_specifier451)
+ self.type_id()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 9, type_specifier_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end type_specifier
+
+
+ # $ANTLR start type_id
+ # C.g:228:1: type_id : IDENTIFIER ;
+ def type_id(self, ):
+
+ type_id_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 10):
+ return
+
+ # C.g:229:5: ( IDENTIFIER )
+ # C.g:229:9: IDENTIFIER
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id467)
+ if self.failed:
+ return
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 10, type_id_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end type_id
+
+ class struct_or_union_specifier_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start struct_or_union_specifier
+ # C.g:233:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );
+ def struct_or_union_specifier(self, ):
+
+ retval = self.struct_or_union_specifier_return()
+ retval.start = self.input.LT(1)
+ struct_or_union_specifier_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 11):
+ return retval
+
+ # C.g:235:2: ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER )
+ alt15 = 2
+ LA15_0 = self.input.LA(1)
+
+ if ((45 <= LA15_0 <= 46)) :
+ LA15_1 = self.input.LA(2)
+
+ if (LA15_1 == IDENTIFIER) :
+ LA15_2 = self.input.LA(3)
+
+ if (LA15_2 == 43) :
+ alt15 = 1
+ elif (LA15_2 == EOF or LA15_2 == IDENTIFIER or LA15_2 == 25 or LA15_2 == 27 or (29 <= LA15_2 <= 42) or (45 <= LA15_2 <= 64) or LA15_2 == 66) :
+ alt15 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("233:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 2, self.input)
+
+ raise nvae
+
+ elif (LA15_1 == 43) :
+ alt15 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("233:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 1, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("233:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 0, self.input)
+
+ raise nvae
+
+ if alt15 == 1:
+ # C.g:235:4: struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}'
+ self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier494)
+ self.struct_or_union()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:235:20: ( IDENTIFIER )?
+ alt14 = 2
+ LA14_0 = self.input.LA(1)
+
+ if (LA14_0 == IDENTIFIER) :
+ alt14 = 1
+ if alt14 == 1:
+ # C.g:0:0: IDENTIFIER
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier496)
+ if self.failed:
+ return retval
+
+
+
+ self.match(self.input, 43, self.FOLLOW_43_in_struct_or_union_specifier499)
+ if self.failed:
+ return retval
+ self.following.append(self.FOLLOW_struct_declaration_list_in_struct_or_union_specifier501)
+ self.struct_declaration_list()
+ self.following.pop()
+ if self.failed:
+ return retval
+ self.match(self.input, 44, self.FOLLOW_44_in_struct_or_union_specifier503)
+ if self.failed:
+ return retval
+
+
+ elif alt15 == 2:
+ # C.g:236:4: struct_or_union IDENTIFIER
+ self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier508)
+ self.struct_or_union()
+ self.following.pop()
+ if self.failed:
+ return retval
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier510)
+ if self.failed:
+ return retval
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 11, struct_or_union_specifier_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end struct_or_union_specifier
+
+
+ # $ANTLR start struct_or_union
+ # C.g:239:1: struct_or_union : ( 'struct' | 'union' );
+ def struct_or_union(self, ):
+
+ struct_or_union_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 12):
+ return
+
+ # C.g:240:2: ( 'struct' | 'union' )
+ # C.g:
+ if (45 <= self.input.LA(1) <= 46):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_struct_or_union0
+ )
+ raise mse
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 12, struct_or_union_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end struct_or_union
+
+
+ # $ANTLR start struct_declaration_list
+ # C.g:244:1: struct_declaration_list : ( struct_declaration )+ ;
+ def struct_declaration_list(self, ):
+
+ struct_declaration_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 13):
+ return
+
+ # C.g:245:2: ( ( struct_declaration )+ )
+ # C.g:245:4: ( struct_declaration )+
+ # C.g:245:4: ( struct_declaration )+
+ cnt16 = 0
+ while True: #loop16
+ alt16 = 2
+ LA16_0 = self.input.LA(1)
+
+ if (LA16_0 == IDENTIFIER or (34 <= LA16_0 <= 42) or (45 <= LA16_0 <= 46) or (48 <= LA16_0 <= 61)) :
+ alt16 = 1
+
+
+ if alt16 == 1:
+ # C.g:0:0: struct_declaration
+ self.following.append(self.FOLLOW_struct_declaration_in_struct_declaration_list537)
+ self.struct_declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ if cnt16 >= 1:
+ break #loop16
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(16, self.input)
+ raise eee
+
+ cnt16 += 1
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 13, struct_declaration_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end struct_declaration_list
+
+
+ # $ANTLR start struct_declaration
+ # C.g:248:1: struct_declaration : specifier_qualifier_list struct_declarator_list ';' ;
+ def struct_declaration(self, ):
+
+ struct_declaration_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 14):
+ return
+
+ # C.g:249:2: ( specifier_qualifier_list struct_declarator_list ';' )
+ # C.g:249:4: specifier_qualifier_list struct_declarator_list ';'
+ self.following.append(self.FOLLOW_specifier_qualifier_list_in_struct_declaration549)
+ self.specifier_qualifier_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration551)
+ self.struct_declarator_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 25, self.FOLLOW_25_in_struct_declaration553)
+ if self.failed:
+ return
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 14, struct_declaration_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end struct_declaration
+
+
+ # $ANTLR start specifier_qualifier_list
+ # C.g:252:1: specifier_qualifier_list : ( type_qualifier | type_specifier )+ ;
+ def specifier_qualifier_list(self, ):
+
+ specifier_qualifier_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 15):
+ return
+
+ # C.g:253:2: ( ( type_qualifier | type_specifier )+ )
+ # C.g:253:4: ( type_qualifier | type_specifier )+
+ # C.g:253:4: ( type_qualifier | type_specifier )+
+ cnt17 = 0
+ while True: #loop17
+ alt17 = 3
+ LA17 = self.input.LA(1)
+ if LA17 == 58:
+ LA17_2 = self.input.LA(2)
+
+ if (self.synpred39()) :
+ alt17 = 1
+
+
+ elif LA17 == 59:
+ LA17_3 = self.input.LA(2)
+
+ if (self.synpred39()) :
+ alt17 = 1
+
+
+ elif LA17 == 60:
+ LA17_4 = self.input.LA(2)
+
+ if (self.synpred39()) :
+ alt17 = 1
+
+
+ elif LA17 == IDENTIFIER:
+ LA17 = self.input.LA(2)
+ if LA17 == EOF or LA17 == IDENTIFIER or LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 41 or LA17 == 42 or LA17 == 45 or LA17 == 46 or LA17 == 48 or LA17 == 49 or LA17 == 50 or LA17 == 51 or LA17 == 52 or LA17 == 53 or LA17 == 54 or LA17 == 55 or LA17 == 56 or LA17 == 57 or LA17 == 58 or LA17 == 59 or LA17 == 60 or LA17 == 61 or LA17 == 63 or LA17 == 66:
+ alt17 = 2
+ elif LA17 == 62:
+ LA17_94 = self.input.LA(3)
+
+ if (self.synpred40()) :
+ alt17 = 2
+
+
+ elif LA17 == 47:
+ LA17_95 = self.input.LA(3)
+
+ if (self.synpred40()) :
+ alt17 = 2
+
+
+ elif LA17 == 64:
+ LA17_96 = self.input.LA(3)
+
+ if (self.synpred40()) :
+ alt17 = 2
+
+
+
+ elif LA17 == 49 or LA17 == 50 or LA17 == 51 or LA17 == 52 or LA17 == 53 or LA17 == 54 or LA17 == 55 or LA17 == 56 or LA17 == 57 or LA17 == 61:
+ alt17 = 1
+ elif LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 41 or LA17 == 42 or LA17 == 45 or LA17 == 46 or LA17 == 48:
+ alt17 = 2
+
+ if alt17 == 1:
+ # C.g:253:6: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_specifier_qualifier_list566)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt17 == 2:
+ # C.g:253:23: type_specifier
+ self.following.append(self.FOLLOW_type_specifier_in_specifier_qualifier_list570)
+ self.type_specifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ if cnt17 >= 1:
+ break #loop17
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(17, self.input)
+ raise eee
+
+ cnt17 += 1
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 15, specifier_qualifier_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end specifier_qualifier_list
+
+
+ # $ANTLR start struct_declarator_list
+ # C.g:256:1: struct_declarator_list : struct_declarator ( ',' struct_declarator )* ;
+ def struct_declarator_list(self, ):
+
+ struct_declarator_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 16):
+ return
+
+ # C.g:257:2: ( struct_declarator ( ',' struct_declarator )* )
+ # C.g:257:4: struct_declarator ( ',' struct_declarator )*
+ self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list584)
+ self.struct_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:257:22: ( ',' struct_declarator )*
+ while True: #loop18
+ alt18 = 2
+ LA18_0 = self.input.LA(1)
+
+ if (LA18_0 == 27) :
+ alt18 = 1
+
+
+ if alt18 == 1:
+ # C.g:257:23: ',' struct_declarator
+ self.match(self.input, 27, self.FOLLOW_27_in_struct_declarator_list587)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list589)
+ self.struct_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop18
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 16, struct_declarator_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end struct_declarator_list
+
+
+ # $ANTLR start struct_declarator
+ # C.g:260:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );
+ def struct_declarator(self, ):
+
+ struct_declarator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 17):
+ return
+
+ # C.g:261:2: ( declarator ( ':' constant_expression )? | ':' constant_expression )
+ alt20 = 2
+ LA20_0 = self.input.LA(1)
+
+ if (LA20_0 == IDENTIFIER or (58 <= LA20_0 <= 60) or LA20_0 == 62 or LA20_0 == 66) :
+ alt20 = 1
+ elif (LA20_0 == 47) :
+ alt20 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("260:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 20, 0, self.input)
+
+ raise nvae
+
+ if alt20 == 1:
+ # C.g:261:4: declarator ( ':' constant_expression )?
+ self.following.append(self.FOLLOW_declarator_in_struct_declarator602)
+ self.declarator()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:261:15: ( ':' constant_expression )?
+ alt19 = 2
+ LA19_0 = self.input.LA(1)
+
+ if (LA19_0 == 47) :
+ alt19 = 1
+ if alt19 == 1:
+ # C.g:261:16: ':' constant_expression
+ self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator605)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_constant_expression_in_struct_declarator607)
+ self.constant_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+ elif alt20 == 2:
+ # C.g:262:4: ':' constant_expression
+ self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator614)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_constant_expression_in_struct_declarator616)
+ self.constant_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 17, struct_declarator_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end struct_declarator
+
+ class enum_specifier_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start enum_specifier
+ # C.g:265:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );
+ def enum_specifier(self, ):
+
+ retval = self.enum_specifier_return()
+ retval.start = self.input.LT(1)
+ enum_specifier_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 18):
+ return retval
+
+ # C.g:267:2: ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER )
+ alt23 = 3
+ LA23_0 = self.input.LA(1)
+
+ if (LA23_0 == 48) :
+ LA23_1 = self.input.LA(2)
+
+ if (LA23_1 == IDENTIFIER) :
+ LA23_2 = self.input.LA(3)
+
+ if (LA23_2 == 43) :
+ alt23 = 2
+ elif (LA23_2 == EOF or LA23_2 == IDENTIFIER or LA23_2 == 25 or LA23_2 == 27 or (29 <= LA23_2 <= 42) or (45 <= LA23_2 <= 64) or LA23_2 == 66) :
+ alt23 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("265:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 2, self.input)
+
+ raise nvae
+
+ elif (LA23_1 == 43) :
+ alt23 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("265:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 1, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("265:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}' | 'enum' IDENTIFIER );", 23, 0, self.input)
+
+ raise nvae
+
+ if alt23 == 1:
+ # C.g:267:4: 'enum' '{' enumerator_list ( ',' )? '}'
+ self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier634)
+ if self.failed:
+ return retval
+ self.match(self.input, 43, self.FOLLOW_43_in_enum_specifier636)
+ if self.failed:
+ return retval
+ self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier638)
+ self.enumerator_list()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:267:31: ( ',' )?
+ alt21 = 2
+ LA21_0 = self.input.LA(1)
+
+ if (LA21_0 == 27) :
+ alt21 = 1
+ if alt21 == 1:
+ # C.g:0:0: ','
+ self.match(self.input, 27, self.FOLLOW_27_in_enum_specifier640)
+ if self.failed:
+ return retval
+
+
+
+ self.match(self.input, 44, self.FOLLOW_44_in_enum_specifier643)
+ if self.failed:
+ return retval
+
+
+ elif alt23 == 2:
+ # C.g:268:4: 'enum' IDENTIFIER '{' enumerator_list ( ',' )? '}'
+ self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier648)
+ if self.failed:
+ return retval
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier650)
+ if self.failed:
+ return retval
+ self.match(self.input, 43, self.FOLLOW_43_in_enum_specifier652)
+ if self.failed:
+ return retval
+ self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier654)
+ self.enumerator_list()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:268:42: ( ',' )?
+ alt22 = 2
+ LA22_0 = self.input.LA(1)
+
+ if (LA22_0 == 27) :
+ alt22 = 1
+ if alt22 == 1:
+ # C.g:0:0: ','
+ self.match(self.input, 27, self.FOLLOW_27_in_enum_specifier656)
+ if self.failed:
+ return retval
+
+
+
+ self.match(self.input, 44, self.FOLLOW_44_in_enum_specifier659)
+ if self.failed:
+ return retval
+
+
+ elif alt23 == 3:
+ # C.g:269:4: 'enum' IDENTIFIER
+ self.match(self.input, 48, self.FOLLOW_48_in_enum_specifier664)
+ if self.failed:
+ return retval
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier666)
+ if self.failed:
+ return retval
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 18, enum_specifier_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end enum_specifier
+
+
+ # $ANTLR start enumerator_list
+ # C.g:272:1: enumerator_list : enumerator ( ',' enumerator )* ;
+ def enumerator_list(self, ):
+
+ enumerator_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 19):
+ return
+
+ # C.g:273:2: ( enumerator ( ',' enumerator )* )
+ # C.g:273:4: enumerator ( ',' enumerator )*
+ self.following.append(self.FOLLOW_enumerator_in_enumerator_list677)
+ self.enumerator()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:273:15: ( ',' enumerator )*
+ while True: #loop24
+ alt24 = 2
+ LA24_0 = self.input.LA(1)
+
+ if (LA24_0 == 27) :
+ LA24_1 = self.input.LA(2)
+
+ if (LA24_1 == IDENTIFIER) :
+ alt24 = 1
+
+
+
+
+ if alt24 == 1:
+ # C.g:273:16: ',' enumerator
+ self.match(self.input, 27, self.FOLLOW_27_in_enumerator_list680)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_enumerator_in_enumerator_list682)
+ self.enumerator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop24
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 19, enumerator_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end enumerator_list
+
+
+ # $ANTLR start enumerator
+ # C.g:276:1: enumerator : IDENTIFIER ( '=' constant_expression )? ;
+ def enumerator(self, ):
+
+ enumerator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 20):
+ return
+
+ # C.g:277:2: ( IDENTIFIER ( '=' constant_expression )? )
+ # C.g:277:4: IDENTIFIER ( '=' constant_expression )?
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator695)
+ if self.failed:
+ return
+ # C.g:277:15: ( '=' constant_expression )?
+ alt25 = 2
+ LA25_0 = self.input.LA(1)
+
+ if (LA25_0 == 28) :
+ alt25 = 1
+ if alt25 == 1:
+ # C.g:277:16: '=' constant_expression
+ self.match(self.input, 28, self.FOLLOW_28_in_enumerator698)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_constant_expression_in_enumerator700)
+ self.constant_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 20, enumerator_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end enumerator
+
+
+ # $ANTLR start type_qualifier
+ # C.g:280:1: type_qualifier : ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' | 'PACKED' );
+ def type_qualifier(self, ):
+
+ type_qualifier_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 21):
+ return
+
+ # C.g:281:2: ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' | 'PACKED' )
+ # C.g:
+ if (49 <= self.input.LA(1) <= 61):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_type_qualifier0
+ )
+ raise mse
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 21, type_qualifier_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end type_qualifier
+
+ class declarator_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start declarator
+ # C.g:296:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );
+ def declarator(self, ):
+
+ retval = self.declarator_return()
+ retval.start = self.input.LT(1)
+ declarator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 22):
+ return retval
+
+ # C.g:297:2: ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer )
+ alt30 = 2
+ LA30_0 = self.input.LA(1)
+
+ if (LA30_0 == 66) :
+ LA30_1 = self.input.LA(2)
+
+ if (self.synpred66()) :
+ alt30 = 1
+ elif (True) :
+ alt30 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("296:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );", 30, 1, self.input)
+
+ raise nvae
+
+ elif (LA30_0 == IDENTIFIER or (58 <= LA30_0 <= 60) or LA30_0 == 62) :
+ alt30 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("296:1: declarator : ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator | pointer );", 30, 0, self.input)
+
+ raise nvae
+
+ if alt30 == 1:
+ # C.g:297:4: ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator
+ # C.g:297:4: ( pointer )?
+ alt26 = 2
+ LA26_0 = self.input.LA(1)
+
+ if (LA26_0 == 66) :
+ alt26 = 1
+ if alt26 == 1:
+ # C.g:0:0: pointer
+ self.following.append(self.FOLLOW_pointer_in_declarator784)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+
+ # C.g:297:13: ( 'EFIAPI' )?
+ alt27 = 2
+ LA27_0 = self.input.LA(1)
+
+ if (LA27_0 == 58) :
+ alt27 = 1
+ if alt27 == 1:
+ # C.g:297:14: 'EFIAPI'
+ self.match(self.input, 58, self.FOLLOW_58_in_declarator788)
+ if self.failed:
+ return retval
+
+
+
+ # C.g:297:25: ( 'EFI_BOOTSERVICE' )?
+ alt28 = 2
+ LA28_0 = self.input.LA(1)
+
+ if (LA28_0 == 59) :
+ alt28 = 1
+ if alt28 == 1:
+ # C.g:297:26: 'EFI_BOOTSERVICE'
+ self.match(self.input, 59, self.FOLLOW_59_in_declarator793)
+ if self.failed:
+ return retval
+
+
+
+ # C.g:297:46: ( 'EFI_RUNTIMESERVICE' )?
+ alt29 = 2
+ LA29_0 = self.input.LA(1)
+
+ if (LA29_0 == 60) :
+ alt29 = 1
+ if alt29 == 1:
+ # C.g:297:47: 'EFI_RUNTIMESERVICE'
+ self.match(self.input, 60, self.FOLLOW_60_in_declarator798)
+ if self.failed:
+ return retval
+
+
+
+ self.following.append(self.FOLLOW_direct_declarator_in_declarator802)
+ self.direct_declarator()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ elif alt30 == 2:
+ # C.g:299:4: pointer
+ self.following.append(self.FOLLOW_pointer_in_declarator808)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 22, declarator_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end declarator
+
+
+ # $ANTLR start direct_declarator
+ # C.g:302:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );
+ def direct_declarator(self, ):
+
+ direct_declarator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 23):
+ return
+
+ # C.g:303:2: ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ )
+ alt34 = 2
+ LA34_0 = self.input.LA(1)
+
+ if (LA34_0 == IDENTIFIER) :
+ alt34 = 1
+ elif (LA34_0 == 62) :
+ alt34 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("302:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );", 34, 0, self.input)
+
+ raise nvae
+
+ if alt34 == 1:
+ # C.g:303:4: IDENTIFIER ( declarator_suffix )*
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator819)
+ if self.failed:
+ return
+ # C.g:303:15: ( declarator_suffix )*
+ while True: #loop31
+ alt31 = 2
+ LA31_0 = self.input.LA(1)
+
+ if (LA31_0 == 62) :
+ LA31 = self.input.LA(2)
+ if LA31 == 63:
+ LA31_30 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 58:
+ LA31_31 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 66:
+ LA31_32 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 59:
+ LA31_33 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 60:
+ LA31_34 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == IDENTIFIER:
+ LA31_35 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 29 or LA31 == 30 or LA31 == 31 or LA31 == 32 or LA31 == 33:
+ LA31_37 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 34:
+ LA31_38 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 35:
+ LA31_39 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 36:
+ LA31_40 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 37:
+ LA31_41 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 38:
+ LA31_42 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 39:
+ LA31_43 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 40:
+ LA31_44 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 41:
+ LA31_45 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 42:
+ LA31_46 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 45 or LA31 == 46:
+ LA31_47 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 48:
+ LA31_48 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 49 or LA31 == 50 or LA31 == 51 or LA31 == 52 or LA31 == 53 or LA31 == 54 or LA31 == 55 or LA31 == 56 or LA31 == 57 or LA31 == 61:
+ LA31_49 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+
+ elif (LA31_0 == 64) :
+ LA31 = self.input.LA(2)
+ if LA31 == 65:
+ LA31_51 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 62:
+ LA31_52 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == IDENTIFIER:
+ LA31_53 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == HEX_LITERAL:
+ LA31_54 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == OCTAL_LITERAL:
+ LA31_55 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == DECIMAL_LITERAL:
+ LA31_56 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == CHARACTER_LITERAL:
+ LA31_57 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == STRING_LITERAL:
+ LA31_58 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == FLOATING_POINT_LITERAL:
+ LA31_59 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 72:
+ LA31_60 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 73:
+ LA31_61 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 66 or LA31 == 68 or LA31 == 69 or LA31 == 77 or LA31 == 78 or LA31 == 79:
+ LA31_62 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+ elif LA31 == 74:
+ LA31_63 = self.input.LA(3)
+
+ if (self.synpred67()) :
+ alt31 = 1
+
+
+
+
+
+ if alt31 == 1:
+ # C.g:0:0: declarator_suffix
+ self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator821)
+ self.declarator_suffix()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop31
+
+
+
+
+ elif alt34 == 2:
+ # C.g:304:4: '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+
+ self.match(self.input, 62, self.FOLLOW_62_in_direct_declarator827)
+ if self.failed:
+ return
+ # C.g:304:8: ( 'EFIAPI' )?
+ alt32 = 2
+ LA32_0 = self.input.LA(1)
+
+ if (LA32_0 == 58) :
+ LA32_1 = self.input.LA(2)
+
+ if (self.synpred69()) :
+ alt32 = 1
+ if alt32 == 1:
+ # C.g:304:9: 'EFIAPI'
+ self.match(self.input, 58, self.FOLLOW_58_in_direct_declarator830)
+ if self.failed:
+ return
+
+
+
+ self.following.append(self.FOLLOW_declarator_in_direct_declarator834)
+ self.declarator()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_direct_declarator836)
+ if self.failed:
+ return
+ # C.g:304:35: ( declarator_suffix )+
+ cnt33 = 0
+ while True: #loop33
+ alt33 = 2
+ LA33_0 = self.input.LA(1)
+
+ if (LA33_0 == 62) :
+ LA33 = self.input.LA(2)
+ if LA33 == 63:
+ LA33_30 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 58:
+ LA33_31 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 66:
+ LA33_32 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 59:
+ LA33_33 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 60:
+ LA33_34 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == IDENTIFIER:
+ LA33_35 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 29 or LA33 == 30 or LA33 == 31 or LA33 == 32 or LA33 == 33:
+ LA33_37 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 34:
+ LA33_38 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 35:
+ LA33_39 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 36:
+ LA33_40 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 37:
+ LA33_41 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 38:
+ LA33_42 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 39:
+ LA33_43 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 40:
+ LA33_44 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 41:
+ LA33_45 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 42:
+ LA33_46 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 45 or LA33 == 46:
+ LA33_47 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 48:
+ LA33_48 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 49 or LA33 == 50 or LA33 == 51 or LA33 == 52 or LA33 == 53 or LA33 == 54 or LA33 == 55 or LA33 == 56 or LA33 == 57 or LA33 == 61:
+ LA33_49 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+
+ elif (LA33_0 == 64) :
+ LA33 = self.input.LA(2)
+ if LA33 == 65:
+ LA33_51 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 62:
+ LA33_52 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == IDENTIFIER:
+ LA33_53 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == HEX_LITERAL:
+ LA33_54 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == OCTAL_LITERAL:
+ LA33_55 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == DECIMAL_LITERAL:
+ LA33_56 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == CHARACTER_LITERAL:
+ LA33_57 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == STRING_LITERAL:
+ LA33_58 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == FLOATING_POINT_LITERAL:
+ LA33_59 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 72:
+ LA33_60 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 73:
+ LA33_61 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 66 or LA33 == 68 or LA33 == 69 or LA33 == 77 or LA33 == 78 or LA33 == 79:
+ LA33_62 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+ elif LA33 == 74:
+ LA33_63 = self.input.LA(3)
+
+ if (self.synpred70()) :
+ alt33 = 1
+
+
+
+
+
+ if alt33 == 1:
+ # C.g:0:0: declarator_suffix
+ self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator838)
+ self.declarator_suffix()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ if cnt33 >= 1:
+ break #loop33
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(33, self.input)
+ raise eee
+
+ cnt33 += 1
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 23, direct_declarator_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end direct_declarator
+
+
+ # $ANTLR start declarator_suffix
+ # C.g:307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );
+ def declarator_suffix(self, ):
+
+ declarator_suffix_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 24):
+ return
+
+ # C.g:308:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' )
+ alt35 = 5
+ LA35_0 = self.input.LA(1)
+
+ if (LA35_0 == 64) :
+ LA35_1 = self.input.LA(2)
+
+ if (LA35_1 == 65) :
+ alt35 = 2
+ elif ((IDENTIFIER <= LA35_1 <= FLOATING_POINT_LITERAL) or LA35_1 == 62 or LA35_1 == 66 or (68 <= LA35_1 <= 69) or (72 <= LA35_1 <= 74) or (77 <= LA35_1 <= 79)) :
+ alt35 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 1, self.input)
+
+ raise nvae
+
+ elif (LA35_0 == 62) :
+ LA35 = self.input.LA(2)
+ if LA35 == 63:
+ alt35 = 5
+ elif LA35 == 29 or LA35 == 30 or LA35 == 31 or LA35 == 32 or LA35 == 33 or LA35 == 34 or LA35 == 35 or LA35 == 36 or LA35 == 37 or LA35 == 38 or LA35 == 39 or LA35 == 40 or LA35 == 41 or LA35 == 42 or LA35 == 45 or LA35 == 46 or LA35 == 48 or LA35 == 49 or LA35 == 50 or LA35 == 51 or LA35 == 52 or LA35 == 53 or LA35 == 54 or LA35 == 55 or LA35 == 56 or LA35 == 57 or LA35 == 58 or LA35 == 59 or LA35 == 60 or LA35 == 61 or LA35 == 66:
+ alt35 = 3
+ elif LA35 == IDENTIFIER:
+ LA35_29 = self.input.LA(3)
+
+ if (self.synpred73()) :
+ alt35 = 3
+ elif (self.synpred74()) :
+ alt35 = 4
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 29, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 2, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 0, self.input)
+
+ raise nvae
+
+ if alt35 == 1:
+ # C.g:308:6: '[' constant_expression ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix852)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix854)
+ self.constant_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix856)
+ if self.failed:
+ return
+
+
+ elif alt35 == 2:
+ # C.g:309:9: '[' ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix866)
+ if self.failed:
+ return
+ self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix868)
+ if self.failed:
+ return
+
+
+ elif alt35 == 3:
+ # C.g:310:9: '(' parameter_type_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix878)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix880)
+ self.parameter_type_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix882)
+ if self.failed:
+ return
+
+
+ elif alt35 == 4:
+ # C.g:311:9: '(' identifier_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix892)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix894)
+ self.identifier_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix896)
+ if self.failed:
+ return
+
+
+ elif alt35 == 5:
+ # C.g:312:9: '(' ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix906)
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix908)
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 24, declarator_suffix_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end declarator_suffix
+
+
+ # $ANTLR start pointer
+ # C.g:315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );
+ def pointer(self, ):
+
+ pointer_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 25):
+ return
+
+ # C.g:316:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' )
+ alt38 = 3
+ LA38_0 = self.input.LA(1)
+
+ if (LA38_0 == 66) :
+ LA38 = self.input.LA(2)
+ if LA38 == 66:
+ LA38_2 = self.input.LA(3)
+
+ if (self.synpred78()) :
+ alt38 = 2
+ elif (True) :
+ alt38 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 2, self.input)
+
+ raise nvae
+
+ elif LA38 == 58:
+ LA38_3 = self.input.LA(3)
+
+ if (self.synpred77()) :
+ alt38 = 1
+ elif (True) :
+ alt38 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 3, self.input)
+
+ raise nvae
+
+ elif LA38 == 59:
+ LA38_4 = self.input.LA(3)
+
+ if (self.synpred77()) :
+ alt38 = 1
+ elif (True) :
+ alt38 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 4, self.input)
+
+ raise nvae
+
+ elif LA38 == 60:
+ LA38_5 = self.input.LA(3)
+
+ if (self.synpred77()) :
+ alt38 = 1
+ elif (True) :
+ alt38 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 5, self.input)
+
+ raise nvae
+
+ elif LA38 == EOF or LA38 == IDENTIFIER or LA38 == 25 or LA38 == 26 or LA38 == 27 or LA38 == 28 or LA38 == 29 or LA38 == 30 or LA38 == 31 or LA38 == 32 or LA38 == 33 or LA38 == 34 or LA38 == 35 or LA38 == 36 or LA38 == 37 or LA38 == 38 or LA38 == 39 or LA38 == 40 or LA38 == 41 or LA38 == 42 or LA38 == 43 or LA38 == 45 or LA38 == 46 or LA38 == 47 or LA38 == 48 or LA38 == 62 or LA38 == 63 or LA38 == 64:
+ alt38 = 3
+ elif LA38 == 53:
+ LA38_21 = self.input.LA(3)
+
+ if (self.synpred77()) :
+ alt38 = 1
+ elif (True) :
+ alt38 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 21, self.input)
+
+ raise nvae
+
+ elif LA38 == 49 or LA38 == 50 or LA38 == 51 or LA38 == 52 or LA38 == 54 or LA38 == 55 or LA38 == 56 or LA38 == 57 or LA38 == 61:
+ LA38_29 = self.input.LA(3)
+
+ if (self.synpred77()) :
+ alt38 = 1
+ elif (True) :
+ alt38 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 29, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 1, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 0, self.input)
+
+ raise nvae
+
+ if alt38 == 1:
+ # C.g:316:4: '*' ( type_qualifier )+ ( pointer )?
+ self.match(self.input, 66, self.FOLLOW_66_in_pointer919)
+ if self.failed:
+ return
+ # C.g:316:8: ( type_qualifier )+
+ cnt36 = 0
+ while True: #loop36
+ alt36 = 2
+ LA36 = self.input.LA(1)
+ if LA36 == 58:
+ LA36_2 = self.input.LA(2)
+
+ if (self.synpred75()) :
+ alt36 = 1
+
+
+ elif LA36 == 59:
+ LA36_3 = self.input.LA(2)
+
+ if (self.synpred75()) :
+ alt36 = 1
+
+
+ elif LA36 == 60:
+ LA36_4 = self.input.LA(2)
+
+ if (self.synpred75()) :
+ alt36 = 1
+
+
+ elif LA36 == 53:
+ LA36_20 = self.input.LA(2)
+
+ if (self.synpred75()) :
+ alt36 = 1
+
+
+ elif LA36 == 49 or LA36 == 50 or LA36 == 51 or LA36 == 52 or LA36 == 54 or LA36 == 55 or LA36 == 56 or LA36 == 57 or LA36 == 61:
+ LA36_28 = self.input.LA(2)
+
+ if (self.synpred75()) :
+ alt36 = 1
+
+
+
+ if alt36 == 1:
+ # C.g:0:0: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_pointer921)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ if cnt36 >= 1:
+ break #loop36
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(36, self.input)
+ raise eee
+
+ cnt36 += 1
+
+
+ # C.g:316:24: ( pointer )?
+ alt37 = 2
+ LA37_0 = self.input.LA(1)
+
+ if (LA37_0 == 66) :
+ LA37_1 = self.input.LA(2)
+
+ if (self.synpred76()) :
+ alt37 = 1
+ if alt37 == 1:
+ # C.g:0:0: pointer
+ self.following.append(self.FOLLOW_pointer_in_pointer924)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+ elif alt38 == 2:
+ # C.g:317:4: '*' pointer
+ self.match(self.input, 66, self.FOLLOW_66_in_pointer930)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_pointer_in_pointer932)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt38 == 3:
+ # C.g:318:4: '*'
+ self.match(self.input, 66, self.FOLLOW_66_in_pointer937)
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 25, pointer_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end pointer
+
+
+ # $ANTLR start parameter_type_list
+ # C.g:321:1: parameter_type_list : parameter_list ( ',' ( 'OPTIONAL' )? '...' )? ;
+ def parameter_type_list(self, ):
+
+ parameter_type_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 26):
+ return
+
+ # C.g:322:2: ( parameter_list ( ',' ( 'OPTIONAL' )? '...' )? )
+ # C.g:322:4: parameter_list ( ',' ( 'OPTIONAL' )? '...' )?
+ self.following.append(self.FOLLOW_parameter_list_in_parameter_type_list948)
+ self.parameter_list()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:322:19: ( ',' ( 'OPTIONAL' )? '...' )?
+ alt40 = 2
+ LA40_0 = self.input.LA(1)
+
+ if (LA40_0 == 27) :
+ alt40 = 1
+ if alt40 == 1:
+ # C.g:322:20: ',' ( 'OPTIONAL' )? '...'
+ self.match(self.input, 27, self.FOLLOW_27_in_parameter_type_list951)
+ if self.failed:
+ return
+ # C.g:322:24: ( 'OPTIONAL' )?
+ alt39 = 2
+ LA39_0 = self.input.LA(1)
+
+ if (LA39_0 == 53) :
+ alt39 = 1
+ if alt39 == 1:
+ # C.g:322:25: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_parameter_type_list954)
+ if self.failed:
+ return
+
+
+
+ self.match(self.input, 67, self.FOLLOW_67_in_parameter_type_list958)
+ if self.failed:
+ return
+
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 26, parameter_type_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end parameter_type_list
+
+
+ # $ANTLR start parameter_list
+ # C.g:325:1: parameter_list : parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* ;
+ def parameter_list(self, ):
+
+ parameter_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 27):
+ return
+
+ # C.g:326:2: ( parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* )
+ # C.g:326:4: parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )*
+ self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list971)
+ self.parameter_declaration()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:326:26: ( ',' ( 'OPTIONAL' )? parameter_declaration )*
+ while True: #loop42
+ alt42 = 2
+ LA42_0 = self.input.LA(1)
+
+ if (LA42_0 == 27) :
+ LA42_1 = self.input.LA(2)
+
+ if (LA42_1 == 53) :
+ LA42_3 = self.input.LA(3)
+
+ if (self.synpred82()) :
+ alt42 = 1
+
+
+ elif (LA42_1 == IDENTIFIER or (29 <= LA42_1 <= 42) or (45 <= LA42_1 <= 46) or (48 <= LA42_1 <= 52) or (54 <= LA42_1 <= 61) or LA42_1 == 66) :
+ alt42 = 1
+
+
+
+
+ if alt42 == 1:
+ # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
+ self.match(self.input, 27, self.FOLLOW_27_in_parameter_list974)
+ if self.failed:
+ return
+ # C.g:326:31: ( 'OPTIONAL' )?
+ alt41 = 2
+ LA41_0 = self.input.LA(1)
+
+ if (LA41_0 == 53) :
+ LA41_1 = self.input.LA(2)
+
+ if (self.synpred81()) :
+ alt41 = 1
+ if alt41 == 1:
+ # C.g:326:32: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_parameter_list977)
+ if self.failed:
+ return
+
+
+
+ self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list981)
+ self.parameter_declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop42
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 27, parameter_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end parameter_list
+
+
+ # $ANTLR start parameter_declaration
+ # C.g:329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );
+ def parameter_declaration(self, ):
+
+ parameter_declaration_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 28):
+ return
+
+ # C.g:330:2: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER )
+ alt46 = 2
+ LA46 = self.input.LA(1)
+ if LA46 == 29 or LA46 == 30 or LA46 == 31 or LA46 == 32 or LA46 == 33 or LA46 == 34 or LA46 == 35 or LA46 == 36 or LA46 == 37 or LA46 == 38 or LA46 == 39 or LA46 == 40 or LA46 == 41 or LA46 == 42 or LA46 == 45 or LA46 == 46 or LA46 == 48 or LA46 == 49 or LA46 == 50 or LA46 == 51 or LA46 == 52 or LA46 == 53 or LA46 == 54 or LA46 == 55 or LA46 == 56 or LA46 == 57 or LA46 == 58 or LA46 == 59 or LA46 == 60 or LA46 == 61:
+ alt46 = 1
+ elif LA46 == IDENTIFIER:
+ LA46_13 = self.input.LA(2)
+
+ if (self.synpred86()) :
+ alt46 = 1
+ elif (True) :
+ alt46 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 13, self.input)
+
+ raise nvae
+
+ elif LA46 == 66:
+ alt46 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 0, self.input)
+
+ raise nvae
+
+ if alt46 == 1:
+ # C.g:330:4: declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )?
+ self.following.append(self.FOLLOW_declaration_specifiers_in_parameter_declaration994)
+ self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:330:27: ( declarator | abstract_declarator )*
+ while True: #loop43
+ alt43 = 3
+ LA43 = self.input.LA(1)
+ if LA43 == 66:
+ LA43_5 = self.input.LA(2)
+
+ if (self.synpred83()) :
+ alt43 = 1
+ elif (self.synpred84()) :
+ alt43 = 2
+
+
+ elif LA43 == IDENTIFIER or LA43 == 58 or LA43 == 59 or LA43 == 60:
+ alt43 = 1
+ elif LA43 == 62:
+ LA43 = self.input.LA(2)
+ if LA43 == 29 or LA43 == 30 or LA43 == 31 or LA43 == 32 or LA43 == 33 or LA43 == 34 or LA43 == 35 or LA43 == 36 or LA43 == 37 or LA43 == 38 or LA43 == 39 or LA43 == 40 or LA43 == 41 or LA43 == 42 or LA43 == 45 or LA43 == 46 or LA43 == 48 or LA43 == 49 or LA43 == 50 or LA43 == 51 or LA43 == 52 or LA43 == 53 or LA43 == 54 or LA43 == 55 or LA43 == 56 or LA43 == 57 or LA43 == 61 or LA43 == 63 or LA43 == 64:
+ alt43 = 2
+ elif LA43 == IDENTIFIER:
+ LA43_37 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt43 = 1
+ elif (self.synpred84()) :
+ alt43 = 2
+
+
+ elif LA43 == 58:
+ LA43_38 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt43 = 1
+ elif (self.synpred84()) :
+ alt43 = 2
+
+
+ elif LA43 == 66:
+ LA43_39 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt43 = 1
+ elif (self.synpred84()) :
+ alt43 = 2
+
+
+ elif LA43 == 59:
+ LA43_40 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt43 = 1
+ elif (self.synpred84()) :
+ alt43 = 2
+
+
+ elif LA43 == 60:
+ LA43_41 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt43 = 1
+ elif (self.synpred84()) :
+ alt43 = 2
+
+
+ elif LA43 == 62:
+ LA43_43 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt43 = 1
+ elif (self.synpred84()) :
+ alt43 = 2
+
+
+
+ elif LA43 == 64:
+ alt43 = 2
+
+ if alt43 == 1:
+ # C.g:330:28: declarator
+ self.following.append(self.FOLLOW_declarator_in_parameter_declaration997)
+ self.declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt43 == 2:
+ # C.g:330:39: abstract_declarator
+ self.following.append(self.FOLLOW_abstract_declarator_in_parameter_declaration999)
+ self.abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop43
+
+
+ # C.g:330:61: ( 'OPTIONAL' )?
+ alt44 = 2
+ LA44_0 = self.input.LA(1)
+
+ if (LA44_0 == 53) :
+ alt44 = 1
+ if alt44 == 1:
+ # C.g:330:62: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_parameter_declaration1004)
+ if self.failed:
+ return
+
+
+
+
+
+ elif alt46 == 2:
+ # C.g:332:4: ( pointer )* IDENTIFIER
+ # C.g:332:4: ( pointer )*
+ while True: #loop45
+ alt45 = 2
+ LA45_0 = self.input.LA(1)
+
+ if (LA45_0 == 66) :
+ alt45 = 1
+
+
+ if alt45 == 1:
+ # C.g:0:0: pointer
+ self.following.append(self.FOLLOW_pointer_in_parameter_declaration1013)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop45
+
+
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_parameter_declaration1016)
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 28, parameter_declaration_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end parameter_declaration
+
+
+ # $ANTLR start identifier_list
+ # C.g:335:1: identifier_list : IDENTIFIER ( ',' IDENTIFIER )* ;
+ def identifier_list(self, ):
+
+ identifier_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 29):
+ return
+
+ # C.g:336:2: ( IDENTIFIER ( ',' IDENTIFIER )* )
+ # C.g:336:4: IDENTIFIER ( ',' IDENTIFIER )*
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1027)
+ if self.failed:
+ return
+ # C.g:337:2: ( ',' IDENTIFIER )*
+ while True: #loop47
+ alt47 = 2
+ LA47_0 = self.input.LA(1)
+
+ if (LA47_0 == 27) :
+ alt47 = 1
+
+
+ if alt47 == 1:
+ # C.g:337:3: ',' IDENTIFIER
+ self.match(self.input, 27, self.FOLLOW_27_in_identifier_list1031)
+ if self.failed:
+ return
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1033)
+ if self.failed:
+ return
+
+
+ else:
+ break #loop47
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 29, identifier_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end identifier_list
+
+
+ # $ANTLR start type_name
+ # C.g:340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );
+ def type_name(self, ):
+
+ type_name_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 30):
+ return
+
+ # C.g:341:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id )
+ alt49 = 2
+ LA49_0 = self.input.LA(1)
+
+ if ((34 <= LA49_0 <= 42) or (45 <= LA49_0 <= 46) or (48 <= LA49_0 <= 61)) :
+ alt49 = 1
+ elif (LA49_0 == IDENTIFIER) :
+ LA49_13 = self.input.LA(2)
+
+ if (self.synpred90()) :
+ alt49 = 1
+ elif (True) :
+ alt49 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 13, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 0, self.input)
+
+ raise nvae
+
+ if alt49 == 1:
+ # C.g:341:4: specifier_qualifier_list ( abstract_declarator )?
+ self.following.append(self.FOLLOW_specifier_qualifier_list_in_type_name1046)
+ self.specifier_qualifier_list()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:341:29: ( abstract_declarator )?
+ alt48 = 2
+ LA48_0 = self.input.LA(1)
+
+ if (LA48_0 == 62 or LA48_0 == 64 or LA48_0 == 66) :
+ alt48 = 1
+ if alt48 == 1:
+ # C.g:0:0: abstract_declarator
+ self.following.append(self.FOLLOW_abstract_declarator_in_type_name1048)
+ self.abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+ elif alt49 == 2:
+ # C.g:342:4: type_id
+ self.following.append(self.FOLLOW_type_id_in_type_name1054)
+ self.type_id()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 30, type_name_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end type_name
+
+
+ # $ANTLR start abstract_declarator
+ # C.g:345:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );
+ def abstract_declarator(self, ):
+
+ abstract_declarator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 31):
+ return
+
+ # C.g:346:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator )
+ alt51 = 2
+ LA51_0 = self.input.LA(1)
+
+ if (LA51_0 == 66) :
+ alt51 = 1
+ elif (LA51_0 == 62 or LA51_0 == 64) :
+ alt51 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("345:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 51, 0, self.input)
+
+ raise nvae
+
+ if alt51 == 1:
+ # C.g:346:4: pointer ( direct_abstract_declarator )?
+ self.following.append(self.FOLLOW_pointer_in_abstract_declarator1065)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:346:12: ( direct_abstract_declarator )?
+ alt50 = 2
+ LA50_0 = self.input.LA(1)
+
+ if (LA50_0 == 62) :
+ LA50 = self.input.LA(2)
+ if LA50 == 63:
+ LA50_12 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 58:
+ LA50_13 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 66:
+ LA50_14 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 59:
+ LA50_15 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 60:
+ LA50_16 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == IDENTIFIER:
+ LA50_17 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 62:
+ LA50_18 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 64:
+ LA50_19 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 29 or LA50 == 30 or LA50 == 31 or LA50 == 32 or LA50 == 33:
+ LA50_20 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 34:
+ LA50_21 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 35:
+ LA50_22 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 36:
+ LA50_23 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 37:
+ LA50_24 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 38:
+ LA50_25 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 39:
+ LA50_26 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 40:
+ LA50_27 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 41:
+ LA50_28 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 42:
+ LA50_29 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 45 or LA50 == 46:
+ LA50_30 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 48:
+ LA50_31 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 49 or LA50 == 50 or LA50 == 51 or LA50 == 52 or LA50 == 53 or LA50 == 54 or LA50 == 55 or LA50 == 56 or LA50 == 57 or LA50 == 61:
+ LA50_32 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif (LA50_0 == 64) :
+ LA50 = self.input.LA(2)
+ if LA50 == 65:
+ LA50_33 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 62:
+ LA50_34 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == IDENTIFIER:
+ LA50_35 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == HEX_LITERAL:
+ LA50_36 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == OCTAL_LITERAL:
+ LA50_37 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == DECIMAL_LITERAL:
+ LA50_38 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == CHARACTER_LITERAL:
+ LA50_39 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == STRING_LITERAL:
+ LA50_40 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == FLOATING_POINT_LITERAL:
+ LA50_41 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 72:
+ LA50_42 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 73:
+ LA50_43 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 66 or LA50 == 68 or LA50 == 69 or LA50 == 77 or LA50 == 78 or LA50 == 79:
+ LA50_44 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ elif LA50 == 74:
+ LA50_45 = self.input.LA(3)
+
+ if (self.synpred91()) :
+ alt50 = 1
+ if alt50 == 1:
+ # C.g:0:0: direct_abstract_declarator
+ self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator1067)
+ self.direct_abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+ elif alt51 == 2:
+ # C.g:347:4: direct_abstract_declarator
+ self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator1073)
+ self.direct_abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 31, abstract_declarator_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end abstract_declarator
+
+
+ # $ANTLR start direct_abstract_declarator
+ # C.g:350:1: direct_abstract_declarator : ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* ;
+ def direct_abstract_declarator(self, ):
+
+ direct_abstract_declarator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 32):
+ return
+
+ # C.g:351:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* )
+ # C.g:351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )*
+ # C.g:351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )
+ alt52 = 2
+ LA52_0 = self.input.LA(1)
+
+ if (LA52_0 == 62) :
+ LA52 = self.input.LA(2)
+ if LA52 == IDENTIFIER or LA52 == 29 or LA52 == 30 or LA52 == 31 or LA52 == 32 or LA52 == 33 or LA52 == 34 or LA52 == 35 or LA52 == 36 or LA52 == 37 or LA52 == 38 or LA52 == 39 or LA52 == 40 or LA52 == 41 or LA52 == 42 or LA52 == 45 or LA52 == 46 or LA52 == 48 or LA52 == 49 or LA52 == 50 or LA52 == 51 or LA52 == 52 or LA52 == 53 or LA52 == 54 or LA52 == 55 or LA52 == 56 or LA52 == 57 or LA52 == 58 or LA52 == 59 or LA52 == 60 or LA52 == 61 or LA52 == 63:
+ alt52 = 2
+ elif LA52 == 66:
+ LA52_18 = self.input.LA(3)
+
+ if (self.synpred93()) :
+ alt52 = 1
+ elif (True) :
+ alt52 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 18, self.input)
+
+ raise nvae
+
+ elif LA52 == 62 or LA52 == 64:
+ alt52 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 1, self.input)
+
+ raise nvae
+
+ elif (LA52_0 == 64) :
+ alt52 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 0, self.input)
+
+ raise nvae
+
+ if alt52 == 1:
+ # C.g:351:6: '(' abstract_declarator ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_direct_abstract_declarator1086)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator1088)
+ self.abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_direct_abstract_declarator1090)
+ if self.failed:
+ return
+
+
+ elif alt52 == 2:
+ # C.g:351:36: abstract_declarator_suffix
+ self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1094)
+ self.abstract_declarator_suffix()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ # C.g:351:65: ( abstract_declarator_suffix )*
+ while True: #loop53
+ alt53 = 2
+ LA53_0 = self.input.LA(1)
+
+ if (LA53_0 == 62) :
+ LA53 = self.input.LA(2)
+ if LA53 == 63:
+ LA53_12 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 58:
+ LA53_13 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 66:
+ LA53_14 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 59:
+ LA53_15 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 60:
+ LA53_16 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == IDENTIFIER:
+ LA53_17 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 29 or LA53 == 30 or LA53 == 31 or LA53 == 32 or LA53 == 33:
+ LA53_19 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 34:
+ LA53_20 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 35:
+ LA53_21 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 36:
+ LA53_22 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 37:
+ LA53_23 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 38:
+ LA53_24 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 39:
+ LA53_25 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 40:
+ LA53_26 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 41:
+ LA53_27 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 42:
+ LA53_28 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 45 or LA53 == 46:
+ LA53_29 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 48:
+ LA53_30 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 49 or LA53 == 50 or LA53 == 51 or LA53 == 52 or LA53 == 53 or LA53 == 54 or LA53 == 55 or LA53 == 56 or LA53 == 57 or LA53 == 61:
+ LA53_31 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+
+ elif (LA53_0 == 64) :
+ LA53 = self.input.LA(2)
+ if LA53 == 65:
+ LA53_33 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 62:
+ LA53_34 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == IDENTIFIER:
+ LA53_35 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == HEX_LITERAL:
+ LA53_36 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == OCTAL_LITERAL:
+ LA53_37 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == DECIMAL_LITERAL:
+ LA53_38 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == CHARACTER_LITERAL:
+ LA53_39 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == STRING_LITERAL:
+ LA53_40 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == FLOATING_POINT_LITERAL:
+ LA53_41 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 72:
+ LA53_42 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 73:
+ LA53_43 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 66 or LA53 == 68 or LA53 == 69 or LA53 == 77 or LA53 == 78 or LA53 == 79:
+ LA53_44 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+ elif LA53 == 74:
+ LA53_45 = self.input.LA(3)
+
+ if (self.synpred94()) :
+ alt53 = 1
+
+
+
+
+
+ if alt53 == 1:
+ # C.g:0:0: abstract_declarator_suffix
+ self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1098)
+ self.abstract_declarator_suffix()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop53
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 32, direct_abstract_declarator_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end direct_abstract_declarator
+
+
+ # $ANTLR start abstract_declarator_suffix
+ # C.g:354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );
+ def abstract_declarator_suffix(self, ):
+
+ abstract_declarator_suffix_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 33):
+ return
+
+ # C.g:355:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' )
+ alt54 = 4
+ LA54_0 = self.input.LA(1)
+
+ if (LA54_0 == 64) :
+ LA54_1 = self.input.LA(2)
+
+ if (LA54_1 == 65) :
+ alt54 = 1
+ elif ((IDENTIFIER <= LA54_1 <= FLOATING_POINT_LITERAL) or LA54_1 == 62 or LA54_1 == 66 or (68 <= LA54_1 <= 69) or (72 <= LA54_1 <= 74) or (77 <= LA54_1 <= 79)) :
+ alt54 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 1, self.input)
+
+ raise nvae
+
+ elif (LA54_0 == 62) :
+ LA54_2 = self.input.LA(2)
+
+ if (LA54_2 == 63) :
+ alt54 = 3
+ elif (LA54_2 == IDENTIFIER or (29 <= LA54_2 <= 42) or (45 <= LA54_2 <= 46) or (48 <= LA54_2 <= 61) or LA54_2 == 66) :
+ alt54 = 4
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 2, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 0, self.input)
+
+ raise nvae
+
+ if alt54 == 1:
+ # C.g:355:4: '[' ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1110)
+ if self.failed:
+ return
+ self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1112)
+ if self.failed:
+ return
+
+
+ elif alt54 == 2:
+ # C.g:356:4: '[' constant_expression ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1117)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix1119)
+ self.constant_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1121)
+ if self.failed:
+ return
+
+
+ elif alt54 == 3:
+ # C.g:357:4: '(' ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1126)
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1128)
+ if self.failed:
+ return
+
+
+ elif alt54 == 4:
+ # C.g:358:4: '(' parameter_type_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1133)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1135)
+ self.parameter_type_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1137)
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 33, abstract_declarator_suffix_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end abstract_declarator_suffix
+
+
+ # $ANTLR start initializer
+ # C.g:361:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );
+ def initializer(self, ):
+
+ initializer_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 34):
+ return
+
+ # C.g:363:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' )
+ alt56 = 2
+ LA56_0 = self.input.LA(1)
+
+ if ((IDENTIFIER <= LA56_0 <= FLOATING_POINT_LITERAL) or LA56_0 == 62 or LA56_0 == 66 or (68 <= LA56_0 <= 69) or (72 <= LA56_0 <= 74) or (77 <= LA56_0 <= 79)) :
+ alt56 = 1
+ elif (LA56_0 == 43) :
+ alt56 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("361:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 56, 0, self.input)
+
+ raise nvae
+
+ if alt56 == 1:
+ # C.g:363:4: assignment_expression
+ self.following.append(self.FOLLOW_assignment_expression_in_initializer1150)
+ self.assignment_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt56 == 2:
+ # C.g:364:4: '{' initializer_list ( ',' )? '}'
+ self.match(self.input, 43, self.FOLLOW_43_in_initializer1155)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_initializer_list_in_initializer1157)
+ self.initializer_list()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:364:25: ( ',' )?
+ alt55 = 2
+ LA55_0 = self.input.LA(1)
+
+ if (LA55_0 == 27) :
+ alt55 = 1
+ if alt55 == 1:
+ # C.g:0:0: ','
+ self.match(self.input, 27, self.FOLLOW_27_in_initializer1159)
+ if self.failed:
+ return
+
+
+
+ self.match(self.input, 44, self.FOLLOW_44_in_initializer1162)
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 34, initializer_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end initializer
+
+
+ # $ANTLR start initializer_list
+ # C.g:367:1: initializer_list : initializer ( ',' initializer )* ;
+ def initializer_list(self, ):
+
+ initializer_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 35):
+ return
+
+ # C.g:368:2: ( initializer ( ',' initializer )* )
+ # C.g:368:4: initializer ( ',' initializer )*
+ self.following.append(self.FOLLOW_initializer_in_initializer_list1173)
+ self.initializer()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:368:16: ( ',' initializer )*
+ while True: #loop57
+ alt57 = 2
+ LA57_0 = self.input.LA(1)
+
+ if (LA57_0 == 27) :
+ LA57_1 = self.input.LA(2)
+
+ if ((IDENTIFIER <= LA57_1 <= FLOATING_POINT_LITERAL) or LA57_1 == 43 or LA57_1 == 62 or LA57_1 == 66 or (68 <= LA57_1 <= 69) or (72 <= LA57_1 <= 74) or (77 <= LA57_1 <= 79)) :
+ alt57 = 1
+
+
+
+
+ if alt57 == 1:
+ # C.g:368:17: ',' initializer
+ self.match(self.input, 27, self.FOLLOW_27_in_initializer_list1176)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_initializer_in_initializer_list1178)
+ self.initializer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop57
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 35, initializer_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end initializer_list
+
+ class argument_expression_list_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start argument_expression_list
+ # C.g:373:1: argument_expression_list : assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )* ;
+ def argument_expression_list(self, ):
+
+ retval = self.argument_expression_list_return()
+ retval.start = self.input.LT(1)
+ argument_expression_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 36):
+ return retval
+
+ # C.g:374:2: ( assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )* )
+ # C.g:374:6: assignment_expression ( 'OPTIONAL' )? ( ',' assignment_expression ( 'OPTIONAL' )? )*
+ self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1196)
+ self.assignment_expression()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:374:28: ( 'OPTIONAL' )?
+ alt58 = 2
+ LA58_0 = self.input.LA(1)
+
+ if (LA58_0 == 53) :
+ alt58 = 1
+ if alt58 == 1:
+ # C.g:374:29: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_argument_expression_list1199)
+ if self.failed:
+ return retval
+
+
+
+ # C.g:374:42: ( ',' assignment_expression ( 'OPTIONAL' )? )*
+ while True: #loop60
+ alt60 = 2
+ LA60_0 = self.input.LA(1)
+
+ if (LA60_0 == 27) :
+ alt60 = 1
+
+
+ if alt60 == 1:
+ # C.g:374:43: ',' assignment_expression ( 'OPTIONAL' )?
+ self.match(self.input, 27, self.FOLLOW_27_in_argument_expression_list1204)
+ if self.failed:
+ return retval
+ self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1206)
+ self.assignment_expression()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:374:69: ( 'OPTIONAL' )?
+ alt59 = 2
+ LA59_0 = self.input.LA(1)
+
+ if (LA59_0 == 53) :
+ alt59 = 1
+ if alt59 == 1:
+ # C.g:374:70: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_argument_expression_list1209)
+ if self.failed:
+ return retval
+
+
+
+
+
+ else:
+ break #loop60
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 36, argument_expression_list_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end argument_expression_list
+
+
+ # $ANTLR start additive_expression
+ # C.g:377:1: additive_expression : ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* ;
+ def additive_expression(self, ):
+
+ additive_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 37):
+ return
+
+ # C.g:378:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* )
+ # C.g:378:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )*
+ # C.g:378:4: ( multiplicative_expression )
+ # C.g:378:5: multiplicative_expression
+ self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1225)
+ self.multiplicative_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ # C.g:378:32: ( '+' multiplicative_expression | '-' multiplicative_expression )*
+ while True: #loop61
+ alt61 = 3
+ LA61_0 = self.input.LA(1)
+
+ if (LA61_0 == 68) :
+ alt61 = 1
+ elif (LA61_0 == 69) :
+ alt61 = 2
+
+
+ if alt61 == 1:
+ # C.g:378:33: '+' multiplicative_expression
+ self.match(self.input, 68, self.FOLLOW_68_in_additive_expression1229)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1231)
+ self.multiplicative_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt61 == 2:
+ # C.g:378:65: '-' multiplicative_expression
+ self.match(self.input, 69, self.FOLLOW_69_in_additive_expression1235)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1237)
+ self.multiplicative_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop61
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 37, additive_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end additive_expression
+
+
+ # $ANTLR start multiplicative_expression
+ # C.g:381:1: multiplicative_expression : ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* ;
+ def multiplicative_expression(self, ):
+
+ multiplicative_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 38):
+ return
+
+ # C.g:382:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* )
+ # C.g:382:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*
+ # C.g:382:4: ( cast_expression )
+ # C.g:382:5: cast_expression
+ self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1251)
+ self.cast_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ # C.g:382:22: ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*
+ while True: #loop62
+ alt62 = 4
+ LA62 = self.input.LA(1)
+ if LA62 == 66:
+ alt62 = 1
+ elif LA62 == 70:
+ alt62 = 2
+ elif LA62 == 71:
+ alt62 = 3
+
+ if alt62 == 1:
+ # C.g:382:23: '*' cast_expression
+ self.match(self.input, 66, self.FOLLOW_66_in_multiplicative_expression1255)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1257)
+ self.cast_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt62 == 2:
+ # C.g:382:45: '/' cast_expression
+ self.match(self.input, 70, self.FOLLOW_70_in_multiplicative_expression1261)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1263)
+ self.cast_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt62 == 3:
+ # C.g:382:67: '%' cast_expression
+ self.match(self.input, 71, self.FOLLOW_71_in_multiplicative_expression1267)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1269)
+ self.cast_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop62
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 38, multiplicative_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end multiplicative_expression
+
+
+ # $ANTLR start cast_expression
+ # C.g:385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );
+ def cast_expression(self, ):
+
+ cast_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 39):
+ return
+
+ # C.g:386:2: ( '(' type_name ')' cast_expression | unary_expression )
+ alt63 = 2
+ LA63_0 = self.input.LA(1)
+
+ if (LA63_0 == 62) :
+ LA63 = self.input.LA(2)
+ if LA63 == 34 or LA63 == 35 or LA63 == 36 or LA63 == 37 or LA63 == 38 or LA63 == 39 or LA63 == 40 or LA63 == 41 or LA63 == 42 or LA63 == 45 or LA63 == 46 or LA63 == 48 or LA63 == 49 or LA63 == 50 or LA63 == 51 or LA63 == 52 or LA63 == 53 or LA63 == 54 or LA63 == 55 or LA63 == 56 or LA63 == 57 or LA63 == 58 or LA63 == 59 or LA63 == 60 or LA63 == 61:
+ alt63 = 1
+ elif LA63 == IDENTIFIER:
+ LA63_25 = self.input.LA(3)
+
+ if (self.synpred109()) :
+ alt63 = 1
+ elif (True) :
+ alt63 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 25, self.input)
+
+ raise nvae
+
+ elif LA63 == HEX_LITERAL or LA63 == OCTAL_LITERAL or LA63 == DECIMAL_LITERAL or LA63 == CHARACTER_LITERAL or LA63 == STRING_LITERAL or LA63 == FLOATING_POINT_LITERAL or LA63 == 62 or LA63 == 66 or LA63 == 68 or LA63 == 69 or LA63 == 72 or LA63 == 73 or LA63 == 74 or LA63 == 77 or LA63 == 78 or LA63 == 79:
+ alt63 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 1, self.input)
+
+ raise nvae
+
+ elif ((IDENTIFIER <= LA63_0 <= FLOATING_POINT_LITERAL) or LA63_0 == 66 or (68 <= LA63_0 <= 69) or (72 <= LA63_0 <= 74) or (77 <= LA63_0 <= 79)) :
+ alt63 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 0, self.input)
+
+ raise nvae
+
+ if alt63 == 1:
+ # C.g:386:4: '(' type_name ')' cast_expression
+ self.match(self.input, 62, self.FOLLOW_62_in_cast_expression1282)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_type_name_in_cast_expression1284)
+ self.type_name()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_cast_expression1286)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_cast_expression_in_cast_expression1288)
+ self.cast_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt63 == 2:
+ # C.g:387:4: unary_expression
+ self.following.append(self.FOLLOW_unary_expression_in_cast_expression1293)
+ self.unary_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 39, cast_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end cast_expression
+
+
+ # $ANTLR start unary_expression
+ # C.g:390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );
+ def unary_expression(self, ):
+
+ unary_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 40):
+ return
+
+ # C.g:391:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' )
+ alt64 = 6
+ LA64 = self.input.LA(1)
+ if LA64 == IDENTIFIER or LA64 == HEX_LITERAL or LA64 == OCTAL_LITERAL or LA64 == DECIMAL_LITERAL or LA64 == CHARACTER_LITERAL or LA64 == STRING_LITERAL or LA64 == FLOATING_POINT_LITERAL or LA64 == 62:
+ alt64 = 1
+ elif LA64 == 72:
+ alt64 = 2
+ elif LA64 == 73:
+ alt64 = 3
+ elif LA64 == 66 or LA64 == 68 or LA64 == 69 or LA64 == 77 or LA64 == 78 or LA64 == 79:
+ alt64 = 4
+ elif LA64 == 74:
+ LA64_12 = self.input.LA(2)
+
+ if (LA64_12 == 62) :
+ LA64_13 = self.input.LA(3)
+
+ if (self.synpred114()) :
+ alt64 = 5
+ elif (True) :
+ alt64 = 6
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 13, self.input)
+
+ raise nvae
+
+ elif ((IDENTIFIER <= LA64_12 <= FLOATING_POINT_LITERAL) or LA64_12 == 66 or (68 <= LA64_12 <= 69) or (72 <= LA64_12 <= 74) or (77 <= LA64_12 <= 79)) :
+ alt64 = 5
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 12, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 0, self.input)
+
+ raise nvae
+
+ if alt64 == 1:
+ # C.g:391:4: postfix_expression
+ self.following.append(self.FOLLOW_postfix_expression_in_unary_expression1304)
+ self.postfix_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt64 == 2:
+ # C.g:392:4: '++' unary_expression
+ self.match(self.input, 72, self.FOLLOW_72_in_unary_expression1309)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_unary_expression_in_unary_expression1311)
+ self.unary_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt64 == 3:
+ # C.g:393:4: '--' unary_expression
+ self.match(self.input, 73, self.FOLLOW_73_in_unary_expression1316)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_unary_expression_in_unary_expression1318)
+ self.unary_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt64 == 4:
+ # C.g:394:4: unary_operator cast_expression
+ self.following.append(self.FOLLOW_unary_operator_in_unary_expression1323)
+ self.unary_operator()
+ self.following.pop()
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_cast_expression_in_unary_expression1325)
+ self.cast_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt64 == 5:
+ # C.g:395:4: 'sizeof' unary_expression
+ self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1330)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_unary_expression_in_unary_expression1332)
+ self.unary_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt64 == 6:
+ # C.g:396:4: 'sizeof' '(' type_name ')'
+ self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1337)
+ if self.failed:
+ return
+ self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1339)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_type_name_in_unary_expression1341)
+ self.type_name()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1343)
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 40, unary_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end unary_expression
+
+
+ # $ANTLR start postfix_expression
+ # C.g:399:1: postfix_expression : p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* ;
+ def postfix_expression(self, ):
+ self.postfix_expression_stack.append(postfix_expression_scope())
+ postfix_expression_StartIndex = self.input.index()
+ a = None
+ b = None
+ x = None
+ y = None
+ z = None
+ p = None
+
+ c = None
+
+
+
+ self.postfix_expression_stack[-1].FuncCallText = ''
+
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 41):
+ return
+
+ # C.g:406:2: (p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* )
+ # C.g:406:6: p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*
+ self.following.append(self.FOLLOW_primary_expression_in_postfix_expression1367)
+ p = self.primary_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.postfix_expression_stack[-1].FuncCallText += self.input.toString(p.start,p.stop)
+
+ # C.g:407:9: ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*
+ while True: #loop65
+ alt65 = 10
+ LA65 = self.input.LA(1)
+ if LA65 == 66:
+ LA65_1 = self.input.LA(2)
+
+ if (LA65_1 == IDENTIFIER) :
+ LA65_30 = self.input.LA(3)
+
+ if (self.synpred120()) :
+ alt65 = 6
+
+
+
+
+ elif LA65 == 64:
+ alt65 = 1
+ elif LA65 == 62:
+ LA65 = self.input.LA(2)
+ if LA65 == 63:
+ alt65 = 2
+ elif LA65 == 29 or LA65 == 30 or LA65 == 31 or LA65 == 32 or LA65 == 33 or LA65 == 34 or LA65 == 35 or LA65 == 36 or LA65 == 37 or LA65 == 38 or LA65 == 39 or LA65 == 40 or LA65 == 41 or LA65 == 42 or LA65 == 45 or LA65 == 46 or LA65 == 48 or LA65 == 49 or LA65 == 50 or LA65 == 51 or LA65 == 52 or LA65 == 53 or LA65 == 54 or LA65 == 55 or LA65 == 56 or LA65 == 57 or LA65 == 58 or LA65 == 59 or LA65 == 60 or LA65 == 61:
+ alt65 = 4
+ elif LA65 == IDENTIFIER:
+ LA65_55 = self.input.LA(3)
+
+ if (self.synpred117()) :
+ alt65 = 3
+ elif (self.synpred118()) :
+ alt65 = 4
+
+
+ elif LA65 == 66:
+ LA65_57 = self.input.LA(3)
+
+ if (self.synpred117()) :
+ alt65 = 3
+ elif (self.synpred118()) :
+ alt65 = 4
+
+
+ elif LA65 == HEX_LITERAL or LA65 == OCTAL_LITERAL or LA65 == DECIMAL_LITERAL or LA65 == CHARACTER_LITERAL or LA65 == STRING_LITERAL or LA65 == FLOATING_POINT_LITERAL or LA65 == 62 or LA65 == 68 or LA65 == 69 or LA65 == 72 or LA65 == 73 or LA65 == 74 or LA65 == 77 or LA65 == 78 or LA65 == 79:
+ alt65 = 3
+
+ elif LA65 == 75:
+ alt65 = 5
+ elif LA65 == 76:
+ alt65 = 7
+ elif LA65 == 72:
+ alt65 = 8
+ elif LA65 == 73:
+ alt65 = 9
+
+ if alt65 == 1:
+ # C.g:407:13: '[' expression ']'
+ self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1383)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_in_postfix_expression1385)
+ self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1387)
+ if self.failed:
+ return
+
+
+ elif alt65 == 2:
+ # C.g:408:13: '(' a= ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1401)
+ if self.failed:
+ return
+ a = self.input.LT(1)
+ self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1405)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, a.line, a.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, '')
+
+
+
+ elif alt65 == 3:
+ # C.g:409:13: '(' c= argument_expression_list b= ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1420)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1424)
+ c = self.argument_expression_list()
+ self.following.pop()
+ if self.failed:
+ return
+ b = self.input.LT(1)
+ self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1428)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, b.line, b.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, self.input.toString(c.start,c.stop))
+
+
+
+ elif alt65 == 4:
+ # C.g:410:13: '(' macro_parameter_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1444)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_macro_parameter_list_in_postfix_expression1446)
+ self.macro_parameter_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1448)
+ if self.failed:
+ return
+
+
+ elif alt65 == 5:
+ # C.g:411:13: '.' x= IDENTIFIER
+ self.match(self.input, 75, self.FOLLOW_75_in_postfix_expression1462)
+ if self.failed:
+ return
+ x = self.input.LT(1)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1466)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.postfix_expression_stack[-1].FuncCallText += '.' + x.text
+
+
+
+ elif alt65 == 6:
+ # C.g:412:13: '*' y= IDENTIFIER
+ self.match(self.input, 66, self.FOLLOW_66_in_postfix_expression1482)
+ if self.failed:
+ return
+ y = self.input.LT(1)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1486)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.postfix_expression_stack[-1].FuncCallText = y.text
+
+
+
+ elif alt65 == 7:
+ # C.g:413:13: '->' z= IDENTIFIER
+ self.match(self.input, 76, self.FOLLOW_76_in_postfix_expression1502)
+ if self.failed:
+ return
+ z = self.input.LT(1)
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1506)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.postfix_expression_stack[-1].FuncCallText += '->' + z.text
+
+
+
+ elif alt65 == 8:
+ # C.g:414:13: '++'
+ self.match(self.input, 72, self.FOLLOW_72_in_postfix_expression1522)
+ if self.failed:
+ return
+
+
+ elif alt65 == 9:
+ # C.g:415:13: '--'
+ self.match(self.input, 73, self.FOLLOW_73_in_postfix_expression1536)
+ if self.failed:
+ return
+
+
+ else:
+ break #loop65
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 41, postfix_expression_StartIndex)
+
+ self.postfix_expression_stack.pop()
+ pass
+
+ return
+
+ # $ANTLR end postfix_expression
+
+
+ # $ANTLR start macro_parameter_list
+ # C.g:419:1: macro_parameter_list : parameter_declaration ( ',' parameter_declaration )* ;
+ def macro_parameter_list(self, ):
+
+ macro_parameter_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 42):
+ return
+
+ # C.g:420:2: ( parameter_declaration ( ',' parameter_declaration )* )
+ # C.g:420:4: parameter_declaration ( ',' parameter_declaration )*
+ self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1559)
+ self.parameter_declaration()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:420:26: ( ',' parameter_declaration )*
+ while True: #loop66
+ alt66 = 2
+ LA66_0 = self.input.LA(1)
+
+ if (LA66_0 == 27) :
+ alt66 = 1
+
+
+ if alt66 == 1:
+ # C.g:420:27: ',' parameter_declaration
+ self.match(self.input, 27, self.FOLLOW_27_in_macro_parameter_list1562)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1564)
+ self.parameter_declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop66
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 42, macro_parameter_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end macro_parameter_list
+
+
+ # $ANTLR start unary_operator
+ # C.g:423:1: unary_operator : ( '&' | '*' | '+' | '-' | '~' | '!' );
+ def unary_operator(self, ):
+
+ unary_operator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 43):
+ return
+
+ # C.g:424:2: ( '&' | '*' | '+' | '-' | '~' | '!' )
+ # C.g:
+ if self.input.LA(1) == 66 or (68 <= self.input.LA(1) <= 69) or (77 <= self.input.LA(1) <= 79):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_unary_operator0
+ )
+ raise mse
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 43, unary_operator_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end unary_operator
+
+ class primary_expression_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start primary_expression
+ # C.g:432:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );
+ def primary_expression(self, ):
+
+ retval = self.primary_expression_return()
+ retval.start = self.input.LT(1)
+ primary_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 44):
+ return retval
+
+ # C.g:433:2: ( IDENTIFIER | constant | '(' expression ')' )
+ alt67 = 3
+ LA67 = self.input.LA(1)
+ if LA67 == IDENTIFIER:
+ LA67_1 = self.input.LA(2)
+
+ if (LA67_1 == EOF or LA67_1 == 25 or (27 <= LA67_1 <= 28) or LA67_1 == 44 or LA67_1 == 47 or LA67_1 == 53 or (62 <= LA67_1 <= 66) or (68 <= LA67_1 <= 73) or (75 <= LA67_1 <= 77) or (80 <= LA67_1 <= 102)) :
+ alt67 = 1
+ elif (LA67_1 == IDENTIFIER or LA67_1 == STRING_LITERAL) :
+ alt67 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("432:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );", 67, 1, self.input)
+
+ raise nvae
+
+ elif LA67 == HEX_LITERAL or LA67 == OCTAL_LITERAL or LA67 == DECIMAL_LITERAL or LA67 == CHARACTER_LITERAL or LA67 == STRING_LITERAL or LA67 == FLOATING_POINT_LITERAL:
+ alt67 = 2
+ elif LA67 == 62:
+ alt67 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("432:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );", 67, 0, self.input)
+
+ raise nvae
+
+ if alt67 == 1:
+ # C.g:433:4: IDENTIFIER
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_primary_expression1613)
+ if self.failed:
+ return retval
+
+
+ elif alt67 == 2:
+ # C.g:434:4: constant
+ self.following.append(self.FOLLOW_constant_in_primary_expression1618)
+ self.constant()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ elif alt67 == 3:
+ # C.g:435:4: '(' expression ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_primary_expression1623)
+ if self.failed:
+ return retval
+ self.following.append(self.FOLLOW_expression_in_primary_expression1625)
+ self.expression()
+ self.following.pop()
+ if self.failed:
+ return retval
+ self.match(self.input, 63, self.FOLLOW_63_in_primary_expression1627)
+ if self.failed:
+ return retval
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 44, primary_expression_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end primary_expression
+
+
+ # $ANTLR start constant
+ # C.g:438:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );
+ def constant(self, ):
+
+ constant_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 45):
+ return
+
+ # C.g:439:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL )
+ alt72 = 6
+ LA72 = self.input.LA(1)
+ if LA72 == HEX_LITERAL:
+ alt72 = 1
+ elif LA72 == OCTAL_LITERAL:
+ alt72 = 2
+ elif LA72 == DECIMAL_LITERAL:
+ alt72 = 3
+ elif LA72 == CHARACTER_LITERAL:
+ alt72 = 4
+ elif LA72 == IDENTIFIER or LA72 == STRING_LITERAL:
+ alt72 = 5
+ elif LA72 == FLOATING_POINT_LITERAL:
+ alt72 = 6
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("438:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );", 72, 0, self.input)
+
+ raise nvae
+
+ if alt72 == 1:
+ # C.g:439:9: HEX_LITERAL
+ self.match(self.input, HEX_LITERAL, self.FOLLOW_HEX_LITERAL_in_constant1643)
+ if self.failed:
+ return
+
+
+ elif alt72 == 2:
+ # C.g:440:9: OCTAL_LITERAL
+ self.match(self.input, OCTAL_LITERAL, self.FOLLOW_OCTAL_LITERAL_in_constant1653)
+ if self.failed:
+ return
+
+
+ elif alt72 == 3:
+ # C.g:441:9: DECIMAL_LITERAL
+ self.match(self.input, DECIMAL_LITERAL, self.FOLLOW_DECIMAL_LITERAL_in_constant1663)
+ if self.failed:
+ return
+
+
+ elif alt72 == 4:
+ # C.g:442:7: CHARACTER_LITERAL
+ self.match(self.input, CHARACTER_LITERAL, self.FOLLOW_CHARACTER_LITERAL_in_constant1671)
+ if self.failed:
+ return
+
+
+ elif alt72 == 5:
+ # C.g:443:7: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )*
+ # C.g:443:7: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+
+ cnt70 = 0
+ while True: #loop70
+ alt70 = 2
+ LA70_0 = self.input.LA(1)
+
+ if (LA70_0 == IDENTIFIER) :
+ LA70_1 = self.input.LA(2)
+
+ if (LA70_1 == STRING_LITERAL) :
+ alt70 = 1
+ elif (LA70_1 == IDENTIFIER) :
+ LA70_33 = self.input.LA(3)
+
+ if (self.synpred138()) :
+ alt70 = 1
+
+
+
+
+ elif (LA70_0 == STRING_LITERAL) :
+ alt70 = 1
+
+
+ if alt70 == 1:
+ # C.g:443:8: ( IDENTIFIER )* ( STRING_LITERAL )+
+ # C.g:443:8: ( IDENTIFIER )*
+ while True: #loop68
+ alt68 = 2
+ LA68_0 = self.input.LA(1)
+
+ if (LA68_0 == IDENTIFIER) :
+ alt68 = 1
+
+
+ if alt68 == 1:
+ # C.g:0:0: IDENTIFIER
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1680)
+ if self.failed:
+ return
+
+
+ else:
+ break #loop68
+
+
+ # C.g:443:20: ( STRING_LITERAL )+
+ cnt69 = 0
+ while True: #loop69
+ alt69 = 2
+ LA69_0 = self.input.LA(1)
+
+ if (LA69_0 == STRING_LITERAL) :
+ LA69_31 = self.input.LA(2)
+
+ if (self.synpred137()) :
+ alt69 = 1
+
+
+
+
+ if alt69 == 1:
+ # C.g:0:0: STRING_LITERAL
+ self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_constant1683)
+ if self.failed:
+ return
+
+
+ else:
+ if cnt69 >= 1:
+ break #loop69
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(69, self.input)
+ raise eee
+
+ cnt69 += 1
+
+
+
+
+ else:
+ if cnt70 >= 1:
+ break #loop70
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(70, self.input)
+ raise eee
+
+ cnt70 += 1
+
+
+ # C.g:443:38: ( IDENTIFIER )*
+ while True: #loop71
+ alt71 = 2
+ LA71_0 = self.input.LA(1)
+
+ if (LA71_0 == IDENTIFIER) :
+ alt71 = 1
+
+
+ if alt71 == 1:
+ # C.g:0:0: IDENTIFIER
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1688)
+ if self.failed:
+ return
+
+
+ else:
+ break #loop71
+
+
+
+
+ elif alt72 == 6:
+ # C.g:444:9: FLOATING_POINT_LITERAL
+ self.match(self.input, FLOATING_POINT_LITERAL, self.FOLLOW_FLOATING_POINT_LITERAL_in_constant1699)
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 45, constant_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end constant
+
+ class expression_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start expression
+ # C.g:449:1: expression : assignment_expression ( ',' assignment_expression )* ;
+ def expression(self, ):
+
+ retval = self.expression_return()
+ retval.start = self.input.LT(1)
+ expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 46):
+ return retval
+
+ # C.g:450:2: ( assignment_expression ( ',' assignment_expression )* )
+ # C.g:450:4: assignment_expression ( ',' assignment_expression )*
+ self.following.append(self.FOLLOW_assignment_expression_in_expression1715)
+ self.assignment_expression()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:450:26: ( ',' assignment_expression )*
+ while True: #loop73
+ alt73 = 2
+ LA73_0 = self.input.LA(1)
+
+ if (LA73_0 == 27) :
+ alt73 = 1
+
+
+ if alt73 == 1:
+ # C.g:450:27: ',' assignment_expression
+ self.match(self.input, 27, self.FOLLOW_27_in_expression1718)
+ if self.failed:
+ return retval
+ self.following.append(self.FOLLOW_assignment_expression_in_expression1720)
+ self.assignment_expression()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ else:
+ break #loop73
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 46, expression_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end expression
+
+
+ # $ANTLR start constant_expression
+ # C.g:453:1: constant_expression : conditional_expression ;
+ def constant_expression(self, ):
+
+ constant_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 47):
+ return
+
+ # C.g:454:2: ( conditional_expression )
+ # C.g:454:4: conditional_expression
+ self.following.append(self.FOLLOW_conditional_expression_in_constant_expression1733)
+ self.conditional_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 47, constant_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end constant_expression
+
+
+ # $ANTLR start assignment_expression
+ # C.g:457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );
+ def assignment_expression(self, ):
+
+ assignment_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 48):
+ return
+
+ # C.g:458:2: ( lvalue assignment_operator assignment_expression | conditional_expression )
+ alt74 = 2
+ LA74 = self.input.LA(1)
+ if LA74 == IDENTIFIER:
+ LA74 = self.input.LA(2)
+ if LA74 == 64:
+ LA74_13 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 13, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_14 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 14, self.input)
+
+ raise nvae
+
+ elif LA74 == 75:
+ LA74_15 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 15, self.input)
+
+ raise nvae
+
+ elif LA74 == 66:
+ LA74_16 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 16, self.input)
+
+ raise nvae
+
+ elif LA74 == 76:
+ LA74_17 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 17, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_18 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 18, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_19 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 19, self.input)
+
+ raise nvae
+
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
+ elif LA74 == STRING_LITERAL:
+ LA74_21 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 21, self.input)
+
+ raise nvae
+
+ elif LA74 == IDENTIFIER:
+ LA74_22 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 22, self.input)
+
+ raise nvae
+
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 1, self.input)
+
+ raise nvae
+
+ elif LA74 == HEX_LITERAL:
+ LA74 = self.input.LA(2)
+ if LA74 == 64:
+ LA74_44 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 44, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_45 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 45, self.input)
+
+ raise nvae
+
+ elif LA74 == 75:
+ LA74_46 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 46, self.input)
+
+ raise nvae
+
+ elif LA74 == 66:
+ LA74_47 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 47, self.input)
+
+ raise nvae
+
+ elif LA74 == 76:
+ LA74_48 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 48, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_49 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 49, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_50 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 50, self.input)
+
+ raise nvae
+
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
+ alt74 = 2
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 2, self.input)
+
+ raise nvae
+
+ elif LA74 == OCTAL_LITERAL:
+ LA74 = self.input.LA(2)
+ if LA74 == 64:
+ LA74_73 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 73, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_74 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 74, self.input)
+
+ raise nvae
+
+ elif LA74 == 75:
+ LA74_75 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 75, self.input)
+
+ raise nvae
+
+ elif LA74 == 66:
+ LA74_76 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 76, self.input)
+
+ raise nvae
+
+ elif LA74 == 76:
+ LA74_77 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 77, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_78 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 78, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_79 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 79, self.input)
+
+ raise nvae
+
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 3, self.input)
+
+ raise nvae
+
+ elif LA74 == DECIMAL_LITERAL:
+ LA74 = self.input.LA(2)
+ if LA74 == 64:
+ LA74_102 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 102, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_103 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 103, self.input)
+
+ raise nvae
+
+ elif LA74 == 75:
+ LA74_104 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 104, self.input)
+
+ raise nvae
+
+ elif LA74 == 66:
+ LA74_105 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 105, self.input)
+
+ raise nvae
+
+ elif LA74 == 76:
+ LA74_106 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 106, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_107 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 107, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_108 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 108, self.input)
+
+ raise nvae
+
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
+ alt74 = 2
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 4, self.input)
+
+ raise nvae
+
+ elif LA74 == CHARACTER_LITERAL:
+ LA74 = self.input.LA(2)
+ if LA74 == 64:
+ LA74_131 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 131, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_132 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 132, self.input)
+
+ raise nvae
+
+ elif LA74 == 75:
+ LA74_133 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 133, self.input)
+
+ raise nvae
+
+ elif LA74 == 66:
+ LA74_134 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 134, self.input)
+
+ raise nvae
+
+ elif LA74 == 76:
+ LA74_135 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 135, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_136 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 136, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_137 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 137, self.input)
+
+ raise nvae
+
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
+ alt74 = 2
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 5, self.input)
+
+ raise nvae
+
+ elif LA74 == STRING_LITERAL:
+ LA74 = self.input.LA(2)
+ if LA74 == IDENTIFIER:
+ LA74_160 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 160, self.input)
+
+ raise nvae
+
+ elif LA74 == 64:
+ LA74_161 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 161, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_162 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 162, self.input)
+
+ raise nvae
+
+ elif LA74 == 75:
+ LA74_163 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 163, self.input)
+
+ raise nvae
+
+ elif LA74 == 66:
+ LA74_164 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 164, self.input)
+
+ raise nvae
+
+ elif LA74 == 76:
+ LA74_165 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 165, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_166 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 166, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_167 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 167, self.input)
+
+ raise nvae
+
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
+ alt74 = 2
+ elif LA74 == STRING_LITERAL:
+ LA74_189 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 189, self.input)
+
+ raise nvae
+
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 6, self.input)
+
+ raise nvae
+
+ elif LA74 == FLOATING_POINT_LITERAL:
+ LA74 = self.input.LA(2)
+ if LA74 == 64:
+ LA74_191 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 191, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_192 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 192, self.input)
+
+ raise nvae
+
+ elif LA74 == 75:
+ LA74_193 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 193, self.input)
+
+ raise nvae
+
+ elif LA74 == 66:
+ LA74_194 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 194, self.input)
+
+ raise nvae
+
+ elif LA74 == 76:
+ LA74_195 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 195, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_196 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 196, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_197 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 197, self.input)
+
+ raise nvae
+
+ elif LA74 == EOF or LA74 == 25 or LA74 == 27 or LA74 == 44 or LA74 == 47 or LA74 == 53 or LA74 == 63 or LA74 == 65 or LA74 == 68 or LA74 == 69 or LA74 == 70 or LA74 == 71 or LA74 == 77 or LA74 == 90 or LA74 == 91 or LA74 == 92 or LA74 == 93 or LA74 == 94 or LA74 == 95 or LA74 == 96 or LA74 == 97 or LA74 == 98 or LA74 == 99 or LA74 == 100 or LA74 == 101 or LA74 == 102:
+ alt74 = 2
+ elif LA74 == 28 or LA74 == 80 or LA74 == 81 or LA74 == 82 or LA74 == 83 or LA74 == 84 or LA74 == 85 or LA74 == 86 or LA74 == 87 or LA74 == 88 or LA74 == 89:
+ alt74 = 1
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 7, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74 = self.input.LA(2)
+ if LA74 == IDENTIFIER:
+ LA74_220 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 220, self.input)
+
+ raise nvae
+
+ elif LA74 == HEX_LITERAL:
+ LA74_221 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 221, self.input)
+
+ raise nvae
+
+ elif LA74 == OCTAL_LITERAL:
+ LA74_222 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 222, self.input)
+
+ raise nvae
+
+ elif LA74 == DECIMAL_LITERAL:
+ LA74_223 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 223, self.input)
+
+ raise nvae
+
+ elif LA74 == CHARACTER_LITERAL:
+ LA74_224 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 224, self.input)
+
+ raise nvae
+
+ elif LA74 == STRING_LITERAL:
+ LA74_225 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 225, self.input)
+
+ raise nvae
+
+ elif LA74 == FLOATING_POINT_LITERAL:
+ LA74_226 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 226, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_227 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 227, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_228 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 228, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_229 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 229, self.input)
+
+ raise nvae
+
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
+ LA74_230 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 230, self.input)
+
+ raise nvae
+
+ elif LA74 == 74:
+ LA74_231 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 231, self.input)
+
+ raise nvae
+
+ elif LA74 == 34 or LA74 == 35 or LA74 == 36 or LA74 == 37 or LA74 == 38 or LA74 == 39 or LA74 == 40 or LA74 == 41 or LA74 == 42 or LA74 == 45 or LA74 == 46 or LA74 == 48 or LA74 == 49 or LA74 == 50 or LA74 == 51 or LA74 == 52 or LA74 == 53 or LA74 == 54 or LA74 == 55 or LA74 == 56 or LA74 == 57 or LA74 == 58 or LA74 == 59 or LA74 == 60 or LA74 == 61:
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 8, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74 = self.input.LA(2)
+ if LA74 == IDENTIFIER:
+ LA74_244 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 244, self.input)
+
+ raise nvae
+
+ elif LA74 == HEX_LITERAL:
+ LA74_245 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 245, self.input)
+
+ raise nvae
+
+ elif LA74 == OCTAL_LITERAL:
+ LA74_246 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 246, self.input)
+
+ raise nvae
+
+ elif LA74 == DECIMAL_LITERAL:
+ LA74_247 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 247, self.input)
+
+ raise nvae
+
+ elif LA74 == CHARACTER_LITERAL:
+ LA74_248 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 248, self.input)
+
+ raise nvae
+
+ elif LA74 == STRING_LITERAL:
+ LA74_249 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 249, self.input)
+
+ raise nvae
+
+ elif LA74 == FLOATING_POINT_LITERAL:
+ LA74_250 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 250, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_251 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 251, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_252 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 252, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_253 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 253, self.input)
+
+ raise nvae
+
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
+ LA74_254 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 254, self.input)
+
+ raise nvae
+
+ elif LA74 == 74:
+ LA74_255 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 255, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 9, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74 = self.input.LA(2)
+ if LA74 == IDENTIFIER:
+ LA74_256 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 256, self.input)
+
+ raise nvae
+
+ elif LA74 == HEX_LITERAL:
+ LA74_257 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 257, self.input)
+
+ raise nvae
+
+ elif LA74 == OCTAL_LITERAL:
+ LA74_258 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 258, self.input)
+
+ raise nvae
+
+ elif LA74 == DECIMAL_LITERAL:
+ LA74_259 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 259, self.input)
+
+ raise nvae
+
+ elif LA74 == CHARACTER_LITERAL:
+ LA74_260 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 260, self.input)
+
+ raise nvae
+
+ elif LA74 == STRING_LITERAL:
+ LA74_261 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 261, self.input)
+
+ raise nvae
+
+ elif LA74 == FLOATING_POINT_LITERAL:
+ LA74_262 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 262, self.input)
+
+ raise nvae
+
+ elif LA74 == 62:
+ LA74_263 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 263, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_264 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 264, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_265 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 265, self.input)
+
+ raise nvae
+
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
+ LA74_266 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 266, self.input)
+
+ raise nvae
+
+ elif LA74 == 74:
+ LA74_267 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 267, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 10, self.input)
+
+ raise nvae
+
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
+ LA74 = self.input.LA(2)
+ if LA74 == 62:
+ LA74_268 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 268, self.input)
+
+ raise nvae
+
+ elif LA74 == IDENTIFIER:
+ LA74_269 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 269, self.input)
+
+ raise nvae
+
+ elif LA74 == HEX_LITERAL:
+ LA74_270 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 270, self.input)
+
+ raise nvae
+
+ elif LA74 == OCTAL_LITERAL:
+ LA74_271 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 271, self.input)
+
+ raise nvae
+
+ elif LA74 == DECIMAL_LITERAL:
+ LA74_272 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 272, self.input)
+
+ raise nvae
+
+ elif LA74 == CHARACTER_LITERAL:
+ LA74_273 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 273, self.input)
+
+ raise nvae
+
+ elif LA74 == STRING_LITERAL:
+ LA74_274 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 274, self.input)
+
+ raise nvae
+
+ elif LA74 == FLOATING_POINT_LITERAL:
+ LA74_275 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 275, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_276 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 276, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_277 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 277, self.input)
+
+ raise nvae
+
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
+ LA74_278 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 278, self.input)
+
+ raise nvae
+
+ elif LA74 == 74:
+ LA74_279 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 279, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 11, self.input)
+
+ raise nvae
+
+ elif LA74 == 74:
+ LA74 = self.input.LA(2)
+ if LA74 == 62:
+ LA74_280 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 280, self.input)
+
+ raise nvae
+
+ elif LA74 == IDENTIFIER:
+ LA74_281 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 281, self.input)
+
+ raise nvae
+
+ elif LA74 == HEX_LITERAL:
+ LA74_282 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 282, self.input)
+
+ raise nvae
+
+ elif LA74 == OCTAL_LITERAL:
+ LA74_283 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 283, self.input)
+
+ raise nvae
+
+ elif LA74 == DECIMAL_LITERAL:
+ LA74_284 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 284, self.input)
+
+ raise nvae
+
+ elif LA74 == CHARACTER_LITERAL:
+ LA74_285 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 285, self.input)
+
+ raise nvae
+
+ elif LA74 == STRING_LITERAL:
+ LA74_286 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 286, self.input)
+
+ raise nvae
+
+ elif LA74 == FLOATING_POINT_LITERAL:
+ LA74_287 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 287, self.input)
+
+ raise nvae
+
+ elif LA74 == 72:
+ LA74_288 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 288, self.input)
+
+ raise nvae
+
+ elif LA74 == 73:
+ LA74_289 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 289, self.input)
+
+ raise nvae
+
+ elif LA74 == 66 or LA74 == 68 or LA74 == 69 or LA74 == 77 or LA74 == 78 or LA74 == 79:
+ LA74_290 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 290, self.input)
+
+ raise nvae
+
+ elif LA74 == 74:
+ LA74_291 = self.input.LA(3)
+
+ if (self.synpred142()) :
+ alt74 = 1
+ elif (True) :
+ alt74 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 291, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 12, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 0, self.input)
+
+ raise nvae
+
+ if alt74 == 1:
+ # C.g:458:4: lvalue assignment_operator assignment_expression
+ self.following.append(self.FOLLOW_lvalue_in_assignment_expression1744)
+ self.lvalue()
+ self.following.pop()
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1746)
+ self.assignment_operator()
+ self.following.pop()
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1748)
+ self.assignment_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt74 == 2:
+ # C.g:459:4: conditional_expression
+ self.following.append(self.FOLLOW_conditional_expression_in_assignment_expression1753)
+ self.conditional_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 48, assignment_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end assignment_expression
+
+
+ # $ANTLR start lvalue
+ # C.g:462:1: lvalue : unary_expression ;
+ def lvalue(self, ):
+
+ lvalue_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 49):
+ return
+
+ # C.g:463:2: ( unary_expression )
+ # C.g:463:4: unary_expression
+ self.following.append(self.FOLLOW_unary_expression_in_lvalue1765)
+ self.unary_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 49, lvalue_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end lvalue
+
+
+ # $ANTLR start assignment_operator
+ # C.g:466:1: assignment_operator : ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' );
+ def assignment_operator(self, ):
+
+ assignment_operator_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 50):
+ return
+
+ # C.g:467:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' )
+ # C.g:
+ if self.input.LA(1) == 28 or (80 <= self.input.LA(1) <= 89):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_assignment_operator0
+ )
+ raise mse
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 50, assignment_operator_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end assignment_operator
+
+
+ # $ANTLR start conditional_expression
+ # C.g:480:1: conditional_expression : e= logical_or_expression ( '?' expression ':' conditional_expression )? ;
+ def conditional_expression(self, ):
+
+ conditional_expression_StartIndex = self.input.index()
+ e = None
+
+
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 51):
+ return
+
+ # C.g:481:2: (e= logical_or_expression ( '?' expression ':' conditional_expression )? )
+ # C.g:481:4: e= logical_or_expression ( '?' expression ':' conditional_expression )?
+ self.following.append(self.FOLLOW_logical_or_expression_in_conditional_expression1839)
+ e = self.logical_or_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:481:28: ( '?' expression ':' conditional_expression )?
+ alt75 = 2
+ LA75_0 = self.input.LA(1)
+
+ if (LA75_0 == 90) :
+ alt75 = 1
+ if alt75 == 1:
+ # C.g:481:29: '?' expression ':' conditional_expression
+ self.match(self.input, 90, self.FOLLOW_90_in_conditional_expression1842)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_in_conditional_expression1844)
+ self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 47, self.FOLLOW_47_in_conditional_expression1846)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1848)
+ self.conditional_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
+
+
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 51, conditional_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end conditional_expression
+
+ class logical_or_expression_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start logical_or_expression
+ # C.g:484:1: logical_or_expression : logical_and_expression ( '||' logical_and_expression )* ;
+ def logical_or_expression(self, ):
+
+ retval = self.logical_or_expression_return()
+ retval.start = self.input.LT(1)
+ logical_or_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 52):
+ return retval
+
+ # C.g:485:2: ( logical_and_expression ( '||' logical_and_expression )* )
+ # C.g:485:4: logical_and_expression ( '||' logical_and_expression )*
+ self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1863)
+ self.logical_and_expression()
+ self.following.pop()
+ if self.failed:
+ return retval
+ # C.g:485:27: ( '||' logical_and_expression )*
+ while True: #loop76
+ alt76 = 2
+ LA76_0 = self.input.LA(1)
+
+ if (LA76_0 == 91) :
+ alt76 = 1
+
+
+ if alt76 == 1:
+ # C.g:485:28: '||' logical_and_expression
+ self.match(self.input, 91, self.FOLLOW_91_in_logical_or_expression1866)
+ if self.failed:
+ return retval
+ self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1868)
+ self.logical_and_expression()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ else:
+ break #loop76
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 52, logical_or_expression_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end logical_or_expression
+
+
+ # $ANTLR start logical_and_expression
+ # C.g:488:1: logical_and_expression : inclusive_or_expression ( '&&' inclusive_or_expression )* ;
+ def logical_and_expression(self, ):
+
+ logical_and_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 53):
+ return
+
+ # C.g:489:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* )
+ # C.g:489:4: inclusive_or_expression ( '&&' inclusive_or_expression )*
+ self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1881)
+ self.inclusive_or_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:489:28: ( '&&' inclusive_or_expression )*
+ while True: #loop77
+ alt77 = 2
+ LA77_0 = self.input.LA(1)
+
+ if (LA77_0 == 92) :
+ alt77 = 1
+
+
+ if alt77 == 1:
+ # C.g:489:29: '&&' inclusive_or_expression
+ self.match(self.input, 92, self.FOLLOW_92_in_logical_and_expression1884)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1886)
+ self.inclusive_or_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop77
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 53, logical_and_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end logical_and_expression
+
+
+ # $ANTLR start inclusive_or_expression
+ # C.g:492:1: inclusive_or_expression : exclusive_or_expression ( '|' exclusive_or_expression )* ;
+ def inclusive_or_expression(self, ):
+
+ inclusive_or_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 54):
+ return
+
+ # C.g:493:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* )
+ # C.g:493:4: exclusive_or_expression ( '|' exclusive_or_expression )*
+ self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1899)
+ self.exclusive_or_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:493:28: ( '|' exclusive_or_expression )*
+ while True: #loop78
+ alt78 = 2
+ LA78_0 = self.input.LA(1)
+
+ if (LA78_0 == 93) :
+ alt78 = 1
+
+
+ if alt78 == 1:
+ # C.g:493:29: '|' exclusive_or_expression
+ self.match(self.input, 93, self.FOLLOW_93_in_inclusive_or_expression1902)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1904)
+ self.exclusive_or_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop78
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 54, inclusive_or_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end inclusive_or_expression
+
+
+ # $ANTLR start exclusive_or_expression
+ # C.g:496:1: exclusive_or_expression : and_expression ( '^' and_expression )* ;
+ def exclusive_or_expression(self, ):
+
+ exclusive_or_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 55):
+ return
+
+ # C.g:497:2: ( and_expression ( '^' and_expression )* )
+ # C.g:497:4: and_expression ( '^' and_expression )*
+ self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1917)
+ self.and_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:497:19: ( '^' and_expression )*
+ while True: #loop79
+ alt79 = 2
+ LA79_0 = self.input.LA(1)
+
+ if (LA79_0 == 94) :
+ alt79 = 1
+
+
+ if alt79 == 1:
+ # C.g:497:20: '^' and_expression
+ self.match(self.input, 94, self.FOLLOW_94_in_exclusive_or_expression1920)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1922)
+ self.and_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop79
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 55, exclusive_or_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end exclusive_or_expression
+
+
+ # $ANTLR start and_expression
+ # C.g:500:1: and_expression : equality_expression ( '&' equality_expression )* ;
+ def and_expression(self, ):
+
+ and_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 56):
+ return
+
+ # C.g:501:2: ( equality_expression ( '&' equality_expression )* )
+ # C.g:501:4: equality_expression ( '&' equality_expression )*
+ self.following.append(self.FOLLOW_equality_expression_in_and_expression1935)
+ self.equality_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:501:24: ( '&' equality_expression )*
+ while True: #loop80
+ alt80 = 2
+ LA80_0 = self.input.LA(1)
+
+ if (LA80_0 == 77) :
+ alt80 = 1
+
+
+ if alt80 == 1:
+ # C.g:501:25: '&' equality_expression
+ self.match(self.input, 77, self.FOLLOW_77_in_and_expression1938)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_equality_expression_in_and_expression1940)
+ self.equality_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop80
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 56, and_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end and_expression
+
+
+ # $ANTLR start equality_expression
+ # C.g:503:1: equality_expression : relational_expression ( ( '==' | '!=' ) relational_expression )* ;
+ def equality_expression(self, ):
+
+ equality_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 57):
+ return
+
+ # C.g:504:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* )
+ # C.g:504:4: relational_expression ( ( '==' | '!=' ) relational_expression )*
+ self.following.append(self.FOLLOW_relational_expression_in_equality_expression1952)
+ self.relational_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:504:26: ( ( '==' | '!=' ) relational_expression )*
+ while True: #loop81
+ alt81 = 2
+ LA81_0 = self.input.LA(1)
+
+ if ((95 <= LA81_0 <= 96)) :
+ alt81 = 1
+
+
+ if alt81 == 1:
+ # C.g:504:27: ( '==' | '!=' ) relational_expression
+ if (95 <= self.input.LA(1) <= 96):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_equality_expression1955
+ )
+ raise mse
+
+
+ self.following.append(self.FOLLOW_relational_expression_in_equality_expression1961)
+ self.relational_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop81
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 57, equality_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end equality_expression
+
+
+ # $ANTLR start relational_expression
+ # C.g:507:1: relational_expression : shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* ;
+ def relational_expression(self, ):
+
+ relational_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 58):
+ return
+
+ # C.g:508:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* )
+ # C.g:508:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
+ self.following.append(self.FOLLOW_shift_expression_in_relational_expression1975)
+ self.shift_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:508:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
+ while True: #loop82
+ alt82 = 2
+ LA82_0 = self.input.LA(1)
+
+ if ((97 <= LA82_0 <= 100)) :
+ alt82 = 1
+
+
+ if alt82 == 1:
+ # C.g:508:22: ( '<' | '>' | '<=' | '>=' ) shift_expression
+ if (97 <= self.input.LA(1) <= 100):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_relational_expression1978
+ )
+ raise mse
+
+
+ self.following.append(self.FOLLOW_shift_expression_in_relational_expression1988)
+ self.shift_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop82
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 58, relational_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end relational_expression
+
+
+ # $ANTLR start shift_expression
+ # C.g:511:1: shift_expression : additive_expression ( ( '<<' | '>>' ) additive_expression )* ;
+ def shift_expression(self, ):
+
+ shift_expression_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 59):
+ return
+
+ # C.g:512:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* )
+ # C.g:512:4: additive_expression ( ( '<<' | '>>' ) additive_expression )*
+ self.following.append(self.FOLLOW_additive_expression_in_shift_expression2001)
+ self.additive_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:512:24: ( ( '<<' | '>>' ) additive_expression )*
+ while True: #loop83
+ alt83 = 2
+ LA83_0 = self.input.LA(1)
+
+ if ((101 <= LA83_0 <= 102)) :
+ alt83 = 1
+
+
+ if alt83 == 1:
+ # C.g:512:25: ( '<<' | '>>' ) additive_expression
+ if (101 <= self.input.LA(1) <= 102):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_shift_expression2004
+ )
+ raise mse
+
+
+ self.following.append(self.FOLLOW_additive_expression_in_shift_expression2010)
+ self.additive_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop83
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 59, shift_expression_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end shift_expression
+
+
+ # $ANTLR start statement
+ # C.g:517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );
+ def statement(self, ):
+
+ statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 60):
+ return
+
+ # C.g:518:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration )
+ alt84 = 11
+ LA84 = self.input.LA(1)
+ if LA84 == IDENTIFIER:
+ LA84 = self.input.LA(2)
+ if LA84 == 62:
+ LA84_43 = self.input.LA(3)
+
+ if (self.synpred169()) :
+ alt84 = 3
+ elif (self.synpred173()) :
+ alt84 = 7
+ elif (self.synpred174()) :
+ alt84 = 8
+ elif (True) :
+ alt84 = 11
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 43, self.input)
+
+ raise nvae
+
+ elif LA84 == 47:
+ alt84 = 1
+ elif LA84 == STRING_LITERAL or LA84 == 27 or LA84 == 28 or LA84 == 64 or LA84 == 68 or LA84 == 69 or LA84 == 70 or LA84 == 71 or LA84 == 72 or LA84 == 73 or LA84 == 75 or LA84 == 76 or LA84 == 77 or LA84 == 80 or LA84 == 81 or LA84 == 82 or LA84 == 83 or LA84 == 84 or LA84 == 85 or LA84 == 86 or LA84 == 87 or LA84 == 88 or LA84 == 89 or LA84 == 90 or LA84 == 91 or LA84 == 92 or LA84 == 93 or LA84 == 94 or LA84 == 95 or LA84 == 96 or LA84 == 97 or LA84 == 98 or LA84 == 99 or LA84 == 100 or LA84 == 101 or LA84 == 102:
+ alt84 = 3
+ elif LA84 == 66:
+ LA84_47 = self.input.LA(3)
+
+ if (self.synpred169()) :
+ alt84 = 3
+ elif (True) :
+ alt84 = 11
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 47, self.input)
+
+ raise nvae
+
+ elif LA84 == IDENTIFIER:
+ LA84_53 = self.input.LA(3)
+
+ if (self.synpred169()) :
+ alt84 = 3
+ elif (True) :
+ alt84 = 11
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 53, self.input)
+
+ raise nvae
+
+ elif LA84 == 25:
+ LA84_68 = self.input.LA(3)
+
+ if (self.synpred169()) :
+ alt84 = 3
+ elif (True) :
+ alt84 = 11
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 68, self.input)
+
+ raise nvae
+
+ elif LA84 == 29 or LA84 == 30 or LA84 == 31 or LA84 == 32 or LA84 == 33 or LA84 == 34 or LA84 == 35 or LA84 == 36 or LA84 == 37 or LA84 == 38 or LA84 == 39 or LA84 == 40 or LA84 == 41 or LA84 == 42 or LA84 == 45 or LA84 == 46 or LA84 == 48 or LA84 == 49 or LA84 == 50 or LA84 == 51 or LA84 == 52 or LA84 == 53 or LA84 == 54 or LA84 == 55 or LA84 == 56 or LA84 == 57 or LA84 == 58 or LA84 == 59 or LA84 == 60 or LA84 == 61:
+ alt84 = 11
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 1, self.input)
+
+ raise nvae
+
+ elif LA84 == 106 or LA84 == 107:
+ alt84 = 1
+ elif LA84 == 43:
+ alt84 = 2
+ elif LA84 == HEX_LITERAL or LA84 == OCTAL_LITERAL or LA84 == DECIMAL_LITERAL or LA84 == CHARACTER_LITERAL or LA84 == STRING_LITERAL or LA84 == FLOATING_POINT_LITERAL or LA84 == 25 or LA84 == 62 or LA84 == 66 or LA84 == 68 or LA84 == 69 or LA84 == 72 or LA84 == 73 or LA84 == 74 or LA84 == 77 or LA84 == 78 or LA84 == 79:
+ alt84 = 3
+ elif LA84 == 108 or LA84 == 110:
+ alt84 = 4
+ elif LA84 == 111 or LA84 == 112 or LA84 == 113:
+ alt84 = 5
+ elif LA84 == 114 or LA84 == 115 or LA84 == 116 or LA84 == 117:
+ alt84 = 6
+ elif LA84 == 103:
+ alt84 = 8
+ elif LA84 == 104:
+ alt84 = 9
+ elif LA84 == 105:
+ alt84 = 10
+ elif LA84 == 26 or LA84 == 29 or LA84 == 30 or LA84 == 31 or LA84 == 32 or LA84 == 33 or LA84 == 34 or LA84 == 35 or LA84 == 36 or LA84 == 37 or LA84 == 38 or LA84 == 39 or LA84 == 40 or LA84 == 41 or LA84 == 42 or LA84 == 45 or LA84 == 46 or LA84 == 48 or LA84 == 49 or LA84 == 50 or LA84 == 51 or LA84 == 52 or LA84 == 53 or LA84 == 54 or LA84 == 55 or LA84 == 56 or LA84 == 57 or LA84 == 58 or LA84 == 59 or LA84 == 60 or LA84 == 61:
+ alt84 = 11
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 0, self.input)
+
+ raise nvae
+
+ if alt84 == 1:
+ # C.g:518:4: labeled_statement
+ self.following.append(self.FOLLOW_labeled_statement_in_statement2025)
+ self.labeled_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 2:
+ # C.g:519:4: compound_statement
+ self.following.append(self.FOLLOW_compound_statement_in_statement2030)
+ self.compound_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 3:
+ # C.g:520:4: expression_statement
+ self.following.append(self.FOLLOW_expression_statement_in_statement2035)
+ self.expression_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 4:
+ # C.g:521:4: selection_statement
+ self.following.append(self.FOLLOW_selection_statement_in_statement2040)
+ self.selection_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 5:
+ # C.g:522:4: iteration_statement
+ self.following.append(self.FOLLOW_iteration_statement_in_statement2045)
+ self.iteration_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 6:
+ # C.g:523:4: jump_statement
+ self.following.append(self.FOLLOW_jump_statement_in_statement2050)
+ self.jump_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 7:
+ # C.g:524:4: macro_statement
+ self.following.append(self.FOLLOW_macro_statement_in_statement2055)
+ self.macro_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 8:
+ # C.g:525:4: asm2_statement
+ self.following.append(self.FOLLOW_asm2_statement_in_statement2060)
+ self.asm2_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 9:
+ # C.g:526:4: asm1_statement
+ self.following.append(self.FOLLOW_asm1_statement_in_statement2065)
+ self.asm1_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 10:
+ # C.g:527:4: asm_statement
+ self.following.append(self.FOLLOW_asm_statement_in_statement2070)
+ self.asm_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt84 == 11:
+ # C.g:528:4: declaration
+ self.following.append(self.FOLLOW_declaration_in_statement2075)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 60, statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end statement
+
+
+ # $ANTLR start asm2_statement
+ # C.g:531:1: asm2_statement : ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' ;
+ def asm2_statement(self, ):
+
+ asm2_statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 61):
+ return
+
+ # C.g:532:2: ( ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' )
+ # C.g:532:4: ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';'
+ # C.g:532:4: ( '__asm__' )?
+ alt85 = 2
+ LA85_0 = self.input.LA(1)
+
+ if (LA85_0 == 103) :
+ alt85 = 1
+ if alt85 == 1:
+ # C.g:0:0: '__asm__'
+ self.match(self.input, 103, self.FOLLOW_103_in_asm2_statement2086)
+ if self.failed:
+ return
+
+
+
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_asm2_statement2089)
+ if self.failed:
+ return
+ self.match(self.input, 62, self.FOLLOW_62_in_asm2_statement2091)
+ if self.failed:
+ return
+ # C.g:532:30: (~ ( ';' ) )*
+ while True: #loop86
+ alt86 = 2
+ LA86_0 = self.input.LA(1)
+
+ if (LA86_0 == 63) :
+ LA86_1 = self.input.LA(2)
+
+ if ((IDENTIFIER <= LA86_1 <= LINE_COMMAND) or (26 <= LA86_1 <= 117)) :
+ alt86 = 1
+
+
+ elif ((IDENTIFIER <= LA86_0 <= LINE_COMMAND) or (26 <= LA86_0 <= 62) or (64 <= LA86_0 <= 117)) :
+ alt86 = 1
+
+
+ if alt86 == 1:
+ # C.g:532:31: ~ ( ';' )
+ if (IDENTIFIER <= self.input.LA(1) <= LINE_COMMAND) or (26 <= self.input.LA(1) <= 117):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_asm2_statement2094
+ )
+ raise mse
+
+
+
+
+ else:
+ break #loop86
+
+
+ self.match(self.input, 63, self.FOLLOW_63_in_asm2_statement2101)
+ if self.failed:
+ return
+ self.match(self.input, 25, self.FOLLOW_25_in_asm2_statement2103)
+ if self.failed:
+ return
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 61, asm2_statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end asm2_statement
+
+
+ # $ANTLR start asm1_statement
+ # C.g:535:1: asm1_statement : '_asm' '{' (~ ( '}' ) )* '}' ;
+ def asm1_statement(self, ):
+
+ asm1_statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 62):
+ return
+
+ # C.g:536:2: ( '_asm' '{' (~ ( '}' ) )* '}' )
+ # C.g:536:4: '_asm' '{' (~ ( '}' ) )* '}'
+ self.match(self.input, 104, self.FOLLOW_104_in_asm1_statement2115)
+ if self.failed:
+ return
+ self.match(self.input, 43, self.FOLLOW_43_in_asm1_statement2117)
+ if self.failed:
+ return
+ # C.g:536:15: (~ ( '}' ) )*
+ while True: #loop87
+ alt87 = 2
+ LA87_0 = self.input.LA(1)
+
+ if ((IDENTIFIER <= LA87_0 <= 43) or (45 <= LA87_0 <= 117)) :
+ alt87 = 1
+
+
+ if alt87 == 1:
+ # C.g:536:16: ~ ( '}' )
+ if (IDENTIFIER <= self.input.LA(1) <= 43) or (45 <= self.input.LA(1) <= 117):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_asm1_statement2120
+ )
+ raise mse
+
+
+
+
+ else:
+ break #loop87
+
+
+ self.match(self.input, 44, self.FOLLOW_44_in_asm1_statement2127)
+ if self.failed:
+ return
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 62, asm1_statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end asm1_statement
+
+
+ # $ANTLR start asm_statement
+ # C.g:539:1: asm_statement : '__asm' '{' (~ ( '}' ) )* '}' ;
+ def asm_statement(self, ):
+
+ asm_statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 63):
+ return
+
+ # C.g:540:2: ( '__asm' '{' (~ ( '}' ) )* '}' )
+ # C.g:540:4: '__asm' '{' (~ ( '}' ) )* '}'
+ self.match(self.input, 105, self.FOLLOW_105_in_asm_statement2138)
+ if self.failed:
+ return
+ self.match(self.input, 43, self.FOLLOW_43_in_asm_statement2140)
+ if self.failed:
+ return
+ # C.g:540:16: (~ ( '}' ) )*
+ while True: #loop88
+ alt88 = 2
+ LA88_0 = self.input.LA(1)
+
+ if ((IDENTIFIER <= LA88_0 <= 43) or (45 <= LA88_0 <= 117)) :
+ alt88 = 1
+
+
+ if alt88 == 1:
+ # C.g:540:17: ~ ( '}' )
+ if (IDENTIFIER <= self.input.LA(1) <= 43) or (45 <= self.input.LA(1) <= 117):
+ self.input.consume();
+ self.errorRecovery = False
+ self.failed = False
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ mse = MismatchedSetException(None, self.input)
+ self.recoverFromMismatchedSet(
+ self.input, mse, self.FOLLOW_set_in_asm_statement2143
+ )
+ raise mse
+
+
+
+
+ else:
+ break #loop88
+
+
+ self.match(self.input, 44, self.FOLLOW_44_in_asm_statement2150)
+ if self.failed:
+ return
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 63, asm_statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end asm_statement
+
+
+ # $ANTLR start macro_statement
+ # C.g:543:1: macro_statement : IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' ;
+ def macro_statement(self, ):
+
+ macro_statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 64):
+ return
+
+ # C.g:544:2: ( IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' )
+ # C.g:544:4: IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')'
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement2162)
+ if self.failed:
+ return
+ self.match(self.input, 62, self.FOLLOW_62_in_macro_statement2164)
+ if self.failed:
+ return
+ # C.g:544:19: ( declaration )*
+ while True: #loop89
+ alt89 = 2
+ LA89 = self.input.LA(1)
+ if LA89 == IDENTIFIER:
+ LA89 = self.input.LA(2)
+ if LA89 == 62:
+ LA89_45 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_47 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 66:
+ LA89_50 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_68 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_71 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_72 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_73 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_74 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_75 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_76 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_77 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_78 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_79 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_80 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_81 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_82 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_83 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_84 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_85 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_86 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 26:
+ LA89 = self.input.LA(2)
+ if LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_87 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_88 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_89 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_90 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_91 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_92 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_93 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_94 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_95 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_96 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_97 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_98 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_99 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_100 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 66:
+ LA89_101 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_102 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_103 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_104 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_105 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_106 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_107 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_108 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_109 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_110 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_111 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_112 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_113 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_114 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_115 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_116 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_117 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_118 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_119 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_120 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_121 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_122 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_123 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_124 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_125 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 34:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_126 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_127 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_128 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_129 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_130 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_131 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_132 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_133 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_134 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_135 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_136 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_137 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_138 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_139 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_140 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_141 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_142 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_143 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_144 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_145 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 35:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_146 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_147 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_148 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_149 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_150 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_151 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_152 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_153 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_154 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_155 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_156 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_157 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_158 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_159 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_160 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_161 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_162 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_163 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_164 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_165 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 36:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_166 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_167 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_168 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_169 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_170 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_171 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_172 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_173 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_174 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_175 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_176 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_177 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_178 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_179 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_180 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_181 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_182 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_183 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_184 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_185 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 37:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_186 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_187 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_188 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_189 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_190 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_191 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_192 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_193 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_194 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_195 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_196 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_197 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_198 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_199 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_200 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_201 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_202 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_203 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_204 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_205 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 38:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_206 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_207 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_208 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_209 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_210 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_211 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_212 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_213 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_214 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_215 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_216 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_217 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_218 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_219 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_220 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_221 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_222 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_223 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_224 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_225 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 39:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_226 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_227 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_228 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_229 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_230 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_231 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_232 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_233 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_234 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_235 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_236 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_237 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_238 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_239 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_240 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_241 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_242 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_243 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_244 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_245 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 40:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_246 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_247 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_248 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_249 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_250 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_251 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_252 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_253 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_254 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_255 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_256 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_257 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_258 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_259 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_260 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_261 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_262 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_263 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_264 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_265 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 41:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_266 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_267 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_268 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_269 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_270 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_271 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_272 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_273 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_274 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_275 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_276 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_277 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_278 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_279 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_280 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_281 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_282 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_283 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_284 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_285 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 42:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_286 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_287 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_288 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_289 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_290 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_291 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_292 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_293 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_294 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_295 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_296 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_297 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_298 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_299 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_300 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_301 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_302 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_303 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_304 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_305 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_40 = self.input.LA(2)
+
+ if (LA89_40 == IDENTIFIER) :
+ LA89_306 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif (LA89_40 == 43) :
+ LA89_307 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+
+ elif LA89 == 48:
+ LA89_41 = self.input.LA(2)
+
+ if (LA89_41 == 43) :
+ LA89_308 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif (LA89_41 == IDENTIFIER) :
+ LA89_309 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 58 or LA89 == 59 or LA89 == 60 or LA89 == 61:
+ LA89 = self.input.LA(2)
+ if LA89 == 66:
+ LA89_310 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 58:
+ LA89_311 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 59:
+ LA89_312 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 60:
+ LA89_313 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == IDENTIFIER:
+ LA89_314 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 62:
+ LA89_315 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 25:
+ LA89_316 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 29 or LA89 == 30 or LA89 == 31 or LA89 == 32 or LA89 == 33:
+ LA89_317 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 34:
+ LA89_318 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 35:
+ LA89_319 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 36:
+ LA89_320 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 37:
+ LA89_321 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 38:
+ LA89_322 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 39:
+ LA89_323 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 40:
+ LA89_324 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 41:
+ LA89_325 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 42:
+ LA89_326 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 45 or LA89 == 46:
+ LA89_327 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 48:
+ LA89_328 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+ elif LA89 == 49 or LA89 == 50 or LA89 == 51 or LA89 == 52 or LA89 == 53 or LA89 == 54 or LA89 == 55 or LA89 == 56 or LA89 == 57 or LA89 == 61:
+ LA89_329 = self.input.LA(3)
+
+ if (self.synpred181()) :
+ alt89 = 1
+
+
+
+
+ if alt89 == 1:
+ # C.g:0:0: declaration
+ self.following.append(self.FOLLOW_declaration_in_macro_statement2166)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop89
+
+
+ # C.g:544:33: ( statement_list )?
+ alt90 = 2
+ LA90 = self.input.LA(1)
+ if LA90 == IDENTIFIER:
+ LA90 = self.input.LA(2)
+ if LA90 == 25 or LA90 == 29 or LA90 == 30 or LA90 == 31 or LA90 == 32 or LA90 == 33 or LA90 == 34 or LA90 == 35 or LA90 == 36 or LA90 == 37 or LA90 == 38 or LA90 == 39 or LA90 == 40 or LA90 == 41 or LA90 == 42 or LA90 == 45 or LA90 == 46 or LA90 == 47 or LA90 == 48 or LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60 or LA90 == 61:
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_45 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == STRING_LITERAL:
+ LA90_46 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == IDENTIFIER:
+ LA90_47 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 64:
+ LA90_48 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 75:
+ LA90_49 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66:
+ LA90_50 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 76:
+ LA90_51 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_52 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_53 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 70:
+ LA90_54 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 71:
+ LA90_55 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 68:
+ LA90_56 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 69:
+ LA90_57 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 101 or LA90 == 102:
+ LA90_58 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
+ LA90_59 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 95 or LA90 == 96:
+ LA90_60 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 77:
+ LA90_61 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 94:
+ LA90_62 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 93:
+ LA90_63 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 92:
+ LA90_64 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 91:
+ LA90_65 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 90:
+ LA90_66 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 27:
+ LA90_67 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_70 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 25 or LA90 == 26 or LA90 == 29 or LA90 == 30 or LA90 == 31 or LA90 == 32 or LA90 == 33 or LA90 == 34 or LA90 == 35 or LA90 == 36 or LA90 == 37 or LA90 == 38 or LA90 == 39 or LA90 == 40 or LA90 == 41 or LA90 == 42 or LA90 == 43 or LA90 == 45 or LA90 == 46 or LA90 == 48 or LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60 or LA90 == 61 or LA90 == 103 or LA90 == 104 or LA90 == 105 or LA90 == 106 or LA90 == 107 or LA90 == 108 or LA90 == 110 or LA90 == 111 or LA90 == 112 or LA90 == 113 or LA90 == 114 or LA90 == 115 or LA90 == 116 or LA90 == 117:
+ alt90 = 1
+ elif LA90 == HEX_LITERAL:
+ LA90 = self.input.LA(2)
+ if LA90 == 64:
+ LA90_87 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_88 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 75:
+ LA90_89 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66:
+ LA90_90 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 76:
+ LA90_91 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_92 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_93 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_94 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 70:
+ LA90_95 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 71:
+ LA90_96 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 68:
+ LA90_97 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 69:
+ LA90_98 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 101 or LA90 == 102:
+ LA90_99 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
+ LA90_100 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 95 or LA90 == 96:
+ LA90_101 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 77:
+ LA90_102 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 94:
+ LA90_103 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 93:
+ LA90_104 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 92:
+ LA90_105 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 91:
+ LA90_106 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 90:
+ LA90_107 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 27:
+ LA90_108 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 25:
+ alt90 = 1
+ elif LA90 == OCTAL_LITERAL:
+ LA90 = self.input.LA(2)
+ if LA90 == 64:
+ LA90_111 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_112 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 75:
+ LA90_113 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66:
+ LA90_114 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 76:
+ LA90_115 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_116 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_117 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 70:
+ LA90_118 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 71:
+ LA90_119 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 68:
+ LA90_120 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 69:
+ LA90_121 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 101 or LA90 == 102:
+ LA90_122 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
+ LA90_123 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 95 or LA90 == 96:
+ LA90_124 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 77:
+ LA90_125 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 94:
+ LA90_126 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 93:
+ LA90_127 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 92:
+ LA90_128 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 91:
+ LA90_129 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 90:
+ LA90_130 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 27:
+ LA90_131 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 25:
+ alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_134 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == DECIMAL_LITERAL:
+ LA90 = self.input.LA(2)
+ if LA90 == 64:
+ LA90_135 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_136 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 75:
+ LA90_137 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66:
+ LA90_138 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 76:
+ LA90_139 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_140 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_141 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_142 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 70:
+ LA90_143 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 71:
+ LA90_144 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 68:
+ LA90_145 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 69:
+ LA90_146 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 101 or LA90 == 102:
+ LA90_147 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
+ LA90_148 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 95 or LA90 == 96:
+ LA90_149 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 77:
+ LA90_150 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 94:
+ LA90_151 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 93:
+ LA90_152 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 92:
+ LA90_153 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 91:
+ LA90_154 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 90:
+ LA90_155 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 27:
+ LA90_156 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 25:
+ alt90 = 1
+ elif LA90 == CHARACTER_LITERAL:
+ LA90 = self.input.LA(2)
+ if LA90 == 64:
+ LA90_159 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_160 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 75:
+ LA90_161 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66:
+ LA90_162 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 76:
+ LA90_163 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_164 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_165 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 70:
+ LA90_166 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 71:
+ LA90_167 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 68:
+ LA90_168 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 69:
+ LA90_169 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 101 or LA90 == 102:
+ LA90_170 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
+ LA90_171 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 95 or LA90 == 96:
+ LA90_172 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 77:
+ LA90_173 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 94:
+ LA90_174 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 93:
+ LA90_175 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 92:
+ LA90_176 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 91:
+ LA90_177 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 90:
+ LA90_178 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 27:
+ LA90_179 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 25:
+ alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_181 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == STRING_LITERAL:
+ LA90 = self.input.LA(2)
+ if LA90 == IDENTIFIER:
+ LA90_183 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 64:
+ LA90_184 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_185 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 75:
+ LA90_186 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66:
+ LA90_187 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 76:
+ LA90_188 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_189 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_190 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_191 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == STRING_LITERAL:
+ LA90_192 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 70:
+ LA90_193 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 71:
+ LA90_194 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 68:
+ LA90_195 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 69:
+ LA90_196 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 101 or LA90 == 102:
+ LA90_197 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
+ LA90_198 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 95 or LA90 == 96:
+ LA90_199 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 77:
+ LA90_200 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 94:
+ LA90_201 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 93:
+ LA90_202 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 92:
+ LA90_203 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 91:
+ LA90_204 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 90:
+ LA90_205 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 27:
+ LA90_206 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 25:
+ alt90 = 1
+ elif LA90 == FLOATING_POINT_LITERAL:
+ LA90 = self.input.LA(2)
+ if LA90 == 64:
+ LA90_209 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_210 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 75:
+ LA90_211 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66:
+ LA90_212 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 76:
+ LA90_213 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_214 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_215 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 28 or LA90 == 80 or LA90 == 81 or LA90 == 82 or LA90 == 83 or LA90 == 84 or LA90 == 85 or LA90 == 86 or LA90 == 87 or LA90 == 88 or LA90 == 89:
+ LA90_216 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 70:
+ LA90_217 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 71:
+ LA90_218 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 68:
+ LA90_219 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 69:
+ LA90_220 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 101 or LA90 == 102:
+ LA90_221 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 97 or LA90 == 98 or LA90 == 99 or LA90 == 100:
+ LA90_222 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 95 or LA90 == 96:
+ LA90_223 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 77:
+ LA90_224 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 94:
+ LA90_225 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 93:
+ LA90_226 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 92:
+ LA90_227 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 91:
+ LA90_228 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 90:
+ LA90_229 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 27:
+ LA90_230 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 25:
+ alt90 = 1
+ elif LA90 == 62:
+ LA90 = self.input.LA(2)
+ if LA90 == IDENTIFIER:
+ LA90_233 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == HEX_LITERAL:
+ LA90_234 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == OCTAL_LITERAL:
+ LA90_235 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == DECIMAL_LITERAL:
+ LA90_236 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == CHARACTER_LITERAL:
+ LA90_237 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == STRING_LITERAL:
+ LA90_238 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == FLOATING_POINT_LITERAL:
+ LA90_239 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_240 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_241 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_242 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
+ LA90_243 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 74:
+ LA90_244 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 49 or LA90 == 50 or LA90 == 51 or LA90 == 52 or LA90 == 53 or LA90 == 54 or LA90 == 55 or LA90 == 56 or LA90 == 57 or LA90 == 58 or LA90 == 59 or LA90 == 60 or LA90 == 61:
+ LA90_245 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 34:
+ LA90_246 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 35:
+ LA90_247 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 36:
+ LA90_248 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 37:
+ LA90_249 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 38:
+ LA90_250 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 39:
+ LA90_251 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 40:
+ LA90_252 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 41:
+ LA90_253 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 42:
+ LA90_254 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 45 or LA90 == 46:
+ LA90_255 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 48:
+ LA90_256 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90 = self.input.LA(2)
+ if LA90 == IDENTIFIER:
+ LA90_257 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == HEX_LITERAL:
+ LA90_258 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == OCTAL_LITERAL:
+ LA90_259 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == DECIMAL_LITERAL:
+ LA90_260 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == CHARACTER_LITERAL:
+ LA90_261 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == STRING_LITERAL:
+ LA90_262 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == FLOATING_POINT_LITERAL:
+ LA90_263 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_264 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_265 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_266 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
+ LA90_267 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 74:
+ LA90_268 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90 = self.input.LA(2)
+ if LA90 == IDENTIFIER:
+ LA90_269 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == HEX_LITERAL:
+ LA90_270 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == OCTAL_LITERAL:
+ LA90_271 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == DECIMAL_LITERAL:
+ LA90_272 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == CHARACTER_LITERAL:
+ LA90_273 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == STRING_LITERAL:
+ LA90_274 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == FLOATING_POINT_LITERAL:
+ LA90_275 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 62:
+ LA90_276 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_277 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_278 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
+ LA90_279 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 74:
+ LA90_280 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
+ LA90 = self.input.LA(2)
+ if LA90 == 62:
+ LA90_281 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == IDENTIFIER:
+ LA90_282 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == HEX_LITERAL:
+ LA90_283 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == OCTAL_LITERAL:
+ LA90_284 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == DECIMAL_LITERAL:
+ LA90_285 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == CHARACTER_LITERAL:
+ LA90_286 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == STRING_LITERAL:
+ LA90_287 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == FLOATING_POINT_LITERAL:
+ LA90_288 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_289 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_290 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
+ LA90_291 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 74:
+ LA90_292 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 74:
+ LA90 = self.input.LA(2)
+ if LA90 == 62:
+ LA90_293 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == IDENTIFIER:
+ LA90_294 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == HEX_LITERAL:
+ LA90_295 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == OCTAL_LITERAL:
+ LA90_296 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == DECIMAL_LITERAL:
+ LA90_297 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == CHARACTER_LITERAL:
+ LA90_298 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == STRING_LITERAL:
+ LA90_299 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == FLOATING_POINT_LITERAL:
+ LA90_300 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 72:
+ LA90_301 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 73:
+ LA90_302 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 66 or LA90 == 68 or LA90 == 69 or LA90 == 77 or LA90 == 78 or LA90 == 79:
+ LA90_303 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ elif LA90 == 74:
+ LA90_304 = self.input.LA(3)
+
+ if (self.synpred182()) :
+ alt90 = 1
+ if alt90 == 1:
+ # C.g:0:0: statement_list
+ self.following.append(self.FOLLOW_statement_list_in_macro_statement2170)
+ self.statement_list()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ # C.g:544:49: ( expression )?
+ alt91 = 2
+ LA91_0 = self.input.LA(1)
+
+ if ((IDENTIFIER <= LA91_0 <= FLOATING_POINT_LITERAL) or LA91_0 == 62 or LA91_0 == 66 or (68 <= LA91_0 <= 69) or (72 <= LA91_0 <= 74) or (77 <= LA91_0 <= 79)) :
+ alt91 = 1
+ if alt91 == 1:
+ # C.g:0:0: expression
+ self.following.append(self.FOLLOW_expression_in_macro_statement2173)
+ self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ self.match(self.input, 63, self.FOLLOW_63_in_macro_statement2176)
+ if self.failed:
+ return
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 64, macro_statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end macro_statement
+
+
+ # $ANTLR start labeled_statement
+ # C.g:547:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );
+ def labeled_statement(self, ):
+
+ labeled_statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 65):
+ return
+
+ # C.g:548:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement )
+ alt92 = 3
+ LA92 = self.input.LA(1)
+ if LA92 == IDENTIFIER:
+ alt92 = 1
+ elif LA92 == 106:
+ alt92 = 2
+ elif LA92 == 107:
+ alt92 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("547:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 92, 0, self.input)
+
+ raise nvae
+
+ if alt92 == 1:
+ # C.g:548:4: IDENTIFIER ':' statement
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement2188)
+ if self.failed:
+ return
+ self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2190)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_statement_in_labeled_statement2192)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt92 == 2:
+ # C.g:549:4: 'case' constant_expression ':' statement
+ self.match(self.input, 106, self.FOLLOW_106_in_labeled_statement2197)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_constant_expression_in_labeled_statement2199)
+ self.constant_expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2201)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_statement_in_labeled_statement2203)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt92 == 3:
+ # C.g:550:4: 'default' ':' statement
+ self.match(self.input, 107, self.FOLLOW_107_in_labeled_statement2208)
+ if self.failed:
+ return
+ self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2210)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_statement_in_labeled_statement2212)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 65, labeled_statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end labeled_statement
+
+ class compound_statement_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start compound_statement
+ # C.g:553:1: compound_statement : '{' ( declaration )* ( statement_list )? '}' ;
+ def compound_statement(self, ):
+
+ retval = self.compound_statement_return()
+ retval.start = self.input.LT(1)
+ compound_statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 66):
+ return retval
+
+ # C.g:554:2: ( '{' ( declaration )* ( statement_list )? '}' )
+ # C.g:554:4: '{' ( declaration )* ( statement_list )? '}'
+ self.match(self.input, 43, self.FOLLOW_43_in_compound_statement2223)
+ if self.failed:
+ return retval
+ # C.g:554:8: ( declaration )*
+ while True: #loop93
+ alt93 = 2
+ LA93 = self.input.LA(1)
+ if LA93 == IDENTIFIER:
+ LA93 = self.input.LA(2)
+ if LA93 == 62:
+ LA93_44 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_47 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 66:
+ LA93_48 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_49 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_50 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_51 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_52 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_53 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_54 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_55 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_56 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_57 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_58 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_59 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_60 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_61 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_62 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_63 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_64 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_65 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 26:
+ LA93 = self.input.LA(2)
+ if LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_86 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_87 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_88 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_89 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_90 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_91 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_92 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_93 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_94 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_95 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_96 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_97 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_98 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_99 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 66:
+ LA93_100 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_101 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_102 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_103 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_104 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_105 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_106 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_107 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_108 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_109 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_110 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_111 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_112 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_113 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_114 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_115 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_116 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_117 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_118 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_119 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_120 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_121 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_122 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_123 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_124 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 34:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_125 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_126 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_127 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_128 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_129 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_130 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_131 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_132 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_133 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_134 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_135 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_136 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_137 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_138 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_139 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_140 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_141 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_142 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_143 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_144 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 35:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_145 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_146 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_147 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_148 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_149 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_150 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_151 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_152 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_153 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_154 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_155 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_156 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_157 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_158 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_159 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_160 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_161 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_162 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_163 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_164 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 36:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_165 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_166 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_167 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_168 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_169 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_170 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_171 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_172 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_173 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_174 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_175 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_176 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_177 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_178 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_179 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_180 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_181 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_182 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_183 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_184 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 37:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_185 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_186 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_187 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_188 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_189 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_190 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_191 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_192 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_193 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_194 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_195 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_196 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_197 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_198 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_199 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_200 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_201 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_202 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_203 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_204 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 38:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_205 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_206 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_207 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_208 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_209 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_210 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_211 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_212 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_213 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_214 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_215 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_216 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_217 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_218 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_219 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_220 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_221 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_222 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_223 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_224 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 39:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_225 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_226 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_227 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_228 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_229 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_230 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_231 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_232 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_233 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_234 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_235 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_236 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_237 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_238 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_239 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_240 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_241 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_242 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_243 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_244 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 40:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_245 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_246 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_247 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_248 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_249 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_250 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_251 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_252 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_253 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_254 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_255 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_256 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_257 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_258 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_259 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_260 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_261 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_262 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_263 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_264 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 41:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_265 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_266 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_267 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_268 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_269 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_270 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_271 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_272 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_273 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_274 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_275 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_276 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_277 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_278 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_279 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_280 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_281 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_282 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_283 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_284 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 42:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_285 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_286 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_287 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_288 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_289 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_290 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_291 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_292 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_293 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_294 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_295 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_296 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_297 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_298 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_299 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_300 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_301 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_302 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_303 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_304 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_40 = self.input.LA(2)
+
+ if (LA93_40 == IDENTIFIER) :
+ LA93_305 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif (LA93_40 == 43) :
+ LA93_306 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+
+ elif LA93 == 48:
+ LA93_41 = self.input.LA(2)
+
+ if (LA93_41 == 43) :
+ LA93_307 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif (LA93_41 == IDENTIFIER) :
+ LA93_308 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 58 or LA93 == 59 or LA93 == 60 or LA93 == 61:
+ LA93 = self.input.LA(2)
+ if LA93 == 66:
+ LA93_309 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 58:
+ LA93_310 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 59:
+ LA93_311 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 60:
+ LA93_312 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == IDENTIFIER:
+ LA93_313 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 62:
+ LA93_314 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 25:
+ LA93_315 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 29 or LA93 == 30 or LA93 == 31 or LA93 == 32 or LA93 == 33:
+ LA93_316 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 34:
+ LA93_317 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 35:
+ LA93_318 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 36:
+ LA93_319 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 37:
+ LA93_320 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 38:
+ LA93_321 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 39:
+ LA93_322 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 40:
+ LA93_323 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 41:
+ LA93_324 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 42:
+ LA93_325 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 45 or LA93 == 46:
+ LA93_326 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 48:
+ LA93_327 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+ elif LA93 == 49 or LA93 == 50 or LA93 == 51 or LA93 == 52 or LA93 == 53 or LA93 == 54 or LA93 == 55 or LA93 == 56 or LA93 == 57 or LA93 == 61:
+ LA93_328 = self.input.LA(3)
+
+ if (self.synpred186()) :
+ alt93 = 1
+
+
+
+
+ if alt93 == 1:
+ # C.g:0:0: declaration
+ self.following.append(self.FOLLOW_declaration_in_compound_statement2225)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+ else:
+ break #loop93
+
+
+ # C.g:554:21: ( statement_list )?
+ alt94 = 2
+ LA94_0 = self.input.LA(1)
+
+ if ((IDENTIFIER <= LA94_0 <= FLOATING_POINT_LITERAL) or (25 <= LA94_0 <= 26) or (29 <= LA94_0 <= 43) or (45 <= LA94_0 <= 46) or (48 <= LA94_0 <= 62) or LA94_0 == 66 or (68 <= LA94_0 <= 69) or (72 <= LA94_0 <= 74) or (77 <= LA94_0 <= 79) or (103 <= LA94_0 <= 108) or (110 <= LA94_0 <= 117)) :
+ alt94 = 1
+ if alt94 == 1:
+ # C.g:0:0: statement_list
+ self.following.append(self.FOLLOW_statement_list_in_compound_statement2228)
+ self.statement_list()
+ self.following.pop()
+ if self.failed:
+ return retval
+
+
+
+ self.match(self.input, 44, self.FOLLOW_44_in_compound_statement2231)
+ if self.failed:
+ return retval
+
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 66, compound_statement_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end compound_statement
+
+
+ # $ANTLR start statement_list
+ # C.g:557:1: statement_list : ( statement )+ ;
+ def statement_list(self, ):
+
+ statement_list_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 67):
+ return
+
+ # C.g:558:2: ( ( statement )+ )
+ # C.g:558:4: ( statement )+
+ # C.g:558:4: ( statement )+
+ cnt95 = 0
+ while True: #loop95
+ alt95 = 2
+ LA95 = self.input.LA(1)
+ if LA95 == IDENTIFIER:
+ LA95 = self.input.LA(2)
+ if LA95 == 62:
+ LA95_46 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 25 or LA95 == 29 or LA95 == 30 or LA95 == 31 or LA95 == 32 or LA95 == 33 or LA95 == 34 or LA95 == 35 or LA95 == 36 or LA95 == 37 or LA95 == 38 or LA95 == 39 or LA95 == 40 or LA95 == 41 or LA95 == 42 or LA95 == 45 or LA95 == 46 or LA95 == 47 or LA95 == 48 or LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60 or LA95 == 61:
+ alt95 = 1
+ elif LA95 == STRING_LITERAL:
+ LA95_48 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == IDENTIFIER:
+ LA95_49 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 64:
+ LA95_50 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 75:
+ LA95_51 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66:
+ LA95_52 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 76:
+ LA95_53 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_54 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_55 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 70:
+ LA95_56 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 71:
+ LA95_57 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 68:
+ LA95_58 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 69:
+ LA95_59 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 101 or LA95 == 102:
+ LA95_60 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
+ LA95_61 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 95 or LA95 == 96:
+ LA95_62 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 77:
+ LA95_63 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 94:
+ LA95_64 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 93:
+ LA95_65 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 92:
+ LA95_66 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 91:
+ LA95_67 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 90:
+ LA95_68 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 27:
+ LA95_69 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_88 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+
+ elif LA95 == HEX_LITERAL:
+ LA95 = self.input.LA(2)
+ if LA95 == 64:
+ LA95_89 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_90 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 75:
+ LA95_91 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66:
+ LA95_92 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 76:
+ LA95_93 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_94 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_95 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_96 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 70:
+ LA95_97 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 71:
+ LA95_98 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 68:
+ LA95_99 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 69:
+ LA95_100 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 101 or LA95 == 102:
+ LA95_101 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
+ LA95_102 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 95 or LA95 == 96:
+ LA95_103 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 77:
+ LA95_104 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 94:
+ LA95_105 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 93:
+ LA95_106 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 92:
+ LA95_107 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 91:
+ LA95_108 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 90:
+ LA95_109 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 27:
+ LA95_110 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 25:
+ alt95 = 1
+
+ elif LA95 == OCTAL_LITERAL:
+ LA95 = self.input.LA(2)
+ if LA95 == 64:
+ LA95_113 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_114 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 75:
+ LA95_115 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66:
+ LA95_116 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 76:
+ LA95_117 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_118 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_119 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 70:
+ LA95_120 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 71:
+ LA95_121 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 68:
+ LA95_122 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 69:
+ LA95_123 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 101 or LA95 == 102:
+ LA95_124 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
+ LA95_125 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 95 or LA95 == 96:
+ LA95_126 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 77:
+ LA95_127 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 94:
+ LA95_128 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 93:
+ LA95_129 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 92:
+ LA95_130 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 91:
+ LA95_131 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 90:
+ LA95_132 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 27:
+ LA95_133 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_135 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 25:
+ alt95 = 1
+
+ elif LA95 == DECIMAL_LITERAL:
+ LA95 = self.input.LA(2)
+ if LA95 == 64:
+ LA95_137 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_138 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 75:
+ LA95_139 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66:
+ LA95_140 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 76:
+ LA95_141 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_142 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_143 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_144 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 70:
+ LA95_145 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 71:
+ LA95_146 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 68:
+ LA95_147 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 69:
+ LA95_148 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 101 or LA95 == 102:
+ LA95_149 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
+ LA95_150 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 95 or LA95 == 96:
+ LA95_151 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 77:
+ LA95_152 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 94:
+ LA95_153 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 93:
+ LA95_154 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 92:
+ LA95_155 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 91:
+ LA95_156 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 90:
+ LA95_157 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 27:
+ LA95_158 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 25:
+ alt95 = 1
+
+ elif LA95 == CHARACTER_LITERAL:
+ LA95 = self.input.LA(2)
+ if LA95 == 64:
+ LA95_161 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_162 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 75:
+ LA95_163 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66:
+ LA95_164 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 76:
+ LA95_165 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_166 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_167 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_168 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 70:
+ LA95_169 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 71:
+ LA95_170 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 68:
+ LA95_171 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 69:
+ LA95_172 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 101 or LA95 == 102:
+ LA95_173 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
+ LA95_174 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 95 or LA95 == 96:
+ LA95_175 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 77:
+ LA95_176 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 94:
+ LA95_177 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 93:
+ LA95_178 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 92:
+ LA95_179 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 91:
+ LA95_180 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 90:
+ LA95_181 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 27:
+ LA95_182 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 25:
+ alt95 = 1
+
+ elif LA95 == STRING_LITERAL:
+ LA95 = self.input.LA(2)
+ if LA95 == IDENTIFIER:
+ LA95_185 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 64:
+ LA95_186 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_187 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 75:
+ LA95_188 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66:
+ LA95_189 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 76:
+ LA95_190 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_191 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_192 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 70:
+ LA95_193 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 71:
+ LA95_194 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 68:
+ LA95_195 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 69:
+ LA95_196 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 101 or LA95 == 102:
+ LA95_197 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
+ LA95_198 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 95 or LA95 == 96:
+ LA95_199 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 77:
+ LA95_200 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 94:
+ LA95_201 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 93:
+ LA95_202 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 92:
+ LA95_203 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 91:
+ LA95_204 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 90:
+ LA95_205 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 27:
+ LA95_206 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 25:
+ alt95 = 1
+ elif LA95 == STRING_LITERAL:
+ LA95_208 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_209 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+
+ elif LA95 == FLOATING_POINT_LITERAL:
+ LA95 = self.input.LA(2)
+ if LA95 == 64:
+ LA95_211 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_212 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 75:
+ LA95_213 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66:
+ LA95_214 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 76:
+ LA95_215 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_216 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_217 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 70:
+ LA95_218 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 71:
+ LA95_219 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 68:
+ LA95_220 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 69:
+ LA95_221 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 101 or LA95 == 102:
+ LA95_222 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 97 or LA95 == 98 or LA95 == 99 or LA95 == 100:
+ LA95_223 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 95 or LA95 == 96:
+ LA95_224 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 77:
+ LA95_225 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 94:
+ LA95_226 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 93:
+ LA95_227 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 92:
+ LA95_228 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 91:
+ LA95_229 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 90:
+ LA95_230 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 27:
+ LA95_231 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 25:
+ alt95 = 1
+ elif LA95 == 28 or LA95 == 80 or LA95 == 81 or LA95 == 82 or LA95 == 83 or LA95 == 84 or LA95 == 85 or LA95 == 86 or LA95 == 87 or LA95 == 88 or LA95 == 89:
+ LA95_234 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+
+ elif LA95 == 62:
+ LA95 = self.input.LA(2)
+ if LA95 == IDENTIFIER:
+ LA95_235 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == HEX_LITERAL:
+ LA95_236 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == OCTAL_LITERAL:
+ LA95_237 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == DECIMAL_LITERAL:
+ LA95_238 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == CHARACTER_LITERAL:
+ LA95_239 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == STRING_LITERAL:
+ LA95_240 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == FLOATING_POINT_LITERAL:
+ LA95_241 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_242 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_243 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_244 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
+ LA95_245 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 74:
+ LA95_246 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60 or LA95 == 61:
+ LA95_247 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 34:
+ LA95_248 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 35:
+ LA95_249 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 36:
+ LA95_250 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 37:
+ LA95_251 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 38:
+ LA95_252 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 39:
+ LA95_253 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 40:
+ LA95_254 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 41:
+ LA95_255 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 42:
+ LA95_256 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 45 or LA95 == 46:
+ LA95_257 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 48:
+ LA95_258 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+
+ elif LA95 == 72:
+ LA95 = self.input.LA(2)
+ if LA95 == IDENTIFIER:
+ LA95_259 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == HEX_LITERAL:
+ LA95_260 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == OCTAL_LITERAL:
+ LA95_261 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == DECIMAL_LITERAL:
+ LA95_262 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == CHARACTER_LITERAL:
+ LA95_263 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == STRING_LITERAL:
+ LA95_264 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == FLOATING_POINT_LITERAL:
+ LA95_265 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_266 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_267 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_268 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
+ LA95_269 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 74:
+ LA95_270 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+
+ elif LA95 == 73:
+ LA95 = self.input.LA(2)
+ if LA95 == IDENTIFIER:
+ LA95_271 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == HEX_LITERAL:
+ LA95_272 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == OCTAL_LITERAL:
+ LA95_273 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == DECIMAL_LITERAL:
+ LA95_274 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == CHARACTER_LITERAL:
+ LA95_275 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == STRING_LITERAL:
+ LA95_276 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == FLOATING_POINT_LITERAL:
+ LA95_277 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 62:
+ LA95_278 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_279 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_280 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
+ LA95_281 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 74:
+ LA95_282 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
+ LA95 = self.input.LA(2)
+ if LA95 == 62:
+ LA95_283 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == IDENTIFIER:
+ LA95_284 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == HEX_LITERAL:
+ LA95_285 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == OCTAL_LITERAL:
+ LA95_286 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == DECIMAL_LITERAL:
+ LA95_287 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == CHARACTER_LITERAL:
+ LA95_288 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == STRING_LITERAL:
+ LA95_289 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == FLOATING_POINT_LITERAL:
+ LA95_290 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_291 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_292 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
+ LA95_293 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 74:
+ LA95_294 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+
+ elif LA95 == 74:
+ LA95 = self.input.LA(2)
+ if LA95 == 62:
+ LA95_295 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == IDENTIFIER:
+ LA95_296 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == HEX_LITERAL:
+ LA95_297 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == OCTAL_LITERAL:
+ LA95_298 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == DECIMAL_LITERAL:
+ LA95_299 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == CHARACTER_LITERAL:
+ LA95_300 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == STRING_LITERAL:
+ LA95_301 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == FLOATING_POINT_LITERAL:
+ LA95_302 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 72:
+ LA95_303 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 73:
+ LA95_304 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 66 or LA95 == 68 or LA95 == 69 or LA95 == 77 or LA95 == 78 or LA95 == 79:
+ LA95_305 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+ elif LA95 == 74:
+ LA95_306 = self.input.LA(3)
+
+ if (self.synpred188()) :
+ alt95 = 1
+
+
+
+ elif LA95 == 25 or LA95 == 26 or LA95 == 29 or LA95 == 30 or LA95 == 31 or LA95 == 32 or LA95 == 33 or LA95 == 34 or LA95 == 35 or LA95 == 36 or LA95 == 37 or LA95 == 38 or LA95 == 39 or LA95 == 40 or LA95 == 41 or LA95 == 42 or LA95 == 43 or LA95 == 45 or LA95 == 46 or LA95 == 48 or LA95 == 49 or LA95 == 50 or LA95 == 51 or LA95 == 52 or LA95 == 53 or LA95 == 54 or LA95 == 55 or LA95 == 56 or LA95 == 57 or LA95 == 58 or LA95 == 59 or LA95 == 60 or LA95 == 61 or LA95 == 103 or LA95 == 104 or LA95 == 105 or LA95 == 106 or LA95 == 107 or LA95 == 108 or LA95 == 110 or LA95 == 111 or LA95 == 112 or LA95 == 113 or LA95 == 114 or LA95 == 115 or LA95 == 116 or LA95 == 117:
+ alt95 = 1
+
+ if alt95 == 1:
+ # C.g:0:0: statement
+ self.following.append(self.FOLLOW_statement_in_statement_list2242)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ if cnt95 >= 1:
+ break #loop95
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(95, self.input)
+ raise eee
+
+ cnt95 += 1
+
+
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 67, statement_list_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end statement_list
+
+ class expression_statement_return(object):
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+
+ # $ANTLR start expression_statement
+ # C.g:561:1: expression_statement : ( ';' | expression ';' );
+ def expression_statement(self, ):
+
+ retval = self.expression_statement_return()
+ retval.start = self.input.LT(1)
+ expression_statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 68):
+ return retval
+
+ # C.g:562:2: ( ';' | expression ';' )
+ alt96 = 2
+ LA96_0 = self.input.LA(1)
+
+ if (LA96_0 == 25) :
+ alt96 = 1
+ elif ((IDENTIFIER <= LA96_0 <= FLOATING_POINT_LITERAL) or LA96_0 == 62 or LA96_0 == 66 or (68 <= LA96_0 <= 69) or (72 <= LA96_0 <= 74) or (77 <= LA96_0 <= 79)) :
+ alt96 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return retval
+
+ nvae = NoViableAltException("561:1: expression_statement : ( ';' | expression ';' );", 96, 0, self.input)
+
+ raise nvae
+
+ if alt96 == 1:
+ # C.g:562:4: ';'
+ self.match(self.input, 25, self.FOLLOW_25_in_expression_statement2254)
+ if self.failed:
+ return retval
+
+
+ elif alt96 == 2:
+ # C.g:563:4: expression ';'
+ self.following.append(self.FOLLOW_expression_in_expression_statement2259)
+ self.expression()
+ self.following.pop()
+ if self.failed:
+ return retval
+ self.match(self.input, 25, self.FOLLOW_25_in_expression_statement2261)
+ if self.failed:
+ return retval
+
+
+ retval.stop = self.input.LT(-1)
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 68, expression_statement_StartIndex)
+
+ pass
+
+ return retval
+
+ # $ANTLR end expression_statement
+
+
+ # $ANTLR start selection_statement
+ # C.g:566:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );
+ def selection_statement(self, ):
+
+ selection_statement_StartIndex = self.input.index()
+ e = None
+
+
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 69):
+ return
+
+ # C.g:567:2: ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement )
+ alt98 = 2
+ LA98_0 = self.input.LA(1)
+
+ if (LA98_0 == 108) :
+ alt98 = 1
+ elif (LA98_0 == 110) :
+ alt98 = 2
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("566:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 98, 0, self.input)
+
+ raise nvae
+
+ if alt98 == 1:
+ # C.g:567:4: 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )?
+ self.match(self.input, 108, self.FOLLOW_108_in_selection_statement2272)
+ if self.failed:
+ return
+ self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2274)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_in_selection_statement2278)
+ e = self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2280)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
+
+ self.following.append(self.FOLLOW_statement_in_selection_statement2284)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:567:167: ( options {k=1; backtrack=false; } : 'else' statement )?
+ alt97 = 2
+ LA97_0 = self.input.LA(1)
+
+ if (LA97_0 == 109) :
+ alt97 = 1
+ if alt97 == 1:
+ # C.g:567:200: 'else' statement
+ self.match(self.input, 109, self.FOLLOW_109_in_selection_statement2299)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_statement_in_selection_statement2301)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+ elif alt98 == 2:
+ # C.g:568:4: 'switch' '(' expression ')' statement
+ self.match(self.input, 110, self.FOLLOW_110_in_selection_statement2308)
+ if self.failed:
+ return
+ self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2310)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_in_selection_statement2312)
+ self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2314)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_statement_in_selection_statement2316)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 69, selection_statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end selection_statement
+
+
+ # $ANTLR start iteration_statement
+ # C.g:571:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );
+ def iteration_statement(self, ):
+
+ iteration_statement_StartIndex = self.input.index()
+ e = None
+
+
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 70):
+ return
+
+ # C.g:572:2: ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement )
+ alt100 = 3
+ LA100 = self.input.LA(1)
+ if LA100 == 111:
+ alt100 = 1
+ elif LA100 == 112:
+ alt100 = 2
+ elif LA100 == 113:
+ alt100 = 3
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("571:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );", 100, 0, self.input)
+
+ raise nvae
+
+ if alt100 == 1:
+ # C.g:572:4: 'while' '(' e= expression ')' statement
+ self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2327)
+ if self.failed:
+ return
+ self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2329)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_in_iteration_statement2333)
+ e = self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2335)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_statement_in_iteration_statement2337)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
+
+
+
+ elif alt100 == 2:
+ # C.g:573:4: 'do' statement 'while' '(' e= expression ')' ';'
+ self.match(self.input, 112, self.FOLLOW_112_in_iteration_statement2344)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_statement_in_iteration_statement2346)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2348)
+ if self.failed:
+ return
+ self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2350)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_in_iteration_statement2354)
+ e = self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2356)
+ if self.failed:
+ return
+ self.match(self.input, 25, self.FOLLOW_25_in_iteration_statement2358)
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
+
+
+
+ elif alt100 == 3:
+ # C.g:574:4: 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement
+ self.match(self.input, 113, self.FOLLOW_113_in_iteration_statement2365)
+ if self.failed:
+ return
+ self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2367)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2369)
+ self.expression_statement()
+ self.following.pop()
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2373)
+ e = self.expression_statement()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:574:58: ( expression )?
+ alt99 = 2
+ LA99_0 = self.input.LA(1)
+
+ if ((IDENTIFIER <= LA99_0 <= FLOATING_POINT_LITERAL) or LA99_0 == 62 or LA99_0 == 66 or (68 <= LA99_0 <= 69) or (72 <= LA99_0 <= 74) or (77 <= LA99_0 <= 79)) :
+ alt99 = 1
+ if alt99 == 1:
+ # C.g:0:0: expression
+ self.following.append(self.FOLLOW_expression_in_iteration_statement2375)
+ self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2378)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_statement_in_iteration_statement2380)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+ if self.backtracking == 0:
+ self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
+
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 70, iteration_statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end iteration_statement
+
+
+ # $ANTLR start jump_statement
+ # C.g:577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );
+ def jump_statement(self, ):
+
+ jump_statement_StartIndex = self.input.index()
+ try:
+ try:
+ if self.backtracking > 0 and self.alreadyParsedRule(self.input, 71):
+ return
+
+ # C.g:578:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' )
+ alt101 = 5
+ LA101 = self.input.LA(1)
+ if LA101 == 114:
+ alt101 = 1
+ elif LA101 == 115:
+ alt101 = 2
+ elif LA101 == 116:
+ alt101 = 3
+ elif LA101 == 117:
+ LA101_4 = self.input.LA(2)
+
+ if (LA101_4 == 25) :
+ alt101 = 4
+ elif ((IDENTIFIER <= LA101_4 <= FLOATING_POINT_LITERAL) or LA101_4 == 62 or LA101_4 == 66 or (68 <= LA101_4 <= 69) or (72 <= LA101_4 <= 74) or (77 <= LA101_4 <= 79)) :
+ alt101 = 5
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 4, self.input)
+
+ raise nvae
+
+ else:
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 0, self.input)
+
+ raise nvae
+
+ if alt101 == 1:
+ # C.g:578:4: 'goto' IDENTIFIER ';'
+ self.match(self.input, 114, self.FOLLOW_114_in_jump_statement2393)
+ if self.failed:
+ return
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2395)
+ if self.failed:
+ return
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2397)
+ if self.failed:
+ return
+
+
+ elif alt101 == 2:
+ # C.g:579:4: 'continue' ';'
+ self.match(self.input, 115, self.FOLLOW_115_in_jump_statement2402)
+ if self.failed:
+ return
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2404)
+ if self.failed:
+ return
+
+
+ elif alt101 == 3:
+ # C.g:580:4: 'break' ';'
+ self.match(self.input, 116, self.FOLLOW_116_in_jump_statement2409)
+ if self.failed:
+ return
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2411)
+ if self.failed:
+ return
+
+
+ elif alt101 == 4:
+ # C.g:581:4: 'return' ';'
+ self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2416)
+ if self.failed:
+ return
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2418)
+ if self.failed:
+ return
+
+
+ elif alt101 == 5:
+ # C.g:582:4: 'return' expression ';'
+ self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2423)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_expression_in_jump_statement2425)
+ self.expression()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2427)
+ if self.failed:
+ return
+
+
+
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ finally:
+ if self.backtracking > 0:
+ self.memoize(self.input, 71, jump_statement_StartIndex)
+
+ pass
+
+ return
+
+ # $ANTLR end jump_statement
+
+ # $ANTLR start synpred2
+ def synpred2_fragment(self, ):
+ # C.g:119:6: ( declaration_specifiers )
+ # C.g:119:6: declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred2100)
+ self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred2
+
+
+
+ # $ANTLR start synpred4
+ def synpred4_fragment(self, ):
+ # C.g:119:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )
+ # C.g:119:6: ( declaration_specifiers )? declarator ( declaration )* '{'
+ # C.g:119:6: ( declaration_specifiers )?
+ alt102 = 2
+ LA102 = self.input.LA(1)
+ if LA102 == 29 or LA102 == 30 or LA102 == 31 or LA102 == 32 or LA102 == 33 or LA102 == 34 or LA102 == 35 or LA102 == 36 or LA102 == 37 or LA102 == 38 or LA102 == 39 or LA102 == 40 or LA102 == 41 or LA102 == 42 or LA102 == 45 or LA102 == 46 or LA102 == 48 or LA102 == 49 or LA102 == 50 or LA102 == 51 or LA102 == 52 or LA102 == 53 or LA102 == 54 or LA102 == 55 or LA102 == 56 or LA102 == 57 or LA102 == 61:
+ alt102 = 1
+ elif LA102 == IDENTIFIER:
+ LA102 = self.input.LA(2)
+ if LA102 == 62:
+ LA102_21 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 29 or LA102 == 30 or LA102 == 31 or LA102 == 32 or LA102 == 33:
+ LA102_23 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 34:
+ LA102_24 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 35:
+ LA102_25 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 36:
+ LA102_26 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 37:
+ LA102_27 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 38:
+ LA102_28 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 39:
+ LA102_29 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 40:
+ LA102_30 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 41:
+ LA102_31 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 42:
+ LA102_32 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 45 or LA102 == 46:
+ LA102_33 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 48:
+ LA102_34 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == IDENTIFIER:
+ LA102_35 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 58:
+ LA102_36 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 66:
+ alt102 = 1
+ elif LA102 == 59:
+ LA102_39 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 60:
+ LA102_40 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 49 or LA102 == 50 or LA102 == 51 or LA102 == 52 or LA102 == 53 or LA102 == 54 or LA102 == 55 or LA102 == 56 or LA102 == 57 or LA102 == 61:
+ LA102_41 = self.input.LA(3)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 58:
+ LA102_14 = self.input.LA(2)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 59:
+ LA102_16 = self.input.LA(2)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ elif LA102 == 60:
+ LA102_17 = self.input.LA(2)
+
+ if (self.synpred2()) :
+ alt102 = 1
+ if alt102 == 1:
+ # C.g:0:0: declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred4100)
+ self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ self.following.append(self.FOLLOW_declarator_in_synpred4103)
+ self.declarator()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:119:41: ( declaration )*
+ while True: #loop103
+ alt103 = 2
+ LA103_0 = self.input.LA(1)
+
+ if (LA103_0 == IDENTIFIER or LA103_0 == 26 or (29 <= LA103_0 <= 42) or (45 <= LA103_0 <= 46) or (48 <= LA103_0 <= 61)) :
+ alt103 = 1
+
+
+ if alt103 == 1:
+ # C.g:0:0: declaration
+ self.following.append(self.FOLLOW_declaration_in_synpred4105)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop103
+
+
+ self.match(self.input, 43, self.FOLLOW_43_in_synpred4108)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred4
+
+
+
+ # $ANTLR start synpred5
+ def synpred5_fragment(self, ):
+ # C.g:120:4: ( declaration )
+ # C.g:120:4: declaration
+ self.following.append(self.FOLLOW_declaration_in_synpred5118)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred5
+
+
+
+ # $ANTLR start synpred7
+ def synpred7_fragment(self, ):
+ # C.g:146:6: ( declaration_specifiers )
+ # C.g:146:6: declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred7157)
+ self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred7
+
+
+
+ # $ANTLR start synpred10
+ def synpred10_fragment(self, ):
+ # C.g:167:18: ( declaration_specifiers )
+ # C.g:167:18: declaration_specifiers
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred10207)
+ self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred10
+
+
+
+ # $ANTLR start synpred14
+ def synpred14_fragment(self, ):
+ # C.g:184:7: ( type_specifier )
+ # C.g:184:7: type_specifier
+ self.following.append(self.FOLLOW_type_specifier_in_synpred14272)
+ self.type_specifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred14
+
+
+
+ # $ANTLR start synpred15
+ def synpred15_fragment(self, ):
+ # C.g:185:13: ( type_qualifier )
+ # C.g:185:13: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred15286)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred15
+
+
+
+ # $ANTLR start synpred33
+ def synpred33_fragment(self, ):
+ # C.g:225:16: ( type_qualifier )
+ # C.g:225:16: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred33444)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred33
+
+
+
+ # $ANTLR start synpred34
+ def synpred34_fragment(self, ):
+ # C.g:225:4: ( IDENTIFIER ( type_qualifier )* declarator )
+ # C.g:225:5: IDENTIFIER ( type_qualifier )* declarator
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred34442)
+ if self.failed:
+ return
+ # C.g:225:16: ( type_qualifier )*
+ while True: #loop106
+ alt106 = 2
+ LA106 = self.input.LA(1)
+ if LA106 == 58:
+ LA106_2 = self.input.LA(2)
+
+ if (self.synpred33()) :
+ alt106 = 1
+
+
+ elif LA106 == 59:
+ LA106_3 = self.input.LA(2)
+
+ if (self.synpred33()) :
+ alt106 = 1
+
+
+ elif LA106 == 60:
+ LA106_4 = self.input.LA(2)
+
+ if (self.synpred33()) :
+ alt106 = 1
+
+
+ elif LA106 == 49 or LA106 == 50 or LA106 == 51 or LA106 == 52 or LA106 == 53 or LA106 == 54 or LA106 == 55 or LA106 == 56 or LA106 == 57 or LA106 == 61:
+ alt106 = 1
+
+ if alt106 == 1:
+ # C.g:0:0: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred34444)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop106
+
+
+ self.following.append(self.FOLLOW_declarator_in_synpred34447)
+ self.declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred34
+
+
+
+ # $ANTLR start synpred39
+ def synpred39_fragment(self, ):
+ # C.g:253:6: ( type_qualifier )
+ # C.g:253:6: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred39566)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred39
+
+
+
+ # $ANTLR start synpred40
+ def synpred40_fragment(self, ):
+ # C.g:253:23: ( type_specifier )
+ # C.g:253:23: type_specifier
+ self.following.append(self.FOLLOW_type_specifier_in_synpred40570)
+ self.type_specifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred40
+
+
+
+ # $ANTLR start synpred66
+ def synpred66_fragment(self, ):
+ # C.g:297:4: ( ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator )
+ # C.g:297:4: ( pointer )? ( 'EFIAPI' )? ( 'EFI_BOOTSERVICE' )? ( 'EFI_RUNTIMESERVICE' )? direct_declarator
+ # C.g:297:4: ( pointer )?
+ alt111 = 2
+ LA111_0 = self.input.LA(1)
+
+ if (LA111_0 == 66) :
+ alt111 = 1
+ if alt111 == 1:
+ # C.g:0:0: pointer
+ self.following.append(self.FOLLOW_pointer_in_synpred66784)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+ # C.g:297:13: ( 'EFIAPI' )?
+ alt112 = 2
+ LA112_0 = self.input.LA(1)
+
+ if (LA112_0 == 58) :
+ alt112 = 1
+ if alt112 == 1:
+ # C.g:297:14: 'EFIAPI'
+ self.match(self.input, 58, self.FOLLOW_58_in_synpred66788)
+ if self.failed:
+ return
+
+
+
+ # C.g:297:25: ( 'EFI_BOOTSERVICE' )?
+ alt113 = 2
+ LA113_0 = self.input.LA(1)
+
+ if (LA113_0 == 59) :
+ alt113 = 1
+ if alt113 == 1:
+ # C.g:297:26: 'EFI_BOOTSERVICE'
+ self.match(self.input, 59, self.FOLLOW_59_in_synpred66793)
+ if self.failed:
+ return
+
+
+
+ # C.g:297:46: ( 'EFI_RUNTIMESERVICE' )?
+ alt114 = 2
+ LA114_0 = self.input.LA(1)
+
+ if (LA114_0 == 60) :
+ alt114 = 1
+ if alt114 == 1:
+ # C.g:297:47: 'EFI_RUNTIMESERVICE'
+ self.match(self.input, 60, self.FOLLOW_60_in_synpred66798)
+ if self.failed:
+ return
+
+
+
+ self.following.append(self.FOLLOW_direct_declarator_in_synpred66802)
+ self.direct_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred66
+
+
+
+ # $ANTLR start synpred67
+ def synpred67_fragment(self, ):
+ # C.g:303:15: ( declarator_suffix )
+ # C.g:303:15: declarator_suffix
+ self.following.append(self.FOLLOW_declarator_suffix_in_synpred67821)
+ self.declarator_suffix()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred67
+
+
+
+ # $ANTLR start synpred69
+ def synpred69_fragment(self, ):
+ # C.g:304:9: ( 'EFIAPI' )
+ # C.g:304:9: 'EFIAPI'
+ self.match(self.input, 58, self.FOLLOW_58_in_synpred69830)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred69
+
+
+
+ # $ANTLR start synpred70
+ def synpred70_fragment(self, ):
+ # C.g:304:35: ( declarator_suffix )
+ # C.g:304:35: declarator_suffix
+ self.following.append(self.FOLLOW_declarator_suffix_in_synpred70838)
+ self.declarator_suffix()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred70
+
+
+
+ # $ANTLR start synpred73
+ def synpred73_fragment(self, ):
+ # C.g:310:9: ( '(' parameter_type_list ')' )
+ # C.g:310:9: '(' parameter_type_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred73878)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_parameter_type_list_in_synpred73880)
+ self.parameter_type_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred73882)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred73
+
+
+
+ # $ANTLR start synpred74
+ def synpred74_fragment(self, ):
+ # C.g:311:9: ( '(' identifier_list ')' )
+ # C.g:311:9: '(' identifier_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred74892)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_identifier_list_in_synpred74894)
+ self.identifier_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred74896)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred74
+
+
+
+ # $ANTLR start synpred75
+ def synpred75_fragment(self, ):
+ # C.g:316:8: ( type_qualifier )
+ # C.g:316:8: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred75921)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred75
+
+
+
+ # $ANTLR start synpred76
+ def synpred76_fragment(self, ):
+ # C.g:316:24: ( pointer )
+ # C.g:316:24: pointer
+ self.following.append(self.FOLLOW_pointer_in_synpred76924)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred76
+
+
+
+ # $ANTLR start synpred77
+ def synpred77_fragment(self, ):
+ # C.g:316:4: ( '*' ( type_qualifier )+ ( pointer )? )
+ # C.g:316:4: '*' ( type_qualifier )+ ( pointer )?
+ self.match(self.input, 66, self.FOLLOW_66_in_synpred77919)
+ if self.failed:
+ return
+ # C.g:316:8: ( type_qualifier )+
+ cnt116 = 0
+ while True: #loop116
+ alt116 = 2
+ LA116_0 = self.input.LA(1)
+
+ if ((49 <= LA116_0 <= 61)) :
+ alt116 = 1
+
+
+ if alt116 == 1:
+ # C.g:0:0: type_qualifier
+ self.following.append(self.FOLLOW_type_qualifier_in_synpred77921)
+ self.type_qualifier()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ if cnt116 >= 1:
+ break #loop116
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(116, self.input)
+ raise eee
+
+ cnt116 += 1
+
+
+ # C.g:316:24: ( pointer )?
+ alt117 = 2
+ LA117_0 = self.input.LA(1)
+
+ if (LA117_0 == 66) :
+ alt117 = 1
+ if alt117 == 1:
+ # C.g:0:0: pointer
+ self.following.append(self.FOLLOW_pointer_in_synpred77924)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+ # $ANTLR end synpred77
+
+
+
+ # $ANTLR start synpred78
+ def synpred78_fragment(self, ):
+ # C.g:317:4: ( '*' pointer )
+ # C.g:317:4: '*' pointer
+ self.match(self.input, 66, self.FOLLOW_66_in_synpred78930)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_pointer_in_synpred78932)
+ self.pointer()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred78
+
+
+
+ # $ANTLR start synpred81
+ def synpred81_fragment(self, ):
+ # C.g:326:32: ( 'OPTIONAL' )
+ # C.g:326:32: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_synpred81977)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred81
+
+
+
+ # $ANTLR start synpred82
+ def synpred82_fragment(self, ):
+ # C.g:326:27: ( ',' ( 'OPTIONAL' )? parameter_declaration )
+ # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
+ self.match(self.input, 27, self.FOLLOW_27_in_synpred82974)
+ if self.failed:
+ return
+ # C.g:326:31: ( 'OPTIONAL' )?
+ alt119 = 2
+ LA119_0 = self.input.LA(1)
+
+ if (LA119_0 == 53) :
+ LA119_1 = self.input.LA(2)
+
+ if (self.synpred81()) :
+ alt119 = 1
+ if alt119 == 1:
+ # C.g:326:32: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_synpred82977)
+ if self.failed:
+ return
+
+
+
+ self.following.append(self.FOLLOW_parameter_declaration_in_synpred82981)
+ self.parameter_declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred82
+
+
+
+ # $ANTLR start synpred83
+ def synpred83_fragment(self, ):
+ # C.g:330:28: ( declarator )
+ # C.g:330:28: declarator
+ self.following.append(self.FOLLOW_declarator_in_synpred83997)
+ self.declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred83
+
+
+
+ # $ANTLR start synpred84
+ def synpred84_fragment(self, ):
+ # C.g:330:39: ( abstract_declarator )
+ # C.g:330:39: abstract_declarator
+ self.following.append(self.FOLLOW_abstract_declarator_in_synpred84999)
+ self.abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred84
+
+
+
+ # $ANTLR start synpred86
+ def synpred86_fragment(self, ):
+ # C.g:330:4: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? )
+ # C.g:330:4: declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )?
+ self.following.append(self.FOLLOW_declaration_specifiers_in_synpred86994)
+ self.declaration_specifiers()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:330:27: ( declarator | abstract_declarator )*
+ while True: #loop120
+ alt120 = 3
+ LA120 = self.input.LA(1)
+ if LA120 == 66:
+ LA120_3 = self.input.LA(2)
+
+ if (self.synpred83()) :
+ alt120 = 1
+ elif (self.synpred84()) :
+ alt120 = 2
+
+
+ elif LA120 == IDENTIFIER or LA120 == 58 or LA120 == 59 or LA120 == 60:
+ alt120 = 1
+ elif LA120 == 62:
+ LA120 = self.input.LA(2)
+ if LA120 == 29 or LA120 == 30 or LA120 == 31 or LA120 == 32 or LA120 == 33 or LA120 == 34 or LA120 == 35 or LA120 == 36 or LA120 == 37 or LA120 == 38 or LA120 == 39 or LA120 == 40 or LA120 == 41 or LA120 == 42 or LA120 == 45 or LA120 == 46 or LA120 == 48 or LA120 == 49 or LA120 == 50 or LA120 == 51 or LA120 == 52 or LA120 == 53 or LA120 == 54 or LA120 == 55 or LA120 == 56 or LA120 == 57 or LA120 == 61 or LA120 == 63 or LA120 == 64:
+ alt120 = 2
+ elif LA120 == 58:
+ LA120_21 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt120 = 1
+ elif (self.synpred84()) :
+ alt120 = 2
+
+
+ elif LA120 == 66:
+ LA120_22 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt120 = 1
+ elif (self.synpred84()) :
+ alt120 = 2
+
+
+ elif LA120 == 59:
+ LA120_23 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt120 = 1
+ elif (self.synpred84()) :
+ alt120 = 2
+
+
+ elif LA120 == 60:
+ LA120_24 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt120 = 1
+ elif (self.synpred84()) :
+ alt120 = 2
+
+
+ elif LA120 == IDENTIFIER:
+ LA120_25 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt120 = 1
+ elif (self.synpred84()) :
+ alt120 = 2
+
+
+ elif LA120 == 62:
+ LA120_26 = self.input.LA(3)
+
+ if (self.synpred83()) :
+ alt120 = 1
+ elif (self.synpred84()) :
+ alt120 = 2
+
+
+
+ elif LA120 == 64:
+ alt120 = 2
+
+ if alt120 == 1:
+ # C.g:330:28: declarator
+ self.following.append(self.FOLLOW_declarator_in_synpred86997)
+ self.declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ elif alt120 == 2:
+ # C.g:330:39: abstract_declarator
+ self.following.append(self.FOLLOW_abstract_declarator_in_synpred86999)
+ self.abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ else:
+ break #loop120
+
+
+ # C.g:330:61: ( 'OPTIONAL' )?
+ alt121 = 2
+ LA121_0 = self.input.LA(1)
+
+ if (LA121_0 == 53) :
+ alt121 = 1
+ if alt121 == 1:
+ # C.g:330:62: 'OPTIONAL'
+ self.match(self.input, 53, self.FOLLOW_53_in_synpred861004)
+ if self.failed:
+ return
+
+
+
+
+
+ # $ANTLR end synpred86
+
+
+
+ # $ANTLR start synpred90
+ def synpred90_fragment(self, ):
+ # C.g:341:4: ( specifier_qualifier_list ( abstract_declarator )? )
+ # C.g:341:4: specifier_qualifier_list ( abstract_declarator )?
+ self.following.append(self.FOLLOW_specifier_qualifier_list_in_synpred901046)
+ self.specifier_qualifier_list()
+ self.following.pop()
+ if self.failed:
+ return
+ # C.g:341:29: ( abstract_declarator )?
+ alt122 = 2
+ LA122_0 = self.input.LA(1)
+
+ if (LA122_0 == 62 or LA122_0 == 64 or LA122_0 == 66) :
+ alt122 = 1
+ if alt122 == 1:
+ # C.g:0:0: abstract_declarator
+ self.following.append(self.FOLLOW_abstract_declarator_in_synpred901048)
+ self.abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+
+
+
+ # $ANTLR end synpred90
+
+
+
+ # $ANTLR start synpred91
+ def synpred91_fragment(self, ):
+ # C.g:346:12: ( direct_abstract_declarator )
+ # C.g:346:12: direct_abstract_declarator
+ self.following.append(self.FOLLOW_direct_abstract_declarator_in_synpred911067)
+ self.direct_abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred91
+
+
+
+ # $ANTLR start synpred93
+ def synpred93_fragment(self, ):
+ # C.g:351:6: ( '(' abstract_declarator ')' )
+ # C.g:351:6: '(' abstract_declarator ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred931086)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_abstract_declarator_in_synpred931088)
+ self.abstract_declarator()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred931090)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred93
+
+
+
+ # $ANTLR start synpred94
+ def synpred94_fragment(self, ):
+ # C.g:351:65: ( abstract_declarator_suffix )
+ # C.g:351:65: abstract_declarator_suffix
+ self.following.append(self.FOLLOW_abstract_declarator_suffix_in_synpred941098)
+ self.abstract_declarator_suffix()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred94
+
+
+
+ # $ANTLR start synpred109
+ def synpred109_fragment(self, ):
+ # C.g:386:4: ( '(' type_name ')' cast_expression )
+ # C.g:386:4: '(' type_name ')' cast_expression
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred1091282)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_type_name_in_synpred1091284)
+ self.type_name()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred1091286)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_cast_expression_in_synpred1091288)
+ self.cast_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred109
+
+
+
+ # $ANTLR start synpred114
+ def synpred114_fragment(self, ):
+ # C.g:395:4: ( 'sizeof' unary_expression )
+ # C.g:395:4: 'sizeof' unary_expression
+ self.match(self.input, 74, self.FOLLOW_74_in_synpred1141330)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_unary_expression_in_synpred1141332)
+ self.unary_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred114
+
+
+
+ # $ANTLR start synpred117
+ def synpred117_fragment(self, ):
+ # C.g:409:13: ( '(' argument_expression_list ')' )
+ # C.g:409:13: '(' argument_expression_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred1171420)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_argument_expression_list_in_synpred1171424)
+ self.argument_expression_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred1171428)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred117
+
+
+
+ # $ANTLR start synpred118
+ def synpred118_fragment(self, ):
+ # C.g:410:13: ( '(' macro_parameter_list ')' )
+ # C.g:410:13: '(' macro_parameter_list ')'
+ self.match(self.input, 62, self.FOLLOW_62_in_synpred1181444)
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_macro_parameter_list_in_synpred1181446)
+ self.macro_parameter_list()
+ self.following.pop()
+ if self.failed:
+ return
+ self.match(self.input, 63, self.FOLLOW_63_in_synpred1181448)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred118
+
+
+
+ # $ANTLR start synpred120
+ def synpred120_fragment(self, ):
+ # C.g:412:13: ( '*' IDENTIFIER )
+ # C.g:412:13: '*' IDENTIFIER
+ self.match(self.input, 66, self.FOLLOW_66_in_synpred1201482)
+ if self.failed:
+ return
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1201486)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred120
+
+
+
+ # $ANTLR start synpred137
+ def synpred137_fragment(self, ):
+ # C.g:443:20: ( STRING_LITERAL )
+ # C.g:443:20: STRING_LITERAL
+ self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1371683)
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred137
+
+
+
+ # $ANTLR start synpred138
+ def synpred138_fragment(self, ):
+ # C.g:443:8: ( ( IDENTIFIER )* ( STRING_LITERAL )+ )
+ # C.g:443:8: ( IDENTIFIER )* ( STRING_LITERAL )+
+ # C.g:443:8: ( IDENTIFIER )*
+ while True: #loop125
+ alt125 = 2
+ LA125_0 = self.input.LA(1)
+
+ if (LA125_0 == IDENTIFIER) :
+ alt125 = 1
+
+
+ if alt125 == 1:
+ # C.g:0:0: IDENTIFIER
+ self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1381680)
+ if self.failed:
+ return
+
+
+ else:
+ break #loop125
+
+
+ # C.g:443:20: ( STRING_LITERAL )+
+ cnt126 = 0
+ while True: #loop126
+ alt126 = 2
+ LA126_0 = self.input.LA(1)
+
+ if (LA126_0 == STRING_LITERAL) :
+ alt126 = 1
+
+
+ if alt126 == 1:
+ # C.g:0:0: STRING_LITERAL
+ self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1381683)
+ if self.failed:
+ return
+
+
+ else:
+ if cnt126 >= 1:
+ break #loop126
+
+ if self.backtracking > 0:
+ self.failed = True
+ return
+
+ eee = EarlyExitException(126, self.input)
+ raise eee
+
+ cnt126 += 1
+
+
+
+
+ # $ANTLR end synpred138
+
+
+
+ # $ANTLR start synpred142
+ def synpred142_fragment(self, ):
+ # C.g:458:4: ( lvalue assignment_operator assignment_expression )
+ # C.g:458:4: lvalue assignment_operator assignment_expression
+ self.following.append(self.FOLLOW_lvalue_in_synpred1421744)
+ self.lvalue()
+ self.following.pop()
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_assignment_operator_in_synpred1421746)
+ self.assignment_operator()
+ self.following.pop()
+ if self.failed:
+ return
+ self.following.append(self.FOLLOW_assignment_expression_in_synpred1421748)
+ self.assignment_expression()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred142
+
+
+
+ # $ANTLR start synpred169
+ def synpred169_fragment(self, ):
+ # C.g:520:4: ( expression_statement )
+ # C.g:520:4: expression_statement
+ self.following.append(self.FOLLOW_expression_statement_in_synpred1692035)
+ self.expression_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred169
+
+
+
+ # $ANTLR start synpred173
+ def synpred173_fragment(self, ):
+ # C.g:524:4: ( macro_statement )
+ # C.g:524:4: macro_statement
+ self.following.append(self.FOLLOW_macro_statement_in_synpred1732055)
+ self.macro_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred173
+
+
+
+ # $ANTLR start synpred174
+ def synpred174_fragment(self, ):
+ # C.g:525:4: ( asm2_statement )
+ # C.g:525:4: asm2_statement
+ self.following.append(self.FOLLOW_asm2_statement_in_synpred1742060)
+ self.asm2_statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred174
+
+
+
+ # $ANTLR start synpred181
+ def synpred181_fragment(self, ):
+ # C.g:544:19: ( declaration )
+ # C.g:544:19: declaration
+ self.following.append(self.FOLLOW_declaration_in_synpred1812166)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred181
+
+
+
+ # $ANTLR start synpred182
+ def synpred182_fragment(self, ):
+ # C.g:544:33: ( statement_list )
+ # C.g:544:33: statement_list
+ self.following.append(self.FOLLOW_statement_list_in_synpred1822170)
+ self.statement_list()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred182
+
+
+
+ # $ANTLR start synpred186
+ def synpred186_fragment(self, ):
+ # C.g:554:8: ( declaration )
+ # C.g:554:8: declaration
+ self.following.append(self.FOLLOW_declaration_in_synpred1862225)
+ self.declaration()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred186
+
+
+
+ # $ANTLR start synpred188
+ def synpred188_fragment(self, ):
+ # C.g:558:4: ( statement )
+ # C.g:558:4: statement
+ self.following.append(self.FOLLOW_statement_in_synpred1882242)
+ self.statement()
+ self.following.pop()
+ if self.failed:
+ return
+
+
+ # $ANTLR end synpred188
+
+
+
+ def synpred69(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred69_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred81(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred81_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred82(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred82_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred66(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred66_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred83(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred83_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred84(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred84_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred67(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred67_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred86(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred86_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred120(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred120_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred40(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred40_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred142(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred142_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred182(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred182_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred109(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred109_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred181(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred181_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred186(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred186_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred188(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred188_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred169(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred169_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred117(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred117_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred70(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred70_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred118(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred118_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred34(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred34_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred33(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred33_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred94(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred94_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred39(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred39_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred74(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred74_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred114(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred114_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred93(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred93_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred75(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred75_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred137(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred137_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred90(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred90_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred138(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred138_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred91(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred91_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred73(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred73_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred5(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred5_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred78(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred78_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred7(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred7_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred76(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred76_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred77(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred77_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred2(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred2_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred4(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred4_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred174(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred174_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred173(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred173_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred14(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred14_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred15(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred15_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+ def synpred10(self):
+ self.backtracking += 1
+ start = self.input.mark()
+ self.synpred10_fragment()
+ success = not self.failed
+ self.input.rewind(start)
+ self.backtracking -= 1
+ self.failed = False
+ return success
+
+
+
+
+
+ FOLLOW_external_declaration_in_translation_unit74 = frozenset([1, 4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
+ FOLLOW_function_definition_in_external_declaration113 = frozenset([1])
+ FOLLOW_declaration_in_external_declaration118 = frozenset([1])
+ FOLLOW_macro_statement_in_external_declaration123 = frozenset([1, 25])
+ FOLLOW_25_in_external_declaration126 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_function_definition157 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_declarator_in_function_definition160 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_declaration_in_function_definition166 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_compound_statement_in_function_definition171 = frozenset([1])
+ FOLLOW_compound_statement_in_function_definition180 = frozenset([1])
+ FOLLOW_26_in_declaration203 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
+ FOLLOW_declaration_specifiers_in_declaration207 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_init_declarator_list_in_declaration216 = frozenset([25])
+ FOLLOW_25_in_declaration220 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_declaration234 = frozenset([4, 25, 58, 59, 60, 62, 66])
+ FOLLOW_init_declarator_list_in_declaration238 = frozenset([25])
+ FOLLOW_25_in_declaration243 = frozenset([1])
+ FOLLOW_storage_class_specifier_in_declaration_specifiers264 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_specifier_in_declaration_specifiers272 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_qualifier_in_declaration_specifiers286 = frozenset([1, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_init_declarator_in_init_declarator_list308 = frozenset([1, 27])
+ FOLLOW_27_in_init_declarator_list311 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_init_declarator_in_init_declarator_list313 = frozenset([1, 27])
+ FOLLOW_declarator_in_init_declarator326 = frozenset([1, 28])
+ FOLLOW_28_in_init_declarator329 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_initializer_in_init_declarator331 = frozenset([1])
+ FOLLOW_set_in_storage_class_specifier0 = frozenset([1])
+ FOLLOW_34_in_type_specifier376 = frozenset([1])
+ FOLLOW_35_in_type_specifier381 = frozenset([1])
+ FOLLOW_36_in_type_specifier386 = frozenset([1])
+ FOLLOW_37_in_type_specifier391 = frozenset([1])
+ FOLLOW_38_in_type_specifier396 = frozenset([1])
+ FOLLOW_39_in_type_specifier401 = frozenset([1])
+ FOLLOW_40_in_type_specifier406 = frozenset([1])
+ FOLLOW_41_in_type_specifier411 = frozenset([1])
+ FOLLOW_42_in_type_specifier416 = frozenset([1])
+ FOLLOW_struct_or_union_specifier_in_type_specifier423 = frozenset([1])
+ FOLLOW_enum_specifier_in_type_specifier433 = frozenset([1])
+ FOLLOW_type_id_in_type_specifier451 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_type_id467 = frozenset([1])
+ FOLLOW_struct_or_union_in_struct_or_union_specifier494 = frozenset([4, 43])
+ FOLLOW_IDENTIFIER_in_struct_or_union_specifier496 = frozenset([43])
+ FOLLOW_43_in_struct_or_union_specifier499 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_struct_declaration_list_in_struct_or_union_specifier501 = frozenset([44])
+ FOLLOW_44_in_struct_or_union_specifier503 = frozenset([1])
+ FOLLOW_struct_or_union_in_struct_or_union_specifier508 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_struct_or_union_specifier510 = frozenset([1])
+ FOLLOW_set_in_struct_or_union0 = frozenset([1])
+ FOLLOW_struct_declaration_in_struct_declaration_list537 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_specifier_qualifier_list_in_struct_declaration549 = frozenset([4, 47, 58, 59, 60, 62, 66])
+ FOLLOW_struct_declarator_list_in_struct_declaration551 = frozenset([25])
+ FOLLOW_25_in_struct_declaration553 = frozenset([1])
+ FOLLOW_type_qualifier_in_specifier_qualifier_list566 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_specifier_in_specifier_qualifier_list570 = frozenset([1, 4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_struct_declarator_in_struct_declarator_list584 = frozenset([1, 27])
+ FOLLOW_27_in_struct_declarator_list587 = frozenset([4, 47, 58, 59, 60, 62, 66])
+ FOLLOW_struct_declarator_in_struct_declarator_list589 = frozenset([1, 27])
+ FOLLOW_declarator_in_struct_declarator602 = frozenset([1, 47])
+ FOLLOW_47_in_struct_declarator605 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_struct_declarator607 = frozenset([1])
+ FOLLOW_47_in_struct_declarator614 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_struct_declarator616 = frozenset([1])
+ FOLLOW_48_in_enum_specifier634 = frozenset([43])
+ FOLLOW_43_in_enum_specifier636 = frozenset([4])
+ FOLLOW_enumerator_list_in_enum_specifier638 = frozenset([27, 44])
+ FOLLOW_27_in_enum_specifier640 = frozenset([44])
+ FOLLOW_44_in_enum_specifier643 = frozenset([1])
+ FOLLOW_48_in_enum_specifier648 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_enum_specifier650 = frozenset([43])
+ FOLLOW_43_in_enum_specifier652 = frozenset([4])
+ FOLLOW_enumerator_list_in_enum_specifier654 = frozenset([27, 44])
+ FOLLOW_27_in_enum_specifier656 = frozenset([44])
+ FOLLOW_44_in_enum_specifier659 = frozenset([1])
+ FOLLOW_48_in_enum_specifier664 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_enum_specifier666 = frozenset([1])
+ FOLLOW_enumerator_in_enumerator_list677 = frozenset([1, 27])
+ FOLLOW_27_in_enumerator_list680 = frozenset([4])
+ FOLLOW_enumerator_in_enumerator_list682 = frozenset([1, 27])
+ FOLLOW_IDENTIFIER_in_enumerator695 = frozenset([1, 28])
+ FOLLOW_28_in_enumerator698 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_enumerator700 = frozenset([1])
+ FOLLOW_set_in_type_qualifier0 = frozenset([1])
+ FOLLOW_pointer_in_declarator784 = frozenset([4, 58, 59, 60, 62])
+ FOLLOW_58_in_declarator788 = frozenset([4, 59, 60, 62])
+ FOLLOW_59_in_declarator793 = frozenset([4, 60, 62])
+ FOLLOW_60_in_declarator798 = frozenset([4, 62])
+ FOLLOW_direct_declarator_in_declarator802 = frozenset([1])
+ FOLLOW_pointer_in_declarator808 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_direct_declarator819 = frozenset([1, 62, 64])
+ FOLLOW_declarator_suffix_in_direct_declarator821 = frozenset([1, 62, 64])
+ FOLLOW_62_in_direct_declarator827 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_58_in_direct_declarator830 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_declarator_in_direct_declarator834 = frozenset([63])
+ FOLLOW_63_in_direct_declarator836 = frozenset([62, 64])
+ FOLLOW_declarator_suffix_in_direct_declarator838 = frozenset([1, 62, 64])
+ FOLLOW_64_in_declarator_suffix852 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_declarator_suffix854 = frozenset([65])
+ FOLLOW_65_in_declarator_suffix856 = frozenset([1])
+ FOLLOW_64_in_declarator_suffix866 = frozenset([65])
+ FOLLOW_65_in_declarator_suffix868 = frozenset([1])
+ FOLLOW_62_in_declarator_suffix878 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_type_list_in_declarator_suffix880 = frozenset([63])
+ FOLLOW_63_in_declarator_suffix882 = frozenset([1])
+ FOLLOW_62_in_declarator_suffix892 = frozenset([4])
+ FOLLOW_identifier_list_in_declarator_suffix894 = frozenset([63])
+ FOLLOW_63_in_declarator_suffix896 = frozenset([1])
+ FOLLOW_62_in_declarator_suffix906 = frozenset([63])
+ FOLLOW_63_in_declarator_suffix908 = frozenset([1])
+ FOLLOW_66_in_pointer919 = frozenset([49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_qualifier_in_pointer921 = frozenset([1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_pointer_in_pointer924 = frozenset([1])
+ FOLLOW_66_in_pointer930 = frozenset([66])
+ FOLLOW_pointer_in_pointer932 = frozenset([1])
+ FOLLOW_66_in_pointer937 = frozenset([1])
+ FOLLOW_parameter_list_in_parameter_type_list948 = frozenset([1, 27])
+ FOLLOW_27_in_parameter_type_list951 = frozenset([53, 67])
+ FOLLOW_53_in_parameter_type_list954 = frozenset([67])
+ FOLLOW_67_in_parameter_type_list958 = frozenset([1])
+ FOLLOW_parameter_declaration_in_parameter_list971 = frozenset([1, 27])
+ FOLLOW_27_in_parameter_list974 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_53_in_parameter_list977 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_declaration_in_parameter_list981 = frozenset([1, 27])
+ FOLLOW_declaration_specifiers_in_parameter_declaration994 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_declarator_in_parameter_declaration997 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_abstract_declarator_in_parameter_declaration999 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_53_in_parameter_declaration1004 = frozenset([1])
+ FOLLOW_pointer_in_parameter_declaration1013 = frozenset([4, 66])
+ FOLLOW_IDENTIFIER_in_parameter_declaration1016 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_identifier_list1027 = frozenset([1, 27])
+ FOLLOW_27_in_identifier_list1031 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_identifier_list1033 = frozenset([1, 27])
+ FOLLOW_specifier_qualifier_list_in_type_name1046 = frozenset([1, 62, 64, 66])
+ FOLLOW_abstract_declarator_in_type_name1048 = frozenset([1])
+ FOLLOW_type_id_in_type_name1054 = frozenset([1])
+ FOLLOW_pointer_in_abstract_declarator1065 = frozenset([1, 62, 64])
+ FOLLOW_direct_abstract_declarator_in_abstract_declarator1067 = frozenset([1])
+ FOLLOW_direct_abstract_declarator_in_abstract_declarator1073 = frozenset([1])
+ FOLLOW_62_in_direct_abstract_declarator1086 = frozenset([62, 64, 66])
+ FOLLOW_abstract_declarator_in_direct_abstract_declarator1088 = frozenset([63])
+ FOLLOW_63_in_direct_abstract_declarator1090 = frozenset([1, 62, 64])
+ FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1094 = frozenset([1, 62, 64])
+ FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1098 = frozenset([1, 62, 64])
+ FOLLOW_64_in_abstract_declarator_suffix1110 = frozenset([65])
+ FOLLOW_65_in_abstract_declarator_suffix1112 = frozenset([1])
+ FOLLOW_64_in_abstract_declarator_suffix1117 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_abstract_declarator_suffix1119 = frozenset([65])
+ FOLLOW_65_in_abstract_declarator_suffix1121 = frozenset([1])
+ FOLLOW_62_in_abstract_declarator_suffix1126 = frozenset([63])
+ FOLLOW_63_in_abstract_declarator_suffix1128 = frozenset([1])
+ FOLLOW_62_in_abstract_declarator_suffix1133 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_type_list_in_abstract_declarator_suffix1135 = frozenset([63])
+ FOLLOW_63_in_abstract_declarator_suffix1137 = frozenset([1])
+ FOLLOW_assignment_expression_in_initializer1150 = frozenset([1])
+ FOLLOW_43_in_initializer1155 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_initializer_list_in_initializer1157 = frozenset([27, 44])
+ FOLLOW_27_in_initializer1159 = frozenset([44])
+ FOLLOW_44_in_initializer1162 = frozenset([1])
+ FOLLOW_initializer_in_initializer_list1173 = frozenset([1, 27])
+ FOLLOW_27_in_initializer_list1176 = frozenset([4, 5, 6, 7, 8, 9, 10, 43, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_initializer_in_initializer_list1178 = frozenset([1, 27])
+ FOLLOW_assignment_expression_in_argument_expression_list1196 = frozenset([1, 27, 53])
+ FOLLOW_53_in_argument_expression_list1199 = frozenset([1, 27])
+ FOLLOW_27_in_argument_expression_list1204 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_assignment_expression_in_argument_expression_list1206 = frozenset([1, 27, 53])
+ FOLLOW_53_in_argument_expression_list1209 = frozenset([1, 27])
+ FOLLOW_multiplicative_expression_in_additive_expression1225 = frozenset([1, 68, 69])
+ FOLLOW_68_in_additive_expression1229 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_multiplicative_expression_in_additive_expression1231 = frozenset([1, 68, 69])
+ FOLLOW_69_in_additive_expression1235 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_multiplicative_expression_in_additive_expression1237 = frozenset([1, 68, 69])
+ FOLLOW_cast_expression_in_multiplicative_expression1251 = frozenset([1, 66, 70, 71])
+ FOLLOW_66_in_multiplicative_expression1255 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_multiplicative_expression1257 = frozenset([1, 66, 70, 71])
+ FOLLOW_70_in_multiplicative_expression1261 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_multiplicative_expression1263 = frozenset([1, 66, 70, 71])
+ FOLLOW_71_in_multiplicative_expression1267 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_multiplicative_expression1269 = frozenset([1, 66, 70, 71])
+ FOLLOW_62_in_cast_expression1282 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_name_in_cast_expression1284 = frozenset([63])
+ FOLLOW_63_in_cast_expression1286 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_cast_expression1288 = frozenset([1])
+ FOLLOW_unary_expression_in_cast_expression1293 = frozenset([1])
+ FOLLOW_postfix_expression_in_unary_expression1304 = frozenset([1])
+ FOLLOW_72_in_unary_expression1309 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_unary_expression_in_unary_expression1311 = frozenset([1])
+ FOLLOW_73_in_unary_expression1316 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_unary_expression_in_unary_expression1318 = frozenset([1])
+ FOLLOW_unary_operator_in_unary_expression1323 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_unary_expression1325 = frozenset([1])
+ FOLLOW_74_in_unary_expression1330 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_unary_expression_in_unary_expression1332 = frozenset([1])
+ FOLLOW_74_in_unary_expression1337 = frozenset([62])
+ FOLLOW_62_in_unary_expression1339 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_name_in_unary_expression1341 = frozenset([63])
+ FOLLOW_63_in_unary_expression1343 = frozenset([1])
+ FOLLOW_primary_expression_in_postfix_expression1367 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_64_in_postfix_expression1383 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_postfix_expression1385 = frozenset([65])
+ FOLLOW_65_in_postfix_expression1387 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_62_in_postfix_expression1401 = frozenset([63])
+ FOLLOW_63_in_postfix_expression1405 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_62_in_postfix_expression1420 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_argument_expression_list_in_postfix_expression1424 = frozenset([63])
+ FOLLOW_63_in_postfix_expression1428 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_62_in_postfix_expression1444 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_macro_parameter_list_in_postfix_expression1446 = frozenset([63])
+ FOLLOW_63_in_postfix_expression1448 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_75_in_postfix_expression1462 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_postfix_expression1466 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_66_in_postfix_expression1482 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_postfix_expression1486 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_76_in_postfix_expression1502 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_postfix_expression1506 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_72_in_postfix_expression1522 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_73_in_postfix_expression1536 = frozenset([1, 62, 64, 66, 72, 73, 75, 76])
+ FOLLOW_parameter_declaration_in_macro_parameter_list1559 = frozenset([1, 27])
+ FOLLOW_27_in_macro_parameter_list1562 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_declaration_in_macro_parameter_list1564 = frozenset([1, 27])
+ FOLLOW_set_in_unary_operator0 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_primary_expression1613 = frozenset([1])
+ FOLLOW_constant_in_primary_expression1618 = frozenset([1])
+ FOLLOW_62_in_primary_expression1623 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_primary_expression1625 = frozenset([63])
+ FOLLOW_63_in_primary_expression1627 = frozenset([1])
+ FOLLOW_HEX_LITERAL_in_constant1643 = frozenset([1])
+ FOLLOW_OCTAL_LITERAL_in_constant1653 = frozenset([1])
+ FOLLOW_DECIMAL_LITERAL_in_constant1663 = frozenset([1])
+ FOLLOW_CHARACTER_LITERAL_in_constant1671 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_constant1680 = frozenset([4, 9])
+ FOLLOW_STRING_LITERAL_in_constant1683 = frozenset([1, 4, 9])
+ FOLLOW_IDENTIFIER_in_constant1688 = frozenset([1, 4])
+ FOLLOW_FLOATING_POINT_LITERAL_in_constant1699 = frozenset([1])
+ FOLLOW_assignment_expression_in_expression1715 = frozenset([1, 27])
+ FOLLOW_27_in_expression1718 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_assignment_expression_in_expression1720 = frozenset([1, 27])
+ FOLLOW_conditional_expression_in_constant_expression1733 = frozenset([1])
+ FOLLOW_lvalue_in_assignment_expression1744 = frozenset([28, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89])
+ FOLLOW_assignment_operator_in_assignment_expression1746 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_assignment_expression_in_assignment_expression1748 = frozenset([1])
+ FOLLOW_conditional_expression_in_assignment_expression1753 = frozenset([1])
+ FOLLOW_unary_expression_in_lvalue1765 = frozenset([1])
+ FOLLOW_set_in_assignment_operator0 = frozenset([1])
+ FOLLOW_logical_or_expression_in_conditional_expression1839 = frozenset([1, 90])
+ FOLLOW_90_in_conditional_expression1842 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_conditional_expression1844 = frozenset([47])
+ FOLLOW_47_in_conditional_expression1846 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_conditional_expression_in_conditional_expression1848 = frozenset([1])
+ FOLLOW_logical_and_expression_in_logical_or_expression1863 = frozenset([1, 91])
+ FOLLOW_91_in_logical_or_expression1866 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_logical_and_expression_in_logical_or_expression1868 = frozenset([1, 91])
+ FOLLOW_inclusive_or_expression_in_logical_and_expression1881 = frozenset([1, 92])
+ FOLLOW_92_in_logical_and_expression1884 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_inclusive_or_expression_in_logical_and_expression1886 = frozenset([1, 92])
+ FOLLOW_exclusive_or_expression_in_inclusive_or_expression1899 = frozenset([1, 93])
+ FOLLOW_93_in_inclusive_or_expression1902 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_exclusive_or_expression_in_inclusive_or_expression1904 = frozenset([1, 93])
+ FOLLOW_and_expression_in_exclusive_or_expression1917 = frozenset([1, 94])
+ FOLLOW_94_in_exclusive_or_expression1920 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_and_expression_in_exclusive_or_expression1922 = frozenset([1, 94])
+ FOLLOW_equality_expression_in_and_expression1935 = frozenset([1, 77])
+ FOLLOW_77_in_and_expression1938 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_equality_expression_in_and_expression1940 = frozenset([1, 77])
+ FOLLOW_relational_expression_in_equality_expression1952 = frozenset([1, 95, 96])
+ FOLLOW_set_in_equality_expression1955 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_relational_expression_in_equality_expression1961 = frozenset([1, 95, 96])
+ FOLLOW_shift_expression_in_relational_expression1975 = frozenset([1, 97, 98, 99, 100])
+ FOLLOW_set_in_relational_expression1978 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_shift_expression_in_relational_expression1988 = frozenset([1, 97, 98, 99, 100])
+ FOLLOW_additive_expression_in_shift_expression2001 = frozenset([1, 101, 102])
+ FOLLOW_set_in_shift_expression2004 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_additive_expression_in_shift_expression2010 = frozenset([1, 101, 102])
+ FOLLOW_labeled_statement_in_statement2025 = frozenset([1])
+ FOLLOW_compound_statement_in_statement2030 = frozenset([1])
+ FOLLOW_expression_statement_in_statement2035 = frozenset([1])
+ FOLLOW_selection_statement_in_statement2040 = frozenset([1])
+ FOLLOW_iteration_statement_in_statement2045 = frozenset([1])
+ FOLLOW_jump_statement_in_statement2050 = frozenset([1])
+ FOLLOW_macro_statement_in_statement2055 = frozenset([1])
+ FOLLOW_asm2_statement_in_statement2060 = frozenset([1])
+ FOLLOW_asm1_statement_in_statement2065 = frozenset([1])
+ FOLLOW_asm_statement_in_statement2070 = frozenset([1])
+ FOLLOW_declaration_in_statement2075 = frozenset([1])
+ FOLLOW_103_in_asm2_statement2086 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_asm2_statement2089 = frozenset([62])
+ FOLLOW_62_in_asm2_statement2091 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_set_in_asm2_statement2094 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_63_in_asm2_statement2101 = frozenset([25])
+ FOLLOW_25_in_asm2_statement2103 = frozenset([1])
+ FOLLOW_104_in_asm1_statement2115 = frozenset([43])
+ FOLLOW_43_in_asm1_statement2117 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_set_in_asm1_statement2120 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_44_in_asm1_statement2127 = frozenset([1])
+ FOLLOW_105_in_asm_statement2138 = frozenset([43])
+ FOLLOW_43_in_asm_statement2140 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_set_in_asm_statement2143 = frozenset([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_44_in_asm_statement2150 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_macro_statement2162 = frozenset([62])
+ FOLLOW_62_in_macro_statement2164 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_declaration_in_macro_statement2166 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_list_in_macro_statement2170 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 63, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_macro_statement2173 = frozenset([63])
+ FOLLOW_63_in_macro_statement2176 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_labeled_statement2188 = frozenset([47])
+ FOLLOW_47_in_labeled_statement2190 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_labeled_statement2192 = frozenset([1])
+ FOLLOW_106_in_labeled_statement2197 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_constant_expression_in_labeled_statement2199 = frozenset([47])
+ FOLLOW_47_in_labeled_statement2201 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_labeled_statement2203 = frozenset([1])
+ FOLLOW_107_in_labeled_statement2208 = frozenset([47])
+ FOLLOW_47_in_labeled_statement2210 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_labeled_statement2212 = frozenset([1])
+ FOLLOW_43_in_compound_statement2223 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_declaration_in_compound_statement2225 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_list_in_compound_statement2228 = frozenset([44])
+ FOLLOW_44_in_compound_statement2231 = frozenset([1])
+ FOLLOW_statement_in_statement_list2242 = frozenset([1, 4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_25_in_expression_statement2254 = frozenset([1])
+ FOLLOW_expression_in_expression_statement2259 = frozenset([25])
+ FOLLOW_25_in_expression_statement2261 = frozenset([1])
+ FOLLOW_108_in_selection_statement2272 = frozenset([62])
+ FOLLOW_62_in_selection_statement2274 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_selection_statement2278 = frozenset([63])
+ FOLLOW_63_in_selection_statement2280 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_selection_statement2284 = frozenset([1, 109])
+ FOLLOW_109_in_selection_statement2299 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_selection_statement2301 = frozenset([1])
+ FOLLOW_110_in_selection_statement2308 = frozenset([62])
+ FOLLOW_62_in_selection_statement2310 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_selection_statement2312 = frozenset([63])
+ FOLLOW_63_in_selection_statement2314 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_selection_statement2316 = frozenset([1])
+ FOLLOW_111_in_iteration_statement2327 = frozenset([62])
+ FOLLOW_62_in_iteration_statement2329 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_iteration_statement2333 = frozenset([63])
+ FOLLOW_63_in_iteration_statement2335 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_iteration_statement2337 = frozenset([1])
+ FOLLOW_112_in_iteration_statement2344 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_iteration_statement2346 = frozenset([111])
+ FOLLOW_111_in_iteration_statement2348 = frozenset([62])
+ FOLLOW_62_in_iteration_statement2350 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_iteration_statement2354 = frozenset([63])
+ FOLLOW_63_in_iteration_statement2356 = frozenset([25])
+ FOLLOW_25_in_iteration_statement2358 = frozenset([1])
+ FOLLOW_113_in_iteration_statement2365 = frozenset([62])
+ FOLLOW_62_in_iteration_statement2367 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_statement_in_iteration_statement2369 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_statement_in_iteration_statement2373 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 63, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_iteration_statement2375 = frozenset([63])
+ FOLLOW_63_in_iteration_statement2378 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117])
+ FOLLOW_statement_in_iteration_statement2380 = frozenset([1])
+ FOLLOW_114_in_jump_statement2393 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_jump_statement2395 = frozenset([25])
+ FOLLOW_25_in_jump_statement2397 = frozenset([1])
+ FOLLOW_115_in_jump_statement2402 = frozenset([25])
+ FOLLOW_25_in_jump_statement2404 = frozenset([1])
+ FOLLOW_116_in_jump_statement2409 = frozenset([25])
+ FOLLOW_25_in_jump_statement2411 = frozenset([1])
+ FOLLOW_117_in_jump_statement2416 = frozenset([25])
+ FOLLOW_25_in_jump_statement2418 = frozenset([1])
+ FOLLOW_117_in_jump_statement2423 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_expression_in_jump_statement2425 = frozenset([25])
+ FOLLOW_25_in_jump_statement2427 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred2100 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred4100 = frozenset([4, 58, 59, 60, 62, 66])
+ FOLLOW_declarator_in_synpred4103 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_declaration_in_synpred4105 = frozenset([4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_43_in_synpred4108 = frozenset([1])
+ FOLLOW_declaration_in_synpred5118 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred7157 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred10207 = frozenset([1])
+ FOLLOW_type_specifier_in_synpred14272 = frozenset([1])
+ FOLLOW_type_qualifier_in_synpred15286 = frozenset([1])
+ FOLLOW_type_qualifier_in_synpred33444 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_synpred34442 = frozenset([4, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
+ FOLLOW_type_qualifier_in_synpred34444 = frozenset([4, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
+ FOLLOW_declarator_in_synpred34447 = frozenset([1])
+ FOLLOW_type_qualifier_in_synpred39566 = frozenset([1])
+ FOLLOW_type_specifier_in_synpred40570 = frozenset([1])
+ FOLLOW_pointer_in_synpred66784 = frozenset([4, 58, 59, 60, 62])
+ FOLLOW_58_in_synpred66788 = frozenset([4, 59, 60, 62])
+ FOLLOW_59_in_synpred66793 = frozenset([4, 60, 62])
+ FOLLOW_60_in_synpred66798 = frozenset([4, 62])
+ FOLLOW_direct_declarator_in_synpred66802 = frozenset([1])
+ FOLLOW_declarator_suffix_in_synpred67821 = frozenset([1])
+ FOLLOW_58_in_synpred69830 = frozenset([1])
+ FOLLOW_declarator_suffix_in_synpred70838 = frozenset([1])
+ FOLLOW_62_in_synpred73878 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_type_list_in_synpred73880 = frozenset([63])
+ FOLLOW_63_in_synpred73882 = frozenset([1])
+ FOLLOW_62_in_synpred74892 = frozenset([4])
+ FOLLOW_identifier_list_in_synpred74894 = frozenset([63])
+ FOLLOW_63_in_synpred74896 = frozenset([1])
+ FOLLOW_type_qualifier_in_synpred75921 = frozenset([1])
+ FOLLOW_pointer_in_synpred76924 = frozenset([1])
+ FOLLOW_66_in_synpred77919 = frozenset([49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_qualifier_in_synpred77921 = frozenset([1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_pointer_in_synpred77924 = frozenset([1])
+ FOLLOW_66_in_synpred78930 = frozenset([66])
+ FOLLOW_pointer_in_synpred78932 = frozenset([1])
+ FOLLOW_53_in_synpred81977 = frozenset([1])
+ FOLLOW_27_in_synpred82974 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_53_in_synpred82977 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_parameter_declaration_in_synpred82981 = frozenset([1])
+ FOLLOW_declarator_in_synpred83997 = frozenset([1])
+ FOLLOW_abstract_declarator_in_synpred84999 = frozenset([1])
+ FOLLOW_declaration_specifiers_in_synpred86994 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_declarator_in_synpred86997 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_abstract_declarator_in_synpred86999 = frozenset([1, 4, 53, 58, 59, 60, 62, 64, 66])
+ FOLLOW_53_in_synpred861004 = frozenset([1])
+ FOLLOW_specifier_qualifier_list_in_synpred901046 = frozenset([1, 62, 64, 66])
+ FOLLOW_abstract_declarator_in_synpred901048 = frozenset([1])
+ FOLLOW_direct_abstract_declarator_in_synpred911067 = frozenset([1])
+ FOLLOW_62_in_synpred931086 = frozenset([62, 64, 66])
+ FOLLOW_abstract_declarator_in_synpred931088 = frozenset([63])
+ FOLLOW_63_in_synpred931090 = frozenset([1])
+ FOLLOW_abstract_declarator_suffix_in_synpred941098 = frozenset([1])
+ FOLLOW_62_in_synpred1091282 = frozenset([4, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61])
+ FOLLOW_type_name_in_synpred1091284 = frozenset([63])
+ FOLLOW_63_in_synpred1091286 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_cast_expression_in_synpred1091288 = frozenset([1])
+ FOLLOW_74_in_synpred1141330 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_unary_expression_in_synpred1141332 = frozenset([1])
+ FOLLOW_62_in_synpred1171420 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_argument_expression_list_in_synpred1171424 = frozenset([63])
+ FOLLOW_63_in_synpred1171428 = frozenset([1])
+ FOLLOW_62_in_synpred1181444 = frozenset([4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 66])
+ FOLLOW_macro_parameter_list_in_synpred1181446 = frozenset([63])
+ FOLLOW_63_in_synpred1181448 = frozenset([1])
+ FOLLOW_66_in_synpred1201482 = frozenset([4])
+ FOLLOW_IDENTIFIER_in_synpred1201486 = frozenset([1])
+ FOLLOW_STRING_LITERAL_in_synpred1371683 = frozenset([1])
+ FOLLOW_IDENTIFIER_in_synpred1381680 = frozenset([4, 9])
+ FOLLOW_STRING_LITERAL_in_synpred1381683 = frozenset([1, 9])
+ FOLLOW_lvalue_in_synpred1421744 = frozenset([28, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89])
+ FOLLOW_assignment_operator_in_synpred1421746 = frozenset([4, 5, 6, 7, 8, 9, 10, 62, 66, 68, 69, 72, 73, 74, 77, 78, 79])
+ FOLLOW_assignment_expression_in_synpred1421748 = frozenset([1])
+ FOLLOW_expression_statement_in_synpred1692035 = frozenset([1])
+ FOLLOW_macro_statement_in_synpred1732055 = frozenset([1])
+ FOLLOW_asm2_statement_in_synpred1742060 = frozenset([1])
+ FOLLOW_declaration_in_synpred1812166 = frozenset([1])
+ FOLLOW_statement_list_in_synpred1822170 = frozenset([1])
+ FOLLOW_declaration_in_synpred1862225 = frozenset([1])
+ FOLLOW_statement_in_synpred1882242 = frozenset([1])
+
diff --git a/BaseTools/Source/Python/Eot/CodeFragment.py b/BaseTools/Source/Python/Eot/CodeFragment.py
new file mode 100644
index 0000000000..6dc30a3baf
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/CodeFragment.py
@@ -0,0 +1,185 @@
+## @file
+# fragments of source file
+#
+# Copyright (c) 2007 ~ 2010, Intel Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+
+## The description of comment contents and start & end position
+#
+#
+class Comment :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ # @param CommentType The type of comment (T_COMMENT_TWO_SLASH or T_COMMENT_SLASH_STAR).
+ #
+ def __init__(self, Str, Begin, End, CommentType):
+ self.Content = Str
+ self.StartPos = Begin
+ self.EndPos = End
+ self.Type = CommentType
+
+## The description of preprocess directives and start & end position
+#
+#
+class PP_Directive :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ #
+ def __init__(self, Str, Begin, End):
+ self.Content = Str
+ self.StartPos = Begin
+ self.EndPos = End
+
+## The description of assignment expression and start & end position
+#
+#
+class AssignmentExpression :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ #
+ def __init__(self, Lvalue, Op, Exp, Begin, End):
+ self.Name = Lvalue
+ self.Operator = Op
+ self.Value = Exp
+ self.StartPos = Begin
+ self.EndPos = End
+
+## The description of predicate expression and start & end position
+#
+#
+class PredicateExpression :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ #
+ def __init__(self, Str, Begin, End):
+ self.Content = Str
+ self.StartPos = Begin
+ self.EndPos = End
+
+## The description of function definition and start & end position
+#
+#
+class FunctionDefinition :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ # @param LBPos The left brace position tuple.
+ #
+ def __init__(self, ModifierStr, DeclStr, Begin, End, LBPos, NamePos):
+ self.Modifier = ModifierStr
+ self.Declarator = DeclStr
+ self.StartPos = Begin
+ self.EndPos = End
+ self.LeftBracePos = LBPos
+ self.NamePos = NamePos
+
+## The description of variable declaration and start & end position
+#
+#
+class VariableDeclaration :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ #
+ def __init__(self, ModifierStr, DeclStr, Begin, End):
+ self.Modifier = ModifierStr
+ self.Declarator = DeclStr
+ self.StartPos = Begin
+ self.EndPos = End
+
+## The description of enum definition and start & end position
+#
+#
+class EnumerationDefinition :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ #
+ def __init__(self, Str, Begin, End):
+ self.Content = Str
+ self.StartPos = Begin
+ self.EndPos = End
+
+## The description of struct/union definition and start & end position
+#
+#
+class StructUnionDefinition :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ #
+ def __init__(self, Str, Begin, End):
+ self.Content = Str
+ self.StartPos = Begin
+ self.EndPos = End
+
+## The description of 'Typedef' definition and start & end position
+#
+#
+class TypedefDefinition :
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ #
+ def __init__(self, FromStr, ToStr, Begin, End):
+ self.FromType = FromStr
+ self.ToType = ToStr
+ self.StartPos = Begin
+ self.EndPos = End
+
+## The description of function calling definition and start & end position
+#
+#
+class FunctionCalling:
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param Begin The start position tuple.
+ # @param End The end position tuple.
+ #
+ def __init__(self, Name, Param, Begin, End):
+ self.FuncName = Name
+ self.ParamList = Param
+ self.StartPos = Begin
+ self.EndPos = End
diff --git a/BaseTools/Source/Python/Eot/CodeFragmentCollector.py b/BaseTools/Source/Python/Eot/CodeFragmentCollector.py
new file mode 100644
index 0000000000..349f934304
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/CodeFragmentCollector.py
@@ -0,0 +1,467 @@
+## @file
+# preprocess source file
+#
+# Copyright (c) 2007 ~ 2010, Intel Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import re
+import os
+import sys
+
+import antlr3
+from CLexer import CLexer
+from CParser import CParser
+
+import FileProfile
+from CodeFragment import PP_Directive
+from ParserWarning import Warning
+
+
+##define T_CHAR_SPACE ' '
+##define T_CHAR_NULL '\0'
+##define T_CHAR_CR '\r'
+##define T_CHAR_TAB '\t'
+##define T_CHAR_LF '\n'
+##define T_CHAR_SLASH '/'
+##define T_CHAR_BACKSLASH '\\'
+##define T_CHAR_DOUBLE_QUOTE '\"'
+##define T_CHAR_SINGLE_QUOTE '\''
+##define T_CHAR_STAR '*'
+##define T_CHAR_HASH '#'
+
+(T_CHAR_SPACE, T_CHAR_NULL, T_CHAR_CR, T_CHAR_TAB, T_CHAR_LF, T_CHAR_SLASH, \
+T_CHAR_BACKSLASH, T_CHAR_DOUBLE_QUOTE, T_CHAR_SINGLE_QUOTE, T_CHAR_STAR, T_CHAR_HASH) = \
+(' ', '\0', '\r', '\t', '\n', '/', '\\', '\"', '\'', '*', '#')
+
+SEPERATOR_TUPLE = ('=', '|', ',', '{', '}')
+
+(T_COMMENT_TWO_SLASH, T_COMMENT_SLASH_STAR) = (0, 1)
+
+(T_PP_INCLUDE, T_PP_DEFINE, T_PP_OTHERS) = (0, 1, 2)
+
+## The collector for source code fragments.
+#
+# PreprocessFile method should be called prior to ParseFile
+#
+# GetNext*** procedures mean these procedures will get next token first, then make judgement.
+# Get*** procedures mean these procedures will make judgement on current token only.
+#
+class CodeFragmentCollector:
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param FileName The file that to be parsed
+ #
+ def __init__(self, FileName):
+ self.Profile = FileProfile.FileProfile(FileName)
+ self.Profile.FileLinesList.append(T_CHAR_LF)
+ self.FileName = FileName
+ self.CurrentLineNumber = 1
+ self.CurrentOffsetWithinLine = 0
+
+ self.__Token = ""
+ self.__SkippedChars = ""
+
+ ## __IsWhiteSpace() method
+ #
+ # Whether char at current FileBufferPos is whitespace
+ #
+ # @param self The object pointer
+ # @param Char The char to test
+ # @retval True The char is a kind of white space
+ # @retval False The char is NOT a kind of white space
+ #
+ def __IsWhiteSpace(self, Char):
+ if Char in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_SPACE, T_CHAR_TAB, T_CHAR_LF):
+ return True
+ else:
+ return False
+
+ ## __SkipWhiteSpace() method
+ #
+ # Skip white spaces from current char, return number of chars skipped
+ #
+ # @param self The object pointer
+ # @retval Count The number of chars skipped
+ #
+ def __SkipWhiteSpace(self):
+ Count = 0
+ while not self.__EndOfFile():
+ Count += 1
+ if self.__CurrentChar() in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_LF, T_CHAR_SPACE, T_CHAR_TAB):
+ self.__SkippedChars += str(self.__CurrentChar())
+ self.__GetOneChar()
+
+ else:
+ Count = Count - 1
+ return Count
+
+ ## __EndOfFile() method
+ #
+ # Judge current buffer pos is at file end
+ #
+ # @param self The object pointer
+ # @retval True Current File buffer position is at file end
+ # @retval False Current File buffer position is NOT at file end
+ #
+ def __EndOfFile(self):
+ NumberOfLines = len(self.Profile.FileLinesList)
+ SizeOfLastLine = len(self.Profile.FileLinesList[-1])
+ if self.CurrentLineNumber == NumberOfLines and self.CurrentOffsetWithinLine >= SizeOfLastLine - 1:
+ return True
+ elif self.CurrentLineNumber > NumberOfLines:
+ return True
+ else:
+ return False
+
+ ## __EndOfLine() method
+ #
+ # Judge current buffer pos is at line end
+ #
+ # @param self The object pointer
+ # @retval True Current File buffer position is at line end
+ # @retval False Current File buffer position is NOT at line end
+ #
+ def __EndOfLine(self):
+ SizeOfCurrentLine = len(self.Profile.FileLinesList[self.CurrentLineNumber - 1])
+ if self.CurrentOffsetWithinLine >= SizeOfCurrentLine - 1:
+ return True
+ else:
+ return False
+
+ ## Rewind() method
+ #
+ # Reset file data buffer to the initial state
+ #
+ # @param self The object pointer
+ #
+ def Rewind(self):
+ self.CurrentLineNumber = 1
+ self.CurrentOffsetWithinLine = 0
+
+ ## __UndoOneChar() method
+ #
+ # Go back one char in the file buffer
+ #
+ # @param self The object pointer
+ # @retval True Successfully go back one char
+ # @retval False Not able to go back one char as file beginning reached
+ #
+ def __UndoOneChar(self):
+
+ if self.CurrentLineNumber == 1 and self.CurrentOffsetWithinLine == 0:
+ return False
+ elif self.CurrentOffsetWithinLine == 0:
+ self.CurrentLineNumber -= 1
+ self.CurrentOffsetWithinLine = len(self.__CurrentLine()) - 1
+ else:
+ self.CurrentOffsetWithinLine -= 1
+ return True
+
+ ## __GetOneChar() method
+ #
+ # Move forward one char in the file buffer
+ #
+ # @param self The object pointer
+ #
+ def __GetOneChar(self):
+ if self.CurrentOffsetWithinLine == len(self.Profile.FileLinesList[self.CurrentLineNumber - 1]) - 1:
+ self.CurrentLineNumber += 1
+ self.CurrentOffsetWithinLine = 0
+ else:
+ self.CurrentOffsetWithinLine += 1
+
+ ## __CurrentChar() method
+ #
+ # Get the char pointed to by the file buffer pointer
+ #
+ # @param self The object pointer
+ # @retval Char Current char
+ #
+ def __CurrentChar(self):
+ CurrentChar = self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine]
+
+ return CurrentChar
+
+ ## __NextChar() method
+ #
+ # Get the one char pass the char pointed to by the file buffer pointer
+ #
+ # @param self The object pointer
+ # @retval Char Next char
+ #
+ def __NextChar(self):
+ if self.CurrentOffsetWithinLine == len(self.Profile.FileLinesList[self.CurrentLineNumber - 1]) - 1:
+ return self.Profile.FileLinesList[self.CurrentLineNumber][0]
+ else:
+ return self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine + 1]
+
+ ## __SetCurrentCharValue() method
+ #
+ # Modify the value of current char
+ #
+ # @param self The object pointer
+ # @param Value The new value of current char
+ #
+ def __SetCurrentCharValue(self, Value):
+ self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine] = Value
+
+ ## __SetCharValue() method
+ #
+ # Modify the value of current char
+ #
+ # @param self The object pointer
+ # @param Value The new value of current char
+ #
+ def __SetCharValue(self, Line, Offset, Value):
+ self.Profile.FileLinesList[Line - 1][Offset] = Value
+
+ ## __CurrentLine() method
+ #
+ # Get the list that contains current line contents
+ #
+ # @param self The object pointer
+ # @retval List current line contents
+ #
+ def __CurrentLine(self):
+ return self.Profile.FileLinesList[self.CurrentLineNumber - 1]
+
+ ## __InsertComma() method
+ #
+ # Insert ',' to replace PP
+ #
+ # @param self The object pointer
+ # @retval List current line contents
+ #
+ def __InsertComma(self, Line):
+
+
+ if self.Profile.FileLinesList[Line - 1][0] != T_CHAR_HASH:
+ BeforeHashPart = str(self.Profile.FileLinesList[Line - 1]).split(T_CHAR_HASH)[0]
+ if BeforeHashPart.rstrip().endswith(T_CHAR_COMMA) or BeforeHashPart.rstrip().endswith(';'):
+ return
+
+ if Line - 2 >= 0 and str(self.Profile.FileLinesList[Line - 2]).rstrip().endswith(','):
+ return
+
+ if Line - 2 >= 0 and str(self.Profile.FileLinesList[Line - 2]).rstrip().endswith(';'):
+ return
+
+ if str(self.Profile.FileLinesList[Line]).lstrip().startswith(',') or str(self.Profile.FileLinesList[Line]).lstrip().startswith(';'):
+ return
+
+ self.Profile.FileLinesList[Line - 1].insert(self.CurrentOffsetWithinLine, ',')
+
+ ## PreprocessFileWithClear() method
+ #
+ # Run a preprocess for the file to clean all comments
+ #
+ # @param self The object pointer
+ #
+ def PreprocessFileWithClear(self):
+
+ self.Rewind()
+ InComment = False
+ DoubleSlashComment = False
+ HashComment = False
+ PPExtend = False
+ PPDirectiveObj = None
+ # HashComment in quoted string " " is ignored.
+ InString = False
+ InCharLiteral = False
+
+ self.Profile.FileLinesList = [list(s) for s in self.Profile.FileLinesListFromFile]
+ while not self.__EndOfFile():
+
+ if not InComment and self.__CurrentChar() == T_CHAR_DOUBLE_QUOTE:
+ InString = not InString
+
+ if not InComment and self.__CurrentChar() == T_CHAR_SINGLE_QUOTE:
+ InCharLiteral = not InCharLiteral
+ # meet new line, then no longer in a comment for // and '#'
+ if self.__CurrentChar() == T_CHAR_LF:
+ if HashComment and PPDirectiveObj != None:
+ if PPDirectiveObj.Content.rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):
+ PPDirectiveObj.Content += T_CHAR_LF
+ PPExtend = True
+ else:
+ PPExtend = False
+
+ EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)
+
+ if InComment and DoubleSlashComment:
+ InComment = False
+ DoubleSlashComment = False
+
+ if InComment and HashComment and not PPExtend:
+ InComment = False
+ HashComment = False
+ PPDirectiveObj.Content += T_CHAR_LF
+ PPDirectiveObj.EndPos = EndLinePos
+ FileProfile.PPDirectiveList.append(PPDirectiveObj)
+ PPDirectiveObj = None
+
+ if InString or InCharLiteral:
+ CurrentLine = "".join(self.__CurrentLine())
+ if CurrentLine.rstrip(T_CHAR_LF).rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):
+ SlashIndex = CurrentLine.rindex(T_CHAR_BACKSLASH)
+ self.__SetCharValue(self.CurrentLineNumber, SlashIndex, T_CHAR_SPACE)
+
+ self.CurrentLineNumber += 1
+ self.CurrentOffsetWithinLine = 0
+ # check for */ comment end
+ elif InComment and not DoubleSlashComment and not HashComment and self.__CurrentChar() == T_CHAR_STAR and self.__NextChar() == T_CHAR_SLASH:
+
+ self.__SetCurrentCharValue(T_CHAR_SPACE)
+ self.__GetOneChar()
+ self.__SetCurrentCharValue(T_CHAR_SPACE)
+ self.__GetOneChar()
+ InComment = False
+ # set comments to spaces
+ elif InComment:
+ if HashComment:
+ # // follows hash PP directive
+ if self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_SLASH:
+ InComment = False
+ HashComment = False
+ PPDirectiveObj.EndPos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine - 1)
+ FileProfile.PPDirectiveList.append(PPDirectiveObj)
+ PPDirectiveObj = None
+ continue
+ else:
+ PPDirectiveObj.Content += self.__CurrentChar()
+
+ self.__SetCurrentCharValue(T_CHAR_SPACE)
+ self.__GetOneChar()
+ # check for // comment
+ elif self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_SLASH:
+ InComment = True
+ DoubleSlashComment = True
+
+ # check for '#' comment
+ elif self.__CurrentChar() == T_CHAR_HASH and not InString and not InCharLiteral:
+ InComment = True
+ HashComment = True
+ PPDirectiveObj = PP_Directive('', (self.CurrentLineNumber, self.CurrentOffsetWithinLine), None)
+ # check for /* comment start
+ elif self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_STAR:
+
+ self.__SetCurrentCharValue( T_CHAR_SPACE)
+ self.__GetOneChar()
+ self.__SetCurrentCharValue( T_CHAR_SPACE)
+ self.__GetOneChar()
+ InComment = True
+ else:
+ self.__GetOneChar()
+
+ EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)
+
+ if InComment and HashComment and not PPExtend:
+ PPDirectiveObj.EndPos = EndLinePos
+ FileProfile.PPDirectiveList.append(PPDirectiveObj)
+ self.Rewind()
+
+ ## ParseFile() method
+ #
+ # Parse the file profile buffer to extract fd, fv ... information
+ # Exception will be raised if syntax error found
+ #
+ # @param self The object pointer
+ #
+ def ParseFile(self):
+ self.PreprocessFileWithClear()
+ # restore from ListOfList to ListOfString
+ self.Profile.FileLinesList = ["".join(list) for list in self.Profile.FileLinesList]
+ FileStringContents = ''
+ for fileLine in self.Profile.FileLinesList:
+ FileStringContents += fileLine
+ cStream = antlr3.StringStream(FileStringContents)
+ lexer = CLexer(cStream)
+ tStream = antlr3.CommonTokenStream(lexer)
+ parser = CParser(tStream)
+ parser.translation_unit()
+
+ ## CleanFileProfileBuffer() method
+ #
+ # Reset all contents of the profile of a file
+ #
+ def CleanFileProfileBuffer(self):
+
+ FileProfile.PPDirectiveList = []
+ FileProfile.AssignmentExpressionList = []
+ FileProfile.FunctionDefinitionList = []
+ FileProfile.VariableDeclarationList = []
+ FileProfile.EnumerationDefinitionList = []
+ FileProfile.StructUnionDefinitionList = []
+ FileProfile.TypedefDefinitionList = []
+ FileProfile.FunctionCallingList = []
+
+ ## PrintFragments() method
+ #
+ # Print the contents of the profile of a file
+ #
+ def PrintFragments(self):
+
+ print '################# ' + self.FileName + '#####################'
+
+ print '/****************************************/'
+ print '/*************** ASSIGNMENTS ***************/'
+ print '/****************************************/'
+ for asign in FileProfile.AssignmentExpressionList:
+ print str(asign.StartPos) + asign.Name + asign.Operator + asign.Value
+
+ print '/****************************************/'
+ print '/********* PREPROCESS DIRECTIVES ********/'
+ print '/****************************************/'
+ for pp in FileProfile.PPDirectiveList:
+ print str(pp.StartPos) + pp.Content
+
+ print '/****************************************/'
+ print '/********* VARIABLE DECLARATIONS ********/'
+ print '/****************************************/'
+ for var in FileProfile.VariableDeclarationList:
+ print str(var.StartPos) + var.Modifier + ' '+ var.Declarator
+
+ print '/****************************************/'
+ print '/********* FUNCTION DEFINITIONS *********/'
+ print '/****************************************/'
+ for func in FileProfile.FunctionDefinitionList:
+ print str(func.StartPos) + func.Modifier + ' '+ func.Declarator + ' ' + str(func.NamePos)
+
+ print '/****************************************/'
+ print '/************ ENUMERATIONS **************/'
+ print '/****************************************/'
+ for enum in FileProfile.EnumerationDefinitionList:
+ print str(enum.StartPos) + enum.Content
+
+ print '/****************************************/'
+ print '/*********** STRUCTS/UNIONS *************/'
+ print '/****************************************/'
+ for su in FileProfile.StructUnionDefinitionList:
+ print str(su.StartPos) + su.Content
+
+ print '/****************************************/'
+ print '/************** TYPEDEFS ****************/'
+ print '/****************************************/'
+ for typedef in FileProfile.TypedefDefinitionList:
+ print str(typedef.StartPos) + typedef.ToType
+
+##
+#
+# This acts like the main() function for the script, unless it is 'import'ed into another
+# script.
+#
+if __name__ == "__main__":
+
+ print "For Test."
diff --git a/BaseTools/Source/Python/Eot/Database.py b/BaseTools/Source/Python/Eot/Database.py
new file mode 100644
index 0000000000..e3fb4f2ddf
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/Database.py
@@ -0,0 +1,255 @@
+## @file
+# This file is used to create a database used by EOT tool
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import sqlite3
+import os, time
+
+import Common.EdkLogger as EdkLogger
+import CommonDataClass.DataClass as DataClass
+
+from Table.TableDataModel import TableDataModel
+from Table.TableFile import TableFile
+from Table.TableFunction import TableFunction
+from Table.TableIdentifier import TableIdentifier
+from Table.TableEotReport import TableEotReport
+from Table.TableInf import TableInf
+from Table.TableDec import TableDec
+from Table.TableDsc import TableDsc
+from Table.TableFdf import TableFdf
+from Table.TableQuery import TableQuery
+
+##
+# Static definitions
+#
+DATABASE_PATH = "Eot.db"
+
+## Database class
+#
+# This class defined the EOT databse
+# During the phase of initialization, the database will create all tables and
+# insert all records of table DataModel
+#
+class Database(object):
+ ## The constructor
+ #
+ # @param self: The object pointer
+ # @param DbPath: The file path of the database
+ #
+ def __init__(self, DbPath):
+ self.DbPath = DbPath
+ self.Conn = None
+ self.Cur = None
+ self.TblDataModel = None
+ self.TblFile = None
+ self.TblFunction = None
+ self.TblIdentifier = None
+ self.TblReport = None
+ self.TblInf = None
+ self.TblDec = None
+ self.TblDsc = None
+ self.TblFdf = None
+ self.TblQuery = None
+ self.TblQuery2 = None
+
+ ## InitDatabase() method
+ # 1. Delete all old existing tables
+ # 2. Create new tables
+ # 3. Initialize table DataModel
+ #
+ # @param self: The object pointer
+ # @param NewDatabase: Check if it needs to create a new database
+ #
+ def InitDatabase(self, NewDatabase = True):
+ EdkLogger.verbose("\nInitialize EOT database started ...")
+ #
+ # Drop all old existing tables
+ #
+ if NewDatabase:
+ if os.path.exists(self.DbPath):
+ os.remove(self.DbPath)
+ self.Conn = sqlite3.connect(self.DbPath, isolation_level = 'DEFERRED')
+ self.Conn.execute("PRAGMA page_size=8192")
+ self.Conn.execute("PRAGMA synchronous=OFF")
+ # to avoid non-ascii charater conversion error
+ self.Conn.text_factory = str
+ self.Cur = self.Conn.cursor()
+
+ self.TblDataModel = TableDataModel(self.Cur)
+ self.TblFile = TableFile(self.Cur)
+ self.TblFunction = TableFunction(self.Cur)
+ self.TblIdentifier = TableIdentifier(self.Cur)
+ self.TblReport = TableEotReport(self.Cur)
+ self.TblInf = TableInf(self.Cur)
+ self.TblDec = TableDec(self.Cur)
+ self.TblDsc = TableDsc(self.Cur)
+ self.TblFdf = TableFdf(self.Cur)
+ self.TblQuery = TableQuery(self.Cur)
+ self.TblQuery2 = TableQuery(self.Cur)
+ self.TblQuery2.Table = 'Query2'
+
+ # Create new tables
+ if NewDatabase:
+ self.TblDataModel.Create()
+ self.TblFile.Create()
+ self.TblFunction.Create()
+ self.TblReport.Create()
+ self.TblInf.Create()
+ self.TblDec.Create()
+ self.TblDsc.Create()
+ self.TblFdf.Create()
+ self.TblQuery.Create()
+ self.TblQuery2.Create()
+
+ # Init each table's ID
+ self.TblDataModel.InitID()
+ self.TblFile.InitID()
+ self.TblFunction.InitID()
+ self.TblReport.InitID()
+ self.TblInf.InitID()
+ self.TblDec.InitID()
+ self.TblDsc.InitID()
+ self.TblFdf.InitID()
+ self.TblQuery.Drop()
+ self.TblQuery.Create()
+ self.TblQuery.InitID()
+ self.TblQuery2.Drop()
+ self.TblQuery2.Create()
+ self.TblQuery2.InitID()
+
+ # Initialize table DataModel
+ if NewDatabase:
+ self.TblDataModel.InitTable()
+
+ EdkLogger.verbose("Initialize EOT database ... DONE!")
+
+ ## QueryTable() method
+ #
+ # Query a table
+ #
+ # @param self: The object pointer
+ # @param Table: The instance of the table to be queried
+ #
+ def QueryTable(self, Table):
+ Table.Query()
+
+ ## Close() method
+ #
+ # Commit all first
+ # Close the connection and cursor
+ #
+ def Close(self):
+ # Commit to file
+ self.Conn.commit()
+
+ # Close connection and cursor
+ self.Cur.close()
+ self.Conn.close()
+
+ ## InsertOneFile() method
+ #
+ # Insert one file's information to the database
+ # 1. Create a record in TableFile
+ # 2. Create functions one by one
+ # 2.1 Create variables of function one by one
+ # 2.2 Create pcds of function one by one
+ # 3. Create variables one by one
+ # 4. Create pcds one by one
+ #
+ # @param self: The object pointer
+ # @param File: The object of the file to be inserted
+ #
+ def InsertOneFile(self, File):
+ # Insert a record for file
+ FileID = self.TblFile.Insert(File.Name, File.ExtName, File.Path, File.FullPath, Model = File.Model, TimeStamp = File.TimeStamp)
+ IdTable = TableIdentifier(self.Cur)
+ IdTable.Table = "Identifier%s" % FileID
+ IdTable.Create()
+
+ # Insert function of file
+ for Function in File.FunctionList:
+ FunctionID = self.TblFunction.Insert(Function.Header, Function.Modifier, Function.Name, Function.ReturnStatement, \
+ Function.StartLine, Function.StartColumn, Function.EndLine, Function.EndColumn, \
+ Function.BodyStartLine, Function.BodyStartColumn, FileID, \
+ Function.FunNameStartLine, Function.FunNameStartColumn)
+
+ # Insert Identifier of function
+ for Identifier in Function.IdentifierList:
+ IdentifierID = IdTable.Insert(Identifier.Modifier, Identifier.Type, Identifier.Name, Identifier.Value, Identifier.Model, \
+ FileID, FunctionID, Identifier.StartLine, Identifier.StartColumn, Identifier.EndLine, Identifier.EndColumn)
+ # Insert Identifier of file
+ for Identifier in File.IdentifierList:
+ IdentifierID = IdTable.Insert(Identifier.Modifier, Identifier.Type, Identifier.Name, Identifier.Value, Identifier.Model, \
+ FileID, -1, Identifier.StartLine, Identifier.StartColumn, Identifier.EndLine, Identifier.EndColumn)
+
+ EdkLogger.verbose("Insert information from file %s ... DONE!" % File.FullPath)
+
+ ## UpdateIdentifierBelongsToFunction() method
+ #
+ # Update the field "BelongsToFunction" for each Indentifier
+ #
+ # @param self: The object pointer
+ #
+ def UpdateIdentifierBelongsToFunction(self):
+ EdkLogger.verbose("Update 'BelongsToFunction' for Identifiers started ...")
+
+ SqlCommand = """select ID, BelongsToFile, StartLine, EndLine from Function"""
+ Records = self.TblFunction.Exec(SqlCommand)
+ Data1 = []
+ Data2 = []
+ for Record in Records:
+ FunctionID = Record[0]
+ BelongsToFile = Record[1]
+ StartLine = Record[2]
+ EndLine = Record[3]
+
+ SqlCommand = """Update Identifier%s set BelongsToFunction = %s where BelongsToFile = %s and StartLine > %s and EndLine < %s""" % \
+ (BelongsToFile, FunctionID, BelongsToFile, StartLine, EndLine)
+ self.TblIdentifier.Exec(SqlCommand)
+
+ SqlCommand = """Update Identifier%s set BelongsToFunction = %s, Model = %s where BelongsToFile = %s and Model = %s and EndLine = %s""" % \
+ (BelongsToFile, FunctionID, DataClass.MODEL_IDENTIFIER_FUNCTION_HEADER, BelongsToFile, DataClass.MODEL_IDENTIFIER_COMMENT, StartLine - 1)
+ self.TblIdentifier.Exec(SqlCommand)
+
+
+##
+#
+# This acts like the main() function for the script, unless it is 'import'ed into another
+# script.
+#
+if __name__ == '__main__':
+ EdkLogger.Initialize()
+ EdkLogger.SetLevel(EdkLogger.DEBUG_0)
+ EdkLogger.verbose("Start at " + time.strftime('%H:%M:%S', time.localtime()))
+
+ Db = Database(DATABASE_PATH)
+ Db.InitDatabase()
+ Db.QueryTable(Db.TblDataModel)
+
+ identifier1 = DataClass.IdentifierClass(-1, '', '', "i''1", 'aaa', DataClass.MODEL_IDENTIFIER_COMMENT, 1, -1, 32, 43, 54, 43)
+ identifier2 = DataClass.IdentifierClass(-1, '', '', 'i1', 'aaa', DataClass.MODEL_IDENTIFIER_COMMENT, 1, -1, 15, 43, 20, 43)
+ identifier3 = DataClass.IdentifierClass(-1, '', '', 'i1', 'aaa', DataClass.MODEL_IDENTIFIER_COMMENT, 1, -1, 55, 43, 58, 43)
+ identifier4 = DataClass.IdentifierClass(-1, '', '', "i1'", 'aaa', DataClass.MODEL_IDENTIFIER_COMMENT, 1, -1, 77, 43, 88, 43)
+ fun1 = DataClass.FunctionClass(-1, '', '', 'fun1', '', 21, 2, 60, 45, 1, 23, 0, [], [])
+ file = DataClass.FileClass(-1, 'F1', 'c', 'C:\\', 'C:\\F1.exe', DataClass.MODEL_FILE_C, '2007-12-28', [fun1], [identifier1, identifier2, identifier3, identifier4], [])
+ Db.InsertOneFile(file)
+
+ Db.QueryTable(Db.TblFile)
+ Db.QueryTable(Db.TblFunction)
+ Db.QueryTable(Db.TblIdentifier)
+
+ Db.Close()
+ EdkLogger.verbose("End at " + time.strftime('%H:%M:%S', time.localtime()))
+
diff --git a/BaseTools/Source/Python/Eot/EfiCompressor.pyd b/BaseTools/Source/Python/Eot/EfiCompressor.pyd
new file mode 100644
index 0000000000..0729100b99
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/EfiCompressor.pyd
Binary files differ
diff --git a/BaseTools/Source/Python/Eot/Eot.py b/BaseTools/Source/Python/Eot/Eot.py
new file mode 100644
index 0000000000..815907dfdd
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/Eot.py
@@ -0,0 +1,647 @@
+## @file
+# This file is used to be the main entrance of EOT tool
+#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import os, time, glob
+import Common.EdkLogger as EdkLogger
+import EotGlobalData
+from optparse import OptionParser
+from Common.String import NormPath
+from Common import BuildToolError
+from Common.Misc import GuidStructureStringToGuidString
+from InfParserLite import *
+import c
+import Database
+from FvImage import *
+from array import array
+from Report import Report
+from Common.Misc import ParseConsoleLog
+from Parser import ConvertGuid
+
+## Class Eot
+#
+# This class is used to define Eot main entrance
+#
+# @param object: Inherited from object class
+#
+class Eot(object):
+ ## The constructor
+ #
+ # @param self: The object pointer
+ #
+ def __init__(self, CommandLineOption=True, IsInit=True, SourceFileList=None, \
+ IncludeDirList=None, DecFileList=None, GuidList=None, LogFile=None,
+ FvFileList="", MapFileList="", Report='Report.html', Dispatch=None):
+ # Version and Copyright
+ self.VersionNumber = "0.02"
+ self.Version = "%prog Version " + self.VersionNumber
+ self.Copyright = "Copyright (c) 2008 - 2010, Intel Corporation All rights reserved."
+ self.Report = Report
+
+ self.IsInit = IsInit
+ self.SourceFileList = SourceFileList
+ self.IncludeDirList = IncludeDirList
+ self.DecFileList = DecFileList
+ self.GuidList = GuidList
+ self.LogFile = LogFile
+ self.FvFileList = FvFileList
+ self.MapFileList = MapFileList
+ self.Dispatch = Dispatch
+
+ # Check workspace environment
+ if "EFI_SOURCE" not in os.environ:
+ if "EDK_SOURCE" not in os.environ:
+ pass
+ else:
+ EotGlobalData.gEDK_SOURCE = os.path.normpath(os.getenv("EDK_SOURCE"))
+ else:
+ EotGlobalData.gEFI_SOURCE = os.path.normpath(os.getenv("EFI_SOURCE"))
+ EotGlobalData.gEDK_SOURCE = os.path.join(EotGlobalData.gEFI_SOURCE, 'Edk')
+
+ if "WORKSPACE" not in os.environ:
+ EdkLogger.error("EOT", BuildToolError.ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
+ ExtraData="WORKSPACE")
+ else:
+ EotGlobalData.gWORKSPACE = os.path.normpath(os.getenv("WORKSPACE"))
+
+ EotGlobalData.gMACRO['WORKSPACE'] = EotGlobalData.gWORKSPACE
+ EotGlobalData.gMACRO['EFI_SOURCE'] = EotGlobalData.gEFI_SOURCE
+ EotGlobalData.gMACRO['EDK_SOURCE'] = EotGlobalData.gEDK_SOURCE
+
+ # Parse the options and args
+ if CommandLineOption:
+ self.ParseOption()
+
+ if self.FvFileList:
+ for FvFile in GetSplitValueList(self.FvFileList, ' '):
+ FvFile = os.path.normpath(FvFile)
+ if not os.path.isfile(FvFile):
+ EdkLogger.error("Eot", EdkLogger.EOT_ERROR, "Can not find file %s " % FvFile)
+ EotGlobalData.gFV_FILE.append(FvFile)
+ else:
+ EdkLogger.error("Eot", EdkLogger.EOT_ERROR, "The fv file list of target platform was not specified")
+
+ if self.MapFileList:
+ for MapFile in GetSplitValueList(self.MapFileList, ' '):
+ MapFile = os.path.normpath(MapFile)
+ if not os.path.isfile(MapFile):
+ EdkLogger.error("Eot", EdkLogger.EOT_ERROR, "Can not find file %s " % MapFile)
+ EotGlobalData.gMAP_FILE.append(MapFile)
+
+ # Generate source file list
+ self.GenerateSourceFileList(self.SourceFileList, self.IncludeDirList)
+
+ # Generate guid list of dec file list
+ self.ParseDecFile(self.DecFileList)
+
+ # Generate guid list from GUID list file
+ self.ParseGuidList(self.GuidList)
+
+ # Init Eot database
+ EotGlobalData.gDb = Database.Database(Database.DATABASE_PATH)
+ EotGlobalData.gDb.InitDatabase(self.IsInit)
+
+ # Build ECC database
+ self.BuildDatabase()
+
+ # Parse Ppi/Protocol
+ self.ParseExecutionOrder()
+
+ # Merge Identifier tables
+ self.GenerateQueryTable()
+
+ # Generate report database
+ self.GenerateReportDatabase()
+
+ # Load Fv Info
+ self.LoadFvInfo()
+
+ # Load Map Info
+ self.LoadMapInfo()
+
+ # Generate Report
+ self.GenerateReport()
+
+ # Convert log file
+ self.ConvertLogFile(self.LogFile)
+
+ # DONE
+ EdkLogger.quiet("EOT FINISHED!")
+
+ # Close Database
+ EotGlobalData.gDb.Close()
+
+ ## ParseDecFile() method
+ #
+ # parse DEC file and get all GUID names with GUID values as {GuidName : GuidValue}
+ # The Dict is stored in EotGlobalData.gGuidDict
+ #
+ # @param self: The object pointer
+ # @param DecFileList: A list of all DEC files
+ #
+ def ParseDecFile(self, DecFileList):
+ if DecFileList:
+ path = os.path.normpath(DecFileList)
+ lfr = open(path, 'rb')
+ for line in lfr:
+ path = os.path.normpath(os.path.join(EotGlobalData.gWORKSPACE, line.strip()))
+ if os.path.exists(path):
+ dfr = open(path, 'rb')
+ for line in dfr:
+ line = CleanString(line)
+ list = line.split('=')
+ if len(list) == 2:
+ EotGlobalData.gGuidDict[list[0].strip()] = GuidStructureStringToGuidString(list[1].strip())
+
+
+ ## ParseGuidList() method
+ #
+ # Parse Guid list and get all GUID names with GUID values as {GuidName : GuidValue}
+ # The Dict is stored in EotGlobalData.gGuidDict
+ #
+ # @param self: The object pointer
+ # @param GuidList: A list of all GUID and its value
+ #
+ def ParseGuidList(self, GuidList):
+ Path = os.path.join(EotGlobalData.gWORKSPACE, GuidList)
+ if os.path.isfile(Path):
+ for Line in open(Path):
+ (GuidName, GuidValue) = Line.split()
+ EotGlobalData.gGuidDict[GuidName] = GuidValue
+
+ ## ConvertLogFile() method
+ #
+ # Parse a real running log file to get real dispatch order
+ # The result is saved to old file name + '.new'
+ #
+ # @param self: The object pointer
+ # @param LogFile: A real running log file name
+ #
+ def ConvertLogFile(self, LogFile):
+ newline = []
+ lfr = None
+ lfw = None
+ if LogFile:
+ lfr = open(LogFile, 'rb')
+ lfw = open(LogFile + '.new', 'wb')
+ for line in lfr:
+ line = line.strip()
+ line = line.replace('.efi', '')
+ index = line.find("Loading PEIM at ")
+ if index > -1:
+ newline.append(line[index + 55 : ])
+ continue
+ index = line.find("Loading driver at ")
+ if index > -1:
+ newline.append(line[index + 57 : ])
+ continue
+
+ for line in newline:
+ lfw.write(line + '\r\n')
+
+ if lfr:
+ lfr.close()
+ if lfw:
+ lfw.close()
+
+ ## GenerateSourceFileList() method
+ #
+ # Generate a list of all source files
+ # 1. Search the file list one by one
+ # 2. Store inf file name with source file names under it like
+ # { INF file name: [source file1, source file2, ...]}
+ # 3. Search the include list to find all .h files
+ # 4. Store source file list to EotGlobalData.gSOURCE_FILES
+ # 5. Store INF file list to EotGlobalData.gINF_FILES
+ #
+ # @param self: The object pointer
+ # @param SourceFileList: A list of all source files
+ # @param IncludeFileList: A list of all include files
+ #
+ def GenerateSourceFileList(self, SourceFileList, IncludeFileList):
+ EdkLogger.quiet("Generating source files list ... ")
+ mSourceFileList = []
+ mInfFileList = []
+ mDecFileList = []
+ mFileList = {}
+ mCurrentInfFile = ''
+ mCurrentSourceFileList = []
+
+ if SourceFileList:
+ sfl = open(SourceFileList, 'rb')
+ for line in sfl:
+ line = os.path.normpath(os.path.join(EotGlobalData.gWORKSPACE, line.strip()))
+ if line[-2:].upper() == '.C' or line[-2:].upper() == '.H':
+ if line not in mCurrentSourceFileList:
+ mCurrentSourceFileList.append(line)
+ mSourceFileList.append(line)
+ EotGlobalData.gOP_SOURCE_FILES.write('%s\n' % line)
+ if line[-4:].upper() == '.INF':
+ if mCurrentInfFile != '':
+ mFileList[mCurrentInfFile] = mCurrentSourceFileList
+ mCurrentSourceFileList = []
+ mCurrentInfFile = os.path.normpath(os.path.join(EotGlobalData.gWORKSPACE, line))
+ EotGlobalData.gOP_INF.write('%s\n' % mCurrentInfFile)
+ if mCurrentInfFile not in mFileList:
+ mFileList[mCurrentInfFile] = mCurrentSourceFileList
+
+ # Get all include files from packages
+ if IncludeFileList:
+ ifl = open(IncludeFileList, 'rb')
+ for line in ifl:
+ if not line.strip():
+ continue
+ newline = os.path.normpath(os.path.join(EotGlobalData.gWORKSPACE, line.strip()))
+ for Root, Dirs, Files in os.walk(str(newline)):
+ for File in Files:
+ FullPath = os.path.normpath(os.path.join(Root, File))
+ if FullPath not in mSourceFileList and File[-2:].upper() == '.H':
+ mSourceFileList.append(FullPath)
+ EotGlobalData.gOP_SOURCE_FILES.write('%s\n' % FullPath)
+ if FullPath not in mDecFileList and File.upper().find('.DEC') > -1:
+ mDecFileList.append(FullPath)
+
+ EotGlobalData.gSOURCE_FILES = mSourceFileList
+ EotGlobalData.gOP_SOURCE_FILES.close()
+
+ EotGlobalData.gINF_FILES = mFileList
+ EotGlobalData.gOP_INF.close()
+
+ EotGlobalData.gDEC_FILES = mDecFileList
+
+
+ ## GenerateReport() method
+ #
+ # Generate final HTML report
+ #
+ # @param self: The object pointer
+ #
+ def GenerateReport(self):
+ EdkLogger.quiet("Generating report file ... ")
+ Rep = Report(self.Report, EotGlobalData.gFV, self.Dispatch)
+ Rep.GenerateReport()
+
+ ## LoadMapInfo() method
+ #
+ # Load map files and parse them
+ #
+ # @param self: The object pointer
+ #
+ def LoadMapInfo(self):
+ if EotGlobalData.gMAP_FILE != []:
+ EdkLogger.quiet("Parsing Map file ... ")
+ EotGlobalData.gMap = ParseMapFile(EotGlobalData.gMAP_FILE)
+
+ ## LoadFvInfo() method
+ #
+ # Load FV binary files and parse them
+ #
+ # @param self: The object pointer
+ #
+ def LoadFvInfo(self):
+ EdkLogger.quiet("Parsing FV file ... ")
+ EotGlobalData.gFV = MultipleFv(EotGlobalData.gFV_FILE)
+ EotGlobalData.gFV.Dispatch(EotGlobalData.gDb)
+
+ for Protocol in EotGlobalData.gProtocolList:
+ EotGlobalData.gOP_UN_MATCHED_IN_LIBRARY_CALLING.write('%s\n' %Protocol)
+
+ ## GenerateReportDatabase() method
+ #
+ # Generate data for the information needed by report
+ # 1. Update name, macro and value of all found PPI/PROTOCOL GUID
+ # 2. Install hard coded PPI/PROTOCOL
+ #
+ # @param self: The object pointer
+ #
+ def GenerateReportDatabase(self):
+ EdkLogger.quiet("Generating the cross-reference table of GUID for Ppi/Protocol ... ")
+
+ # Update Protocol/Ppi Guid
+ SqlCommand = """select DISTINCT GuidName from Report"""
+ RecordSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ for Record in RecordSet:
+ GuidName = Record[0]
+ GuidMacro = ''
+ GuidMacro2 = ''
+ GuidValue = ''
+
+ # Find value for hardcode guid macro
+ if GuidName in EotGlobalData.gGuidMacroDict:
+ GuidMacro = EotGlobalData.gGuidMacroDict[GuidName][0]
+ GuidValue = EotGlobalData.gGuidMacroDict[GuidName][1]
+ SqlCommand = """update Report set GuidMacro = '%s', GuidValue = '%s' where GuidName = '%s'""" %(GuidMacro, GuidValue, GuidName)
+ EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ continue
+
+ # Find guid value defined in Dec file
+ if GuidName in EotGlobalData.gGuidDict:
+ GuidValue = EotGlobalData.gGuidDict[GuidName]
+ SqlCommand = """update Report set GuidMacro = '%s', GuidValue = '%s' where GuidName = '%s'""" %(GuidMacro, GuidValue, GuidName)
+ EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ continue
+
+ # Search defined Macros for guid name
+ SqlCommand ="""select DISTINCT Value, Modifier from Query where Name like '%s'""" % GuidName
+ GuidMacroSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ # Ignore NULL result
+ if not GuidMacroSet:
+ continue
+ GuidMacro = GuidMacroSet[0][0].strip()
+ if not GuidMacro:
+ continue
+ # Find Guid value of Guid Macro
+ SqlCommand ="""select DISTINCT Value from Query2 where Value like '%%%s%%' and Model = %s""" % (GuidMacro, MODEL_IDENTIFIER_MACRO_DEFINE)
+ GuidValueSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ if GuidValueSet != []:
+ GuidValue = GuidValueSet[0][0]
+ GuidValue = GuidValue[GuidValue.find(GuidMacro) + len(GuidMacro) :]
+ GuidValue = GuidValue.lower().replace('\\', '').replace('\r', '').replace('\n', '').replace('l', '').strip()
+ GuidValue = GuidStructureStringToGuidString(GuidValue)
+ SqlCommand = """update Report set GuidMacro = '%s', GuidValue = '%s' where GuidName = '%s'""" %(GuidMacro, GuidValue, GuidName)
+ EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ continue
+
+ # Update Hard Coded Ppi/Protocol
+ SqlCommand = """select DISTINCT GuidValue, ItemType from Report where ModuleID = -2 and ItemMode = 'Produced'"""
+ RecordSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ for Record in RecordSet:
+ if Record[1] == 'Ppi':
+ EotGlobalData.gPpiList[Record[0].lower()] = -2
+ if Record[1] == 'Protocol':
+ EotGlobalData.gProtocolList[Record[0].lower()] = -2
+
+ ## GenerateQueryTable() method
+ #
+ # Generate two tables improve query performance
+ #
+ # @param self: The object pointer
+ #
+ def GenerateQueryTable(self):
+ EdkLogger.quiet("Generating temp query table for analysis ... ")
+ for Identifier in EotGlobalData.gIdentifierTableList:
+ SqlCommand = """insert into Query (Name, Modifier, Value, Model)
+ select Name, Modifier, Value, Model from %s where (Model = %s or Model = %s)""" \
+ % (Identifier[0], MODEL_IDENTIFIER_VARIABLE, MODEL_IDENTIFIER_ASSIGNMENT_EXPRESSION)
+ EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ SqlCommand = """insert into Query2 (Name, Modifier, Value, Model)
+ select Name, Modifier, Value, Model from %s where Model = %s""" \
+ % (Identifier[0], MODEL_IDENTIFIER_MACRO_DEFINE)
+ EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+
+ ## ParseExecutionOrder() method
+ #
+ # Get final execution order
+ # 1. Search all PPI
+ # 2. Search all PROTOCOL
+ #
+ # @param self: The object pointer
+ #
+ def ParseExecutionOrder(self):
+ EdkLogger.quiet("Searching Ppi/Protocol ... ")
+ for Identifier in EotGlobalData.gIdentifierTableList:
+ ModuleID, ModuleName, ModuleGuid, SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, Enabled = \
+ -1, '', '', -1, '', '', '', '', '', '', '', '', 0
+
+ SourceFileID = Identifier[0].replace('Identifier', '')
+ SourceFileFullPath = Identifier[1]
+ Identifier = Identifier[0]
+
+ # Find Ppis
+ ItemMode = 'Produced'
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.InstallPpi', '->InstallPpi', 'PeiInstallPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchPpi(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode)
+
+ ItemMode = 'Produced'
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.ReInstallPpi', '->ReInstallPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchPpi(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode, 2)
+
+ SearchPpiCallFunction(Identifier, SourceFileID, SourceFileFullPath, ItemMode)
+
+ ItemMode = 'Consumed'
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.LocatePpi', '->LocatePpi', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchPpi(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode)
+
+ SearchFunctionCalling(Identifier, SourceFileID, SourceFileFullPath, 'Ppi', ItemMode)
+
+ ItemMode = 'Callback'
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.NotifyPpi', '->NotifyPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchPpi(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode)
+
+ # Find Procotols
+ ItemMode = 'Produced'
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%' or Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.InstallProtocolInterface', '.ReInstallProtocolInterface', '->InstallProtocolInterface', '->ReInstallProtocolInterface', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchProtocols(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode, 1)
+
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.InstallMultipleProtocolInterfaces', '->InstallMultipleProtocolInterfaces', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchProtocols(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode, 2)
+
+ SearchFunctionCalling(Identifier, SourceFileID, SourceFileFullPath, 'Protocol', ItemMode)
+
+ ItemMode = 'Consumed'
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.LocateProtocol', '->LocateProtocol', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchProtocols(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode, 0)
+
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.HandleProtocol', '->HandleProtocol', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchProtocols(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode, 1)
+
+ SearchFunctionCalling(Identifier, SourceFileID, SourceFileFullPath, 'Protocol', ItemMode)
+
+ ItemMode = 'Callback'
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, '.RegisterProtocolNotify', '->RegisterProtocolNotify', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ SearchProtocols(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode, 0)
+
+ SearchFunctionCalling(Identifier, SourceFileID, SourceFileFullPath, 'Protocol', ItemMode)
+
+ # Hard Code
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gEfiSecPlatformInformationPpiGuid', '', '', '', 0)
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gEfiNtLoadAsDllPpiGuid', '', '', '', 0)
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gNtPeiLoadFileGuid', '', '', '', 0)
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gPeiNtAutoScanPpiGuid', '', '', '', 0)
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gNtFwhPpiGuid', '', '', '', 0)
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gPeiNtThunkPpiGuid', '', '', '', 0)
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gPeiPlatformTypePpiGuid', '', '', '', 0)
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gPeiFrequencySelectionCpuPpiGuid', '', '', '', 0)
+ EotGlobalData.gDb.TblReport.Insert(-2, '', '', -1, '', '', 'Ppi', 'Produced', 'gPeiCachePpiGuid', '', '', '', 0)
+
+ EotGlobalData.gDb.Conn.commit()
+
+
+ ## BuildDatabase() methoc
+ #
+ # Build the database for target
+ #
+ # @param self: The object pointer
+ #
+ def BuildDatabase(self):
+ # Clean report table
+ EotGlobalData.gDb.TblReport.Drop()
+ EotGlobalData.gDb.TblReport.Create()
+
+ # Build database
+ if self.IsInit:
+ self.BuildMetaDataFileDatabase(EotGlobalData.gINF_FILES)
+ EdkLogger.quiet("Building database for source code ...")
+ c.CreateCCodeDB(EotGlobalData.gSOURCE_FILES)
+ EdkLogger.quiet("Building database for source code done!")
+
+ EotGlobalData.gIdentifierTableList = GetTableList((MODEL_FILE_C, MODEL_FILE_H), 'Identifier', EotGlobalData.gDb)
+
+ ## BuildMetaDataFileDatabase() method
+ #
+ # Build the database for meta data files
+ #
+ # @param self: The object pointer
+ # @param Inf_Files: A list for all INF files
+ #
+ def BuildMetaDataFileDatabase(self, Inf_Files):
+ EdkLogger.quiet("Building database for meta data files ...")
+ for InfFile in Inf_Files:
+ EdkLogger.quiet("Parsing %s ..." % str(InfFile))
+ EdkInfParser(InfFile, EotGlobalData.gDb, Inf_Files[InfFile], '')
+
+ EotGlobalData.gDb.Conn.commit()
+ EdkLogger.quiet("Building database for meta data files done!")
+
+ ## ParseOption() method
+ #
+ # Parse command line options
+ #
+ # @param self: The object pointer
+ #
+ def ParseOption(self):
+ (Options, Target) = self.EotOptionParser()
+
+ # Set log level
+ self.SetLogLevel(Options)
+
+ if Options.FvFileList:
+ self.FvFileList = Options.FvFileList
+
+ if Options.MapFileList:
+ self.MapFileList = Options.FvMapFileList
+
+ if Options.SourceFileList:
+ self.SourceFileList = Options.SourceFileList
+
+ if Options.IncludeDirList:
+ self.IncludeDirList = Options.IncludeDirList
+
+ if Options.DecFileList:
+ self.DecFileList = Options.DecFileList
+
+ if Options.GuidList:
+ self.GuidList = Options.GuidList
+
+ if Options.LogFile:
+ self.LogFile = Options.LogFile
+
+ if Options.keepdatabase:
+ self.IsInit = False
+
+ ## SetLogLevel() method
+ #
+ # Set current log level of the tool based on args
+ #
+ # @param self: The object pointer
+ # @param Option: The option list including log level setting
+ #
+ def SetLogLevel(self, Option):
+ if Option.verbose != None:
+ EdkLogger.SetLevel(EdkLogger.VERBOSE)
+ elif Option.quiet != None:
+ EdkLogger.SetLevel(EdkLogger.QUIET)
+ elif Option.debug != None:
+ EdkLogger.SetLevel(Option.debug + 1)
+ else:
+ EdkLogger.SetLevel(EdkLogger.INFO)
+
+ ## EotOptionParser() method
+ #
+ # Using standard Python module optparse to parse command line option of this tool.
+ #
+ # @param self: The object pointer
+ #
+ # @retval Opt A optparse.Values object containing the parsed options
+ # @retval Args Target of build command
+ #
+ def EotOptionParser(self):
+ Parser = OptionParser(description = self.Copyright, version = self.Version, prog = "Eot.exe", usage = "%prog [options]")
+ Parser.add_option("-m", "--makefile filename", action="store", type="string", dest='MakeFile',
+ help="Specify a makefile for the platform.")
+ Parser.add_option("-c", "--dsc filename", action="store", type="string", dest="DscFile",
+ help="Specify a dsc file for the platform.")
+ Parser.add_option("-f", "--fv filename", action="store", type="string", dest="FvFileList",
+ help="Specify fv file list, quoted by \"\".")
+ Parser.add_option("-a", "--map filename", action="store", type="string", dest="MapFileList",
+ help="Specify map file list, quoted by \"\".")
+ Parser.add_option("-s", "--source files", action="store", type="string", dest="SourceFileList",
+ help="Specify source file list by a file")
+ Parser.add_option("-i", "--include dirs", action="store", type="string", dest="IncludeDirList",
+ help="Specify include dir list by a file")
+ Parser.add_option("-e", "--dec files", action="store", type="string", dest="DecFileList",
+ help="Specify dec file list by a file")
+ Parser.add_option("-g", "--guid list", action="store", type="string", dest="GuidList",
+ help="Specify guid file list by a file")
+ Parser.add_option("-l", "--log filename", action="store", type="string", dest="LogFile",
+ help="Specify real execution log file")
+
+ Parser.add_option("-k", "--keepdatabase", action="store_true", type=None, help="The existing Eot database will not be cleaned except report information if this option is specified.")
+
+ Parser.add_option("-q", "--quiet", action="store_true", type=None, help="Disable all messages except FATAL ERRORS.")
+ Parser.add_option("-v", "--verbose", action="store_true", type=None, help="Turn on verbose output with informational messages printed, "\
+ "including library instances selected, final dependency expression, "\
+ "and warning messages, etc.")
+ Parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.")
+
+ (Opt, Args)=Parser.parse_args()
+
+ return (Opt, Args)
+
+##
+#
+# This acts like the main() function for the script, unless it is 'import'ed into another
+# script.
+#
+if __name__ == '__main__':
+ # Initialize log system
+ EdkLogger.Initialize()
+ EdkLogger.IsRaiseError = False
+ EdkLogger.quiet(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[00:00]" + "\n")
+
+ StartTime = time.clock()
+ Eot = Eot()
+ FinishTime = time.clock()
+
+ BuildDuration = time.strftime("%M:%S", time.gmtime(int(round(FinishTime - StartTime))))
+ EdkLogger.quiet("\n%s [%s]" % (time.strftime("%H:%M:%S, %b.%d %Y", time.localtime()), BuildDuration))
diff --git a/BaseTools/Source/Python/Eot/EotGlobalData.py b/BaseTools/Source/Python/Eot/EotGlobalData.py
new file mode 100644
index 0000000000..a70a60b819
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/EotGlobalData.py
@@ -0,0 +1,138 @@
+## @file
+# This file is used to save global datas
+#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+from Common.Misc import sdict
+
+gEFI_SOURCE = ''
+gEDK_SOURCE = ''
+gWORKSPACE = ''
+gSHELL_INF = 'Application\Shell'
+gMAKE_FILE = ''
+gDSC_FILE = ''
+gFV_FILE = []
+gFV = []
+gMAP_FILE = []
+gMap = {}
+
+
+gDb = ''
+gIdentifierTableList = []
+
+# Global macro
+gMACRO = {}
+gMACRO['EFI_SOURCE'] = gEFI_SOURCE
+gMACRO['EDK_SOURCE'] = gEDK_SOURCE
+gMACRO['SHELL_INF'] = gSHELL_INF
+gMACRO['CAPSULE_INF'] = ''
+
+gNOT_FOUND_FILES = []
+gSOURCE_FILES = []
+gINF_FILES = {}
+gDEC_FILES = []
+
+# Log file for unmatched variables
+gUN_MATCHED_LOG = 'Log_UnMatched.log'
+gOP_UN_MATCHED = open(gUN_MATCHED_LOG, 'w+')
+
+# Log file for all INF files
+gINF_FILES = 'Log_Inf_File.log'
+gOP_INF = open(gINF_FILES, 'w+')
+
+# Log file for not dispatched PEIM/DRIVER
+gUN_DISPATCHED_LOG = 'Log_UnDispatched.log'
+gOP_UN_DISPATCHED = open(gUN_DISPATCHED_LOG, 'w+')
+
+# Log file for unmatched variables in function calling
+gUN_MATCHED_IN_LIBRARY_CALLING_LOG = 'Log_UnMatchedInLibraryCalling.log'
+gOP_UN_MATCHED_IN_LIBRARY_CALLING = open(gUN_MATCHED_IN_LIBRARY_CALLING_LOG, 'w+')
+
+# Log file for order of dispatched PEIM/DRIVER
+gDISPATCH_ORDER_LOG = 'Log_DispatchOrder.log'
+gOP_DISPATCH_ORDER = open(gDISPATCH_ORDER_LOG, 'w+')
+
+# Log file for source files not found
+gUN_FOUND_FILES = 'Log_UnFoundSourceFiles.log'
+gOP_UN_FOUND_FILES = open(gUN_FOUND_FILES, 'w+')
+
+# Log file for found source files
+gSOURCE_FILES = 'Log_SourceFiles.log'
+gOP_SOURCE_FILES = open(gSOURCE_FILES, 'w+')
+
+# Dict for GUID found in DEC files
+gGuidDict = sdict()
+
+# Dict for hard coded GUID Macros
+# {GuidName : [GuidMacro : GuidValue]}
+gGuidMacroDict = sdict()
+
+# Dict for PPI
+gPpiList = {}
+
+# Dict for PROTOCOL
+gProtocolList = {}
+
+# Dict for consumed PPI function calling
+gConsumedPpiLibrary = sdict()
+gConsumedPpiLibrary['EfiCommonLocateInterface'] = 0
+gConsumedPpiLibrary['PeiServicesLocatePpi'] = 0
+
+# Dict for produced PROTOCOL function calling
+gProducedProtocolLibrary = sdict()
+gProducedProtocolLibrary['RegisterEsalClass'] = 0
+gProducedProtocolLibrary['CoreInstallProtocolInterface'] = 1
+gProducedProtocolLibrary['CoreInstallMultipleProtocolInterfaces'] = -1
+gProducedProtocolLibrary['EfiInstallProtocolInterface'] = 1
+gProducedProtocolLibrary['EfiReinstallProtocolInterface'] = 1
+gProducedProtocolLibrary['EfiLibNamedEventSignal'] = 0
+gProducedProtocolLibrary['LibInstallProtocolInterfaces'] = 1
+gProducedProtocolLibrary['LibReinstallProtocolInterfaces'] = 1
+
+# Dict for consumed PROTOCOL function calling
+gConsumedProtocolLibrary = sdict()
+gConsumedProtocolLibrary['EfiHandleProtocol'] = 0
+gConsumedProtocolLibrary['EfiLocateProtocolHandleBuffers'] = 0
+gConsumedProtocolLibrary['EfiLocateProtocolInterface'] = 0
+gConsumedProtocolLibrary['EfiHandleProtocol'] = 1
+
+# Dict for callback PROTOCOL function callling
+gCallbackProtocolLibrary = sdict()
+gCallbackProtocolLibrary['EfiRegisterProtocolCallback'] = 2
+
+# Dict for ARCH PROTOCOL
+gArchProtocols = ['gEfiBdsArchProtocolGuid',
+ 'gEfiCapsuleArchProtocolGuid',
+ 'gEfiCpuArchProtocolGuid', #5053697e-2cbc-4819-90d9-0580deee5754
+ 'gEfiMetronomeArchProtocolGuid',
+ 'gEfiMonotonicCounterArchProtocolGuid',
+ 'gEfiRealTimeClockArchProtocolGuid',
+ 'gEfiResetArchProtocolGuid',
+ 'gEfiRuntimeArchProtocolGuid',
+ 'gEfiSecurityArchProtocolGuid',
+ 'gEfiStatusCodeRuntimeProtocolGuid',
+ 'gEfiTimerArchProtocolGuid',
+ 'gEfiVariableArchProtocolGuid',
+ 'gEfiVariableWriteArchProtocolGuid',
+ 'gEfiWatchdogTimerArchProtocolGuid']
+gArchProtocolGuids = ['665e3ff6-46cc-11d4-9a38-0090273fc14d',
+ '26baccb1-6f42-11d4-bce7-0080c73c8881',
+ '26baccb2-6f42-11d4-bce7-0080c73c8881',
+ '1da97072-bddc-4b30-99f1-72a0b56fff2a',
+ '27cfac87-46cc-11d4-9a38-0090273fc14d',
+ '27cfac88-46cc-11d4-9a38-0090273fc14d',
+ 'b7dfb4e1-052f-449f-87be-9818fc91b733',
+ 'a46423e3-4617-49f1-b9ff-d1bfa9115839',
+ 'd2b2b828-0826-48a7-b3df-983c006024f0',
+ '26baccb3-6f42-11d4-bce7-0080c73c8881',
+ '1e5668e2-8481-11d4-bcf1-0080c73c8881',
+ '6441f818-6362-4e44-b570-7dba31dd2453',
+ '665e3ff5-46cc-11d4-9a38-0090273fc14d']
diff --git a/BaseTools/Source/Python/Eot/EotToolError.py b/BaseTools/Source/Python/Eot/EotToolError.py
new file mode 100644
index 0000000000..17005f30f6
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/EotToolError.py
@@ -0,0 +1,21 @@
+## @file
+# Standardized Error Handling infrastructures.
+#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+# Error id
+ERROR_1 = 1000
+
+# Error message
+gEccErrorMessage = {
+ ERROR_1 : "RESERVED"
+ }
+
diff --git a/BaseTools/Source/Python/Eot/FileProfile.py b/BaseTools/Source/Python/Eot/FileProfile.py
new file mode 100644
index 0000000000..602639e5bd
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/FileProfile.py
@@ -0,0 +1,58 @@
+## @file
+# fragments of source file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+
+import re
+import os
+from ParserWarning import Warning
+
+# Profile contents of a file
+PPDirectiveList = []
+AssignmentExpressionList = []
+PredicateExpressionList = []
+FunctionDefinitionList = []
+VariableDeclarationList = []
+EnumerationDefinitionList = []
+StructUnionDefinitionList = []
+TypedefDefinitionList = []
+FunctionCallingList = []
+
+## Class FileProfile
+#
+# record file data when parsing source
+#
+# May raise Exception when opening file.
+#
+class FileProfile :
+
+ ## The constructor
+ #
+ # @param self: The object pointer
+ # @param FileName: The file that to be parsed
+ #
+ def __init__(self, FileName):
+ self.FileLinesList = []
+ self.FileLinesListFromFile = []
+ try:
+ fsock = open(FileName, "rb", 0)
+ try:
+ self.FileLinesListFromFile = fsock.readlines()
+ finally:
+ fsock.close()
+
+ except IOError:
+ raise Warning("Error when opening file %s" % FileName)
diff --git a/BaseTools/Source/Python/Eot/FvImage.py b/BaseTools/Source/Python/Eot/FvImage.py
new file mode 100644
index 0000000000..ad88491bae
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/FvImage.py
@@ -0,0 +1,1453 @@
+## @file
+# Parse FV image
+#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+## Import Modules
+#
+import os
+import re
+import sys
+import uuid
+import struct
+import codecs
+import copy
+
+from UserDict import IterableUserDict
+from cStringIO import StringIO
+from array import array
+
+from CommonDataClass import *
+from Common.Misc import sdict, GuidStructureStringToGuidString
+
+import Common.EdkLogger as EdkLogger
+
+import EotGlobalData
+
+# Global definiton
+gFfsPrintTitle = "%-36s %-21s %8s %8s %8s %-4s %-36s" % ("GUID", "TYPE", "OFFSET", "SIZE", "FREE", "ALIGN", "NAME")
+gFfsPrintFormat = "%36s %-21s %8X %8X %8X %4s %-36s"
+gGuidStringFormat = "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X"
+gPeiAprioriFileNameGuid = '1b45cc0a-156a-428a-af62-49864da0e6e6'
+gAprioriGuid = 'fc510ee7-ffdc-11d4-bd41-0080c73c8881'
+gIndention = -4
+
+## Image() class
+#
+# A class for Image
+#
+class Image(array):
+ _HEADER_ = struct.Struct("")
+ _HEADER_SIZE_ = _HEADER_.size
+
+ def __new__(cls, *args, **kwargs):
+ return array.__new__(cls, 'B')
+
+ def __init__(m, ID=None):
+ if ID == None:
+ m._ID_ = str(uuid.uuid1()).upper()
+ else:
+ m._ID_ = ID
+ m._BUF_ = None
+ m._LEN_ = None
+ m._OFF_ = None
+
+ m._SubImages = sdict() # {offset: Image()}
+
+ array.__init__(m, 'B')
+
+ def __repr__(m):
+ return m._ID_
+
+ def __len__(m):
+ Len = array.__len__(m)
+ for Offset in m._SubImages:
+ Len += len(m._SubImages[Offset])
+ return Len
+
+ def _Unpack(m):
+ m.extend(m._BUF_[m._OFF_ : m._OFF_ + m._LEN_])
+ return len(m)
+
+ def _Pack(m, PadByte=0xFF):
+ raise NotImplementedError
+
+ def frombuffer(m, Buffer, Offset=0, Size=None):
+ m._BUF_ = Buffer
+ m._OFF_ = Offset
+ # we may need the Size information in advance if it's given
+ m._LEN_ = Size
+ m._LEN_ = m._Unpack()
+
+ def empty(m):
+ del m[0:]
+
+ def GetField(m, FieldStruct, Offset=0):
+ return FieldStruct.unpack_from(m, Offset)
+
+ def SetField(m, FieldStruct, Offset, *args):
+ # check if there's enough space
+ Size = FieldStruct.size
+ if Size > len(m):
+ m.extend([0] * (Size - len(m)))
+ FieldStruct.pack_into(m, Offset, *args)
+
+ def _SetData(m, Data):
+ if len(m) < m._HEADER_SIZE_:
+ m.extend([0] * (m._HEADER_SIZE_ - len(m)))
+ else:
+ del m[m._HEADER_SIZE_:]
+ m.extend(Data)
+
+ def _GetData(m):
+ if len(m) > m._HEADER_SIZE_:
+ return m[m._HEADER_SIZE_:]
+ return None
+
+ Data = property(_GetData, _SetData)
+
+## FirmwareVolume() class
+#
+# A class for Firmware Volume
+#
+class FirmwareVolume(Image):
+ # Read FvLength, Attributes, HeaderLength, Checksum
+ _HEADER_ = struct.Struct("16x 1I2H8B 1Q 4x 1I 1H 1H")
+ _HEADER_SIZE_ = _HEADER_.size
+
+ _FfsGuid = "8C8CE578-8A3D-4F1C-9935-896185C32DD3"
+
+ _GUID_ = struct.Struct("16x 1I2H8B")
+ _LENGTH_ = struct.Struct("16x 16x 1Q")
+ _SIG_ = struct.Struct("16x 16x 8x 1I")
+ _ATTR_ = struct.Struct("16x 16x 8x 4x 1I")
+ _HLEN_ = struct.Struct("16x 16x 8x 4x 4x 1H")
+ _CHECKSUM_ = struct.Struct("16x 16x 8x 4x 4x 2x 1H")
+
+ def __init__(self, Name=''):
+ Image.__init__(self)
+ self.Name = Name
+ self.FfsDict = sdict()
+ self.OrderedFfsDict = sdict()
+ self.UnDispatchedFfsDict = sdict()
+ self.NoDepexFfsDict = sdict()
+ self.ProtocolList = sdict()
+
+ def CheckArchProtocol(self):
+ for Item in EotGlobalData.gArchProtocolGuids:
+ if Item.lower() not in EotGlobalData.gProtocolList:
+
+ return False
+
+ return True
+
+ def ParseDepex(self, Depex, Type):
+ List = None
+ if Type == 'Ppi':
+ List = EotGlobalData.gPpiList
+ if Type == 'Protocol':
+ List = EotGlobalData.gProtocolList
+ DepexStack = []
+ DepexList = []
+ DepexString = ''
+ FileDepex = None
+ CouldBeLoaded = True
+ for Index in range(0, len(Depex.Expression)):
+ Item = Depex.Expression[Index]
+ if Item == 0x00:
+ Index = Index + 1
+ Guid = gGuidStringFormat % Depex.Expression[Index]
+ if Guid in self.OrderedFfsDict and Depex.Expression[Index + 1] == 0x08:
+ return (True, 'BEFORE %s' % Guid, [Guid, 'BEFORE'])
+ elif Item == 0x01:
+ Index = Index + 1
+ Guid = gGuidStringFormat % Depex.Expression[Index]
+ if Guid in self.OrderedFfsDict and Depex.Expression[Index + 1] == 0x08:
+ return (True, 'AFTER %s' % Guid, [Guid, 'AFTER'])
+ elif Item == 0x02:
+ Index = Index + 1
+ Guid = gGuidStringFormat % Depex.Expression[Index]
+ if Guid.lower() in List:
+ DepexStack.append(True)
+ DepexList.append(Guid)
+ else:
+ DepexStack.append(False)
+ DepexList.append(Guid)
+ continue
+ elif Item == 0x03 or Item == 0x04:
+ DepexStack.append(eval(str(DepexStack.pop()) + ' ' + Depex._OPCODE_STRING_[Item].lower() + ' ' + str(DepexStack.pop())))
+ DepexList.append(str(DepexList.pop()) + ' ' + Depex._OPCODE_STRING_[Item].upper() + ' ' + str(DepexList.pop()))
+ elif Item == 0x05:
+ DepexStack.append(eval(Depex._OPCODE_STRING_[Item].lower() + ' ' + str(DepexStack.pop())))
+ DepexList.append(Depex._OPCODE_STRING_[Item].lower() + ' ' + str(DepexList.pop()))
+ elif Item == 0x06:
+ DepexStack.append(True)
+ DepexList.append('TRUE')
+ DepexString = DepexString + 'TRUE' + ' '
+ elif Item == 0x07:
+ DepexStack.append(False)
+ DepexList.append('False')
+ DepexString = DepexString + 'FALSE' + ' '
+ elif Item == 0x08:
+ if Index != len(Depex.Expression) - 1:
+ CouldBeLoaded = False
+ else:
+ CouldBeLoaded = DepexStack.pop()
+ else:
+ CouldBeLoaded = False
+ if DepexList != []:
+ DepexString = DepexList[0].strip()
+ return (CouldBeLoaded, DepexString, FileDepex)
+
+ def Dispatch(self, Db = None):
+ if Db == None:
+ return False
+ self.UnDispatchedFfsDict = copy.copy(self.FfsDict)
+ # Find PeiCore, DexCore, PeiPriori, DxePriori first
+ FfsSecCoreGuid = None
+ FfsPeiCoreGuid = None
+ FfsDxeCoreGuid = None
+ FfsPeiPrioriGuid = None
+ FfsDxePrioriGuid = None
+ for FfsID in self.UnDispatchedFfsDict:
+ Ffs = self.UnDispatchedFfsDict[FfsID]
+ if Ffs.Type == 0x03:
+ FfsSecCoreGuid = FfsID
+ continue
+ if Ffs.Type == 0x04:
+ FfsPeiCoreGuid = FfsID
+ continue
+ if Ffs.Type == 0x05:
+ FfsDxeCoreGuid = FfsID
+ continue
+ if Ffs.Guid.lower() == gPeiAprioriFileNameGuid:
+ FfsPeiPrioriGuid = FfsID
+ continue
+ if Ffs.Guid.lower() == gAprioriGuid:
+ FfsDxePrioriGuid = FfsID
+ continue
+
+ # Parse SEC_CORE first
+ if FfsSecCoreGuid != None:
+ self.OrderedFfsDict[FfsSecCoreGuid] = self.UnDispatchedFfsDict.pop(FfsSecCoreGuid)
+ self.LoadPpi(Db, FfsSecCoreGuid)
+
+ # Parse PEI first
+ if FfsPeiCoreGuid != None:
+ self.OrderedFfsDict[FfsPeiCoreGuid] = self.UnDispatchedFfsDict.pop(FfsPeiCoreGuid)
+ self.LoadPpi(Db, FfsPeiCoreGuid)
+ if FfsPeiPrioriGuid != None:
+ # Load PEIM described in priori file
+ FfsPeiPriori = self.UnDispatchedFfsDict.pop(FfsPeiPrioriGuid)
+ if len(FfsPeiPriori.Sections) == 1:
+ Section = FfsPeiPriori.Sections.popitem()[1]
+ if Section.Type == 0x19:
+ GuidStruct = struct.Struct('1I2H8B')
+ Start = 4
+ while len(Section) > Start:
+ Guid = GuidStruct.unpack_from(Section[Start : Start + 16])
+ GuidString = gGuidStringFormat % Guid
+ Start = Start + 16
+ if GuidString in self.UnDispatchedFfsDict:
+ self.OrderedFfsDict[GuidString] = self.UnDispatchedFfsDict.pop(GuidString)
+ self.LoadPpi(Db, GuidString)
+
+ self.DisPatchPei(Db)
+
+ # Parse DXE then
+ if FfsDxeCoreGuid != None:
+ self.OrderedFfsDict[FfsDxeCoreGuid] = self.UnDispatchedFfsDict.pop(FfsDxeCoreGuid)
+ self.LoadProtocol(Db, FfsDxeCoreGuid)
+ if FfsDxePrioriGuid != None:
+ # Load PEIM described in priori file
+ FfsDxePriori = self.UnDispatchedFfsDict.pop(FfsDxePrioriGuid)
+ if len(FfsDxePriori.Sections) == 1:
+ Section = FfsDxePriori.Sections.popitem()[1]
+ if Section.Type == 0x19:
+ GuidStruct = struct.Struct('1I2H8B')
+ Start = 4
+ while len(Section) > Start:
+ Guid = GuidStruct.unpack_from(Section[Start : Start + 16])
+ GuidString = gGuidStringFormat % Guid
+ Start = Start + 16
+ if GuidString in self.UnDispatchedFfsDict:
+ self.OrderedFfsDict[GuidString] = self.UnDispatchedFfsDict.pop(GuidString)
+ self.LoadProtocol(Db, GuidString)
+
+ self.DisPatchDxe(Db)
+
+ def DisPatchNoDepexFfs(self, Db):
+ # Last Load Drivers without Depex
+ for FfsID in self.NoDepexFfsDict:
+ NewFfs = self.NoDepexFfsDict.pop(FfsID)
+ self.OrderedFfsDict[FfsID] = NewFfs
+ self.LoadProtocol(Db, FfsID)
+
+ return True
+
+ def LoadCallbackProtocol(self):
+ IsLoad = True
+ for Protocol in self.ProtocolList:
+ for Callback in self.ProtocolList[Protocol][1]:
+ if Callback[0] not in self.OrderedFfsDict.keys():
+ IsLoad = False
+ continue
+ if IsLoad:
+ EotGlobalData.gProtocolList[Protocol.lower()] = self.ProtocolList[Protocol][0]
+ self.ProtocolList.pop(Protocol)
+
+ def LoadProtocol(self, Db, ModuleGuid):
+ SqlCommand = """select GuidValue from Report
+ where SourceFileFullPath in
+ (select Value1 from Inf where BelongsToFile =
+ (select BelongsToFile from Inf
+ where Value1 = 'FILE_GUID' and Value2 like '%s' and Model = %s)
+ and Model = %s)
+ and ItemType = 'Protocol' and ItemMode = 'Produced'""" \
+ % (ModuleGuid, 5001, 3007)
+ RecordSet = Db.TblReport.Exec(SqlCommand)
+ for Record in RecordSet:
+ SqlCommand = """select Value2 from Inf where BelongsToFile =
+ (select DISTINCT BelongsToFile from Inf
+ where Value1 =
+ (select SourceFileFullPath from Report
+ where GuidValue like '%s' and ItemMode = 'Callback'))
+ and Value1 = 'FILE_GUID'""" % Record[0]
+ CallBackSet = Db.TblReport.Exec(SqlCommand)
+ if CallBackSet != []:
+ EotGlobalData.gProtocolList[Record[0].lower()] = ModuleGuid
+ else:
+ EotGlobalData.gProtocolList[Record[0].lower()] = ModuleGuid
+
+ def LoadPpi(self, Db, ModuleGuid):
+ SqlCommand = """select GuidValue from Report
+ where SourceFileFullPath in
+ (select Value1 from Inf where BelongsToFile =
+ (select BelongsToFile from Inf
+ where Value1 = 'FILE_GUID' and Value2 like '%s' and Model = %s)
+ and Model = %s)
+ and ItemType = 'Ppi' and ItemMode = 'Produced'""" \
+ % (ModuleGuid, 5001, 3007)
+ RecordSet = Db.TblReport.Exec(SqlCommand)
+ for Record in RecordSet:
+ EotGlobalData.gPpiList[Record[0].lower()] = ModuleGuid
+
+ def DisPatchDxe(self, Db):
+ IsInstalled = False
+ ScheduleList = sdict()
+ for FfsID in self.UnDispatchedFfsDict:
+ CouldBeLoaded = False
+ DepexString = ''
+ FileDepex = None
+ Ffs = self.UnDispatchedFfsDict[FfsID]
+ if Ffs.Type == 0x07:
+ # Get Depex
+ IsFoundDepex = False
+ for Section in Ffs.Sections.values():
+ # Find Depex
+ if Section.Type == 0x13:
+ IsFoundDepex = True
+ CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(Section._SubImages[4], 'Protocol')
+ break
+ if Section.Type == 0x01:
+ CompressSections = Section._SubImages[4]
+ for CompressSection in CompressSections.Sections:
+ if CompressSection.Type == 0x13:
+ IsFoundDepex = True
+ CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(CompressSection._SubImages[4], 'Protocol')
+ break
+ if CompressSection.Type == 0x02:
+ NewSections = CompressSection._SubImages[4]
+ for NewSection in NewSections.Sections:
+ if NewSection.Type == 0x13:
+ IsFoundDepex = True
+ CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(NewSection._SubImages[4], 'Protocol')
+ break
+
+ # Not find Depex
+ if not IsFoundDepex:
+ CouldBeLoaded = self.CheckArchProtocol()
+ DepexString = ''
+ FileDepex = None
+
+ # Append New Ffs
+ if CouldBeLoaded:
+ IsInstalled = True
+ NewFfs = self.UnDispatchedFfsDict.pop(FfsID)
+ NewFfs.Depex = DepexString
+ if FileDepex != None:
+ ScheduleList.insert.insert(FileDepex[1], FfsID, NewFfs, FileDepex[0])
+ else:
+ ScheduleList[FfsID] = NewFfs
+ else:
+ self.UnDispatchedFfsDict[FfsID].Depex = DepexString
+
+ for FfsID in ScheduleList:
+ NewFfs = ScheduleList.pop(FfsID)
+ FfsName = 'UnKnown'
+ self.OrderedFfsDict[FfsID] = NewFfs
+ self.LoadProtocol(Db, FfsID)
+
+ SqlCommand = """select Value2 from Inf
+ where BelongsToFile = (select BelongsToFile from Inf where Value1 = 'FILE_GUID' and lower(Value2) = lower('%s') and Model = %s)
+ and Model = %s and Value1='BASE_NAME'""" % (FfsID, 5001, 5001)
+ RecordSet = Db.TblReport.Exec(SqlCommand)
+ if RecordSet != []:
+ FfsName = RecordSet[0][0]
+
+ if IsInstalled:
+ self.DisPatchDxe(Db)
+
+ def DisPatchPei(self, Db):
+ IsInstalled = False
+ for FfsID in self.UnDispatchedFfsDict:
+ CouldBeLoaded = True
+ DepexString = ''
+ FileDepex = None
+ Ffs = self.UnDispatchedFfsDict[FfsID]
+ if Ffs.Type == 0x06 or Ffs.Type == 0x08:
+ # Get Depex
+ for Section in Ffs.Sections.values():
+ if Section.Type == 0x1B:
+ CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(Section._SubImages[4], 'Ppi')
+ break
+
+ if Section.Type == 0x01:
+ CompressSections = Section._SubImages[4]
+ for CompressSection in CompressSections.Sections:
+ if CompressSection.Type == 0x1B:
+ CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(CompressSection._SubImages[4], 'Ppi')
+ break
+ if CompressSection.Type == 0x02:
+ NewSections = CompressSection._SubImages[4]
+ for NewSection in NewSections.Sections:
+ if NewSection.Type == 0x1B:
+ CouldBeLoaded, DepexString, FileDepex = self.ParseDepex(NewSection._SubImages[4], 'Ppi')
+ break
+
+ # Append New Ffs
+ if CouldBeLoaded:
+ IsInstalled = True
+ NewFfs = self.UnDispatchedFfsDict.pop(FfsID)
+ NewFfs.Depex = DepexString
+ self.OrderedFfsDict[FfsID] = NewFfs
+ self.LoadPpi(Db, FfsID)
+ else:
+ self.UnDispatchedFfsDict[FfsID].Depex = DepexString
+
+ if IsInstalled:
+ self.DisPatchPei(Db)
+
+
+ def __str__(self):
+ global gIndention
+ gIndention += 4
+ FvInfo = '\n' + ' ' * gIndention
+ FvInfo += "[FV:%s] file_system=%s size=%x checksum=%s\n" % (self.Name, self.FileSystemGuid, self.Size, self.Checksum)
+ FfsInfo = "\n".join([str(self.FfsDict[FfsId]) for FfsId in self.FfsDict])
+ gIndention -= 4
+ return FvInfo + FfsInfo
+
+ def _Unpack(self):
+ Size = self._LENGTH_.unpack_from(self._BUF_, self._OFF_)[0]
+ self.empty()
+ self.extend(self._BUF_[self._OFF_:self._OFF_+Size])
+
+ # traverse the FFS
+ EndOfFv = Size
+ FfsStartAddress = self.HeaderSize
+ LastFfsObj = None
+ while FfsStartAddress < EndOfFv:
+ FfsObj = Ffs()
+ FfsObj.frombuffer(self, FfsStartAddress)
+ FfsId = repr(FfsObj)
+ if ((self.Attributes & 0x00000800) != 0 and len(FfsObj) == 0xFFFFFF) \
+ or ((self.Attributes & 0x00000800) == 0 and len(FfsObj) == 0):
+ if LastFfsObj != None:
+ LastFfsObj.FreeSpace = EndOfFv - LastFfsObj._OFF_ - len(LastFfsObj)
+ else:
+ if FfsId in self.FfsDict:
+ EdkLogger.error("FV", 0, "Duplicate GUID in FFS",
+ ExtraData="\t%s @ %s\n\t%s @ %s" \
+ % (FfsObj.Guid, FfsObj.Offset,
+ self.FfsDict[FfsId].Guid, self.FfsDict[FfsId].Offset))
+ self.FfsDict[FfsId] = FfsObj
+ if LastFfsObj != None:
+ LastFfsObj.FreeSpace = FfsStartAddress - LastFfsObj._OFF_ - len(LastFfsObj)
+
+ FfsStartAddress += len(FfsObj)
+ #
+ # align to next 8-byte aligned address: A = (A + 8 - 1) & (~(8 - 1))
+ # The next FFS must be at the latest next 8-byte aligned address
+ #
+ FfsStartAddress = (FfsStartAddress + 7) & (~7)
+ LastFfsObj = FfsObj
+
+ def _GetAttributes(self):
+ return self.GetField(self._ATTR_, 0)[0]
+
+ def _GetSize(self):
+ return self.GetField(self._LENGTH_, 0)[0]
+
+ def _GetChecksum(self):
+ return self.GetField(self._CHECKSUM_, 0)[0]
+
+ def _GetHeaderLength(self):
+ return self.GetField(self._HLEN_, 0)[0]
+
+ def _GetFileSystemGuid(self):
+ return gGuidStringFormat % self.GetField(self._GUID_, 0)
+
+ Attributes = property(_GetAttributes)
+ Size = property(_GetSize)
+ Checksum = property(_GetChecksum)
+ HeaderSize = property(_GetHeaderLength)
+ FileSystemGuid = property(_GetFileSystemGuid)
+
+## CompressedImage() class
+#
+# A class for Compressed Image
+#
+class CompressedImage(Image):
+ # UncompressedLength = 4-byte
+ # CompressionType = 1-byte
+ _HEADER_ = struct.Struct("1I 1B")
+ _HEADER_SIZE_ = _HEADER_.size
+
+ _ORIG_SIZE_ = struct.Struct("1I")
+ _CMPRS_TYPE_ = struct.Struct("4x 1B")
+
+ def __init__(m, CompressedData=None, CompressionType=None, UncompressedLength=None):
+ Image.__init__(m)
+ if UncompressedLength != None:
+ m.UncompressedLength = UncompressedLength
+ if CompressionType != None:
+ m.CompressionType = CompressionType
+ if CompressedData != None:
+ m.Data = CompressedData
+
+ def __str__(m):
+ global gIndention
+ S = "algorithm=%s uncompressed=%x" % (m.CompressionType, m.UncompressedLength)
+ for Sec in m.Sections:
+ S += '\n' + str(Sec)
+
+ return S
+
+ def _SetOriginalSize(m, Size):
+ m.SetField(m._ORIG_SIZE_, 0, Size)
+
+ def _GetOriginalSize(m):
+ return m.GetField(m._ORIG_SIZE_)[0]
+
+ def _SetCompressionType(m, Type):
+ m.SetField(m._CMPRS_TYPE_, 0, Type)
+
+ def _GetCompressionType(m):
+ return m.GetField(m._CMPRS_TYPE_)[0]
+
+ def _GetSections(m):
+ try:
+ import EfiCompressor
+ TmpData = EfiCompressor.FrameworkDecompress(
+ m[m._HEADER_SIZE_:],
+ len(m) - m._HEADER_SIZE_
+ )
+ DecData = array('B')
+ DecData.fromstring(TmpData)
+ except:
+ import EfiCompressor
+ TmpData = EfiCompressor.UefiDecompress(
+ m[m._HEADER_SIZE_:],
+ len(m) - m._HEADER_SIZE_
+ )
+ DecData = array('B')
+ DecData.fromstring(TmpData)
+
+ SectionList = []
+ Offset = 0
+ while Offset < len(DecData):
+ Sec = Section()
+ try:
+ Sec.frombuffer(DecData, Offset)
+ Offset += Sec.Size
+ # the section is aligned to 4-byte boundary
+ except:
+ break
+ SectionList.append(Sec)
+ return SectionList
+
+ UncompressedLength = property(_GetOriginalSize, _SetOriginalSize)
+ CompressionType = property(_GetCompressionType, _SetCompressionType)
+ Sections = property(_GetSections)
+
+## GuidDefinedImage() class
+#
+# A class for GUID Defined Image
+#
+class GuidDefinedImage(Image):
+ _HEADER_ = struct.Struct("1I2H8B 1H 1H")
+ _HEADER_SIZE_ = _HEADER_.size
+
+ _GUID_ = struct.Struct("1I2H8B")
+ _DATA_OFFSET_ = struct.Struct("16x 1H")
+ _ATTR_ = struct.Struct("18x 1H")
+
+ CRC32_GUID = "FC1BCDB0-7D31-49AA-936A-A4600D9DD083"
+ TIANO_COMPRESS_GUID = 'A31280AD-481E-41B6-95E8-127F4C984779'
+ LZMA_COMPRESS_GUID = 'EE4E5898-3914-4259-9D6E-DC7BD79403CF'
+
+ def __init__(m, SectionDefinitionGuid=None, DataOffset=None, Attributes=None, Data=None):
+ Image.__init__(m)
+ if SectionDefinitionGuid != None:
+ m.SectionDefinitionGuid = SectionDefinitionGuid
+ if DataOffset != None:
+ m.DataOffset = DataOffset
+ if Attributes != None:
+ m.Attributes = Attributes
+ if Data != None:
+ m.Data = Data
+
+ def __str__(m):
+ S = "guid=%s" % (gGuidStringFormat % m.SectionDefinitionGuid)
+ for Sec in m.Sections:
+ S += "\n" + str(Sec)
+ return S
+
+ def _Unpack(m):
+ # keep header in this Image object
+ m.empty()
+ m.extend(m._BUF_[m._OFF_ : m._OFF_ + m._LEN_])
+ return len(m)
+
+ def _SetAttribute(m, Attribute):
+ m.SetField(m._ATTR_, 0, Attribute)
+
+ def _GetAttribute(m):
+ return m.GetField(m._ATTR_)[0]
+
+ def _SetGuid(m, Guid):
+ m.SetField(m._GUID_, 0, Guid)
+
+ def _GetGuid(m):
+ return m.GetField(m._GUID_)
+
+ def _SetDataOffset(m, Offset):
+ m.SetField(m._DATA_OFFSET_, 0, Offset)
+
+ def _GetDataOffset(m):
+ return m.GetField(m._DATA_OFFSET_)[0]
+
+ def _GetSections(m):
+ SectionList = []
+ Guid = gGuidStringFormat % m.SectionDefinitionGuid
+ if Guid == m.CRC32_GUID:
+ # skip the CRC32 value, we don't do CRC32 verification here
+ Offset = m.DataOffset - 4
+ while Offset < len(m):
+ Sec = Section()
+ try:
+ Sec.frombuffer(m, Offset)
+ Offset += Sec.Size
+ # the section is aligned to 4-byte boundary
+ Offset = (Offset + 3) & (~3)
+ except:
+ break
+ SectionList.append(Sec)
+ elif Guid == m.TIANO_COMPRESS_GUID:
+ try:
+ import EfiCompressor
+ # skip the header
+ Offset = m.DataOffset - 4
+ TmpData = EfiCompressor.FrameworkDecompress(m[Offset:], len(m)-Offset)
+ DecData = array('B')
+ DecData.fromstring(TmpData)
+ Offset = 0
+ while Offset < len(DecData):
+ Sec = Section()
+ try:
+ Sec.frombuffer(DecData, Offset)
+ Offset += Sec.Size
+ # the section is aligned to 4-byte boundary
+ Offset = (Offset + 3) & (~3)
+ except:
+ break
+ SectionList.append(Sec)
+ except:
+ pass
+ elif Guid == m.LZMA_COMPRESS_GUID:
+ try:
+ import LzmaCompressor
+ # skip the header
+ Offset = m.DataOffset - 4
+ TmpData = LzmaCompressor.LzmaDecompress(m[Offset:], len(m)-Offset)
+ DecData = array('B')
+ DecData.fromstring(TmpData)
+ Offset = 0
+ while Offset < len(DecData):
+ Sec = Section()
+ try:
+ Sec.frombuffer(DecData, Offset)
+ Offset += Sec.Size
+ # the section is aligned to 4-byte boundary
+ Offset = (Offset + 3) & (~3)
+ except:
+ break
+ SectionList.append(Sec)
+ except:
+ pass
+
+ return SectionList
+
+ Attributes = property(_GetAttribute, _SetAttribute)
+ SectionDefinitionGuid = property(_GetGuid, _SetGuid)
+ DataOffset = property(_GetDataOffset, _SetDataOffset)
+ Sections = property(_GetSections)
+
+## Depex() class
+#
+# A class for Depex
+#
+class Depex(Image):
+ _HEADER_ = struct.Struct("")
+ _HEADER_SIZE_ = 0
+
+ _GUID_ = struct.Struct("1I2H8B")
+ _OPCODE_ = struct.Struct("1B")
+
+ _OPCODE_STRING_ = {
+ 0x00 : "BEFORE",
+ 0x01 : "AFTER",
+ 0x02 : "PUSH",
+ 0x03 : "AND",
+ 0x04 : "OR",
+ 0x05 : "NOT",
+ 0x06 : "TRUE",
+ 0x07 : "FALSE",
+ 0x08 : "END",
+ 0x09 : "SOR"
+ }
+
+ _NEXT_ = {
+ -1 : _OPCODE_, # first one in depex must be an opcdoe
+ 0x00 : _GUID_, #"BEFORE",
+ 0x01 : _GUID_, #"AFTER",
+ 0x02 : _GUID_, #"PUSH",
+ 0x03 : _OPCODE_, #"AND",
+ 0x04 : _OPCODE_, #"OR",
+ 0x05 : _OPCODE_, #"NOT",
+ 0x06 : _OPCODE_, #"TRUE",
+ 0x07 : _OPCODE_, #"FALSE",
+ 0x08 : None, #"END",
+ 0x09 : _OPCODE_, #"SOR"
+ }
+
+ def __init__(m):
+ Image.__init__(m)
+ m._ExprList = []
+
+ def __str__(m):
+ global gIndention
+ gIndention += 4
+ Indention = ' ' * gIndention
+ S = '\n'
+ for T in m.Expression:
+ if T in m._OPCODE_STRING_:
+ S += Indention + m._OPCODE_STRING_[T]
+ if T not in [0x00, 0x01, 0x02]:
+ S += '\n'
+ else:
+ S += ' ' + gGuidStringFormat % T + '\n'
+ gIndention -= 4
+ return S
+
+ def _Unpack(m):
+ # keep header in this Image object
+ m.empty()
+ m.extend(m._BUF_[m._OFF_ : m._OFF_ + m._LEN_])
+ return len(m)
+
+ def _GetExpression(m):
+ if m._ExprList == []:
+ Offset = 0
+ CurrentData = m._OPCODE_
+ while Offset < len(m):
+ Token = CurrentData.unpack_from(m, Offset)
+ Offset += CurrentData.size
+ if len(Token) == 1:
+ Token = Token[0]
+ if Token in m._NEXT_:
+ CurrentData = m._NEXT_[Token]
+ else:
+ CurrentData = m._GUID_
+ else:
+ CurrentData = m._OPCODE_
+ m._ExprList.append(Token)
+ if CurrentData == None:
+ break
+ return m._ExprList
+
+ Expression = property(_GetExpression)
+
+## Ui() class
+#
+# A class for Ui
+#
+class Ui(Image):
+ _HEADER_ = struct.Struct("")
+ _HEADER_SIZE_ = 0
+
+ def __init__(m):
+ Image.__init__(m)
+
+ def __str__(m):
+ return m.String
+
+ def _Unpack(m):
+ # keep header in this Image object
+ m.empty()
+ m.extend(m._BUF_[m._OFF_ : m._OFF_ + m._LEN_])
+ return len(m)
+
+ def _GetUiString(m):
+ return codecs.utf_16_decode(m[0:-2].tostring())[0]
+
+ String = property(_GetUiString)
+
+## Section() class
+#
+# A class for Section
+#
+class Section(Image):
+ _TypeName = {
+ 0x00 : "<unknown>",
+ 0x01 : "COMPRESSION",
+ 0x02 : "GUID_DEFINED",
+ 0x10 : "PE32",
+ 0x11 : "PIC",
+ 0x12 : "TE",
+ 0x13 : "DXE_DEPEX",
+ 0x14 : "VERSION",
+ 0x15 : "USER_INTERFACE",
+ 0x16 : "COMPATIBILITY16",
+ 0x17 : "FIRMWARE_VOLUME_IMAGE",
+ 0x18 : "FREEFORM_SUBTYPE_GUID",
+ 0x19 : "RAW",
+ 0x1B : "PEI_DEPEX"
+ }
+
+ _SectionSubImages = {
+ 0x01 : CompressedImage,
+ 0x02 : GuidDefinedImage,
+ 0x17 : FirmwareVolume,
+ 0x13 : Depex,
+ 0x1B : Depex,
+ 0x15 : Ui
+ }
+
+ # Size = 3-byte
+ # Type = 1-byte
+ _HEADER_ = struct.Struct("3B 1B")
+ _HEADER_SIZE_ = _HEADER_.size
+
+ # SubTypeGuid
+ # _FREE_FORM_SUBTYPE_GUID_HEADER_ = struct.Struct("1I2H8B")
+
+ _SIZE_ = struct.Struct("3B")
+ _TYPE_ = struct.Struct("3x 1B")
+
+ def __init__(m, Type=None, Size=None):
+ Image.__init__(m)
+ m._Alignment = 1
+ if Type != None:
+ m.Type = Type
+ if Size != None:
+ m.Size = Size
+
+ def __str__(m):
+ global gIndention
+ gIndention += 4
+ SectionInfo = ' ' * gIndention
+ if m.Type in m._TypeName:
+ SectionInfo += "[SECTION:%s] offset=%x size=%x" % (m._TypeName[m.Type], m._OFF_, m.Size)
+ else:
+ SectionInfo += "[SECTION:%x<unknown>] offset=%x size=%x " % (m.Type, m._OFF_, m.Size)
+ for Offset in m._SubImages:
+ SectionInfo += ", " + str(m._SubImages[Offset])
+ gIndention -= 4
+ return SectionInfo
+
+ def _Unpack(m):
+ m.empty()
+ Type, = m._TYPE_.unpack_from(m._BUF_, m._OFF_)
+ Size1, Size2, Size3 = m._SIZE_.unpack_from(m._BUF_, m._OFF_)
+ Size = Size1 + (Size2 << 8) + (Size3 << 16)
+
+ if Type not in m._SectionSubImages:
+ # no need to extract sub-image, keep all in this Image object
+ m.extend(m._BUF_[m._OFF_ : m._OFF_ + Size])
+ else:
+ # keep header in this Image object
+ m.extend(m._BUF_[m._OFF_ : m._OFF_ + m._HEADER_SIZE_])
+ #
+ # use new Image object to represent payload, which may be another kind
+ # of image such as PE32
+ #
+ PayloadOffset = m._HEADER_SIZE_
+ PayloadLen = m.Size - m._HEADER_SIZE_
+ Payload = m._SectionSubImages[m.Type]()
+ Payload.frombuffer(m._BUF_, m._OFF_ + m._HEADER_SIZE_, PayloadLen)
+ m._SubImages[PayloadOffset] = Payload
+
+ return Size
+
+ def _SetSize(m, Size):
+ Size1 = Size & 0xFF
+ Size2 = (Size & 0xFF00) >> 8
+ Size3 = (Size & 0xFF0000) >> 16
+ m.SetField(m._SIZE_, 0, Size1, Size2, Size3)
+
+ def _GetSize(m):
+ Size1, Size2, Size3 = m.GetField(m._SIZE_)
+ return Size1 + (Size2 << 8) + (Size3 << 16)
+
+ def _SetType(m, Type):
+ m.SetField(m._TYPE_, 0, Type)
+
+ def _GetType(m):
+ return m.GetField(m._TYPE_)[0]
+
+ def _GetAlignment(m):
+ return m._Alignment
+
+ def _SetAlignment(m, Alignment):
+ m._Alignment = Alignment
+ AlignmentMask = Alignment - 1
+ # section alignment is actually for payload, so we need to add header size
+ PayloadOffset = m._OFF_ + m._HEADER_SIZE_
+ if (PayloadOffset & (~AlignmentMask)) == 0:
+ return
+ NewOffset = (PayloadOffset + AlignmentMask) & (~AlignmentMask)
+ while (NewOffset - PayloadOffset) < m._HEADER_SIZE_:
+ NewOffset += m._Alignment
+
+ def tofile(m, f):
+ m.Size = len(m)
+ Image.tofile(m, f)
+ for Offset in m._SubImages:
+ m._SubImages[Offset].tofile(f)
+
+ Type = property(_GetType, _SetType)
+ Size = property(_GetSize, _SetSize)
+ Alignment = property(_GetAlignment, _SetAlignment)
+ # SubTypeGuid = property(_GetGuid, _SetGuid)
+
+## PadSection() class
+#
+# A class for Pad Section
+#
+class PadSection(Section):
+ def __init__(m, Size):
+ Section.__init__(m)
+ m.Type = 0x19
+ m.Size = Size
+ m.Data = [0] * (Size - m._HEADER_SIZE_)
+
+## Ffs() class
+#
+# A class for Ffs Section
+#
+class Ffs(Image):
+ _FfsFormat = "24B%(payload_size)sB"
+ # skip IntegrityCheck
+ _HEADER_ = struct.Struct("1I2H8B 2x 1B 1B 3B 1B")
+ _HEADER_SIZE_ = _HEADER_.size
+
+ _NAME_ = struct.Struct("1I2H8B")
+ _INT_CHECK_ = struct.Struct("16x 1H")
+ _TYPE_ = struct.Struct("18x 1B")
+ _ATTR_ = struct.Struct("19x 1B")
+ _SIZE_ = struct.Struct("20x 3B")
+ _STATE_ = struct.Struct("23x 1B")
+
+ VTF_GUID = "1BA0062E-C779-4582-8566-336AE8F78F09"
+
+ FFS_ATTRIB_FIXED = 0x04
+ FFS_ATTRIB_DATA_ALIGNMENT = 0x38
+ FFS_ATTRIB_CHECKSUM = 0x40
+
+ _TypeName = {
+ 0x00 : "<unknown>",
+ 0x01 : "RAW",
+ 0x02 : "FREEFORM",
+ 0x03 : "SECURITY_CORE",
+ 0x04 : "PEI_CORE",
+ 0x05 : "DXE_CORE",
+ 0x06 : "PEIM",
+ 0x07 : "DRIVER",
+ 0x08 : "COMBINED_PEIM_DRIVER",
+ 0x09 : "APPLICATION",
+ 0x0A : "SMM",
+ 0x0B : "FIRMWARE_VOLUME_IMAGE",
+ 0x0C : "COMBINED_SMM_DXE",
+ 0x0D : "SMM_CORE",
+ 0xc0 : "OEM_MIN",
+ 0xdf : "OEM_MAX",
+ 0xe0 : "DEBUG_MIN",
+ 0xef : "DEBUG_MAX",
+ 0xf0 : "FFS_MIN",
+ 0xff : "FFS_MAX",
+ 0xf0 : "FFS_PAD",
+ }
+
+ def __init__(self):
+ Image.__init__(self)
+ self.FreeSpace = 0
+
+ self.Sections = sdict()
+ self.Depex = ''
+
+ self.__ID__ = None
+
+ def __str__(self):
+ global gIndention
+ gIndention += 4
+ Indention = ' ' * gIndention
+ FfsInfo = Indention
+ FfsInfo += "[FFS:%s] offset=%x size=%x guid=%s free_space=%x alignment=%s\n" % \
+ (Ffs._TypeName[self.Type], self._OFF_, self.Size, self.Guid, self.FreeSpace, self.Alignment)
+ SectionInfo = '\n'.join([str(self.Sections[Offset]) for Offset in self.Sections])
+ gIndention -= 4
+ return FfsInfo + SectionInfo + "\n"
+
+ def __len__(self):
+ return self.Size
+
+ def __repr__(self):
+ return self.__ID__
+
+ def _Unpack(self):
+ Size1, Size2, Size3 = self._SIZE_.unpack_from(self._BUF_, self._OFF_)
+ Size = Size1 + (Size2 << 8) + (Size3 << 16)
+ self.empty()
+ self.extend(self._BUF_[self._OFF_ : self._OFF_ + Size])
+
+ # Pad FFS may use the same GUID. We need to avoid it.
+ if self.Type == 0xf0:
+ self.__ID__ = str(uuid.uuid1()).upper()
+ else:
+ self.__ID__ = self.Guid
+
+ # Traverse the SECTION. RAW and PAD do not have sections
+ if self.Type not in [0xf0, 0x01] and Size > 0 and Size < 0xFFFFFF:
+ EndOfFfs = Size
+ SectionStartAddress = self._HEADER_SIZE_
+ while SectionStartAddress < EndOfFfs:
+ SectionObj = Section()
+ SectionObj.frombuffer(self, SectionStartAddress)
+ #f = open(repr(SectionObj), 'wb')
+ #SectionObj.Size = 0
+ #SectionObj.tofile(f)
+ #f.close()
+ self.Sections[SectionStartAddress] = SectionObj
+ SectionStartAddress += len(SectionObj)
+ SectionStartAddress = (SectionStartAddress + 3) & (~3)
+
+ def Pack(self):
+ pass
+
+ def SetFreeSpace(self, Size):
+ self.FreeSpace = Size
+
+ def _GetGuid(self):
+ return gGuidStringFormat % self.Name
+
+ def _SetName(self, Value):
+ # Guid1, Guid2, Guid3, Guid4, Guid5, Guid6, Guid7, Guid8, Guid9, Guid10, Guid11
+ self.SetField(self._NAME_, 0, Value)
+
+ def _GetName(self):
+ # Guid1, Guid2, Guid3, Guid4, Guid5, Guid6, Guid7, Guid8, Guid9, Guid10, Guid11
+ return self.GetField(self._NAME_)
+
+ def _SetSize(m, Size):
+ Size1 = Size & 0xFF
+ Size2 = (Size & 0xFF00) >> 8
+ Size3 = (Size & 0xFF0000) >> 16
+ m.SetField(m._SIZE_, 0, Size1, Size2, Size3)
+
+ def _GetSize(m):
+ Size1, Size2, Size3 = m.GetField(m._SIZE_)
+ return Size1 + (Size2 << 8) + (Size3 << 16)
+
+ def _SetType(m, Type):
+ m.SetField(m._TYPE_, 0, Type)
+
+ def _GetType(m):
+ return m.GetField(m._TYPE_)[0]
+
+ def _SetAttributes(self, Value):
+ self.SetField(m._ATTR_, 0, Value)
+
+ def _GetAttributes(self):
+ return self.GetField(self._ATTR_)[0]
+
+ def _GetFixed(self):
+ if (self.Attributes & self.FFS_ATTRIB_FIXED) != 0:
+ return True
+ return False
+
+ def _GetCheckSum(self):
+ if (self.Attributes & self.FFS_ATTRIB_CHECKSUM) != 0:
+ return True
+ return False
+
+ def _GetAlignment(self):
+ return (self.Attributes & self.FFS_ATTRIB_DATA_ALIGNMENT) >> 3
+
+ def _SetState(self, Value):
+ self.SetField(m._STATE_, 0, Value)
+
+ def _GetState(self):
+ return self.GetField(m._STATE_)[0]
+
+ Name = property(_GetName, _SetName)
+ Guid = property(_GetGuid)
+ Type = property(_GetType, _SetType)
+ Size = property(_GetSize, _SetSize)
+ Attributes = property(_GetAttributes, _SetAttributes)
+ Fixed = property(_GetFixed)
+ Checksum = property(_GetCheckSum)
+ Alignment = property(_GetAlignment)
+ State = property(_GetState, _SetState)
+
+## PeImage() class
+#
+# A class for PE Image
+#
+class PeImage:
+ #
+ # just extract e_lfanew
+ #
+ _DosHeaderFormat = "60x 1I"
+ #
+ # Machine
+ # NumberOfSections
+ # SizeOfOptionalHeader
+ #
+ _FileHeaderFormat = "4x 1H 1H 4x 4x 4x 1H 2x"
+ #
+ # Magic
+ # SizeOfImage
+ # SizeOfHeaders
+ # CheckSum
+ # NumberOfRvaAndSizes
+ #
+ _OptionalHeader32Format = "1H 54x 1I 1I 1I 24x 1I"
+ _OptionalHeader64Format = ""
+ def __init__(self, Buf, Offset, Size):
+ self.Offset = Offset
+ self.Size = Size
+ self.Machine = 0x014c # IA32
+ self.NumberOfSections = 0
+ self.SizeOfImage = 0
+ self.SizeOfOptionalHeader = 0
+ self.Checksum = 0
+ self._PeImageBuf = Buf
+ self._SectionList = []
+
+ self._DosHeader = struct.Struct(PeImage._DosHeaderFormat)
+ self._FileHeader = struct.Struct(PeImage._FileHeaderFormat)
+ self._OptionalHeader32 = struct.Struct(PeImage._OptionalHeader32Format)
+
+ self.Buffer = None
+
+ self._Unpack()
+
+ def __str__(self):
+ pass
+
+ def __len__(self):
+ return self.Size
+
+ def _Unpack(self):
+ # from DOS header, get the offset of PE header
+ FileHeaderOffset, = self._DosHeader.unpack_from(self._PeImageBuf, self.Offset)
+ if FileHeaderOffset < struct.calcsize(self._DosHeaderFormat):
+ EdkLogger.error("PE+", 0, "Invalid offset of IMAGE_FILE_HEADER: %s" % FileHeaderOffset)
+
+ # from FILE header, get the optional header size
+ self.Machine, self.NumberOfSections, self.SizeOfOptionalHeader = \
+ self._FileHeader.unpack_from(self._PeImageBuf, self.Offset + FileHeaderOffset)
+
+ print "Machine=%x NumberOfSections=%x SizeOfOptionalHeader=%x" % (self.Machine, self.NumberOfSections, self.SizeOfOptionalHeader)
+ # optional header follows the FILE header
+ OptionalHeaderOffset = FileHeaderOffset + struct.calcsize(self._FileHeaderFormat)
+ Magic, self.SizeOfImage, SizeOfHeaders, self.Checksum, NumberOfRvaAndSizes = \
+ self._OptionalHeader32.unpack_from(self._PeImageBuf, self.Offset + OptionalHeaderOffset)
+ print "Magic=%x SizeOfImage=%x SizeOfHeaders=%x, Checksum=%x, NumberOfRvaAndSizes=%x" % (Magic, self.SizeOfImage, SizeOfHeaders, self.Checksum, NumberOfRvaAndSizes)
+
+ PeImageSectionTableOffset = OptionalHeaderOffset + self.SizeOfOptionalHeader
+ PeSections = PeSectionTable(self._PeImageBuf, self.Offset + PeImageSectionTableOffset, self.NumberOfSections)
+
+ print "%x" % PeSections.GetFileAddress(0x3920)
+
+## PeSectionTable() class
+#
+# A class for PE Section Table
+#
+class PeSectionTable:
+ def __init__(self, Buf, Offset, NumberOfSections):
+ self._SectionList = []
+
+ SectionHeaderOffset = Offset
+ for TableIndex in range(0, NumberOfSections):
+ SectionHeader = PeSectionHeader(Buf, SectionHeaderOffset)
+ self._SectionList.append(SectionHeader)
+ SectionHeaderOffset += len(SectionHeader)
+ print SectionHeader
+
+ def GetFileAddress(self, Rva):
+ for PeSection in self._SectionList:
+ if Rva in PeSection:
+ return PeSection[Rva]
+
+## PeSectionHeader() class
+#
+# A class for PE Section Header
+#
+class PeSectionHeader:
+ #
+ # VirtualAddress
+ # SizeOfRawData
+ # PointerToRawData
+ #
+ _HeaderFormat = "12x 1I 1I 1I 16x"
+ _HeaderLength = struct.calcsize(_HeaderFormat)
+
+ def __init__(self, Buf, Offset):
+ self.VirtualAddressStart, self.SizeOfRawData, self.PointerToRawData = \
+ struct.unpack_from(self._HeaderFormat, Buf, Offset)
+ self.VirtualAddressEnd = self.VirtualAddressStart + self.SizeOfRawData - 1
+
+ def __str__(self):
+ return "VirtualAddress=%x, SizeOfRawData=%x, PointerToRawData=%x" % (self.VirtualAddressStart, self.SizeOfRawData, self.PointerToRawData)
+
+ def __len__(self):
+ return self._HeaderLength
+
+ def __contains__(self, Rva):
+ return Rva >= self.VirtualAddressStart and Rva <= self.VirtualAddressEnd
+
+ def __getitem__(self, Rva):
+ return Rva - self.VirtualAddressStart + self.PointerToRawData
+
+## LinkMap() class
+#
+# A class for Link Map
+#
+class LinkMap:
+ _StartFlag = {
+ "MSFT" : re.compile("Address +Publics by Value +Rva\+Base +Lib:Object"),
+ "GCC" : re.compile("^\.(text|bss|data|edata)"),
+ }
+
+ _MappingFormat = {
+ "MSFT" : re.compile("([0-9a-f]+):([0-9a-f]+)\s+_+([0-9A-Za-z]+)\s+([0-9a-f]+)\s+"),
+ "GCC" : re.compile("^(\.\w)?\s+(0x[0-9a-f]+)\s+_+([0-9A-Za-z]+)"),
+ }
+
+ def __init__(self, MapFile, MapType="MSFT"):
+ self.File = MapFile
+ self.MapType = MapType
+ self._Globals = {} # global:RVA
+
+ self._Parse()
+
+ def _Parse(self):
+ MapFile = open(self.File, 'r')
+ MappingTitle = self._StartFlag[self.MapType]
+ MappingFormat = self._MappingFormat[self.MapType]
+ MappingStart = False
+ try:
+ for Line in MapFile:
+ Line = Line.strip()
+ if not MappingStart:
+ if MappingTitle.match(Line) != None:
+ MappingStart = True
+ continue
+ ResultList = MappingFormat.findall(Line)
+ if len(ResultList) == 0 or len(ResultList[0]) != 4:
+ continue
+ self._Globals[ResultList[2]] = int(ResultList[3], 16)
+ EdkLogger.verbose(ResultList[0])
+ finally:
+ MapFile.close()
+
+ def __contains__(self, Var):
+ return Var in self._Globals
+
+ def __getitem__(self, Var):
+ if Var not in self._Globals:
+ return None
+ return self._Globals[Var]
+
+## MultipleFv() class
+#
+# A class for Multiple FV
+#
+class MultipleFv(FirmwareVolume):
+ def __init__(self, FvList):
+ FirmwareVolume.__init__(self)
+ self.BasicInfo = []
+ for FvPath in FvList:
+ FvName = os.path.splitext(os.path.split(FvPath)[1])[0]
+ Fd = open(FvPath, 'rb')
+ Buf = array('B')
+ try:
+ Buf.fromfile(Fd, os.path.getsize(FvPath))
+ except EOFError:
+ pass
+
+ Fv = FirmwareVolume(FvName)
+ Fv.frombuffer(Buf, 0, len(Buf))
+
+ self.BasicInfo.append([Fv.Name, Fv.FileSystemGuid, Fv.Size])
+ self.FfsDict.append(Fv.FfsDict)
+
+# Version and Copyright
+__version_number__ = "0.01"
+__version__ = "%prog Version " + __version_number__
+__copyright__ = "Copyright (c) 2008, Intel Corporation. All rights reserved."
+
+## Parse command line options
+#
+# Using standard Python module optparse to parse command line option of this tool.
+#
+# @retval Options A optparse.Values object containing the parsed options
+# @retval InputFile Path of file to be trimmed
+#
+def GetOptions():
+ OptionList = [
+ make_option("-a", "--arch", dest="Arch",
+ help="The input file is preprocessed source code, including C or assembly code"),
+ make_option("-p", "--platform", dest="ActivePlatform",
+ help="The input file is preprocessed VFR file"),
+ make_option("-m", "--module", dest="ActiveModule",
+ help="Convert standard hex format (0xabcd) to MASM format (abcdh)"),
+ make_option("-f", "--FDF-file", dest="FdfFile",
+ help="Convert standard hex format (0xabcd) to MASM format (abcdh)"),
+ make_option("-o", "--output", dest="OutputDirectory",
+ help="File to store the trimmed content"),
+ make_option("-t", "--toolchain-tag", dest="ToolChain",
+ help=""),
+ make_option("-k", "--msft", dest="MakefileType", action="store_const", const="nmake",
+ help=""),
+ make_option("-g", "--gcc", dest="MakefileType", action="store_const", const="gmake",
+ help=""),
+ make_option("-v", "--verbose", dest="LogLevel", action="store_const", const=EdkLogger.VERBOSE,
+ help="Run verbosely"),
+ make_option("-d", "--debug", dest="LogLevel", type="int",
+ help="Run with debug information"),
+ make_option("-q", "--quiet", dest="LogLevel", action="store_const", const=EdkLogger.QUIET,
+ help="Run quietly"),
+ make_option("-?", action="help", help="show this help message and exit"),
+ ]
+
+ # use clearer usage to override default usage message
+ UsageString = "%prog [-a ARCH] [-p PLATFORM] [-m MODULE] [-t TOOLCHAIN_TAG] [-k] [-g] [-v|-d <debug_level>|-q] [-o <output_directory>] [GenC|GenMake]"
+
+ Parser = OptionParser(description=__copyright__, version=__version__, option_list=OptionList, usage=UsageString)
+ Parser.set_defaults(Arch=[])
+ Parser.set_defaults(ActivePlatform=None)
+ Parser.set_defaults(ActiveModule=None)
+ Parser.set_defaults(OutputDirectory="build")
+ Parser.set_defaults(FdfFile=None)
+ Parser.set_defaults(ToolChain="MYTOOLS")
+ if sys.platform == "win32":
+ Parser.set_defaults(MakefileType="nmake")
+ else:
+ Parser.set_defaults(MakefileType="gmake")
+ Parser.set_defaults(LogLevel=EdkLogger.INFO)
+
+ Options, Args = Parser.parse_args()
+
+ # error check
+ if len(Args) == 0:
+ Options.Target = "genmake"
+ sys.argv.append("genmake")
+ elif len(Args) == 1:
+ Options.Target = Args[0].lower()
+ if Options.Target not in ["genc", "genmake"]:
+ EdkLogger.error("AutoGen", OPTION_NOT_SUPPORTED, "Not supported target",
+ ExtraData="%s\n\n%s" % (Options.Target, Parser.get_usage()))
+ else:
+ EdkLogger.error("AutoGen", OPTION_NOT_SUPPORTED, "Too many targets",
+ ExtraData=Parser.get_usage())
+
+ return Options
+
+## Entrance method
+#
+# This method mainly dispatch specific methods per the command line options.
+# If no error found, return zero value so the caller of this tool can know
+# if it's executed successfully or not.
+#
+# @retval 0 Tool was successful
+# @retval 1 Tool failed
+#
+def Main():
+ from build import build
+ try:
+ Option = GetOptions()
+ build.main()
+ except Exception, e:
+ print e
+ return 1
+
+ return 0
+
+# This acts like the main() function for the script, unless it is 'import'ed into another script.
+if __name__ == '__main__':
+ EdkLogger.Initialize()
+ # sys.exit(Main())
+
+ if len(sys.argv) > 1:
+ FilePath = sys.argv[1]
+ if FilePath.lower().endswith(".fv"):
+ fd = open(FilePath, 'rb')
+ buf = array('B')
+ try:
+ buf.fromfile(fd, os.path.getsize(FilePath))
+ except EOFError:
+ pass
+
+ fv = FirmwareVolume("FVRECOVERY")
+ fv.frombuffer(buf, 0, len(buf))
+ #fv.Dispatch(None)
+ print fv
+ elif FilePath.endswith(".efi"):
+ fd = open(FilePath, 'rb')
+ buf = array('B')
+ Size = os.path.getsize(FilePath)
+
+ try:
+ buf.fromfile(fd, Size)
+ except EOFError:
+ pass
+
+ PeSection = Section(Type=0x10)
+ PeSection.Data = buf
+ sf, ext = os.path.splitext(os.path.basename(FilePath))
+ sf += ".sec"
+ PeSection.tofile(open(sf, 'wb'))
+ elif FilePath.endswith(".map"):
+ mf = LinkMap(FilePath)
diff --git a/BaseTools/Source/Python/Eot/InfParserLite.py b/BaseTools/Source/Python/Eot/InfParserLite.py
new file mode 100644
index 0000000000..06f775f803
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/InfParserLite.py
@@ -0,0 +1,171 @@
+## @file
+# This file is used to parse INF file of EDK project
+#
+# Copyright (c) 2008 - 2010 Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import os
+import Common.EdkLogger as EdkLogger
+from Common.DataType import *
+from CommonDataClass.DataClass import *
+from Common.Identification import *
+from Common.String import *
+from Parser import *
+import Database
+
+## EdkInfParser() class
+#
+# This class defined basic INF object which is used by inheriting
+#
+# @param object: Inherited from object class
+#
+class EdkInfParser(object):
+ ## The constructor
+ #
+ # @param self: The object pointer
+ # @param Filename: INF file name
+ # @param Database: Eot database
+ # @param SourceFileList: A list for all source file belonging this INF file
+ # @param SourceOverridePath: Override path for source file
+ # @param Edk_Source: Envirnoment variable EDK_SOURCE
+ # @param Efi_Source: Envirnoment variable EFI_SOURCE
+ #
+ def __init__(self, Filename = None, Database = None, SourceFileList = None, SourceOverridePath = None, Edk_Source = None, Efi_Source = None):
+ self.Identification = Identification()
+ self.Sources = []
+ self.Macros = {}
+
+ self.Cur = Database.Cur
+ self.TblFile = Database.TblFile
+ self.TblInf = Database.TblInf
+ self.FileID = -1
+ self.SourceOverridePath = SourceOverridePath
+
+ # Load Inf file if filename is not None
+ if Filename != None:
+ self.LoadInfFile(Filename)
+
+ if SourceFileList:
+ for Item in SourceFileList:
+ self.TblInf.Insert(MODEL_EFI_SOURCE_FILE, Item, '', '', '', '', 'COMMON', -1, self.FileID, -1, -1, -1, -1, 0)
+
+
+ ## LoadInffile() method
+ #
+ # Load INF file and insert a record in database
+ #
+ # @param self: The object pointer
+ # @param Filename: Input value for filename of Inf file
+ #
+ def LoadInfFile(self, Filename = None):
+ # Insert a record for file
+ Filename = NormPath(Filename)
+ self.Identification.FileFullPath = Filename
+ (self.Identification.FileRelativePath, self.Identification.FileName) = os.path.split(Filename)
+
+ self.FileID = self.TblFile.InsertFile(Filename, MODEL_FILE_INF)
+
+ self.ParseInf(PreProcess(Filename, False), self.Identification.FileRelativePath, Filename)
+
+ ## ParserSource() method
+ #
+ # Parse Source section and insert records in database
+ #
+ # @param self: The object pointer
+ # @param CurrentSection: current section name
+ # @param SectionItemList: the item belonging current section
+ # @param ArchList: A list for arch for this section
+ # @param ThirdList: A list for third item for this section
+ #
+ def ParserSource(self, CurrentSection, SectionItemList, ArchList, ThirdList):
+ for Index in range(0, len(ArchList)):
+ Arch = ArchList[Index]
+ Third = ThirdList[Index]
+ if Arch == '':
+ Arch = TAB_ARCH_COMMON
+
+ for Item in SectionItemList:
+ if CurrentSection.upper() == 'defines'.upper():
+ (Name, Value) = AddToSelfMacro(self.Macros, Item[0])
+ self.TblInf.Insert(MODEL_META_DATA_HEADER, Name, Value, Third, '', '', Arch, -1, self.FileID, Item[1], -1, Item[1], -1, 0)
+
+ ## ParseInf() method
+ #
+ # Parse INF file and get sections information
+ #
+ # @param self: The object pointer
+ # @param Lines: contents of INF file
+ # @param FileRelativePath: relative path of the file
+ # @param Filename: file name of INF file
+ #
+ def ParseInf(self, Lines = [], FileRelativePath = '', Filename = ''):
+ IfDefList, SectionItemList, CurrentSection, ArchList, ThirdList, IncludeFiles = \
+ [], [], TAB_UNKNOWN, [], [], []
+ LineNo = 0
+
+ for Line in Lines:
+ LineNo = LineNo + 1
+ if Line == '':
+ continue
+ if Line.startswith(TAB_SECTION_START) and Line.endswith(TAB_SECTION_END):
+ self.ParserSource(CurrentSection, SectionItemList, ArchList, ThirdList)
+
+ # Parse the new section
+ SectionItemList = []
+ ArchList = []
+ ThirdList = []
+ # Parse section name
+ CurrentSection = ''
+ LineList = GetSplitValueList(Line[len(TAB_SECTION_START):len(Line) - len(TAB_SECTION_END)], TAB_COMMA_SPLIT)
+ for Item in LineList:
+ ItemList = GetSplitValueList(Item, TAB_SPLIT)
+ if CurrentSection == '':
+ CurrentSection = ItemList[0]
+ else:
+ if CurrentSection != ItemList[0]:
+ EdkLogger.error("Parser", PARSER_ERROR, "Different section names '%s' and '%s' are found in one section definition, this is not allowed." % (CurrentSection, ItemList[0]), File=Filename, Line=LineNo)
+ ItemList.append('')
+ ItemList.append('')
+ if len(ItemList) > 5:
+ RaiseParserError(Line, CurrentSection, Filename, '', LineNo)
+ else:
+ ArchList.append(ItemList[1].upper())
+ ThirdList.append(ItemList[2])
+
+ continue
+
+ # Add a section item
+ SectionItemList.append([Line, LineNo])
+ # End of parse
+
+ self.ParserSource(CurrentSection, SectionItemList, ArchList, ThirdList)
+ #End of For
+
+##
+#
+# This acts like the main() function for the script, unless it is 'import'ed into another
+# script.
+#
+if __name__ == '__main__':
+ EdkLogger.Initialize()
+ EdkLogger.SetLevel(EdkLogger.QUIET)
+
+ Db = Database.Database('Inf.db')
+ Db.InitDatabase()
+ P = EdkInfParser(os.path.normpath("C:\Framework\Edk\Sample\Platform\Nt32\Dxe\PlatformBds\PlatformBds.inf"), Db, '', '')
+ for Inf in P.Sources:
+ print Inf
+ for Item in P.Macros:
+ print Item, P.Macros[Item]
+
+ Db.Close() \ No newline at end of file
diff --git a/BaseTools/Source/Python/Eot/LzmaCompressor.pyd b/BaseTools/Source/Python/Eot/LzmaCompressor.pyd
new file mode 100644
index 0000000000..d792a7e9fb
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/LzmaCompressor.pyd
Binary files differ
diff --git a/BaseTools/Source/Python/Eot/Parser.py b/BaseTools/Source/Python/Eot/Parser.py
new file mode 100644
index 0000000000..6850c8d32a
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/Parser.py
@@ -0,0 +1,848 @@
+## @file
+# This file is used to define common parsing related functions used in parsing
+# Inf/Dsc/Makefile process
+#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import os, re
+import Common.EdkLogger as EdkLogger
+from Common.DataType import *
+from CommonDataClass.DataClass import *
+from Common.String import CleanString, GetSplitValueList, ReplaceMacro
+import EotGlobalData
+from Common.Misc import sdict
+
+## PreProcess() method
+#
+# Pre process a file
+#
+# 1. Remove all comments
+# 2. Merge multiple lines code to one line
+#
+# @param Filename: Name of the file to be parsed
+# @param MergeMultipleLines: Switch for if merge multiple lines
+# @param LineNo: Default line no
+#
+# @return Lines: The file contents after remvoing comments
+#
+def PreProcess(Filename, MergeMultipleLines = True, LineNo = -1):
+ Lines = []
+ Filename = os.path.normpath(Filename)
+ if not os.path.isfile(Filename):
+ EdkLogger.error("Eot", EdkLogger.FILE_NOT_FOUND, ExtraData=Filename)
+
+ IsFindBlockComment = False
+ IsFindBlockCode = False
+ ReservedLine = ''
+ ReservedLineLength = 0
+ for Line in open(Filename, 'r'):
+ Line = Line.strip()
+ # Remove comment block
+ if Line.find(TAB_COMMENT_R8_START) > -1:
+ ReservedLine = GetSplitValueList(Line, TAB_COMMENT_R8_START, 1)[0]
+ IsFindBlockComment = True
+ if Line.find(TAB_COMMENT_R8_END) > -1:
+ Line = ReservedLine + GetSplitValueList(Line, TAB_COMMENT_R8_END, 1)[1]
+ ReservedLine = ''
+ IsFindBlockComment = False
+ if IsFindBlockComment:
+ Lines.append('')
+ continue
+
+ # Remove comments at tail and remove spaces again
+ Line = CleanString(Line)
+ if Line == '':
+ Lines.append('')
+ continue
+
+ if MergeMultipleLines:
+ # Add multiple lines to one line
+ if IsFindBlockCode and Line[-1] != TAB_SLASH:
+ ReservedLine = (ReservedLine + TAB_SPACE_SPLIT + Line).strip()
+ Lines.append(ReservedLine)
+ for Index in (0, ReservedLineLength):
+ Lines.append('')
+ ReservedLine = ''
+ ReservedLineLength = 0
+ IsFindBlockCode = False
+ continue
+ if Line[-1] == TAB_SLASH:
+ ReservedLine = ReservedLine + TAB_SPACE_SPLIT + Line[0:-1].strip()
+ ReservedLineLength = ReservedLineLength + 1
+ IsFindBlockCode = True
+ continue
+
+ Lines.append(Line)
+
+ return Lines
+
+## AddToGlobalMacro() method
+#
+# Add a macro to EotGlobalData.gMACRO
+#
+# @param Name: Name of the macro
+# @param Value: Value of the macro
+#
+def AddToGlobalMacro(Name, Value):
+ Value = ReplaceMacro(Value, EotGlobalData.gMACRO, True)
+ EotGlobalData.gMACRO[Name] = Value
+
+## AddToSelfMacro() method
+#
+# Parse a line of macro definition and add it to a macro set
+#
+# @param SelfMacro: The self macro set
+# @param Line: The line of a macro definition
+#
+# @return Name: Name of macro
+# @return Value: Value of macro
+#
+def AddToSelfMacro(SelfMacro, Line):
+ Name, Value = '', ''
+ List = GetSplitValueList(Line, TAB_EQUAL_SPLIT, 1)
+ if len(List) == 2:
+ Name = List[0]
+ Value = List[1]
+ Value = ReplaceMacro(Value, EotGlobalData.gMACRO, True)
+ Value = ReplaceMacro(Value, SelfMacro, True)
+ SelfMacro[Name] = Value
+
+ return (Name, Value)
+
+## GetIncludeListOfFile() method
+#
+# Get the include path list for a source file
+#
+# 1. Find the source file belongs to which INF file
+# 2. Find the inf's package
+# 3. Return the include path list of the package
+#
+# @param WorkSpace: WORKSPACE path
+# @param Filepath: File path
+# @param Db: Eot database
+#
+# @return IncludeList: A list of include directories
+#
+def GetIncludeListOfFile(WorkSpace, Filepath, Db):
+ IncludeList = []
+ Filepath = os.path.normpath(Filepath)
+ SqlCommand = """
+ select Value1 from Inf where Model = %s and BelongsToFile in(
+ select distinct B.BelongsToFile from File as A left join Inf as B
+ where A.ID = B.BelongsToFile and B.Model = %s and (A.Path || '%s' || B.Value1) = '%s')""" \
+ % (MODEL_META_DATA_PACKAGE, MODEL_EFI_SOURCE_FILE, '\\', Filepath)
+ RecordSet = Db.TblFile.Exec(SqlCommand)
+ for Record in RecordSet:
+ DecFullPath = os.path.normpath(os.path.join(WorkSpace, Record[0]))
+ (DecPath, DecName) = os.path.split(DecFullPath)
+ SqlCommand = """select Value1 from Dec where BelongsToFile =
+ (select ID from File where FullPath = '%s') and Model = %s""" \
+ % (DecFullPath, MODEL_EFI_INCLUDE)
+ NewRecordSet = Db.TblDec.Exec(SqlCommand)
+ for NewRecord in NewRecordSet:
+ IncludePath = os.path.normpath(os.path.join(DecPath, NewRecord[0]))
+ if IncludePath not in IncludeList:
+ IncludeList.append(IncludePath)
+
+ return IncludeList
+
+## GetTableList() method
+#
+# Search table file and find all small tables
+#
+# @param FileModelList: Model code for the file list
+# @param Table: Table to insert records
+# @param Db: Eot database
+#
+# @return TableList: A list of tables
+#
+def GetTableList(FileModelList, Table, Db):
+ TableList = []
+ SqlCommand = """select ID, FullPath from File where Model in %s""" % str(FileModelList)
+ RecordSet = Db.TblFile.Exec(SqlCommand)
+ for Record in RecordSet:
+ TableName = Table + str(Record[0])
+ TableList.append([TableName, Record[1]])
+
+ return TableList
+
+## GetAllIncludeDir() method
+#
+# Find all Include directories
+#
+# @param Db: Eot database
+#
+# @return IncludeList: A list of include directories
+#
+def GetAllIncludeDirs(Db):
+ IncludeList = []
+ SqlCommand = """select distinct Value1 from Inf where Model = %s order by Value1""" % MODEL_EFI_INCLUDE
+ RecordSet = Db.TblInf.Exec(SqlCommand)
+
+ for Record in RecordSet:
+ IncludeList.append(Record[0])
+
+ return IncludeList
+
+## GetAllIncludeFiles() method
+#
+# Find all Include files
+#
+# @param Db: Eot database
+#
+# @return IncludeFileList: A list of include files
+#
+def GetAllIncludeFiles(Db):
+ IncludeList = GetAllIncludeDirs(Db)
+ IncludeFileList = []
+
+ for Dir in IncludeList:
+ if os.path.isdir(Dir):
+ SubDir = os.listdir(Dir)
+ for Item in SubDir:
+ if os.path.isfile(Item):
+ IncludeFileList.append(Item)
+
+ return IncludeFileList
+
+## GetAllSourceFiles() method
+#
+# Find all source files
+#
+# @param Db: Eot database
+#
+# @return SourceFileList: A list of source files
+#
+def GetAllSourceFiles(Db):
+ SourceFileList = []
+ SqlCommand = """select distinct Value1 from Inf where Model = %s order by Value1""" % MODEL_EFI_SOURCE_FILE
+ RecordSet = Db.TblInf.Exec(SqlCommand)
+
+ for Record in RecordSet:
+ SourceFileList.append(Record[0])
+
+ return SourceFileList
+
+## GetAllFiles() method
+#
+# Find all files, both source files and include files
+#
+# @param Db: Eot database
+#
+# @return FileList: A list of files
+#
+def GetAllFiles(Db):
+ FileList = []
+ IncludeFileList = GetAllIncludeFiles(Db)
+ SourceFileList = GetAllSourceFiles(Db)
+ for Item in IncludeFileList:
+ if os.path.isfile(Item) and Item not in FileList:
+ FileList.append(Item)
+ for Item in SourceFileList:
+ if os.path.isfile(Item) and Item not in FileList:
+ FileList.append(Item)
+
+ return FileList
+
+## ParseConditionalStatement() method
+#
+# Parse conditional statement
+#
+# @param Line: One line to be parsed
+# @param Macros: A set of all macro
+# @param StatusSet: A set of all status
+#
+# @retval True: Find keyword of conditional statement
+# @retval False: Not find keyword of conditional statement
+#
+def ParseConditionalStatement(Line, Macros, StatusSet):
+ NewLine = Line.upper()
+ if NewLine.find(TAB_IF_EXIST.upper()) > -1:
+ IfLine = Line[NewLine.find(TAB_IF_EXIST) + len(TAB_IF_EXIST) + 1:].strip()
+ IfLine = ReplaceMacro(IfLine, EotGlobalData.gMACRO, True)
+ IfLine = ReplaceMacro(IfLine, Macros, True)
+ IfLine = IfLine.replace("\"", '')
+ IfLine = IfLine.replace("(", '')
+ IfLine = IfLine.replace(")", '')
+ Status = os.path.exists(os.path.normpath(IfLine))
+ StatusSet.append([Status])
+ return True
+ if NewLine.find(TAB_IF_DEF.upper()) > -1:
+ IfLine = Line[NewLine.find(TAB_IF_DEF) + len(TAB_IF_DEF) + 1:].strip()
+ Status = False
+ if IfLine in Macros or IfLine in EotGlobalData.gMACRO:
+ Status = True
+ StatusSet.append([Status])
+ return True
+ if NewLine.find(TAB_IF_N_DEF.upper()) > -1:
+ IfLine = Line[NewLine.find(TAB_IF_N_DEF) + len(TAB_IF_N_DEF) + 1:].strip()
+ Status = False
+ if IfLine not in Macros and IfLine not in EotGlobalData.gMACRO:
+ Status = True
+ StatusSet.append([Status])
+ return True
+ if NewLine.find(TAB_IF.upper()) > -1:
+ IfLine = Line[NewLine.find(TAB_IF) + len(TAB_IF) + 1:].strip()
+ Status = ParseConditionalStatementMacros(IfLine, Macros)
+ StatusSet.append([Status])
+ return True
+ if NewLine.find(TAB_ELSE_IF.upper()) > -1:
+ IfLine = Line[NewLine.find(TAB_ELSE_IF) + len(TAB_ELSE_IF) + 1:].strip()
+ Status = ParseConditionalStatementMacros(IfLine, Macros)
+ StatusSet[-1].append(Status)
+ return True
+ if NewLine.find(TAB_ELSE.upper()) > -1:
+ Status = False
+ for Item in StatusSet[-1]:
+ Status = Status or Item
+ StatusSet[-1].append(not Status)
+ return True
+ if NewLine.find(TAB_END_IF.upper()) > -1:
+ StatusSet.pop()
+ return True
+
+ return False
+
+## ParseConditionalStatement() method
+#
+# Parse conditional statement with Macros
+#
+# @param Line: One line to be parsed
+# @param Macros: A set of macros
+#
+# @return Line: New line after replacing macros
+#
+def ParseConditionalStatementMacros(Line, Macros):
+ if Line.upper().find('DEFINED(') > -1 or Line.upper().find('EXIST') > -1:
+ return False
+ Line = ReplaceMacro(Line, EotGlobalData.gMACRO, True)
+ Line = ReplaceMacro(Line, Macros, True)
+ Line = Line.replace("&&", "and")
+ Line = Line.replace("||", "or")
+ return eval(Line)
+
+## GetConditionalStatementStatus() method
+#
+# 1. Assume the latest status as True
+# 2. Pop the top status of status set, previous status
+# 3. Compare the latest one and the previous one and get new status
+#
+# @param StatusSet: A set of all status
+#
+# @return Status: The final status
+#
+def GetConditionalStatementStatus(StatusSet):
+ Status = True
+ for Item in StatusSet:
+ Status = Status and Item[-1]
+
+ return Status
+
+## SearchBelongsToFunction() method
+#
+# Search all functions belong to the file
+#
+# @param BelongsToFile: File id
+# @param StartLine: Start line of search scope
+# @param EndLine: End line of search scope
+#
+# @return: The found function
+#
+def SearchBelongsToFunction(BelongsToFile, StartLine, EndLine):
+ SqlCommand = """select ID, Name from Function where BelongsToFile = %s and StartLine <= %s and EndLine >= %s""" %(BelongsToFile, StartLine, EndLine)
+ RecordSet = EotGlobalData.gDb.TblFunction.Exec(SqlCommand)
+ if RecordSet != []:
+ return RecordSet[0][0], RecordSet[0][1]
+ else:
+ return -1, ''
+
+## SearchPpiCallFunction() method
+#
+# Search all used PPI calling function 'PeiServicesReInstallPpi' and 'PeiServicesInstallPpi'
+# Store the result to database
+#
+# @param Identifier: Table id
+# @param SourceFileID: Source file id
+# @param SourceFileFullPath: Source file full path
+# @param ItemMode: Mode of the item
+#
+def SearchPpiCallFunction(Identifier, SourceFileID, SourceFileFullPath, ItemMode):
+ ItemName, ItemType, GuidName, GuidMacro, GuidValue = '', 'Ppi', '', '', ''
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' and Model = %s)""" \
+ % (Identifier, 'PeiServicesReInstallPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ BelongsToFunctionID, BelongsToFunction = -1, ''
+ Db = EotGlobalData.gDb.TblReport
+ RecordSet = Db.Exec(SqlCommand)
+ for Record in RecordSet:
+ Index = 0
+ BelongsToFile, StartLine, EndLine = Record[2], Record[3], Record[4]
+ BelongsToFunctionID, BelongsToFunction = SearchBelongsToFunction(BelongsToFile, StartLine, EndLine)
+ VariableList = Record[0].split(',')
+ for Variable in VariableList:
+ Variable = Variable.strip()
+ # Get index of the variable
+ if Variable.find('[') > -1:
+ Index = int(Variable[Variable.find('[') + 1 : Variable.find(']')])
+ Variable = Variable[:Variable.find('[')]
+ # Get variable name
+ if Variable.startswith('&'):
+ Variable = Variable[1:]
+ # Get variable value
+ SqlCommand = """select Value from %s where (Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, Variable, MODEL_IDENTIFIER_VARIABLE)
+ NewRecordSet = Db.Exec(SqlCommand)
+ if NewRecordSet:
+ NewRecord = NewRecordSet[0][0]
+ VariableValueList = NewRecord.split('},')
+ if len(VariableValueList) > Index:
+ VariableValue = VariableValueList[Index]
+ NewVariableValueList = VariableValue.split(',')
+ if len(NewVariableValueList) > 1:
+ NewVariableValue = NewVariableValueList[1].strip()
+ if NewVariableValue.startswith('&'):
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, NewVariableValue[1:], GuidMacro, GuidValue, BelongsToFunction, 0)
+ continue
+ else:
+ EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, NewParameter))
+
+ ItemName, ItemType, GuidName, GuidMacro, GuidValue = '', 'Ppi', '', '', ''
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Value like '%%%s%%' and Model = %s)""" \
+ % (Identifier, 'PeiServicesInstallPpi', MODEL_IDENTIFIER_ASSIGNMENT_EXPRESSION)
+ BelongsToFunctionID, BelongsToFunction = -1, ''
+ Db = EotGlobalData.gDb.TblReport
+ RecordSet = Db.Exec(SqlCommand)
+
+ SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
+ where (Name like '%%%s%%' and Model = %s)""" \
+ % (Identifier, 'PeiServicesInstallPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)
+ Db = EotGlobalData.gDb.TblReport
+ RecordSet2 = Db.Exec(SqlCommand)
+
+ for Record in RecordSet + RecordSet2:
+ if Record == []:
+ continue
+ Index = 0
+ BelongsToFile, StartLine, EndLine = Record[2], Record[3], Record[4]
+ BelongsToFunctionID, BelongsToFunction = SearchBelongsToFunction(BelongsToFile, StartLine, EndLine)
+ Variable = Record[0].replace('PeiServicesInstallPpi', '').replace('(', '').replace(')', '').replace('&', '').strip()
+ Variable = Variable[Variable.find(',') + 1:].strip()
+ # Get index of the variable
+ if Variable.find('[') > -1:
+ Index = int(Variable[Variable.find('[') + 1 : Variable.find(']')])
+ Variable = Variable[:Variable.find('[')]
+ # Get variable name
+ if Variable.startswith('&'):
+ Variable = Variable[1:]
+ # Get variable value
+ SqlCommand = """select Value from %s where (Name like '%%%s%%') and Model = %s""" \
+ % (Identifier, Variable, MODEL_IDENTIFIER_VARIABLE)
+ NewRecordSet = Db.Exec(SqlCommand)
+ if NewRecordSet:
+ NewRecord = NewRecordSet[0][0]
+ VariableValueList = NewRecord.split('},')
+ if len(VariableValueList) > Index:
+ VariableValue = VariableValueList[Index]
+ NewVariableValueList = VariableValue.split(',')
+ if len(NewVariableValueList) > 1:
+ NewVariableValue = NewVariableValueList[1].strip()
+ if NewVariableValue.startswith('&'):
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, NewVariableValue[1:], GuidMacro, GuidValue, BelongsToFunction, 0)
+ continue
+ else:
+ EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, NewParameter))
+
+## SearchPpis() method
+#
+# Search all used PPI calling function
+# Store the result to database
+#
+# @param SqlCommand: SQL command statement
+# @param Table: Table id
+# @param SourceFileID: Source file id
+# @param SourceFileFullPath: Source file full path
+# @param ItemMode: Mode of the item
+# @param PpiMode: Mode of PPI
+#
+def SearchPpi(SqlCommand, Table, SourceFileID, SourceFileFullPath, ItemMode, PpiMode = 1):
+ ItemName, ItemType, GuidName, GuidMacro, GuidValue = '', 'Ppi', '', '', ''
+ BelongsToFunctionID, BelongsToFunction = -1, ''
+ Db = EotGlobalData.gDb.TblReport
+ RecordSet = Db.Exec(SqlCommand)
+ for Record in RecordSet:
+ Parameter = GetPpiParameter(Record[0], PpiMode)
+ BelongsToFile, StartLine, EndLine = Record[2], Record[3], Record[4]
+ # Get BelongsToFunction
+ BelongsToFunctionID, BelongsToFunction = SearchBelongsToFunction(BelongsToFile, StartLine, EndLine)
+
+ # Default is Not Found
+ IsFound = False
+
+ # For Consumed Ppi
+ if ItemMode == 'Consumed':
+ if Parameter.startswith('g'):
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, Parameter, GuidMacro, GuidValue, BelongsToFunction, 0)
+ else:
+ EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, Parameter))
+ continue
+
+ # Direct Parameter.Guid
+ SqlCommand = """select Value from %s where (Name like '%%%s.Guid%%' or Name like '%%%s->Guid%%') and Model = %s""" % (Table, Parameter, Parameter, MODEL_IDENTIFIER_ASSIGNMENT_EXPRESSION)
+ NewRecordSet = Db.Exec(SqlCommand)
+ for NewRecord in NewRecordSet:
+ GuidName = GetParameterName(NewRecord[0])
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
+ IsFound = True
+
+ # Defined Parameter
+ if not IsFound:
+ Key = Parameter
+ if Key.rfind(' ') > -1:
+ Key = Key[Key.rfind(' ') : ].strip().replace('&', '')
+ Value = FindKeyValue(EotGlobalData.gDb.TblFile, Table, Key)
+ List = GetSplitValueList(Value.replace('\n', ''), TAB_COMMA_SPLIT)
+ if len(List) > 1:
+ GuidName = GetParameterName(List[1])
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
+ IsFound = True
+
+ # A list Parameter
+ if not IsFound:
+ Start = Parameter.find('[')
+ End = Parameter.find(']')
+ if Start > -1 and End > -1 and Start < End:
+ try:
+ Index = int(Parameter[Start + 1 : End])
+ Parameter = Parameter[0 : Start]
+ SqlCommand = """select Value from %s where Name = '%s' and Model = %s""" % (Table, Parameter, MODEL_IDENTIFIER_VARIABLE)
+ NewRecordSet = Db.Exec(SqlCommand)
+ for NewRecord in NewRecordSet:
+ NewParameter = GetSplitValueList(NewRecord[0], '}')[Index]
+ GuidName = GetPpiParameter(NewParameter[NewParameter.find('{') : ])
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
+ IsFound = True
+ except Exception:
+ pass
+
+ # A External Parameter
+ if not IsFound:
+ SqlCommand = """select File.ID from Inf, File
+ where BelongsToFile = (select BelongsToFile from Inf where Value1 = '%s')
+ and Inf.Model = %s and Inf.Value1 = File.FullPath and File.Model = %s""" % (SourceFileFullPath, MODEL_EFI_SOURCE_FILE, MODEL_FILE_C)
+ NewRecordSet = Db.Exec(SqlCommand)
+ for NewRecord in NewRecordSet:
+ Table = 'Identifier' + str(NewRecord[0])
+ SqlCommand = """select Value from %s where Name = '%s' and Modifier = 'EFI_PEI_PPI_DESCRIPTOR' and Model = %s""" % (Table, Parameter, MODEL_IDENTIFIER_VARIABLE)
+ PpiSet = Db.Exec(SqlCommand)
+ if PpiSet != []:
+ GuidName = GetPpiParameter(PpiSet[0][0])
+ if GuidName != '':
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
+ IsFound = True
+ break
+
+ if not IsFound:
+ EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, Parameter))
+
+## SearchProtocols() method
+#
+# Search all used PROTOCOL calling function
+# Store the result to database
+#
+# @param SqlCommand: SQL command statement
+# @param Table: Table id
+# @param SourceFileID: Source file id
+# @param SourceFileFullPath: Source file full path
+# @param ItemMode: Mode of the item
+# @param ProtocolMode: Mode of PROTOCOL
+#
+def SearchProtocols(SqlCommand, Table, SourceFileID, SourceFileFullPath, ItemMode, ProtocolMode):
+ ItemName, ItemType, GuidName, GuidMacro, GuidValue = '', 'Protocol', '', '', ''
+ BelongsToFunctionID, BelongsToFunction = -1, ''
+ Db = EotGlobalData.gDb.TblReport
+ RecordSet = Db.Exec(SqlCommand)
+ for Record in RecordSet:
+ Parameter = ''
+ BelongsToFile, StartLine, EndLine = Record[2], Record[3], Record[4]
+ # Get BelongsToFunction
+ BelongsToFunctionID, BelongsToFunction = SearchBelongsToFunction(BelongsToFile, StartLine, EndLine)
+
+ # Default is Not Found
+ IsFound = False
+
+ if ProtocolMode == 0 or ProtocolMode == 1:
+ Parameter = GetProtocolParameter(Record[0], ProtocolMode)
+ if Parameter.startswith('g') or Parameter.endswith('Guid') or Parameter == 'ShellEnvProtocol' or Parameter == 'ShellInterfaceProtocol':
+ GuidName = GetParameterName(Parameter)
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
+ IsFound = True
+
+ if ProtocolMode == 2:
+ Protocols = GetSplitValueList(Record[0], TAB_COMMA_SPLIT)
+ for Protocol in Protocols:
+ if Protocol.startswith('&') and Protocol.endswith('Guid'):
+ GuidName = GetParameterName(Protocol)
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
+ IsFound = True
+ else:
+ NewValue = FindKeyValue(EotGlobalData.gDb.TblFile, Table, Protocol)
+ if Protocol != NewValue and NewValue.endswith('Guid'):
+ GuidName = GetParameterName(NewValue)
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
+ IsFound = True
+
+ if not IsFound:
+ if BelongsToFunction in EotGlobalData.gProducedProtocolLibrary or BelongsToFunction in EotGlobalData.gConsumedProtocolLibrary:
+ EotGlobalData.gOP_UN_MATCHED_IN_LIBRARY_CALLING.write('%s, %s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, Parameter, BelongsToFunction))
+ else:
+ EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, Parameter))
+
+## SearchFunctionCalling() method
+#
+# Search all used PPI/PROTOCOL calling function by library
+# Store the result to database
+#
+# @param SqlCommand: SQL command statement
+# @param Table: Table id
+# @param SourceFileID: Source file id
+# @param SourceFileFullPath: Source file full path
+# @param ItemType: Type of the item, PPI or PROTOCOL
+# @param ItemMode: Mode of item
+#
+def SearchFunctionCalling(Table, SourceFileID, SourceFileFullPath, ItemType, ItemMode):
+ LibraryList = sdict()
+ Db = EotGlobalData.gDb.TblReport
+ Parameters, ItemName, GuidName, GuidMacro, GuidValue, BelongsToFunction = [], '', '', '', '', ''
+ if ItemType == 'Protocol' and ItemMode == 'Produced':
+ LibraryList = EotGlobalData.gProducedProtocolLibrary
+ elif ItemType == 'Protocol' and ItemMode == 'Consumed':
+ LibraryList = EotGlobalData.gConsumedProtocolLibrary
+ elif ItemType == 'Protocol' and ItemMode == 'Callback':
+ LibraryList = EotGlobalData.gCallbackProtocolLibrary
+ elif ItemType == 'Ppi' and ItemMode == 'Produced':
+ LibraryList = EotGlobalData.gProducedPpiLibrary
+ elif ItemType == 'Ppi' and ItemMode == 'Consumed':
+ LibraryList = EotGlobalData.gConsumedPpiLibrary
+
+ for Library in LibraryList:
+ Index = LibraryList[Library]
+ SqlCommand = """select Value, StartLine from %s
+ where Name like '%%%s%%' and Model = %s""" \
+ % (Table, Library, MODEL_IDENTIFIER_FUNCTION_CALLING)
+ RecordSet = Db.Exec(SqlCommand)
+ for Record in RecordSet:
+ IsFound = False
+ if Index == -1:
+ ParameterList = GetSplitValueList(Record[0], TAB_COMMA_SPLIT)
+ for Parameter in ParameterList:
+ Parameters.append(GetParameterName(Parameter))
+ else:
+ Parameters = [GetProtocolParameter(Record[0], Index)]
+ StartLine = Record[1]
+ for Parameter in Parameters:
+ if Parameter.startswith('g') or Parameter.endswith('Guid') or Parameter == 'ShellEnvProtocol' or Parameter == 'ShellInterfaceProtocol':
+ GuidName = GetParameterName(Parameter)
+ Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
+ IsFound = True
+
+ if not IsFound:
+ EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, Parameter))
+
+## FindProtocols() method
+#
+# Find defined protocols
+#
+# @param SqlCommand: SQL command statement
+# @param Table: Table id
+# @param SourceFileID: Source file id
+# @param SourceFileFullPath: Source file full path
+# @param ItemName: String of protocol definition
+# @param ItemType: Type of the item, PPI or PROTOCOL
+# @param ItemMode: Mode of item
+#
+#def FindProtocols(Db, SqlCommand, Table, SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue):
+# BelongsToFunction = ''
+# RecordSet = Db.Exec(SqlCommand)
+# for Record in RecordSet:
+# IsFound = True
+# Parameter = GetProtocolParameter(Record[0])
+
+## GetProtocolParameter() method
+#
+# Parse string of protocol and find parameters
+#
+# @param Parameter: Parameter to be parsed
+# @param Index: The index of the parameter
+#
+# @return: call common GetParameter
+#
+def GetProtocolParameter(Parameter, Index = 1):
+ return GetParameter(Parameter, Index)
+
+## GetPpiParameter() method
+#
+# Parse string of ppi and find parameters
+#
+# @param Parameter: Parameter to be parsed
+# @param Index: The index of the parameter
+#
+# @return: call common GetParameter
+#
+def GetPpiParameter(Parameter, Index = 1):
+ return GetParameter(Parameter, Index)
+
+## GetParameter() method
+#
+# Get a parameter by index
+#
+# @param Parameter: Parameter to be parsed
+# @param Index: The index of the parameter
+#
+# @return Parameter: The found parameter
+#
+def GetParameter(Parameter, Index = 1):
+ ParameterList = GetSplitValueList(Parameter, TAB_COMMA_SPLIT)
+ if len(ParameterList) > Index:
+ Parameter = GetParameterName(ParameterList[Index])
+
+ return Parameter
+
+ return ''
+
+## GetParameterName() method
+#
+# Get a parameter name
+#
+# @param Parameter: Parameter to be parsed
+#
+# @return: The name of parameter
+#
+def GetParameterName(Parameter):
+ if type(Parameter) == type('') and Parameter.startswith('&'):
+ return Parameter[1:].replace('{', '').replace('}', '').replace('\r', '').replace('\n', '').strip()
+ else:
+ return Parameter.strip()
+
+## FindKeyValue() method
+#
+# Find key value of a variable
+#
+# @param Db: Database to be searched
+# @param Table: Table to be searched
+# @param Key: The keyword
+#
+# @return Value: The value of the the keyword
+#
+def FindKeyValue(Db, Table, Key):
+ SqlCommand = """select Value from %s where Name = '%s' and (Model = %s or Model = %s)""" % (Table, Key, MODEL_IDENTIFIER_VARIABLE, MODEL_IDENTIFIER_ASSIGNMENT_EXPRESSION)
+ RecordSet = Db.Exec(SqlCommand)
+ Value = ''
+ for Record in RecordSet:
+ if Record[0] != 'NULL':
+ Value = FindKeyValue(Db, Table, GetParameterName(Record[0]))
+
+ if Value != '':
+ return Value
+ else:
+ return Key
+
+## ParseMapFile() method
+#
+# Parse map files to get a dict of 'ModuleName' : {FunName : FunAddress}
+#
+# @param Files: A list of map files
+#
+# @return AllMaps: An object of all map files
+#
+def ParseMapFile(Files):
+ AllMaps = {}
+ CurrentModule = ''
+ CurrentMaps = {}
+ for File in Files:
+ Content = open(File, 'r').readlines()
+ for Line in Content:
+ Line = CleanString(Line)
+ # skip empty line
+ if Line == '':
+ continue
+
+ if Line.find('(') > -1 and Line.find(')') > -1:
+ if CurrentModule != '' and CurrentMaps != {}:
+ AllMaps[CurrentModule] = CurrentMaps
+ CurrentModule = Line[:Line.find('(')]
+ CurrentMaps = {}
+ continue
+ else:
+ Name = ''
+ Address = ''
+ List = Line.split()
+ Address = List[0]
+ if List[1] == 'F' or List[1] == 'FS':
+ Name = List[2]
+ else:
+ Name = List[1]
+ CurrentMaps[Name] = Address
+ continue
+
+ return AllMaps
+
+## ConvertGuid
+#
+# Convert a GUID to a GUID with all upper letters
+#
+# @param guid: The GUID to be converted
+#
+# @param newGuid: The GUID with all upper letters.
+#
+def ConvertGuid(guid):
+ numList = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
+ newGuid = ''
+ if guid.startswith('g'):
+ guid = guid[1:]
+ for i in guid:
+ if i.upper() == i and i not in numList:
+ newGuid = newGuid + ('_' + i)
+ else:
+ newGuid = newGuid + i.upper()
+ if newGuid.startswith('_'):
+ newGuid = newGuid[1:]
+ if newGuid.endswith('_'):
+ newGuid = newGuid[:-1]
+
+ return newGuid
+
+## ConvertGuid2() method
+#
+# Convert a GUID to a GUID with new string instead of old string
+#
+# @param guid: The GUID to be converted
+# @param old: Old string to be replaced
+# @param new: New string to replace the old one
+#
+# @param newGuid: The GUID after replacement
+#
+def ConvertGuid2(guid, old, new):
+ newGuid = ConvertGuid(guid)
+ newGuid = newGuid.replace(old, new)
+
+ return newGuid
+
+##
+#
+# This acts like the main() function for the script, unless it is 'import'ed into another
+# script.
+#
+if __name__ == '__main__':
+ pass
diff --git a/BaseTools/Source/Python/Eot/ParserWarning.py b/BaseTools/Source/Python/Eot/ParserWarning.py
new file mode 100644
index 0000000000..af8333af23
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/ParserWarning.py
@@ -0,0 +1,26 @@
+## @file
+# Warning information of Eot
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+class Warning (Exception):
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Str The message to record
+ # @param File The FDF name
+ # @param Line The Line number that error occurs
+ #
+ def __init__(self, Str, File = None, Line = None):
+ self.message = Str
+ self.FileName = File
+ self.LineNumber = Line
+ self.ToolName = 'EOT' \ No newline at end of file
diff --git a/BaseTools/Source/Python/Eot/Report.py b/BaseTools/Source/Python/Eot/Report.py
new file mode 100644
index 0000000000..34002ba7d8
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/Report.py
@@ -0,0 +1,472 @@
+## @file
+# This file is used to create report for Eot tool
+#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import os
+import EotGlobalData
+
+## Report() class
+#
+# This class defined Report
+#
+# @param object: Inherited from object class
+#
+class Report(object):
+ ## The constructor
+ #
+ # @param self: The object pointer
+ # @param ReportName: name of the report
+ # @param FvObj: FV object after parsing FV images
+ #
+ def __init__(self, ReportName = 'Report.html', FvObj = None, DispatchName=None):
+ self.ReportName = ReportName
+ self.Op = open(ReportName, 'w+')
+ self.DispatchList = None
+ if DispatchName:
+ self.DispatchList = open(DispatchName, 'w+')
+ self.FvObj = FvObj
+ self.FfsIndex = 0
+ self.PpiIndex = 0
+ self.ProtocolIndex = 0
+ if EotGlobalData.gMACRO['EFI_SOURCE'] == '':
+ EotGlobalData.gMACRO['EFI_SOURCE'] = EotGlobalData.gMACRO['EDK_SOURCE']
+
+ ## WriteLn() method
+ #
+ # Write a line in the report
+ #
+ # @param self: The object pointer
+ # @param Line: The lint to be written into
+ #
+ def WriteLn(self, Line):
+ self.Op.write('%s\n' % Line)
+
+ ## GenerateReport() method
+ #
+ # A caller to generate report
+ #
+ # @param self: The object pointer
+ #
+ def GenerateReport(self):
+ self.GenerateHeader()
+ self.GenerateFv()
+ self.GenerateTail()
+ self.Op.close()
+ self.GenerateUnDispatchedList()
+
+ ## GenerateUnDispatchedList() method
+ #
+ # Create a list for not dispatched items
+ #
+ # @param self: The object pointer
+ #
+ def GenerateUnDispatchedList(self):
+ FvObj = self.FvObj
+ EotGlobalData.gOP_UN_DISPATCHED.write('%s\n' % FvObj.Name)
+ for Item in FvObj.UnDispatchedFfsDict:
+ EotGlobalData.gOP_UN_DISPATCHED.write('%s\n' % FvObj.UnDispatchedFfsDict[Item])
+
+ ## GenerateFv() method
+ #
+ # Generate FV information
+ #
+ # @param self: The object pointer
+ #
+ def GenerateFv(self):
+ FvObj = self.FvObj
+ Content = """ <tr>
+ <td width="20%%"><strong>Name</strong></td>
+ <td width="60%%"><strong>Guid</strong></td>
+ <td width="20%%"><strong>Size</strong></td>
+ </tr>"""
+ self.WriteLn(Content)
+
+ for Info in FvObj.BasicInfo:
+ FvName = Info[0]
+ FvGuid = Info[1]
+ FvSize = Info[2]
+
+ Content = """ <tr>
+ <td>%s</td>
+ <td>%s</td>
+ <td>%s</td>
+ </tr>""" % (FvName, FvGuid, FvSize)
+ self.WriteLn(Content)
+
+ Content = """ <td colspan="3"><table width="100%%" border="1">
+ <tr>"""
+ self.WriteLn(Content)
+
+ EotGlobalData.gOP_DISPATCH_ORDER.write('Dispatched:\n')
+ for FfsId in FvObj.OrderedFfsDict:
+ self.GenerateFfs(FvObj.OrderedFfsDict[FfsId])
+ Content = """ </table></td>
+ </tr>"""
+ self.WriteLn(Content)
+
+ # For UnDispatched
+ Content = """ <td colspan="3"><table width="100%%" border="1">
+ <tr>
+ <tr><strong>UnDispatched</strong></tr>"""
+ self.WriteLn(Content)
+
+ EotGlobalData.gOP_DISPATCH_ORDER.write('\nUnDispatched:\n')
+ for FfsId in FvObj.UnDispatchedFfsDict:
+ self.GenerateFfs(FvObj.UnDispatchedFfsDict[FfsId])
+ Content = """ </table></td>
+ </tr>"""
+ self.WriteLn(Content)
+
+ ## GenerateDepex() method
+ #
+ # Generate Depex information
+ #
+ # @param self: The object pointer
+ # @param DepexString: A DEPEX string needed to be parsed
+ #
+ def GenerateDepex(self, DepexString):
+ NonGuidList = ['AND', 'OR', 'NOT', 'BEFORE', 'AFTER', 'TRUE', 'FALSE']
+ ItemList = DepexString.split(' ')
+ DepexString = ''
+ for Item in ItemList:
+ if Item not in NonGuidList:
+ SqlCommand = """select DISTINCT GuidName from Report where GuidValue like '%s' and ItemMode = 'Produced' group by GuidName""" % (Item)
+ RecordSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ if RecordSet != []:
+ Item = RecordSet[0][0]
+ DepexString = DepexString + Item + ' '
+ Content = """ <tr>
+ <td width="5%%"></td>
+ <td width="95%%">%s</td>
+ </tr>""" % (DepexString)
+ self.WriteLn(Content)
+
+ ## GeneratePpi() method
+ #
+ # Generate PPI information
+ #
+ # @param self: The object pointer
+ # @param Name: CName of a GUID
+ # @param Guid: Value of a GUID
+ # @param Type: Type of a GUID
+ #
+ def GeneratePpi(self, Name, Guid, Type):
+ self.GeneratePpiProtocol('Ppi', Name, Guid, Type, self.PpiIndex)
+
+ ## GenerateProtocol() method
+ #
+ # Generate PROTOCOL information
+ #
+ # @param self: The object pointer
+ # @param Name: CName of a GUID
+ # @param Guid: Value of a GUID
+ # @param Type: Type of a GUID
+ #
+ def GenerateProtocol(self, Name, Guid, Type):
+ self.GeneratePpiProtocol('Protocol', Name, Guid, Type, self.ProtocolIndex)
+
+ ## GeneratePpiProtocol() method
+ #
+ # Generate PPI/PROTOCOL information
+ #
+ # @param self: The object pointer
+ # @param Model: Model of a GUID, PPI or PROTOCOL
+ # @param Name: Name of a GUID
+ # @param Guid: Value of a GUID
+ # @param Type: Type of a GUID
+ # @param CName: CName(Index) of a GUID
+ #
+ def GeneratePpiProtocol(self, Model, Name, Guid, Type, CName):
+ Content = """ <tr>
+ <td width="5%%"></td>
+ <td width="10%%">%s</td>
+ <td width="85%%" colspan="3">%s</td>
+ <!-- %s -->
+ </tr>""" % (Model, Name, Guid)
+ self.WriteLn(Content)
+ if Type == 'Produced':
+ SqlCommand = """select DISTINCT SourceFileFullPath, BelongsToFunction from Report where GuidName like '%s' and ItemMode = 'Callback'""" % Name
+ RecordSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ for Record in RecordSet:
+ SqlCommand = """select FullPath from File
+ where ID = (
+ select DISTINCT BelongsToFile from Inf
+ where Value1 like '%s')""" % Record[0]
+ ModuleSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ Inf = ModuleSet[0][0].replace(EotGlobalData.gMACRO['WORKSPACE'], '.')
+ Function = Record[1]
+ Address = ''
+ for Item in EotGlobalData.gMap:
+ if Function in EotGlobalData.gMap[Item]:
+ Address = EotGlobalData.gMap[Item][Function]
+ break
+ if '_' + Function in EotGlobalData.gMap[Item]:
+ Address = EotGlobalData.gMap[Item]['_' + Function]
+ break
+ Content = """ <tr>
+ <td width="5%%"></td>
+ <td width="10%%">%s</td>
+ <td width="40%%">%s</td>
+ <td width="35%%">%s</td>
+ <td width="10%%">%s</td>
+ </tr>""" % ('Callback', Inf, Function, Address)
+ self.WriteLn(Content)
+
+ ## GenerateFfs() method
+ #
+ # Generate FFS information
+ #
+ # @param self: The object pointer
+ # @param FfsObj: FFS object after FV image is parsed
+ #
+ def GenerateFfs(self, FfsObj):
+ self.FfsIndex = self.FfsIndex + 1
+ if FfsObj != None and FfsObj.Type in [0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0xA]:
+ FfsGuid = FfsObj.Guid
+ FfsOffset = FfsObj._OFF_
+ FfsName = 'Unknown-Module'
+ FfsPath = FfsGuid
+ FfsType = FfsObj._TypeName[FfsObj.Type]
+
+ # Hard code for Binary INF
+ if FfsGuid.upper() == '7BB28B99-61BB-11D5-9A5D-0090273FC14D':
+ FfsName = 'Logo'
+
+ if FfsGuid.upper() == '7E374E25-8E01-4FEE-87F2-390C23C606CD':
+ FfsName = 'AcpiTables'
+
+ if FfsGuid.upper() == '961578FE-B6B7-44C3-AF35-6BC705CD2B1F':
+ FfsName = 'Fat'
+
+ # Find FFS Path and Name
+ SqlCommand = """select Value2 from Inf
+ where BelongsToFile = (select BelongsToFile from Inf where Value1 = 'FILE_GUID' and lower(Value2) = lower('%s') and Model = %s)
+ and Model = %s and Value1='BASE_NAME'""" % (FfsGuid, 5001, 5001)
+ RecordSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ if RecordSet != []:
+ FfsName = RecordSet[0][0]
+
+ SqlCommand = """select FullPath from File
+ where ID = (select BelongsToFile from Inf where Value1 = 'FILE_GUID' and lower(Value2) = lower('%s') and Model = %s)
+ and Model = %s""" % (FfsGuid, 5001, 1011)
+ RecordSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ if RecordSet != []:
+ FfsPath = RecordSet[0][0]
+
+ Content = """ <tr>
+ <tr class='styleFfs' id='FfsHeader%s'>
+ <td width="55%%"><span onclick="Display('FfsHeader%s', 'Ffs%s')" onMouseOver="funOnMouseOver()" onMouseOut="funOnMouseOut()">%s</span></td>
+ <td width="15%%">%s</td>
+ <!--<td width="20%%">%s</td>-->
+ <!--<td width="20%%">%s</td>-->
+ <td width="10%%">%s</td>
+ </tr>
+ <tr id='Ffs%s' style='display:none;'>
+ <td colspan="4"><table width="100%%" border="1">""" % (self.FfsIndex, self.FfsIndex, self.FfsIndex, FfsPath, FfsName, FfsGuid, FfsOffset, FfsType, self.FfsIndex)
+
+ if self.DispatchList:
+ if FfsObj.Type in [0x04, 0x06]:
+ self.DispatchList.write("%s %s %s %s\n" % (FfsGuid, "P", FfsName, FfsPath))
+ if FfsObj.Type in [0x05, 0x07, 0x08, 0x0A]:
+ self.DispatchList.write("%s %s %s %s\n" % (FfsGuid, "D", FfsName, FfsPath))
+
+ self.WriteLn(Content)
+
+ EotGlobalData.gOP_DISPATCH_ORDER.write('%s\n' %FfsName)
+
+ if FfsObj.Depex != '':
+ Content = """ <tr>
+ <td><span id='DepexHeader%s' class="styleDepex" onclick="Display('DepexHeader%s', 'Depex%s')" onMouseOver="funOnMouseOver()" onMouseOut="funOnMouseOut()">&nbsp&nbspDEPEX expression</span></td>
+ </tr>
+ <tr id='Depex%s' style='display:none;'>
+ <td><table width="100%%" border="1">""" % (self.FfsIndex, self.FfsIndex, self.FfsIndex, self.FfsIndex)
+ self.WriteLn(Content)
+ self.GenerateDepex(FfsObj.Depex)
+ Content = """ </table></td>
+ </tr>"""
+ self.WriteLn(Content)
+ # End of DEPEX
+
+ # Find Consumed Ppi/Protocol
+ SqlCommand = """select ModuleName, ItemType, GuidName, GuidValue, GuidMacro from Report
+ where SourceFileFullPath in
+ (select Value1 from Inf where BelongsToFile =
+ (select BelongsToFile from Inf
+ where Value1 = 'FILE_GUID' and Value2 like '%s' and Model = %s)
+ and Model = %s)
+ and ItemMode = 'Consumed' group by GuidName order by ItemType""" \
+ % (FfsGuid, 5001, 3007)
+
+ RecordSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ if RecordSet != []:
+ Count = len(RecordSet)
+ Content = """ <tr>
+ <td><span id='ConsumedHeader%s' class="styleConsumed" onclick="Display('ConsumedHeader%s', 'Consumed%s')" onMouseOver="funOnMouseOver()" onMouseOut="funOnMouseOut()">&nbsp&nbspConsumed Ppis/Protocols List (%s)</span></td>
+ </tr>
+ <tr id='Consumed%s' style='display:none;'>
+ <td><table width="100%%" border="1">""" % (self.FfsIndex, self.FfsIndex, self.FfsIndex, Count, self.FfsIndex)
+ self.WriteLn(Content)
+ self.ProtocolIndex = 0
+ for Record in RecordSet:
+ self.ProtocolIndex = self.ProtocolIndex + 1
+ Name = Record[2]
+ CName = Record[4]
+ Guid = Record[3]
+ Type = Record[1]
+ self.GeneratePpiProtocol(Type, Name, Guid, 'Consumed', CName)
+
+ Content = """ </table></td>
+ </tr>"""
+ self.WriteLn(Content)
+ #End of Consumed Ppi/Portocol
+
+ # Find Produced Ppi/Protocol
+ SqlCommand = """select ModuleName, ItemType, GuidName, GuidValue, GuidMacro from Report
+ where SourceFileFullPath in
+ (select Value1 from Inf where BelongsToFile =
+ (select BelongsToFile from Inf
+ where Value1 = 'FILE_GUID' and Value2 like '%s' and Model = %s)
+ and Model = %s)
+ and ItemMode = 'Produced' group by GuidName order by ItemType""" \
+ % (FfsGuid, 5001, 3007)
+
+ RecordSet = EotGlobalData.gDb.TblReport.Exec(SqlCommand)
+ if RecordSet != []:
+ Count = len(RecordSet)
+ Content = """ <tr>
+ <td><span id='ProducedHeader%s' class="styleProduced" onclick="Display('ProducedHeader%s', 'Produced%s')" onMouseOver="funOnMouseOver()" onMouseOut="funOnMouseOut()">&nbsp&nbspProduced Ppis/Protocols List (%s)</span></td>
+ </tr>
+ <tr id='Produced%s' style='display:none;'>
+ <td><table width="100%%" border="1">""" % (self.FfsIndex, self.FfsIndex, self.FfsIndex, Count, self.FfsIndex)
+ self.WriteLn(Content)
+ self.PpiIndex = 0
+ for Record in RecordSet:
+ self.PpiIndex = self.PpiIndex + 1
+ Name = Record[2]
+ CName = Record[4]
+ Guid = Record[3]
+ Type = Record[1]
+ self.GeneratePpiProtocol(Type, Name, Guid, 'Produced', CName)
+
+ Content = """ </table></td>
+ </tr>"""
+ self.WriteLn(Content)
+ RecordSet = None
+ # End of Produced Ppi/Protocol
+
+ Content = """ </table></td>
+ </tr>"""
+ self.WriteLn(Content)
+
+ ## GenerateTail() method
+ #
+ # Generate end tags of HTML report
+ #
+ # @param self: The object pointer
+ #
+ def GenerateTail(self):
+ Tail = """</table>
+</body>
+</html>"""
+ self.WriteLn(Tail)
+
+ ## GenerateHeader() method
+ #
+ # Generate start tags of HTML report
+ #
+ # @param self: The object pointer
+ #
+ def GenerateHeader(self):
+ Header = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>Execution Order Tool Report</title>
+<meta http-equiv="Content-Type" content="text/html">
+<style type="text/css">
+<!--
+.styleFfs {
+ color: #006600;
+ font-weight: bold;
+}
+.styleDepex {
+ color: #FF0066;
+ font-weight: bold;
+}
+.styleProduced {
+ color: #0000FF;
+ font-weight: bold;
+}
+.styleConsumed {
+ color: #FF00FF;
+ font-weight: bold;
+}
+-->
+</style>
+<Script type="text/javascript">
+function Display(ParentID, SubID)
+{
+ SubItem = document.getElementById(SubID);
+ ParentItem = document.getElementById(ParentID);
+ if (SubItem.style.display == 'none')
+ {
+ SubItem.style.display = ''
+ ParentItem.style.fontWeight = 'normal'
+ }
+ else
+ {
+ SubItem.style.display = 'none'
+ ParentItem.style.fontWeight = 'bold'
+ }
+
+}
+
+function funOnMouseOver()
+{
+ document.body.style.cursor = "hand";
+}
+
+function funOnMouseOut()
+{
+ document.body.style.cursor = "";
+}
+
+</Script>
+</head>
+
+<body>
+<table width="100%%" border="1">"""
+ self.WriteLn(Header)
+
+##
+#
+# This acts like the main() function for the script, unless it is 'import'ed into another
+# script.
+#
+if __name__ == '__main__':
+ # Initialize log system
+ FilePath = 'FVRECOVERYFLOPPY.fv'
+ if FilePath.lower().endswith(".fv"):
+ fd = open(FilePath, 'rb')
+ buf = array('B')
+ try:
+ buf.fromfile(fd, os.path.getsize(FilePath))
+ except EOFError:
+ pass
+
+ fv = FirmwareVolume("FVRECOVERY", buf, 0)
+
+ report = Report('Report.html', fv)
+ report.GenerateReport()
diff --git a/BaseTools/Source/Python/Eot/__init__.py b/BaseTools/Source/Python/Eot/__init__.py
new file mode 100644
index 0000000000..ecd6a071f7
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'Eot' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/Eot/c.py b/BaseTools/Source/Python/Eot/c.py
new file mode 100644
index 0000000000..71d2b626db
--- /dev/null
+++ b/BaseTools/Source/Python/Eot/c.py
@@ -0,0 +1,394 @@
+## @file
+# preprocess source file
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import sys
+import os
+import re
+import CodeFragmentCollector
+import FileProfile
+from CommonDataClass import DataClass
+from Common import EdkLogger
+from EotToolError import *
+import EotGlobalData
+
+# Global Dicts
+IncludeFileListDict = {}
+IncludePathListDict = {}
+ComplexTypeDict = {}
+SUDict = {}
+
+## GetIgnoredDirListPattern() method
+#
+# Get the pattern of ignored direction list
+#
+# @return p: the pattern of ignored direction list
+#
+def GetIgnoredDirListPattern():
+ p = re.compile(r'.*[\\/](?:BUILD|INTELRESTRICTEDTOOLS|INTELRESTRICTEDPKG|PCCTS)[\\/].*')
+ return p
+
+## GetFuncDeclPattern() method
+#
+# Get the pattern of function declaration
+#
+# @return p: the pattern of function declaration
+#
+def GetFuncDeclPattern():
+ p = re.compile(r'(EFIAPI|EFI_BOOT_SERVICE|EFI_RUNTIME_SERVICE)?\s*[_\w]+\s*\(.*\).*', re.DOTALL)
+ return p
+
+## GetArrayPattern() method
+#
+# Get the pattern of array
+#
+# @return p: the pattern of array
+#
+def GetArrayPattern():
+ p = re.compile(r'[_\w]*\s*[\[.*\]]+')
+ return p
+
+## GetTypedefFuncPointerPattern() method
+#
+# Get the pattern of function pointer
+#
+# @return p: the pattern of function pointer
+#
+def GetTypedefFuncPointerPattern():
+ p = re.compile('[_\w\s]*\([\w\s]*\*+\s*[_\w]+\s*\)\s*\(.*\)', re.DOTALL)
+ return p
+
+## GetDB() method
+#
+# Get global database instance
+#
+# @return EotGlobalData.gDb: the global database instance
+#
+def GetDB():
+ return EotGlobalData.gDb
+
+## PrintErrorMsg() method
+#
+# print error message
+#
+# @param ErrorType: Type of error
+# @param Msg: Error message
+# @param TableName: table name of error found
+# @param ItemId: id of item
+#
+def PrintErrorMsg(ErrorType, Msg, TableName, ItemId):
+ Msg = Msg.replace('\n', '').replace('\r', '')
+ MsgPartList = Msg.split()
+ Msg = ''
+ for Part in MsgPartList:
+ Msg += Part
+ Msg += ' '
+ GetDB().TblReport.Insert(ErrorType, OtherMsg = Msg, BelongsToTable = TableName, BelongsToItem = ItemId)
+
+## GetIdType() method
+#
+# Find type of input string
+#
+# @param Str: String to be parsed
+#
+# @return Type: The type of the string
+#
+def GetIdType(Str):
+ Type = DataClass.MODEL_UNKNOWN
+ Str = Str.replace('#', '# ')
+ List = Str.split()
+ if List[1] == 'include':
+ Type = DataClass.MODEL_IDENTIFIER_INCLUDE
+ elif List[1] == 'define':
+ Type = DataClass.MODEL_IDENTIFIER_MACRO_DEFINE
+ elif List[1] == 'ifdef':
+ Type = DataClass.MODEL_IDENTIFIER_MACRO_IFDEF
+ elif List[1] == 'ifndef':
+ Type = DataClass.MODEL_IDENTIFIER_MACRO_IFNDEF
+ elif List[1] == 'endif':
+ Type = DataClass.MODEL_IDENTIFIER_MACRO_ENDIF
+ elif List[1] == 'pragma':
+ Type = DataClass.MODEL_IDENTIFIER_MACRO_PROGMA
+ else:
+ Type = DataClass.MODEL_UNKNOWN
+ return Type
+
+## GetIdentifierList() method
+#
+# Get id of all files
+#
+# @return IdList: The list of all id of files
+#
+def GetIdentifierList():
+ IdList = []
+
+ for pp in FileProfile.PPDirectiveList:
+ Type = GetIdType(pp.Content)
+ IdPP = DataClass.IdentifierClass(-1, '', '', '', pp.Content, Type, -1, -1, pp.StartPos[0],pp.StartPos[1],pp.EndPos[0],pp.EndPos[1])
+ IdList.append(IdPP)
+
+ for ae in FileProfile.AssignmentExpressionList:
+ IdAE = DataClass.IdentifierClass(-1, ae.Operator, '', ae.Name, ae.Value, DataClass.MODEL_IDENTIFIER_ASSIGNMENT_EXPRESSION, -1, -1, ae.StartPos[0],ae.StartPos[1],ae.EndPos[0],ae.EndPos[1])
+ IdList.append(IdAE)
+
+ FuncDeclPattern = GetFuncDeclPattern()
+ ArrayPattern = GetArrayPattern()
+ for var in FileProfile.VariableDeclarationList:
+ DeclText = var.Declarator.strip()
+ while DeclText.startswith('*'):
+ var.Modifier += '*'
+ DeclText = DeclText.lstrip('*').strip()
+ var.Declarator = DeclText
+ if FuncDeclPattern.match(var.Declarator):
+ DeclSplitList = var.Declarator.split('(')
+ FuncName = DeclSplitList[0]
+ FuncNamePartList = FuncName.split()
+ if len(FuncNamePartList) > 1:
+ FuncName = FuncNamePartList[-1]
+ Index = 0
+ while Index < len(FuncNamePartList) - 1:
+ var.Modifier += ' ' + FuncNamePartList[Index]
+ var.Declarator = var.Declarator.lstrip().lstrip(FuncNamePartList[Index])
+ Index += 1
+ IdVar = DataClass.IdentifierClass(-1, var.Modifier, '', var.Declarator, '', DataClass.MODEL_IDENTIFIER_FUNCTION_DECLARATION, -1, -1, var.StartPos[0],var.StartPos[1],var.EndPos[0],var.EndPos[1])
+ IdList.append(IdVar)
+ continue
+
+ if var.Declarator.find('{') == -1:
+ for decl in var.Declarator.split(','):
+ DeclList = decl.split('=')
+ Name = DeclList[0].strip()
+ if ArrayPattern.match(Name):
+ LSBPos = var.Declarator.find('[')
+ var.Modifier += ' ' + Name[LSBPos:]
+ Name = Name[0:LSBPos]
+
+ IdVar = DataClass.IdentifierClass(-1, var.Modifier, '', Name, (len(DeclList) > 1 and [DeclList[1]]or [''])[0], DataClass.MODEL_IDENTIFIER_VARIABLE, -1, -1, var.StartPos[0],var.StartPos[1],var.EndPos[0],var.EndPos[1])
+ IdList.append(IdVar)
+ else:
+ DeclList = var.Declarator.split('=')
+ Name = DeclList[0].strip()
+ if ArrayPattern.match(Name):
+ LSBPos = var.Declarator.find('[')
+ var.Modifier += ' ' + Name[LSBPos:]
+ Name = Name[0:LSBPos]
+ IdVar = DataClass.IdentifierClass(-1, var.Modifier, '', Name, (len(DeclList) > 1 and [DeclList[1]]or [''])[0], DataClass.MODEL_IDENTIFIER_VARIABLE, -1, -1, var.StartPos[0],var.StartPos[1],var.EndPos[0],var.EndPos[1])
+ IdList.append(IdVar)
+
+ for enum in FileProfile.EnumerationDefinitionList:
+ LBPos = enum.Content.find('{')
+ RBPos = enum.Content.find('}')
+ Name = enum.Content[4:LBPos].strip()
+ Value = enum.Content[LBPos+1:RBPos]
+ IdEnum = DataClass.IdentifierClass(-1, '', '', Name, Value, DataClass.MODEL_IDENTIFIER_ENUMERATE, -1, -1, enum.StartPos[0],enum.StartPos[1],enum.EndPos[0],enum.EndPos[1])
+ IdList.append(IdEnum)
+
+ for su in FileProfile.StructUnionDefinitionList:
+ Type = DataClass.MODEL_IDENTIFIER_STRUCTURE
+ SkipLen = 6
+ if su.Content.startswith('union'):
+ Type = DataClass.MODEL_IDENTIFIER_UNION
+ SkipLen = 5
+ LBPos = su.Content.find('{')
+ RBPos = su.Content.find('}')
+ if LBPos == -1 or RBPos == -1:
+ Name = su.Content[SkipLen:].strip()
+ Value = ''
+ else:
+ Name = su.Content[SkipLen:LBPos].strip()
+ Value = su.Content[LBPos+1:RBPos]
+ IdPE = DataClass.IdentifierClass(-1, '', '', Name, Value, Type, -1, -1, su.StartPos[0],su.StartPos[1],su.EndPos[0],su.EndPos[1])
+ IdList.append(IdPE)
+
+ TdFuncPointerPattern = GetTypedefFuncPointerPattern()
+ for td in FileProfile.TypedefDefinitionList:
+ Modifier = ''
+ Name = td.ToType
+ Value = td.FromType
+ if TdFuncPointerPattern.match(td.ToType):
+ Modifier = td.FromType
+ LBPos = td.ToType.find('(')
+ TmpStr = td.ToType[LBPos+1:].strip()
+ StarPos = TmpStr.find('*')
+ if StarPos != -1:
+ Modifier += ' ' + TmpStr[0:StarPos]
+ while TmpStr[StarPos] == '*':
+ Modifier += ' ' + '*'
+ StarPos += 1
+ TmpStr = TmpStr[StarPos:].strip()
+ RBPos = TmpStr.find(')')
+ Name = TmpStr[0:RBPos]
+ Value = 'FP' + TmpStr[RBPos + 1:]
+
+ IdTd = DataClass.IdentifierClass(-1, Modifier, '', Name, Value, DataClass.MODEL_IDENTIFIER_TYPEDEF, -1, -1, td.StartPos[0],td.StartPos[1],td.EndPos[0],td.EndPos[1])
+ IdList.append(IdTd)
+
+ for funcCall in FileProfile.FunctionCallingList:
+ IdFC = DataClass.IdentifierClass(-1, '', '', funcCall.FuncName, funcCall.ParamList, DataClass.MODEL_IDENTIFIER_FUNCTION_CALLING, -1, -1, funcCall.StartPos[0],funcCall.StartPos[1],funcCall.EndPos[0],funcCall.EndPos[1])
+ IdList.append(IdFC)
+ return IdList
+
+## GetParamList() method
+#
+# Get a list of parameters
+#
+# @param FuncDeclarator: Function declarator
+# @param FuncNameLine: Line number of function name
+# @param FuncNameOffset: Offset of function name
+#
+# @return ParamIdList: A list of parameters
+#
+def GetParamList(FuncDeclarator, FuncNameLine = 0, FuncNameOffset = 0):
+ ParamIdList = []
+ DeclSplitList = FuncDeclarator.split('(')
+ if len(DeclSplitList) < 2:
+ return ParamIdList
+ FuncName = DeclSplitList[0]
+ ParamStr = DeclSplitList[1].rstrip(')')
+ LineSkipped = 0
+ OffsetSkipped = 0
+ Start = 0
+ while FuncName.find('\n', Start) != -1:
+ LineSkipped += 1
+ OffsetSkipped = 0
+ Start += FuncName.find('\n', Start)
+ Start += 1
+ OffsetSkipped += len(FuncName[Start:])
+ OffsetSkipped += 1 #skip '('
+ ParamBeginLine = FuncNameLine + LineSkipped
+ ParamBeginOffset = OffsetSkipped
+ for p in ParamStr.split(','):
+ ListP = p.split()
+ if len(ListP) == 0:
+ continue
+ ParamName = ListP[-1]
+ DeclText = ParamName.strip()
+ RightSpacePos = p.rfind(ParamName)
+ ParamModifier = p[0:RightSpacePos]
+ if ParamName == 'OPTIONAL':
+ if ParamModifier == '':
+ ParamModifier += ' ' + 'OPTIONAL'
+ DeclText = ''
+ else:
+ ParamName = ListP[-2]
+ DeclText = ParamName.strip()
+ RightSpacePos = p.rfind(ParamName)
+ ParamModifier = p[0:RightSpacePos]
+ ParamModifier += 'OPTIONAL'
+ while DeclText.startswith('*'):
+ ParamModifier += ' ' + '*'
+ DeclText = DeclText.lstrip('*').strip()
+ ParamName = DeclText
+
+ Start = 0
+ while p.find('\n', Start) != -1:
+ LineSkipped += 1
+ OffsetSkipped = 0
+ Start += p.find('\n', Start)
+ Start += 1
+ OffsetSkipped += len(p[Start:])
+
+ ParamEndLine = ParamBeginLine + LineSkipped
+ ParamEndOffset = OffsetSkipped
+ IdParam = DataClass.IdentifierClass(-1, ParamModifier, '', ParamName, '', DataClass.MODEL_IDENTIFIER_PARAMETER, -1, -1, ParamBeginLine, ParamBeginOffset, ParamEndLine, ParamEndOffset)
+ ParamIdList.append(IdParam)
+ ParamBeginLine = ParamEndLine
+ ParamBeginOffset = OffsetSkipped + 1 #skip ','
+
+ return ParamIdList
+
+## GetFunctionList()
+#
+# Get a list of functions
+#
+# @return FuncObjList: A list of function objects
+#
+def GetFunctionList():
+ FuncObjList = []
+ for FuncDef in FileProfile.FunctionDefinitionList:
+ ParamIdList = []
+ DeclText = FuncDef.Declarator.strip()
+ while DeclText.startswith('*'):
+ FuncDef.Modifier += '*'
+ DeclText = DeclText.lstrip('*').strip()
+
+ FuncDef.Declarator = FuncDef.Declarator.lstrip('*')
+ DeclSplitList = FuncDef.Declarator.split('(')
+ if len(DeclSplitList) < 2:
+ continue
+
+ FuncName = DeclSplitList[0]
+ FuncNamePartList = FuncName.split()
+ if len(FuncNamePartList) > 1:
+ FuncName = FuncNamePartList[-1]
+ Index = 0
+ while Index < len(FuncNamePartList) - 1:
+ FuncDef.Modifier += ' ' + FuncNamePartList[Index]
+ Index += 1
+
+ FuncObj = DataClass.FunctionClass(-1, FuncDef.Declarator, FuncDef.Modifier, FuncName.strip(), '', FuncDef.StartPos[0],FuncDef.StartPos[1],FuncDef.EndPos[0],FuncDef.EndPos[1], FuncDef.LeftBracePos[0], FuncDef.LeftBracePos[1], -1, ParamIdList, [])
+ FuncObjList.append(FuncObj)
+
+ return FuncObjList
+
+## CreateCCodeDB() method
+#
+# Create database for all c code
+#
+# @param FileNameList: A list of all c code file names
+#
+def CreateCCodeDB(FileNameList):
+ FileObjList = []
+ ParseErrorFileList = []
+
+ for FullName in FileNameList:
+ if os.path.splitext(FullName)[1] in ('.h', '.c'):
+ EdkLogger.info("Parsing " + FullName)
+ model = FullName.endswith('c') and DataClass.MODEL_FILE_C or DataClass.MODEL_FILE_H
+ collector = CodeFragmentCollector.CodeFragmentCollector(FullName)
+ try:
+ collector.ParseFile()
+ except UnicodeError:
+ ParseErrorFileList.append(FullName)
+ BaseName = os.path.basename(FullName)
+ DirName = os.path.dirname(FullName)
+ Ext = os.path.splitext(BaseName)[1].lstrip('.')
+ ModifiedTime = os.path.getmtime(FullName)
+ FileObj = DataClass.FileClass(-1, BaseName, Ext, DirName, FullName, model, ModifiedTime, GetFunctionList(), GetIdentifierList(), [])
+ FileObjList.append(FileObj)
+ collector.CleanFileProfileBuffer()
+
+ if len(ParseErrorFileList) > 0:
+ EdkLogger.info("Found unrecoverable error during parsing:\n\t%s\n" % "\n\t".join(ParseErrorFileList))
+
+ Db = EotGlobalData.gDb
+ for file in FileObjList:
+ Db.InsertOneFile(file)
+
+ Db.UpdateIdentifierBelongsToFunction()
+
+##
+#
+# This acts like the main() function for the script, unless it is 'import'ed into another
+# script.
+#
+if __name__ == '__main__':
+
+ EdkLogger.Initialize()
+ EdkLogger.SetLevel(EdkLogger.QUIET)
+ CollectSourceCodeDataIntoDB(sys.argv[1])
+
+ print 'Done!'
diff --git a/BaseTools/Source/Python/Fdb/__init__.py b/BaseTools/Source/Python/Fdb/__init__.py
index e69de29bb2..8d79301f3e 100644
--- a/BaseTools/Source/Python/Fdb/__init__.py
+++ b/BaseTools/Source/Python/Fdb/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'Fdb' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/FixFlash/__init__.py b/BaseTools/Source/Python/FixFlash/__init__.py
index e69de29bb2..df2630319f 100644
--- a/BaseTools/Source/Python/FixFlash/__init__.py
+++ b/BaseTools/Source/Python/FixFlash/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'FixFlash' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/GenFds/CompressSection.py b/BaseTools/Source/Python/GenFds/CompressSection.py
index 4a32ea4458..7e126678a2 100644
--- a/BaseTools/Source/Python/GenFds/CompressSection.py
+++ b/BaseTools/Source/Python/GenFds/CompressSection.py
@@ -29,8 +29,8 @@ class CompressSection (CompressSectionClassObject) :
## compress types: PI standard and non PI standard
CompTypeDict = {
- 'PI_STD' : 'PI_STD',
- 'NON_PI_STD' : 'NON_PI_STD'
+ 'PI_STD' : 'PI_STD',
+ 'PI_NONE' : 'PI_NONE'
}
## The constructor
diff --git a/BaseTools/Source/Python/GenFds/DepexSection.py b/BaseTools/Source/Python/GenFds/DepexSection.py
index a0a1905dfa..8650a73eb5 100644
--- a/BaseTools/Source/Python/GenFds/DepexSection.py
+++ b/BaseTools/Source/Python/GenFds/DepexSection.py
@@ -62,24 +62,27 @@ class DepexSection (DepexSectionClassObject):
# @retval tuple (Generated file name list, section alignment)
#
def GenSection(self, OutputPath, ModuleName, SecNum, keyStringList, FfsFile = None, Dict = {}):
+
+ if self.ExpressionProcessed == False:
+ self.Expression = self.Expression.replace("\n", " ").replace("\r", " ")
+ ExpList = self.Expression.split()
+ ExpGuidDict = {}
- self.Expression = self.Expression.replace("\n", " ").replace("\r", " ")
- ExpList = self.Expression.split()
- ExpGuidDict = {}
+ for Exp in ExpList:
+ if Exp.upper() not in ('AND', 'OR', 'NOT', 'TRUE', 'FALSE', 'SOR', 'BEFORE', 'AFTER', 'END'):
+ GuidStr = self.__FindGuidValue(Exp)
+ if GuidStr == None:
+ EdkLogger.error("GenFds", RESOURCE_NOT_AVAILABLE,
+ "Depex GUID %s could not be found in build DB! (ModuleName: %s)" % (Exp, ModuleName))
- for Exp in ExpList:
- if Exp.upper() not in ('AND', 'OR', 'NOT', 'TRUE', 'FALSE', 'SOR', 'BEFORE', 'AFTER', 'END'):
- GuidStr = self.__FindGuidValue(Exp)
- if GuidStr == None:
- EdkLogger.error("GenFds", RESOURCE_NOT_AVAILABLE,
- "Depex GUID %s could not be found in build DB! (ModuleName: %s)" % (Exp, ModuleName))
+ ExpGuidDict[Exp] = GuidStr
- ExpGuidDict[Exp] = GuidStr
+ for Item in ExpGuidDict:
+ self.Expression = self.Expression.replace(Item, ExpGuidDict[Item])
- for Item in ExpGuidDict:
- self.Expression = self.Expression.replace(Item, ExpGuidDict[Item])
+ self.Expression = self.Expression.strip()
+ self.ExpressionProcessed = True
- self.Expression = self.Expression.strip()
if self.DepexType == 'PEI_DEPEX_EXP':
ModuleType = 'PEIM'
SecType = 'PEI_DEPEX'
diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index 2c112ed5cb..ad953facb9 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -15,6 +15,7 @@
##
# Import Modules
#
+from struct import *
import Section
from GenFdsGlobalVariable import GenFdsGlobalVariable
import subprocess
@@ -24,6 +25,7 @@ from CommonDataClass.FdfClass import EfiSectionClassObject
import shutil
from Common import EdkLogger
from Common.BuildToolError import *
+from Common.Misc import PeImageClass
## generate rule section
#
@@ -78,6 +80,12 @@ class EfiSection (EfiSectionClassObject):
FileList = []
if Filename != None:
Filename = GenFdsGlobalVariable.MacroExtend(Filename, Dict)
+ # check if the path is absolute or relative
+ if os.path.isabs(Filename):
+ Filename = os.path.normpath(Filename)
+ else:
+ Filename = os.path.normpath(os.path.join(FfsInf.EfiOutputPath, Filename))
+
if not self.Optional:
FileList.append(Filename)
elif os.path.exists(Filename):
@@ -121,7 +129,6 @@ class EfiSection (EfiSectionClassObject):
f = open(File, 'r')
VerString = f.read()
f.close()
-# VerTuple = ('-n', '"' + VerString + '"')
BuildNum = VerString
if BuildNum != None and BuildNum != '':
BuildNumTuple = ('-j', BuildNum)
@@ -131,11 +138,6 @@ class EfiSection (EfiSectionClassObject):
OutputFileList.append(OutputFile)
else:
-# if StringData != None and len(StringData) > 0:
-# VerTuple = ('-n', '"' + StringData + '"')
-# else:
-# VerTuple = tuple()
-# VerString = ' ' + ' '.join(VerTuple)
BuildNum = StringData
if BuildNum != None and BuildNum != '':
BuildNumTuple = ('-j', BuildNum)
@@ -221,6 +223,15 @@ class EfiSection (EfiSectionClassObject):
Num = '%s.%d' %(SecNum , Index)
OutputFile = os.path.join( OutputPath, ModuleName + 'SEC' + Num + Ffs.SectionSuffix.get(SectionType))
File = GenFdsGlobalVariable.MacroExtend(File, Dict)
+
+ #Get PE Section alignment when align is set to AUTO
+ if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):
+ ImageObj = PeImageClass (File)
+ if ImageObj.SectionAlignment < 0x400:
+ self.Alignment = str (ImageObj.SectionAlignment)
+ else:
+ self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'
+
if File[(len(File)-4):] == '.efi':
MapFile = File.replace('.efi', '.map')
if os.path.exists(MapFile):
@@ -237,24 +248,25 @@ class EfiSection (EfiSectionClassObject):
StrippedFile = os.path.join(OutputPath, ModuleName + '.stripped')
GenFdsGlobalVariable.GenerateFirmwareImage(
StrippedFile,
- [GenFdsGlobalVariable.MacroExtend(File, Dict)],
+ [File],
Strip=True
)
File = StrippedFile
+
"""For TE Section call GenFw to generate TE image"""
if SectionType == 'TE':
TeFile = os.path.join( OutputPath, ModuleName + 'Te.raw')
GenFdsGlobalVariable.GenerateFirmwareImage(
TeFile,
- [GenFdsGlobalVariable.MacroExtend(File, Dict)],
+ [File],
Type='te'
)
File = TeFile
"""Call GenSection"""
GenFdsGlobalVariable.GenerateSection(OutputFile,
- [GenFdsGlobalVariable.MacroExtend(File)],
+ [File],
Section.Section.SectionType.get (SectionType)
)
OutputFileList.append(OutputFile)
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 24732a0d5e..4ce2761243 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -40,6 +40,7 @@ import OptionRom
import OptRomInfStatement
import OptRomFileStatement
+from GenFdsGlobalVariable import GenFdsGlobalVariable
from Common.BuildToolError import *
from Common import EdkLogger
@@ -172,6 +173,7 @@ class FileProfile :
self.InfList = []
self.FdDict = {}
+ self.FdNameNotSet = False
self.FvDict = {}
self.CapsuleDict = {}
self.VtfList = []
@@ -1300,7 +1302,16 @@ class FdfParser:
raise Warning("expected [FD.]", self.FileName, self.CurrentLineNumber)
FdName = self.__GetUiName()
+ if FdName == "":
+ if len (self.Profile.FdDict) == 0:
+ FdName = GenFdsGlobalVariable.PlatformName
+ self.Profile.FdNameNotSet = True
+ else:
+ raise Warning("expected FdName in [FD.] section", self.FileName, self.CurrentLineNumber)
self.CurrentFdName = FdName.upper()
+
+ if self.CurrentFdName in self.Profile.FdDict:
+ raise Warning("Unexpected the same FD name", self.FileName, self.CurrentLineNumber)
if not self.__IsToken( "]"):
raise Warning("expected ']'", self.FileName, self.CurrentLineNumber)
@@ -1308,12 +1319,15 @@ class FdfParser:
FdObj = Fd.FD()
FdObj.FdUiName = self.CurrentFdName
self.Profile.FdDict[self.CurrentFdName] = FdObj
+
+ if len (self.Profile.FdDict) > 1 and self.Profile.FdNameNotSet:
+ raise Warning("expected all FDs have their name", self.FileName, self.CurrentLineNumber)
+
Status = self.__GetCreateFile(FdObj)
if not Status:
raise Warning("FD name error", self.FileName, self.CurrentLineNumber)
- if not self.__GetTokenStatements(FdObj):
- return False
+ self.__GetTokenStatements(FdObj)
self.__GetDefineStatements(FdObj)
@@ -1368,8 +1382,6 @@ class FdfParser:
#
# @param self The object pointer
# @param Obj for whom token statement is got
- # @retval True Successfully find a token statement
- # @retval False Not able to find a token statement
#
def __GetTokenStatements(self, Obj):
if not self.__IsKeyword( "BaseAddress"):
@@ -1419,8 +1431,7 @@ class FdfParser:
Obj.ErasePolarity = self.__Token
- Status = self.__GetBlockStatements(Obj)
- return Status
+ self.__GetBlockStatements(Obj)
## __GetAddressStatements() method
#
@@ -1459,17 +1470,20 @@ class FdfParser:
#
# @param self The object pointer
# @param Obj for whom block statement is got
- # @retval True Successfully find
- # @retval False Not able to find
#
def __GetBlockStatements(self, Obj):
if not self.__GetBlockStatement(Obj):
- raise Warning("expected block statement", self.FileName, self.CurrentLineNumber)
+ #set default block size is 1
+ Obj.BlockSizeList.append((1, Obj.Size, None))
+ return
while self.__GetBlockStatement(Obj):
pass
- return True
+
+ for Item in Obj.BlockSizeList:
+ if Item[0] == None or Item[1] == None:
+ raise Warning("expected block statement for Fd Section", self.FileName, self.CurrentLineNumber)
## __GetBlockStatement() method
#
@@ -1496,7 +1510,7 @@ class FdfParser:
PcdPair = self.__GetNextPcdName()
BlockSizePcd = PcdPair
self.Profile.PcdDict[PcdPair] = BlockSize
- BlockSize = long(self.__Token, 0)
+ BlockSize = long(BlockSize, 0)
BlockNumber = None
if self.__IsKeyword( "NumBlocks"):
@@ -2113,9 +2127,6 @@ class FdfParser:
raise Warning("expected INF file path", self.FileName, self.CurrentLineNumber)
ffsInf.InfFileName = self.__Token
-# if ffsInf.InfFileName.find('$') >= 0:
-# ffsInf.InfFileName = GenFdsGlobalVariable.GenFdsGlobalVariable.MacroExtend(ffsInf.InfFileName, MacroDict)
-
if not ffsInf.InfFileName in self.Profile.InfList:
self.Profile.InfList.append(ffsInf.InfFileName)
@@ -2427,6 +2438,8 @@ class FdfParser:
AlignValue = None
if self.__GetAlignment():
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
BuildNum = None
@@ -2440,6 +2453,8 @@ class FdfParser:
BuildNum = self.__Token
if self.__IsKeyword( "VERSION"):
+ if AlignValue == 'Auto':
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
if not self.__GetNextToken():
@@ -2452,8 +2467,10 @@ class FdfParser:
else:
VerSectionObj.FileName = self.__Token
Obj.SectionList.append(VerSectionObj)
-
+
elif self.__IsKeyword( "UI"):
+ if AlignValue == 'Auto':
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
if not self.__GetNextToken():
@@ -2467,6 +2484,8 @@ class FdfParser:
Obj.SectionList.append(UiSectionObj)
elif self.__IsKeyword( "FV_IMAGE"):
+ if AlignValue == 'Auto':
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
if not self.__GetNextToken():
@@ -2508,6 +2527,8 @@ class FdfParser:
Obj.SectionList.append(FvImageSectionObj)
elif self.__IsKeyword("PEI_DEPEX_EXP") or self.__IsKeyword("DXE_DEPEX_EXP") or self.__IsKeyword("SMM_DEPEX_EXP"):
+ if AlignValue == 'Auto':
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
DepexSectionObj = DepexSection.DepexSection()
DepexSectionObj.Alignment = AlignValue
DepexSectionObj.DepexType = self.__Token
@@ -2523,7 +2544,6 @@ class FdfParser:
Obj.SectionList.append(DepexSectionObj)
else:
-
if not self.__GetNextWord():
raise Warning("expected section type", self.FileName, self.CurrentLineNumber)
@@ -2535,6 +2555,9 @@ class FdfParser:
if self.__Token not in ("COMPAT16", "PE32", "PIC", "TE", "FV_IMAGE", "RAW", "DXE_DEPEX",\
"UI", "VERSION", "PEI_DEPEX", "SUBTYPE_GUID", "SMM_DEPEX"):
raise Warning("Unknown section type '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
+ if AlignValue == 'Auto'and (not self.__Token == 'PE32') and (not self.__Token == 'TE'):
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
+
# DataSection
DataSectionObj = DataSection.DataSection()
DataSectionObj.Alignment = AlignValue
@@ -2684,6 +2707,8 @@ class FdfParser:
AlignValue = None
if self.__GetAlignment():
+ if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
if not self.__GetCglSection(FfsFileObj, AlignValue):
@@ -3013,9 +3038,11 @@ class FdfParser:
AlignValue = ""
if self.__GetAlignment():
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
- AlignValue = self.__Token
+ #For FFS, Auto is default option same to ""
+ if not self.__Token == "Auto":
+ AlignValue = self.__Token
if self.__IsToken("{"):
# Complex file rule expected
@@ -3040,24 +3067,6 @@ class FdfParser:
return Rule
- elif self.__IsToken("|"):
- # Ext rule expected
- Ext = self.__GetFileExtension()
-
- Rule = RuleSimpleFile.RuleSimpleFile()
-
- Rule.FvFileType = Type
- Rule.NameGuid = NameGuid
- Rule.Alignment = AlignValue
- Rule.CheckSum = CheckSum
- Rule.Fixed = Fixed
- Rule.FileExtension = Ext
- Rule.KeyStringList = KeyStringList
- if KeepReloc != None:
- Rule.KeepReloc = KeepReloc
-
- return Rule
-
else:
# Simple file rule expected
if not self.__GetNextWord():
@@ -3076,12 +3085,18 @@ class FdfParser:
if self.__IsKeyword("CheckSum", True):
CheckSum = True
+ SectAlignment = ""
if self.__GetAlignment():
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
- AlignValue = self.__Token
+ if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
+ SectAlignment = self.__Token
- if not self.__GetNextToken():
+ Ext = None
+ if self.__IsToken('|'):
+ Ext = self.__GetFileExtension()
+ elif not self.__GetNextToken():
raise Warning("expected File name", self.FileName, self.CurrentLineNumber)
Rule = RuleSimpleFile.RuleSimpleFile()
@@ -3089,12 +3104,14 @@ class FdfParser:
Rule.FvFileType = Type
Rule.NameGuid = NameGuid
Rule.Alignment = AlignValue
+ Rule.SectAlignment = SectAlignment
Rule.CheckSum = CheckSum
Rule.Fixed = Fixed
- Rule.FileName = self.__Token
Rule.KeyStringList = KeyStringList
if KeepReloc != None:
Rule.KeepReloc = KeepReloc
+ Rule.FileExtension = Ext
+ Rule.FileName = self.__Token
return Rule
## __GetEfiSection() method
@@ -3153,14 +3170,6 @@ class FdfParser:
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
FvImageSectionObj.Alignment = self.__Token
- if self.__IsKeyword("FV"):
- FvImageSectionObj.FvFileType = self.__Token
-
- if self.__GetAlignment():
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
- raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
- FvImageSectionObj.Alignment = self.__Token
-
if self.__IsToken('|'):
FvImageSectionObj.FvFileExtension = self.__GetFileExtension()
elif self.__GetNextToken():
@@ -3224,6 +3233,10 @@ class FdfParser:
EfiSectionObj.BuildNum = self.__Token
if self.__GetAlignment():
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
+ if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):
+ raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
EfiSectionObj.Alignment = self.__Token
if self.__IsKeyword('RELOCS_STRIPPED') or self.__IsKeyword('RELOCS_RETAINED'):
diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py
index e3f2e68fb8..b0b1b00c7e 100644
--- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py
@@ -1,7 +1,7 @@
## @file
# process FFS generation from FILE statement
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -17,14 +17,17 @@
#
import Ffs
import Rule
-from GenFdsGlobalVariable import GenFdsGlobalVariable
import os
import StringIO
import subprocess
+
+from GenFdsGlobalVariable import GenFdsGlobalVariable
from CommonDataClass.FdfClass import FileStatementClassObject
from Common import EdkLogger
from Common.BuildToolError import *
from Common.Misc import GuidStructureByteArrayToGuidString
+from GuidSection import GuidSection
+from FvImageSection import FvImageSection
## generate FFS from FILE
#
@@ -41,11 +44,13 @@ class FileStatement (FileStatementClassObject) :
#
# Generate FFS
#
- # @param self The object pointer
- # @param Dict dictionary contains macro and value pair
- # @retval string Generated FFS file name
+ # @param self The object pointer
+ # @param Dict dictionary contains macro and value pair
+ # @param FvChildAddr Array of the inside FvImage base address
+ # @param FvParentAddr Parent Fv base address
+ # @retval string Generated FFS file name
#
- def GenFfs(self, Dict = {}):
+ def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None):
if self.NameGuid != None and self.NameGuid.startswith('PCD('):
PcdValue = GenFdsGlobalVariable.GetPcdValue(self.NameGuid)
@@ -92,6 +97,15 @@ class FileStatement (FileStatementClassObject) :
for section in self.SectionList :
Index = Index + 1
SecIndex = '%d' %Index
+ # process the inside FvImage from FvSection or GuidSection
+ if FvChildAddr != []:
+ if isinstance(section, FvImageSection):
+ section.FvAddr = FvChildAddr.pop(0)
+ elif isinstance(section, GuidSection):
+ section.FvAddr = FvChildAddr
+ if FvParentAddr != None and isinstance(section, GuidSection):
+ section.FvParentAddr = FvParentAddr
+
sectList, align = section.GenSection(OutputDir, self.NameGuid, SecIndex, self.KeyStringList, None, Dict)
if sectList != []:
for sect in sectList:
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index ac13e4d7d9..b00e5a2178 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -1,7 +1,7 @@
## @file
# process FFS generation from INF statement
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -31,6 +31,9 @@ from Common.Misc import PathClass
from Common.Misc import GuidStructureByteArrayToGuidString
from Common import EdkLogger
from Common.BuildToolError import *
+from GuidSection import GuidSection
+from FvImageSection import FvImageSection
+from Common.Misc import PeImageClass
## generate FFS from INF
#
@@ -90,7 +93,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
self.BaseName = Inf.BaseName
self.ModuleGuid = Inf.Guid
self.ModuleType = Inf.ModuleType
- if Inf.Specification != None and 'PI_SPECIFICATION_VERSION' in Inf.Specification:
+ if Inf.Specification != None and 'PI_SPECIFICATION_VERSION' in Inf.Specification:
self.PiSpecVersion = Inf.Specification['PI_SPECIFICATION_VERSION']
if Inf.AutoGenVersion < 0x00010005:
self.ModuleType = Inf.ComponentType
@@ -105,7 +108,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
self.BaseName = Inf.BaseName
self.ModuleGuid = Inf.Guid
self.ModuleType = Inf.ModuleType
- if Inf.Specification != None and 'PI_SPECIFICATION_VERSION' in Inf.Specification:
+ if Inf.Specification != None and 'PI_SPECIFICATION_VERSION' in Inf.Specification:
self.PiSpecVersion = Inf.Specification['PI_SPECIFICATION_VERSION']
self.VersionString = Inf.Version
self.BinFileList = Inf.Binaries
@@ -118,7 +121,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
if len(self.SourceFileList) != 0 and not self.InDsc:
EdkLogger.warn("GenFds", GENFDS_ERROR, "Module %s NOT found in DSC file; Is it really a binary module?" % (self.InfFileName))
- if self.ModuleType == 'SMM_CORE' and self.PiSpecVersion < 0x0001000A:
+ if self.ModuleType == 'SMM_CORE' and self.PiSpecVersion < 0x0001000A:
EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)
if Inf._Defs != None and len(Inf._Defs) > 0:
@@ -146,11 +149,13 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
# Generate FFS
#
- # @param self The object pointer
- # @param Dict dictionary contains macro and value pair
- # @retval string Generated FFS file name
+ # @param self The object pointer
+ # @param Dict dictionary contains macro and value pair
+ # @param FvChildAddr Array of the inside FvImage base address
+ # @param FvParentAddr Parent Fv base address
+ # @retval string Generated FFS file name
#
- def GenFfs(self, Dict = {}):
+ def GenFfs(self, Dict = {}, FvChildAddr = [], FvParentAddr=None):
#
# Parse Inf file get Module related information
#
@@ -184,7 +189,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
# For Rule has ComplexFile
#
elif isinstance(Rule, RuleComplexFile.RuleComplexFile):
- InputSectList, InputSectAlignments = self.__GenComplexFileSection__(Rule)
+ InputSectList, InputSectAlignments = self.__GenComplexFileSection__(Rule, FvChildAddr, FvParentAddr)
FfsOutput = self.__GenComplexFileFfs__(Rule, InputSectList, InputSectAlignments)
return FfsOutput
@@ -393,8 +398,13 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
FileList = []
OutputFileList = []
+ GenSecInputFile = None
if Rule.FileName != None:
GenSecInputFile = self.__ExtendMacro__(Rule.FileName)
+ if os.path.isabs(GenSecInputFile):
+ GenSecInputFile = os.path.normpath(GenSecInputFile)
+ else:
+ GenSecInputFile = os.path.normpath(os.path.join(self.EfiOutputPath, GenSecInputFile))
else:
FileList, IsSect = Section.Section.GetFileList(self, '', Rule.FileExtension)
@@ -429,6 +439,15 @@ class FfsInfStatement(FfsInfStatementClassObject):
Ffs.Ffs.SectionSuffix[SectionType] + 'SEC' + SecNum
Index = Index + 1
OutputFile = os.path.join(self.OutputPath, GenSecOutputFile)
+ File = GenFdsGlobalVariable.MacroExtend(File, Dict, self.CurrentArch)
+
+ #Get PE Section alignment when align is set to AUTO
+ if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):
+ ImageObj = PeImageClass (File)
+ if ImageObj.SectionAlignment < 0x400:
+ self.Alignment = str (ImageObj.SectionAlignment)
+ else:
+ self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'
if not NoStrip:
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
@@ -438,7 +457,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
StrippedFile = os.path.join(self.OutputPath, ModuleName + '.stipped')
GenFdsGlobalVariable.GenerateFirmwareImage(
StrippedFile,
- [GenFdsGlobalVariable.MacroExtend(File, Dict, self.CurrentArch)],
+ [File],
Strip=True
)
File = StrippedFile
@@ -447,7 +466,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
TeFile = os.path.join( self.OutputPath, self.ModuleGuid + 'Te.raw')
GenFdsGlobalVariable.GenerateFirmwareImage(
TeFile,
- [GenFdsGlobalVariable.MacroExtend(File, Dict, self.CurrentArch)],
+ [File],
Type='te'
)
File = TeFile
@@ -459,6 +478,15 @@ class FfsInfStatement(FfsInfStatementClassObject):
GenSecOutputFile= self.__ExtendMacro__(Rule.NameGuid) + \
Ffs.Ffs.SectionSuffix[SectionType] + 'SEC' + SecNum
OutputFile = os.path.join(self.OutputPath, GenSecOutputFile)
+ GenSecInputFile = GenFdsGlobalVariable.MacroExtend(GenSecInputFile, Dict, self.CurrentArch)
+
+ #Get PE Section alignment when align is set to AUTO
+ if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):
+ ImageObj = PeImageClass (GenSecInputFile)
+ if ImageObj.SectionAlignment < 0x400:
+ self.Alignment = str (ImageObj.SectionAlignment)
+ else:
+ self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'
if not NoStrip:
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
@@ -468,7 +496,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
StrippedFile = os.path.join(self.OutputPath, ModuleName + '.stipped')
GenFdsGlobalVariable.GenerateFirmwareImage(
StrippedFile,
- [GenFdsGlobalVariable.MacroExtend(GenSecInputFile, Dict, self.CurrentArch)],
+ [GenSecInputFile],
Strip=True
)
GenSecInputFile = StrippedFile
@@ -477,7 +505,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
TeFile = os.path.join( self.OutputPath, self.ModuleGuid + 'Te.raw')
GenFdsGlobalVariable.GenerateFirmwareImage(
TeFile,
- [GenFdsGlobalVariable.MacroExtend(File, Dict, self.CurrentArch)],
+ [GenSecInputFile],
Type='te'
)
GenSecInputFile = TeFile
@@ -507,7 +535,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
SectionAlignments = []
for InputFile in InputFileList:
InputSection.append(InputFile)
- SectionAlignments.append(Rule.Alignment)
+ SectionAlignments.append(Rule.SectAlignment)
if Rule.NameGuid != None and Rule.NameGuid.startswith('PCD('):
PcdValue = GenFdsGlobalVariable.GetPcdValue(Rule.NameGuid)
@@ -534,11 +562,13 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
# Generate section by sections in Rule
#
- # @param self The object pointer
- # @param Rule The rule object used to generate section
- # @retval string File name of the generated section file
+ # @param self The object pointer
+ # @param Rule The rule object used to generate section
+ # @param FvChildAddr Array of the inside FvImage base address
+ # @param FvParentAddr Parent Fv base address
+ # @retval string File name of the generated section file
#
- def __GenComplexFileSection__(self, Rule):
+ def __GenComplexFileSection__(self, Rule, FvChildAddr, FvParentAddr):
if self.ModuleType in ('SEC', 'PEI_CORE', 'PEIM'):
if Rule.KeepReloc != None:
self.KeepRelocFromRule = Rule.KeepReloc
@@ -560,6 +590,17 @@ class FfsInfStatement(FfsInfStatementClassObject):
if self.ModuleType == 'DXE_SMM_DRIVER' and self.PiSpecVersion < 0x0001000A:
if Sect.SectionType == 'SMM_DEPEX':
EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "Framework SMM module doesn't support SMM_DEPEX section type", File=self.InfFileName)
+ #
+ # process the inside FvImage from FvSection or GuidSection
+ #
+ if FvChildAddr != []:
+ if isinstance(Sect, FvImageSection):
+ Sect.FvAddr = FvChildAddr.pop(0)
+ elif isinstance(Sect, GuidSection):
+ Sect.FvAddr = FvChildAddr
+ if FvParentAddr != None and isinstance(Sect, GuidSection):
+ Sect.FvParentAddr = FvParentAddr
+
if Rule.KeyStringList != []:
SectList, Align = Sect.GenSection(self.OutputPath , self.ModuleGuid, SecIndex, Rule.KeyStringList, self)
else :
diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py
index 6190bceba8..8d2ef1d874 100644
--- a/BaseTools/Source/Python/GenFds/Fv.py
+++ b/BaseTools/Source/Python/GenFds/Fv.py
@@ -1,7 +1,7 @@
## @file
# process FV generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -63,7 +63,7 @@ class FV (FvClassObject):
#
def AddToBuffer (self, Buffer, BaseAddress=None, BlockSize= None, BlockNum=None, ErasePloarity='1', VtfDict=None, MacroDict = {}) :
- if self.UiFvName.upper() + 'fv' in GenFds.ImageBinDict.keys():
+ if BaseAddress == None and self.UiFvName.upper() + 'fv' in GenFds.ImageBinDict.keys():
return GenFds.ImageBinDict[self.UiFvName.upper() + 'fv']
#
@@ -103,7 +103,7 @@ class FV (FvClassObject):
# Process Modules in FfsList
for FfsFile in self.FfsList :
- FileName = FfsFile.GenFfs(MacroDict)
+ FileName = FfsFile.GenFfs(MacroDict, FvParentAddr=BaseAddress)
FfsFileList.append(FileName)
self.FvInfFile.writelines("EFI_FILE_NAME = " + \
FileName + \
@@ -122,6 +122,9 @@ class FV (FvClassObject):
FvInfoFileName = os.path.join(GenFdsGlobalVariable.FfsDir, self.UiFvName + '.inf')
shutil.copy(GenFdsGlobalVariable.FvAddressFileName, FvInfoFileName)
+ OrigFvInfo = None
+ if os.path.exists (FvInfoFileName):
+ OrigFvInfo = open(FvInfoFileName, 'r').read()
GenFdsGlobalVariable.GenerateFirmwareVolume(
FvOutputFile,
[self.InfFileName],
@@ -129,6 +132,35 @@ class FV (FvClassObject):
FfsList=FfsFileList
)
+ NewFvInfo = None
+ if os.path.exists (FvInfoFileName):
+ NewFvInfo = open(FvInfoFileName, 'r').read()
+ if NewFvInfo != None and NewFvInfo != OrigFvInfo:
+ FvChildAddr = []
+ AddFileObj = open(FvInfoFileName, 'r')
+ AddrStrings = AddFileObj.readlines()
+ AddrKeyFound = False
+ for AddrString in AddrStrings:
+ if AddrKeyFound:
+ #get base address for the inside FvImage
+ FvChildAddr.append (AddrString)
+ elif AddrString.find ("[FV_BASE_ADDRESS]") != -1:
+ AddrKeyFound = True
+ AddFileObj.close()
+
+ if FvChildAddr != []:
+ # Update Ffs again
+ for FfsFile in self.FfsList :
+ FileName = FfsFile.GenFfs(MacroDict, FvChildAddr, BaseAddress)
+
+ #Update GenFv again
+ GenFdsGlobalVariable.GenerateFirmwareVolume(
+ FvOutputFile,
+ [self.InfFileName],
+ AddressFile=FvInfoFileName,
+ FfsList=FfsFileList
+ )
+
#
# Write the Fv contents to Buffer
#
@@ -138,6 +170,21 @@ class FV (FvClassObject):
GenFdsGlobalVariable.SharpCounter = 0
Buffer.write(FvFileObj.read())
+ FvFileObj.seek(0)
+ # PI FvHeader is 0x48 byte
+ FvHeaderBuffer = FvFileObj.read(0x48)
+ # FV alignment position.
+ FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F)
+ # FvAlignmentValue is larger than or equal to 1K
+ if FvAlignmentValue >= 0x400:
+ if FvAlignmentValue >= 0x10000:
+ #The max alignment supported by FFS is 64K.
+ self.FvAlignment = "64K"
+ else:
+ self.FvAlignment = str (FvAlignmentValue / 0x400) + "K"
+ else:
+ # FvAlignmentValue is less than 1K
+ self.FvAlignment = str (FvAlignmentValue)
FvFileObj.close()
GenFds.ImageBinDict[self.UiFvName.upper() + 'fv'] = FvOutputFile
return FvOutputFile
@@ -179,6 +226,10 @@ class FV (FvClassObject):
' 0x%X' %BlockNum + \
T_CHAR_LF)
else:
+ if self.BlockSizeList == []:
+ #set default block size is 1
+ self.FvInfFile.writelines("EFI_BLOCK_SIZE = 0x1" + T_CHAR_LF)
+
for BlockSize in self.BlockSizeList :
if BlockSize[0] != None:
self.FvInfFile.writelines("EFI_BLOCK_SIZE = " + \
diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py
index 3a3e714228..c945ce9b9b 100644
--- a/BaseTools/Source/Python/GenFds/FvImageSection.py
+++ b/BaseTools/Source/Python/GenFds/FvImageSection.py
@@ -73,7 +73,13 @@ class FvImageSection(FvImageSectionClassObject):
Fv = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName)
if Fv != None:
self.Fv = Fv
- FvFileName = self.Fv.AddToBuffer(Buffer, MacroDict = Dict)
+ FvFileName = Fv.AddToBuffer(Buffer, self.FvAddr, MacroDict = Dict)
+ if Fv.FvAlignment != None:
+ if self.Alignment == None:
+ self.Alignment = Fv.FvAlignment
+ else:
+ if GenFdsGlobalVariable.GetAlignment (Fv.FvAlignment) > GenFdsGlobalVariable.GetAlignment (self.Alignment):
+ self.Alignment = Fv.FvAlignment
else:
if self.FvFileName != None:
FvFileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FvFileName)
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index 1df19100d3..1285103f5e 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -1,7 +1,7 @@
## @file
# generate flash image
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -39,7 +39,7 @@ from Common.Misc import DirCache,PathClass
## Version and Copyright
versionNumber = "1.0"
__version__ = "%prog Version " + versionNumber
-__copyright__ = "Copyright (c) 2007, Intel Corporation All rights reserved."
+__copyright__ = "Copyright (c) 2007 - 2010, Intel Corporation All rights reserved."
## Tool entrance method
#
@@ -94,6 +94,18 @@ def main():
if (Options.filename):
FdfFilename = Options.filename
FdfFilename = GenFdsGlobalVariable.ReplaceWorkspaceMacro(FdfFilename)
+
+ if FdfFilename[0:2] == '..':
+ FdfFilename = os.path.realpath(FdfFilename)
+ if not os.path.isabs (FdfFilename):
+ FdfFilename = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, FdfFilename)
+ if not os.path.exists(FdfFilename):
+ EdkLogger.error("GenFds", FILE_NOT_FOUND, ExtraData=FdfFilename)
+ if os.path.normcase (FdfFilename).find(Workspace) != 0:
+ EdkLogger.error("GenFds", FILE_NOT_FOUND, "FdfFile doesn't exist in Workspace!")
+
+ GenFdsGlobalVariable.FdfFile = FdfFilename
+ GenFdsGlobalVariable.FdfFileTimeStamp = os.path.getmtime(FdfFilename)
else:
EdkLogger.error("GenFds", OPTION_MISSING, "Missing FDF filename")
@@ -107,16 +119,6 @@ def main():
else:
EdkLogger.error("GenFds", OPTION_MISSING, "Missing tool chain tag")
- if FdfFilename[0:2] == '..':
- FdfFilename = os.path.realpath(FdfFilename)
- if FdfFilename[1] != ':':
- FdfFilename = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, FdfFilename)
-
- if not os.path.exists(FdfFilename):
- EdkLogger.error("GenFds", FILE_NOT_FOUND, ExtraData=FdfFilename)
- GenFdsGlobalVariable.FdfFile = FdfFilename
- GenFdsGlobalVariable.FdfFileTimeStamp = os.path.getmtime(FdfFilename)
-
if (Options.activePlatform):
ActivePlatform = Options.activePlatform
ActivePlatform = GenFdsGlobalVariable.ReplaceWorkspaceMacro(ActivePlatform)
@@ -124,22 +126,22 @@ def main():
if ActivePlatform[0:2] == '..':
ActivePlatform = os.path.realpath(ActivePlatform)
- if ActivePlatform[1] != ':':
+ if not os.path.isabs (ActivePlatform):
ActivePlatform = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, ActivePlatform)
if not os.path.exists(ActivePlatform) :
EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist!")
- if ActivePlatform.find(Workspace) == -1:
+ if os.path.normcase (ActivePlatform).find(Workspace) != 0:
EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist in Workspace!")
- ActivePlatform = ActivePlatform.replace(Workspace, '')
+ ActivePlatform = ActivePlatform[len(Workspace):]
if len(ActivePlatform) > 0 :
if ActivePlatform[0] == '\\' or ActivePlatform[0] == '/':
ActivePlatform = ActivePlatform[1:]
else:
EdkLogger.error("GenFds", FILE_NOT_FOUND, "ActivePlatform doesn't exist!")
- else :
+ else:
EdkLogger.error("GenFds", OPTION_MISSING, "Missing active platform")
GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform), Workspace)
@@ -190,9 +192,14 @@ def main():
for Arch in ArchList:
GenFdsGlobalVariable.OutputDirFromDscDict[Arch] = NormPath(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch].OutputDirectory)
+ GenFdsGlobalVariable.PlatformName = BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch].PlatformName
if (Options.outputDir):
OutputDirFromCommandLine = GenFdsGlobalVariable.ReplaceWorkspaceMacro(Options.outputDir)
+ if not os.path.isabs (Options.outputDir):
+ Options.outputDir = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, Options.outputDir)
+ if os.path.normcase (Options.outputDir).find(Workspace) != 0:
+ EdkLogger.error("GenFds", FILE_NOT_FOUND, "OutputDir doesn't exist in Workspace!")
for Arch in ArchList:
GenFdsGlobalVariable.OutputDirDict[Arch] = OutputDirFromCommandLine
else:
@@ -237,10 +244,13 @@ def main():
GenFds.PreprocessImage(BuildWorkSpace, GenFdsGlobalVariable.ActivePlatform)
"""Call GenFds"""
GenFds.GenFd('', FdfParserObj, BuildWorkSpace, ArchList)
-
+
+ """Generate GUID cross reference file"""
+ GenFds.GenerateGuidXRefFile(BuildWorkSpace, ArchList)
+
"""Display FV space info."""
GenFds.DisplayFvSpaceInfo(FdfParserObj)
-
+
except FdfParser.Warning, X:
EdkLogger.error(X.ToolName, FORMAT_INVALID, File=X.FileName, Line=X.LineNumber, ExtraData=X.Message, RaiseError = False)
ReturnCode = FORMAT_INVALID
@@ -352,7 +362,7 @@ class GenFds :
# Get FV base Address
FvObj.AddToBuffer(Buffer, None, GenFds.GetFvBlockSize(FvObj))
Buffer.close()
-
+
if GenFds.OnlyGenerateThisFv == None and GenFds.OnlyGenerateThisFd == None:
if GenFdsGlobalVariable.FdfParser.Profile.CapsuleDict != {}:
GenFdsGlobalVariable.VerboseLogger("\n Generate other Capsule images!")
@@ -372,7 +382,7 @@ class GenFds :
# @retval int Block size value
#
def GetFvBlockSize(FvObj):
- DefaultBlockSize = 0x10000
+ DefaultBlockSize = 0x1
FdObj = None
if GenFds.OnlyGenerateThisFd != None and GenFds.OnlyGenerateThisFd.upper() in GenFdsGlobalVariable.FdfParser.Profile.FdDict.keys():
FdObj = GenFdsGlobalVariable.FdfParser.Profile.FdDict[GenFds.OnlyGenerateThisFd.upper()]
@@ -476,11 +486,23 @@ class GenFds :
ModuleObj = BuildDb.BuildObject[Key, 'COMMON']
print ModuleObj.BaseName + ' ' + ModuleObj.ModuleType
+ def GenerateGuidXRefFile(BuildDb, ArchList):
+ GuidXRefFileName = os.path.join(GenFdsGlobalVariable.FvDir, "Guid.xref")
+ GuidXRefFile = open(GuidXRefFileName, "w+")
+ for Arch in ArchList:
+ PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch]
+ for ModuleFile in PlatformDataBase.Modules:
+ Module = BuildDb.BuildObject[ModuleFile, Arch]
+ GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName))
+ GuidXRefFile.close()
+ GenFdsGlobalVariable.InfLogger("\nGUID cross reference file saved to %s" % GuidXRefFileName)
+
##Define GenFd as static function
GenFd = staticmethod(GenFd)
GetFvBlockSize = staticmethod(GetFvBlockSize)
DisplayFvSpaceInfo = staticmethod(DisplayFvSpaceInfo)
PreprocessImage = staticmethod(PreprocessImage)
+ GenerateGuidXRefFile = staticmethod(GenerateGuidXRefFile)
if __name__ == '__main__':
r = main()
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index b54e8c88e2..cad2758627 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -1,7 +1,7 @@
## @file
# Global variables for GenFds
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -54,6 +54,7 @@ class GenFdsGlobalVariable:
FdfFile = ''
FdfFileTimeStamp = 0
FixedLoadAddress = False
+ PlatformName = ''
SectionHeader = struct.Struct("3B 1B")
@@ -154,7 +155,7 @@ class GenFdsGlobalVariable:
@staticmethod
def GenerateSection(Output, Input, Type=None, CompressionType=None, Guid=None,
- GuidHdrLen=None, GuidAttr=None, Ui=None, Ver=None):
+ GuidHdrLen=None, GuidAttr=[], Ui=None, Ver=None, InputAlign=None):
if not GenFdsGlobalVariable.NeedsUpdate(Output, Input):
return
GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, Input))
@@ -168,8 +169,14 @@ class GenFdsGlobalVariable:
Cmd += ["-g", Guid]
if GuidHdrLen not in [None, '']:
Cmd += ["-l", GuidHdrLen]
- if GuidAttr not in [None, '']:
- Cmd += ["-r", GuidAttr]
+ if len(GuidAttr) != 0:
+ #Add each guided attribute
+ for Attr in GuidAttr:
+ Cmd += ["-r", Attr]
+ if InputAlign != None:
+ #Section Align is only for dummy section without section type
+ for SecAlign in InputAlign:
+ Cmd += ["--sectionalign", SecAlign]
if Ui not in [None, '']:
#Cmd += ["-n", '"' + Ui + '"']
@@ -195,6 +202,15 @@ class GenFdsGlobalVariable:
GenFdsGlobalVariable.CallExternalTool(Cmd, "Failed to generate section")
@staticmethod
+ def GetAlignment (AlignString):
+ if AlignString == None:
+ return 0
+ if AlignString in ("1K", "2K", "4K", "8K", "16K", "32K", "64K"):
+ return int (AlignString.rstrip('K')) * 1024
+ else:
+ return int (AlignString)
+
+ @staticmethod
def GenerateFfs(Output, Input, Type, Guid, Fixed=False, CheckSum=False, Align=None,
SectionAlign=None):
if not GenFdsGlobalVariable.NeedsUpdate(Output, Input):
@@ -331,18 +347,19 @@ class GenFdsGlobalVariable:
GenFdsGlobalVariable.CallExternalTool(Cmd, "Failed to generate option rom")
@staticmethod
- def GuidTool(Output, Input, ToolPath, Options=''):
+ def GuidTool(Output, Input, ToolPath, Options='', returnValue=[]):
if not GenFdsGlobalVariable.NeedsUpdate(Output, Input):
return
GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, Input))
- Cmd = [ToolPath, Options]
+ Cmd = [ToolPath, ]
+ Cmd += Options.split(' ')
Cmd += ["-o", Output]
Cmd += Input
- GenFdsGlobalVariable.CallExternalTool(Cmd, "Failed to call " + ToolPath)
+ GenFdsGlobalVariable.CallExternalTool(Cmd, "Failed to call " + ToolPath, returnValue)
- def CallExternalTool (cmd, errorMess):
+ def CallExternalTool (cmd, errorMess, returnValue=[]):
if type(cmd) not in (tuple, list):
GenFdsGlobalVariable.ErrorLogger("ToolError! Invalid parameter type in call to CallExternalTool")
@@ -369,6 +386,10 @@ class GenFdsGlobalVariable:
while PopenObject.returncode == None :
PopenObject.wait()
+ if returnValue != [] and returnValue[0] != 0:
+ #get command return value
+ returnValue[0] = PopenObject.returncode
+ return
if PopenObject.returncode != 0 or GenFdsGlobalVariable.VerboseMode or GenFdsGlobalVariable.DebugLevel != -1:
GenFdsGlobalVariable.InfLogger ("Return Value = %d" %PopenObject.returncode)
GenFdsGlobalVariable.InfLogger (out)
diff --git a/BaseTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds/GuidSection.py
index e111e0fe50..d967880472 100644
--- a/BaseTools/Source/Python/GenFds/GuidSection.py
+++ b/BaseTools/Source/Python/GenFds/GuidSection.py
@@ -1,7 +1,7 @@
## @file
# process GUIDed section generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -25,6 +25,7 @@ from Common import ToolDefClassObject
import sys
from Common import EdkLogger
from Common.BuildToolError import *
+from FvImageSection import FvImageSection
## generate GUIDed section
#
@@ -63,16 +64,57 @@ class GuidSection(GuidSectionClassObject) :
self.SectionType = FfsInf.__ExtendMacro__(self.SectionType)
self.CurrentArchList = [FfsInf.CurrentArch]
- SectFile = tuple()
+ SectFile = tuple()
+ SectAlign = []
Index = 0
+ MaxAlign = None
+ if self.FvAddr != []:
+ FvAddrIsSet = True
+ else:
+ FvAddrIsSet = False
+
+ if self.ProcessRequired in ("TRUE", "1"):
+ if self.FvAddr != []:
+ #no use FvAddr when the image is processed.
+ self.FvAddr = []
+ if self.FvParentAddr != None:
+ #no use Parent Addr when the image is processed.
+ self.FvParentAddr = None
+
for Sect in self.SectionList:
Index = Index + 1
SecIndex = '%s.%d' %(SecNum,Index)
+ # set base address for inside FvImage
+ if isinstance(Sect, FvImageSection):
+ if self.FvAddr != []:
+ Sect.FvAddr = self.FvAddr.pop(0)
+ self.IncludeFvSection = True
+ elif isinstance(Sect, GuidSection):
+ Sect.FvAddr = self.FvAddr
+ Sect.FvParentAddr = self.FvParentAddr
ReturnSectList, align = Sect.GenSection(OutputPath, ModuleName, SecIndex, KeyStringList,FfsInf, Dict)
+ if isinstance(Sect, GuidSection):
+ if Sect.IncludeFvSection:
+ self.IncludeFvSection = Sect.IncludeFvSection
+
+ if align != None:
+ if MaxAlign == None:
+ MaxAlign = align
+ if GenFdsGlobalVariable.GetAlignment (align) > GenFdsGlobalVariable.GetAlignment (MaxAlign):
+ MaxAlign = align
if ReturnSectList != []:
+ if align == None:
+ align = "1"
for file in ReturnSectList:
SectFile += (file,)
+ SectAlign.append(align)
+ if MaxAlign != None:
+ if self.Alignment == None:
+ self.Alignment = MaxAlign
+ else:
+ if GenFdsGlobalVariable.GetAlignment (MaxAlign) > GenFdsGlobalVariable.GetAlignment (self.Alignment):
+ self.Alignment = MaxAlign
OutputFile = OutputPath + \
os.sep + \
@@ -83,15 +125,17 @@ class GuidSection(GuidSectionClassObject) :
OutputFile = os.path.normpath(OutputFile)
ExternalTool = None
+ ExternalOption = None
if self.NameGuid != None:
- ExternalTool = self.__FindExtendTool__()
+ ExternalTool, ExternalOption = self.__FindExtendTool__()
+
#
# If not have GUID , call default
# GENCRC32 section
#
if self.NameGuid == None :
GenFdsGlobalVariable.VerboseLogger( "Use GenSection function Generate CRC32 Section")
- GenFdsGlobalVariable.GenerateSection(OutputFile, SectFile, Section.Section.SectionType[self.SectionType])
+ GenFdsGlobalVariable.GenerateSection(OutputFile, SectFile, Section.Section.SectionType[self.SectionType], InputAlign=SectAlign)
OutputFileList = []
OutputFileList.append(OutputFile)
return OutputFileList, self.Alignment
@@ -99,14 +143,14 @@ class GuidSection(GuidSectionClassObject) :
elif ExternalTool == None:
EdkLogger.error("GenFds", GENFDS_ERROR, "No tool found with GUID %s" % self.NameGuid)
else:
+ DummyFile = OutputFile+".dummy"
#
# Call GenSection with DUMMY section type.
#
- GenFdsGlobalVariable.GenerateSection(OutputFile+".dummy", SectFile)
+ GenFdsGlobalVariable.GenerateSection(DummyFile, SectFile, InputAlign=SectAlign)
#
# Use external tool process the Output
#
- InputFile = OutputFile+".dummy"
TempFile = OutputPath + \
os.sep + \
ModuleName + \
@@ -115,30 +159,76 @@ class GuidSection(GuidSectionClassObject) :
'.tmp'
TempFile = os.path.normpath(TempFile)
- ExternalToolCmd = (
- ExternalTool,
- '-e',
- '-o', TempFile,
- InputFile,
- )
-
+ FirstCall = False
+ CmdOption = '-e'
+ if ExternalOption != None:
+ CmdOption = CmdOption + ' ' + ExternalOption
+ if self.ProcessRequired not in ("TRUE", "1") and self.IncludeFvSection and not FvAddrIsSet and self.FvParentAddr != None:
+ #FirstCall is only set for the encapsulated flash FV image without process required attribute.
+ FirstCall = True
#
# Call external tool
#
- GenFdsGlobalVariable.GuidTool(TempFile, [InputFile], ExternalTool, '-e')
+ ReturnValue = [1]
+ if FirstCall:
+ #first try to call the guided tool with -z option and CmdOption for the no process required guided tool.
+ GenFdsGlobalVariable.GuidTool(TempFile, [DummyFile], ExternalTool, '-z' + ' ' + CmdOption, ReturnValue)
#
- # Call Gensection Add Secntion Header
+ # when no call or first call failed, ReturnValue are not 1.
+ # Call the guided tool with CmdOption
#
- Attribute = None
- if self.ProcessRequired == True:
- Attribute = 'PROCSSING_REQUIRED'
- if self.AuthStatusValid == True:
- Attribute = 'AUTH_STATUS_VALID'
+ if ReturnValue[0] != 0:
+ FirstCall = False
+ ReturnValue[0] = 0
+ GenFdsGlobalVariable.GuidTool(TempFile, [DummyFile], ExternalTool, CmdOption)
+
+ FileHandleIn = open(DummyFile,'rb')
+ FileHandleIn.seek(0,2)
+ InputFileSize = FileHandleIn.tell()
+
+ FileHandleOut = open(TempFile,'rb')
+ FileHandleOut.seek(0,2)
+ TempFileSize = FileHandleOut.tell()
+
+ Attribute = []
+ HeaderLength = None
+ if TempFileSize > InputFileSize and TempFileSize % 4 == 0:
+ FileHandleIn.seek(0)
+ BufferIn = FileHandleIn.read()
+ FileHandleOut.seek(0)
+ BufferOut = FileHandleOut.read()
+ if BufferIn == BufferOut[TempFileSize - InputFileSize:]:
+ HeaderLength = str(TempFileSize - InputFileSize)
+ #auto sec guided attribute with process required
+ if HeaderLength == None:
+ Attribute.append('PROCESSING_REQUIRED')
+
+ FileHandleIn.close()
+ FileHandleOut.close()
+
+ if FirstCall and 'PROCESSING_REQUIRED' in Attribute:
+ # Guided data by -z option on first call is the process required data. Call the guided tool with the real option.
+ GenFdsGlobalVariable.GuidTool(TempFile, [DummyFile], ExternalTool, CmdOption)
+
+ #
+ # Call Gensection Add Section Header
+ #
+ if self.ProcessRequired in ("TRUE", "1"):
+ if 'PROCESSING_REQUIRED' not in Attribute:
+ Attribute.append('PROCESSING_REQUIRED')
+ HeaderLength = None
+ if self.AuthStatusValid in ("TRUE", "1"):
+ Attribute.append('AUTH_STATUS_VALID')
GenFdsGlobalVariable.GenerateSection(OutputFile, [TempFile], Section.Section.SectionType['GUIDED'],
- Guid=self.NameGuid, GuidAttr=Attribute)
+ Guid=self.NameGuid, GuidAttr=Attribute, GuidHdrLen=HeaderLength)
OutputFileList = []
OutputFileList.append(OutputFile)
+ if 'PROCESSING_REQUIRED' in Attribute:
+ # reset guided section alignment to none for the processed required guided data
+ self.Alignment = None
+ self.IncludeFvSection = False
+ self.ProcessRequired = "TRUE"
return OutputFileList, self.Alignment
## __FindExtendTool()
@@ -177,6 +267,12 @@ class GuidSection(GuidSectionClassObject) :
KeyList[3] + \
'_' + \
'PATH')
+
+ ToolOption = ToolDefinition.get( Key + \
+ '_' + \
+ KeyList[3] + \
+ '_' + \
+ 'FLAGS')
if ToolPathTmp == None:
ToolPathTmp = ToolPath
else:
@@ -184,7 +280,7 @@ class GuidSection(GuidSectionClassObject) :
EdkLogger.error("GenFds", GENFDS_ERROR, "Don't know which tool to use, %s or %s ?" % (ToolPathTmp, ToolPath))
- return ToolPathTmp
+ return ToolPathTmp, ToolOption
diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
index 1905935ebf..2e24697a3d 100644
--- a/BaseTools/Source/Python/GenFds/Section.py
+++ b/BaseTools/Source/Python/GenFds/Section.py
@@ -140,7 +140,6 @@ class Section (SectionClassObject):
GenFdsGlobalVariable.InfLogger ("\nCurrent ARCH \'%s\' of File %s is not in the Support Arch Scope of %s specified by INF %s in FDF" %(FfsInf.CurrentArch, File.File, File.Arch, FfsInf.InfFileName))
if Suffix != None and os.path.exists(FfsInf.EfiOutputPath):
-# FileList.extend(glob.glob(os.path.join(FfsInf.EfiOutputPath, "*" + Suffix)))
# Update to search files with suffix in all sub-dirs.
Tuple = os.walk(FfsInf.EfiOutputPath)
for Dirpath, Dirnames, Filenames in Tuple:
@@ -149,5 +148,9 @@ class Section (SectionClassObject):
FullName = os.path.join(Dirpath, F)
FileList.append(FullName)
+ #Process the file lists is alphabetical for a same section type
+ if len (FileList) > 1:
+ FileList.sort()
+
return FileList, IsSect
GetFileList = staticmethod(GetFileList)
diff --git a/BaseTools/Source/Python/GenFds/__init__.py b/BaseTools/Source/Python/GenFds/__init__.py
index e69de29bb2..1c5796affe 100644
--- a/BaseTools/Source/Python/GenFds/__init__.py
+++ b/BaseTools/Source/Python/GenFds/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'GenFds' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
new file mode 100644
index 0000000000..38398221dc
--- /dev/null
+++ b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
@@ -0,0 +1,189 @@
+## @file
+# Generate PCD table for 'Patchable In Module' type PCD with given .map file.
+# The Patch PCD table like:
+#
+# PCD Name Offset in binary
+# ======== ================
+#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+
+#====================================== External Libraries ========================================
+import optparse
+import os
+import re
+import array
+
+from Common.BuildToolError import *
+import Common.EdkLogger as EdkLogger
+from Common.Misc import PeImageClass
+
+# Version and Copyright
+__version_number__ = "0.10"
+__version__ = "%prog Version " + __version_number__
+__copyright__ = "Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved."
+
+#====================================== Internal Libraries ========================================
+
+#============================================== Code ===============================================
+secRe = re.compile('^([\da-fA-F]+):([\da-fA-F]+) +([\da-fA-F]+)[Hh]? +([.\w\$]+) +(\w+)', re.UNICODE)
+symRe = re.compile('^([\da-fA-F]+):([\da-fA-F]+) +([\.:\\\\\w\?@\$]+) +([\da-fA-F]+)', re.UNICODE)
+
+def parsePcdInfoFromMapFile(mapfilepath, efifilepath):
+ """ Parse map file to get binary patch pcd information
+ @param path Map file absolution path
+
+ @return a list which element hold (PcdName, Offset, SectionName)
+ """
+ lines = []
+ try:
+ f = open(mapfilepath, 'r')
+ lines = f.readlines()
+ f.close()
+ except:
+ return None
+
+ if len(lines) == 0: return None
+ if lines[0].strip().find("Archive member included because of file (symbol)") != -1:
+ return _parseForGCC(lines)
+ return _parseGeneral(lines, efifilepath)
+
+def _parseForGCC(lines):
+ """ Parse map file generated by GCC linker """
+ status = 0
+ imageBase = -1
+ lastSectionName = None
+ pcds = []
+ for line in lines:
+ line = line.strip()
+ # status machine transection
+ if status == 0 and line == "Linker script and memory map":
+ status = 1
+ continue
+ elif status == 1 and line == 'START GROUP':
+ status = 2
+ continue
+
+ # status handler:
+ if status == 1:
+ m = re.match('^[\da-fA-FxhH]+ +__image_base__ += +([\da-fA-FhxH]+)', line)
+ if m != None:
+ imageBase = int(m.groups(0)[0], 16)
+ if status == 2:
+ m = re.match('^([\w_\.]+) +([\da-fA-Fx]+) +([\da-fA-Fx]+)', line)
+ if m != None:
+ lastSectionName = m.groups(0)[0]
+ if status == 2:
+ m = re.match("^([\da-fA-Fx]+) +[_]+gPcd_BinaryPatch_([\w_\d]+)", line)
+ if m != None:
+ assert imageBase != -1, "Fail to get Binary PCD offsest for unknown image base address"
+ pcds.append((m.groups(0)[1], int(m.groups(0)[0], 16) - imageBase, lastSectionName))
+ return pcds
+
+def _parseGeneral(lines, efifilepath):
+ """ For MSFT, ICC, EBC
+ @param lines line array for map file
+
+ @return a list which element hold (PcdName, Offset, SectionName)
+ """
+ status = 0 #0 - beginning of file; 1 - PE section definition; 2 - symbol table
+ secs = [] # key = section name
+ bPcds = []
+
+
+ for line in lines:
+ line = line.strip()
+ if re.match("^Start[' ']+Length[' ']+Name[' ']+Class", line):
+ status = 1
+ continue
+ if re.match("^Address[' ']+Publics by Value[' ']+Rva\+Base", line):
+ status = 2
+ continue
+ if re.match("^entry point at", line):
+ status = 3
+ continue
+ if status == 1 and len(line) != 0:
+ m = secRe.match(line)
+ assert m != None, "Fail to parse the section in map file , line is %s" % line
+ sec_no, sec_start, sec_length, sec_name, sec_class = m.groups(0)
+ secs.append([int(sec_no, 16), int(sec_start, 16), int(sec_length, 16), sec_name, sec_class])
+ if status == 2 and len(line) != 0:
+ m = symRe.match(line)
+ assert m != None, "Fail to parse the symbol in map file, line is %s" % line
+ sec_no, sym_offset, sym_name, vir_addr = m.groups(0)
+ sec_no = int(sec_no, 16)
+ sym_offset = int(sym_offset, 16)
+ vir_addr = int(vir_addr, 16)
+ m2 = re.match('^[_]+gPcd_BinaryPatch_([\w]+)', sym_name)
+ if m2 != None:
+ # fond a binary pcd entry in map file
+ for sec in secs:
+ if sec[0] == sec_no and (sym_offset >= sec[1] and sym_offset < sec[1] + sec[2]):
+ bPcds.append([m2.groups(0)[0], sec[3], sym_offset, vir_addr, sec_no])
+
+ if len(bPcds) == 0: return None
+
+ # get section information from efi file
+ efisecs = PeImageClass(efifilepath).SectionHeaderList
+ if efisecs == None or len(efisecs) == 0:
+ return None
+
+ pcds = []
+ for pcd in bPcds:
+ index = 0
+ for efisec in efisecs:
+ index = index + 1
+ if pcd[1].strip() == efisec[0].strip():
+ pcds.append([pcd[0], efisec[2] + pcd[2], efisec[0]])
+ elif pcd[4] == index:
+ pcds.append([pcd[0], efisec[2] + pcd[2], efisec[0]])
+ return pcds
+
+def generatePcdTable(list, pcdpath):
+ try:
+ f = open(pcdpath, 'w')
+ except:
+ pass
+
+ f.write('PCD Name Offset Section Name\r\n')
+
+ for pcditem in list:
+ f.write('%-30s 0x%-08X %-6s\r\n' % (pcditem[0], pcditem[1], pcditem[2]))
+ f.close()
+
+ #print 'Success to generate Binary Patch PCD table at %s!' % pcdpath
+
+if __name__ == '__main__':
+ UsageString = "%prog -m <MapFile> -e <EfiFile> -o <OutFile>"
+ AdditionalNotes = "\nPCD table is generated in file name with .BinaryPcdTable.txt postfix"
+ parser = optparse.OptionParser(description=__copyright__, version=__version__, usage=UsageString)
+ parser.add_option('-m', '--mapfile', action='store', dest='mapfile',
+ help='Absolute path of module map file.')
+ parser.add_option('-e', '--efifile', action='store', dest='efifile',
+ help='Absolute path of EFI binary file.')
+ parser.add_option('-o', '--outputfile', action='store', dest='outfile',
+ help='Absolute path of output file to store the got patchable PCD table.')
+
+ (options, args) = parser.parse_args()
+
+ if options.mapfile == None or options.efifile == None:
+ print parser.get_usage()
+ elif os.path.exists(options.mapfile) and os.path.exists(options.efifile):
+ list = parsePcdInfoFromMapFile(options.mapfile, options.efifile)
+ if list != None:
+ if options.outfile != None:
+ generatePcdTable(list, options.outfile)
+ else:
+ generatePcdTable(list, options.mapfile.replace('.map', '.BinaryPcdTable.txt'))
+ else:
+ print 'Fail to generate Patch PCD Table based on map file and efi file'
+ else:
+ print 'Fail to generate Patch PCD Table for fail to find map file or efi file!'
diff --git a/BaseTools/Source/Python/GenPatchPcdTable/__init__.py b/BaseTools/Source/Python/GenPatchPcdTable/__init__.py
new file mode 100644
index 0000000000..d6a199f7d5
--- /dev/null
+++ b/BaseTools/Source/Python/GenPatchPcdTable/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'GenPatchPcdTable' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile
index a4e76592ab..dd2780f840 100644
--- a/BaseTools/Source/Python/Makefile
+++ b/BaseTools/Source/Python/Makefile
@@ -10,7 +10,7 @@ MODULES=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8,encodings
BIN_DIR=$(EDK_TOOLS_PATH)\Bin\Win32
-APPLICATIONS=$(BIN_DIR)\build.exe $(BIN_DIR)\GenFds.exe $(BIN_DIR)\Trim.exe $(BIN_DIR)\MigrationMsa2Inf.exe $(BIN_DIR)\Fpd2Dsc.exe $(BIN_DIR)\TargetTool.exe $(BIN_DIR)\spd2dec.exe $(BIN_DIR)\GenDepex.exe
+APPLICATIONS=$(BIN_DIR)\build.exe $(BIN_DIR)\GenFds.exe $(BIN_DIR)\Trim.exe $(BIN_DIR)\MigrationMsa2Inf.exe $(BIN_DIR)\Fpd2Dsc.exe $(BIN_DIR)\TargetTool.exe $(BIN_DIR)\spd2dec.exe $(BIN_DIR)\GenDepex.exe $(BIN_DIR)\GenPatchPcdTable.exe $(BIN_DIR)\PatchPcdValue.exe
COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \
$(BASE_TOOLS_PATH)\Source\Python\Common\Database.py \
@@ -82,6 +82,12 @@ $(BIN_DIR)\GenDepex.exe: $(BASE_TOOLS_PATH)\Source\Python\AutoGen\GenDepex.py $(
$(BIN_DIR)\TargetTool.exe: $(BASE_TOOLS_PATH)\Source\Python\TargetTool\TargetTool.py $(COMMON_PYTHON)
@pushd . & @cd TargetTool & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) TargetTool.py & @popd
+$(BIN_DIR)\GenPatchPcdTable.exe: $(BASE_TOOLS_PATH)\Source\Python\GenPatchPcdTable\GenPatchPcdTable.py $(COMMON_PYTHON)
+ @pushd . & @cd GenPatchPcdTable & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) GenPatchPcdTable.py & @popd
+
+$(BIN_DIR)\PatchPcdValue.exe: $(BASE_TOOLS_PATH)\Source\Python\PatchPcdValue\PatchPcdValue.py $(COMMON_PYTHON)
+ @pushd . & @cd PatchPcdValue & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) PatchPcdValue.py & @popd
+
clean:
cleanall:
@del /f /q $(BIN_DIR)\*.pyd $(BIN_DIR)\*.dll
diff --git a/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py b/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py
index 01de21239c..09245344a1 100644
--- a/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py
+++ b/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -21,7 +21,7 @@ from Common.EdkIIWorkspace import *
versionNumber = "0.9"
__version__ = "%prog Version " + versionNumber
-__copyright__ = "Copyright (c) 2007, Intel Corporation All rights reserved."
+__copyright__ = "Copyright (c) 2007 - 2010, Intel Corporation All rights reserved."
commonHeaderFilename = "CommonHeader.h"
entryPointFilename = "EntryPoint.c"
diff --git a/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py b/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py
index e69de29bb2..6eb8a1e573 100644
--- a/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py
+++ b/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'MigrationMsa2Inf' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/MkBOM/__init__.py b/BaseTools/Source/Python/MkBOM/__init__.py
index e69de29bb2..6b2e9b2857 100644
--- a/BaseTools/Source/Python/MkBOM/__init__.py
+++ b/BaseTools/Source/Python/MkBOM/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'MkBOM' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/PackagingTool/InstallPkg.py b/BaseTools/Source/Python/PackagingTool/InstallPkg.py
index 963a654ea1..ebf9077840 100644
--- a/BaseTools/Source/Python/PackagingTool/InstallPkg.py
+++ b/BaseTools/Source/Python/PackagingTool/InstallPkg.py
@@ -288,7 +288,7 @@ def Main():
"\nInstallPkg",
CODE_ERROR,
"Unknown fatal error when installing [%s]" % Options.PackageFile,
- ExtraData="\n(Please send email to dev@buildtools.tianocore.org for help, attaching following call stack trace!)\n",
+ ExtraData="\n(Please send email to edk2-buildtools-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",
RaiseError=False
)
EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
diff --git a/BaseTools/Source/Python/PackagingTool/MkPkg.py b/BaseTools/Source/Python/PackagingTool/MkPkg.py
index 660f48f05f..ec2136811d 100644
--- a/BaseTools/Source/Python/PackagingTool/MkPkg.py
+++ b/BaseTools/Source/Python/PackagingTool/MkPkg.py
@@ -281,7 +281,7 @@ def Main():
"\nMkPkg",
CODE_ERROR,
"Unknown fatal error when creating [%s]" % Options.DistributionFile,
- ExtraData="\n(Please send email to dev@buildtools.tianocore.org for help, attaching following call stack trace!)\n",
+ ExtraData="\n(Please send email to edk2-buildtools-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",
RaiseError=False
)
EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
diff --git a/BaseTools/Source/Python/PackagingTool/RmPkg.py b/BaseTools/Source/Python/PackagingTool/RmPkg.py
index e7eedd0776..ffe34bd924 100644
--- a/BaseTools/Source/Python/PackagingTool/RmPkg.py
+++ b/BaseTools/Source/Python/PackagingTool/RmPkg.py
@@ -206,7 +206,7 @@ def Main():
"\nRmPkg",
CODE_ERROR,
"Unknown fatal error when removing package",
- ExtraData="\n(Please send email to dev@buildtools.tianocore.org for help, attaching following call stack trace!)\n",
+ ExtraData="\n(Please send email to edk2-buildtools-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",
RaiseError=False
)
EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
diff --git a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
new file mode 100644
index 0000000000..9a9f1d0468
--- /dev/null
+++ b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
@@ -0,0 +1,287 @@
+## @file
+# Patch value into the binary file.
+#
+# Copyright (c) 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import os
+import sys
+import re
+
+from optparse import OptionParser
+from optparse import make_option
+from Common.BuildToolError import *
+import Common.EdkLogger as EdkLogger
+import array
+
+# Version and Copyright
+__version_number__ = "0.10"
+__version__ = "%prog Version " + __version_number__
+__copyright__ = "Copyright (c) 2010, Intel Corporation. All rights reserved."
+
+## PatchBinaryFile method
+#
+# This method mainly patches the data into binary file.
+#
+# @param FileName File path of the binary file
+# @param ValueOffset Offset value
+# @param TypeName DataType Name
+# @param Value Value String
+# @param MaxSize MaxSize value
+#
+# @retval 0 File is updated successfully.
+# @retval not 0 File is updated failed.
+#
+def PatchBinaryFile(FileName, ValueOffset, TypeName, ValueString, MaxSize=0):
+ #
+ # Length of Binary File
+ #
+ FileHandle = open (FileName, 'rb')
+ FileHandle.seek (0, 2)
+ FileLength = FileHandle.tell()
+ FileHandle.close()
+ #
+ # Unify string to upper string
+ #
+ TypeName = TypeName.upper()
+ #
+ # Get PCD value data length
+ #
+ ValueLength = 0
+ if TypeName == 'BOOLEAN':
+ ValueLength = 1
+ elif TypeName == 'UINT8':
+ ValueLength = 1
+ elif TypeName == 'UINT16':
+ ValueLength = 2
+ elif TypeName == 'UINT32':
+ ValueLength = 4
+ elif TypeName == 'UINT64':
+ ValueLength = 8
+ elif TypeName == 'VOID*':
+ if MaxSize == 0:
+ return OPTION_MISSING, "PcdMaxSize is not specified for VOID* type PCD."
+ ValueLength = MaxSize
+ else:
+ return PARAMETER_INVALID, "PCD type %s is not valid." %(CommandOptions.PcdTypeName)
+ #
+ # Check PcdValue is in the input binary file.
+ #
+ if ValueOffset + ValueLength > FileLength:
+ return PARAMETER_INVALID, "PcdOffset + PcdMaxSize(DataType) is larger than the input file size."
+ #
+ # Read binary file into array
+ #
+ FileHandle = open (FileName, 'rb')
+ ByteArray = array.array('B')
+ ByteArray.fromfile(FileHandle, FileLength)
+ FileHandle.close()
+ OrigByteList = ByteArray.tolist()
+ ByteList = ByteArray.tolist()
+ #
+ # Clear the data in file
+ #
+ for Index in range(ValueLength):
+ ByteList[ValueOffset + Index] = 0
+ #
+ # Patch value into offset
+ #
+ ValueString = ValueString.upper()
+ ValueNumber = 0
+ if TypeName == 'BOOLEAN':
+ #
+ # Get PCD value for BOOLEAN data type
+ #
+ try:
+ if ValueString == 'TRUE':
+ ValueNumber = 1
+ elif ValueString == 'FALSE':
+ ValueNumber = 0
+ elif ValueString.startswith('0X'):
+ ValueNumber = int (Value, 16)
+ else:
+ ValueNumber = int (Value)
+ if ValueNumber != 0:
+ ValueNumber = 1
+ except:
+ return PARAMETER_INVALID, "PCD Value %s is not valid dec or hex string." %(ValueString)
+ #
+ # Set PCD value into binary data
+ #
+ ByteList[ValueOffset] = ValueNumber
+ elif TypeName in ['UINT8', 'UINT16', 'UINT32', 'UINT64']:
+ #
+ # Get PCD value for UINT* data type
+ #
+ try:
+ if ValueString.startswith('0X'):
+ ValueNumber = int (ValueString, 16)
+ else:
+ ValueNumber = int (ValueString)
+ except:
+ return PARAMETER_INVALID, "PCD Value %s is not valid dec or hex string." %(ValueString)
+ #
+ # Set PCD value into binary data
+ #
+ for Index in range(ValueLength):
+ ByteList[ValueOffset + Index] = ValueNumber % 0x100
+ ValueNumber = ValueNumber / 0x100
+ elif TypeName == 'VOID*':
+ if ValueString.startswith("L "):
+ #
+ # Patch Unicode String
+ #
+ Index = 0
+ for ByteString in ValueString[2:]:
+ #
+ # Reserve zero as unicode tail
+ #
+ if Index + 2 >= ValueLength:
+ break
+ #
+ # Set string value one by one
+ #
+ ByteList[ValueOffset + Index] = ord(ByteString)
+ Index = Index + 2
+ elif ValueString.startswith("{") and ValueString.endswith("}"):
+ #
+ # Patch {0x1, 0x2, ...} byte by byte
+ #
+ ValueList = ValueString[1 : len(ValueString) - 1].split(', ')
+ Index = 0
+ try:
+ for ByteString in ValueList:
+ if ByteString.upper().startswith('0X'):
+ ByteValue = int(ByteString, 16)
+ else:
+ ByteValue = int(ByteString)
+ ByteList[ValueOffset + Index] = ByteValue % 0x100
+ Index = Index + 1
+ if Index >= ValueLength:
+ break
+ except:
+ return PARAMETER_INVALID, "PCD Value %s is not valid dec or hex string array." %(ValueString)
+ else:
+ #
+ # Patch ascii string
+ #
+ Index = 0
+ for ByteString in ValueString:
+ #
+ # Reserve zero as string tail
+ #
+ if Index + 1 >= ValueLength:
+ break
+ #
+ # Set string value one by one
+ #
+ ByteList[ValueOffset + Index] = ord(ByteString)
+ Index = Index + 1
+ #
+ # Update new data into input file.
+ #
+ if ByteList != OrigByteList:
+ ByteArray = array.array('B')
+ ByteArray.fromlist(ByteList)
+ FileHandle = open (FileName, 'wb')
+ ByteArray.tofile(FileHandle)
+ FileHandle.close()
+ return 0, "Patch Value into File %s successfully." %(FileName)
+
+## Parse command line options
+#
+# Using standard Python module optparse to parse command line option of this tool.
+#
+# @retval Options A optparse.Values object containing the parsed options
+# @retval InputFile Path of file to be trimmed
+#
+def Options():
+ OptionList = [
+ make_option("-f", "--offset", dest="PcdOffset", action="store", type="int",
+ help="Start offset to the image is used to store PCD value."),
+ make_option("-u", "--value", dest="PcdValue", action="store",
+ help="PCD value will be updated into the image."),
+ make_option("-t", "--type", dest="PcdTypeName", action="store",
+ help="The name of PCD data type may be one of VOID*,BOOLEAN, UINT8, UINT16, UINT32, UINT64."),
+ make_option("-s", "--maxsize", dest="PcdMaxSize", action="store", type="int",
+ help="Max size of data buffer is taken by PCD value.It must be set when PCD type is VOID*."),
+ make_option("-v", "--verbose", dest="LogLevel", action="store_const", const=EdkLogger.VERBOSE,
+ help="Run verbosely"),
+ make_option("-d", "--debug", dest="LogLevel", type="int",
+ help="Run with debug information"),
+ make_option("-q", "--quiet", dest="LogLevel", action="store_const", const=EdkLogger.QUIET,
+ help="Run quietly"),
+ make_option("-?", action="help", help="show this help message and exit"),
+ ]
+
+ # use clearer usage to override default usage message
+ UsageString = "%prog -f Offset -u Value -t Type [-s MaxSize] <input_file>"
+
+ Parser = OptionParser(description=__copyright__, version=__version__, option_list=OptionList, usage=UsageString)
+ Parser.set_defaults(LogLevel=EdkLogger.INFO)
+
+ Options, Args = Parser.parse_args()
+
+ # error check
+ if len(Args) == 0:
+ EdkLogger.error("PatchPcdValue", PARAMETER_INVALID, ExtraData=Parser.get_usage())
+
+ InputFile = Args[len(Args) - 1]
+ return Options, InputFile
+
+## Entrance method
+#
+# This method mainly dispatch specific methods per the command line options.
+# If no error found, return zero value so the caller of this tool can know
+# if it's executed successfully or not.
+#
+# @retval 0 Tool was successful
+# @retval 1 Tool failed
+#
+def Main():
+ try:
+ #
+ # Check input parameter
+ #
+ EdkLogger.Initialize()
+ CommandOptions, InputFile = Options()
+ if CommandOptions.LogLevel < EdkLogger.DEBUG_9:
+ EdkLogger.SetLevel(CommandOptions.LogLevel + 1)
+ else:
+ EdkLogger.SetLevel(CommandOptions.LogLevel)
+ if not os.path.exists (InputFile):
+ EdkLogger.error("PatchPcdValue", FILE_NOT_FOUND, ExtraData=InputFile)
+ return 1
+ if CommandOptions.PcdOffset == None or CommandOptions.PcdValue == None or CommandOptions.PcdTypeName == None:
+ EdkLogger.error("PatchPcdValue", OPTION_MISSING, ExtraData="PcdOffset or PcdValue of PcdTypeName is not specified.")
+ return 1
+ if CommandOptions.PcdTypeName.upper() not in ["BOOLEAN", "UINT8", "UINT16", "UINT32", "UINT64", "VOID*"]:
+ EdkLogger.error("PatchPcdValue", PARAMETER_INVALID, ExtraData="PCD type %s is not valid." %(CommandOptions.PcdTypeName))
+ return 1
+ if CommandOptions.PcdTypeName.upper() == "VOID*" and CommandOptions.PcdMaxSize == None:
+ EdkLogger.error("PatchPcdValue", OPTION_MISSING, ExtraData="PcdMaxSize is not specified for VOID* type PCD.")
+ return 1
+ #
+ # Patch value into binary image.
+ #
+ ReturnValue, ErrorInfo = PatchBinaryFile (InputFile, CommandOptions.PcdOffset, CommandOptions.PcdTypeName, CommandOptions.PcdValue, CommandOptions.PcdMaxSize)
+ if ReturnValue != 0:
+ EdkLogger.error("PatchPcdValue", ReturnValue, ExtraData=ErrorInfo)
+ return 1
+ return 0
+ except:
+ return 1
+
+if __name__ == '__main__':
+ r = Main()
+ sys.exit(r)
diff --git a/BaseTools/Source/Python/PatchPcdValue/__init__.py b/BaseTools/Source/Python/PatchPcdValue/__init__.py
new file mode 100644
index 0000000000..7ec3e7e672
--- /dev/null
+++ b/BaseTools/Source/Python/PatchPcdValue/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'PatchPcdValue' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/Table/TableEotReport.py b/BaseTools/Source/Python/Table/TableEotReport.py
index cdae3b2e39..2d98129e4f 100644
--- a/BaseTools/Source/Python/Table/TableEotReport.py
+++ b/BaseTools/Source/Python/Table/TableEotReport.py
@@ -18,8 +18,8 @@ import Common.EdkLogger as EdkLogger
import os, time
from Table import Table
from Common.String import ConvertToSqlString2
-import EotToolError as EotToolError
-import EotGlobalData as EotGlobalData
+import Eot.EotToolError as EotToolError
+import Eot.EotGlobalData as EotGlobalData
## TableReport
#
diff --git a/BaseTools/Source/Python/Table/TableQuery.py b/BaseTools/Source/Python/Table/TableQuery.py
index 9a9a66ccb6..4ad9dc5e55 100644
--- a/BaseTools/Source/Python/Table/TableQuery.py
+++ b/BaseTools/Source/Python/Table/TableQuery.py
@@ -21,7 +21,7 @@ from Table import Table
## TableQuery
#
# This class defined a table used for Query
-#
+#
# @param object: Inherited from object class
#
#
@@ -29,19 +29,21 @@ class TableQuery(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Query'
-
+
## Create table
#
# Create table Query
#
# @param ID: ID of a Query
- # @param Name: Modifier of a Query
+ # @param Name: Name of a Query
+ # @param Modifer: Modifier of a Query
# @param Value: Type of a Query
# @param Model: Model of a Query
#
def Create(self):
SqlCommand = """create table IF NOT EXISTS %s(ID INTEGER PRIMARY KEY,
Name TEXT DEFAULT '',
+ Modifier TEXT DEFAULT '',
Value TEXT DEFAULT '',
Model INTEGER DEFAULT 0
)""" % self.Table
@@ -52,15 +54,15 @@ class TableQuery(Table):
# Insert a record into table Query
#
# @param ID: ID of a Query
- # @param Name: Modifier of a Query
- # @param Value: Type of a Query
+ # @param Name: Name of a Query
+ # @param Modifier: Modifier of a Query
+ # @param Value: Value of a Query
# @param Model: Model of a Query
#
- def Insert(self, Name, Value, Model):
+ def Insert(self, Name, Modifier, Value, Model):
self.ID = self.ID + 1
- SqlCommand = """insert into %s values(%s, '%s', '%s', %s)""" \
- % (self.Table, self.ID, Name, Value, Model)
+ SqlCommand = """insert into %s values(%s, '%s', '%s', '%s', %s)""" \
+ % (self.Table, self.ID, Name, Modifier, Value, Model)
Table.Insert(self, SqlCommand)
return self.ID
- \ No newline at end of file
diff --git a/BaseTools/Source/Python/Table/TableReport.py b/BaseTools/Source/Python/Table/TableReport.py
index 042c1b7e9e..777a479156 100644
--- a/BaseTools/Source/Python/Table/TableReport.py
+++ b/BaseTools/Source/Python/Table/TableReport.py
@@ -1,7 +1,7 @@
## @file
# This file is used to create/update/query/erase table for ECC reports
#
-# Copyright (c) 2008, Intel Corporation
+# Copyright (c) 2008 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -114,7 +114,8 @@ class TableReport(Table):
NewRecord = self.Exec(SqlCommand)
if NewRecord != []:
File.write("""%s,%s,"%s",%s,%s,"%s"\n""" % (Index, ErrorID, EccToolError.gEccErrorMessage[ErrorID], NewRecord[0][1], NewRecord[0][0], OtherMsg))
-
+ EdkLogger.quiet("%s(%s): [%s]%s %s" % (NewRecord[0][1], NewRecord[0][0], ErrorID, EccToolError.gEccErrorMessage[ErrorID], OtherMsg))
+
File.close()
except IOError:
NewFilename = 'Report_' + time.strftime("%Y%m%d_%H%M%S.csv", time.localtime())
diff --git a/BaseTools/Source/Python/Table/__init__.py b/BaseTools/Source/Python/Table/__init__.py
index e69de29bb2..ea0b26743f 100644
--- a/BaseTools/Source/Python/Table/__init__.py
+++ b/BaseTools/Source/Python/Table/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'Table' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2008 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/Source/Python/TargetTool/TargetTool.py
index 69cac95d4f..df3ed2f6bb 100644
--- a/BaseTools/Source/Python/TargetTool/TargetTool.py
+++ b/BaseTools/Source/Python/TargetTool/TargetTool.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -175,7 +175,7 @@ def GetConfigureKeyValue(self, Key):
VersionNumber = "0.01"
__version__ = "%prog Version " + VersionNumber
-__copyright__ = "Copyright (c) 2007, Intel Corporation All rights reserved."
+__copyright__ = "Copyright (c) 2007 - 2010, Intel Corporation All rights reserved."
__usage__ = "%prog [options] {args} \
\nArgs: \
\n Clean clean the all default configuration of target.txt. \
diff --git a/BaseTools/Source/Python/TargetTool/__init__.py b/BaseTools/Source/Python/TargetTool/__init__.py
index e69de29bb2..cbc78a7322 100644
--- a/BaseTools/Source/Python/TargetTool/__init__.py
+++ b/BaseTools/Source/Python/TargetTool/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'TargetTool' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
index a55c136edb..dbfa84a5da 100644
--- a/BaseTools/Source/Python/Trim/Trim.py
+++ b/BaseTools/Source/Python/Trim/Trim.py
@@ -1,7 +1,7 @@
## @file
# Trim files preprocessed by compiler
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -28,7 +28,7 @@ import Common.EdkLogger as EdkLogger
# Version and Copyright
__version_number__ = "0.10"
__version__ = "%prog Version " + __version_number__
-__copyright__ = "Copyright (c) 2007-2008, Intel Corporation. All rights reserved."
+__copyright__ = "Copyright (c) 2007-2010, Intel Corporation. All rights reserved."
## Regular expression for matching Line Control directive like "#line xxx"
gLineControlDirective = re.compile('^\s*#(?:line)?\s+([0-9]+)\s+"*([^"]*)"')
@@ -82,6 +82,21 @@ gImportCodePatterns = [
],
[
+ re.compile('#include\s+EFI_GUID_DEFINITION\s*\(FirmwareFileSystem\)', re.MULTILINE),
+ '#include EFI_GUID_DEFINITION (FirmwareFileSystem)\n#include EFI_GUID_DEFINITION (FirmwareFileSystem2)'
+ ],
+
+ [
+ re.compile('gEfiFirmwareFileSystemGuid', re.MULTILINE),
+ 'gEfiFirmwareFileSystem2Guid'
+ ],
+
+ [
+ re.compile('EFI_FVH_REVISION', re.MULTILINE),
+ 'EFI_FVH_PI_REVISION'
+ ],
+
+ [
re.compile("(\s*)\S*CreateEvent\s*\([\s\n]*EFI_EVENT_SIGNAL_READY_TO_BOOT[^,]*,((?:[^;]+\n)+)(\s*\));", re.MULTILINE),
'\\1EfiCreateEventReadyToBoot (\\2\\3;'
],
@@ -504,7 +519,7 @@ def Main():
"\nTrim",
CODE_ERROR,
"Unknown fatal error when trimming [%s]" % InputFile,
- ExtraData="\n(Please send email to dev@buildtools.tianocore.org for help, attaching following call stack trace!)\n",
+ ExtraData="\n(Please send email to edk2-buildtools-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",
RaiseError=False
)
EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 11b649658e..5b20c4091c 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -1,2353 +1,2375 @@
-## @file
-# This file is used to create a database used by build tool
-#
-# Copyright (c) 2008 - 2009, Intel Corporation
-# All rights reserved. This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import sqlite3
-import os
-import os.path
-import pickle
-
-import Common.EdkLogger as EdkLogger
-import Common.GlobalData as GlobalData
-
-from Common.String import *
-from Common.DataType import *
-from Common.Misc import *
-from types import *
-
-from CommonDataClass.CommonClass import SkuInfoClass
-
-from MetaDataTable import *
-from MetaFileTable import *
-from MetaFileParser import *
-from BuildClassObject import *
-
-## Platform build information from DSC file
-#
-# This class is used to retrieve information stored in database and convert them
-# into PlatformBuildClassObject form for easier use for AutoGen.
-#
-class DscBuildData(PlatformBuildClassObject):
- # dict used to convert PCD type in database to string used by build tool
- _PCD_TYPE_STRING_ = {
- MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild",
- MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule",
- MODEL_PCD_FEATURE_FLAG : "FeatureFlag",
- MODEL_PCD_DYNAMIC : "Dynamic",
- MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic",
- MODEL_PCD_DYNAMIC_HII : "DynamicHii",
- MODEL_PCD_DYNAMIC_VPD : "DynamicVpd",
- MODEL_PCD_DYNAMIC_EX : "DynamicEx",
- MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx",
- MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii",
- MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd",
- }
-
- # dict used to convert part of [Defines] to members of DscBuildData directly
- _PROPERTY_ = {
- #
- # Required Fields
- #
- TAB_DSC_DEFINES_PLATFORM_NAME : "_PlatformName",
- TAB_DSC_DEFINES_PLATFORM_GUID : "_Guid",
- TAB_DSC_DEFINES_PLATFORM_VERSION : "_Version",
- TAB_DSC_DEFINES_DSC_SPECIFICATION : "_DscSpecification",
- #TAB_DSC_DEFINES_OUTPUT_DIRECTORY : "_OutputDirectory",
- #TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES : "_SupArchList",
- #TAB_DSC_DEFINES_BUILD_TARGETS : "_BuildTargets",
- #TAB_DSC_DEFINES_SKUID_IDENTIFIER : "_SkuName",
- #TAB_DSC_DEFINES_FLASH_DEFINITION : "_FlashDefinition",
- TAB_DSC_DEFINES_BUILD_NUMBER : "_BuildNumber",
- TAB_DSC_DEFINES_MAKEFILE_NAME : "_MakefileName",
- TAB_DSC_DEFINES_BS_BASE_ADDRESS : "_BsBaseAddress",
- TAB_DSC_DEFINES_RT_BASE_ADDRESS : "_RtBaseAddress",
- }
-
- # used to compose dummy library class name for those forced library instances
- _NullLibraryNumber = 0
-
- ## Constructor of DscBuildData
- #
- # Initialize object of DscBuildData
- #
- # @param FilePath The path of platform description file
- # @param RawData The raw data of DSC file
- # @param BuildDataBase Database used to retrieve module/package information
- # @param Arch The target architecture
- # @param Platform (not used for DscBuildData)
- # @param Macros Macros used for replacement in DSC file
- #
- def __init__(self, FilePath, RawData, BuildDataBase, Arch='COMMON', Platform='DUMMY', Macros={}):
- self.MetaFile = FilePath
- self._RawData = RawData
- self._Bdb = BuildDataBase
- self._Arch = Arch
- self._Macros = Macros
- self._Clear()
- RecordList = self._RawData[MODEL_META_DATA_DEFINE, self._Arch]
- for Record in RecordList:
- GlobalData.gEdkGlobal[Record[0]] = Record[1]
-
- ## XXX[key] = value
- def __setitem__(self, key, value):
- self.__dict__[self._PROPERTY_[key]] = value
-
- ## value = XXX[key]
- def __getitem__(self, key):
- return self.__dict__[self._PROPERTY_[key]]
-
- ## "in" test support
- def __contains__(self, key):
- return key in self._PROPERTY_
-
- ## Set all internal used members of DscBuildData to None
- def _Clear(self):
- self._Header = None
- self._PlatformName = None
- self._Guid = None
- self._Version = None
- self._DscSpecification = None
- self._OutputDirectory = None
- self._SupArchList = None
- self._BuildTargets = None
- self._SkuName = None
- self._FlashDefinition = None
- self._BuildNumber = None
- self._MakefileName = None
- self._BsBaseAddress = None
- self._RtBaseAddress = None
- self._SkuIds = None
- self._Modules = None
- self._LibraryInstances = None
- self._LibraryClasses = None
- self._Pcds = None
- self._BuildOptions = None
-
- ## Get architecture
- def _GetArch(self):
- return self._Arch
-
- ## Set architecture
- #
- # Changing the default ARCH to another may affect all other information
- # because all information in a platform may be ARCH-related. That's
- # why we need to clear all internal used members, in order to cause all
- # information to be re-retrieved.
- #
- # @param Value The value of ARCH
- #
- def _SetArch(self, Value):
- if self._Arch == Value:
- return
- self._Arch = Value
- self._Clear()
-
- ## Retrieve all information in [Defines] section
- #
- # (Retriving all [Defines] information in one-shot is just to save time.)
- #
- def _GetHeaderInfo(self):
- RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch]
- for Record in RecordList:
- Name = Record[0]
- # items defined _PROPERTY_ don't need additional processing
- if Name in self:
- self[Name] = Record[1]
- # some special items in [Defines] section need special treatment
- elif Name == TAB_DSC_DEFINES_OUTPUT_DIRECTORY:
- self._OutputDirectory = NormPath(Record[1], self._Macros)
- if ' ' in self._OutputDirectory:
- EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in OUTPUT_DIRECTORY",
- File=self.MetaFile, Line=Record[-1],
- ExtraData=self._OutputDirectory)
- elif Name == TAB_DSC_DEFINES_FLASH_DEFINITION:
- self._FlashDefinition = PathClass(NormPath(Record[1], self._Macros), GlobalData.gWorkspace)
- ErrorCode, ErrorInfo = self._FlashDefinition.Validate('.fdf')
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=Record[-1],
- ExtraData=ErrorInfo)
- elif Name == TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES:
- self._SupArchList = GetSplitValueList(Record[1], TAB_VALUE_SPLIT)
- elif Name == TAB_DSC_DEFINES_BUILD_TARGETS:
- self._BuildTargets = GetSplitValueList(Record[1])
- elif Name == TAB_DSC_DEFINES_SKUID_IDENTIFIER:
- if self._SkuName == None:
- self._SkuName = Record[1]
- # set _Header to non-None in order to avoid database re-querying
- self._Header = 'DUMMY'
-
- ## Retrieve platform name
- def _GetPlatformName(self):
- if self._PlatformName == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._PlatformName == None:
- EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No PLATFORM_NAME", File=self.MetaFile)
- return self._PlatformName
-
- ## Retrieve file guid
- def _GetFileGuid(self):
- if self._Guid == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._Guid == None:
- EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No FILE_GUID", File=self.MetaFile)
- return self._Guid
-
- ## Retrieve platform version
- def _GetVersion(self):
- if self._Version == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._Version == None:
- self._Version = ''
- return self._Version
-
- ## Retrieve platform description file version
- def _GetDscSpec(self):
- if self._DscSpecification == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._DscSpecification == None:
- self._DscSpecification = ''
- return self._DscSpecification
-
- ## Retrieve OUTPUT_DIRECTORY
- def _GetOutpuDir(self):
- if self._OutputDirectory == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._OutputDirectory == None:
- self._OutputDirectory = os.path.join("Build", self._PlatformName)
- return self._OutputDirectory
-
- ## Retrieve SUPPORTED_ARCHITECTURES
- def _GetSupArch(self):
- if self._SupArchList == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._SupArchList == None:
- self._SupArchList = ARCH_LIST
- return self._SupArchList
-
- ## Retrieve BUILD_TARGETS
- def _GetBuildTarget(self):
- if self._BuildTargets == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._BuildTargets == None:
- self._BuildTargets = ['DEBUG', 'RELEASE']
- return self._BuildTargets
-
- ## Retrieve SKUID_IDENTIFIER
- def _GetSkuName(self):
- if self._SkuName == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._SkuName == None or self._SkuName not in self.SkuIds:
- self._SkuName = 'DEFAULT'
- return self._SkuName
-
- ## Override SKUID_IDENTIFIER
- def _SetSkuName(self, Value):
- if Value in self.SkuIds:
- self._SkuName = Value
-
- def _GetFdfFile(self):
- if self._FlashDefinition == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._FlashDefinition == None:
- self._FlashDefinition = ''
- return self._FlashDefinition
-
- ## Retrieve FLASH_DEFINITION
- def _GetBuildNumber(self):
- if self._BuildNumber == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._BuildNumber == None:
- self._BuildNumber = ''
- return self._BuildNumber
-
- ## Retrieve MAKEFILE_NAME
- def _GetMakefileName(self):
- if self._MakefileName == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._MakefileName == None:
- self._MakefileName = ''
- return self._MakefileName
-
- ## Retrieve BsBaseAddress
- def _GetBsBaseAddress(self):
- if self._BsBaseAddress == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._BsBaseAddress == None:
- self._BsBaseAddress = ''
- return self._BsBaseAddress
-
- ## Retrieve RtBaseAddress
- def _GetRtBaseAddress(self):
- if self._RtBaseAddress == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._RtBaseAddress == None:
- self._RtBaseAddress = ''
- return self._RtBaseAddress
-
- ## Retrieve [SkuIds] section information
- def _GetSkuIds(self):
- if self._SkuIds == None:
- self._SkuIds = {}
- RecordList = self._RawData[MODEL_EFI_SKU_ID]
- for Record in RecordList:
- if Record[0] in [None, '']:
- EdkLogger.error('build', FORMAT_INVALID, 'No Sku ID number',
- File=self.MetaFile, Line=Record[-1])
- if Record[1] in [None, '']:
- EdkLogger.error('build', FORMAT_INVALID, 'No Sku ID name',
- File=self.MetaFile, Line=Record[-1])
- self._SkuIds[Record[1]] = Record[0]
- if 'DEFAULT' not in self._SkuIds:
- self._SkuIds['DEFAULT'] = 0
- return self._SkuIds
-
- ## Retrieve [Components] section information
- def _GetModules(self):
- if self._Modules != None:
- return self._Modules
-
- self._Modules = sdict()
- RecordList = self._RawData[MODEL_META_DATA_COMPONENT, self._Arch]
- Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
- Macros.update(self._Macros)
- for Record in RecordList:
- ModuleFile = PathClass(NormPath(Record[0], Macros), GlobalData.gWorkspace, Arch=self._Arch)
- ModuleId = Record[5]
- LineNo = Record[6]
-
- # check the file validation
- ErrorCode, ErrorInfo = ModuleFile.Validate('.inf')
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
- ExtraData=ErrorInfo)
- # Check duplication
- if ModuleFile in self._Modules:
- EdkLogger.error('build', FILE_DUPLICATED, File=self.MetaFile, ExtraData=str(ModuleFile), Line=LineNo)
-
- Module = ModuleBuildClassObject()
- Module.MetaFile = ModuleFile
-
- # get module override path
- RecordList = self._RawData[MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH, self._Arch, None, ModuleId]
- if RecordList != []:
- Module.SourceOverridePath = os.path.join(GlobalData.gWorkspace, NormPath(RecordList[0][0], Macros))
-
- # Check if the source override path exists
- if not os.path.isdir(Module.SourceOverridePath):
- EdkLogger.error('build', FILE_NOT_FOUND, Message = 'Source override path does not exist:', File=self.MetaFile, ExtraData=Module.SourceOverridePath, Line=LineNo)
-
- #Add to GlobalData Variables
- GlobalData.gOverrideDir[ModuleFile.Key] = Module.SourceOverridePath
-
- # get module private library instance
- RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch, None, ModuleId]
- for Record in RecordList:
- LibraryClass = Record[0]
- LibraryPath = PathClass(NormPath(Record[1], Macros), GlobalData.gWorkspace, Arch=self._Arch)
- LineNo = Record[-1]
-
- # check the file validation
- ErrorCode, ErrorInfo = LibraryPath.Validate('.inf')
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
- ExtraData=ErrorInfo)
-
- if LibraryClass == '' or LibraryClass == 'NULL':
- self._NullLibraryNumber += 1
- LibraryClass = 'NULL%d' % self._NullLibraryNumber
- EdkLogger.verbose("Found forced library for %s\n\t%s [%s]" % (ModuleFile, LibraryPath, LibraryClass))
- Module.LibraryClasses[LibraryClass] = LibraryPath
- if LibraryPath not in self.LibraryInstances:
- self.LibraryInstances.append(LibraryPath)
-
- # get module private PCD setting
- for Type in [MODEL_PCD_FIXED_AT_BUILD, MODEL_PCD_PATCHABLE_IN_MODULE, \
- MODEL_PCD_FEATURE_FLAG, MODEL_PCD_DYNAMIC, MODEL_PCD_DYNAMIC_EX]:
- RecordList = self._RawData[Type, self._Arch, None, ModuleId]
- for TokenSpaceGuid, PcdCName, Setting, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
- TokenList = GetSplitValueList(Setting)
- DefaultValue = TokenList[0]
- if len(TokenList) > 1:
- MaxDatumSize = TokenList[1]
- else:
- MaxDatumSize = ''
- TypeString = self._PCD_TYPE_STRING_[Type]
- Pcd = PcdClassObject(
- PcdCName,
- TokenSpaceGuid,
- TypeString,
- '',
- DefaultValue,
- '',
- MaxDatumSize,
- {},
- None
- )
- Module.Pcds[PcdCName, TokenSpaceGuid] = Pcd
-
- # get module private build options
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, None, ModuleId]
- for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
- if (ToolChainFamily, ToolChain) not in Module.BuildOptions:
- Module.BuildOptions[ToolChainFamily, ToolChain] = Option
- else:
- OptionString = Module.BuildOptions[ToolChainFamily, ToolChain]
- Module.BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Option
-
- self._Modules[ModuleFile] = Module
- return self._Modules
-
- ## Retrieve all possible library instances used in this platform
- def _GetLibraryInstances(self):
- if self._LibraryInstances == None:
- self._GetLibraryClasses()
- return self._LibraryInstances
-
- ## Retrieve [LibraryClasses] information
- def _GetLibraryClasses(self):
- if self._LibraryClasses == None:
- self._LibraryInstances = []
- #
- # tdict is a special dict kind of type, used for selecting correct
- # library instance for given library class and module type
- #
- LibraryClassDict = tdict(True, 3)
- # track all library class names
- LibraryClassSet = set()
- RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch]
- Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
- Macros.update(self._Macros)
- for Record in RecordList:
- LibraryClass, LibraryInstance, Dummy, Arch, ModuleType, Dummy, LineNo = Record
- if LibraryClass == '' or LibraryClass == 'NULL':
- self._NullLibraryNumber += 1
- LibraryClass = 'NULL%d' % self._NullLibraryNumber
- EdkLogger.verbose("Found forced library for arch=%s\n\t%s [%s]" % (Arch, LibraryInstance, LibraryClass))
- LibraryClassSet.add(LibraryClass)
- LibraryInstance = PathClass(NormPath(LibraryInstance, Macros), GlobalData.gWorkspace, Arch=self._Arch)
- # check the file validation
- ErrorCode, ErrorInfo = LibraryInstance.Validate('.inf')
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
- ExtraData=ErrorInfo)
-
- if ModuleType != 'COMMON' and ModuleType not in SUP_MODULE_LIST:
- EdkLogger.error('build', OPTION_UNKNOWN, "Unknown module type [%s]" % ModuleType,
- File=self.MetaFile, ExtraData=LibraryInstance, Line=LineNo)
- LibraryClassDict[Arch, ModuleType, LibraryClass] = LibraryInstance
- if LibraryInstance not in self._LibraryInstances:
- self._LibraryInstances.append(LibraryInstance)
-
- # resolve the specific library instance for each class and each module type
- self._LibraryClasses = tdict(True)
- for LibraryClass in LibraryClassSet:
- # try all possible module types
- for ModuleType in SUP_MODULE_LIST:
- LibraryInstance = LibraryClassDict[self._Arch, ModuleType, LibraryClass]
- if LibraryInstance == None:
- continue
- self._LibraryClasses[LibraryClass, ModuleType] = LibraryInstance
-
- # for R8 style library instances, which are listed in different section
- RecordList = self._RawData[MODEL_EFI_LIBRARY_INSTANCE, self._Arch]
- for Record in RecordList:
- File = PathClass(NormPath(Record[0], Macros), GlobalData.gWorkspace, Arch=self._Arch)
- LineNo = Record[-1]
- # check the file validation
- ErrorCode, ErrorInfo = File.Validate('.inf')
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
- ExtraData=ErrorInfo)
- if File not in self._LibraryInstances:
- self._LibraryInstances.append(File)
- #
- # we need the module name as the library class name, so we have
- # to parse it here. (self._Bdb[] will trigger a file parse if it
- # hasn't been parsed)
- #
- Library = self._Bdb[File, self._Arch]
- self._LibraryClasses[Library.BaseName, ':dummy:'] = Library
- return self._LibraryClasses
-
- ## Retrieve all PCD settings in platform
- def _GetPcds(self):
- if self._Pcds == None:
- self._Pcds = {}
- self._Pcds.update(self._GetPcd(MODEL_PCD_FIXED_AT_BUILD))
- self._Pcds.update(self._GetPcd(MODEL_PCD_PATCHABLE_IN_MODULE))
- self._Pcds.update(self._GetPcd(MODEL_PCD_FEATURE_FLAG))
- self._Pcds.update(self._GetDynamicPcd(MODEL_PCD_DYNAMIC_DEFAULT))
- self._Pcds.update(self._GetDynamicHiiPcd(MODEL_PCD_DYNAMIC_HII))
- self._Pcds.update(self._GetDynamicVpdPcd(MODEL_PCD_DYNAMIC_VPD))
- self._Pcds.update(self._GetDynamicPcd(MODEL_PCD_DYNAMIC_EX_DEFAULT))
- self._Pcds.update(self._GetDynamicHiiPcd(MODEL_PCD_DYNAMIC_EX_HII))
- self._Pcds.update(self._GetDynamicVpdPcd(MODEL_PCD_DYNAMIC_EX_VPD))
- return self._Pcds
-
- ## Retrieve [BuildOptions]
- def _GetBuildOptions(self):
- if self._BuildOptions == None:
- self._BuildOptions = {}
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION]
- for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
- self._BuildOptions[ToolChainFamily, ToolChain] = Option
- return self._BuildOptions
-
- ## Retrieve non-dynamic PCD settings
- #
- # @param Type PCD type
- #
- # @retval a dict object contains settings of given PCD type
- #
- def _GetPcd(self, Type):
- Pcds = {}
- #
- # tdict is a special dict kind of type, used for selecting correct
- # PCD settings for certain ARCH
- #
- PcdDict = tdict(True, 3)
- PcdSet = set()
- # Find out all possible PCD candidates for self._Arch
- RecordList = self._RawData[Type, self._Arch]
- for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
- PcdSet.add((PcdCName, TokenSpaceGuid))
- PcdDict[Arch, PcdCName, TokenSpaceGuid] = Setting
- # Remove redundant PCD candidates
- for PcdCName, TokenSpaceGuid in PcdSet:
- ValueList = ['', '', '']
- Setting = PcdDict[self._Arch, PcdCName, TokenSpaceGuid]
- if Setting == None:
- continue
- TokenList = Setting.split(TAB_VALUE_SPLIT)
- ValueList[0:len(TokenList)] = TokenList
- PcdValue, DatumType, MaxDatumSize = ValueList
- Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
- PcdCName,
- TokenSpaceGuid,
- self._PCD_TYPE_STRING_[Type],
- DatumType,
- PcdValue,
- '',
- MaxDatumSize,
- {},
- None
- )
- return Pcds
-
- ## Retrieve dynamic PCD settings
- #
- # @param Type PCD type
- #
- # @retval a dict object contains settings of given PCD type
- #
- def _GetDynamicPcd(self, Type):
- Pcds = {}
- #
- # tdict is a special dict kind of type, used for selecting correct
- # PCD settings for certain ARCH and SKU
- #
- PcdDict = tdict(True, 4)
- PcdSet = set()
- # Find out all possible PCD candidates for self._Arch
- RecordList = self._RawData[Type, self._Arch]
- for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
- PcdSet.add((PcdCName, TokenSpaceGuid))
- PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
- # Remove redundant PCD candidates, per the ARCH and SKU
- for PcdCName, TokenSpaceGuid in PcdSet:
- ValueList = ['', '', '']
- Setting = PcdDict[self._Arch, self.SkuName, PcdCName, TokenSpaceGuid]
- if Setting == None:
- continue
- TokenList = Setting.split(TAB_VALUE_SPLIT)
- ValueList[0:len(TokenList)] = TokenList
- PcdValue, DatumType, MaxDatumSize = ValueList
-
- SkuInfo = SkuInfoClass(self.SkuName, self.SkuIds[self.SkuName], '', '', '', '', '', PcdValue)
- Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
- PcdCName,
- TokenSpaceGuid,
- self._PCD_TYPE_STRING_[Type],
- DatumType,
- PcdValue,
- '',
- MaxDatumSize,
- {self.SkuName : SkuInfo},
- None
- )
- return Pcds
-
- ## Retrieve dynamic HII PCD settings
- #
- # @param Type PCD type
- #
- # @retval a dict object contains settings of given PCD type
- #
- def _GetDynamicHiiPcd(self, Type):
- Pcds = {}
- #
- # tdict is a special dict kind of type, used for selecting correct
- # PCD settings for certain ARCH and SKU
- #
- PcdDict = tdict(True, 4)
- PcdSet = set()
- RecordList = self._RawData[Type, self._Arch]
- # Find out all possible PCD candidates for self._Arch
- for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
- PcdSet.add((PcdCName, TokenSpaceGuid))
- PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
- # Remove redundant PCD candidates, per the ARCH and SKU
- for PcdCName, TokenSpaceGuid in PcdSet:
- ValueList = ['', '', '', '']
- Setting = PcdDict[self._Arch, self.SkuName, PcdCName, TokenSpaceGuid]
- if Setting == None:
- continue
- TokenList = Setting.split(TAB_VALUE_SPLIT)
- ValueList[0:len(TokenList)] = TokenList
- VariableName, VariableGuid, VariableOffset, DefaultValue = ValueList
- SkuInfo = SkuInfoClass(self.SkuName, self.SkuIds[self.SkuName], VariableName, VariableGuid, VariableOffset, DefaultValue)
- Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
- PcdCName,
- TokenSpaceGuid,
- self._PCD_TYPE_STRING_[Type],
- '',
- DefaultValue,
- '',
- '',
- {self.SkuName : SkuInfo},
- None
- )
- return Pcds
-
- ## Retrieve dynamic VPD PCD settings
- #
- # @param Type PCD type
- #
- # @retval a dict object contains settings of given PCD type
- #
- def _GetDynamicVpdPcd(self, Type):
- Pcds = {}
- #
- # tdict is a special dict kind of type, used for selecting correct
- # PCD settings for certain ARCH and SKU
- #
- PcdDict = tdict(True, 4)
- PcdSet = set()
- # Find out all possible PCD candidates for self._Arch
- RecordList = self._RawData[Type, self._Arch]
- for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
- PcdSet.add((PcdCName, TokenSpaceGuid))
- PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
- # Remove redundant PCD candidates, per the ARCH and SKU
- for PcdCName, TokenSpaceGuid in PcdSet:
- ValueList = ['', '']
- Setting = PcdDict[self._Arch, self.SkuName, PcdCName, TokenSpaceGuid]
- if Setting == None:
- continue
- TokenList = Setting.split(TAB_VALUE_SPLIT)
- ValueList[0:len(TokenList)] = TokenList
- VpdOffset, MaxDatumSize = ValueList
-
- SkuInfo = SkuInfoClass(self.SkuName, self.SkuIds[self.SkuName], '', '', '', '', VpdOffset)
- Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
- PcdCName,
- TokenSpaceGuid,
- self._PCD_TYPE_STRING_[Type],
- '',
- '',
- '',
- MaxDatumSize,
- {self.SkuName : SkuInfo},
- None
- )
- return Pcds
-
- ## Add external modules
- #
- # The external modules are mostly those listed in FDF file, which don't
- # need "build".
- #
- # @param FilePath The path of module description file
- #
- def AddModule(self, FilePath):
- FilePath = NormPath(FilePath)
- if FilePath not in self.Modules:
- Module = ModuleBuildClassObject()
- Module.MetaFile = FilePath
- self.Modules.append(Module)
-
- ## Add external PCDs
- #
- # The external PCDs are mostly those listed in FDF file to specify address
- # or offset information.
- #
- # @param Name Name of the PCD
- # @param Guid Token space guid of the PCD
- # @param Value Value of the PCD
- #
- def AddPcd(self, Name, Guid, Value):
- if (Name, Guid) not in self.Pcds:
- self.Pcds[Name, Guid] = PcdClassObject(Name, Guid, '', '', '', '', '', {}, None)
- self.Pcds[Name, Guid].DefaultValue = Value
-
- Arch = property(_GetArch, _SetArch)
- Platform = property(_GetPlatformName)
- PlatformName = property(_GetPlatformName)
- Guid = property(_GetFileGuid)
- Version = property(_GetVersion)
- DscSpecification = property(_GetDscSpec)
- OutputDirectory = property(_GetOutpuDir)
- SupArchList = property(_GetSupArch)
- BuildTargets = property(_GetBuildTarget)
- SkuName = property(_GetSkuName, _SetSkuName)
- FlashDefinition = property(_GetFdfFile)
- BuildNumber = property(_GetBuildNumber)
- MakefileName = property(_GetMakefileName)
- BsBaseAddress = property(_GetBsBaseAddress)
- RtBaseAddress = property(_GetRtBaseAddress)
-
- SkuIds = property(_GetSkuIds)
- Modules = property(_GetModules)
- LibraryInstances = property(_GetLibraryInstances)
- LibraryClasses = property(_GetLibraryClasses)
- Pcds = property(_GetPcds)
- BuildOptions = property(_GetBuildOptions)
-
-## Platform build information from DSC file
-#
-# This class is used to retrieve information stored in database and convert them
-# into PackageBuildClassObject form for easier use for AutoGen.
-#
-class DecBuildData(PackageBuildClassObject):
- # dict used to convert PCD type in database to string used by build tool
- _PCD_TYPE_STRING_ = {
- MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild",
- MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule",
- MODEL_PCD_FEATURE_FLAG : "FeatureFlag",
- MODEL_PCD_DYNAMIC : "Dynamic",
- MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic",
- MODEL_PCD_DYNAMIC_HII : "DynamicHii",
- MODEL_PCD_DYNAMIC_VPD : "DynamicVpd",
- MODEL_PCD_DYNAMIC_EX : "DynamicEx",
- MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx",
- MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii",
- MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd",
- }
-
- # dict used to convert part of [Defines] to members of DecBuildData directly
- _PROPERTY_ = {
- #
- # Required Fields
- #
- TAB_DEC_DEFINES_PACKAGE_NAME : "_PackageName",
- TAB_DEC_DEFINES_PACKAGE_GUID : "_Guid",
- TAB_DEC_DEFINES_PACKAGE_VERSION : "_Version",
- }
-
-
- ## Constructor of DecBuildData
- #
- # Initialize object of DecBuildData
- #
- # @param FilePath The path of package description file
- # @param RawData The raw data of DEC file
- # @param BuildDataBase Database used to retrieve module information
- # @param Arch The target architecture
- # @param Platform (not used for DecBuildData)
- # @param Macros Macros used for replacement in DSC file
- #
- def __init__(self, File, RawData, BuildDataBase, Arch='COMMON', Platform='DUMMY', Macros={}):
- self.MetaFile = File
- self._PackageDir = File.Dir
- self._RawData = RawData
- self._Bdb = BuildDataBase
- self._Arch = Arch
- self._Macros = Macros
- self._Clear()
-
- ## XXX[key] = value
- def __setitem__(self, key, value):
- self.__dict__[self._PROPERTY_[key]] = value
-
- ## value = XXX[key]
- def __getitem__(self, key):
- return self.__dict__[self._PROPERTY_[key]]
-
- ## "in" test support
- def __contains__(self, key):
- return key in self._PROPERTY_
-
- ## Set all internal used members of DecBuildData to None
- def _Clear(self):
- self._Header = None
- self._PackageName = None
- self._Guid = None
- self._Version = None
- self._Protocols = None
- self._Ppis = None
- self._Guids = None
- self._Includes = None
- self._LibraryClasses = None
- self._Pcds = None
-
- ## Get architecture
- def _GetArch(self):
- return self._Arch
-
- ## Set architecture
- #
- # Changing the default ARCH to another may affect all other information
- # because all information in a platform may be ARCH-related. That's
- # why we need to clear all internal used members, in order to cause all
- # information to be re-retrieved.
- #
- # @param Value The value of ARCH
- #
- def _SetArch(self, Value):
- if self._Arch == Value:
- return
- self._Arch = Value
- self._Clear()
-
- ## Retrieve all information in [Defines] section
- #
- # (Retriving all [Defines] information in one-shot is just to save time.)
- #
- def _GetHeaderInfo(self):
- RecordList = self._RawData[MODEL_META_DATA_HEADER]
- for Record in RecordList:
- Name = Record[0]
- if Name in self:
- self[Name] = Record[1]
- self._Header = 'DUMMY'
-
- ## Retrieve package name
- def _GetPackageName(self):
- if self._PackageName == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._PackageName == None:
- EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "No PACKAGE_NAME", File=self.MetaFile)
- return self._PackageName
-
- ## Retrieve file guid
- def _GetFileGuid(self):
- if self._Guid == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._Guid == None:
- EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "No PACKAGE_GUID", File=self.MetaFile)
- return self._Guid
-
- ## Retrieve package version
- def _GetVersion(self):
- if self._Version == None:
- if self._Header == None:
- self._GetHeaderInfo()
- if self._Version == None:
- self._Version = ''
- return self._Version
-
- ## Retrieve protocol definitions (name/value pairs)
- def _GetProtocol(self):
- if self._Protocols == None:
- #
- # tdict is a special kind of dict, used for selecting correct
- # protocol defition for given ARCH
- #
- ProtocolDict = tdict(True)
- NameList = []
- # find out all protocol definitions for specific and 'common' arch
- RecordList = self._RawData[MODEL_EFI_PROTOCOL, self._Arch]
- for Name, Guid, Dummy, Arch, ID, LineNo in RecordList:
- if Name not in NameList:
- NameList.append(Name)
- ProtocolDict[Arch, Name] = Guid
- # use sdict to keep the order
- self._Protocols = sdict()
- for Name in NameList:
- #
- # limit the ARCH to self._Arch, if no self._Arch found, tdict
- # will automatically turn to 'common' ARCH for trying
- #
- self._Protocols[Name] = ProtocolDict[self._Arch, Name]
- return self._Protocols
-
- ## Retrieve PPI definitions (name/value pairs)
- def _GetPpi(self):
- if self._Ppis == None:
- #
- # tdict is a special kind of dict, used for selecting correct
- # PPI defition for given ARCH
- #
- PpiDict = tdict(True)
- NameList = []
- # find out all PPI definitions for specific arch and 'common' arch
- RecordList = self._RawData[MODEL_EFI_PPI, self._Arch]
- for Name, Guid, Dummy, Arch, ID, LineNo in RecordList:
- if Name not in NameList:
- NameList.append(Name)
- PpiDict[Arch, Name] = Guid
- # use sdict to keep the order
- self._Ppis = sdict()
- for Name in NameList:
- #
- # limit the ARCH to self._Arch, if no self._Arch found, tdict
- # will automatically turn to 'common' ARCH for trying
- #
- self._Ppis[Name] = PpiDict[self._Arch, Name]
- return self._Ppis
-
- ## Retrieve GUID definitions (name/value pairs)
- def _GetGuid(self):
- if self._Guids == None:
- #
- # tdict is a special kind of dict, used for selecting correct
- # GUID defition for given ARCH
- #
- GuidDict = tdict(True)
- NameList = []
- # find out all protocol definitions for specific and 'common' arch
- RecordList = self._RawData[MODEL_EFI_GUID, self._Arch]
- for Name, Guid, Dummy, Arch, ID, LineNo in RecordList:
- if Name not in NameList:
- NameList.append(Name)
- GuidDict[Arch, Name] = Guid
- # use sdict to keep the order
- self._Guids = sdict()
- for Name in NameList:
- #
- # limit the ARCH to self._Arch, if no self._Arch found, tdict
- # will automatically turn to 'common' ARCH for trying
- #
- self._Guids[Name] = GuidDict[self._Arch, Name]
- return self._Guids
-
- ## Retrieve public include paths declared in this package
- def _GetInclude(self):
- if self._Includes == None:
- self._Includes = []
- RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch]
- Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
- Macros.update(self._Macros)
- for Record in RecordList:
- File = PathClass(NormPath(Record[0], Macros), self._PackageDir, Arch=self._Arch)
- LineNo = Record[-1]
- # validate the path
- ErrorCode, ErrorInfo = File.Validate()
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
-
- # avoid duplicate include path
- if File not in self._Includes:
- self._Includes.append(File)
- return self._Includes
-
- ## Retrieve library class declarations (not used in build at present)
- def _GetLibraryClass(self):
- if self._LibraryClasses == None:
- #
- # tdict is a special kind of dict, used for selecting correct
- # library class declaration for given ARCH
- #
- LibraryClassDict = tdict(True)
- LibraryClassSet = set()
- RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch]
- Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
- Macros.update(self._Macros)
- for LibraryClass, File, Dummy, Arch, ID, LineNo in RecordList:
- File = PathClass(NormPath(File, Macros), self._PackageDir, Arch=self._Arch)
- # check the file validation
- ErrorCode, ErrorInfo = File.Validate()
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
- LibraryClassSet.add(LibraryClass)
- LibraryClassDict[Arch, LibraryClass] = File
- self._LibraryClasses = sdict()
- for LibraryClass in LibraryClassSet:
- self._LibraryClasses[LibraryClass] = LibraryClassDict[self._Arch, LibraryClass]
- return self._LibraryClasses
-
- ## Retrieve PCD declarations
- def _GetPcds(self):
- if self._Pcds == None:
- self._Pcds = {}
- self._Pcds.update(self._GetPcd(MODEL_PCD_FIXED_AT_BUILD))
- self._Pcds.update(self._GetPcd(MODEL_PCD_PATCHABLE_IN_MODULE))
- self._Pcds.update(self._GetPcd(MODEL_PCD_FEATURE_FLAG))
- self._Pcds.update(self._GetPcd(MODEL_PCD_DYNAMIC))
- self._Pcds.update(self._GetPcd(MODEL_PCD_DYNAMIC_EX))
- return self._Pcds
-
- ## Retrieve PCD declarations for given type
- def _GetPcd(self, Type):
- Pcds = {}
- #
- # tdict is a special kind of dict, used for selecting correct
- # PCD declaration for given ARCH
- #
- PcdDict = tdict(True, 3)
- # for summarizing PCD
- PcdSet = set()
- # find out all PCDs of the 'type'
- RecordList = self._RawData[Type, self._Arch]
- for TokenSpaceGuid, PcdCName, Setting, Arch, Dummy1, Dummy2 in RecordList:
- PcdDict[Arch, PcdCName, TokenSpaceGuid] = Setting
- PcdSet.add((PcdCName, TokenSpaceGuid))
-
- for PcdCName, TokenSpaceGuid in PcdSet:
- ValueList = ['', '', '']
- #
- # limit the ARCH to self._Arch, if no self._Arch found, tdict
- # will automatically turn to 'common' ARCH and try again
- #
- Setting = PcdDict[self._Arch, PcdCName, TokenSpaceGuid]
- if Setting == None:
- continue
- TokenList = Setting.split(TAB_VALUE_SPLIT)
- ValueList[0:len(TokenList)] = TokenList
- DefaultValue, DatumType, TokenNumber = ValueList
- Pcds[PcdCName, TokenSpaceGuid, self._PCD_TYPE_STRING_[Type]] = PcdClassObject(
- PcdCName,
- TokenSpaceGuid,
- self._PCD_TYPE_STRING_[Type],
- DatumType,
- DefaultValue,
- TokenNumber,
- '',
- {},
- None
- )
- return Pcds
-
-
- Arch = property(_GetArch, _SetArch)
- PackageName = property(_GetPackageName)
- Guid = property(_GetFileGuid)
- Version = property(_GetVersion)
-
- Protocols = property(_GetProtocol)
- Ppis = property(_GetPpi)
- Guids = property(_GetGuid)
- Includes = property(_GetInclude)
- LibraryClasses = property(_GetLibraryClass)
- Pcds = property(_GetPcds)
-
-## Module build information from INF file
-#
-# This class is used to retrieve information stored in database and convert them
-# into ModuleBuildClassObject form for easier use for AutoGen.
-#
-class InfBuildData(ModuleBuildClassObject):
- # dict used to convert PCD type in database to string used by build tool
- _PCD_TYPE_STRING_ = {
- MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild",
- MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule",
- MODEL_PCD_FEATURE_FLAG : "FeatureFlag",
- MODEL_PCD_DYNAMIC : "Dynamic",
- MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic",
- MODEL_PCD_DYNAMIC_HII : "DynamicHii",
- MODEL_PCD_DYNAMIC_VPD : "DynamicVpd",
- MODEL_PCD_DYNAMIC_EX : "DynamicEx",
- MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx",
- MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii",
- MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd",
- }
-
- # dict used to convert part of [Defines] to members of InfBuildData directly
- _PROPERTY_ = {
- #
- # Required Fields
- #
- TAB_INF_DEFINES_BASE_NAME : "_BaseName",
- TAB_INF_DEFINES_FILE_GUID : "_Guid",
- TAB_INF_DEFINES_MODULE_TYPE : "_ModuleType",
- #
- # Optional Fields
- #
- TAB_INF_DEFINES_INF_VERSION : "_AutoGenVersion",
- TAB_INF_DEFINES_COMPONENT_TYPE : "_ComponentType",
- TAB_INF_DEFINES_MAKEFILE_NAME : "_MakefileName",
- #TAB_INF_DEFINES_CUSTOM_MAKEFILE : "_CustomMakefile",
- TAB_INF_DEFINES_VERSION_NUMBER : "_Version",
- TAB_INF_DEFINES_VERSION_STRING : "_Version",
- TAB_INF_DEFINES_VERSION : "_Version",
- TAB_INF_DEFINES_PCD_IS_DRIVER : "_PcdIsDriver",
- TAB_INF_DEFINES_SHADOW : "_Shadow",
-
- TAB_COMPONENTS_SOURCE_OVERRIDE_PATH : "_SourceOverridePath",
- }
-
- # dict used to convert Component type to Module type
- _MODULE_TYPE_ = {
- "LIBRARY" : "BASE",
- "SECURITY_CORE" : "SEC",
- "PEI_CORE" : "PEI_CORE",
- "COMBINED_PEIM_DRIVER" : "PEIM",
- "PIC_PEIM" : "PEIM",
- "RELOCATABLE_PEIM" : "PEIM",
- "PE32_PEIM" : "PEIM",
- "BS_DRIVER" : "DXE_DRIVER",
- "RT_DRIVER" : "DXE_RUNTIME_DRIVER",
- "SAL_RT_DRIVER" : "DXE_SAL_DRIVER",
- "DXE_SMM_DRIVER" : "DXE_SMM_DRIVER",
- # "SMM_DRIVER" : "DXE_SMM_DRIVER",
- # "BS_DRIVER" : "DXE_SMM_DRIVER",
- # "BS_DRIVER" : "UEFI_DRIVER",
- "APPLICATION" : "UEFI_APPLICATION",
- "LOGO" : "BASE",
- }
-
- # regular expression for converting XXX_FLAGS in [nmake] section to new type
- _NMAKE_FLAG_PATTERN_ = re.compile("(?:EBC_)?([A-Z]+)_(?:STD_|PROJ_|ARCH_)?FLAGS(?:_DLL|_ASL|_EXE)?", re.UNICODE)
- # dict used to convert old tool name used in [nmake] section to new ones
- _TOOL_CODE_ = {
- "C" : "CC",
- "LIB" : "SLINK",
- "LINK" : "DLINK",
- }
-
-
- ## Constructor of DscBuildData
- #
- # Initialize object of DscBuildData
- #
- # @param FilePath The path of platform description file
- # @param RawData The raw data of DSC file
- # @param BuildDataBase Database used to retrieve module/package information
- # @param Arch The target architecture
- # @param Platform The name of platform employing this module
- # @param Macros Macros used for replacement in DSC file
- #
- def __init__(self, FilePath, RawData, BuildDatabase, Arch='COMMON', Platform='COMMON', Macros={}):
- self.MetaFile = FilePath
- self._ModuleDir = FilePath.Dir
- self._RawData = RawData
- self._Bdb = BuildDatabase
- self._Arch = Arch
- self._Platform = 'COMMON'
- self._Macros = Macros
- self._SourceOverridePath = None
- if FilePath.Key in GlobalData.gOverrideDir:
- self._SourceOverridePath = GlobalData.gOverrideDir[FilePath.Key]
- self._Clear()
-
- ## XXX[key] = value
- def __setitem__(self, key, value):
- self.__dict__[self._PROPERTY_[key]] = value
-
- ## value = XXX[key]
- def __getitem__(self, key):
- return self.__dict__[self._PROPERTY_[key]]
-
- ## "in" test support
- def __contains__(self, key):
- return key in self._PROPERTY_
-
- ## Set all internal used members of InfBuildData to None
- def _Clear(self):
- self._Header_ = None
- self._AutoGenVersion = None
- self._BaseName = None
- self._ModuleType = None
- self._ComponentType = None
- self._BuildType = None
- self._Guid = None
- self._Version = None
- self._PcdIsDriver = None
- self._BinaryModule = None
- self._Shadow = None
- self._MakefileName = None
- self._CustomMakefile = None
- self._Specification = None
- self._LibraryClass = None
- self._ModuleEntryPointList = None
- self._ModuleUnloadImageList = None
- self._ConstructorList = None
- self._DestructorList = None
- self._Defs = None
- self._Binaries = None
- self._Sources = None
- self._LibraryClasses = None
- self._Libraries = None
- self._Protocols = None
- self._Ppis = None
- self._Guids = None
- self._Includes = None
- self._Packages = None
- self._Pcds = None
- self._BuildOptions = None
- self._Depex = None
- self._DepexExpression = None
- #self._SourceOverridePath = None
-
- ## Get architecture
- def _GetArch(self):
- return self._Arch
-
- ## Set architecture
- #
- # Changing the default ARCH to another may affect all other information
- # because all information in a platform may be ARCH-related. That's
- # why we need to clear all internal used members, in order to cause all
- # information to be re-retrieved.
- #
- # @param Value The value of ARCH
- #
- def _SetArch(self, Value):
- if self._Arch == Value:
- return
- self._Arch = Value
- self._Clear()
-
- ## Return the name of platform employing this module
- def _GetPlatform(self):
- return self._Platform
-
- ## Change the name of platform employing this module
- #
- # Changing the default name of platform to another may affect some information
- # because they may be PLATFORM-related. That's why we need to clear all internal
- # used members, in order to cause all information to be re-retrieved.
- #
- def _SetPlatform(self, Value):
- if self._Platform == Value:
- return
- self._Platform = Value
- self._Clear()
-
- ## Retrieve all information in [Defines] section
- #
- # (Retriving all [Defines] information in one-shot is just to save time.)
- #
- def _GetHeaderInfo(self):
- RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch, self._Platform]
- for Record in RecordList:
- Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
- Name = Record[0]
- # items defined _PROPERTY_ don't need additional processing
- if Name in self:
- self[Name] = Record[1]
- # some special items in [Defines] section need special treatment
- elif Name == 'EFI_SPECIFICATION_VERSION':
- if self._Specification == None:
- self._Specification = sdict()
- self._Specification[Name] = Record[1]
- elif Name == 'EDK_RELEASE_VERSION':
- if self._Specification == None:
- self._Specification = sdict()
- self._Specification[Name] = Record[1]
- elif Name == 'PI_SPECIFICATION_VERSION':
- if self._Specification == None:
- self._Specification = sdict()
- self._Specification[Name] = Record[1]
- elif Name == 'LIBRARY_CLASS':
- if self._LibraryClass == None:
- self._LibraryClass = []
- ValueList = GetSplitValueList(Record[1])
- LibraryClass = ValueList[0]
- if len(ValueList) > 1:
- SupModuleList = GetSplitValueList(ValueList[1], ' ')
- else:
- SupModuleList = SUP_MODULE_LIST
- self._LibraryClass.append(LibraryClassObject(LibraryClass, SupModuleList))
- elif Name == 'ENTRY_POINT':
- if self._ModuleEntryPointList == None:
- self._ModuleEntryPointList = []
- self._ModuleEntryPointList.append(Record[1])
- elif Name == 'UNLOAD_IMAGE':
- if self._ModuleUnloadImageList == None:
- self._ModuleUnloadImageList = []
- if Record[1] == '':
- continue
- self._ModuleUnloadImageList.append(Record[1])
- elif Name == 'CONSTRUCTOR':
- if self._ConstructorList == None:
- self._ConstructorList = []
- if Record[1] == '':
- continue
- self._ConstructorList.append(Record[1])
- elif Name == 'DESTRUCTOR':
- if self._DestructorList == None:
- self._DestructorList = []
- if Record[1] == '':
- continue
- self._DestructorList.append(Record[1])
- elif Name == TAB_INF_DEFINES_CUSTOM_MAKEFILE:
- TokenList = GetSplitValueList(Record[1])
- if self._CustomMakefile == None:
- self._CustomMakefile = {}
- if len(TokenList) < 2:
- self._CustomMakefile['MSFT'] = TokenList[0]
- self._CustomMakefile['GCC'] = TokenList[0]
- else:
- if TokenList[0] not in ['MSFT', 'GCC']:
- EdkLogger.error("build", FORMAT_NOT_SUPPORTED,
- "No supported family [%s]" % TokenList[0],
- File=self.MetaFile, Line=Record[-1])
- self._CustomMakefile[TokenList[0]] = TokenList[1]
- else:
- if self._Defs == None:
- self._Defs = sdict()
- self._Defs[Name] = Record[1]
-
- #
- # Retrieve information in sections specific to R8.x modules
- #
- if self._AutoGenVersion >= 0x00010005: # _AutoGenVersion may be None, which is less than anything
- if not self._ModuleType:
- EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE,
- "MODULE_TYPE is not given", File=self.MetaFile)
- if (self._Specification == None) or (not 'PI_SPECIFICATION_VERSION' in self._Specification) or (self._Specification['PI_SPECIFICATION_VERSION'] < 0x0001000A):
- if self._ModuleType == SUP_MODULE_SMM_CORE:
- EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.MetaFile)
- if self._Defs and 'PCI_DEVICE_ID' in self._Defs and 'PCI_VENDOR_ID' in self._Defs \
- and 'PCI_CLASS_CODE' in self._Defs:
- self._BuildType = 'UEFI_OPTIONROM'
- elif self._Defs and 'UEFI_HII_RESOURCE_SECTION' in self._Defs \
- and self._Defs['UEFI_HII_RESOURCE_SECTION'] == 'TRUE':
- self._BuildType = 'UEFI_HII'
- else:
- self._BuildType = self._ModuleType.upper()
- else:
- self._BuildType = self._ComponentType.upper()
- if not self._ComponentType:
- EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE,
- "COMPONENT_TYPE is not given", File=self.MetaFile)
- if self._ComponentType in self._MODULE_TYPE_:
- self._ModuleType = self._MODULE_TYPE_[self._ComponentType]
- if self._ComponentType == 'LIBRARY':
- self._LibraryClass = [LibraryClassObject(self._BaseName, SUP_MODULE_LIST)]
- # make use some [nmake] section macros
- RecordList = self._RawData[MODEL_META_DATA_NMAKE, self._Arch, self._Platform]
- for Name,Value,Dummy,Arch,Platform,ID,LineNo in RecordList:
- Value = Value.replace('$(PROCESSOR)', self._Arch)
- Name = Name.replace('$(PROCESSOR)', self._Arch)
- Name, Value = ReplaceMacros((Name, Value), GlobalData.gEdkGlobal, True)
- if Name == "IMAGE_ENTRY_POINT":
- if self._ModuleEntryPointList == None:
- self._ModuleEntryPointList = []
- self._ModuleEntryPointList.append(Value)
- elif Name == "DPX_SOURCE":
- Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
- Macros.update(self._Macros)
- File = PathClass(NormPath(Value, Macros), self._ModuleDir, Arch=self._Arch)
- # check the file validation
- ErrorCode, ErrorInfo = File.Validate(".dxs", CaseSensitive=False)
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo,
- File=self.MetaFile, Line=LineNo)
- if self.Sources == None:
- self._Sources = []
- self._Sources.append(File)
- else:
- ToolList = self._NMAKE_FLAG_PATTERN_.findall(Name)
- if len(ToolList) == 0 or len(ToolList) != 1:
- pass
-# EdkLogger.warn("build", "Don't know how to do with macro [%s]" % Name,
-# File=self.MetaFile, Line=LineNo)
- else:
- if self._BuildOptions == None:
- self._BuildOptions = sdict()
-
- if ToolList[0] in self._TOOL_CODE_:
- Tool = self._TOOL_CODE_[ToolList[0]]
- else:
- Tool = ToolList[0]
- ToolChain = "*_*_*_%s_FLAGS" % Tool
- ToolChainFamily = 'MSFT' # R8.x only support MSFT tool chain
- #ignore not replaced macros in value
- ValueList = GetSplitValueList(' ' + Value, '/D')
- Dummy = ValueList[0]
- for Index in range(1, len(ValueList)):
- if ValueList[Index][-1] == '=' or ValueList[Index] == '':
- continue
- Dummy = Dummy + ' /D ' + ValueList[Index]
- Value = Dummy.strip()
- if (ToolChainFamily, ToolChain) not in self._BuildOptions:
- self._BuildOptions[ToolChainFamily, ToolChain] = Value
- else:
- OptionString = self._BuildOptions[ToolChainFamily, ToolChain]
- self._BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Value
- # set _Header to non-None in order to avoid database re-querying
- self._Header_ = 'DUMMY'
-
- ## Retrieve file version
- def _GetInfVersion(self):
- if self._AutoGenVersion == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._AutoGenVersion == None:
- self._AutoGenVersion = 0x00010000
- return self._AutoGenVersion
-
- ## Retrieve BASE_NAME
- def _GetBaseName(self):
- if self._BaseName == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._BaseName == None:
- EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No BASE_NAME name", File=self.MetaFile)
- return self._BaseName
-
- ## Retrieve MODULE_TYPE
- def _GetModuleType(self):
- if self._ModuleType == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._ModuleType == None:
- self._ModuleType = 'BASE'
- if self._ModuleType not in SUP_MODULE_LIST:
- self._ModuleType = "USER_DEFINED"
- return self._ModuleType
-
- ## Retrieve COMPONENT_TYPE
- def _GetComponentType(self):
- if self._ComponentType == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._ComponentType == None:
- self._ComponentType = 'USER_DEFINED'
- return self._ComponentType
-
- ## Retrieve "BUILD_TYPE"
- def _GetBuildType(self):
- if self._BuildType == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if not self._BuildType:
- self._BuildType = "BASE"
- return self._BuildType
-
- ## Retrieve file guid
- def _GetFileGuid(self):
- if self._Guid == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._Guid == None:
- self._Guid = '00000000-0000-0000-000000000000'
- return self._Guid
-
- ## Retrieve module version
- def _GetVersion(self):
- if self._Version == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._Version == None:
- self._Version = '0.0'
- return self._Version
-
- ## Retrieve PCD_IS_DRIVER
- def _GetPcdIsDriver(self):
- if self._PcdIsDriver == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._PcdIsDriver == None:
- self._PcdIsDriver = ''
- return self._PcdIsDriver
-
- ## Retrieve SHADOW
- def _GetShadow(self):
- if self._Shadow == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._Shadow != None and self._Shadow.upper() == 'TRUE':
- self._Shadow = True
- else:
- self._Shadow = False
- return self._Shadow
-
- ## Retrieve CUSTOM_MAKEFILE
- def _GetMakefile(self):
- if self._CustomMakefile == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._CustomMakefile == None:
- self._CustomMakefile = {}
- return self._CustomMakefile
-
- ## Retrieve EFI_SPECIFICATION_VERSION
- def _GetSpec(self):
- if self._Specification == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._Specification == None:
- self._Specification = {}
- return self._Specification
-
- ## Retrieve LIBRARY_CLASS
- def _GetLibraryClass(self):
- if self._LibraryClass == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._LibraryClass == None:
- self._LibraryClass = []
- return self._LibraryClass
-
- ## Retrieve ENTRY_POINT
- def _GetEntryPoint(self):
- if self._ModuleEntryPointList == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._ModuleEntryPointList == None:
- self._ModuleEntryPointList = []
- return self._ModuleEntryPointList
-
- ## Retrieve UNLOAD_IMAGE
- def _GetUnloadImage(self):
- if self._ModuleUnloadImageList == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._ModuleUnloadImageList == None:
- self._ModuleUnloadImageList = []
- return self._ModuleUnloadImageList
-
- ## Retrieve CONSTRUCTOR
- def _GetConstructor(self):
- if self._ConstructorList == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._ConstructorList == None:
- self._ConstructorList = []
- return self._ConstructorList
-
- ## Retrieve DESTRUCTOR
- def _GetDestructor(self):
- if self._DestructorList == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._DestructorList == None:
- self._DestructorList = []
- return self._DestructorList
-
- ## Retrieve definies other than above ones
- def _GetDefines(self):
- if self._Defs == None:
- if self._Header_ == None:
- self._GetHeaderInfo()
- if self._Defs == None:
- self._Defs = sdict()
- return self._Defs
-
- ## Retrieve binary files
- def _GetBinaryFiles(self):
- if self._Binaries == None:
- self._Binaries = []
- RecordList = self._RawData[MODEL_EFI_BINARY_FILE, self._Arch, self._Platform]
- Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource, 'PROCESSOR':self._Arch}
- Macros.update(self._Macros)
- for Record in RecordList:
- Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
- FileType = Record[0]
- LineNo = Record[-1]
- Target = 'COMMON'
- FeatureFlag = []
- if Record[2]:
- TokenList = GetSplitValueList(Record[2], TAB_VALUE_SPLIT)
- if TokenList:
- Target = TokenList[0]
- if len(TokenList) > 1:
- FeatureFlag = Record[1:]
-
- File = PathClass(NormPath(Record[1], Macros), self._ModuleDir, '', FileType, True, self._Arch, '', Target)
- # check the file validation
- ErrorCode, ErrorInfo = File.Validate()
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
- self._Binaries.append(File)
- return self._Binaries
-
- ## Retrieve source files
- def _GetSourceFiles(self):
- if self._Sources == None:
- self._Sources = []
- RecordList = self._RawData[MODEL_EFI_SOURCE_FILE, self._Arch, self._Platform]
- Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource, 'PROCESSOR':self._Arch}
- Macros.update(self._Macros)
- for Record in RecordList:
- Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
- LineNo = Record[-1]
- ToolChainFamily = Record[1]
- TagName = Record[2]
- ToolCode = Record[3]
- FeatureFlag = Record[4]
- if self._AutoGenVersion < 0x00010005:
- # old module source files (R8)
- File = PathClass(NormPath(Record[0], Macros), self._ModuleDir, self._SourceOverridePath,
- '', False, self._Arch, ToolChainFamily, '', TagName, ToolCode)
- # check the file validation
- ErrorCode, ErrorInfo = File.Validate(CaseSensitive=False)
- if ErrorCode != 0:
- if File.Ext.lower() == '.h':
- EdkLogger.warn('build', 'Include file not found', ExtraData=ErrorInfo,
- File=self.MetaFile, Line=LineNo)
- continue
- else:
- EdkLogger.error('build', ErrorCode, ExtraData=File, File=self.MetaFile, Line=LineNo)
- else:
- File = PathClass(NormPath(Record[0], Macros), self._ModuleDir, '',
- '', False, self._Arch, ToolChainFamily, '', TagName, ToolCode)
- # check the file validation
- ErrorCode, ErrorInfo = File.Validate()
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
-
- self._Sources.append(File)
- return self._Sources
-
- ## Retrieve library classes employed by this module
- def _GetLibraryClassUses(self):
- if self._LibraryClasses == None:
- self._LibraryClasses = sdict()
- RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch, self._Platform]
- for Record in RecordList:
- Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
- Lib = Record[0]
- Instance = Record[1]
- if Instance != None and Instance != '':
- Instance = NormPath(Instance, self._Macros)
- self._LibraryClasses[Lib] = Instance
- return self._LibraryClasses
-
- ## Retrieve library names (for R8.x style of modules)
- def _GetLibraryNames(self):
- if self._Libraries == None:
- self._Libraries = []
- RecordList = self._RawData[MODEL_EFI_LIBRARY_INSTANCE, self._Arch, self._Platform]
- for Record in RecordList:
- # in case of name with '.lib' extension, which is unusual in R8.x inf
- Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
- LibraryName = os.path.splitext(Record[0])[0]
- if LibraryName not in self._Libraries:
- self._Libraries.append(LibraryName)
- return self._Libraries
-
- ## Retrieve protocols consumed/produced by this module
- def _GetProtocols(self):
- if self._Protocols == None:
- self._Protocols = sdict()
- RecordList = self._RawData[MODEL_EFI_PROTOCOL, self._Arch, self._Platform]
- for Record in RecordList:
- CName = Record[0]
- Value = ProtocolValue(CName, self.Packages)
- if Value == None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
- "Value of Protocol [%s] is not found under [Protocols] section in" % CName,
- ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
- self._Protocols[CName] = Value
- return self._Protocols
-
- ## Retrieve PPIs consumed/produced by this module
- def _GetPpis(self):
- if self._Ppis == None:
- self._Ppis = sdict()
- RecordList = self._RawData[MODEL_EFI_PPI, self._Arch, self._Platform]
- for Record in RecordList:
- CName = Record[0]
- Value = PpiValue(CName, self.Packages)
- if Value == None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
- "Value of PPI [%s] is not found under [Ppis] section in " % CName,
- ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
- self._Ppis[CName] = Value
- return self._Ppis
-
- ## Retrieve GUIDs consumed/produced by this module
- def _GetGuids(self):
- if self._Guids == None:
- self._Guids = sdict()
- RecordList = self._RawData[MODEL_EFI_GUID, self._Arch, self._Platform]
- for Record in RecordList:
- CName = Record[0]
- Value = GuidValue(CName, self.Packages)
- if Value == None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
- "Value of Guid [%s] is not found under [Guids] section in" % CName,
- ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
- self._Guids[CName] = Value
- return self._Guids
-
- ## Retrieve include paths necessary for this module (for R8.x style of modules)
- def _GetIncludes(self):
- if self._Includes == None:
- self._Includes = []
- if self._SourceOverridePath:
- self._Includes.append(self._SourceOverridePath)
- RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch, self._Platform]
- # [includes] section must be used only in old (R8.x) inf file
- if self.AutoGenVersion >= 0x00010005 and len(RecordList) > 0:
- EdkLogger.error('build', FORMAT_NOT_SUPPORTED, "No [include] section allowed",
- File=self.MetaFile, Line=RecordList[0][-1]-1)
- for Record in RecordList:
- Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
- Record[0] = Record[0].replace('$(PROCESSOR)', self._Arch)
- Record[0] = ReplaceMacro(Record[0], {'EFI_SOURCE' : GlobalData.gEfiSource}, False)
- if Record[0].find('EDK_SOURCE') > -1:
- File = NormPath(ReplaceMacro(Record[0], {'EDK_SOURCE' : GlobalData.gEcpSource}, False), self._Macros)
- if File[0] == '.':
- File = os.path.join(self._ModuleDir, File)
- else:
- File = os.path.join(GlobalData.gWorkspace, File)
- File = RealPath(os.path.normpath(File))
- if File:
- self._Includes.append(File)
-
- #TRICK: let compiler to choose correct header file
- File = NormPath(ReplaceMacro(Record[0], {'EDK_SOURCE' : GlobalData.gEdkSource}, False), self._Macros)
- if File[0] == '.':
- File = os.path.join(self._ModuleDir, File)
- else:
- File = os.path.join(GlobalData.gWorkspace, File)
- File = RealPath(os.path.normpath(File))
- if File:
- self._Includes.append(File)
- else:
- File = NormPath(Record[0], self._Macros)
- if File[0] == '.':
- File = os.path.join(self._ModuleDir, File)
- else:
- File = os.path.join(GlobalData.gWorkspace, File)
- File = RealPath(os.path.normpath(File))
- if File:
- self._Includes.append(File)
- return self._Includes
-
- ## Retrieve packages this module depends on
- def _GetPackages(self):
- if self._Packages == None:
- self._Packages = []
- RecordList = self._RawData[MODEL_META_DATA_PACKAGE, self._Arch, self._Platform]
- Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
- Macros.update(self._Macros)
- for Record in RecordList:
- File = PathClass(NormPath(Record[0], Macros), GlobalData.gWorkspace, Arch=self._Arch)
- LineNo = Record[-1]
- # check the file validation
- ErrorCode, ErrorInfo = File.Validate('.dec')
- if ErrorCode != 0:
- EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
- # parse this package now. we need it to get protocol/ppi/guid value
- Package = self._Bdb[File, self._Arch]
- self._Packages.append(Package)
- return self._Packages
-
- ## Retrieve PCDs used in this module
- def _GetPcds(self):
- if self._Pcds == None:
- self._Pcds = {}
- self._Pcds.update(self._GetPcd(MODEL_PCD_FIXED_AT_BUILD))
- self._Pcds.update(self._GetPcd(MODEL_PCD_PATCHABLE_IN_MODULE))
- self._Pcds.update(self._GetPcd(MODEL_PCD_FEATURE_FLAG))
- self._Pcds.update(self._GetPcd(MODEL_PCD_DYNAMIC))
- self._Pcds.update(self._GetPcd(MODEL_PCD_DYNAMIC_EX))
- return self._Pcds
-
- ## Retrieve build options specific to this module
- def _GetBuildOptions(self):
- if self._BuildOptions == None:
- self._BuildOptions = sdict()
- RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, self._Platform]
- for Record in RecordList:
- ToolChainFamily = Record[0]
- ToolChain = Record[1]
- Option = Record[2]
- if (ToolChainFamily, ToolChain) not in self._BuildOptions:
- self._BuildOptions[ToolChainFamily, ToolChain] = Option
- else:
- # concatenate the option string if they're for the same tool
- OptionString = self._BuildOptions[ToolChainFamily, ToolChain]
- self._BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Option
- return self._BuildOptions
-
- ## Retrieve depedency expression
- def _GetDepex(self):
- if self._Depex == None:
- self._Depex = tdict(False, 2)
- RecordList = self._RawData[MODEL_EFI_DEPEX, self._Arch]
-
- # PEIM and DXE drivers must have a valid [Depex] section
- if len(self.LibraryClass) == 0 and len(RecordList) == 0:
- if self.ModuleType == 'DXE_DRIVER' or self.ModuleType == 'PEIM' or self.ModuleType == 'DXE_SMM_DRIVER' or \
- self.ModuleType == 'DXE_SAL_DRIVER' or self.ModuleType == 'DXE_RUNTIME_DRIVER':
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "No [Depex] section or no valid expression in [Depex] section for [%s] module" \
- % self.ModuleType, File=self.MetaFile)
-
- Depex = {}
- for Record in RecordList:
- Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
- Arch = Record[3]
- ModuleType = Record[4]
- TokenList = Record[0].split()
- if (Arch, ModuleType) not in Depex:
- Depex[Arch, ModuleType] = []
- DepexList = Depex[Arch, ModuleType]
- for Token in TokenList:
- if Token in DEPEX_SUPPORTED_OPCODE:
- DepexList.append(Token)
- elif Token.endswith(".inf"): # module file name
- ModuleFile = os.path.normpath(Token)
- Module = self.BuildDatabase[ModuleFile]
- if Module == None:
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "Module is not found in active platform",
- ExtraData=Token, File=self.MetaFile, Line=Record[-1])
- DepexList.append(Module.Guid)
- else:
- # get the GUID value now
- Value = ProtocolValue(Token, self.Packages)
- if Value == None:
- Value = PpiValue(Token, self.Packages)
- if Value == None:
- Value = GuidValue(Token, self.Packages)
- if Value == None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
- "Value of [%s] is not found in" % Token,
- ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
- DepexList.append(Value)
- for Arch, ModuleType in Depex:
- self._Depex[Arch, ModuleType] = Depex[Arch, ModuleType]
- return self._Depex
-
- ## Retrieve depedency expression
- def _GetDepexExpression(self):
- if self._DepexExpression == None:
- self._DepexExpression = tdict(False, 2)
- RecordList = self._RawData[MODEL_EFI_DEPEX, self._Arch]
- DepexExpression = {}
- for Record in RecordList:
- Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
- Arch = Record[3]
- ModuleType = Record[4]
- TokenList = Record[0].split()
- if (Arch, ModuleType) not in DepexExpression:
- DepexExpression[Arch, ModuleType] = ''
- for Token in TokenList:
- DepexExpression[Arch, ModuleType] = DepexExpression[Arch, ModuleType] + Token.strip() + ' '
- for Arch, ModuleType in DepexExpression:
- self._DepexExpression[Arch, ModuleType] = DepexExpression[Arch, ModuleType]
- return self._DepexExpression
-
- ## Retrieve PCD for given type
- def _GetPcd(self, Type):
- Pcds = {}
- PcdDict = tdict(True, 4)
- PcdSet = set()
- RecordList = self._RawData[Type, self._Arch, self._Platform]
- for TokenSpaceGuid, PcdCName, Setting, Arch, Platform, Dummy1, LineNo in RecordList:
- PcdDict[Arch, Platform, PcdCName, TokenSpaceGuid] = (Setting, LineNo)
- PcdSet.add((PcdCName, TokenSpaceGuid))
- # get the guid value
- if TokenSpaceGuid not in self.Guids:
- Value = GuidValue(TokenSpaceGuid, self.Packages)
- if Value == None:
- PackageList = "\n\t".join([str(P) for P in self.Packages])
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
- "Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid,
- ExtraData=PackageList, File=self.MetaFile, Line=LineNo)
- self.Guids[TokenSpaceGuid] = Value
-
- # resolve PCD type, value, datum info, etc. by getting its definition from package
- for PcdCName, TokenSpaceGuid in PcdSet:
- ValueList = ['', '']
- Setting, LineNo = PcdDict[self._Arch, self.Platform, PcdCName, TokenSpaceGuid]
- if Setting == None:
- continue
- TokenList = Setting.split(TAB_VALUE_SPLIT)
- ValueList[0:len(TokenList)] = TokenList
- DefaultValue = ValueList[0]
- Pcd = PcdClassObject(
- PcdCName,
- TokenSpaceGuid,
- '',
- '',
- DefaultValue,
- '',
- '',
- {},
- self.Guids[TokenSpaceGuid]
- )
-
- # get necessary info from package declaring this PCD
- for Package in self.Packages:
- #
- # 'dynamic' in INF means its type is determined by platform;
- # if platform doesn't give its type, use 'lowest' one in the
- # following order, if any
- #
- # "FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"
- #
- PcdType = self._PCD_TYPE_STRING_[Type]
- if Type in [MODEL_PCD_DYNAMIC, MODEL_PCD_DYNAMIC_EX]:
- Pcd.Pending = True
- for T in ["FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"]:
- if (PcdCName, TokenSpaceGuid, T) in Package.Pcds:
- PcdType = T
- break
- else:
- Pcd.Pending = False
-
- if (PcdCName, TokenSpaceGuid, PcdType) in Package.Pcds:
- PcdInPackage = Package.Pcds[PcdCName, TokenSpaceGuid, PcdType]
- Pcd.Type = PcdType
- Pcd.TokenValue = PcdInPackage.TokenValue
- Pcd.DatumType = PcdInPackage.DatumType
- Pcd.MaxDatumSize = PcdInPackage.MaxDatumSize
- Pcd.InfDefaultValue = Pcd.DefaultValue
- if Pcd.DefaultValue in [None, '']:
- Pcd.DefaultValue = PcdInPackage.DefaultValue
- break
- else:
- EdkLogger.error(
- 'build',
- PARSER_ERROR,
- "PCD [%s.%s] in [%s] is not found in dependent packages:" % (TokenSpaceGuid, PcdCName, self.MetaFile),
- File =self.MetaFile, Line=LineNo,
- ExtraData="\t%s" % '\n\t'.join([str(P) for P in self.Packages])
- )
- Pcds[PcdCName, TokenSpaceGuid] = Pcd
- return Pcds
-
- Arch = property(_GetArch, _SetArch)
- Platform = property(_GetPlatform, _SetPlatform)
-
- AutoGenVersion = property(_GetInfVersion)
- BaseName = property(_GetBaseName)
- ModuleType = property(_GetModuleType)
- ComponentType = property(_GetComponentType)
- BuildType = property(_GetBuildType)
- Guid = property(_GetFileGuid)
- Version = property(_GetVersion)
- PcdIsDriver = property(_GetPcdIsDriver)
- Shadow = property(_GetShadow)
- CustomMakefile = property(_GetMakefile)
- Specification = property(_GetSpec)
- LibraryClass = property(_GetLibraryClass)
- ModuleEntryPointList = property(_GetEntryPoint)
- ModuleUnloadImageList = property(_GetUnloadImage)
- ConstructorList = property(_GetConstructor)
- DestructorList = property(_GetDestructor)
- Defines = property(_GetDefines)
-
- Binaries = property(_GetBinaryFiles)
- Sources = property(_GetSourceFiles)
- LibraryClasses = property(_GetLibraryClassUses)
- Libraries = property(_GetLibraryNames)
- Protocols = property(_GetProtocols)
- Ppis = property(_GetPpis)
- Guids = property(_GetGuids)
- Includes = property(_GetIncludes)
- Packages = property(_GetPackages)
- Pcds = property(_GetPcds)
- BuildOptions = property(_GetBuildOptions)
- Depex = property(_GetDepex)
- DepexExpression = property(_GetDepexExpression)
-
-## Database
-#
-# This class defined the build databse for all modules, packages and platform.
-# It will call corresponding parser for the given file if it cannot find it in
-# the database.
-#
-# @param DbPath Path of database file
-# @param GlobalMacros Global macros used for replacement during file parsing
-# @prarm RenewDb=False Create new database file if it's already there
-#
-class WorkspaceDatabase(object):
- # file parser
- _FILE_PARSER_ = {
- MODEL_FILE_INF : InfParser,
- MODEL_FILE_DEC : DecParser,
- MODEL_FILE_DSC : DscParser,
- MODEL_FILE_FDF : None, #FdfParser,
- MODEL_FILE_CIF : None
- }
-
- # file table
- _FILE_TABLE_ = {
- MODEL_FILE_INF : ModuleTable,
- MODEL_FILE_DEC : PackageTable,
- MODEL_FILE_DSC : PlatformTable,
- }
-
- # default database file path
- _DB_PATH_ = "Conf/.cache/build.db"
-
- #
- # internal class used for call corresponding file parser and caching the result
- # to avoid unnecessary re-parsing
- #
- class BuildObjectFactory(object):
- _FILE_TYPE_ = {
- ".inf" : MODEL_FILE_INF,
- ".dec" : MODEL_FILE_DEC,
- ".dsc" : MODEL_FILE_DSC,
- ".fdf" : MODEL_FILE_FDF,
- }
-
- # convert to xxxBuildData object
- _GENERATOR_ = {
- MODEL_FILE_INF : InfBuildData,
- MODEL_FILE_DEC : DecBuildData,
- MODEL_FILE_DSC : DscBuildData,
- MODEL_FILE_FDF : None #FlashDefTable,
- }
-
- _CACHE_ = {} # (FilePath, Arch) : <object>
-
- # constructor
- def __init__(self, WorkspaceDb):
- self.WorkspaceDb = WorkspaceDb
-
- # key = (FilePath, Arch='COMMON')
- def __contains__(self, Key):
- FilePath = Key[0]
- Arch = 'COMMON'
- if len(Key) > 1:
- Arch = Key[1]
- return (FilePath, Arch) in self._CACHE_
-
- # key = (FilePath, Arch='COMMON')
- def __getitem__(self, Key):
- FilePath = Key[0]
- Arch = 'COMMON'
- Platform = 'COMMON'
- if len(Key) > 1:
- Arch = Key[1]
- if len(Key) > 2:
- Platform = Key[2]
-
- # if it's generated before, just return the cached one
- Key = (FilePath, Arch)
- if Key in self._CACHE_:
- return self._CACHE_[Key]
-
- # check file type
- Ext = FilePath.Ext.lower()
- if Ext not in self._FILE_TYPE_:
- return None
- FileType = self._FILE_TYPE_[Ext]
- if FileType not in self._GENERATOR_:
- return None
-
- # get table for current file
- MetaFile = self.WorkspaceDb[FilePath, FileType, self.WorkspaceDb._GlobalMacros]
- BuildObject = self._GENERATOR_[FileType](
- FilePath,
- MetaFile,
- self,
- Arch,
- Platform,
- self.WorkspaceDb._GlobalMacros,
- )
- self._CACHE_[Key] = BuildObject
- return BuildObject
-
- # placeholder for file format conversion
- class TransformObjectFactory:
- def __init__(self, WorkspaceDb):
- self.WorkspaceDb = WorkspaceDb
-
- # key = FilePath, Arch
- def __getitem__(self, Key):
- pass
-
- ## Constructor of WorkspaceDatabase
- #
- # @param DbPath Path of database file
- # @param GlobalMacros Global macros used for replacement during file parsing
- # @prarm RenewDb=False Create new database file if it's already there
- #
- def __init__(self, DbPath, GlobalMacros={}, RenewDb=False):
- self._GlobalMacros = GlobalMacros
-
- if DbPath == None or DbPath == '':
- DbPath = os.path.normpath(os.path.join(GlobalData.gWorkspace, self._DB_PATH_))
-
- # don't create necessary path for db in memory
- if DbPath != ':memory:':
- DbDir = os.path.split(DbPath)[0]
- if not os.path.exists(DbDir):
- os.makedirs(DbDir)
-
- # remove db file in case inconsistency between db and file in file system
- if self._CheckWhetherDbNeedRenew(RenewDb, DbPath):
- os.remove(DbPath)
-
- # create db with optimized parameters
- self.Conn = sqlite3.connect(DbPath, isolation_level='DEFERRED')
- self.Conn.execute("PRAGMA synchronous=OFF")
- self.Conn.execute("PRAGMA temp_store=MEMORY")
- self.Conn.execute("PRAGMA count_changes=OFF")
- self.Conn.execute("PRAGMA cache_size=8192")
- #self.Conn.execute("PRAGMA page_size=8192")
-
- # to avoid non-ascii character conversion issue
- self.Conn.text_factory = str
- self.Cur = self.Conn.cursor()
-
- # create table for internal uses
- self.TblDataModel = TableDataModel(self.Cur)
- self.TblFile = TableFile(self.Cur)
-
- # conversion object for build or file format conversion purpose
- self.BuildObject = WorkspaceDatabase.BuildObjectFactory(self)
- self.TransformObject = WorkspaceDatabase.TransformObjectFactory(self)
-
- ## Check whether workspace database need to be renew.
- # The renew reason maybe:
- # 1) If user force to renew;
- # 2) If user do not force renew, and
- # a) If the time of last modified python source is newer than database file;
- # b) If the time of last modified frozen executable file is newer than database file;
- #
- # @param force User force renew database
- # @param DbPath The absolute path of workspace database file
- #
- # @return Bool value for whether need renew workspace databse
- #
- def _CheckWhetherDbNeedRenew (self, force, DbPath):
- DbDir = os.path.split(DbPath)[0]
- MacroFilePath = os.path.normpath(os.path.join(DbDir, "build.mac"))
- MacroMatch = False
- if os.path.exists(MacroFilePath) and os.path.isfile(MacroFilePath):
- LastMacros = None
- try:
- f = open(MacroFilePath,'r')
- LastMacros = pickle.load(f)
- f.close()
- except IOError:
- pass
- except:
- f.close()
-
- if LastMacros != None and type(LastMacros) is DictType:
- if LastMacros == self._GlobalMacros:
- MacroMatch = True
- for Macro in LastMacros.keys():
- if not (Macro in self._GlobalMacros and LastMacros[Macro] == self._GlobalMacros[Macro]):
- MacroMatch = False;
- break;
-
- if not MacroMatch:
- # save command line macros to file
- try:
- f = open(MacroFilePath,'w')
- pickle.dump(self._GlobalMacros, f, 2)
- f.close()
- except IOError:
- pass
- except:
- f.close()
-
- force = True
-
- # if database does not exist, we need do nothing
- if not os.path.exists(DbPath): return False
-
- # if user force to renew database, then not check whether database is out of date
- if force: return True
-
- #
- # Check the time of last modified source file or build.exe
- # if is newer than time of database, then database need to be re-created.
- #
- timeOfToolModified = 0
- if hasattr(sys, "frozen"):
- exePath = os.path.abspath(sys.executable)
- timeOfToolModified = os.stat(exePath).st_mtime
- else:
- curPath = os.path.dirname(__file__) # curPath is the path of WorkspaceDatabase.py
- rootPath = os.path.split(curPath)[0] # rootPath is root path of python source, such as /BaseTools/Source/Python
- if rootPath == "" or rootPath == None:
- EdkLogger.verbose("\nFail to find the root path of build.exe or python sources, so can not \
-determine whether database file is out of date!\n")
-
- # walk the root path of source or build's binary to get the time last modified.
-
- for root, dirs, files in os.walk (rootPath):
- for dir in dirs:
- # bypass source control folder
- if dir.lower() in [".svn", "_svn", "cvs"]:
- dirs.remove(dir)
-
- for file in files:
- ext = os.path.splitext(file)[1]
- if ext.lower() == ".py": # only check .py files
- fd = os.stat(os.path.join(root, file))
- if timeOfToolModified < fd.st_mtime:
- timeOfToolModified = fd.st_mtime
- if timeOfToolModified > os.stat(DbPath).st_mtime:
- EdkLogger.verbose("\nWorkspace database is out of data!")
- return True
-
- return False
-
- ## Initialize build database
- def InitDatabase(self):
- EdkLogger.verbose("\nInitialize build database started ...")
-
- #
- # Create new tables
- #
- self.TblDataModel.Create(False)
- self.TblFile.Create(False)
-
- #
- # Initialize table DataModel
- #
- self.TblDataModel.InitTable()
- EdkLogger.verbose("Initialize build database ... DONE!")
-
- ## Query a table
- #
- # @param Table: The instance of the table to be queried
- #
- def QueryTable(self, Table):
- Table.Query()
-
- ## Close entire database
- #
- # Commit all first
- # Close the connection and cursor
- #
- def Close(self):
- self.Conn.commit()
- self.Cur.close()
- self.Conn.close()
-
- ## Get unique file ID for the gvien file
- def GetFileId(self, FilePath):
- return self.TblFile.GetFileId(FilePath)
-
- ## Get file type value for the gvien file ID
- def GetFileType(self, FileId):
- return self.TblFile.GetFileType(FileId)
-
- ## Get time stamp stored in file table
- def GetTimeStamp(self, FileId):
- return self.TblFile.GetFileTimeStamp(FileId)
-
- ## Update time stamp in file table
- def SetTimeStamp(self, FileId, TimeStamp):
- return self.TblFile.SetFileTimeStamp(FileId, TimeStamp)
-
- ## Check if a table integrity flag exists or not
- def CheckIntegrity(self, TableName):
- try:
- Result = self.Cur.execute("select min(ID) from %s" % (TableName)).fetchall()
- if Result[0][0] != -1:
- return False
- except:
- return False
- return True
-
- ## Compose table name for given file type and file ID
- def GetTableName(self, FileType, FileId):
- return "_%s_%s" % (FileType, FileId)
-
- ## Return a temp table containing all content of the given file
- #
- # @param FileInfo The tuple containing path and type of a file
- #
- def __getitem__(self, FileInfo):
- FilePath, FileType, Macros = FileInfo
- if FileType not in self._FILE_TABLE_:
- return None
-
- # flag used to indicate if it's parsed or not
- FilePath = str(FilePath)
- Parsed = False
- FileId = self.GetFileId(FilePath)
- if FileId != None:
- TimeStamp = os.stat(FilePath)[8]
- TableName = self.GetTableName(FileType, FileId)
- if TimeStamp != self.GetTimeStamp(FileId):
- # update the timestamp in database
- self.SetTimeStamp(FileId, TimeStamp)
- else:
- # if the table exists and is integrity, don't parse it
- Parsed = self.CheckIntegrity(TableName)
- else:
- FileId = self.TblFile.InsertFile(FilePath, FileType)
- TableName = self.GetTableName(FileType, FileId)
-
- FileTable = self._FILE_TABLE_[FileType](self.Cur, TableName, FileId)
- FileTable.Create(not Parsed)
- Parser = self._FILE_PARSER_[FileType](FilePath, FileType, FileTable, Macros)
- # set the "Finished" flag in parser in order to avoid re-parsing (if parsed)
- Parser.Finished = Parsed
- return Parser
-
- ## Summarize all packages in the database
- def _GetPackageList(self):
- PackageList = []
- for Module in self.ModuleList:
- for Package in Module.Packages:
- if Package not in PackageList:
- PackageList.append(Package)
- return PackageList
-
- ## Summarize all platforms in the database
- def _GetPlatformList(self):
- PlatformList = []
- for PlatformFile in self.TblFile.GetFileList(MODEL_FILE_DSC):
- try:
- Platform = self.BuildObject[PathClass(PlatformFile), 'COMMON']
- except:
- Platform = None
- if Platform != None:
- PlatformList.append(Platform)
- return PlatformList
-
- ## Summarize all modules in the database
- def _GetModuleList(self):
- ModuleList = []
- for ModuleFile in self.TblFile.GetFileList(MODEL_FILE_INF):
- try:
- Module = self.BuildObject[PathClass(ModuleFile), 'COMMON']
- except:
- Module = None
- if Module != None:
- ModuleList.append(Module)
- return ModuleList
-
- PlatformList = property(_GetPlatformList)
- PackageList = property(_GetPackageList)
- ModuleList = property(_GetModuleList)
-
-##
-#
-# This acts like the main() function for the script, unless it is 'import'ed into another
-# script.
-#
-if __name__ == '__main__':
- pass
-
+## @file
+# This file is used to create a database used by build tool
+#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import sqlite3
+import os
+import os.path
+import pickle
+
+import Common.EdkLogger as EdkLogger
+import Common.GlobalData as GlobalData
+
+from Common.String import *
+from Common.DataType import *
+from Common.Misc import *
+from types import *
+
+from CommonDataClass.CommonClass import SkuInfoClass
+
+from MetaDataTable import *
+from MetaFileTable import *
+from MetaFileParser import *
+from BuildClassObject import *
+
+## Platform build information from DSC file
+#
+# This class is used to retrieve information stored in database and convert them
+# into PlatformBuildClassObject form for easier use for AutoGen.
+#
+class DscBuildData(PlatformBuildClassObject):
+ # dict used to convert PCD type in database to string used by build tool
+ _PCD_TYPE_STRING_ = {
+ MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild",
+ MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule",
+ MODEL_PCD_FEATURE_FLAG : "FeatureFlag",
+ MODEL_PCD_DYNAMIC : "Dynamic",
+ MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic",
+ MODEL_PCD_DYNAMIC_HII : "DynamicHii",
+ MODEL_PCD_DYNAMIC_VPD : "DynamicVpd",
+ MODEL_PCD_DYNAMIC_EX : "DynamicEx",
+ MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx",
+ MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii",
+ MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd",
+ }
+
+ # dict used to convert part of [Defines] to members of DscBuildData directly
+ _PROPERTY_ = {
+ #
+ # Required Fields
+ #
+ TAB_DSC_DEFINES_PLATFORM_NAME : "_PlatformName",
+ TAB_DSC_DEFINES_PLATFORM_GUID : "_Guid",
+ TAB_DSC_DEFINES_PLATFORM_VERSION : "_Version",
+ TAB_DSC_DEFINES_DSC_SPECIFICATION : "_DscSpecification",
+ #TAB_DSC_DEFINES_OUTPUT_DIRECTORY : "_OutputDirectory",
+ #TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES : "_SupArchList",
+ #TAB_DSC_DEFINES_BUILD_TARGETS : "_BuildTargets",
+ #TAB_DSC_DEFINES_SKUID_IDENTIFIER : "_SkuName",
+ #TAB_DSC_DEFINES_FLASH_DEFINITION : "_FlashDefinition",
+ TAB_DSC_DEFINES_BUILD_NUMBER : "_BuildNumber",
+ TAB_DSC_DEFINES_MAKEFILE_NAME : "_MakefileName",
+ TAB_DSC_DEFINES_BS_BASE_ADDRESS : "_BsBaseAddress",
+ TAB_DSC_DEFINES_RT_BASE_ADDRESS : "_RtBaseAddress",
+ }
+
+ # used to compose dummy library class name for those forced library instances
+ _NullLibraryNumber = 0
+
+ ## Constructor of DscBuildData
+ #
+ # Initialize object of DscBuildData
+ #
+ # @param FilePath The path of platform description file
+ # @param RawData The raw data of DSC file
+ # @param BuildDataBase Database used to retrieve module/package information
+ # @param Arch The target architecture
+ # @param Platform (not used for DscBuildData)
+ # @param Macros Macros used for replacement in DSC file
+ #
+ def __init__(self, FilePath, RawData, BuildDataBase, Arch='COMMON', Platform='DUMMY', Macros={}):
+ self.MetaFile = FilePath
+ self._RawData = RawData
+ self._Bdb = BuildDataBase
+ self._Arch = Arch
+ self._Macros = Macros
+ self._Clear()
+ RecordList = self._RawData[MODEL_META_DATA_DEFINE, self._Arch]
+ for Record in RecordList:
+ GlobalData.gEdkGlobal[Record[0]] = Record[1]
+
+ ## XXX[key] = value
+ def __setitem__(self, key, value):
+ self.__dict__[self._PROPERTY_[key]] = value
+
+ ## value = XXX[key]
+ def __getitem__(self, key):
+ return self.__dict__[self._PROPERTY_[key]]
+
+ ## "in" test support
+ def __contains__(self, key):
+ return key in self._PROPERTY_
+
+ ## Set all internal used members of DscBuildData to None
+ def _Clear(self):
+ self._Header = None
+ self._PlatformName = None
+ self._Guid = None
+ self._Version = None
+ self._DscSpecification = None
+ self._OutputDirectory = None
+ self._SupArchList = None
+ self._BuildTargets = None
+ self._SkuName = None
+ self._FlashDefinition = None
+ self._BuildNumber = None
+ self._MakefileName = None
+ self._BsBaseAddress = None
+ self._RtBaseAddress = None
+ self._SkuIds = None
+ self._Modules = None
+ self._LibraryInstances = None
+ self._LibraryClasses = None
+ self._Pcds = None
+ self._BuildOptions = None
+ self._LoadFixAddress = None
+
+ ## Get architecture
+ def _GetArch(self):
+ return self._Arch
+
+ ## Set architecture
+ #
+ # Changing the default ARCH to another may affect all other information
+ # because all information in a platform may be ARCH-related. That's
+ # why we need to clear all internal used members, in order to cause all
+ # information to be re-retrieved.
+ #
+ # @param Value The value of ARCH
+ #
+ def _SetArch(self, Value):
+ if self._Arch == Value:
+ return
+ self._Arch = Value
+ self._Clear()
+
+ ## Retrieve all information in [Defines] section
+ #
+ # (Retriving all [Defines] information in one-shot is just to save time.)
+ #
+ def _GetHeaderInfo(self):
+ RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch]
+ for Record in RecordList:
+ Name = Record[0]
+ # items defined _PROPERTY_ don't need additional processing
+ if Name in self:
+ self[Name] = Record[1]
+ # some special items in [Defines] section need special treatment
+ elif Name == TAB_DSC_DEFINES_OUTPUT_DIRECTORY:
+ self._OutputDirectory = NormPath(Record[1], self._Macros)
+ if ' ' in self._OutputDirectory:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in OUTPUT_DIRECTORY",
+ File=self.MetaFile, Line=Record[-1],
+ ExtraData=self._OutputDirectory)
+ elif Name == TAB_DSC_DEFINES_FLASH_DEFINITION:
+ self._FlashDefinition = PathClass(NormPath(Record[1], self._Macros), GlobalData.gWorkspace)
+ ErrorCode, ErrorInfo = self._FlashDefinition.Validate('.fdf')
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=Record[-1],
+ ExtraData=ErrorInfo)
+ elif Name == TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES:
+ self._SupArchList = GetSplitValueList(Record[1], TAB_VALUE_SPLIT)
+ elif Name == TAB_DSC_DEFINES_BUILD_TARGETS:
+ self._BuildTargets = GetSplitValueList(Record[1])
+ elif Name == TAB_DSC_DEFINES_SKUID_IDENTIFIER:
+ if self._SkuName == None:
+ self._SkuName = Record[1]
+ elif Name == TAB_FIX_LOAD_TOP_MEMORY_ADDRESS:
+ self._LoadFixAddress = Record[1]
+ # set _Header to non-None in order to avoid database re-querying
+ self._Header = 'DUMMY'
+
+ ## Retrieve platform name
+ def _GetPlatformName(self):
+ if self._PlatformName == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._PlatformName == None:
+ EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No PLATFORM_NAME", File=self.MetaFile)
+ return self._PlatformName
+
+ ## Retrieve file guid
+ def _GetFileGuid(self):
+ if self._Guid == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._Guid == None:
+ EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No FILE_GUID", File=self.MetaFile)
+ return self._Guid
+
+ ## Retrieve platform version
+ def _GetVersion(self):
+ if self._Version == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._Version == None:
+ self._Version = ''
+ return self._Version
+
+ ## Retrieve platform description file version
+ def _GetDscSpec(self):
+ if self._DscSpecification == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._DscSpecification == None:
+ self._DscSpecification = ''
+ return self._DscSpecification
+
+ ## Retrieve OUTPUT_DIRECTORY
+ def _GetOutpuDir(self):
+ if self._OutputDirectory == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._OutputDirectory == None:
+ self._OutputDirectory = os.path.join("Build", self._PlatformName)
+ return self._OutputDirectory
+
+ ## Retrieve SUPPORTED_ARCHITECTURES
+ def _GetSupArch(self):
+ if self._SupArchList == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._SupArchList == None:
+ self._SupArchList = ARCH_LIST
+ return self._SupArchList
+
+ ## Retrieve BUILD_TARGETS
+ def _GetBuildTarget(self):
+ if self._BuildTargets == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._BuildTargets == None:
+ self._BuildTargets = ['DEBUG', 'RELEASE']
+ return self._BuildTargets
+
+ ## Retrieve SKUID_IDENTIFIER
+ def _GetSkuName(self):
+ if self._SkuName == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._SkuName == None or self._SkuName not in self.SkuIds:
+ self._SkuName = 'DEFAULT'
+ return self._SkuName
+
+ ## Override SKUID_IDENTIFIER
+ def _SetSkuName(self, Value):
+ if Value in self.SkuIds:
+ self._SkuName = Value
+
+ def _GetFdfFile(self):
+ if self._FlashDefinition == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._FlashDefinition == None:
+ self._FlashDefinition = ''
+ return self._FlashDefinition
+
+ ## Retrieve FLASH_DEFINITION
+ def _GetBuildNumber(self):
+ if self._BuildNumber == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._BuildNumber == None:
+ self._BuildNumber = ''
+ return self._BuildNumber
+
+ ## Retrieve MAKEFILE_NAME
+ def _GetMakefileName(self):
+ if self._MakefileName == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._MakefileName == None:
+ self._MakefileName = ''
+ return self._MakefileName
+
+ ## Retrieve BsBaseAddress
+ def _GetBsBaseAddress(self):
+ if self._BsBaseAddress == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._BsBaseAddress == None:
+ self._BsBaseAddress = ''
+ return self._BsBaseAddress
+
+ ## Retrieve RtBaseAddress
+ def _GetRtBaseAddress(self):
+ if self._RtBaseAddress == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._RtBaseAddress == None:
+ self._RtBaseAddress = ''
+ return self._RtBaseAddress
+
+ ## Retrieve the top address for the load fix address
+ def _GetLoadFixAddress(self):
+ if self._LoadFixAddress == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._LoadFixAddress == None:
+ self._LoadFixAddress = ''
+ return self._LoadFixAddress
+
+ ## Retrieve [SkuIds] section information
+ def _GetSkuIds(self):
+ if self._SkuIds == None:
+ self._SkuIds = {}
+ RecordList = self._RawData[MODEL_EFI_SKU_ID]
+ for Record in RecordList:
+ if Record[0] in [None, '']:
+ EdkLogger.error('build', FORMAT_INVALID, 'No Sku ID number',
+ File=self.MetaFile, Line=Record[-1])
+ if Record[1] in [None, '']:
+ EdkLogger.error('build', FORMAT_INVALID, 'No Sku ID name',
+ File=self.MetaFile, Line=Record[-1])
+ self._SkuIds[Record[1]] = Record[0]
+ if 'DEFAULT' not in self._SkuIds:
+ self._SkuIds['DEFAULT'] = 0
+ return self._SkuIds
+
+ ## Retrieve [Components] section information
+ def _GetModules(self):
+ if self._Modules != None:
+ return self._Modules
+
+ self._Modules = sdict()
+ RecordList = self._RawData[MODEL_META_DATA_COMPONENT, self._Arch]
+ Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
+ Macros.update(self._Macros)
+ for Record in RecordList:
+ ModuleFile = PathClass(NormPath(Record[0], Macros), GlobalData.gWorkspace, Arch=self._Arch)
+ ModuleId = Record[5]
+ LineNo = Record[6]
+
+ # check the file validation
+ ErrorCode, ErrorInfo = ModuleFile.Validate('.inf')
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
+ ExtraData=ErrorInfo)
+ # Check duplication
+ if ModuleFile in self._Modules:
+ EdkLogger.error('build', FILE_DUPLICATED, File=self.MetaFile, ExtraData=str(ModuleFile), Line=LineNo)
+
+ Module = ModuleBuildClassObject()
+ Module.MetaFile = ModuleFile
+
+ # get module override path
+ RecordList = self._RawData[MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH, self._Arch, None, ModuleId]
+ if RecordList != []:
+ Module.SourceOverridePath = os.path.join(GlobalData.gWorkspace, NormPath(RecordList[0][0], Macros))
+
+ # Check if the source override path exists
+ if not os.path.isdir(Module.SourceOverridePath):
+ EdkLogger.error('build', FILE_NOT_FOUND, Message = 'Source override path does not exist:', File=self.MetaFile, ExtraData=Module.SourceOverridePath, Line=LineNo)
+
+ #Add to GlobalData Variables
+ GlobalData.gOverrideDir[ModuleFile.Key] = Module.SourceOverridePath
+
+ # get module private library instance
+ RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch, None, ModuleId]
+ for Record in RecordList:
+ LibraryClass = Record[0]
+ LibraryPath = PathClass(NormPath(Record[1], Macros), GlobalData.gWorkspace, Arch=self._Arch)
+ LineNo = Record[-1]
+
+ # check the file validation
+ ErrorCode, ErrorInfo = LibraryPath.Validate('.inf')
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
+ ExtraData=ErrorInfo)
+
+ if LibraryClass == '' or LibraryClass == 'NULL':
+ self._NullLibraryNumber += 1
+ LibraryClass = 'NULL%d' % self._NullLibraryNumber
+ EdkLogger.verbose("Found forced library for %s\n\t%s [%s]" % (ModuleFile, LibraryPath, LibraryClass))
+ Module.LibraryClasses[LibraryClass] = LibraryPath
+ if LibraryPath not in self.LibraryInstances:
+ self.LibraryInstances.append(LibraryPath)
+
+ # get module private PCD setting
+ for Type in [MODEL_PCD_FIXED_AT_BUILD, MODEL_PCD_PATCHABLE_IN_MODULE, \
+ MODEL_PCD_FEATURE_FLAG, MODEL_PCD_DYNAMIC, MODEL_PCD_DYNAMIC_EX]:
+ RecordList = self._RawData[Type, self._Arch, None, ModuleId]
+ for TokenSpaceGuid, PcdCName, Setting, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
+ TokenList = GetSplitValueList(Setting)
+ DefaultValue = TokenList[0]
+ if len(TokenList) > 1:
+ MaxDatumSize = TokenList[1]
+ else:
+ MaxDatumSize = ''
+ TypeString = self._PCD_TYPE_STRING_[Type]
+ Pcd = PcdClassObject(
+ PcdCName,
+ TokenSpaceGuid,
+ TypeString,
+ '',
+ DefaultValue,
+ '',
+ MaxDatumSize,
+ {},
+ None
+ )
+ Module.Pcds[PcdCName, TokenSpaceGuid] = Pcd
+
+ # get module private build options
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, None, ModuleId]
+ for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
+ if (ToolChainFamily, ToolChain) not in Module.BuildOptions:
+ Module.BuildOptions[ToolChainFamily, ToolChain] = Option
+ else:
+ OptionString = Module.BuildOptions[ToolChainFamily, ToolChain]
+ Module.BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Option
+
+ self._Modules[ModuleFile] = Module
+ return self._Modules
+
+ ## Retrieve all possible library instances used in this platform
+ def _GetLibraryInstances(self):
+ if self._LibraryInstances == None:
+ self._GetLibraryClasses()
+ return self._LibraryInstances
+
+ ## Retrieve [LibraryClasses] information
+ def _GetLibraryClasses(self):
+ if self._LibraryClasses == None:
+ self._LibraryInstances = []
+ #
+ # tdict is a special dict kind of type, used for selecting correct
+ # library instance for given library class and module type
+ #
+ LibraryClassDict = tdict(True, 3)
+ # track all library class names
+ LibraryClassSet = set()
+ RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch]
+ Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
+ Macros.update(self._Macros)
+ for Record in RecordList:
+ LibraryClass, LibraryInstance, Dummy, Arch, ModuleType, Dummy, LineNo = Record
+ if LibraryClass == '' or LibraryClass == 'NULL':
+ self._NullLibraryNumber += 1
+ LibraryClass = 'NULL%d' % self._NullLibraryNumber
+ EdkLogger.verbose("Found forced library for arch=%s\n\t%s [%s]" % (Arch, LibraryInstance, LibraryClass))
+ LibraryClassSet.add(LibraryClass)
+ LibraryInstance = PathClass(NormPath(LibraryInstance, Macros), GlobalData.gWorkspace, Arch=self._Arch)
+ # check the file validation
+ ErrorCode, ErrorInfo = LibraryInstance.Validate('.inf')
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
+ ExtraData=ErrorInfo)
+
+ if ModuleType != 'COMMON' and ModuleType not in SUP_MODULE_LIST:
+ EdkLogger.error('build', OPTION_UNKNOWN, "Unknown module type [%s]" % ModuleType,
+ File=self.MetaFile, ExtraData=LibraryInstance, Line=LineNo)
+ LibraryClassDict[Arch, ModuleType, LibraryClass] = LibraryInstance
+ if LibraryInstance not in self._LibraryInstances:
+ self._LibraryInstances.append(LibraryInstance)
+
+ # resolve the specific library instance for each class and each module type
+ self._LibraryClasses = tdict(True)
+ for LibraryClass in LibraryClassSet:
+ # try all possible module types
+ for ModuleType in SUP_MODULE_LIST:
+ LibraryInstance = LibraryClassDict[self._Arch, ModuleType, LibraryClass]
+ if LibraryInstance == None:
+ continue
+ self._LibraryClasses[LibraryClass, ModuleType] = LibraryInstance
+
+ # for R8 style library instances, which are listed in different section
+ RecordList = self._RawData[MODEL_EFI_LIBRARY_INSTANCE, self._Arch]
+ for Record in RecordList:
+ File = PathClass(NormPath(Record[0], Macros), GlobalData.gWorkspace, Arch=self._Arch)
+ LineNo = Record[-1]
+ # check the file validation
+ ErrorCode, ErrorInfo = File.Validate('.inf')
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
+ ExtraData=ErrorInfo)
+ if File not in self._LibraryInstances:
+ self._LibraryInstances.append(File)
+ #
+ # we need the module name as the library class name, so we have
+ # to parse it here. (self._Bdb[] will trigger a file parse if it
+ # hasn't been parsed)
+ #
+ Library = self._Bdb[File, self._Arch]
+ self._LibraryClasses[Library.BaseName, ':dummy:'] = Library
+ return self._LibraryClasses
+
+ ## Retrieve all PCD settings in platform
+ def _GetPcds(self):
+ if self._Pcds == None:
+ self._Pcds = {}
+ self._Pcds.update(self._GetPcd(MODEL_PCD_FIXED_AT_BUILD))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_PATCHABLE_IN_MODULE))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_FEATURE_FLAG))
+ self._Pcds.update(self._GetDynamicPcd(MODEL_PCD_DYNAMIC_DEFAULT))
+ self._Pcds.update(self._GetDynamicHiiPcd(MODEL_PCD_DYNAMIC_HII))
+ self._Pcds.update(self._GetDynamicVpdPcd(MODEL_PCD_DYNAMIC_VPD))
+ self._Pcds.update(self._GetDynamicPcd(MODEL_PCD_DYNAMIC_EX_DEFAULT))
+ self._Pcds.update(self._GetDynamicHiiPcd(MODEL_PCD_DYNAMIC_EX_HII))
+ self._Pcds.update(self._GetDynamicVpdPcd(MODEL_PCD_DYNAMIC_EX_VPD))
+ return self._Pcds
+
+ ## Retrieve [BuildOptions]
+ def _GetBuildOptions(self):
+ if self._BuildOptions == None:
+ self._BuildOptions = {}
+ #
+ # Retrieve build option for EDKII style module
+ #
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, 'COMMON', EDKII_NAME]
+ for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
+ self._BuildOptions[ToolChainFamily, ToolChain, EDKII_NAME] = Option
+ #
+ # Retrieve build option for EDK style module
+ #
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, 'COMMON', EDK_NAME]
+ for ToolChainFamily, ToolChain, Option, Dummy1, Dummy2, Dummy3, Dummy4 in RecordList:
+ self._BuildOptions[ToolChainFamily, ToolChain, EDK_NAME] = Option
+ return self._BuildOptions
+
+ ## Retrieve non-dynamic PCD settings
+ #
+ # @param Type PCD type
+ #
+ # @retval a dict object contains settings of given PCD type
+ #
+ def _GetPcd(self, Type):
+ Pcds = {}
+ #
+ # tdict is a special dict kind of type, used for selecting correct
+ # PCD settings for certain ARCH
+ #
+ PcdDict = tdict(True, 3)
+ PcdSet = set()
+ # Find out all possible PCD candidates for self._Arch
+ RecordList = self._RawData[Type, self._Arch]
+ for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
+ PcdSet.add((PcdCName, TokenSpaceGuid))
+ PcdDict[Arch, PcdCName, TokenSpaceGuid] = Setting
+ # Remove redundant PCD candidates
+ for PcdCName, TokenSpaceGuid in PcdSet:
+ ValueList = ['', '', '']
+ Setting = PcdDict[self._Arch, PcdCName, TokenSpaceGuid]
+ if Setting == None:
+ continue
+ TokenList = Setting.split(TAB_VALUE_SPLIT)
+ ValueList[0:len(TokenList)] = TokenList
+ PcdValue, DatumType, MaxDatumSize = ValueList
+ Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
+ PcdCName,
+ TokenSpaceGuid,
+ self._PCD_TYPE_STRING_[Type],
+ DatumType,
+ PcdValue,
+ '',
+ MaxDatumSize,
+ {},
+ None
+ )
+ return Pcds
+
+ ## Retrieve dynamic PCD settings
+ #
+ # @param Type PCD type
+ #
+ # @retval a dict object contains settings of given PCD type
+ #
+ def _GetDynamicPcd(self, Type):
+ Pcds = {}
+ #
+ # tdict is a special dict kind of type, used for selecting correct
+ # PCD settings for certain ARCH and SKU
+ #
+ PcdDict = tdict(True, 4)
+ PcdSet = set()
+ # Find out all possible PCD candidates for self._Arch
+ RecordList = self._RawData[Type, self._Arch]
+ for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
+ PcdSet.add((PcdCName, TokenSpaceGuid))
+ PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
+ # Remove redundant PCD candidates, per the ARCH and SKU
+ for PcdCName, TokenSpaceGuid in PcdSet:
+ ValueList = ['', '', '']
+ Setting = PcdDict[self._Arch, self.SkuName, PcdCName, TokenSpaceGuid]
+ if Setting == None:
+ continue
+ TokenList = Setting.split(TAB_VALUE_SPLIT)
+ ValueList[0:len(TokenList)] = TokenList
+ PcdValue, DatumType, MaxDatumSize = ValueList
+
+ SkuInfo = SkuInfoClass(self.SkuName, self.SkuIds[self.SkuName], '', '', '', '', '', PcdValue)
+ Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
+ PcdCName,
+ TokenSpaceGuid,
+ self._PCD_TYPE_STRING_[Type],
+ DatumType,
+ PcdValue,
+ '',
+ MaxDatumSize,
+ {self.SkuName : SkuInfo},
+ None
+ )
+ return Pcds
+
+ ## Retrieve dynamic HII PCD settings
+ #
+ # @param Type PCD type
+ #
+ # @retval a dict object contains settings of given PCD type
+ #
+ def _GetDynamicHiiPcd(self, Type):
+ Pcds = {}
+ #
+ # tdict is a special dict kind of type, used for selecting correct
+ # PCD settings for certain ARCH and SKU
+ #
+ PcdDict = tdict(True, 4)
+ PcdSet = set()
+ RecordList = self._RawData[Type, self._Arch]
+ # Find out all possible PCD candidates for self._Arch
+ for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
+ PcdSet.add((PcdCName, TokenSpaceGuid))
+ PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
+ # Remove redundant PCD candidates, per the ARCH and SKU
+ for PcdCName, TokenSpaceGuid in PcdSet:
+ ValueList = ['', '', '', '']
+ Setting = PcdDict[self._Arch, self.SkuName, PcdCName, TokenSpaceGuid]
+ if Setting == None:
+ continue
+ TokenList = Setting.split(TAB_VALUE_SPLIT)
+ ValueList[0:len(TokenList)] = TokenList
+ VariableName, VariableGuid, VariableOffset, DefaultValue = ValueList
+ SkuInfo = SkuInfoClass(self.SkuName, self.SkuIds[self.SkuName], VariableName, VariableGuid, VariableOffset, DefaultValue)
+ Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
+ PcdCName,
+ TokenSpaceGuid,
+ self._PCD_TYPE_STRING_[Type],
+ '',
+ DefaultValue,
+ '',
+ '',
+ {self.SkuName : SkuInfo},
+ None
+ )
+ return Pcds
+
+ ## Retrieve dynamic VPD PCD settings
+ #
+ # @param Type PCD type
+ #
+ # @retval a dict object contains settings of given PCD type
+ #
+ def _GetDynamicVpdPcd(self, Type):
+ Pcds = {}
+ #
+ # tdict is a special dict kind of type, used for selecting correct
+ # PCD settings for certain ARCH and SKU
+ #
+ PcdDict = tdict(True, 4)
+ PcdSet = set()
+ # Find out all possible PCD candidates for self._Arch
+ RecordList = self._RawData[Type, self._Arch]
+ for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
+ PcdSet.add((PcdCName, TokenSpaceGuid))
+ PcdDict[Arch, SkuName, PcdCName, TokenSpaceGuid] = Setting
+ # Remove redundant PCD candidates, per the ARCH and SKU
+ for PcdCName, TokenSpaceGuid in PcdSet:
+ ValueList = ['', '']
+ Setting = PcdDict[self._Arch, self.SkuName, PcdCName, TokenSpaceGuid]
+ if Setting == None:
+ continue
+ TokenList = Setting.split(TAB_VALUE_SPLIT)
+ ValueList[0:len(TokenList)] = TokenList
+ VpdOffset, MaxDatumSize = ValueList
+
+ SkuInfo = SkuInfoClass(self.SkuName, self.SkuIds[self.SkuName], '', '', '', '', VpdOffset)
+ Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
+ PcdCName,
+ TokenSpaceGuid,
+ self._PCD_TYPE_STRING_[Type],
+ '',
+ '',
+ '',
+ MaxDatumSize,
+ {self.SkuName : SkuInfo},
+ None
+ )
+ return Pcds
+
+ ## Add external modules
+ #
+ # The external modules are mostly those listed in FDF file, which don't
+ # need "build".
+ #
+ # @param FilePath The path of module description file
+ #
+ def AddModule(self, FilePath):
+ FilePath = NormPath(FilePath)
+ if FilePath not in self.Modules:
+ Module = ModuleBuildClassObject()
+ Module.MetaFile = FilePath
+ self.Modules.append(Module)
+
+ ## Add external PCDs
+ #
+ # The external PCDs are mostly those listed in FDF file to specify address
+ # or offset information.
+ #
+ # @param Name Name of the PCD
+ # @param Guid Token space guid of the PCD
+ # @param Value Value of the PCD
+ #
+ def AddPcd(self, Name, Guid, Value):
+ if (Name, Guid) not in self.Pcds:
+ self.Pcds[Name, Guid] = PcdClassObject(Name, Guid, '', '', '', '', '', {}, None)
+ self.Pcds[Name, Guid].DefaultValue = Value
+
+ Arch = property(_GetArch, _SetArch)
+ Platform = property(_GetPlatformName)
+ PlatformName = property(_GetPlatformName)
+ Guid = property(_GetFileGuid)
+ Version = property(_GetVersion)
+ DscSpecification = property(_GetDscSpec)
+ OutputDirectory = property(_GetOutpuDir)
+ SupArchList = property(_GetSupArch)
+ BuildTargets = property(_GetBuildTarget)
+ SkuName = property(_GetSkuName, _SetSkuName)
+ FlashDefinition = property(_GetFdfFile)
+ BuildNumber = property(_GetBuildNumber)
+ MakefileName = property(_GetMakefileName)
+ BsBaseAddress = property(_GetBsBaseAddress)
+ RtBaseAddress = property(_GetRtBaseAddress)
+ LoadFixAddress = property(_GetLoadFixAddress)
+
+ SkuIds = property(_GetSkuIds)
+ Modules = property(_GetModules)
+ LibraryInstances = property(_GetLibraryInstances)
+ LibraryClasses = property(_GetLibraryClasses)
+ Pcds = property(_GetPcds)
+ BuildOptions = property(_GetBuildOptions)
+
+## Platform build information from DSC file
+#
+# This class is used to retrieve information stored in database and convert them
+# into PackageBuildClassObject form for easier use for AutoGen.
+#
+class DecBuildData(PackageBuildClassObject):
+ # dict used to convert PCD type in database to string used by build tool
+ _PCD_TYPE_STRING_ = {
+ MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild",
+ MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule",
+ MODEL_PCD_FEATURE_FLAG : "FeatureFlag",
+ MODEL_PCD_DYNAMIC : "Dynamic",
+ MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic",
+ MODEL_PCD_DYNAMIC_HII : "DynamicHii",
+ MODEL_PCD_DYNAMIC_VPD : "DynamicVpd",
+ MODEL_PCD_DYNAMIC_EX : "DynamicEx",
+ MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx",
+ MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii",
+ MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd",
+ }
+
+ # dict used to convert part of [Defines] to members of DecBuildData directly
+ _PROPERTY_ = {
+ #
+ # Required Fields
+ #
+ TAB_DEC_DEFINES_PACKAGE_NAME : "_PackageName",
+ TAB_DEC_DEFINES_PACKAGE_GUID : "_Guid",
+ TAB_DEC_DEFINES_PACKAGE_VERSION : "_Version",
+ }
+
+
+ ## Constructor of DecBuildData
+ #
+ # Initialize object of DecBuildData
+ #
+ # @param FilePath The path of package description file
+ # @param RawData The raw data of DEC file
+ # @param BuildDataBase Database used to retrieve module information
+ # @param Arch The target architecture
+ # @param Platform (not used for DecBuildData)
+ # @param Macros Macros used for replacement in DSC file
+ #
+ def __init__(self, File, RawData, BuildDataBase, Arch='COMMON', Platform='DUMMY', Macros={}):
+ self.MetaFile = File
+ self._PackageDir = File.Dir
+ self._RawData = RawData
+ self._Bdb = BuildDataBase
+ self._Arch = Arch
+ self._Macros = Macros
+ self._Clear()
+
+ ## XXX[key] = value
+ def __setitem__(self, key, value):
+ self.__dict__[self._PROPERTY_[key]] = value
+
+ ## value = XXX[key]
+ def __getitem__(self, key):
+ return self.__dict__[self._PROPERTY_[key]]
+
+ ## "in" test support
+ def __contains__(self, key):
+ return key in self._PROPERTY_
+
+ ## Set all internal used members of DecBuildData to None
+ def _Clear(self):
+ self._Header = None
+ self._PackageName = None
+ self._Guid = None
+ self._Version = None
+ self._Protocols = None
+ self._Ppis = None
+ self._Guids = None
+ self._Includes = None
+ self._LibraryClasses = None
+ self._Pcds = None
+
+ ## Get architecture
+ def _GetArch(self):
+ return self._Arch
+
+ ## Set architecture
+ #
+ # Changing the default ARCH to another may affect all other information
+ # because all information in a platform may be ARCH-related. That's
+ # why we need to clear all internal used members, in order to cause all
+ # information to be re-retrieved.
+ #
+ # @param Value The value of ARCH
+ #
+ def _SetArch(self, Value):
+ if self._Arch == Value:
+ return
+ self._Arch = Value
+ self._Clear()
+
+ ## Retrieve all information in [Defines] section
+ #
+ # (Retriving all [Defines] information in one-shot is just to save time.)
+ #
+ def _GetHeaderInfo(self):
+ RecordList = self._RawData[MODEL_META_DATA_HEADER]
+ for Record in RecordList:
+ Name = Record[0]
+ if Name in self:
+ self[Name] = Record[1]
+ self._Header = 'DUMMY'
+
+ ## Retrieve package name
+ def _GetPackageName(self):
+ if self._PackageName == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._PackageName == None:
+ EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "No PACKAGE_NAME", File=self.MetaFile)
+ return self._PackageName
+
+ ## Retrieve file guid
+ def _GetFileGuid(self):
+ if self._Guid == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._Guid == None:
+ EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "No PACKAGE_GUID", File=self.MetaFile)
+ return self._Guid
+
+ ## Retrieve package version
+ def _GetVersion(self):
+ if self._Version == None:
+ if self._Header == None:
+ self._GetHeaderInfo()
+ if self._Version == None:
+ self._Version = ''
+ return self._Version
+
+ ## Retrieve protocol definitions (name/value pairs)
+ def _GetProtocol(self):
+ if self._Protocols == None:
+ #
+ # tdict is a special kind of dict, used for selecting correct
+ # protocol defition for given ARCH
+ #
+ ProtocolDict = tdict(True)
+ NameList = []
+ # find out all protocol definitions for specific and 'common' arch
+ RecordList = self._RawData[MODEL_EFI_PROTOCOL, self._Arch]
+ for Name, Guid, Dummy, Arch, ID, LineNo in RecordList:
+ if Name not in NameList:
+ NameList.append(Name)
+ ProtocolDict[Arch, Name] = Guid
+ # use sdict to keep the order
+ self._Protocols = sdict()
+ for Name in NameList:
+ #
+ # limit the ARCH to self._Arch, if no self._Arch found, tdict
+ # will automatically turn to 'common' ARCH for trying
+ #
+ self._Protocols[Name] = ProtocolDict[self._Arch, Name]
+ return self._Protocols
+
+ ## Retrieve PPI definitions (name/value pairs)
+ def _GetPpi(self):
+ if self._Ppis == None:
+ #
+ # tdict is a special kind of dict, used for selecting correct
+ # PPI defition for given ARCH
+ #
+ PpiDict = tdict(True)
+ NameList = []
+ # find out all PPI definitions for specific arch and 'common' arch
+ RecordList = self._RawData[MODEL_EFI_PPI, self._Arch]
+ for Name, Guid, Dummy, Arch, ID, LineNo in RecordList:
+ if Name not in NameList:
+ NameList.append(Name)
+ PpiDict[Arch, Name] = Guid
+ # use sdict to keep the order
+ self._Ppis = sdict()
+ for Name in NameList:
+ #
+ # limit the ARCH to self._Arch, if no self._Arch found, tdict
+ # will automatically turn to 'common' ARCH for trying
+ #
+ self._Ppis[Name] = PpiDict[self._Arch, Name]
+ return self._Ppis
+
+ ## Retrieve GUID definitions (name/value pairs)
+ def _GetGuid(self):
+ if self._Guids == None:
+ #
+ # tdict is a special kind of dict, used for selecting correct
+ # GUID defition for given ARCH
+ #
+ GuidDict = tdict(True)
+ NameList = []
+ # find out all protocol definitions for specific and 'common' arch
+ RecordList = self._RawData[MODEL_EFI_GUID, self._Arch]
+ for Name, Guid, Dummy, Arch, ID, LineNo in RecordList:
+ if Name not in NameList:
+ NameList.append(Name)
+ GuidDict[Arch, Name] = Guid
+ # use sdict to keep the order
+ self._Guids = sdict()
+ for Name in NameList:
+ #
+ # limit the ARCH to self._Arch, if no self._Arch found, tdict
+ # will automatically turn to 'common' ARCH for trying
+ #
+ self._Guids[Name] = GuidDict[self._Arch, Name]
+ return self._Guids
+
+ ## Retrieve public include paths declared in this package
+ def _GetInclude(self):
+ if self._Includes == None:
+ self._Includes = []
+ RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch]
+ Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
+ Macros.update(self._Macros)
+ for Record in RecordList:
+ File = PathClass(NormPath(Record[0], Macros), self._PackageDir, Arch=self._Arch)
+ LineNo = Record[-1]
+ # validate the path
+ ErrorCode, ErrorInfo = File.Validate()
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
+
+ # avoid duplicate include path
+ if File not in self._Includes:
+ self._Includes.append(File)
+ return self._Includes
+
+ ## Retrieve library class declarations (not used in build at present)
+ def _GetLibraryClass(self):
+ if self._LibraryClasses == None:
+ #
+ # tdict is a special kind of dict, used for selecting correct
+ # library class declaration for given ARCH
+ #
+ LibraryClassDict = tdict(True)
+ LibraryClassSet = set()
+ RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch]
+ Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
+ Macros.update(self._Macros)
+ for LibraryClass, File, Dummy, Arch, ID, LineNo in RecordList:
+ File = PathClass(NormPath(File, Macros), self._PackageDir, Arch=self._Arch)
+ # check the file validation
+ ErrorCode, ErrorInfo = File.Validate()
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
+ LibraryClassSet.add(LibraryClass)
+ LibraryClassDict[Arch, LibraryClass] = File
+ self._LibraryClasses = sdict()
+ for LibraryClass in LibraryClassSet:
+ self._LibraryClasses[LibraryClass] = LibraryClassDict[self._Arch, LibraryClass]
+ return self._LibraryClasses
+
+ ## Retrieve PCD declarations
+ def _GetPcds(self):
+ if self._Pcds == None:
+ self._Pcds = {}
+ self._Pcds.update(self._GetPcd(MODEL_PCD_FIXED_AT_BUILD))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_PATCHABLE_IN_MODULE))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_FEATURE_FLAG))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_DYNAMIC))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_DYNAMIC_EX))
+ return self._Pcds
+
+ ## Retrieve PCD declarations for given type
+ def _GetPcd(self, Type):
+ Pcds = {}
+ #
+ # tdict is a special kind of dict, used for selecting correct
+ # PCD declaration for given ARCH
+ #
+ PcdDict = tdict(True, 3)
+ # for summarizing PCD
+ PcdSet = set()
+ # find out all PCDs of the 'type'
+ RecordList = self._RawData[Type, self._Arch]
+ for TokenSpaceGuid, PcdCName, Setting, Arch, Dummy1, Dummy2 in RecordList:
+ PcdDict[Arch, PcdCName, TokenSpaceGuid] = Setting
+ PcdSet.add((PcdCName, TokenSpaceGuid))
+
+ for PcdCName, TokenSpaceGuid in PcdSet:
+ ValueList = ['', '', '']
+ #
+ # limit the ARCH to self._Arch, if no self._Arch found, tdict
+ # will automatically turn to 'common' ARCH and try again
+ #
+ Setting = PcdDict[self._Arch, PcdCName, TokenSpaceGuid]
+ if Setting == None:
+ continue
+ TokenList = Setting.split(TAB_VALUE_SPLIT)
+ ValueList[0:len(TokenList)] = TokenList
+ DefaultValue, DatumType, TokenNumber = ValueList
+ Pcds[PcdCName, TokenSpaceGuid, self._PCD_TYPE_STRING_[Type]] = PcdClassObject(
+ PcdCName,
+ TokenSpaceGuid,
+ self._PCD_TYPE_STRING_[Type],
+ DatumType,
+ DefaultValue,
+ TokenNumber,
+ '',
+ {},
+ None
+ )
+ return Pcds
+
+
+ Arch = property(_GetArch, _SetArch)
+ PackageName = property(_GetPackageName)
+ Guid = property(_GetFileGuid)
+ Version = property(_GetVersion)
+
+ Protocols = property(_GetProtocol)
+ Ppis = property(_GetPpi)
+ Guids = property(_GetGuid)
+ Includes = property(_GetInclude)
+ LibraryClasses = property(_GetLibraryClass)
+ Pcds = property(_GetPcds)
+
+## Module build information from INF file
+#
+# This class is used to retrieve information stored in database and convert them
+# into ModuleBuildClassObject form for easier use for AutoGen.
+#
+class InfBuildData(ModuleBuildClassObject):
+ # dict used to convert PCD type in database to string used by build tool
+ _PCD_TYPE_STRING_ = {
+ MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild",
+ MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule",
+ MODEL_PCD_FEATURE_FLAG : "FeatureFlag",
+ MODEL_PCD_DYNAMIC : "Dynamic",
+ MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic",
+ MODEL_PCD_DYNAMIC_HII : "DynamicHii",
+ MODEL_PCD_DYNAMIC_VPD : "DynamicVpd",
+ MODEL_PCD_DYNAMIC_EX : "DynamicEx",
+ MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx",
+ MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii",
+ MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd",
+ }
+
+ # dict used to convert part of [Defines] to members of InfBuildData directly
+ _PROPERTY_ = {
+ #
+ # Required Fields
+ #
+ TAB_INF_DEFINES_BASE_NAME : "_BaseName",
+ TAB_INF_DEFINES_FILE_GUID : "_Guid",
+ TAB_INF_DEFINES_MODULE_TYPE : "_ModuleType",
+ #
+ # Optional Fields
+ #
+ TAB_INF_DEFINES_INF_VERSION : "_AutoGenVersion",
+ TAB_INF_DEFINES_COMPONENT_TYPE : "_ComponentType",
+ TAB_INF_DEFINES_MAKEFILE_NAME : "_MakefileName",
+ #TAB_INF_DEFINES_CUSTOM_MAKEFILE : "_CustomMakefile",
+ TAB_INF_DEFINES_VERSION_NUMBER : "_Version",
+ TAB_INF_DEFINES_VERSION_STRING : "_Version",
+ TAB_INF_DEFINES_VERSION : "_Version",
+ TAB_INF_DEFINES_PCD_IS_DRIVER : "_PcdIsDriver",
+ TAB_INF_DEFINES_SHADOW : "_Shadow",
+
+ TAB_COMPONENTS_SOURCE_OVERRIDE_PATH : "_SourceOverridePath",
+ }
+
+ # dict used to convert Component type to Module type
+ _MODULE_TYPE_ = {
+ "LIBRARY" : "BASE",
+ "SECURITY_CORE" : "SEC",
+ "PEI_CORE" : "PEI_CORE",
+ "COMBINED_PEIM_DRIVER" : "PEIM",
+ "PIC_PEIM" : "PEIM",
+ "RELOCATABLE_PEIM" : "PEIM",
+ "PE32_PEIM" : "PEIM",
+ "BS_DRIVER" : "DXE_DRIVER",
+ "RT_DRIVER" : "DXE_RUNTIME_DRIVER",
+ "SAL_RT_DRIVER" : "DXE_SAL_DRIVER",
+ "DXE_SMM_DRIVER" : "DXE_SMM_DRIVER",
+ # "SMM_DRIVER" : "DXE_SMM_DRIVER",
+ # "BS_DRIVER" : "DXE_SMM_DRIVER",
+ # "BS_DRIVER" : "UEFI_DRIVER",
+ "APPLICATION" : "UEFI_APPLICATION",
+ "LOGO" : "BASE",
+ }
+
+ # regular expression for converting XXX_FLAGS in [nmake] section to new type
+ _NMAKE_FLAG_PATTERN_ = re.compile("(?:EBC_)?([A-Z]+)_(?:STD_|PROJ_|ARCH_)?FLAGS(?:_DLL|_ASL|_EXE)?", re.UNICODE)
+ # dict used to convert old tool name used in [nmake] section to new ones
+ _TOOL_CODE_ = {
+ "C" : "CC",
+ "LIB" : "SLINK",
+ "LINK" : "DLINK",
+ }
+
+
+ ## Constructor of DscBuildData
+ #
+ # Initialize object of DscBuildData
+ #
+ # @param FilePath The path of platform description file
+ # @param RawData The raw data of DSC file
+ # @param BuildDataBase Database used to retrieve module/package information
+ # @param Arch The target architecture
+ # @param Platform The name of platform employing this module
+ # @param Macros Macros used for replacement in DSC file
+ #
+ def __init__(self, FilePath, RawData, BuildDatabase, Arch='COMMON', Platform='COMMON', Macros={}):
+ self.MetaFile = FilePath
+ self._ModuleDir = FilePath.Dir
+ self._RawData = RawData
+ self._Bdb = BuildDatabase
+ self._Arch = Arch
+ self._Platform = 'COMMON'
+ self._Macros = Macros
+ self._SourceOverridePath = None
+ if FilePath.Key in GlobalData.gOverrideDir:
+ self._SourceOverridePath = GlobalData.gOverrideDir[FilePath.Key]
+ self._Clear()
+
+ ## XXX[key] = value
+ def __setitem__(self, key, value):
+ self.__dict__[self._PROPERTY_[key]] = value
+
+ ## value = XXX[key]
+ def __getitem__(self, key):
+ return self.__dict__[self._PROPERTY_[key]]
+
+ ## "in" test support
+ def __contains__(self, key):
+ return key in self._PROPERTY_
+
+ ## Set all internal used members of InfBuildData to None
+ def _Clear(self):
+ self._Header_ = None
+ self._AutoGenVersion = None
+ self._BaseName = None
+ self._ModuleType = None
+ self._ComponentType = None
+ self._BuildType = None
+ self._Guid = None
+ self._Version = None
+ self._PcdIsDriver = None
+ self._BinaryModule = None
+ self._Shadow = None
+ self._MakefileName = None
+ self._CustomMakefile = None
+ self._Specification = None
+ self._LibraryClass = None
+ self._ModuleEntryPointList = None
+ self._ModuleUnloadImageList = None
+ self._ConstructorList = None
+ self._DestructorList = None
+ self._Defs = None
+ self._Binaries = None
+ self._Sources = None
+ self._LibraryClasses = None
+ self._Libraries = None
+ self._Protocols = None
+ self._Ppis = None
+ self._Guids = None
+ self._Includes = None
+ self._Packages = None
+ self._Pcds = None
+ self._BuildOptions = None
+ self._Depex = None
+ self._DepexExpression = None
+ #self._SourceOverridePath = None
+
+ ## Get architecture
+ def _GetArch(self):
+ return self._Arch
+
+ ## Set architecture
+ #
+ # Changing the default ARCH to another may affect all other information
+ # because all information in a platform may be ARCH-related. That's
+ # why we need to clear all internal used members, in order to cause all
+ # information to be re-retrieved.
+ #
+ # @param Value The value of ARCH
+ #
+ def _SetArch(self, Value):
+ if self._Arch == Value:
+ return
+ self._Arch = Value
+ self._Clear()
+
+ ## Return the name of platform employing this module
+ def _GetPlatform(self):
+ return self._Platform
+
+ ## Change the name of platform employing this module
+ #
+ # Changing the default name of platform to another may affect some information
+ # because they may be PLATFORM-related. That's why we need to clear all internal
+ # used members, in order to cause all information to be re-retrieved.
+ #
+ def _SetPlatform(self, Value):
+ if self._Platform == Value:
+ return
+ self._Platform = Value
+ self._Clear()
+
+ ## Retrieve all information in [Defines] section
+ #
+ # (Retriving all [Defines] information in one-shot is just to save time.)
+ #
+ def _GetHeaderInfo(self):
+ RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch, self._Platform]
+ for Record in RecordList:
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ Name = Record[0]
+ # items defined _PROPERTY_ don't need additional processing
+ if Name in self:
+ self[Name] = Record[1]
+ # some special items in [Defines] section need special treatment
+ elif Name in ('EFI_SPECIFICATION_VERSION', 'UEFI_SPECIFICATION_VERSION'):
+ if self._Specification == None:
+ self._Specification = sdict()
+ self._Specification['UEFI_SPECIFICATION_VERSION'] = Record[1]
+ elif Name == 'EDK_RELEASE_VERSION':
+ if self._Specification == None:
+ self._Specification = sdict()
+ self._Specification[Name] = Record[1]
+ elif Name == 'PI_SPECIFICATION_VERSION':
+ if self._Specification == None:
+ self._Specification = sdict()
+ self._Specification[Name] = Record[1]
+ elif Name == 'LIBRARY_CLASS':
+ if self._LibraryClass == None:
+ self._LibraryClass = []
+ ValueList = GetSplitValueList(Record[1])
+ LibraryClass = ValueList[0]
+ if len(ValueList) > 1:
+ SupModuleList = GetSplitValueList(ValueList[1], ' ')
+ else:
+ SupModuleList = SUP_MODULE_LIST
+ self._LibraryClass.append(LibraryClassObject(LibraryClass, SupModuleList))
+ elif Name == 'ENTRY_POINT':
+ if self._ModuleEntryPointList == None:
+ self._ModuleEntryPointList = []
+ self._ModuleEntryPointList.append(Record[1])
+ elif Name == 'UNLOAD_IMAGE':
+ if self._ModuleUnloadImageList == None:
+ self._ModuleUnloadImageList = []
+ if Record[1] == '':
+ continue
+ self._ModuleUnloadImageList.append(Record[1])
+ elif Name == 'CONSTRUCTOR':
+ if self._ConstructorList == None:
+ self._ConstructorList = []
+ if Record[1] == '':
+ continue
+ self._ConstructorList.append(Record[1])
+ elif Name == 'DESTRUCTOR':
+ if self._DestructorList == None:
+ self._DestructorList = []
+ if Record[1] == '':
+ continue
+ self._DestructorList.append(Record[1])
+ elif Name == TAB_INF_DEFINES_CUSTOM_MAKEFILE:
+ TokenList = GetSplitValueList(Record[1])
+ if self._CustomMakefile == None:
+ self._CustomMakefile = {}
+ if len(TokenList) < 2:
+ self._CustomMakefile['MSFT'] = TokenList[0]
+ self._CustomMakefile['GCC'] = TokenList[0]
+ else:
+ if TokenList[0] not in ['MSFT', 'GCC']:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED,
+ "No supported family [%s]" % TokenList[0],
+ File=self.MetaFile, Line=Record[-1])
+ self._CustomMakefile[TokenList[0]] = TokenList[1]
+ else:
+ if self._Defs == None:
+ self._Defs = sdict()
+ self._Defs[Name] = Record[1]
+
+ #
+ # Retrieve information in sections specific to R8.x modules
+ #
+ if self._AutoGenVersion >= 0x00010005: # _AutoGenVersion may be None, which is less than anything
+ if not self._ModuleType:
+ EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE,
+ "MODULE_TYPE is not given", File=self.MetaFile)
+ if (self._Specification == None) or (not 'PI_SPECIFICATION_VERSION' in self._Specification) or (self._Specification['PI_SPECIFICATION_VERSION'] < 0x0001000A):
+ if self._ModuleType == SUP_MODULE_SMM_CORE:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.MetaFile)
+ if self._Defs and 'PCI_DEVICE_ID' in self._Defs and 'PCI_VENDOR_ID' in self._Defs \
+ and 'PCI_CLASS_CODE' in self._Defs:
+ self._BuildType = 'UEFI_OPTIONROM'
+ elif self._Defs and 'UEFI_HII_RESOURCE_SECTION' in self._Defs \
+ and self._Defs['UEFI_HII_RESOURCE_SECTION'] == 'TRUE':
+ self._BuildType = 'UEFI_HII'
+ else:
+ self._BuildType = self._ModuleType.upper()
+ else:
+ self._BuildType = self._ComponentType.upper()
+ if not self._ComponentType:
+ EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE,
+ "COMPONENT_TYPE is not given", File=self.MetaFile)
+ if self._ComponentType in self._MODULE_TYPE_:
+ self._ModuleType = self._MODULE_TYPE_[self._ComponentType]
+ if self._ComponentType == 'LIBRARY':
+ self._LibraryClass = [LibraryClassObject(self._BaseName, SUP_MODULE_LIST)]
+ # make use some [nmake] section macros
+ RecordList = self._RawData[MODEL_META_DATA_NMAKE, self._Arch, self._Platform]
+ for Name,Value,Dummy,Arch,Platform,ID,LineNo in RecordList:
+ Value = Value.replace('$(PROCESSOR)', self._Arch)
+ Name = Name.replace('$(PROCESSOR)', self._Arch)
+ Name, Value = ReplaceMacros((Name, Value), GlobalData.gEdkGlobal, True)
+ if Name == "IMAGE_ENTRY_POINT":
+ if self._ModuleEntryPointList == None:
+ self._ModuleEntryPointList = []
+ self._ModuleEntryPointList.append(Value)
+ elif Name == "DPX_SOURCE":
+ Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
+ Macros.update(self._Macros)
+ File = PathClass(NormPath(Value, Macros), self._ModuleDir, Arch=self._Arch)
+ # check the file validation
+ ErrorCode, ErrorInfo = File.Validate(".dxs", CaseSensitive=False)
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo,
+ File=self.MetaFile, Line=LineNo)
+ if self.Sources == None:
+ self._Sources = []
+ self._Sources.append(File)
+ else:
+ ToolList = self._NMAKE_FLAG_PATTERN_.findall(Name)
+ if len(ToolList) == 0 or len(ToolList) != 1:
+ pass
+# EdkLogger.warn("build", "Don't know how to do with macro [%s]" % Name,
+# File=self.MetaFile, Line=LineNo)
+ else:
+ if self._BuildOptions == None:
+ self._BuildOptions = sdict()
+
+ if ToolList[0] in self._TOOL_CODE_:
+ Tool = self._TOOL_CODE_[ToolList[0]]
+ else:
+ Tool = ToolList[0]
+ ToolChain = "*_*_*_%s_FLAGS" % Tool
+ ToolChainFamily = 'MSFT' # R8.x only support MSFT tool chain
+ #ignore not replaced macros in value
+ ValueList = GetSplitValueList(' ' + Value, '/D')
+ Dummy = ValueList[0]
+ for Index in range(1, len(ValueList)):
+ if ValueList[Index][-1] == '=' or ValueList[Index] == '':
+ continue
+ Dummy = Dummy + ' /D ' + ValueList[Index]
+ Value = Dummy.strip()
+ if (ToolChainFamily, ToolChain) not in self._BuildOptions:
+ self._BuildOptions[ToolChainFamily, ToolChain] = Value
+ else:
+ OptionString = self._BuildOptions[ToolChainFamily, ToolChain]
+ self._BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Value
+ # set _Header to non-None in order to avoid database re-querying
+ self._Header_ = 'DUMMY'
+
+ ## Retrieve file version
+ def _GetInfVersion(self):
+ if self._AutoGenVersion == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._AutoGenVersion == None:
+ self._AutoGenVersion = 0x00010000
+ return self._AutoGenVersion
+
+ ## Retrieve BASE_NAME
+ def _GetBaseName(self):
+ if self._BaseName == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._BaseName == None:
+ EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No BASE_NAME name", File=self.MetaFile)
+ return self._BaseName
+
+ ## Retrieve MODULE_TYPE
+ def _GetModuleType(self):
+ if self._ModuleType == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._ModuleType == None:
+ self._ModuleType = 'BASE'
+ if self._ModuleType not in SUP_MODULE_LIST:
+ self._ModuleType = "USER_DEFINED"
+ return self._ModuleType
+
+ ## Retrieve COMPONENT_TYPE
+ def _GetComponentType(self):
+ if self._ComponentType == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._ComponentType == None:
+ self._ComponentType = 'USER_DEFINED'
+ return self._ComponentType
+
+ ## Retrieve "BUILD_TYPE"
+ def _GetBuildType(self):
+ if self._BuildType == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if not self._BuildType:
+ self._BuildType = "BASE"
+ return self._BuildType
+
+ ## Retrieve file guid
+ def _GetFileGuid(self):
+ if self._Guid == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._Guid == None:
+ self._Guid = '00000000-0000-0000-000000000000'
+ return self._Guid
+
+ ## Retrieve module version
+ def _GetVersion(self):
+ if self._Version == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._Version == None:
+ self._Version = '0.0'
+ return self._Version
+
+ ## Retrieve PCD_IS_DRIVER
+ def _GetPcdIsDriver(self):
+ if self._PcdIsDriver == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._PcdIsDriver == None:
+ self._PcdIsDriver = ''
+ return self._PcdIsDriver
+
+ ## Retrieve SHADOW
+ def _GetShadow(self):
+ if self._Shadow == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._Shadow != None and self._Shadow.upper() == 'TRUE':
+ self._Shadow = True
+ else:
+ self._Shadow = False
+ return self._Shadow
+
+ ## Retrieve CUSTOM_MAKEFILE
+ def _GetMakefile(self):
+ if self._CustomMakefile == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._CustomMakefile == None:
+ self._CustomMakefile = {}
+ return self._CustomMakefile
+
+ ## Retrieve EFI_SPECIFICATION_VERSION
+ def _GetSpec(self):
+ if self._Specification == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._Specification == None:
+ self._Specification = {}
+ return self._Specification
+
+ ## Retrieve LIBRARY_CLASS
+ def _GetLibraryClass(self):
+ if self._LibraryClass == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._LibraryClass == None:
+ self._LibraryClass = []
+ return self._LibraryClass
+
+ ## Retrieve ENTRY_POINT
+ def _GetEntryPoint(self):
+ if self._ModuleEntryPointList == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._ModuleEntryPointList == None:
+ self._ModuleEntryPointList = []
+ return self._ModuleEntryPointList
+
+ ## Retrieve UNLOAD_IMAGE
+ def _GetUnloadImage(self):
+ if self._ModuleUnloadImageList == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._ModuleUnloadImageList == None:
+ self._ModuleUnloadImageList = []
+ return self._ModuleUnloadImageList
+
+ ## Retrieve CONSTRUCTOR
+ def _GetConstructor(self):
+ if self._ConstructorList == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._ConstructorList == None:
+ self._ConstructorList = []
+ return self._ConstructorList
+
+ ## Retrieve DESTRUCTOR
+ def _GetDestructor(self):
+ if self._DestructorList == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._DestructorList == None:
+ self._DestructorList = []
+ return self._DestructorList
+
+ ## Retrieve definies other than above ones
+ def _GetDefines(self):
+ if self._Defs == None:
+ if self._Header_ == None:
+ self._GetHeaderInfo()
+ if self._Defs == None:
+ self._Defs = sdict()
+ return self._Defs
+
+ ## Retrieve binary files
+ def _GetBinaryFiles(self):
+ if self._Binaries == None:
+ self._Binaries = []
+ RecordList = self._RawData[MODEL_EFI_BINARY_FILE, self._Arch, self._Platform]
+ Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource, 'PROCESSOR':self._Arch}
+ Macros.update(self._Macros)
+ for Record in RecordList:
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ FileType = Record[0]
+ LineNo = Record[-1]
+ Target = 'COMMON'
+ FeatureFlag = []
+ if Record[2]:
+ TokenList = GetSplitValueList(Record[2], TAB_VALUE_SPLIT)
+ if TokenList:
+ Target = TokenList[0]
+ if len(TokenList) > 1:
+ FeatureFlag = Record[1:]
+
+ File = PathClass(NormPath(Record[1], Macros), self._ModuleDir, '', FileType, True, self._Arch, '', Target)
+ # check the file validation
+ ErrorCode, ErrorInfo = File.Validate()
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
+ self._Binaries.append(File)
+ return self._Binaries
+
+ ## Retrieve source files
+ def _GetSourceFiles(self):
+ if self._Sources == None:
+ self._Sources = []
+ RecordList = self._RawData[MODEL_EFI_SOURCE_FILE, self._Arch, self._Platform]
+ Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource, 'PROCESSOR':self._Arch}
+ Macros.update(self._Macros)
+ for Record in RecordList:
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ LineNo = Record[-1]
+ ToolChainFamily = Record[1]
+ TagName = Record[2]
+ ToolCode = Record[3]
+ FeatureFlag = Record[4]
+ if self._AutoGenVersion < 0x00010005:
+ # old module source files (R8)
+ File = PathClass(NormPath(Record[0], Macros), self._ModuleDir, self._SourceOverridePath,
+ '', False, self._Arch, ToolChainFamily, '', TagName, ToolCode)
+ # check the file validation
+ ErrorCode, ErrorInfo = File.Validate(CaseSensitive=False)
+ if ErrorCode != 0:
+ if File.Ext.lower() == '.h':
+ EdkLogger.warn('build', 'Include file not found', ExtraData=ErrorInfo,
+ File=self.MetaFile, Line=LineNo)
+ continue
+ else:
+ EdkLogger.error('build', ErrorCode, ExtraData=File, File=self.MetaFile, Line=LineNo)
+ else:
+ File = PathClass(NormPath(Record[0], Macros), self._ModuleDir, '',
+ '', False, self._Arch, ToolChainFamily, '', TagName, ToolCode)
+ # check the file validation
+ ErrorCode, ErrorInfo = File.Validate()
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
+
+ self._Sources.append(File)
+ return self._Sources
+
+ ## Retrieve library classes employed by this module
+ def _GetLibraryClassUses(self):
+ if self._LibraryClasses == None:
+ self._LibraryClasses = sdict()
+ RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch, self._Platform]
+ for Record in RecordList:
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ Lib = Record[0]
+ Instance = Record[1]
+ if Instance != None and Instance != '':
+ Instance = NormPath(Instance, self._Macros)
+ self._LibraryClasses[Lib] = Instance
+ return self._LibraryClasses
+
+ ## Retrieve library names (for R8.x style of modules)
+ def _GetLibraryNames(self):
+ if self._Libraries == None:
+ self._Libraries = []
+ RecordList = self._RawData[MODEL_EFI_LIBRARY_INSTANCE, self._Arch, self._Platform]
+ for Record in RecordList:
+ # in case of name with '.lib' extension, which is unusual in R8.x inf
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ LibraryName = os.path.splitext(Record[0])[0]
+ if LibraryName not in self._Libraries:
+ self._Libraries.append(LibraryName)
+ return self._Libraries
+
+ ## Retrieve protocols consumed/produced by this module
+ def _GetProtocols(self):
+ if self._Protocols == None:
+ self._Protocols = sdict()
+ RecordList = self._RawData[MODEL_EFI_PROTOCOL, self._Arch, self._Platform]
+ for Record in RecordList:
+ CName = Record[0]
+ Value = ProtocolValue(CName, self.Packages)
+ if Value == None:
+ PackageList = "\n\t".join([str(P) for P in self.Packages])
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
+ "Value of Protocol [%s] is not found under [Protocols] section in" % CName,
+ ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
+ self._Protocols[CName] = Value
+ return self._Protocols
+
+ ## Retrieve PPIs consumed/produced by this module
+ def _GetPpis(self):
+ if self._Ppis == None:
+ self._Ppis = sdict()
+ RecordList = self._RawData[MODEL_EFI_PPI, self._Arch, self._Platform]
+ for Record in RecordList:
+ CName = Record[0]
+ Value = PpiValue(CName, self.Packages)
+ if Value == None:
+ PackageList = "\n\t".join([str(P) for P in self.Packages])
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
+ "Value of PPI [%s] is not found under [Ppis] section in " % CName,
+ ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
+ self._Ppis[CName] = Value
+ return self._Ppis
+
+ ## Retrieve GUIDs consumed/produced by this module
+ def _GetGuids(self):
+ if self._Guids == None:
+ self._Guids = sdict()
+ RecordList = self._RawData[MODEL_EFI_GUID, self._Arch, self._Platform]
+ for Record in RecordList:
+ CName = Record[0]
+ Value = GuidValue(CName, self.Packages)
+ if Value == None:
+ PackageList = "\n\t".join([str(P) for P in self.Packages])
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
+ "Value of Guid [%s] is not found under [Guids] section in" % CName,
+ ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
+ self._Guids[CName] = Value
+ return self._Guids
+
+ ## Retrieve include paths necessary for this module (for R8.x style of modules)
+ def _GetIncludes(self):
+ if self._Includes == None:
+ self._Includes = []
+ if self._SourceOverridePath:
+ self._Includes.append(self._SourceOverridePath)
+ RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch, self._Platform]
+ # [includes] section must be used only in old (R8.x) inf file
+ if self.AutoGenVersion >= 0x00010005 and len(RecordList) > 0:
+ EdkLogger.error('build', FORMAT_NOT_SUPPORTED, "No [include] section allowed",
+ File=self.MetaFile, Line=RecordList[0][-1]-1)
+ for Record in RecordList:
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ Record[0] = Record[0].replace('$(PROCESSOR)', self._Arch)
+ Record[0] = ReplaceMacro(Record[0], {'EFI_SOURCE' : GlobalData.gEfiSource}, False)
+ if Record[0].find('EDK_SOURCE') > -1:
+ File = NormPath(ReplaceMacro(Record[0], {'EDK_SOURCE' : GlobalData.gEcpSource}, False), self._Macros)
+ if File[0] == '.':
+ File = os.path.join(self._ModuleDir, File)
+ else:
+ File = os.path.join(GlobalData.gWorkspace, File)
+ File = RealPath(os.path.normpath(File))
+ if File:
+ self._Includes.append(File)
+
+ #TRICK: let compiler to choose correct header file
+ File = NormPath(ReplaceMacro(Record[0], {'EDK_SOURCE' : GlobalData.gEdkSource}, False), self._Macros)
+ if File[0] == '.':
+ File = os.path.join(self._ModuleDir, File)
+ else:
+ File = os.path.join(GlobalData.gWorkspace, File)
+ File = RealPath(os.path.normpath(File))
+ if File:
+ self._Includes.append(File)
+ else:
+ File = NormPath(Record[0], self._Macros)
+ if File[0] == '.':
+ File = os.path.join(self._ModuleDir, File)
+ else:
+ File = os.path.join(GlobalData.gWorkspace, File)
+ File = RealPath(os.path.normpath(File))
+ if File:
+ self._Includes.append(File)
+ return self._Includes
+
+ ## Retrieve packages this module depends on
+ def _GetPackages(self):
+ if self._Packages == None:
+ self._Packages = []
+ RecordList = self._RawData[MODEL_META_DATA_PACKAGE, self._Arch, self._Platform]
+ Macros = {"EDK_SOURCE":GlobalData.gEcpSource, "EFI_SOURCE":GlobalData.gEfiSource}
+ Macros.update(self._Macros)
+ for Record in RecordList:
+ File = PathClass(NormPath(Record[0], Macros), GlobalData.gWorkspace, Arch=self._Arch)
+ LineNo = Record[-1]
+ # check the file validation
+ ErrorCode, ErrorInfo = File.Validate('.dec')
+ if ErrorCode != 0:
+ EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
+ # parse this package now. we need it to get protocol/ppi/guid value
+ Package = self._Bdb[File, self._Arch]
+ self._Packages.append(Package)
+ return self._Packages
+
+ ## Retrieve PCDs used in this module
+ def _GetPcds(self):
+ if self._Pcds == None:
+ self._Pcds = {}
+ self._Pcds.update(self._GetPcd(MODEL_PCD_FIXED_AT_BUILD))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_PATCHABLE_IN_MODULE))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_FEATURE_FLAG))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_DYNAMIC))
+ self._Pcds.update(self._GetPcd(MODEL_PCD_DYNAMIC_EX))
+ return self._Pcds
+
+ ## Retrieve build options specific to this module
+ def _GetBuildOptions(self):
+ if self._BuildOptions == None:
+ self._BuildOptions = sdict()
+ RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, self._Platform]
+ for Record in RecordList:
+ ToolChainFamily = Record[0]
+ ToolChain = Record[1]
+ Option = Record[2]
+ if (ToolChainFamily, ToolChain) not in self._BuildOptions:
+ self._BuildOptions[ToolChainFamily, ToolChain] = Option
+ else:
+ # concatenate the option string if they're for the same tool
+ OptionString = self._BuildOptions[ToolChainFamily, ToolChain]
+ self._BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Option
+ return self._BuildOptions
+
+ ## Retrieve depedency expression
+ def _GetDepex(self):
+ if self._Depex == None:
+ self._Depex = tdict(False, 2)
+ RecordList = self._RawData[MODEL_EFI_DEPEX, self._Arch]
+
+ # PEIM and DXE drivers must have a valid [Depex] section
+ if len(self.LibraryClass) == 0 and len(RecordList) == 0:
+ if self.ModuleType == 'DXE_DRIVER' or self.ModuleType == 'PEIM' or self.ModuleType == 'DXE_SMM_DRIVER' or \
+ self.ModuleType == 'DXE_SAL_DRIVER' or self.ModuleType == 'DXE_RUNTIME_DRIVER':
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "No [Depex] section or no valid expression in [Depex] section for [%s] module" \
+ % self.ModuleType, File=self.MetaFile)
+
+ Depex = {}
+ for Record in RecordList:
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ Arch = Record[3]
+ ModuleType = Record[4]
+ TokenList = Record[0].split()
+ if (Arch, ModuleType) not in Depex:
+ Depex[Arch, ModuleType] = []
+ DepexList = Depex[Arch, ModuleType]
+ for Token in TokenList:
+ if Token in DEPEX_SUPPORTED_OPCODE:
+ DepexList.append(Token)
+ elif Token.endswith(".inf"): # module file name
+ ModuleFile = os.path.normpath(Token)
+ Module = self.BuildDatabase[ModuleFile]
+ if Module == None:
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "Module is not found in active platform",
+ ExtraData=Token, File=self.MetaFile, Line=Record[-1])
+ DepexList.append(Module.Guid)
+ else:
+ # get the GUID value now
+ Value = ProtocolValue(Token, self.Packages)
+ if Value == None:
+ Value = PpiValue(Token, self.Packages)
+ if Value == None:
+ Value = GuidValue(Token, self.Packages)
+ if Value == None:
+ PackageList = "\n\t".join([str(P) for P in self.Packages])
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
+ "Value of [%s] is not found in" % Token,
+ ExtraData=PackageList, File=self.MetaFile, Line=Record[-1])
+ DepexList.append(Value)
+ for Arch, ModuleType in Depex:
+ self._Depex[Arch, ModuleType] = Depex[Arch, ModuleType]
+ return self._Depex
+
+ ## Retrieve depedency expression
+ def _GetDepexExpression(self):
+ if self._DepexExpression == None:
+ self._DepexExpression = tdict(False, 2)
+ RecordList = self._RawData[MODEL_EFI_DEPEX, self._Arch]
+ DepexExpression = {}
+ for Record in RecordList:
+ Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
+ Arch = Record[3]
+ ModuleType = Record[4]
+ TokenList = Record[0].split()
+ if (Arch, ModuleType) not in DepexExpression:
+ DepexExpression[Arch, ModuleType] = ''
+ for Token in TokenList:
+ DepexExpression[Arch, ModuleType] = DepexExpression[Arch, ModuleType] + Token.strip() + ' '
+ for Arch, ModuleType in DepexExpression:
+ self._DepexExpression[Arch, ModuleType] = DepexExpression[Arch, ModuleType]
+ return self._DepexExpression
+
+ ## Retrieve PCD for given type
+ def _GetPcd(self, Type):
+ Pcds = {}
+ PcdDict = tdict(True, 4)
+ PcdSet = set()
+ RecordList = self._RawData[Type, self._Arch, self._Platform]
+ for TokenSpaceGuid, PcdCName, Setting, Arch, Platform, Dummy1, LineNo in RecordList:
+ PcdDict[Arch, Platform, PcdCName, TokenSpaceGuid] = (Setting, LineNo)
+ PcdSet.add((PcdCName, TokenSpaceGuid))
+ # get the guid value
+ if TokenSpaceGuid not in self.Guids:
+ Value = GuidValue(TokenSpaceGuid, self.Packages)
+ if Value == None:
+ PackageList = "\n\t".join([str(P) for P in self.Packages])
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
+ "Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid,
+ ExtraData=PackageList, File=self.MetaFile, Line=LineNo)
+ self.Guids[TokenSpaceGuid] = Value
+
+ # resolve PCD type, value, datum info, etc. by getting its definition from package
+ for PcdCName, TokenSpaceGuid in PcdSet:
+ ValueList = ['', '']
+ Setting, LineNo = PcdDict[self._Arch, self.Platform, PcdCName, TokenSpaceGuid]
+ if Setting == None:
+ continue
+ TokenList = Setting.split(TAB_VALUE_SPLIT)
+ ValueList[0:len(TokenList)] = TokenList
+ DefaultValue = ValueList[0]
+ Pcd = PcdClassObject(
+ PcdCName,
+ TokenSpaceGuid,
+ '',
+ '',
+ DefaultValue,
+ '',
+ '',
+ {},
+ self.Guids[TokenSpaceGuid]
+ )
+
+ # get necessary info from package declaring this PCD
+ for Package in self.Packages:
+ #
+ # 'dynamic' in INF means its type is determined by platform;
+ # if platform doesn't give its type, use 'lowest' one in the
+ # following order, if any
+ #
+ # "FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"
+ #
+ PcdType = self._PCD_TYPE_STRING_[Type]
+ if Type in [MODEL_PCD_DYNAMIC, MODEL_PCD_DYNAMIC_EX]:
+ Pcd.Pending = True
+ for T in ["FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"]:
+ if (PcdCName, TokenSpaceGuid, T) in Package.Pcds:
+ PcdType = T
+ break
+ else:
+ Pcd.Pending = False
+
+ if (PcdCName, TokenSpaceGuid, PcdType) in Package.Pcds:
+ PcdInPackage = Package.Pcds[PcdCName, TokenSpaceGuid, PcdType]
+ Pcd.Type = PcdType
+ Pcd.TokenValue = PcdInPackage.TokenValue
+ Pcd.DatumType = PcdInPackage.DatumType
+ Pcd.MaxDatumSize = PcdInPackage.MaxDatumSize
+ Pcd.InfDefaultValue = Pcd.DefaultValue
+ if Pcd.DefaultValue in [None, '']:
+ Pcd.DefaultValue = PcdInPackage.DefaultValue
+ break
+ else:
+ EdkLogger.error(
+ 'build',
+ PARSER_ERROR,
+ "PCD [%s.%s] in [%s] is not found in dependent packages:" % (TokenSpaceGuid, PcdCName, self.MetaFile),
+ File =self.MetaFile, Line=LineNo,
+ ExtraData="\t%s" % '\n\t'.join([str(P) for P in self.Packages])
+ )
+ Pcds[PcdCName, TokenSpaceGuid] = Pcd
+ return Pcds
+
+ Arch = property(_GetArch, _SetArch)
+ Platform = property(_GetPlatform, _SetPlatform)
+
+ AutoGenVersion = property(_GetInfVersion)
+ BaseName = property(_GetBaseName)
+ ModuleType = property(_GetModuleType)
+ ComponentType = property(_GetComponentType)
+ BuildType = property(_GetBuildType)
+ Guid = property(_GetFileGuid)
+ Version = property(_GetVersion)
+ PcdIsDriver = property(_GetPcdIsDriver)
+ Shadow = property(_GetShadow)
+ CustomMakefile = property(_GetMakefile)
+ Specification = property(_GetSpec)
+ LibraryClass = property(_GetLibraryClass)
+ ModuleEntryPointList = property(_GetEntryPoint)
+ ModuleUnloadImageList = property(_GetUnloadImage)
+ ConstructorList = property(_GetConstructor)
+ DestructorList = property(_GetDestructor)
+ Defines = property(_GetDefines)
+
+ Binaries = property(_GetBinaryFiles)
+ Sources = property(_GetSourceFiles)
+ LibraryClasses = property(_GetLibraryClassUses)
+ Libraries = property(_GetLibraryNames)
+ Protocols = property(_GetProtocols)
+ Ppis = property(_GetPpis)
+ Guids = property(_GetGuids)
+ Includes = property(_GetIncludes)
+ Packages = property(_GetPackages)
+ Pcds = property(_GetPcds)
+ BuildOptions = property(_GetBuildOptions)
+ Depex = property(_GetDepex)
+ DepexExpression = property(_GetDepexExpression)
+
+## Database
+#
+# This class defined the build databse for all modules, packages and platform.
+# It will call corresponding parser for the given file if it cannot find it in
+# the database.
+#
+# @param DbPath Path of database file
+# @param GlobalMacros Global macros used for replacement during file parsing
+# @prarm RenewDb=False Create new database file if it's already there
+#
+class WorkspaceDatabase(object):
+ # file parser
+ _FILE_PARSER_ = {
+ MODEL_FILE_INF : InfParser,
+ MODEL_FILE_DEC : DecParser,
+ MODEL_FILE_DSC : DscParser,
+ MODEL_FILE_FDF : None, #FdfParser,
+ MODEL_FILE_CIF : None
+ }
+
+ # file table
+ _FILE_TABLE_ = {
+ MODEL_FILE_INF : ModuleTable,
+ MODEL_FILE_DEC : PackageTable,
+ MODEL_FILE_DSC : PlatformTable,
+ }
+
+ # default database file path
+ _DB_PATH_ = "Conf/.cache/build.db"
+
+ #
+ # internal class used for call corresponding file parser and caching the result
+ # to avoid unnecessary re-parsing
+ #
+ class BuildObjectFactory(object):
+ _FILE_TYPE_ = {
+ ".inf" : MODEL_FILE_INF,
+ ".dec" : MODEL_FILE_DEC,
+ ".dsc" : MODEL_FILE_DSC,
+ ".fdf" : MODEL_FILE_FDF,
+ }
+
+ # convert to xxxBuildData object
+ _GENERATOR_ = {
+ MODEL_FILE_INF : InfBuildData,
+ MODEL_FILE_DEC : DecBuildData,
+ MODEL_FILE_DSC : DscBuildData,
+ MODEL_FILE_FDF : None #FlashDefTable,
+ }
+
+ _CACHE_ = {} # (FilePath, Arch) : <object>
+
+ # constructor
+ def __init__(self, WorkspaceDb):
+ self.WorkspaceDb = WorkspaceDb
+
+ # key = (FilePath, Arch='COMMON')
+ def __contains__(self, Key):
+ FilePath = Key[0]
+ Arch = 'COMMON'
+ if len(Key) > 1:
+ Arch = Key[1]
+ return (FilePath, Arch) in self._CACHE_
+
+ # key = (FilePath, Arch='COMMON')
+ def __getitem__(self, Key):
+ FilePath = Key[0]
+ Arch = 'COMMON'
+ Platform = 'COMMON'
+ if len(Key) > 1:
+ Arch = Key[1]
+ if len(Key) > 2:
+ Platform = Key[2]
+
+ # if it's generated before, just return the cached one
+ Key = (FilePath, Arch)
+ if Key in self._CACHE_:
+ return self._CACHE_[Key]
+
+ # check file type
+ Ext = FilePath.Ext.lower()
+ if Ext not in self._FILE_TYPE_:
+ return None
+ FileType = self._FILE_TYPE_[Ext]
+ if FileType not in self._GENERATOR_:
+ return None
+
+ # get table for current file
+ MetaFile = self.WorkspaceDb[FilePath, FileType, self.WorkspaceDb._GlobalMacros]
+ BuildObject = self._GENERATOR_[FileType](
+ FilePath,
+ MetaFile,
+ self,
+ Arch,
+ Platform,
+ self.WorkspaceDb._GlobalMacros,
+ )
+ self._CACHE_[Key] = BuildObject
+ return BuildObject
+
+ # placeholder for file format conversion
+ class TransformObjectFactory:
+ def __init__(self, WorkspaceDb):
+ self.WorkspaceDb = WorkspaceDb
+
+ # key = FilePath, Arch
+ def __getitem__(self, Key):
+ pass
+
+ ## Constructor of WorkspaceDatabase
+ #
+ # @param DbPath Path of database file
+ # @param GlobalMacros Global macros used for replacement during file parsing
+ # @prarm RenewDb=False Create new database file if it's already there
+ #
+ def __init__(self, DbPath, GlobalMacros={}, RenewDb=False):
+ self._GlobalMacros = GlobalMacros
+
+ if DbPath == None or DbPath == '':
+ DbPath = os.path.normpath(os.path.join(GlobalData.gWorkspace, self._DB_PATH_))
+
+ # don't create necessary path for db in memory
+ if DbPath != ':memory:':
+ DbDir = os.path.split(DbPath)[0]
+ if not os.path.exists(DbDir):
+ os.makedirs(DbDir)
+
+ # remove db file in case inconsistency between db and file in file system
+ if self._CheckWhetherDbNeedRenew(RenewDb, DbPath):
+ os.remove(DbPath)
+
+ # create db with optimized parameters
+ self.Conn = sqlite3.connect(DbPath, isolation_level='DEFERRED')
+ self.Conn.execute("PRAGMA synchronous=OFF")
+ self.Conn.execute("PRAGMA temp_store=MEMORY")
+ self.Conn.execute("PRAGMA count_changes=OFF")
+ self.Conn.execute("PRAGMA cache_size=8192")
+ #self.Conn.execute("PRAGMA page_size=8192")
+
+ # to avoid non-ascii character conversion issue
+ self.Conn.text_factory = str
+ self.Cur = self.Conn.cursor()
+
+ # create table for internal uses
+ self.TblDataModel = TableDataModel(self.Cur)
+ self.TblFile = TableFile(self.Cur)
+
+ # conversion object for build or file format conversion purpose
+ self.BuildObject = WorkspaceDatabase.BuildObjectFactory(self)
+ self.TransformObject = WorkspaceDatabase.TransformObjectFactory(self)
+
+ ## Check whether workspace database need to be renew.
+ # The renew reason maybe:
+ # 1) If user force to renew;
+ # 2) If user do not force renew, and
+ # a) If the time of last modified python source is newer than database file;
+ # b) If the time of last modified frozen executable file is newer than database file;
+ #
+ # @param force User force renew database
+ # @param DbPath The absolute path of workspace database file
+ #
+ # @return Bool value for whether need renew workspace databse
+ #
+ def _CheckWhetherDbNeedRenew (self, force, DbPath):
+ DbDir = os.path.split(DbPath)[0]
+ MacroFilePath = os.path.normpath(os.path.join(DbDir, "build.mac"))
+ MacroMatch = False
+ if os.path.exists(MacroFilePath) and os.path.isfile(MacroFilePath):
+ LastMacros = None
+ try:
+ f = open(MacroFilePath,'r')
+ LastMacros = pickle.load(f)
+ f.close()
+ except IOError:
+ pass
+ except:
+ f.close()
+
+ if LastMacros != None and type(LastMacros) is DictType:
+ if LastMacros == self._GlobalMacros:
+ MacroMatch = True
+ for Macro in LastMacros.keys():
+ if not (Macro in self._GlobalMacros and LastMacros[Macro] == self._GlobalMacros[Macro]):
+ MacroMatch = False;
+ break;
+
+ if not MacroMatch:
+ # save command line macros to file
+ try:
+ f = open(MacroFilePath,'w')
+ pickle.dump(self._GlobalMacros, f, 2)
+ f.close()
+ except IOError:
+ pass
+ except:
+ f.close()
+
+ force = True
+
+ # if database does not exist, we need do nothing
+ if not os.path.exists(DbPath): return False
+
+ # if user force to renew database, then not check whether database is out of date
+ if force: return True
+
+ #
+ # Check the time of last modified source file or build.exe
+ # if is newer than time of database, then database need to be re-created.
+ #
+ timeOfToolModified = 0
+ if hasattr(sys, "frozen"):
+ exePath = os.path.abspath(sys.executable)
+ timeOfToolModified = os.stat(exePath).st_mtime
+ else:
+ curPath = os.path.dirname(__file__) # curPath is the path of WorkspaceDatabase.py
+ rootPath = os.path.split(curPath)[0] # rootPath is root path of python source, such as /BaseTools/Source/Python
+ if rootPath == "" or rootPath == None:
+ EdkLogger.verbose("\nFail to find the root path of build.exe or python sources, so can not \
+determine whether database file is out of date!\n")
+
+ # walk the root path of source or build's binary to get the time last modified.
+
+ for root, dirs, files in os.walk (rootPath):
+ for dir in dirs:
+ # bypass source control folder
+ if dir.lower() in [".svn", "_svn", "cvs"]:
+ dirs.remove(dir)
+
+ for file in files:
+ ext = os.path.splitext(file)[1]
+ if ext.lower() == ".py": # only check .py files
+ fd = os.stat(os.path.join(root, file))
+ if timeOfToolModified < fd.st_mtime:
+ timeOfToolModified = fd.st_mtime
+ if timeOfToolModified > os.stat(DbPath).st_mtime:
+ EdkLogger.verbose("\nWorkspace database is out of data!")
+ return True
+
+ return False
+
+ ## Initialize build database
+ def InitDatabase(self):
+ EdkLogger.verbose("\nInitialize build database started ...")
+
+ #
+ # Create new tables
+ #
+ self.TblDataModel.Create(False)
+ self.TblFile.Create(False)
+
+ #
+ # Initialize table DataModel
+ #
+ self.TblDataModel.InitTable()
+ EdkLogger.verbose("Initialize build database ... DONE!")
+
+ ## Query a table
+ #
+ # @param Table: The instance of the table to be queried
+ #
+ def QueryTable(self, Table):
+ Table.Query()
+
+ ## Close entire database
+ #
+ # Commit all first
+ # Close the connection and cursor
+ #
+ def Close(self):
+ self.Conn.commit()
+ self.Cur.close()
+ self.Conn.close()
+
+ ## Get unique file ID for the gvien file
+ def GetFileId(self, FilePath):
+ return self.TblFile.GetFileId(FilePath)
+
+ ## Get file type value for the gvien file ID
+ def GetFileType(self, FileId):
+ return self.TblFile.GetFileType(FileId)
+
+ ## Get time stamp stored in file table
+ def GetTimeStamp(self, FileId):
+ return self.TblFile.GetFileTimeStamp(FileId)
+
+ ## Update time stamp in file table
+ def SetTimeStamp(self, FileId, TimeStamp):
+ return self.TblFile.SetFileTimeStamp(FileId, TimeStamp)
+
+ ## Check if a table integrity flag exists or not
+ def CheckIntegrity(self, TableName):
+ try:
+ Result = self.Cur.execute("select min(ID) from %s" % (TableName)).fetchall()
+ if Result[0][0] != -1:
+ return False
+ except:
+ return False
+ return True
+
+ ## Compose table name for given file type and file ID
+ def GetTableName(self, FileType, FileId):
+ return "_%s_%s" % (FileType, FileId)
+
+ ## Return a temp table containing all content of the given file
+ #
+ # @param FileInfo The tuple containing path and type of a file
+ #
+ def __getitem__(self, FileInfo):
+ FilePath, FileType, Macros = FileInfo
+ if FileType not in self._FILE_TABLE_:
+ return None
+
+ # flag used to indicate if it's parsed or not
+ FilePath = str(FilePath)
+ Parsed = False
+ FileId = self.GetFileId(FilePath)
+ if FileId != None:
+ TimeStamp = os.stat(FilePath)[8]
+ TableName = self.GetTableName(FileType, FileId)
+ if TimeStamp != self.GetTimeStamp(FileId):
+ # update the timestamp in database
+ self.SetTimeStamp(FileId, TimeStamp)
+ else:
+ # if the table exists and is integrity, don't parse it
+ Parsed = self.CheckIntegrity(TableName)
+ else:
+ FileId = self.TblFile.InsertFile(FilePath, FileType)
+ TableName = self.GetTableName(FileType, FileId)
+
+ FileTable = self._FILE_TABLE_[FileType](self.Cur, TableName, FileId)
+ FileTable.Create(not Parsed)
+ Parser = self._FILE_PARSER_[FileType](FilePath, FileType, FileTable, Macros)
+ # set the "Finished" flag in parser in order to avoid re-parsing (if parsed)
+ Parser.Finished = Parsed
+ return Parser
+
+ ## Summarize all packages in the database
+ def _GetPackageList(self):
+ PackageList = []
+ for Module in self.ModuleList:
+ for Package in Module.Packages:
+ if Package not in PackageList:
+ PackageList.append(Package)
+ return PackageList
+
+ ## Summarize all platforms in the database
+ def _GetPlatformList(self):
+ PlatformList = []
+ for PlatformFile in self.TblFile.GetFileList(MODEL_FILE_DSC):
+ try:
+ Platform = self.BuildObject[PathClass(PlatformFile), 'COMMON']
+ except:
+ Platform = None
+ if Platform != None:
+ PlatformList.append(Platform)
+ return PlatformList
+
+ ## Summarize all modules in the database
+ def _GetModuleList(self):
+ ModuleList = []
+ for ModuleFile in self.TblFile.GetFileList(MODEL_FILE_INF):
+ try:
+ Module = self.BuildObject[PathClass(ModuleFile), 'COMMON']
+ except:
+ Module = None
+ if Module != None:
+ ModuleList.append(Module)
+ return ModuleList
+
+ PlatformList = property(_GetPlatformList)
+ PackageList = property(_GetPackageList)
+ ModuleList = property(_GetModuleList)
+
+##
+#
+# This acts like the main() function for the script, unless it is 'import'ed into another
+# script.
+#
+if __name__ == '__main__':
+ pass
+
diff --git a/BaseTools/Source/Python/Workspace/__init__.py b/BaseTools/Source/Python/Workspace/__init__.py
index e69de29bb2..27a969bb27 100644
--- a/BaseTools/Source/Python/Workspace/__init__.py
+++ b/BaseTools/Source/Python/Workspace/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'Workspace' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2008 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
new file mode 100644
index 0000000000..23e819e5ca
--- /dev/null
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -0,0 +1,1423 @@
+## @file
+# Routines for generating build report.
+#
+# This module contains the functionality to generate build report after
+# build all target completes successfully.
+#
+# Copyright (c) 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+## Import Modules
+#
+import os
+import re
+import platform
+import textwrap
+import traceback
+import sys
+from datetime import datetime
+from Common import EdkLogger
+from Common.Misc import GuidStructureByteArrayToGuidString
+from Common.Misc import GuidStructureStringToGuidString
+from Common.InfClassObject import gComponentType2ModuleType
+from Common.BuildToolError import FILE_OPEN_FAILURE
+from Common.BuildToolError import FILE_WRITE_FAILURE
+from Common.BuildToolError import CODE_ERROR
+
+
+## Pattern to extract contents in EDK DXS files
+gDxsDependencyPattern = re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END", re.DOTALL)
+
+## Pattern to find total FV total size, occupied size in flash report intermediate file
+gFvTotalSizePattern = re.compile(r"EFI_FV_TOTAL_SIZE = (0x[0-9a-fA-F]+)")
+gFvTakenSizePattern = re.compile(r"EFI_FV_TAKEN_SIZE = (0x[0-9a-fA-F]+)")
+
+## Pattern to find module size and time stamp in module summary report intermediate file
+gModuleSizePattern = re.compile(r"MODULE_SIZE = (\d+)")
+gTimeStampPattern = re.compile(r"TIME_STAMP = (\d+)")
+
+## Pattern to find GUID value in flash description files
+gPcdGuidPattern = re.compile(r"PCD\((\w+)[.](\w+)\)")
+
+## Pattern to collect offset, GUID value pair in the flash report intermediate file
+gOffsetGuidPattern = re.compile(r"(0x[0-9A-Fa-f]+) ([-A-Fa-f0-9]+)")
+
+## Pattern to find module base address and entry point in fixed flash map file
+gModulePattern = r"\n[-\w]+\s*\(([^,]+),\s*BaseAddress=%(Address)s,\s*EntryPoint=%(Address)s\)\s*\(GUID=([-0-9A-Fa-f]+)[^)]*\)"
+gMapFileItemPattern = re.compile(gModulePattern % {"Address" : "(-?0[xX][0-9A-Fa-f]+)"})
+
+## Pattern to find all module referenced header files in source files
+gIncludePattern = re.compile(r'#include\s*["<]([^">]+)[">]')
+gIncludePattern2 = re.compile(r"#include\s+EFI_([A-Z_]+)\s*[(]\s*(\w+)\s*[)]")
+
+## Pattern to find the entry point for EDK module using EDKII Glue library
+gGlueLibEntryPoint = re.compile(r"__EDKII_GLUE_MODULE_ENTRY_POINT__\s*=\s*(\w+)")
+
+## Tags for section start, end and separator
+gSectionStart = ">" + "=" * 118 + "<"
+gSectionEnd = "<" + "=" * 118 + ">" + "\n"
+gSectionSep = "=" * 120
+
+## Tags for subsection start, end and separator
+gSubSectionStart = ">" + "-" * 118 + "<"
+gSubSectionEnd = "<" + "-" * 118 + ">"
+gSubSectionSep = "-" * 120
+
+## The look up table to map PCD type to pair of report display type and DEC type
+gPcdTypeMap = {
+ 'FixedAtBuild' : ('FIXED', 'FixedAtBuild'),
+ 'PatchableInModule': ('PATCH', 'PatchableInModule'),
+ 'FeatureFlag' : ('FLAG', 'FeatureFlag'),
+ 'Dynamic' : ('DYN', 'Dynamic'),
+ 'DynamicHii' : ('DYNHII', 'Dynamic'),
+ 'DynamicVpd' : ('DYNVPD', 'Dynamic'),
+ 'DynamicEx' : ('DEX', 'Dynamic'),
+ 'DynamicExHii' : ('DEXHII', 'Dynamic'),
+ 'DynamicExVpd' : ('DEXVPD', 'Dynamic'),
+ }
+
+## The look up table to map module type to driver type
+gDriverTypeMap = {
+ 'SEC' : '0x3 (SECURITY_CORE)',
+ 'PEI_CORE' : '0x4 (PEI_CORE)',
+ 'PEIM' : '0x6 (PEIM)',
+ 'DXE_CORE' : '0x5 (DXE_CORE)',
+ 'DXE_DRIVER' : '0x7 (DRIVER)',
+ 'DXE_SAL_DRIVER' : '0x7 (DRIVER)',
+ 'DXE_SMM_DRIVER' : '0x7 (DRIVER)',
+ 'DXE_RUNTIME_DRIVER': '0x7 (DRIVER)',
+ 'UEFI_DRIVER' : '0x7 (DRIVER)',
+ 'UEFI_APPLICATION' : '0x9 (APPLICATION)',
+ 'SMM_CORE' : '0xD (SMM_CORE)',
+ 'SMM_DRIVER' : '0xA (SMM)', # Extension of module type to support PI 1.1 SMM drivers
+ }
+
+##
+# Writes a string to the file object.
+#
+# This function writes a string to the file object and a new line is appended
+# afterwards. It may optionally wraps the string for better readability.
+#
+# @File The file object to write
+# @String The string to be written to the file
+# @Wrapper Indicates whether to wrap the string
+#
+def FileWrite(File, String, Wrapper=False):
+ if Wrapper:
+ String = textwrap.fill(String, 120)
+ File.write(String + "\r\n")
+
+##
+# Find all the header file that the module source directly includes.
+#
+# This function scans source code to find all header files the module may
+# include. This is not accurate but very effective to find all the header
+# file the module might include with #include statement.
+#
+# @Source The source file name
+# @IncludePathList The list of include path to find the source file.
+# @IncludeFiles The dictionary of current found include files.
+#
+def FindIncludeFiles(Source, IncludePathList, IncludeFiles):
+ FileContents = open(Source).read()
+ #
+ # Find header files with pattern #include "XXX.h" or #include <XXX.h>
+ #
+ for Match in gIncludePattern.finditer(FileContents):
+ FileName = Match.group(1).strip()
+ for Dir in [os.path.dirname(Source)] + IncludePathList:
+ FullFileName = os.path.normpath(os.path.join(Dir, FileName))
+ if os.path.exists(FullFileName):
+ IncludeFiles[FullFileName.lower().replace("\\", "/")] = FullFileName
+ break
+
+ #
+ # Find header files with pattern like #include EFI_PPI_CONSUMER(XXX)
+ #
+ for Match in gIncludePattern2.finditer(FileContents):
+ Key = Match.group(2)
+ Type = Match.group(1)
+ if "ARCH_PROTOCOL" in Type:
+ FileName = "ArchProtocol/%(Key)s/%(Key)s.h" % {"Key" : Key}
+ elif "PROTOCOL" in Type:
+ FileName = "Protocol/%(Key)s/%(Key)s.h" % {"Key" : Key}
+ elif "PPI" in Type:
+ FileName = "Ppi/%(Key)s/%(Key)s.h" % {"Key" : Key}
+ elif "GUID" in Type:
+ FileName = "Guid/%(Key)s/%(Key)s.h" % {"Key" : Key}
+ else:
+ continue
+ for Dir in IncludePathList:
+ FullFileName = os.path.normpath(os.path.join(Dir, FileName))
+ if os.path.exists(FullFileName):
+ IncludeFiles[FullFileName.lower().replace("\\", "/")] = FullFileName
+ break
+
+##
+# Reports library information
+#
+# This class reports the module library subsection in the build report file.
+#
+class LibraryReport(object):
+ ##
+ # Constructor function for class LibraryReport
+ #
+ # This constructor function generates LibraryReport object for
+ # a module.
+ #
+ # @param self The object pointer
+ # @param M Module context information
+ #
+ def __init__(self, M):
+ self.LibraryList = []
+ if int(str(M.AutoGenVersion), 0) >= 0x00010005:
+ self._EdkIIModule = True
+ else:
+ self._EdkIIModule = False
+
+ for Lib in M.DependentLibraryList:
+ LibInfPath = str(Lib)
+ LibClassList = Lib.LibraryClass[0].LibraryClass
+ LibConstructorList = Lib.ConstructorList
+ LibDesstructorList = Lib.DestructorList
+ LibDepexList = Lib.DepexExpression[M.Arch, M.ModuleType]
+ self.LibraryList.append((LibInfPath, LibClassList, LibConstructorList, LibDesstructorList, LibDepexList))
+
+ ##
+ # Generate report for module library information
+ #
+ # This function generates report for the module library.
+ # If the module is EDKII style one, the additional library class, library
+ # constructor/destructor and dependency expression may also be reported.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ #
+ def GenerateReport(self, File):
+ FileWrite(File, gSubSectionStart)
+ FileWrite(File, "Library")
+ if len(self.LibraryList) > 0:
+ FileWrite(File, gSubSectionSep)
+ for LibraryItem in self.LibraryList:
+ LibInfPath = LibraryItem[0]
+ FileWrite(File, LibInfPath)
+
+ #
+ # Report library class, library constructor and destructor for
+ # EDKII style module.
+ #
+ if self._EdkIIModule:
+ LibClass = LibraryItem[1]
+ EdkIILibInfo = ""
+ LibConstructor = " ".join(LibraryItem[2])
+ if LibConstructor:
+ EdkIILibInfo += " C = " + LibConstructor
+ LibDestructor = " ".join(LibraryItem[3])
+ if LibDestructor:
+ EdkIILibInfo += " D = " + LibConstructor
+ LibDepex = " ".join(LibraryItem[4])
+ if LibDepex:
+ EdkIILibInfo += " Depex = " + LibDepex
+ if EdkIILibInfo:
+ FileWrite(File, "{%s: %s}" % (LibClass, EdkIILibInfo))
+ else:
+ FileWrite(File, "{%s}" % LibClass)
+
+ FileWrite(File, gSubSectionEnd)
+
+##
+# Reports dependency expression information
+#
+# This class reports the module dependency expression subsection in the build report file.
+#
+class DepexReport(object):
+ ##
+ # Constructor function for class DepexReport
+ #
+ # This constructor function generates DepexReport object for
+ # a module. If the module source contains the DXS file (usually EDK
+ # style module), it uses the dependency in DXS file; otherwise,
+ # it uses the dependency expression from its own INF [Depex] section
+ # and then merges with the ones from its dependent library INF.
+ #
+ # @param self The object pointer
+ # @param M Module context information
+ #
+ def __init__(self, M):
+ self.Depex = ""
+ ModuleType = M.ModuleType
+ if not ModuleType:
+ ModuleType = gComponentType2ModuleType.get(M.ComponentType, "")
+ if ModuleType in ["SEC", "PEI_CORE", "DXE_CORE"]:
+ return
+
+ for Source in M.SourceFileList:
+ if os.path.splitext(Source.Path)[1].lower() == ".dxs":
+ Match = gDxsDependencyPattern.search(open(Source.Path).read())
+ if Match:
+ self.Depex = Match.group(1).strip()
+ self.Source = "DXS"
+ break
+ else:
+ self.Depex = M.DepexExpressionList.get(M.ModuleType, "")
+ self.ModuleDepex = " ".join(M.Module.DepexExpression[M.Arch, M.ModuleType])
+ if not self.ModuleDepex:
+ self.ModuleDepex = "(None)"
+
+ LibDepexList = []
+ for Lib in M.DependentLibraryList:
+ LibDepex = " ".join(Lib.DepexExpression[M.Arch, M.ModuleType]).strip()
+ if LibDepex != "":
+ LibDepexList.append("(" + LibDepex + ")")
+ self.LibraryDepex = " AND ".join(LibDepexList)
+ if not self.LibraryDepex:
+ self.LibraryDepex = "(None)"
+ self.Source = "INF"
+
+ ##
+ # Generate report for module dependency expression information
+ #
+ # This function generates report for the module dependency expression.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ #
+ def GenerateReport(self, File):
+ if not self.Depex:
+ return
+
+ FileWrite(File, gSubSectionStart)
+ FileWrite(File, "Dependency Expression (DEPEX) from %s" % self.Source)
+
+ if self.Source == "INF":
+ FileWrite(File, "%s" % self.Depex, True)
+ FileWrite(File, gSubSectionSep)
+ FileWrite(File, "From Module INF: %s" % self.ModuleDepex, True)
+ FileWrite(File, "From Library INF: %s" % self.LibraryDepex, True)
+ else:
+ FileWrite(File, "%s" % self.Depex)
+ FileWrite(File, gSubSectionEnd)
+
+##
+# Reports dependency expression information
+#
+# This class reports the module build flags subsection in the build report file.
+#
+class BuildFlagsReport(object):
+ ##
+ # Constructor function for class BuildFlagsReport
+ #
+ # This constructor function generates BuildFlagsReport object for
+ # a module. It reports the build tool chain tag and all relevant
+ # build flags to build the module.
+ #
+ # @param self The object pointer
+ # @param M Module context information
+ #
+ def __init__(self, M):
+ BuildOptions = {}
+ #
+ # Add build flags according to source file extension so that
+ # irrelevant ones can be filtered out.
+ #
+ for Source in M.SourceFileList:
+ Ext = os.path.splitext(Source.File)[1].lower()
+ if Ext in [".c", ".cc", ".cpp"]:
+ BuildOptions["CC"] = 1
+ elif Ext in [".s", ".asm"]:
+ BuildOptions["PP"] = 1
+ BuildOptions["ASM"] = 1
+ elif Ext in [".vfr"]:
+ BuildOptions["VFRPP"] = 1
+ BuildOptions["VFR"] = 1
+ elif Ext in [".dxs"]:
+ BuildOptions["APP"] = 1
+ BuildOptions["CC"] = 1
+ elif Ext in [".asl"]:
+ BuildOptions["ASLPP"] = 1
+ BuildOptions["ASL"] = 1
+ elif Ext in [".aslc"]:
+ BuildOptions["ASLCC"] = 1
+ BuildOptions["ASLDLINK"] = 1
+ BuildOptions["CC"] = 1
+ elif Ext in [".asm16"]:
+ BuildOptions["ASMLINK"] = 1
+ BuildOptions["SLINK"] = 1
+ BuildOptions["DLINK"] = 1
+
+ #
+ # Save module build flags.
+ #
+ self.ToolChainTag = M.ToolChain
+ self.BuildFlags = {}
+ for Tool in BuildOptions:
+ self.BuildFlags[Tool + "_FLAGS"] = M.BuildOption.get(Tool, {}).get("FLAGS", "")
+
+ ##
+ # Generate report for module build flags information
+ #
+ # This function generates report for the module build flags expression.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ #
+ def GenerateReport(self, File):
+ FileWrite(File, gSubSectionStart)
+ FileWrite(File, "Build Flags")
+ FileWrite(File, "Tool Chain Tag: %s" % self.ToolChainTag)
+ for Tool in self.BuildFlags:
+ FileWrite(File, gSubSectionSep)
+ FileWrite(File, "%s = %s" % (Tool, self.BuildFlags[Tool]), True)
+
+ FileWrite(File, gSubSectionEnd)
+
+
+##
+# Reports individual module information
+#
+# This class reports the module section in the build report file.
+# It comprises of module summary, module PCD, library, dependency expression,
+# build flags sections.
+#
+class ModuleReport(object):
+ ##
+ # Constructor function for class ModuleReport
+ #
+ # This constructor function generates ModuleReport object for
+ # a separate module in a platform build.
+ #
+ # @param self The object pointer
+ # @param M Module context information
+ # @param ReportType The kind of report items in the final report file
+ #
+ def __init__(self, M, ReportType):
+ self.ModuleName = M.Module.BaseName
+ self.ModuleInfPath = M.MetaFile.File
+ self.FileGuid = M.Guid
+ self.Size = 0
+ self.BuildTimeStamp = None
+ self.DriverType = ""
+ ModuleType = M.ModuleType
+ if not ModuleType:
+ ModuleType = gComponentType2ModuleType.get(M.ComponentType, "")
+ #
+ # If a module complies to PI 1.1, promote Module type to "SMM_DRIVER"
+ #
+ if ModuleType == "DXE_SMM_DRIVER":
+ PiSpec = M.Module.Specification.get("PI_SPECIFICATION_VERSION", "0x00010000")
+ if int(PiSpec, 0) >= 0x0001000A:
+ ModuleType = "SMM_DRIVER"
+ self.DriverType = gDriverTypeMap.get(ModuleType, "")
+ self.UefiSpecVersion = M.Module.Specification.get("UEFI_SPECIFICATION_VERSION", "")
+ self.PiSpecVersion = M.Module.Specification.get("PI_SPECIFICATION_VERSION", "")
+ self.PciDeviceId = M.Module.Defines.get("PCI_DEVICE_ID", "")
+ self.PciVendorId = M.Module.Defines.get("PCI_VENDOR_ID", "")
+ self.PciClassCode = M.Module.Defines.get("PCI_CLASS_CODE", "")
+
+ self._BuildDir = M.BuildDir
+ self.ModulePcdSet = {}
+ if "PCD" in ReportType:
+ #
+ # Collect all module used PCD set: module INF referenced directly or indirectly.
+ # It also saves module INF default values of them in case they exist.
+ #
+ for Pcd in M.ModulePcdList + M.LibraryPcdList:
+ self.ModulePcdSet.setdefault((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Pcd.Type), (Pcd.InfDefaultValue, Pcd.DefaultValue))
+
+ self.LibraryReport = None
+ if "LIBRARY" in ReportType:
+ self.LibraryReport = LibraryReport(M)
+
+ self.DepexReport = None
+ if "DEPEX" in ReportType:
+ self.DepexReport = DepexReport(M)
+
+ if "BUILD_FLAGS" in ReportType:
+ self.BuildFlagsReport = BuildFlagsReport(M)
+
+
+ ##
+ # Generate report for module information
+ #
+ # This function generates report for separate module expression
+ # in a platform build.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ # @param GlobalPcdReport The platform global PCD class object
+ # @param ReportType The kind of report items in the final report file
+ #
+ def GenerateReport(self, File, GlobalPcdReport, GlobalPredictionReport, ReportType):
+ FileWrite(File, gSectionStart)
+
+ FwReportFileName = os.path.join(self._BuildDir, "DEBUG", self.ModuleName + ".txt")
+ if os.path.isfile(FwReportFileName):
+ try:
+ FileContents = open(FwReportFileName).read()
+ Match = gModuleSizePattern.search(FileContents)
+ if Match:
+ self.Size = int(Match.group(1))
+
+ Match = gTimeStampPattern.search(FileContents)
+ if Match:
+ self.BuildTimeStamp = datetime.fromtimestamp(int(Match.group(1)))
+ except IOError:
+ EdkLogger.warn(None, "Fail to read report file", FwReportFileName)
+
+ FileWrite(File, "Module Summary")
+ FileWrite(File, "Module Name: %s" % self.ModuleName)
+ FileWrite(File, "Module INF Path: %s" % self.ModuleInfPath)
+ FileWrite(File, "File GUID: %s" % self.FileGuid)
+ if self.Size:
+ FileWrite(File, "Size: 0x%X (%.2fK)" % (self.Size, self.Size / 1024.0))
+ if self.BuildTimeStamp:
+ FileWrite(File, "Build Time Stamp: %s" % self.BuildTimeStamp)
+ if self.DriverType:
+ FileWrite(File, "Driver Type: %s" % self.DriverType)
+ if self.UefiSpecVersion:
+ FileWrite(File, "UEFI Spec Version: %s" % self.UefiSpecVersion)
+ if self.PiSpecVersion:
+ FileWrite(File, "PI Spec Version: %s" % self.PiSpecVersion)
+ if self.PciDeviceId:
+ FileWrite(File, "PCI Device ID: %s" % self.PciDeviceId)
+ if self.PciVendorId:
+ FileWrite(File, "PCI Vendor ID: %s" % self.PciVendorId)
+ if self.PciClassCode:
+ FileWrite(File, "PCI Class Code: %s" % self.PciClassCode)
+
+ FileWrite(File, gSectionSep)
+
+ if "PCD" in ReportType:
+ GlobalPcdReport.GenerateReport(File, self.ModulePcdSet)
+
+ if "LIBRARY" in ReportType:
+ self.LibraryReport.GenerateReport(File)
+
+ if "DEPEX" in ReportType:
+ self.DepexReport.GenerateReport(File)
+
+ if "BUILD_FLAGS" in ReportType:
+ self.BuildFlagsReport.GenerateReport(File)
+
+ if "FIXED_ADDRESS" in ReportType and self.FileGuid:
+ GlobalPredictionReport.GenerateReport(File, self.FileGuid)
+
+ FileWrite(File, gSectionEnd)
+
+##
+# Reports platform and module PCD information
+#
+# This class reports the platform PCD section and module PCD subsection
+# in the build report file.
+#
+class PcdReport(object):
+ ##
+ # Constructor function for class PcdReport
+ #
+ # This constructor function generates PcdReport object a platform build.
+ # It collects the whole PCD database from platform DSC files, platform
+ # flash description file and package DEC files.
+ #
+ # @param self The object pointer
+ # @param Wa Workspace context information
+ #
+ def __init__(self, Wa):
+ self.AllPcds = {}
+ self.MaxLen = 0
+ if Wa.FdfProfile:
+ self.FdfPcdSet = Wa.FdfProfile.PcdDict
+ else:
+ self.FdfPcdSet = {}
+
+ self.ModulePcdOverride = {}
+ for Pa in Wa.AutoGenObjectList:
+ #
+ # Collect all platform referenced PCDs and grouped them by PCD token space
+ # GUID C Names
+ #
+ for Pcd in Pa.AllPcdList:
+ PcdList = self.AllPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(Pcd.Type, [])
+ if Pcd not in PcdList:
+ PcdList.append(Pcd)
+ if len(Pcd.TokenCName) > self.MaxLen:
+ self.MaxLen = len(Pcd.TokenCName)
+
+ for Module in Pa.Platform.Modules.values():
+ #
+ # Collect module override PCDs
+ #
+ for ModulePcd in Module.M.ModulePcdList + Module.M.LibraryPcdList:
+ TokenCName = ModulePcd.TokenCName
+ TokenSpaceGuid = ModulePcd.TokenSpaceGuidCName
+ ModuleDefault = ModulePcd.DefaultValue
+ ModulePath = os.path.basename(Module.M.MetaFile.File)
+ self.ModulePcdOverride.setdefault((TokenCName, TokenSpaceGuid), {})[ModulePath] = ModuleDefault
+
+
+ #
+ # Collect PCD DEC default value.
+ #
+ self.DecPcdDefault = {}
+ for Package in Wa.BuildDatabase.WorkspaceDb.PackageList:
+ for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
+ DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
+ self.DecPcdDefault.setdefault((TokenCName, TokenSpaceGuidCName, DecType), DecDefaultValue)
+ #
+ # Collect PCDs defined in DSC common section
+ #
+ self.DscPcdDefault = {}
+ for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
+ for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
+ DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
+ self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
+
+ ##
+ # Generate report for PCD information
+ #
+ # This function generates report for separate module expression
+ # in a platform build.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ # @param ModulePcdSet Set of all PCDs referenced by module or None for
+ # platform PCD report
+ # @param DscOverridePcds Module DSC override PCDs set
+ #
+ def GenerateReport(self, File, ModulePcdSet):
+ if ModulePcdSet == None:
+ #
+ # For platform global PCD section
+ #
+ FileWrite(File, gSectionStart)
+ FileWrite(File, "Platform Configuration Database Report")
+ FileWrite(File, " *P - Platform scoped PCD override in DSC file")
+ FileWrite(File, " *F - Platform scoped PCD override in FDF file")
+ FileWrite(File, " *M - Module scoped PCD override in DSC file")
+ FileWrite(File, gSectionSep)
+ else:
+ #
+ # For module PCD sub-section
+ #
+ FileWrite(File, gSubSectionStart)
+ FileWrite(File, "PCD")
+ FileWrite(File, gSubSectionSep)
+
+ for Key in self.AllPcds:
+ #
+ # Group PCD by their token space GUID C Name
+ #
+ First = True
+ for Type in self.AllPcds[Key]:
+ #
+ # Group PCD by their usage type
+ #
+ TypeName, DecType = gPcdTypeMap.get(Type, ("", Type))
+ for Pcd in self.AllPcds[Key][Type]:
+ #
+ # Get PCD default value and their override relationship
+ #
+ DecDefaultValue = self.DecPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType))
+ DscDefaultValue = self.DscPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
+ DscDefaultValue = self.FdfPcdSet.get((Pcd.TokenCName, Key), DscDefaultValue)
+ InfDefaultValue = None
+
+ PcdValue = DecDefaultValue
+ if DscDefaultValue:
+ PcdValue = DscDefaultValue
+ if ModulePcdSet != None:
+ if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type) not in ModulePcdSet:
+ continue
+ InfDefault, PcdValue = ModulePcdSet[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type]
+ if InfDefault == "":
+ InfDefault = None
+ if First:
+ if ModulePcdSet == None:
+ FileWrite(File, "")
+ FileWrite(File, Key)
+ First = False
+
+
+ if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
+ PcdValueNumber = int(PcdValue.strip(), 0)
+ if DecDefaultValue == None:
+ DecMatch = True
+ else:
+ DecDefaultValueNumber = int(DecDefaultValue.strip(), 0)
+ DecMatch = (DecDefaultValueNumber == PcdValueNumber)
+
+ if InfDefaultValue == None:
+ InfMatch = True
+ else:
+ InfDefaultValueNumber = int(InfDefaultValue.strip(), 0)
+ InfMatch = (InfDefaultValueNumber == PcdValueNumber)
+
+ if DscDefaultValue == None:
+ DscMatch = True
+ else:
+ DscDefaultValueNumber = int(DscDefaultValue.strip(), 0)
+ DscMatch = (DscDefaultValueNumber == PcdValueNumber)
+ else:
+ if DecDefaultValue == None:
+ DecMatch = True
+ else:
+ DecMatch = (DecDefaultValue == PcdValue)
+
+ if InfDefaultValue == None:
+ InfMatch = True
+ else:
+ InfMatch = (InfDefaultValue == PcdValue)
+
+ if DscDefaultValue == None:
+ DscMatch = True
+ else:
+ DscMatch = (DscDefaultValue == PcdValue)
+
+ #
+ # Report PCD item according to their override relationship
+ #
+ if DecMatch and InfMatch:
+ FileWrite(File, ' %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
+ else:
+ if DscMatch:
+ if (Pcd.TokenCName, Key) in self.FdfPcdSet:
+ FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
+ else:
+ FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
+ else:
+ FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
+
+ if TypeName in ('DYNHII', 'DEXHII', 'DYNVPD', 'DEXVPD'):
+ for SkuInfo in Pcd.SkuInfoList.values():
+ if TypeName in ('DYNHII', 'DEXHII'):
+ FileWrite(File, '%*s: %s: %s' % (self.MaxLen + 4, SkuInfo.VariableGuid, SkuInfo.VariableName, SkuInfo.VariableOffset))
+ else:
+ FileWrite(File, '%*s' % (self.MaxLen + 4, SkuInfo.VpdOffset))
+
+ if not DscMatch and DscDefaultValue != None:
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DSC DEFAULT', DscDefaultValue))
+
+ if not InfMatch and InfDefaultValue != None:
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'INF DEFAULT', InfDefaultValue))
+
+ if not DecMatch and DecDefaultValue != None:
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', DecDefaultValue))
+
+ if ModulePcdSet == None:
+ ModuleOverride = self.ModulePcdOverride.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName), {})
+ for ModulePath in ModuleOverride:
+ ModuleDefault = ModuleOverride[ModulePath]
+ if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
+ ModulePcdDefaultValueNumber = int(ModuleDefault.strip(), 0)
+ Match = (ModulePcdDefaultValueNumber == PcdValueNumber)
+ else:
+ Match = (ModuleDefault == PcdValue)
+ if Match:
+ continue
+ FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, ModuleDefault))
+
+ if ModulePcdSet == None:
+ FileWrite(File, gSectionEnd)
+ else:
+ FileWrite(File, gSubSectionEnd)
+
+
+
+##
+# Reports platform and module Prediction information
+#
+# This class reports the platform execution order prediction section and
+# module load fixed address prediction subsection in the build report file.
+#
+class PredictionReport(object):
+ ##
+ # Constructor function for class PredictionReport
+ #
+ # This constructor function generates PredictionReport object for the platform.
+ #
+ # @param self: The object pointer
+ # @param Wa Workspace context information
+ #
+ def __init__(self, Wa):
+ self._MapFileName = os.path.join(Wa.BuildDir, Wa.Name + ".map")
+ self._MapFileParsed = False
+ self._EotToolInvoked = False
+ self._FvDir = Wa.FvDir
+ self._EotDir = Wa.BuildDir
+ self._FfsEntryPoint = {}
+ self._GuidMap = {}
+ self._SourceList = []
+ self.FixedMapDict = {}
+ self.ItemList = []
+ self.MaxLen = 0
+
+ #
+ # Collect all platform reference source files and GUID C Name
+ #
+ for Pa in Wa.AutoGenObjectList:
+ for Module in Pa.LibraryAutoGenList + Pa.ModuleAutoGenList:
+ #
+ # Add module referenced source files
+ #
+ self._SourceList.append(str(Module))
+ IncludeList = {}
+ for Source in Module.SourceFileList:
+ if os.path.splitext(str(Source))[1].lower() == ".c":
+ self._SourceList.append(" " + str(Source))
+ FindIncludeFiles(Source.Path, Module.IncludePathList, IncludeList)
+ for IncludeFile in IncludeList.values():
+ self._SourceList.append(" " + IncludeFile)
+
+ for Guid in Module.PpiList:
+ self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.PpiList[Guid])
+ for Guid in Module.ProtocolList:
+ self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.ProtocolList[Guid])
+ for Guid in Module.GuidList:
+ self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.GuidList[Guid])
+
+ if Module.Guid and not Module.IsLibrary:
+ EntryPoint = " ".join(Module.Module.ModuleEntryPointList)
+ if int(str(Module.AutoGenVersion), 0) >= 0x00010005:
+ RealEntryPoint = "_ModuleEntryPoint"
+ else:
+ RealEntryPoint = EntryPoint
+ if EntryPoint == "_ModuleEntryPoint":
+ CCFlags = Module.BuildOption.get("CC", {}).get("FLAGS", "")
+ Match = gGlueLibEntryPoint.search(CCFlags)
+ if Match:
+ EntryPoint = Match.group(1)
+
+ self._FfsEntryPoint[Module.Guid.upper()] = (EntryPoint, RealEntryPoint)
+
+
+ #
+ # Collect platform firmware volume list as the input of EOT.
+ #
+ self._FvList = []
+ if Wa.FdfProfile:
+ for Fd in Wa.FdfProfile.FdDict:
+ for FdRegion in Wa.FdfProfile.FdDict[Fd].RegionList:
+ if FdRegion.RegionType != "FV":
+ continue
+ for FvName in FdRegion.RegionDataList:
+ if FvName in self._FvList:
+ continue
+ self._FvList.append(FvName)
+ for Ffs in Wa.FdfProfile.FvDict[FvName.upper()].FfsList:
+ for Section in Ffs.SectionList:
+ try:
+ for FvSection in Section.SectionList:
+ if FvSection.FvName in self._FvList:
+ continue
+ self._FvList.append(FvSection.FvName)
+ except AttributeError:
+ pass
+
+
+ ##
+ # Parse platform fixed address map files
+ #
+ # This function parses the platform final fixed address map file to get
+ # the database of predicted fixed address for module image base, entry point
+ # etc.
+ #
+ # @param self: The object pointer
+ #
+ def _ParseMapFile(self):
+ if self._MapFileParsed:
+ return
+ self._MapFileParsed = True
+ if os.path.isfile(self._MapFileName):
+ try:
+ FileContents = open(self._MapFileName).read()
+ for Match in gMapFileItemPattern.finditer(FileContents):
+ AddressType = Match.group(1)
+ BaseAddress = Match.group(2)
+ EntryPoint = Match.group(3)
+ Guid = Match.group(4).upper()
+ List = self.FixedMapDict.setdefault(Guid, [])
+ List.append((AddressType, BaseAddress, "*I"))
+ List.append((AddressType, EntryPoint, "*E"))
+ except:
+ EdkLogger.warn(None, "Cannot open file to read", self._MapFileName)
+
+ ##
+ # Invokes EOT tool to get the predicted the execution order.
+ #
+ # This function invokes EOT tool to calculate the predicted dispatch order
+ #
+ # @param self: The object pointer
+ #
+ def _InvokeEotTool(self):
+ if self._EotToolInvoked:
+ return
+
+ self._EotToolInvoked = True
+ FvFileList = []
+ for FvName in self._FvList:
+ FvFile = os.path.join(self._FvDir, FvName + ".Fv")
+ if os.path.isfile(FvFile):
+ FvFileList.append(FvFile)
+
+ if len(FvFileList) == 0:
+ return
+ #
+ # Write source file list and GUID file list to an intermediate file
+ # as the input for EOT tool and dispatch List as the output file
+ # from EOT tool.
+ #
+ SourceList = os.path.join(self._EotDir, "SourceFile.txt")
+ GuidList = os.path.join(self._EotDir, "GuidList.txt")
+ DispatchList = os.path.join(self._EotDir, "Dispatch.txt")
+
+ TempFile = open(SourceList, "w+")
+ for Item in self._SourceList:
+ FileWrite(TempFile, Item)
+ TempFile.close()
+ TempFile = open(GuidList, "w+")
+ for Key in self._GuidMap:
+ FileWrite(TempFile, "%s %s" % (Key, self._GuidMap[Key]))
+ TempFile.close()
+
+ try:
+ from Eot.Eot import Eot
+ #
+ # Invoke EOT tool
+ #
+ Eot(CommandLineOption=False, SourceFileList=SourceList, GuidList=GuidList,
+ FvFileList=' '.join(FvFileList), Dispatch=DispatchList, IsInit=True)
+
+ #
+ # Parse the output of EOT tool
+ #
+ for Line in open(DispatchList):
+ if len(Line.split()) < 4:
+ continue
+ (Guid, Phase, FfsName, FilePath) = Line.split()
+ Symbol = self._FfsEntryPoint.get(Guid, [FfsName, ""])[0]
+ if len(Symbol) > self.MaxLen:
+ self.MaxLen = len(Symbol)
+ self.ItemList.append((Phase, Symbol, FilePath))
+ except:
+ EdkLogger.quiet("(Python %s on %s\n%s)" % (platform.python_version(), sys.platform, traceback.format_exc()))
+ EdkLogger.warn(None, "Failed to generate execution order prediction report, for some error occurred in executing EOT.")
+
+
+ ##
+ # Generate platform execution order report
+ #
+ # This function generates the predicted module execution order.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ #
+ def _GenerateExecutionOrderReport(self, File):
+ self._InvokeEotTool()
+ if len(self.ItemList) == 0:
+ return
+ FileWrite(File, gSectionStart)
+ FileWrite(File, "Execution Order Prediction")
+ FileWrite(File, "*P PEI phase")
+ FileWrite(File, "*D DXE phase")
+ FileWrite(File, "*E Module INF entry point name")
+ FileWrite(File, "*N Module notification function name")
+
+ FileWrite(File, "Type %-*s %s" % (self.MaxLen, "Symbol", "Module INF Path"))
+ FileWrite(File, gSectionSep)
+ for Item in self.ItemList:
+ FileWrite(File, "*%sE %-*s %s" % (Item[0], self.MaxLen, Item[1], Item[2]))
+
+ FileWrite(File, gSectionStart)
+
+ ##
+ # Generate Fixed Address report.
+ #
+ # This function generate the predicted fixed address report for a module
+ # specified by Guid.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ # @param Guid The module Guid value.
+ # @param NotifyList The list of all notify function in a module
+ #
+ def _GenerateFixedAddressReport(self, File, Guid, NotifyList):
+ self._ParseMapFile()
+ FixedAddressList = self.FixedMapDict.get(Guid)
+ if not FixedAddressList:
+ return
+
+ FileWrite(File, gSubSectionStart)
+ FileWrite(File, "Fixed Address Prediction")
+ FileWrite(File, "*I Image Loading Address")
+ FileWrite(File, "*E Entry Point Address")
+ FileWrite(File, "*N Notification Function Address")
+ FileWrite(File, "*F Flash Address")
+ FileWrite(File, "*M Memory Address")
+ FileWrite(File, "*S SMM RAM Offset")
+ FileWrite(File, "TOM Top of Memory")
+
+ FileWrite(File, "Type Address Name")
+ FileWrite(File, gSubSectionSep)
+ for Item in FixedAddressList:
+ Type = Item[0]
+ Value = Item[1]
+ Symbol = Item[2]
+ if Symbol == "*I":
+ Name = "(Image Base)"
+ elif Symbol == "*E":
+ Name = self._FfsEntryPoint.get(Guid, ["", "_ModuleEntryPoint"])[1]
+ elif Symbol in NotifyList:
+ Name = Symbol
+ Symbol = "*N"
+ else:
+ continue
+
+ if "Flash" in Type:
+ Symbol += "F"
+ elif "Memory" in Type:
+ Symbol += "M"
+ else:
+ Symbol += "S"
+
+ if Value[0] == "-":
+ Value = "TOM" + Value
+
+ FileWrite(File, "%s %-16s %s" % (Symbol, Value, Name))
+
+ ##
+ # Generate report for the prediction part
+ #
+ # This function generate the predicted fixed address report for a module or
+ # predicted module execution order for a platform.
+ # If the input Guid is None, then, it generates the predicted module execution order;
+ # otherwise it generated the module fixed loading address for the module specified by
+ # Guid.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ # @param Guid The module Guid value.
+ #
+ def GenerateReport(self, File, Guid):
+ if Guid:
+ self._GenerateFixedAddressReport(File, Guid.upper(), [])
+ else:
+ self._GenerateExecutionOrderReport(File)
+
+##
+# Reports FD region information
+#
+# This class reports the FD subsection in the build report file.
+# It collects region information of platform flash device.
+# If the region is a firmware volume, it lists the set of modules
+# and its space information; otherwise, it only lists its region name,
+# base address and size in its sub-section header.
+# If there are nesting FVs, the nested FVs will list immediate after
+# this FD region subsection
+#
+class FdRegionReport(object):
+ ##
+ # Discover all the nested FV name list.
+ #
+ # This is an internal worker function to discover the all the nested FV information
+ # in the parent firmware volume. It uses deep first search algorithm recursively to
+ # find all the FV list name and append them to the list.
+ #
+ # @param self The object pointer
+ # @param FvName The name of current firmware file system
+ # @param Wa Workspace context information
+ #
+ def _DiscoverNestedFvList(self, FvName, Wa):
+ for Ffs in Wa.FdfProfile.FvDict[FvName.upper()].FfsList:
+ for Section in Ffs.SectionList:
+ try:
+ for FvSection in Section.SectionList:
+ if FvSection.FvName in self.FvList:
+ continue
+ self._GuidsDb[Ffs.NameGuid.upper()] = FvSection.FvName
+ self.FvList.append(FvSection.FvName)
+ self.FvInfo[FvSection.FvName] = ("Nested FV", 0, 0)
+ self._DiscoverNestedFvList(FvSection.FvName, Wa)
+ except AttributeError:
+ pass
+
+ ##
+ # Constructor function for class FdRegionReport
+ #
+ # This constructor function generates FdRegionReport object for a specified FdRegion.
+ # If the FdRegion is a firmware volume, it will recursively find all its nested Firmware
+ # volume list. This function also collects GUID map in order to dump module identification
+ # in the final report.
+ #
+ # @param self: The object pointer
+ # @param FdRegion The current FdRegion object
+ # @param Wa Workspace context information
+ #
+ def __init__(self, FdRegion, Wa):
+ self.Type = FdRegion.RegionType
+ self.BaseAddress = FdRegion.Offset
+ self.Size = FdRegion.Size
+ self.FvList = []
+ self.FvInfo = {}
+ self._GuidsDb = {}
+ self._FvDir = Wa.FvDir
+
+ #
+ # If the input FdRegion is not a firmware volume,
+ # we are done.
+ #
+ if self.Type != "FV":
+ return
+
+ #
+ # Find all nested FVs in the FdRegion
+ #
+ for FvName in FdRegion.RegionDataList:
+ if FvName in self.FvList:
+ continue
+ self.FvList.append(FvName)
+ self.FvInfo[FvName] = ("Fd Region", self.BaseAddress, self.Size)
+ self._DiscoverNestedFvList(FvName, Wa)
+
+ PlatformPcds = {}
+
+ #
+ # Collect PCDs declared in DEC files.
+ #
+ for Package in Wa.BuildDatabase.WorkspaceDb.PackageList:
+ for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
+ DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
+ PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DecDefaultValue
+ #
+ # Collect PCDs defined in DSC common section
+ #
+ for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
+ for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
+ DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
+ PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
+
+ #
+ # Add PEI and DXE a priori files GUIDs defined in PI specification.
+ #
+ self._GuidsDb["1B45CC0A-156A-428A-AF62-49864DA0E6E6"] = "PEI Apriori"
+ self._GuidsDb["FC510EE7-FFDC-11D4-BD41-0080C73C8881"] = "DXE Apriori"
+ #
+ # Add ACPI table storage file
+ #
+ self._GuidsDb["7E374E25-8E01-4FEE-87F2-390C23C606CD"] = "ACPI table storage"
+
+ for Pa in Wa.AutoGenObjectList:
+ for ModuleKey in Pa.Platform.Modules:
+ M = Pa.Platform.Modules[ModuleKey].M
+ InfPath = os.path.join(Wa.WorkspaceDir, M.MetaFile.File)
+ self._GuidsDb[M.Guid.upper()] = "%s (%s)" % (M.Module.BaseName, InfPath)
+
+ #
+ # Collect the GUID map in the FV firmware volume
+ #
+ for FvName in self.FvList:
+ for Ffs in Wa.FdfProfile.FvDict[FvName.upper()].FfsList:
+ try:
+ #
+ # collect GUID map for binary EFI file in FDF file.
+ #
+ Guid = Ffs.NameGuid.upper()
+ Match = gPcdGuidPattern.match(Ffs.NameGuid)
+ if Match:
+ PcdTokenspace = Match.group(1)
+ PcdToken = Match.group(2)
+ if (PcdToken, PcdTokenspace) in PlatformPcds:
+ GuidValue = PlatformPcds[(PcdToken, PcdTokenspace)]
+ Guid = GuidStructureByteArrayToGuidString(GuidValue).upper()
+ for Section in Ffs.SectionList:
+ try:
+ ModuleSectFile = os.path.join(Wa.WorkspaceDir, Section.SectFileName)
+ self._GuidsDb[Guid] = ModuleSectFile
+ except AttributeError:
+ pass
+ except AttributeError:
+ pass
+
+
+ ##
+ # Internal worker function to generate report for the FD region
+ #
+ # This internal worker function to generate report for the FD region.
+ # It the type is firmware volume, it lists offset and module identification.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ # @param Title The title for the FD subsection
+ # @param BaseAddress The base address for the FD region
+ # @param Size The size of the FD region
+ # @param FvName The FV name if the FD region is a firmware volume
+ #
+ def _GenerateReport(self, File, Title, Type, BaseAddress, Size=0, FvName=None):
+ FileWrite(File, gSubSectionStart)
+ FileWrite(File, Title)
+ FileWrite(File, "Type: %s" % Type)
+ FileWrite(File, "Base Address: 0x%X" % BaseAddress)
+
+ if self.Type == "FV":
+ FvTotalSize = 0
+ FvTakenSize = 0
+ FvFreeSize = 0
+ FvReportFileName = os.path.join(self._FvDir, FvName + ".fv.txt")
+ try:
+ #
+ # Collect size info in the firmware volume.
+ #
+ FvReport = open(FvReportFileName).read()
+ Match = gFvTotalSizePattern.search(FvReport)
+ if Match:
+ FvTotalSize = int(Match.group(1), 16)
+ Match = gFvTakenSizePattern.search(FvReport)
+ if Match:
+ FvTakenSize = int(Match.group(1), 16)
+ FvFreeSize = FvTotalSize - FvTakenSize
+ #
+ # Write size information to the report file.
+ #
+ FileWrite(File, "Size: 0x%X (%.0fK)" % (FvTotalSize, FvTotalSize / 1024.0))
+ FileWrite(File, "Fv Name: %s (%.1f%% Full)" % (FvName, FvTakenSize * 100.0 / FvTotalSize))
+ FileWrite(File, "Occupied Size: 0x%X (%.0fK)" % (FvTakenSize, FvTakenSize / 1024.0))
+ FileWrite(File, "Free Size: 0x%X (%.0fK)" % (FvFreeSize, FvFreeSize / 1024.0))
+ FileWrite(File, "Offset Module")
+ FileWrite(File, gSubSectionSep)
+ #
+ # Write module offset and module identification to the report file.
+ #
+ OffsetInfo = {}
+ for Match in gOffsetGuidPattern.finditer(FvReport):
+ Guid = Match.group(2).upper()
+ OffsetInfo[Match.group(1)] = self._GuidsDb.get(Guid, Guid)
+ OffsetList = OffsetInfo.keys()
+ OffsetList.sort()
+ for Offset in OffsetList:
+ FileWrite (File, "%s %s" % (Offset, OffsetInfo[Offset]))
+ except IOError:
+ EdkLogger.warn(None, "Fail to read report file", FvReportFileName)
+ else:
+ FileWrite(File, "Size: 0x%X (%.0fK)" % (Size, Size / 1024.0))
+ FileWrite(File, gSubSectionEnd)
+
+ ##
+ # Generate report for the FD region
+ #
+ # This function generates report for the FD region.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ #
+ def GenerateReport(self, File):
+ if (len(self.FvList) > 0):
+ for FvItem in self.FvList:
+ Info = self.FvInfo[FvItem]
+ self._GenerateReport(File, Info[0], "FV", Info[1], Info[2], FvItem)
+ else:
+ self._GenerateReport(File, "FD Region", self.Type, self.BaseAddress, self.Size)
+
+##
+# Reports FD information
+#
+# This class reports the FD section in the build report file.
+# It collects flash device information for a platform.
+#
+class FdReport(object):
+ ##
+ # Constructor function for class FdReport
+ #
+ # This constructor function generates FdReport object for a specified
+ # firmware device.
+ #
+ # @param self The object pointer
+ # @param Fd The current Firmware device object
+ # @param Wa Workspace context information
+ #
+ def __init__(self, Fd, Wa):
+ self.FdName = Fd.FdUiName
+ self.BaseAddress = Fd.BaseAddress
+ self.Size = Fd.Size
+ self.FdRegionList = [FdRegionReport(FdRegion, Wa) for FdRegion in Fd.RegionList]
+
+ ##
+ # Generate report for the firmware device.
+ #
+ # This function generates report for the firmware device.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ #
+ def GenerateReport(self, File):
+ FileWrite(File, gSectionStart)
+ FileWrite(File, "Firmware Device (FD)")
+ FileWrite(File, "FD Name: %s" % self.FdName)
+ FileWrite(File, "Base Address: %s" % self.BaseAddress)
+ FileWrite(File, "Size: 0x%X (%.0fK)" % (self.Size, self.Size / 1024.0))
+ if len(self.FdRegionList) > 0:
+ FileWrite(File, gSectionSep)
+ for FdRegionItem in self.FdRegionList:
+ FdRegionItem.GenerateReport(File)
+
+ FileWrite(File, gSectionEnd)
+
+
+
+##
+# Reports platform information
+#
+# This class reports the whole platform information
+#
+class PlatformReport(object):
+ ##
+ # Constructor function for class PlatformReport
+ #
+ # This constructor function generates PlatformReport object a platform build.
+ # It generates report for platform summary, flash, global PCDs and detailed
+ # module information for modules involved in platform build.
+ #
+ # @param self The object pointer
+ # @param Wa Workspace context information
+ #
+ def __init__(self, Wa, ReportType):
+ self._WorkspaceDir = Wa.WorkspaceDir
+ self.PlatformName = Wa.Name
+ self.PlatformDscPath = Wa.Platform
+ self.Architectures = " ".join(Wa.ArchList)
+ self.ToolChain = Wa.ToolChain
+ self.Target = Wa.BuildTarget
+ self.OutputPath = os.path.join(Wa.WorkspaceDir, Wa.OutputDir)
+ self.BuildEnvironment = platform.platform()
+
+ self.PcdReport = None
+ if "PCD" in ReportType:
+ self.PcdReport = PcdReport(Wa)
+
+ self.FdReportList = []
+ if "FLASH" in ReportType and Wa.FdfProfile:
+ for Fd in Wa.FdfProfile.FdDict:
+ self.FdReportList.append(FdReport(Wa.FdfProfile.FdDict[Fd], Wa))
+
+ self.PredictionReport = None
+ if "FIXED_ADDRESS" in ReportType or "EXECUTION_ORDER" in ReportType:
+ self.PredictionReport = PredictionReport(Wa)
+
+ self.ModuleReportList = []
+ for Pa in Wa.AutoGenObjectList:
+ for ModuleKey in Pa.Platform.Modules:
+ self.ModuleReportList.append(ModuleReport(Pa.Platform.Modules[ModuleKey].M, ReportType))
+
+
+
+ ##
+ # Generate report for the whole platform.
+ #
+ # This function generates report for platform information.
+ # It comprises of platform summary, global PCD, flash and
+ # module list sections.
+ #
+ # @param self The object pointer
+ # @param File The file object for report
+ # @param BuildDuration The total time to build the modules
+ # @param ReportType The kind of report items in the final report file
+ #
+ def GenerateReport(self, File, BuildDuration, ReportType):
+ FileWrite(File, "Platform Summary")
+ FileWrite(File, "Platform Name: %s" % self.PlatformName)
+ FileWrite(File, "Platform DSC Path: %s" % self.PlatformDscPath)
+ FileWrite(File, "Architectures: %s" % self.Architectures)
+ FileWrite(File, "Tool Chain: %s" % self.ToolChain)
+ FileWrite(File, "Target: %s" % self.Target)
+ FileWrite(File, "Output Path: %s" % self.OutputPath)
+ FileWrite(File, "Build Environment: %s" % self.BuildEnvironment)
+ FileWrite(File, "Build Duration: %s" % BuildDuration)
+ FileWrite(File, "Report Content: %s" % ", ".join(ReportType))
+
+ if "PCD" in ReportType:
+ self.PcdReport.GenerateReport(File, None)
+
+ if "FLASH" in ReportType:
+ for FdReportListItem in self.FdReportList:
+ FdReportListItem.GenerateReport(File)
+
+ for ModuleReportItem in self.ModuleReportList:
+ ModuleReportItem.GenerateReport(File, self.PcdReport, self.PredictionReport, ReportType)
+
+ if "EXECUTION_ORDER" in ReportType:
+ self.PredictionReport.GenerateReport(File, None)
+
+## BuildReport class
+#
+# This base class contain the routines to collect data and then
+# applies certain format to the output report
+#
+class BuildReport(object):
+ ##
+ # Constructor function for class BuildReport
+ #
+ # This constructor function generates BuildReport object a platform build.
+ # It generates report for platform summary, flash, global PCDs and detailed
+ # module information for modules involved in platform build.
+ #
+ # @param self The object pointer
+ # @param ReportFile The file name to save report file
+ # @param ReportType The kind of report items in the final report file
+ #
+ def __init__(self, ReportFile, ReportType):
+ self.ReportFile = ReportFile
+ if ReportFile:
+ self.ReportList = []
+ self.ReportType = []
+ if ReportType:
+ for ReportTypeItem in ReportType:
+ if ReportTypeItem not in self.ReportType:
+ self.ReportType.append(ReportTypeItem)
+ else:
+ self.ReportType = ["PCD", "LIBRARY", "BUILD_FLAGS", "DEPEX", "FLASH", "FIXED_ADDRESS"]
+ ##
+ # Adds platform report to the list
+ #
+ # This function adds a platform report to the final report list.
+ #
+ # @param self The object pointer
+ # @param Wa Workspace context information
+ #
+ def AddPlatformReport(self, Wa):
+ if self.ReportFile:
+ self.ReportList.append(Wa)
+
+ ##
+ # Generates the final report.
+ #
+ # This function generates platform build report. It invokes GenerateReport()
+ # method for every platform report in the list.
+ #
+ # @param self The object pointer
+ # @param BuildDuration The total time to build the modules
+ #
+ def GenerateReport(self, BuildDuration):
+ if self.ReportFile:
+ try:
+ File = open(self.ReportFile, "w+")
+ except IOError:
+ EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)
+ try:
+ for Wa in self.ReportList:
+ PlatformReport(Wa, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)
+ EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
+ except IOError:
+ EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
+ except:
+ EdkLogger.error("BuildReport", CODE_ERROR, "Unknown fatal error when generating build report", ExtraData=self.ReportFile, RaiseError=False)
+ EdkLogger.quiet("(Python %s on %s\n%s)" % (platform.python_version(), sys.platform, traceback.format_exc()))
+ File.close()
+
+# This acts like the main() function for the script, unless it is 'import'ed into another script.
+if __name__ == '__main__':
+ pass
+
diff --git a/BaseTools/Source/Python/build/__init__.py b/BaseTools/Source/Python/build/__init__.py
index e69de29bb2..1c7f31a8bc 100644
--- a/BaseTools/Source/Python/build/__init__.py
+++ b/BaseTools/Source/Python/build/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'build' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 624d941b0f..9705097606 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1,1447 +1,1873 @@
-## @file
-# build a platform or a module
-#
-# Copyright (c) 2007, Intel Corporation
-#
-# All rights reserved. This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-import re
-import sys
-import glob
-import time
-import platform
-import traceback
-
-from threading import *
-from optparse import OptionParser
-from subprocess import *
-from Common import Misc as Utils
-
-from Common.TargetTxtClassObject import *
-from Common.ToolDefClassObject import *
-from Common.DataType import *
-from AutoGen.AutoGen import *
-from Common.BuildToolError import *
-from Workspace.WorkspaceDatabase import *
-
-import Common.EdkLogger
-import Common.GlobalData as GlobalData
-
-# Version and Copyright
-VersionNumber = "0.5"
-__version__ = "%prog Version " + VersionNumber
-__copyright__ = "Copyright (c) 2007, Intel Corporation All rights reserved."
-
-## standard targets of build command
-gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run']
-
-## build configuration file
-gBuildConfiguration = "Conf/target.txt"
-gBuildCacheDir = "Conf/.cache"
-gToolsDefinition = "Conf/tools_def.txt"
-
-## Check environment PATH variable to make sure the specified tool is found
-#
-# If the tool is found in the PATH, then True is returned
-# Otherwise, False is returned
-#
-def IsToolInPath(tool):
- if os.environ.has_key('PATHEXT'):
- extns = os.environ['PATHEXT'].split(os.path.pathsep)
- else:
- extns = ('',)
- for pathDir in os.environ['PATH'].split(os.path.pathsep):
- for ext in extns:
- if os.path.exists(os.path.join(pathDir, tool + ext)):
- return True
- return False
-
-## Check environment variables
-#
-# Check environment variables that must be set for build. Currently they are
-#
-# WORKSPACE The directory all packages/platforms start from
-# EDK_TOOLS_PATH The directory contains all tools needed by the build
-# PATH $(EDK_TOOLS_PATH)/Bin/<sys> must be set in PATH
-#
-# If any of above environment variable is not set or has error, the build
-# will be broken.
-#
-def CheckEnvVariable():
- # check WORKSPACE
- if "WORKSPACE" not in os.environ:
- EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
- ExtraData="WORKSPACE")
-
- WorkspaceDir = os.path.normcase(os.path.normpath(os.environ["WORKSPACE"]))
- if not os.path.exists(WorkspaceDir):
- EdkLogger.error("build", FILE_NOT_FOUND, "WORKSPACE doesn't exist", ExtraData="%s" % WorkspaceDir)
- elif ' ' in WorkspaceDir:
- EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in WORKSPACE path",
- ExtraData=WorkspaceDir)
- os.environ["WORKSPACE"] = WorkspaceDir
-
- #
- # Check EFI_SOURCE (R8 build convention). EDK_SOURCE will always point to ECP
- #
- os.environ["ECP_SOURCE"] = os.path.join(WorkspaceDir, GlobalData.gEdkCompatibilityPkg)
- if "EFI_SOURCE" not in os.environ:
- os.environ["EFI_SOURCE"] = os.environ["ECP_SOURCE"]
- if "EDK_SOURCE" not in os.environ:
- os.environ["EDK_SOURCE"] = os.environ["ECP_SOURCE"]
-
- #
- # Unify case of characters on case-insensitive systems
- #
- EfiSourceDir = os.path.normcase(os.path.normpath(os.environ["EFI_SOURCE"]))
- EdkSourceDir = os.path.normcase(os.path.normpath(os.environ["EDK_SOURCE"]))
- EcpSourceDir = os.path.normcase(os.path.normpath(os.environ["ECP_SOURCE"]))
-
- os.environ["EFI_SOURCE"] = EfiSourceDir
- os.environ["EDK_SOURCE"] = EdkSourceDir
- os.environ["ECP_SOURCE"] = EcpSourceDir
- os.environ["EDK_TOOLS_PATH"] = os.path.normcase(os.environ["EDK_TOOLS_PATH"])
-
- if not os.path.exists(EcpSourceDir):
- EdkLogger.verbose("ECP_SOURCE = %s doesn't exist. R8 modules could not be built." % EcpSourceDir)
- elif ' ' in EcpSourceDir:
- EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in ECP_SOURCE path",
- ExtraData=EcpSourceDir)
- if not os.path.exists(EdkSourceDir):
- if EdkSourceDir == EcpSourceDir:
- EdkLogger.verbose("EDK_SOURCE = %s doesn't exist. R8 modules could not be built." % EdkSourceDir)
- else:
- EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE does not exist",
- ExtraData=EdkSourceDir)
- elif ' ' in EdkSourceDir:
- EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in EDK_SOURCE path",
- ExtraData=EdkSourceDir)
- if not os.path.exists(EfiSourceDir):
- if EfiSourceDir == EcpSourceDir:
- EdkLogger.verbose("EFI_SOURCE = %s doesn't exist. R8 modules could not be built." % EfiSourceDir)
- else:
- EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE does not exist",
- ExtraData=EfiSourceDir)
- elif ' ' in EfiSourceDir:
- EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in EFI_SOURCE path",
- ExtraData=EfiSourceDir)
-
- # change absolute path to relative path to WORKSPACE
- if EfiSourceDir.upper().find(WorkspaceDir.upper()) != 0:
- EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE is not under WORKSPACE",
- ExtraData="WORKSPACE = %s\n EFI_SOURCE = %s" % (WorkspaceDir, EfiSourceDir))
- if EdkSourceDir.upper().find(WorkspaceDir.upper()) != 0:
- EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE is not under WORKSPACE",
- ExtraData="WORKSPACE = %s\n EDK_SOURCE = %s" % (WorkspaceDir, EdkSourceDir))
- if EcpSourceDir.upper().find(WorkspaceDir.upper()) != 0:
- EdkLogger.error("build", PARAMETER_INVALID, "ECP_SOURCE is not under WORKSPACE",
- ExtraData="WORKSPACE = %s\n ECP_SOURCE = %s" % (WorkspaceDir, EcpSourceDir))
-
- # check EDK_TOOLS_PATH
- if "EDK_TOOLS_PATH" not in os.environ:
- EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
- ExtraData="EDK_TOOLS_PATH")
-
- # check PATH
- if "PATH" not in os.environ:
- EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
- ExtraData="PATH")
-
- GlobalData.gWorkspace = WorkspaceDir
- GlobalData.gEfiSource = EfiSourceDir
- GlobalData.gEdkSource = EdkSourceDir
- GlobalData.gEcpSource = EcpSourceDir
-
-## Get normalized file path
-#
-# Convert the path to be local format, and remove the WORKSPACE path at the
-# beginning if the file path is given in full path.
-#
-# @param FilePath File path to be normalized
-# @param Workspace Workspace path which the FilePath will be checked against
-#
-# @retval string The normalized file path
-#
-def NormFile(FilePath, Workspace):
- # check if the path is absolute or relative
- if os.path.isabs(FilePath):
- FileFullPath = os.path.normpath(FilePath)
- else:
- FileFullPath = os.path.normpath(os.path.join(Workspace, FilePath))
-
- # check if the file path exists or not
- if not os.path.isfile(FileFullPath):
- EdkLogger.error("build", FILE_NOT_FOUND, ExtraData="\t%s (Please give file in absolute path or relative to WORKSPACE)" % FileFullPath)
-
- # remove workspace directory from the beginning part of the file path
- if Workspace[-1] in ["\\", "/"]:
- return FileFullPath[len(Workspace):]
- else:
- return FileFullPath[(len(Workspace) + 1):]
-
-## Get the output of an external program
-#
-# This is the entrance method of thread reading output of an external program and
-# putting them in STDOUT/STDERR of current program.
-#
-# @param From The stream message read from
-# @param To The stream message put on
-# @param ExitFlag The flag used to indicate stopping reading
-#
-def ReadMessage(From, To, ExitFlag):
- while True:
- # read one line a time
- Line = From.readline()
- # empty string means "end"
- if Line != None and Line != "":
- To(Line.rstrip())
- else:
- break
- if ExitFlag.isSet():
- break
-
-## Launch an external program
-#
-# This method will call subprocess.Popen to execute an external program with
-# given options in specified directory. Because of the dead-lock issue during
-# redirecting output of the external program, threads are used to to do the
-# redirection work.
-#
-# @param Command A list or string containing the call of the program
-# @param WorkingDir The directory in which the program will be running
-#
-def LaunchCommand(Command, WorkingDir):
- # if working directory doesn't exist, Popen() will raise an exception
- if not os.path.isdir(WorkingDir):
- EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=WorkingDir)
-
- Proc = None
- EndOfProcedure = None
- try:
- # launch the command
- Proc = Popen(Command, stdout=PIPE, stderr=PIPE, env=os.environ, cwd=WorkingDir, bufsize=-1)
-
- # launch two threads to read the STDOUT and STDERR
- EndOfProcedure = Event()
- EndOfProcedure.clear()
- if Proc.stdout:
- StdOutThread = Thread(target=ReadMessage, args=(Proc.stdout, EdkLogger.info, EndOfProcedure))
- StdOutThread.setName("STDOUT-Redirector")
- StdOutThread.setDaemon(False)
- StdOutThread.start()
-
- if Proc.stderr:
- StdErrThread = Thread(target=ReadMessage, args=(Proc.stderr, EdkLogger.quiet, EndOfProcedure))
- StdErrThread.setName("STDERR-Redirector")
- StdErrThread.setDaemon(False)
- StdErrThread.start()
-
- # waiting for program exit
- Proc.wait()
- except: # in case of aborting
- # terminate the threads redirecting the program output
- if EndOfProcedure != None:
- EndOfProcedure.set()
- if Proc == None:
- if type(Command) != type(""):
- Command = " ".join(Command)
- EdkLogger.error("build", COMMAND_FAILURE, "Failed to start command", ExtraData="%s [%s]" % (Command, WorkingDir))
-
- if Proc.stdout:
- StdOutThread.join()
- if Proc.stderr:
- StdErrThread.join()
-
- # check the return code of the program
- if Proc.returncode != 0:
- if type(Command) != type(""):
- Command = " ".join(Command)
- EdkLogger.error("build", COMMAND_FAILURE, ExtraData="%s [%s]" % (Command, WorkingDir))
-
-## The smallest unit that can be built in multi-thread build mode
-#
-# This is the base class of build unit. The "Obj" parameter must provide
-# __str__(), __eq__() and __hash__() methods. Otherwise there could be build units
-# missing build.
-#
-# Currently the "Obj" should be only ModuleAutoGen or PlatformAutoGen objects.
-#
-class BuildUnit:
- ## The constructor
- #
- # @param self The object pointer
- # @param Obj The object the build is working on
- # @param Target The build target name, one of gSupportedTarget
- # @param Dependency The BuildUnit(s) which must be completed in advance
- # @param WorkingDir The directory build command starts in
- #
- def __init__(self, Obj, BuildCommand, Target, Dependency, WorkingDir="."):
- self.BuildObject = Obj
- self.Dependency = Dependency
- self.WorkingDir = WorkingDir
- self.Target = Target
- self.BuildCommand = BuildCommand
- if BuildCommand == None or len(BuildCommand) == 0:
- EdkLogger.error("build", OPTION_MISSING, "No build command found for",
- ExtraData=str(Obj))
-
- ## str() method
- #
- # It just returns the string representaion of self.BuildObject
- #
- # @param self The object pointer
- #
- def __str__(self):
- return str(self.BuildObject)
-
- ## "==" operator method
- #
- # It just compares self.BuildObject with "Other". So self.BuildObject must
- # provide its own __eq__() method.
- #
- # @param self The object pointer
- # @param Other The other BuildUnit object compared to
- #
- def __eq__(self, Other):
- return Other != None and self.BuildObject == Other.BuildObject \
- and self.BuildObject.Arch == Other.BuildObject.Arch
-
- ## hash() method
- #
- # It just returns the hash value of self.BuildObject which must be hashable.
- #
- # @param self The object pointer
- #
- def __hash__(self):
- return hash(self.BuildObject) + hash(self.BuildObject.Arch)
-
- def __repr__(self):
- return repr(self.BuildObject)
-
-## The smallest module unit that can be built by nmake/make command in multi-thread build mode
-#
-# This class is for module build by nmake/make build system. The "Obj" parameter
-# must provide __str__(), __eq__() and __hash__() methods. Otherwise there could
-# be make units missing build.
-#
-# Currently the "Obj" should be only ModuleAutoGen object.
-#
-class ModuleMakeUnit(BuildUnit):
- ## The constructor
- #
- # @param self The object pointer
- # @param Obj The ModuleAutoGen object the build is working on
- # @param Target The build target name, one of gSupportedTarget
- #
- def __init__(self, Obj, Target):
- Dependency = [ModuleMakeUnit(La, Target) for La in Obj.LibraryAutoGenList]
- BuildUnit.__init__(self, Obj, Obj.BuildCommand, Target, Dependency, Obj.MakeFileDir)
- if Target in [None, "", "all"]:
- self.Target = "tbuild"
-
-## The smallest platform unit that can be built by nmake/make command in multi-thread build mode
-#
-# This class is for platform build by nmake/make build system. The "Obj" parameter
-# must provide __str__(), __eq__() and __hash__() methods. Otherwise there could
-# be make units missing build.
-#
-# Currently the "Obj" should be only PlatformAutoGen object.
-#
-class PlatformMakeUnit(BuildUnit):
- ## The constructor
- #
- # @param self The object pointer
- # @param Obj The PlatformAutoGen object the build is working on
- # @param Target The build target name, one of gSupportedTarget
- #
- def __init__(self, Obj, Target):
- Dependency = [ModuleMakeUnit(Lib, Target) for Lib in self.BuildObject.LibraryAutoGenList]
- Dependency.extend([ModuleMakeUnit(Mod, Target) for Mod in self.BuildObject.ModuleAutoGenList])
- BuildUnit.__init__(self, Obj, Obj.BuildCommand, Target, Dependency, Obj.MakeFileDir)
-
-## The class representing the task of a module build or platform build
-#
-# This class manages the build tasks in multi-thread build mode. Its jobs include
-# scheduling thread running, catching thread error, monitor the thread status, etc.
-#
-class BuildTask:
- # queue for tasks waiting for schedule
- _PendingQueue = sdict()
- _PendingQueueLock = threading.Lock()
-
- # queue for tasks ready for running
- _ReadyQueue = sdict()
- _ReadyQueueLock = threading.Lock()
-
- # queue for run tasks
- _RunningQueue = sdict()
- _RunningQueueLock = threading.Lock()
-
- # queue containing all build tasks, in case duplicate build
- _TaskQueue = sdict()
-
- # flag indicating error occurs in a running thread
- _ErrorFlag = threading.Event()
- _ErrorFlag.clear()
- _ErrorMessage = ""
-
- # BoundedSemaphore object used to control the number of running threads
- _Thread = None
-
- # flag indicating if the scheduler is started or not
- _SchedulerStopped = threading.Event()
- _SchedulerStopped.set()
-
- ## Start the task scheduler thread
- #
- # @param MaxThreadNumber The maximum thread number
- # @param ExitFlag Flag used to end the scheduler
- #
- @staticmethod
- def StartScheduler(MaxThreadNumber, ExitFlag):
- SchedulerThread = Thread(target=BuildTask.Scheduler, args=(MaxThreadNumber, ExitFlag))
- SchedulerThread.setName("Build-Task-Scheduler")
- SchedulerThread.setDaemon(False)
- SchedulerThread.start()
- # wait for the scheduler to be started, especially useful in Linux
- while not BuildTask.IsOnGoing():
- time.sleep(0.01)
-
- ## Scheduler method
- #
- # @param MaxThreadNumber The maximum thread number
- # @param ExitFlag Flag used to end the scheduler
- #
- @staticmethod
- def Scheduler(MaxThreadNumber, ExitFlag):
- BuildTask._SchedulerStopped.clear()
- try:
- # use BoundedSemaphore to control the maximum running threads
- BuildTask._Thread = BoundedSemaphore(MaxThreadNumber)
- #
- # scheduling loop, which will exits when no pending/ready task and
- # indicated to do so, or there's error in running thread
- #
- while (len(BuildTask._PendingQueue) > 0 or len(BuildTask._ReadyQueue) > 0 \
- or not ExitFlag.isSet()) and not BuildTask._ErrorFlag.isSet():
- EdkLogger.debug(EdkLogger.DEBUG_8, "Pending Queue (%d), Ready Queue (%d)"
- % (len(BuildTask._PendingQueue), len(BuildTask._ReadyQueue)))
-
- # get all pending tasks
- BuildTask._PendingQueueLock.acquire()
- BuildObjectList = BuildTask._PendingQueue.keys()
- #
- # check if their dependency is resolved, and if true, move them
- # into ready queue
- #
- for BuildObject in BuildObjectList:
- Bt = BuildTask._PendingQueue[BuildObject]
- if Bt.IsReady():
- BuildTask._ReadyQueue[BuildObject] = BuildTask._PendingQueue.pop(BuildObject)
- BuildTask._PendingQueueLock.release()
-
- # launch build thread until the maximum number of threads is reached
- while not BuildTask._ErrorFlag.isSet():
- # empty ready queue, do nothing further
- if len(BuildTask._ReadyQueue) == 0:
- break
-
- # wait for active thread(s) exit
- BuildTask._Thread.acquire(True)
-
- # start a new build thread
- Bo = BuildTask._ReadyQueue.keys()[0]
- Bt = BuildTask._ReadyQueue.pop(Bo)
-
- # move into running queue
- BuildTask._RunningQueueLock.acquire()
- BuildTask._RunningQueue[Bo] = Bt
- BuildTask._RunningQueueLock.release()
-
- Bt.Start()
- # avoid tense loop
- time.sleep(0.01)
-
- # avoid tense loop
- time.sleep(0.01)
-
- # wait for all running threads exit
- if BuildTask._ErrorFlag.isSet():
- EdkLogger.quiet("\nWaiting for all build threads exit...")
- # while not BuildTask._ErrorFlag.isSet() and \
- while len(BuildTask._RunningQueue) > 0:
- EdkLogger.verbose("Waiting for thread ending...(%d)" % len(BuildTask._RunningQueue))
- EdkLogger.debug(EdkLogger.DEBUG_8, "Threads [%s]" % ", ".join([Th.getName() for Th in threading.enumerate()]))
- # avoid tense loop
- time.sleep(0.1)
- except BaseException, X:
- #
- # TRICK: hide the output of threads left runing, so that the user can
- # catch the error message easily
- #
- EdkLogger.SetLevel(EdkLogger.ERROR)
- BuildTask._ErrorFlag.set()
- BuildTask._ErrorMessage = "build thread scheduler error\n\t%s" % str(X)
-
- BuildTask._PendingQueue.clear()
- BuildTask._ReadyQueue.clear()
- BuildTask._RunningQueue.clear()
- BuildTask._TaskQueue.clear()
- BuildTask._SchedulerStopped.set()
-
- ## Wait for all running method exit
- #
- @staticmethod
- def WaitForComplete():
- BuildTask._SchedulerStopped.wait()
-
- ## Check if the scheduler is running or not
- #
- @staticmethod
- def IsOnGoing():
- return not BuildTask._SchedulerStopped.isSet()
-
- ## Abort the build
- @staticmethod
- def Abort():
- if BuildTask.IsOnGoing():
- BuildTask._ErrorFlag.set()
- BuildTask.WaitForComplete()
-
- ## Check if there's error in running thread
- #
- # Since the main thread cannot catch exceptions in other thread, we have to
- # use threading.Event to communicate this formation to main thread.
- #
- @staticmethod
- def HasError():
- return BuildTask._ErrorFlag.isSet()
-
- ## Get error message in running thread
- #
- # Since the main thread cannot catch exceptions in other thread, we have to
- # use a static variable to communicate this message to main thread.
- #
- @staticmethod
- def GetErrorMessage():
- return BuildTask._ErrorMessage
-
- ## Factory method to create a BuildTask object
- #
- # This method will check if a module is building or has been built. And if
- # true, just return the associated BuildTask object in the _TaskQueue. If
- # not, create and return a new BuildTask object. The new BuildTask object
- # will be appended to the _PendingQueue for scheduling later.
- #
- # @param BuildItem A BuildUnit object representing a build object
- # @param Dependency The dependent build object of BuildItem
- #
- @staticmethod
- def New(BuildItem, Dependency=None):
- if BuildItem in BuildTask._TaskQueue:
- Bt = BuildTask._TaskQueue[BuildItem]
- return Bt
-
- Bt = BuildTask()
- Bt._Init(BuildItem, Dependency)
- BuildTask._TaskQueue[BuildItem] = Bt
-
- BuildTask._PendingQueueLock.acquire()
- BuildTask._PendingQueue[BuildItem] = Bt
- BuildTask._PendingQueueLock.release()
-
- return Bt
-
- ## The real constructor of BuildTask
- #
- # @param BuildItem A BuildUnit object representing a build object
- # @param Dependency The dependent build object of BuildItem
- #
- def _Init(self, BuildItem, Dependency=None):
- self.BuildItem = BuildItem
-
- self.DependencyList = []
- if Dependency == None:
- Dependency = BuildItem.Dependency
- else:
- Dependency.extend(BuildItem.Dependency)
- self.AddDependency(Dependency)
- # flag indicating build completes, used to avoid unnecessary re-build
- self.CompleteFlag = False
-
- ## Check if all dependent build tasks are completed or not
- #
- def IsReady(self):
- ReadyFlag = True
- for Dep in self.DependencyList:
- if Dep.CompleteFlag == True:
- continue
- ReadyFlag = False
- break
-
- return ReadyFlag
-
- ## Add dependent build task
- #
- # @param Dependency The list of dependent build objects
- #
- def AddDependency(self, Dependency):
- for Dep in Dependency:
- self.DependencyList.append(BuildTask.New(Dep)) # BuildTask list
-
- ## The thread wrapper of LaunchCommand function
- #
- # @param Command A list or string contains the call of the command
- # @param WorkingDir The directory in which the program will be running
- #
- def _CommandThread(self, Command, WorkingDir):
- try:
- LaunchCommand(Command, WorkingDir)
- self.CompleteFlag = True
- except:
- #
- # TRICK: hide the output of threads left runing, so that the user can
- # catch the error message easily
- #
- if not BuildTask._ErrorFlag.isSet():
- GlobalData.gBuildingModule = "%s [%s, %s, %s]" % (str(self.BuildItem.BuildObject),
- self.BuildItem.BuildObject.Arch,
- self.BuildItem.BuildObject.ToolChain,
- self.BuildItem.BuildObject.BuildTarget
- )
- EdkLogger.SetLevel(EdkLogger.ERROR)
- BuildTask._ErrorFlag.set()
- BuildTask._ErrorMessage = "%s broken\n %s [%s]" % \
- (threading.currentThread().getName(), Command, WorkingDir)
- # indicate there's a thread is available for another build task
- BuildTask._RunningQueueLock.acquire()
- BuildTask._RunningQueue.pop(self.BuildItem)
- BuildTask._RunningQueueLock.release()
- BuildTask._Thread.release()
-
- ## Start build task thread
- #
- def Start(self):
- EdkLogger.quiet("Building ... %s" % repr(self.BuildItem))
- Command = self.BuildItem.BuildCommand + [self.BuildItem.Target]
- self.BuildTread = Thread(target=self._CommandThread, args=(Command, self.BuildItem.WorkingDir))
- self.BuildTread.setName("build thread")
- self.BuildTread.setDaemon(False)
- self.BuildTread.start()
-
-## The class implementing the EDK2 build process
-#
-# The build process includes:
-# 1. Load configuration from target.txt and tools_def.txt in $(WORKSPACE)/Conf
-# 2. Parse DSC file of active platform
-# 3. Parse FDF file if any
-# 4. Establish build database, including parse all other files (module, package)
-# 5. Create AutoGen files (C code file, depex file, makefile) if necessary
-# 6. Call build command
-#
-class Build():
- ## Constructor
- #
- # Constructor will load all necessary configurations, parse platform, modules
- # and packages and the establish a database for AutoGen.
- #
- # @param Target The build command target, one of gSupportedTarget
- # @param WorkspaceDir The directory of workspace
- # @param Platform The DSC file of active platform
- # @param Module The INF file of active module, if any
- # @param Arch The Arch list of platform or module
- # @param ToolChain The name list of toolchain
- # @param BuildTarget The "DEBUG" or "RELEASE" build
- # @param FlashDefinition The FDF file of active platform
- # @param FdList=[] The FD names to be individually built
- # @param FvList=[] The FV names to be individually built
- # @param MakefileType The type of makefile (for MSFT make or GNU make)
- # @param SilentMode Indicate multi-thread build mode
- # @param ThreadNumber The maximum number of thread if in multi-thread build mode
- # @param SkipAutoGen Skip AutoGen step
- # @param Reparse Re-parse all meta files
- # @param SkuId SKU id from command line
- #
- def __init__(self, Target, WorkspaceDir, Platform, Module, Arch, ToolChain,
- BuildTarget, FlashDefinition, FdList=[], FvList=[],
- MakefileType="nmake", SilentMode=False, ThreadNumber=2,
- SkipAutoGen=False, Reparse=False, SkuId=None,
- ReportFile=None, ReportType=None):
-
- self.WorkspaceDir = WorkspaceDir
- self.Target = Target
- self.PlatformFile = Platform
- self.ModuleFile = Module
- self.ArchList = Arch
- self.ToolChainList = ToolChain
- self.BuildTargetList= BuildTarget
- self.Fdf = FlashDefinition
- self.FdList = FdList
- self.FvList = FvList
- self.MakefileType = MakefileType
- self.SilentMode = SilentMode
- self.ThreadNumber = ThreadNumber
- self.SkipAutoGen = SkipAutoGen
- self.Reparse = Reparse
- self.SkuId = SkuId
- self.SpawnMode = True
- self.ReportFile = ReportFile
- if ReportType == None:
- self.ReportType = ['ALL']
- else:
- self.ReportType = ReportType
-
- self.TargetTxt = TargetTxtClassObject()
- self.ToolDef = ToolDefClassObject()
- self.Db = WorkspaceDatabase(None, GlobalData.gGlobalDefines, self.Reparse)
- #self.Db = WorkspaceDatabase(None, {}, self.Reparse)
- self.BuildDatabase = self.Db.BuildObject
- self.Platform = None
-
- # print dot charater during doing some time-consuming work
- self.Progress = Utils.Progressor()
-
- # parse target.txt, tools_def.txt, and platform file
- #self.RestoreBuildData()
- self.LoadConfiguration()
- self.InitBuild()
-
- # print current build environment and configuration
- EdkLogger.quiet("%-24s = %s" % ("WORKSPACE", os.environ["WORKSPACE"]))
- EdkLogger.quiet("%-24s = %s" % ("ECP_SOURCE", os.environ["ECP_SOURCE"]))
- EdkLogger.quiet("%-24s = %s" % ("EDK_SOURCE", os.environ["EDK_SOURCE"]))
- EdkLogger.quiet("%-24s = %s" % ("EFI_SOURCE", os.environ["EFI_SOURCE"]))
- EdkLogger.quiet("%-24s = %s" % ("EDK_TOOLS_PATH", os.environ["EDK_TOOLS_PATH"]))
-
- EdkLogger.info('\n%-24s = %s' % ("TARGET_ARCH", ' '.join(self.ArchList)))
- EdkLogger.info('%-24s = %s' % ("TARGET", ' '.join(self.BuildTargetList)))
- EdkLogger.info('%-24s = %s' % ("TOOL_CHAIN_TAG", ' '.join(self.ToolChainList)))
-
- EdkLogger.info('\n%-24s = %s' % ("Active Platform", self.PlatformFile))
-
- if self.Fdf != None and self.Fdf != "":
- EdkLogger.info('%-24s = %s' % ("Flash Image Definition", self.Fdf))
-
- if self.ModuleFile != None and self.ModuleFile != "":
- EdkLogger.info('%-24s = %s' % ("Active Module", self.ModuleFile))
-
- os.chdir(self.WorkspaceDir)
- self.Progress.Start("\nProcessing meta-data")
-
- ## Load configuration
- #
- # This method will parse target.txt and get the build configurations.
- #
- def LoadConfiguration(self):
- #
- # Check target.txt and tools_def.txt and Init them
- #
- BuildConfigurationFile = os.path.normpath(os.path.join(self.WorkspaceDir, gBuildConfiguration))
- if os.path.isfile(BuildConfigurationFile) == True:
- StatusCode = self.TargetTxt.LoadTargetTxtFile(BuildConfigurationFile)
-
- ToolDefinitionFile = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF]
- if ToolDefinitionFile == '':
- ToolDefinitionFile = gToolsDefinition
- ToolDefinitionFile = os.path.normpath(os.path.join(self.WorkspaceDir, ToolDefinitionFile))
- if os.path.isfile(ToolDefinitionFile) == True:
- StatusCode = self.ToolDef.LoadToolDefFile(ToolDefinitionFile)
- else:
- EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=ToolDefinitionFile)
- else:
- EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=BuildConfigurationFile)
-
- # if no ARCH given in command line, get it from target.txt
- if self.ArchList == None or len(self.ArchList) == 0:
- self.ArchList = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TARGET_ARCH]
-
- # if no build target given in command line, get it from target.txt
- if self.BuildTargetList == None or len(self.BuildTargetList) == 0:
- self.BuildTargetList = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TARGET]
-
- # if no tool chain given in command line, get it from target.txt
- if self.ToolChainList == None or len(self.ToolChainList) == 0:
- self.ToolChainList = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_TAG]
- if self.ToolChainList == None or len(self.ToolChainList) == 0:
- EdkLogger.error("build", RESOURCE_NOT_AVAILABLE, ExtraData="No toolchain given. Don't know how to build.\n")
-
- # check if the tool chains are defined or not
- NewToolChainList = []
- for ToolChain in self.ToolChainList:
- if ToolChain not in self.ToolDef.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG]:
- EdkLogger.warn("build", "Tool chain [%s] is not defined" % ToolChain)
- else:
- NewToolChainList.append(ToolChain)
- # if no tool chain available, break the build
- if len(NewToolChainList) == 0:
- EdkLogger.error("build", RESOURCE_NOT_AVAILABLE,
- ExtraData="[%s] not defined. No toolchain available for build!\n" % ", ".join(self.ToolChainList))
- else:
- self.ToolChainList = NewToolChainList
-
- if self.ThreadNumber == None:
- self.ThreadNumber = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER]
- if self.ThreadNumber == '':
- self.ThreadNumber = 0
- else:
- self.ThreadNumber = int(self.ThreadNumber, 0)
-
- if self.ThreadNumber == 0:
- self.ThreadNumber = 1
-
- if not self.PlatformFile:
- PlatformFile = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_ACTIVE_PLATFORM]
- if not PlatformFile:
- # Try to find one in current directory
- WorkingDirectory = os.getcwd()
- FileList = glob.glob(os.path.normpath(os.path.join(WorkingDirectory, '*.dsc')))
- FileNum = len(FileList)
- if FileNum >= 2:
- EdkLogger.error("build", OPTION_MISSING,
- ExtraData="There are %d DSC files in %s. Use '-p' to specify one.\n" % (FileNum, WorkingDirectory))
- elif FileNum == 1:
- PlatformFile = FileList[0]
- else:
- EdkLogger.error("build", RESOURCE_NOT_AVAILABLE,
- ExtraData="No active platform specified in target.txt or command line! Nothing can be built.\n")
-
- self.PlatformFile = PathClass(NormFile(PlatformFile, self.WorkspaceDir), self.WorkspaceDir)
- ErrorCode, ErrorInfo = self.PlatformFile.Validate(".dsc", False)
- if ErrorCode != 0:
- EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
-
- ## Initialize build configuration
- #
- # This method will parse DSC file and merge the configurations from
- # command line and target.txt, then get the final build configurations.
- #
- def InitBuild(self):
- ErrorCode, ErrorInfo = self.PlatformFile.Validate(".dsc")
- if ErrorCode != 0:
- EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
-
- # create metafile database
- self.Db.InitDatabase()
-
- # we need information in platform description file to determine how to build
- self.Platform = self.BuildDatabase[self.PlatformFile, 'COMMON']
- if not self.Fdf:
- self.Fdf = self.Platform.FlashDefinition
-
- if self.SkuId == None or self.SkuId == '':
- self.SkuId = self.Platform.SkuName
-
- # check FD/FV build target
- if self.Fdf == None or self.Fdf == "":
- if self.FdList != []:
- EdkLogger.info("No flash definition file found. FD [%s] will be ignored." % " ".join(self.FdList))
- self.FdList = []
- if self.FvList != []:
- EdkLogger.info("No flash definition file found. FV [%s] will be ignored." % " ".join(self.FvList))
- self.FvList = []
- else:
- FdfParserObj = FdfParser(str(self.Fdf))
- FdfParserObj.ParseFile()
- for fvname in self.FvList:
- if fvname.upper() not in FdfParserObj.Profile.FvDict.keys():
- EdkLogger.error("build", OPTION_VALUE_INVALID,
- "No such an FV in FDF file: %s" % fvname)
-
- #
- # Merge Arch
- #
- if self.ArchList == None or len(self.ArchList) == 0:
- ArchList = set(self.Platform.SupArchList)
- else:
- ArchList = set(self.ArchList) & set(self.Platform.SupArchList)
- if len(ArchList) == 0:
- EdkLogger.error("build", PARAMETER_INVALID,
- ExtraData = "Active platform supports [%s] only, but [%s] is given."
- % (" ".join(self.Platform.SupArchList), " ".join(self.ArchList)))
- elif len(ArchList) != len(self.ArchList):
- SkippedArchList = set(self.ArchList).symmetric_difference(set(self.Platform.SupArchList))
- EdkLogger.verbose("\nArch [%s] is ignored because active platform supports [%s] but [%s] is specified !"
- % (" ".join(SkippedArchList), " ".join(self.Platform.SupArchList), " ".join(self.ArchList)))
- self.ArchList = tuple(ArchList)
-
- # Merge build target
- if self.BuildTargetList == None or len(self.BuildTargetList) == 0:
- BuildTargetList = self.Platform.BuildTargets
- else:
- BuildTargetList = list(set(self.BuildTargetList) & set(self.Platform.BuildTargets))
- if BuildTargetList == []:
- EdkLogger.error("build", PARAMETER_INVALID, "Active platform only supports [%s], but [%s] is given"
- % (" ".join(self.Platform.BuildTargets), " ".join(self.BuildTargetList)))
- self.BuildTargetList = BuildTargetList
-
- ## Build a module or platform
- #
- # Create autogen code and makfile for a module or platform, and the launch
- # "make" command to build it
- #
- # @param Target The target of build command
- # @param Platform The platform file
- # @param Module The module file
- # @param BuildTarget The name of build target, one of "DEBUG", "RELEASE"
- # @param ToolChain The name of toolchain to build
- # @param Arch The arch of the module/platform
- # @param CreateDepModuleCodeFile Flag used to indicate creating code
- # for dependent modules/Libraries
- # @param CreateDepModuleMakeFile Flag used to indicate creating makefile
- # for dependent modules/Libraries
- #
- def _Build(self, Target, AutoGenObject, CreateDepsCodeFile=True, CreateDepsMakeFile=True):
- if AutoGenObject == None:
- return False
-
- # skip file generation for cleanxxx targets, run and fds target
- if Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
- # for target which must generate AutoGen code and makefile
- if not self.SkipAutoGen or Target == 'genc':
- self.Progress.Start("Generating code")
- AutoGenObject.CreateCodeFile(CreateDepsCodeFile)
- self.Progress.Stop("done!")
- if Target == "genc":
- return True
-
- if not self.SkipAutoGen or Target == 'genmake':
- self.Progress.Start("Generating makefile")
- AutoGenObject.CreateMakeFile(CreateDepsMakeFile)
- self.Progress.Stop("done!")
- if Target == "genmake":
- return True
- else:
- # always recreate top/platform makefile when clean, just in case of inconsistency
- AutoGenObject.CreateCodeFile(False)
- AutoGenObject.CreateMakeFile(False)
-
- if EdkLogger.GetLevel() == EdkLogger.QUIET:
- EdkLogger.quiet("Building ... %s" % repr(AutoGenObject))
-
- BuildCommand = AutoGenObject.BuildCommand
- if BuildCommand == None or len(BuildCommand) == 0:
- EdkLogger.error("build", OPTION_MISSING, ExtraData="No MAKE command found for [%s, %s, %s]" % Key)
-
- BuildCommand = BuildCommand + [Target]
- LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir)
- if Target == 'cleanall':
- try:
- #os.rmdir(AutoGenObject.BuildDir)
- RemoveDirectory(AutoGenObject.BuildDir, True)
- except WindowsError, X:
- EdkLogger.error("build", FILE_DELETE_FAILURE, ExtraData=str(X))
- return True
-
- ## Build active platform for different build targets and different tool chains
- #
- def _BuildPlatform(self):
- for BuildTarget in self.BuildTargetList:
- for ToolChain in self.ToolChainList:
- Wa = WorkspaceAutoGen(
- self.WorkspaceDir,
- self.Platform,
- BuildTarget,
- ToolChain,
- self.ArchList,
- self.BuildDatabase,
- self.TargetTxt,
- self.ToolDef,
- self.Fdf,
- self.FdList,
- self.FvList,
- self.SkuId,
- self.ReportFile,
- self.ReportType
- )
- self.Progress.Stop("done!")
- self._Build(self.Target, Wa)
-
- ## Build active module for different build targets, different tool chains and different archs
- #
- def _BuildModule(self):
- for BuildTarget in self.BuildTargetList:
- for ToolChain in self.ToolChainList:
- #
- # module build needs platform build information, so get platform
- # AutoGen first
- #
- Wa = WorkspaceAutoGen(
- self.WorkspaceDir,
- self.Platform,
- BuildTarget,
- ToolChain,
- self.ArchList,
- self.BuildDatabase,
- self.TargetTxt,
- self.ToolDef,
- self.Fdf,
- self.FdList,
- self.FvList,
- self.SkuId,
- self.ReportFile,
- self.ReportType
- )
- Wa.CreateMakeFile(False)
- self.Progress.Stop("done!")
- MaList = []
- for Arch in self.ArchList:
- Ma = ModuleAutoGen(Wa, self.ModuleFile, BuildTarget, ToolChain, Arch, self.PlatformFile)
- if Ma == None: continue
- MaList.append(Ma)
- self._Build(self.Target, Ma)
- if MaList == []:
- EdkLogger.error(
- 'build',
- BUILD_ERROR,
- "Module for [%s] is not a component of active platform."\
- " Please make sure that the ARCH and inf file path are"\
- " given in the same as in [%s]" %\
- (', '.join(self.ArchList), self.Platform),
- ExtraData=self.ModuleFile
- )
-
- ## Build a platform in multi-thread mode
- #
- def _MultiThreadBuildPlatform(self):
- for BuildTarget in self.BuildTargetList:
- for ToolChain in self.ToolChainList:
- Wa = WorkspaceAutoGen(
- self.WorkspaceDir,
- self.Platform,
- BuildTarget,
- ToolChain,
- self.ArchList,
- self.BuildDatabase,
- self.TargetTxt,
- self.ToolDef,
- self.Fdf,
- self.FdList,
- self.FvList,
- self.SkuId,
- self.ReportFile,
- self.ReportType
- )
- Wa.CreateMakeFile(False)
-
- # multi-thread exit flag
- ExitFlag = threading.Event()
- ExitFlag.clear()
- for Arch in self.ArchList:
- Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, ToolChain, Arch)
- if Pa == None:
- continue
- for Module in Pa.Platform.Modules:
- # Get ModuleAutoGen object to generate C code file and makefile
- Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)
- if Ma == None:
- continue
- # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'
- if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
- # for target which must generate AutoGen code and makefile
- if not self.SkipAutoGen or self.Target == 'genc':
- Ma.CreateCodeFile(True)
- if self.Target == "genc":
- continue
-
- if not self.SkipAutoGen or self.Target == 'genmake':
- Ma.CreateMakeFile(True)
- if self.Target == "genmake":
- continue
- self.Progress.Stop("done!")
- # Generate build task for the module
- Bt = BuildTask.New(ModuleMakeUnit(Ma, self.Target))
- # Break build if any build thread has error
- if BuildTask.HasError():
- # we need a full version of makefile for platform
- ExitFlag.set()
- BuildTask.WaitForComplete()
- Pa.CreateMakeFile(False)
- EdkLogger.error("build", BUILD_ERROR, "Failed to build module", ExtraData=GlobalData.gBuildingModule)
- # Start task scheduler
- if not BuildTask.IsOnGoing():
- BuildTask.StartScheduler(self.ThreadNumber, ExitFlag)
-
- # in case there's an interruption. we need a full version of makefile for platform
- Pa.CreateMakeFile(False)
- if BuildTask.HasError():
- EdkLogger.error("build", BUILD_ERROR, "Failed to build module", ExtraData=GlobalData.gBuildingModule)
-
- #
- # All modules have been put in build tasks queue. Tell task scheduler
- # to exit if all tasks are completed
- #
- ExitFlag.set()
- BuildTask.WaitForComplete()
-
- #
- # Check for build error, and raise exception if one
- # has been signaled.
- #
- if BuildTask.HasError():
- EdkLogger.error("build", BUILD_ERROR, "Failed to build module", ExtraData=GlobalData.gBuildingModule)
-
- # Generate FD image if there's a FDF file found
- if self.Fdf != '' and self.Target in ["", "all", "fds"]:
- LaunchCommand(Wa.BuildCommand + ["fds"], Wa.MakeFileDir)
-
- ## Generate GuidedSectionTools.txt in the FV directories.
- #
- def CreateGuidedSectionToolsFile(self):
- for Arch in self.ArchList:
- for BuildTarget in self.BuildTargetList:
- for ToolChain in self.ToolChainList:
- FvDir = os.path.join(
- self.WorkspaceDir,
- self.Platform.OutputDirectory,
- '_'.join((BuildTarget, ToolChain)),
- 'FV'
- )
- if not os.path.exists(FvDir):
- continue
- # Build up the list of supported architectures for this build
- prefix = '%s_%s_%s_' % (BuildTarget, ToolChain, Arch)
-
- # Look through the tool definitions for GUIDed tools
- guidAttribs = []
- for (attrib, value) in self.ToolDef.ToolsDefTxtDictionary.iteritems():
- if attrib.upper().endswith('_GUID'):
- split = attrib.split('_')
- thisPrefix = '_'.join(split[0:3]) + '_'
- if thisPrefix == prefix:
- guid = self.ToolDef.ToolsDefTxtDictionary[attrib]
- guid = guid.lower()
- toolName = split[3]
- path = '_'.join(split[0:4]) + '_PATH'
- path = self.ToolDef.ToolsDefTxtDictionary[path]
- path = self.GetFullPathOfTool(path)
- guidAttribs.append((guid, toolName, path))
-
- # Write out GuidedSecTools.txt
- toolsFile = os.path.join(FvDir, 'GuidedSectionTools.txt')
- toolsFile = open(toolsFile, 'wt')
- for guidedSectionTool in guidAttribs:
- print >> toolsFile, ' '.join(guidedSectionTool)
- toolsFile.close()
-
- ## Returns the full path of the tool.
- #
- def GetFullPathOfTool (self, tool):
- if os.path.exists(tool):
- return os.path.realpath(tool)
- else:
- # We need to search for the tool using the
- # PATH environment variable.
- for dirInPath in os.environ['PATH'].split(os.pathsep):
- foundPath = os.path.join(dirInPath, tool)
- if os.path.exists(foundPath):
- return os.path.realpath(foundPath)
-
- # If the tool was not found in the path then we just return
- # the input tool.
- return tool
-
- ## Launch the module or platform build
- #
- def Launch(self):
- if self.ModuleFile == None or self.ModuleFile == "":
- if not self.SpawnMode or self.Target not in ["", "all"]:
- self.SpawnMode = False
- self._BuildPlatform()
- else:
- self._MultiThreadBuildPlatform()
- self.CreateGuidedSectionToolsFile()
- else:
- self.SpawnMode = False
- self._BuildModule()
-
- ## Do some clean-up works when error occurred
- def Relinquish(self):
- OldLogLevel = EdkLogger.GetLevel()
- EdkLogger.SetLevel(EdkLogger.ERROR)
- #self.DumpBuildData()
- Utils.Progressor.Abort()
- if self.SpawnMode == True:
- BuildTask.Abort()
- EdkLogger.SetLevel(OldLogLevel)
-
- def DumpBuildData(self):
- CacheDirectory = os.path.join(self.WorkspaceDir, gBuildCacheDir)
- Utils.CreateDirectory(CacheDirectory)
- Utils.DataDump(Utils.gFileTimeStampCache, os.path.join(CacheDirectory, "gFileTimeStampCache"))
- Utils.DataDump(Utils.gDependencyDatabase, os.path.join(CacheDirectory, "gDependencyDatabase"))
-
- def RestoreBuildData(self):
- FilePath = os.path.join(self.WorkspaceDir, gBuildCacheDir, "gFileTimeStampCache")
- if Utils.gFileTimeStampCache == {} and os.path.isfile(FilePath):
- Utils.gFileTimeStampCache = Utils.DataRestore(FilePath)
- if Utils.gFileTimeStampCache == None:
- Utils.gFileTimeStampCache = {}
-
- FilePath = os.path.join(self.WorkspaceDir, gBuildCacheDir, "gDependencyDatabase")
- if Utils.gDependencyDatabase == {} and os.path.isfile(FilePath):
- Utils.gDependencyDatabase = Utils.DataRestore(FilePath)
- if Utils.gDependencyDatabase == None:
- Utils.gDependencyDatabase = {}
-
-def ParseDefines(DefineList=[]):
- DefineDict = {}
- if DefineList != None:
- for Define in DefineList:
- DefineTokenList = Define.split("=", 1)
- if len(DefineTokenList) == 1:
- DefineDict[DefineTokenList[0]] = ""
- else:
- DefineDict[DefineTokenList[0]] = DefineTokenList[1].strip()
- return DefineDict
-
-gParamCheck = []
-def SingleCheckCallback(option, opt_str, value, parser):
- if option not in gParamCheck:
- setattr(parser.values, option.dest, value)
- gParamCheck.append(option)
- else:
- parser.error("Option %s only allows one instance in command line!" % option)
-
-## Parse command line options
-#
-# Using standard Python module optparse to parse command line option of this tool.
-#
-# @retval Opt A optparse.Values object containing the parsed options
-# @retval Args Target of build command
-#
-def MyOptionParser():
- Parser = OptionParser(description=__copyright__,version=__version__,prog="build.exe",usage="%prog [options] [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run]")
- Parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32','X64','IPF','EBC','ARM'], dest="TargetArch",
- help="ARCHS is one of list: IA32, X64, IPF, ARM or EBC, which overrides target.txt's TARGET_ARCH definition. To specify more archs, please repeat this option.")
- Parser.add_option("-p", "--platform", action="callback", type="string", dest="PlatformFile", callback=SingleCheckCallback,
- help="Build the platform specified by the DSC file name argument, overriding target.txt's ACTIVE_PLATFORM definition.")
- Parser.add_option("-m", "--module", action="callback", type="string", dest="ModuleFile", callback=SingleCheckCallback,
- help="Build the module specified by the INF file name argument.")
- Parser.add_option("-b", "--buildtarget", action="append", type="choice", choices=['DEBUG','RELEASE'], dest="BuildTarget",
- help="BuildTarget is one of list: DEBUG, RELEASE, which overrides target.txt's TARGET definition. To specify more TARGET, please repeat this option.")
- Parser.add_option("-t", "--tagname", action="append", type="string", dest="ToolChain",
- help="Using the Tool Chain Tagname to build the platform, overriding target.txt's TOOL_CHAIN_TAG definition.")
- Parser.add_option("-x", "--sku-id", action="callback", type="string", dest="SkuId", callback=SingleCheckCallback,
- help="Using this name of SKU ID to build the platform, overriding SKUID_IDENTIFIER in DSC file.")
-
- Parser.add_option("-n", action="callback", type="int", dest="ThreadNumber", callback=SingleCheckCallback,
- help="Build the platform using multi-threaded compiler. The value overrides target.txt's MAX_CONCURRENT_THREAD_NUMBER. Less than 2 will disable multi-thread builds.")
-
- Parser.add_option("-f", "--fdf", action="callback", type="string", dest="FdfFile", callback=SingleCheckCallback,
- help="The name of the FDF file to use, which overrides the setting in the DSC file.")
- Parser.add_option("-r", "--rom-image", action="append", type="string", dest="RomImage", default=[],
- help="The name of FD to be generated. The name must be from [FD] section in FDF file.")
- Parser.add_option("-i", "--fv-image", action="append", type="string", dest="FvImage", default=[],
- help="The name of FV to be generated. The name must be from [FV] section in FDF file.")
-
- Parser.add_option("-u", "--skip-autogen", action="store_true", dest="SkipAutoGen", help="Skip AutoGen step.")
- Parser.add_option("-e", "--re-parse", action="store_true", dest="Reparse", help="Re-parse all meta-data files.")
-
- Parser.add_option("-c", "--case-insensitive", action="store_true", dest="CaseInsensitive", help="Don't check case of file name.")
-
- # Parser.add_option("-D", "--define", action="append", dest="Defines", metavar="NAME[=[VALUE]]",
- # help="Define global macro which can be used in DSC/DEC/INF files.")
-
- Parser.add_option("-w", "--warning-as-error", action="store_true", dest="WarningAsError", help="Treat warning in tools as error.")
- Parser.add_option("-j", "--log", action="store", dest="LogFile", help="Put log in specified file as well as on console.")
-
- Parser.add_option("-s", "--silent", action="store_true", type=None, dest="SilentMode",
- help="Make use of silent mode of (n)make.")
- Parser.add_option("-q", "--quiet", action="store_true", type=None, help="Disable all messages except FATAL ERRORS.")
- Parser.add_option("-v", "--verbose", action="store_true", type=None, help="Turn on verbose output with informational messages printed, "\
- "including library instances selected, final dependency expression, "\
- "and warning messages, etc.")
- Parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.")
- Parser.add_option("-D", "--define", action="append", type="string", dest="Macros", help="Macro: \"Name [= Value]\".")
-
- Parser.add_option("-y", "--report-file", action="store", dest="ReportFile", help="Create/overwrite the report to the specified filename.")
- Parser.add_option("-Y", "--report-type", action="append", type="choice", choices=['ALL','PCD',], dest="ReportType",
- help="Flags that control the type of build report to generate. Must be one of: [ALL, PCD]. To specify more than one flag, repeat this option on the command line.")
-
- (Opt, Args)=Parser.parse_args()
- return (Opt, Args)
-
-## Tool entrance method
-#
-# This method mainly dispatch specific methods per the command line options.
-# If no error found, return zero value so the caller of this tool can know
-# if it's executed successfully or not.
-#
-# @retval 0 Tool was successful
-# @retval 1 Tool failed
-#
-def Main():
- StartTime = time.time()
-
- # Initialize log system
- EdkLogger.Initialize()
-
- #
- # Parse the options and args
- #
- (Option, Target) = MyOptionParser()
- GlobalData.gOptions = Option
- GlobalData.gCaseInsensitive = Option.CaseInsensitive
-
- # Set log level
- if Option.verbose != None:
- EdkLogger.SetLevel(EdkLogger.VERBOSE)
- elif Option.quiet != None:
- EdkLogger.SetLevel(EdkLogger.QUIET)
- elif Option.debug != None:
- EdkLogger.SetLevel(Option.debug + 1)
- else:
- EdkLogger.SetLevel(EdkLogger.INFO)
-
- if Option.LogFile != None:
- EdkLogger.SetLogFile(Option.LogFile)
-
- if Option.WarningAsError == True:
- EdkLogger.SetWarningAsError()
-
- if platform.platform().find("Windows") >= 0:
- GlobalData.gIsWindows = True
- else:
- GlobalData.gIsWindows = False
-
- EdkLogger.quiet(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[%s]\n" % platform.platform())
- ReturnCode = 0
- MyBuild = None
- try:
- if len(Target) == 0:
- Target = "all"
- elif len(Target) >= 2:
- EdkLogger.error("build", OPTION_NOT_SUPPORTED, "More than one targets are not supported.",
- ExtraData="Please select one of: %s" %(' '.join(gSupportedTarget)))
- else:
- Target = Target[0].lower()
-
- if Target not in gSupportedTarget:
- EdkLogger.error("build", OPTION_NOT_SUPPORTED, "Not supported target [%s]." % Target,
- ExtraData="Please select one of: %s" %(' '.join(gSupportedTarget)))
-
- GlobalData.gGlobalDefines = ParseDefines(Option.Macros)
- #
- # Check environment variable: EDK_TOOLS_PATH, WORKSPACE, PATH
- #
- CheckEnvVariable()
- Workspace = os.getenv("WORKSPACE")
- #
- # Get files real name in workspace dir
- #
- GlobalData.gAllFiles = Utils.DirCache(Workspace)
-
- WorkingDirectory = os.getcwd()
- if not Option.ModuleFile:
- FileList = glob.glob(os.path.normpath(os.path.join(WorkingDirectory, '*.inf')))
- FileNum = len(FileList)
- if FileNum >= 2:
- EdkLogger.error("build", OPTION_NOT_SUPPORTED, "There are %d INF files in %s." % (FileNum, WorkingDirectory),
- ExtraData="Please use '-m <INF_FILE_PATH>' switch to choose one.")
- elif FileNum == 1:
- Option.ModuleFile = NormFile(FileList[0], Workspace)
-
- if Option.ModuleFile:
- Option.ModuleFile = PathClass(Option.ModuleFile, Workspace)
- ErrorCode, ErrorInfo = Option.ModuleFile.Validate(".inf", False)
- if ErrorCode != 0:
- EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
-
- if Option.PlatformFile != None:
- Option.PlatformFile = PathClass(Option.PlatformFile, Workspace)
- ErrorCode, ErrorInfo = Option.PlatformFile.Validate(".dsc", False)
- if ErrorCode != 0:
- EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
-
- if Option.FdfFile != None:
- Option.FdfFile = PathClass(Option.FdfFile, Workspace)
- ErrorCode, ErrorInfo = Option.FdfFile.Validate(".fdf", False)
- if ErrorCode != 0:
- EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
-
- MyBuild = Build(Target, Workspace, Option.PlatformFile, Option.ModuleFile,
- Option.TargetArch, Option.ToolChain, Option.BuildTarget,
- Option.FdfFile, Option.RomImage, Option.FvImage,
- None, Option.SilentMode, Option.ThreadNumber,
- Option.SkipAutoGen, Option.Reparse, Option.SkuId,
- Option.ReportFile, Option.ReportType)
- MyBuild.Launch()
- #MyBuild.DumpBuildData()
- except FatalError, X:
- if MyBuild != None:
- # for multi-thread build exits safely
- MyBuild.Relinquish()
- if Option != None and Option.debug != None:
- EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
- ReturnCode = X.args[0]
- except Warning, X:
- # error from Fdf parser
- if MyBuild != None:
- # for multi-thread build exits safely
- MyBuild.Relinquish()
- if Option != None and Option.debug != None:
- EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
- else:
- EdkLogger.error(X.ToolName, FORMAT_INVALID, File=X.FileName, Line=X.LineNumber, ExtraData=X.Message, RaiseError = False)
- ReturnCode = FORMAT_INVALID
- except KeyboardInterrupt:
- ReturnCode = ABORT_ERROR
- if Option != None and Option.debug != None:
- EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
- except:
- if MyBuild != None:
- # for multi-thread build exits safely
- MyBuild.Relinquish()
-
- # try to get the meta-file from the object causing exception
- Tb = sys.exc_info()[-1]
- MetaFile = GlobalData.gProcessingFile
- while Tb != None:
- if 'self' in Tb.tb_frame.f_locals and hasattr(Tb.tb_frame.f_locals['self'], 'MetaFile'):
- MetaFile = Tb.tb_frame.f_locals['self'].MetaFile
- Tb = Tb.tb_next
- EdkLogger.error(
- "\nbuild",
- CODE_ERROR,
- "Unknown fatal error when processing [%s]" % MetaFile,
- ExtraData="\n(Please send email to dev@buildtools.tianocore.org for help, attaching following call stack trace!)\n",
- RaiseError=False
- )
- EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
- ReturnCode = CODE_ERROR
- finally:
- Utils.Progressor.Abort()
-
- if MyBuild != None:
- MyBuild.Db.Close()
-
- if ReturnCode == 0:
- Conclusion = "Done"
- elif ReturnCode == ABORT_ERROR:
- Conclusion = "Aborted"
- else:
- Conclusion = "Failed"
- FinishTime = time.time()
- BuildDuration = time.strftime("%M:%S", time.gmtime(int(round(FinishTime - StartTime))))
- EdkLogger.SetLevel(EdkLogger.QUIET)
- EdkLogger.quiet("\n- %s -\n%s [%s]" % (Conclusion, time.strftime("%H:%M:%S, %b.%d %Y", time.localtime()), BuildDuration))
-
- return ReturnCode
-
-if __name__ == '__main__':
- r = Main()
- ## 0-127 is a safe return range, and 1 is a standard default error
- if r < 0 or r > 127: r = 1
- sys.exit(r)
-
+## @file
+# build a platform or a module
+#
+# Copyright (c) 2007 - 2010, Intel Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+##
+# Import Modules
+#
+import os
+import re
+import StringIO
+import sys
+import glob
+import time
+import platform
+import traceback
+
+from struct import *
+from threading import *
+from optparse import OptionParser
+from subprocess import *
+from Common import Misc as Utils
+
+from Common.TargetTxtClassObject import *
+from Common.ToolDefClassObject import *
+from Common.DataType import *
+from AutoGen.AutoGen import *
+from Common.BuildToolError import *
+from Workspace.WorkspaceDatabase import *
+
+from BuildReport import BuildReport
+from GenPatchPcdTable.GenPatchPcdTable import *
+from PatchPcdValue.PatchPcdValue import *
+
+import Common.EdkLogger
+import Common.GlobalData as GlobalData
+
+# Version and Copyright
+VersionNumber = "0.5"
+__version__ = "%prog Version " + VersionNumber
+__copyright__ = "Copyright (c) 2007 - 2010, Intel Corporation All rights reserved."
+
+## standard targets of build command
+gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run']
+
+## build configuration file
+gBuildConfiguration = "Conf/target.txt"
+gBuildCacheDir = "Conf/.cache"
+gToolsDefinition = "Conf/tools_def.txt"
+
+## Check environment PATH variable to make sure the specified tool is found
+#
+# If the tool is found in the PATH, then True is returned
+# Otherwise, False is returned
+#
+def IsToolInPath(tool):
+ if os.environ.has_key('PATHEXT'):
+ extns = os.environ['PATHEXT'].split(os.path.pathsep)
+ else:
+ extns = ('',)
+ for pathDir in os.environ['PATH'].split(os.path.pathsep):
+ for ext in extns:
+ if os.path.exists(os.path.join(pathDir, tool + ext)):
+ return True
+ return False
+
+## Check environment variables
+#
+# Check environment variables that must be set for build. Currently they are
+#
+# WORKSPACE The directory all packages/platforms start from
+# EDK_TOOLS_PATH The directory contains all tools needed by the build
+# PATH $(EDK_TOOLS_PATH)/Bin/<sys> must be set in PATH
+#
+# If any of above environment variable is not set or has error, the build
+# will be broken.
+#
+def CheckEnvVariable():
+ # check WORKSPACE
+ if "WORKSPACE" not in os.environ:
+ EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
+ ExtraData="WORKSPACE")
+
+ WorkspaceDir = os.path.normcase(os.path.normpath(os.environ["WORKSPACE"]))
+ if not os.path.exists(WorkspaceDir):
+ EdkLogger.error("build", FILE_NOT_FOUND, "WORKSPACE doesn't exist", ExtraData="%s" % WorkspaceDir)
+ elif ' ' in WorkspaceDir:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in WORKSPACE path",
+ ExtraData=WorkspaceDir)
+ os.environ["WORKSPACE"] = WorkspaceDir
+
+ #
+ # Check EFI_SOURCE (R8 build convention). EDK_SOURCE will always point to ECP
+ #
+ os.environ["ECP_SOURCE"] = os.path.join(WorkspaceDir, GlobalData.gEdkCompatibilityPkg)
+ if "EFI_SOURCE" not in os.environ:
+ os.environ["EFI_SOURCE"] = os.environ["ECP_SOURCE"]
+ if "EDK_SOURCE" not in os.environ:
+ os.environ["EDK_SOURCE"] = os.environ["ECP_SOURCE"]
+
+ #
+ # Unify case of characters on case-insensitive systems
+ #
+ EfiSourceDir = os.path.normcase(os.path.normpath(os.environ["EFI_SOURCE"]))
+ EdkSourceDir = os.path.normcase(os.path.normpath(os.environ["EDK_SOURCE"]))
+ EcpSourceDir = os.path.normcase(os.path.normpath(os.environ["ECP_SOURCE"]))
+
+ os.environ["EFI_SOURCE"] = EfiSourceDir
+ os.environ["EDK_SOURCE"] = EdkSourceDir
+ os.environ["ECP_SOURCE"] = EcpSourceDir
+ os.environ["EDK_TOOLS_PATH"] = os.path.normcase(os.environ["EDK_TOOLS_PATH"])
+
+ if not os.path.exists(EcpSourceDir):
+ EdkLogger.verbose("ECP_SOURCE = %s doesn't exist. R8 modules could not be built." % EcpSourceDir)
+ elif ' ' in EcpSourceDir:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in ECP_SOURCE path",
+ ExtraData=EcpSourceDir)
+ if not os.path.exists(EdkSourceDir):
+ if EdkSourceDir == EcpSourceDir:
+ EdkLogger.verbose("EDK_SOURCE = %s doesn't exist. R8 modules could not be built." % EdkSourceDir)
+ else:
+ EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE does not exist",
+ ExtraData=EdkSourceDir)
+ elif ' ' in EdkSourceDir:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in EDK_SOURCE path",
+ ExtraData=EdkSourceDir)
+ if not os.path.exists(EfiSourceDir):
+ if EfiSourceDir == EcpSourceDir:
+ EdkLogger.verbose("EFI_SOURCE = %s doesn't exist. R8 modules could not be built." % EfiSourceDir)
+ else:
+ EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE does not exist",
+ ExtraData=EfiSourceDir)
+ elif ' ' in EfiSourceDir:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in EFI_SOURCE path",
+ ExtraData=EfiSourceDir)
+
+ # change absolute path to relative path to WORKSPACE
+ if EfiSourceDir.upper().find(WorkspaceDir.upper()) != 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE is not under WORKSPACE",
+ ExtraData="WORKSPACE = %s\n EFI_SOURCE = %s" % (WorkspaceDir, EfiSourceDir))
+ if EdkSourceDir.upper().find(WorkspaceDir.upper()) != 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE is not under WORKSPACE",
+ ExtraData="WORKSPACE = %s\n EDK_SOURCE = %s" % (WorkspaceDir, EdkSourceDir))
+ if EcpSourceDir.upper().find(WorkspaceDir.upper()) != 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "ECP_SOURCE is not under WORKSPACE",
+ ExtraData="WORKSPACE = %s\n ECP_SOURCE = %s" % (WorkspaceDir, EcpSourceDir))
+
+ # check EDK_TOOLS_PATH
+ if "EDK_TOOLS_PATH" not in os.environ:
+ EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
+ ExtraData="EDK_TOOLS_PATH")
+
+ # check PATH
+ if "PATH" not in os.environ:
+ EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",
+ ExtraData="PATH")
+
+ GlobalData.gWorkspace = WorkspaceDir
+ GlobalData.gEfiSource = EfiSourceDir
+ GlobalData.gEdkSource = EdkSourceDir
+ GlobalData.gEcpSource = EcpSourceDir
+
+## Get normalized file path
+#
+# Convert the path to be local format, and remove the WORKSPACE path at the
+# beginning if the file path is given in full path.
+#
+# @param FilePath File path to be normalized
+# @param Workspace Workspace path which the FilePath will be checked against
+#
+# @retval string The normalized file path
+#
+def NormFile(FilePath, Workspace):
+ # check if the path is absolute or relative
+ if os.path.isabs(FilePath):
+ FileFullPath = os.path.normpath(FilePath)
+ else:
+ FileFullPath = os.path.normpath(os.path.join(Workspace, FilePath))
+
+ # check if the file path exists or not
+ if not os.path.isfile(FileFullPath):
+ EdkLogger.error("build", FILE_NOT_FOUND, ExtraData="\t%s (Please give file in absolute path or relative to WORKSPACE)" % FileFullPath)
+
+ # remove workspace directory from the beginning part of the file path
+ if Workspace[-1] in ["\\", "/"]:
+ return FileFullPath[len(Workspace):]
+ else:
+ return FileFullPath[(len(Workspace) + 1):]
+
+## Get the output of an external program
+#
+# This is the entrance method of thread reading output of an external program and
+# putting them in STDOUT/STDERR of current program.
+#
+# @param From The stream message read from
+# @param To The stream message put on
+# @param ExitFlag The flag used to indicate stopping reading
+#
+def ReadMessage(From, To, ExitFlag):
+ while True:
+ # read one line a time
+ Line = From.readline()
+ # empty string means "end"
+ if Line != None and Line != "":
+ To(Line.rstrip())
+ else:
+ break
+ if ExitFlag.isSet():
+ break
+
+## Launch an external program
+#
+# This method will call subprocess.Popen to execute an external program with
+# given options in specified directory. Because of the dead-lock issue during
+# redirecting output of the external program, threads are used to to do the
+# redirection work.
+#
+# @param Command A list or string containing the call of the program
+# @param WorkingDir The directory in which the program will be running
+#
+def LaunchCommand(Command, WorkingDir):
+ # if working directory doesn't exist, Popen() will raise an exception
+ if not os.path.isdir(WorkingDir):
+ EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=WorkingDir)
+
+ Proc = None
+ EndOfProcedure = None
+ try:
+ # launch the command
+ Proc = Popen(Command, stdout=PIPE, stderr=PIPE, env=os.environ, cwd=WorkingDir, bufsize=-1)
+
+ # launch two threads to read the STDOUT and STDERR
+ EndOfProcedure = Event()
+ EndOfProcedure.clear()
+ if Proc.stdout:
+ StdOutThread = Thread(target=ReadMessage, args=(Proc.stdout, EdkLogger.info, EndOfProcedure))
+ StdOutThread.setName("STDOUT-Redirector")
+ StdOutThread.setDaemon(False)
+ StdOutThread.start()
+
+ if Proc.stderr:
+ StdErrThread = Thread(target=ReadMessage, args=(Proc.stderr, EdkLogger.quiet, EndOfProcedure))
+ StdErrThread.setName("STDERR-Redirector")
+ StdErrThread.setDaemon(False)
+ StdErrThread.start()
+
+ # waiting for program exit
+ Proc.wait()
+ except: # in case of aborting
+ # terminate the threads redirecting the program output
+ if EndOfProcedure != None:
+ EndOfProcedure.set()
+ if Proc == None:
+ if type(Command) != type(""):
+ Command = " ".join(Command)
+ EdkLogger.error("build", COMMAND_FAILURE, "Failed to start command", ExtraData="%s [%s]" % (Command, WorkingDir))
+
+ if Proc.stdout:
+ StdOutThread.join()
+ if Proc.stderr:
+ StdErrThread.join()
+
+ # check the return code of the program
+ if Proc.returncode != 0:
+ if type(Command) != type(""):
+ Command = " ".join(Command)
+ EdkLogger.error("build", COMMAND_FAILURE, ExtraData="%s [%s]" % (Command, WorkingDir))
+
+## The smallest unit that can be built in multi-thread build mode
+#
+# This is the base class of build unit. The "Obj" parameter must provide
+# __str__(), __eq__() and __hash__() methods. Otherwise there could be build units
+# missing build.
+#
+# Currently the "Obj" should be only ModuleAutoGen or PlatformAutoGen objects.
+#
+class BuildUnit:
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Obj The object the build is working on
+ # @param Target The build target name, one of gSupportedTarget
+ # @param Dependency The BuildUnit(s) which must be completed in advance
+ # @param WorkingDir The directory build command starts in
+ #
+ def __init__(self, Obj, BuildCommand, Target, Dependency, WorkingDir="."):
+ self.BuildObject = Obj
+ self.Dependency = Dependency
+ self.WorkingDir = WorkingDir
+ self.Target = Target
+ self.BuildCommand = BuildCommand
+ if BuildCommand == None or len(BuildCommand) == 0:
+ EdkLogger.error("build", OPTION_MISSING, "No build command found for",
+ ExtraData=str(Obj))
+
+ ## str() method
+ #
+ # It just returns the string representaion of self.BuildObject
+ #
+ # @param self The object pointer
+ #
+ def __str__(self):
+ return str(self.BuildObject)
+
+ ## "==" operator method
+ #
+ # It just compares self.BuildObject with "Other". So self.BuildObject must
+ # provide its own __eq__() method.
+ #
+ # @param self The object pointer
+ # @param Other The other BuildUnit object compared to
+ #
+ def __eq__(self, Other):
+ return Other != None and self.BuildObject == Other.BuildObject \
+ and self.BuildObject.Arch == Other.BuildObject.Arch
+
+ ## hash() method
+ #
+ # It just returns the hash value of self.BuildObject which must be hashable.
+ #
+ # @param self The object pointer
+ #
+ def __hash__(self):
+ return hash(self.BuildObject) + hash(self.BuildObject.Arch)
+
+ def __repr__(self):
+ return repr(self.BuildObject)
+
+## The smallest module unit that can be built by nmake/make command in multi-thread build mode
+#
+# This class is for module build by nmake/make build system. The "Obj" parameter
+# must provide __str__(), __eq__() and __hash__() methods. Otherwise there could
+# be make units missing build.
+#
+# Currently the "Obj" should be only ModuleAutoGen object.
+#
+class ModuleMakeUnit(BuildUnit):
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Obj The ModuleAutoGen object the build is working on
+ # @param Target The build target name, one of gSupportedTarget
+ #
+ def __init__(self, Obj, Target):
+ Dependency = [ModuleMakeUnit(La, Target) for La in Obj.LibraryAutoGenList]
+ BuildUnit.__init__(self, Obj, Obj.BuildCommand, Target, Dependency, Obj.MakeFileDir)
+ if Target in [None, "", "all"]:
+ self.Target = "tbuild"
+
+## The smallest platform unit that can be built by nmake/make command in multi-thread build mode
+#
+# This class is for platform build by nmake/make build system. The "Obj" parameter
+# must provide __str__(), __eq__() and __hash__() methods. Otherwise there could
+# be make units missing build.
+#
+# Currently the "Obj" should be only PlatformAutoGen object.
+#
+class PlatformMakeUnit(BuildUnit):
+ ## The constructor
+ #
+ # @param self The object pointer
+ # @param Obj The PlatformAutoGen object the build is working on
+ # @param Target The build target name, one of gSupportedTarget
+ #
+ def __init__(self, Obj, Target):
+ Dependency = [ModuleMakeUnit(Lib, Target) for Lib in self.BuildObject.LibraryAutoGenList]
+ Dependency.extend([ModuleMakeUnit(Mod, Target) for Mod in self.BuildObject.ModuleAutoGenList])
+ BuildUnit.__init__(self, Obj, Obj.BuildCommand, Target, Dependency, Obj.MakeFileDir)
+
+## The class representing the task of a module build or platform build
+#
+# This class manages the build tasks in multi-thread build mode. Its jobs include
+# scheduling thread running, catching thread error, monitor the thread status, etc.
+#
+class BuildTask:
+ # queue for tasks waiting for schedule
+ _PendingQueue = sdict()
+ _PendingQueueLock = threading.Lock()
+
+ # queue for tasks ready for running
+ _ReadyQueue = sdict()
+ _ReadyQueueLock = threading.Lock()
+
+ # queue for run tasks
+ _RunningQueue = sdict()
+ _RunningQueueLock = threading.Lock()
+
+ # queue containing all build tasks, in case duplicate build
+ _TaskQueue = sdict()
+
+ # flag indicating error occurs in a running thread
+ _ErrorFlag = threading.Event()
+ _ErrorFlag.clear()
+ _ErrorMessage = ""
+
+ # BoundedSemaphore object used to control the number of running threads
+ _Thread = None
+
+ # flag indicating if the scheduler is started or not
+ _SchedulerStopped = threading.Event()
+ _SchedulerStopped.set()
+
+ ## Start the task scheduler thread
+ #
+ # @param MaxThreadNumber The maximum thread number
+ # @param ExitFlag Flag used to end the scheduler
+ #
+ @staticmethod
+ def StartScheduler(MaxThreadNumber, ExitFlag):
+ SchedulerThread = Thread(target=BuildTask.Scheduler, args=(MaxThreadNumber, ExitFlag))
+ SchedulerThread.setName("Build-Task-Scheduler")
+ SchedulerThread.setDaemon(False)
+ SchedulerThread.start()
+ # wait for the scheduler to be started, especially useful in Linux
+ while not BuildTask.IsOnGoing():
+ time.sleep(0.01)
+
+ ## Scheduler method
+ #
+ # @param MaxThreadNumber The maximum thread number
+ # @param ExitFlag Flag used to end the scheduler
+ #
+ @staticmethod
+ def Scheduler(MaxThreadNumber, ExitFlag):
+ BuildTask._SchedulerStopped.clear()
+ try:
+ # use BoundedSemaphore to control the maximum running threads
+ BuildTask._Thread = BoundedSemaphore(MaxThreadNumber)
+ #
+ # scheduling loop, which will exits when no pending/ready task and
+ # indicated to do so, or there's error in running thread
+ #
+ while (len(BuildTask._PendingQueue) > 0 or len(BuildTask._ReadyQueue) > 0 \
+ or not ExitFlag.isSet()) and not BuildTask._ErrorFlag.isSet():
+ EdkLogger.debug(EdkLogger.DEBUG_8, "Pending Queue (%d), Ready Queue (%d)"
+ % (len(BuildTask._PendingQueue), len(BuildTask._ReadyQueue)))
+
+ # get all pending tasks
+ BuildTask._PendingQueueLock.acquire()
+ BuildObjectList = BuildTask._PendingQueue.keys()
+ #
+ # check if their dependency is resolved, and if true, move them
+ # into ready queue
+ #
+ for BuildObject in BuildObjectList:
+ Bt = BuildTask._PendingQueue[BuildObject]
+ if Bt.IsReady():
+ BuildTask._ReadyQueue[BuildObject] = BuildTask._PendingQueue.pop(BuildObject)
+ BuildTask._PendingQueueLock.release()
+
+ # launch build thread until the maximum number of threads is reached
+ while not BuildTask._ErrorFlag.isSet():
+ # empty ready queue, do nothing further
+ if len(BuildTask._ReadyQueue) == 0:
+ break
+
+ # wait for active thread(s) exit
+ BuildTask._Thread.acquire(True)
+
+ # start a new build thread
+ Bo = BuildTask._ReadyQueue.keys()[0]
+ Bt = BuildTask._ReadyQueue.pop(Bo)
+
+ # move into running queue
+ BuildTask._RunningQueueLock.acquire()
+ BuildTask._RunningQueue[Bo] = Bt
+ BuildTask._RunningQueueLock.release()
+
+ Bt.Start()
+ # avoid tense loop
+ time.sleep(0.01)
+
+ # avoid tense loop
+ time.sleep(0.01)
+
+ # wait for all running threads exit
+ if BuildTask._ErrorFlag.isSet():
+ EdkLogger.quiet("\nWaiting for all build threads exit...")
+ # while not BuildTask._ErrorFlag.isSet() and \
+ while len(BuildTask._RunningQueue) > 0:
+ EdkLogger.verbose("Waiting for thread ending...(%d)" % len(BuildTask._RunningQueue))
+ EdkLogger.debug(EdkLogger.DEBUG_8, "Threads [%s]" % ", ".join([Th.getName() for Th in threading.enumerate()]))
+ # avoid tense loop
+ time.sleep(0.1)
+ except BaseException, X:
+ #
+ # TRICK: hide the output of threads left runing, so that the user can
+ # catch the error message easily
+ #
+ EdkLogger.SetLevel(EdkLogger.ERROR)
+ BuildTask._ErrorFlag.set()
+ BuildTask._ErrorMessage = "build thread scheduler error\n\t%s" % str(X)
+
+ BuildTask._PendingQueue.clear()
+ BuildTask._ReadyQueue.clear()
+ BuildTask._RunningQueue.clear()
+ BuildTask._TaskQueue.clear()
+ BuildTask._SchedulerStopped.set()
+
+ ## Wait for all running method exit
+ #
+ @staticmethod
+ def WaitForComplete():
+ BuildTask._SchedulerStopped.wait()
+
+ ## Check if the scheduler is running or not
+ #
+ @staticmethod
+ def IsOnGoing():
+ return not BuildTask._SchedulerStopped.isSet()
+
+ ## Abort the build
+ @staticmethod
+ def Abort():
+ if BuildTask.IsOnGoing():
+ BuildTask._ErrorFlag.set()
+ BuildTask.WaitForComplete()
+
+ ## Check if there's error in running thread
+ #
+ # Since the main thread cannot catch exceptions in other thread, we have to
+ # use threading.Event to communicate this formation to main thread.
+ #
+ @staticmethod
+ def HasError():
+ return BuildTask._ErrorFlag.isSet()
+
+ ## Get error message in running thread
+ #
+ # Since the main thread cannot catch exceptions in other thread, we have to
+ # use a static variable to communicate this message to main thread.
+ #
+ @staticmethod
+ def GetErrorMessage():
+ return BuildTask._ErrorMessage
+
+ ## Factory method to create a BuildTask object
+ #
+ # This method will check if a module is building or has been built. And if
+ # true, just return the associated BuildTask object in the _TaskQueue. If
+ # not, create and return a new BuildTask object. The new BuildTask object
+ # will be appended to the _PendingQueue for scheduling later.
+ #
+ # @param BuildItem A BuildUnit object representing a build object
+ # @param Dependency The dependent build object of BuildItem
+ #
+ @staticmethod
+ def New(BuildItem, Dependency=None):
+ if BuildItem in BuildTask._TaskQueue:
+ Bt = BuildTask._TaskQueue[BuildItem]
+ return Bt
+
+ Bt = BuildTask()
+ Bt._Init(BuildItem, Dependency)
+ BuildTask._TaskQueue[BuildItem] = Bt
+
+ BuildTask._PendingQueueLock.acquire()
+ BuildTask._PendingQueue[BuildItem] = Bt
+ BuildTask._PendingQueueLock.release()
+
+ return Bt
+
+ ## The real constructor of BuildTask
+ #
+ # @param BuildItem A BuildUnit object representing a build object
+ # @param Dependency The dependent build object of BuildItem
+ #
+ def _Init(self, BuildItem, Dependency=None):
+ self.BuildItem = BuildItem
+
+ self.DependencyList = []
+ if Dependency == None:
+ Dependency = BuildItem.Dependency
+ else:
+ Dependency.extend(BuildItem.Dependency)
+ self.AddDependency(Dependency)
+ # flag indicating build completes, used to avoid unnecessary re-build
+ self.CompleteFlag = False
+
+ ## Check if all dependent build tasks are completed or not
+ #
+ def IsReady(self):
+ ReadyFlag = True
+ for Dep in self.DependencyList:
+ if Dep.CompleteFlag == True:
+ continue
+ ReadyFlag = False
+ break
+
+ return ReadyFlag
+
+ ## Add dependent build task
+ #
+ # @param Dependency The list of dependent build objects
+ #
+ def AddDependency(self, Dependency):
+ for Dep in Dependency:
+ self.DependencyList.append(BuildTask.New(Dep)) # BuildTask list
+
+ ## The thread wrapper of LaunchCommand function
+ #
+ # @param Command A list or string contains the call of the command
+ # @param WorkingDir The directory in which the program will be running
+ #
+ def _CommandThread(self, Command, WorkingDir):
+ try:
+ LaunchCommand(Command, WorkingDir)
+ self.CompleteFlag = True
+ except:
+ #
+ # TRICK: hide the output of threads left runing, so that the user can
+ # catch the error message easily
+ #
+ if not BuildTask._ErrorFlag.isSet():
+ GlobalData.gBuildingModule = "%s [%s, %s, %s]" % (str(self.BuildItem.BuildObject),
+ self.BuildItem.BuildObject.Arch,
+ self.BuildItem.BuildObject.ToolChain,
+ self.BuildItem.BuildObject.BuildTarget
+ )
+ EdkLogger.SetLevel(EdkLogger.ERROR)
+ BuildTask._ErrorFlag.set()
+ BuildTask._ErrorMessage = "%s broken\n %s [%s]" % \
+ (threading.currentThread().getName(), Command, WorkingDir)
+ # indicate there's a thread is available for another build task
+ BuildTask._RunningQueueLock.acquire()
+ BuildTask._RunningQueue.pop(self.BuildItem)
+ BuildTask._RunningQueueLock.release()
+ BuildTask._Thread.release()
+
+ ## Start build task thread
+ #
+ def Start(self):
+ EdkLogger.quiet("Building ... %s" % repr(self.BuildItem))
+ Command = self.BuildItem.BuildCommand + [self.BuildItem.Target]
+ self.BuildTread = Thread(target=self._CommandThread, args=(Command, self.BuildItem.WorkingDir))
+ self.BuildTread.setName("build thread")
+ self.BuildTread.setDaemon(False)
+ self.BuildTread.start()
+
+## The class contains the information related to EFI image
+#
+class PeImageInfo():
+ ## Constructor
+ #
+ # Constructor will load all required image information.
+ #
+ # @param BaseName The full file path of image.
+ # @param Guid The GUID for image.
+ # @param Arch Arch of this image.
+ # @param OutpuDir The output directory for image.
+ # @param ImageClass PeImage Information
+ #
+ def __init__(self, BaseName, Guid, Arch, OutpuDir, ImageClass):
+ self.BaseName = BaseName
+ self.Guid = Guid
+ self.Arch = Arch
+ self.OutpuDir = OutpuDir
+ self.Image = ImageClass
+ self.Image.Size = (self.Image.Size / 0x1000 + 1) * 0x1000
+
+## The class implementing the EDK2 build process
+#
+# The build process includes:
+# 1. Load configuration from target.txt and tools_def.txt in $(WORKSPACE)/Conf
+# 2. Parse DSC file of active platform
+# 3. Parse FDF file if any
+# 4. Establish build database, including parse all other files (module, package)
+# 5. Create AutoGen files (C code file, depex file, makefile) if necessary
+# 6. Call build command
+#
+class Build():
+ ## Constructor
+ #
+ # Constructor will load all necessary configurations, parse platform, modules
+ # and packages and the establish a database for AutoGen.
+ #
+ # @param Target The build command target, one of gSupportedTarget
+ # @param WorkspaceDir The directory of workspace
+ # @param Platform The DSC file of active platform
+ # @param Module The INF file of active module, if any
+ # @param Arch The Arch list of platform or module
+ # @param ToolChain The name list of toolchain
+ # @param BuildTarget The "DEBUG" or "RELEASE" build
+ # @param FlashDefinition The FDF file of active platform
+ # @param FdList=[] The FD names to be individually built
+ # @param FvList=[] The FV names to be individually built
+ # @param MakefileType The type of makefile (for MSFT make or GNU make)
+ # @param SilentMode Indicate multi-thread build mode
+ # @param ThreadNumber The maximum number of thread if in multi-thread build mode
+ # @param SkipAutoGen Skip AutoGen step
+ # @param Reparse Re-parse all meta files
+ # @param SkuId SKU id from command line
+ #
+ def __init__(self, Target, WorkspaceDir, Platform, Module, Arch, ToolChain,
+ BuildTarget, FlashDefinition, FdList=[], FvList=[],
+ MakefileType="nmake", SilentMode=False, ThreadNumber=2,
+ SkipAutoGen=False, Reparse=False, SkuId=None,
+ ReportFile=None, ReportType=None):
+
+ self.WorkspaceDir = WorkspaceDir
+ self.Target = Target
+ self.PlatformFile = Platform
+ self.ModuleFile = Module
+ self.ArchList = Arch
+ self.ToolChainList = ToolChain
+ self.BuildTargetList= BuildTarget
+ self.Fdf = FlashDefinition
+ self.FdList = FdList
+ self.FvList = FvList
+ self.MakefileType = MakefileType
+ self.SilentMode = SilentMode
+ self.ThreadNumber = ThreadNumber
+ self.SkipAutoGen = SkipAutoGen
+ self.Reparse = Reparse
+ self.SkuId = SkuId
+ self.SpawnMode = True
+ self.BuildReport = BuildReport(ReportFile, ReportType)
+ self.TargetTxt = TargetTxtClassObject()
+ self.ToolDef = ToolDefClassObject()
+ self.Db = WorkspaceDatabase(None, GlobalData.gGlobalDefines, self.Reparse)
+ #self.Db = WorkspaceDatabase(None, {}, self.Reparse)
+ self.BuildDatabase = self.Db.BuildObject
+ self.Platform = None
+ self.LoadFixAddress = 0
+
+ # print dot charater during doing some time-consuming work
+ self.Progress = Utils.Progressor()
+
+ # parse target.txt, tools_def.txt, and platform file
+ #self.RestoreBuildData()
+ self.LoadConfiguration()
+ self.InitBuild()
+
+ # print current build environment and configuration
+ EdkLogger.quiet("%-24s = %s" % ("WORKSPACE", os.environ["WORKSPACE"]))
+ EdkLogger.quiet("%-24s = %s" % ("ECP_SOURCE", os.environ["ECP_SOURCE"]))
+ EdkLogger.quiet("%-24s = %s" % ("EDK_SOURCE", os.environ["EDK_SOURCE"]))
+ EdkLogger.quiet("%-24s = %s" % ("EFI_SOURCE", os.environ["EFI_SOURCE"]))
+ EdkLogger.quiet("%-24s = %s" % ("EDK_TOOLS_PATH", os.environ["EDK_TOOLS_PATH"]))
+
+ EdkLogger.info('\n%-24s = %s' % ("TARGET_ARCH", ' '.join(self.ArchList)))
+ EdkLogger.info('%-24s = %s' % ("TARGET", ' '.join(self.BuildTargetList)))
+ EdkLogger.info('%-24s = %s' % ("TOOL_CHAIN_TAG", ' '.join(self.ToolChainList)))
+
+ EdkLogger.info('\n%-24s = %s' % ("Active Platform", self.PlatformFile))
+
+ if self.Fdf != None and self.Fdf != "":
+ EdkLogger.info('%-24s = %s' % ("Flash Image Definition", self.Fdf))
+
+ if self.ModuleFile != None and self.ModuleFile != "":
+ EdkLogger.info('%-24s = %s' % ("Active Module", self.ModuleFile))
+
+ os.chdir(self.WorkspaceDir)
+ self.Progress.Start("\nProcessing meta-data")
+
+ ## Load configuration
+ #
+ # This method will parse target.txt and get the build configurations.
+ #
+ def LoadConfiguration(self):
+ #
+ # Check target.txt and tools_def.txt and Init them
+ #
+ BuildConfigurationFile = os.path.normpath(os.path.join(self.WorkspaceDir, gBuildConfiguration))
+ if os.path.isfile(BuildConfigurationFile) == True:
+ StatusCode = self.TargetTxt.LoadTargetTxtFile(BuildConfigurationFile)
+
+ ToolDefinitionFile = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF]
+ if ToolDefinitionFile == '':
+ ToolDefinitionFile = gToolsDefinition
+ ToolDefinitionFile = os.path.normpath(os.path.join(self.WorkspaceDir, ToolDefinitionFile))
+ if os.path.isfile(ToolDefinitionFile) == True:
+ StatusCode = self.ToolDef.LoadToolDefFile(ToolDefinitionFile)
+ else:
+ EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=ToolDefinitionFile)
+ else:
+ EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=BuildConfigurationFile)
+
+ # if no ARCH given in command line, get it from target.txt
+ if self.ArchList == None or len(self.ArchList) == 0:
+ self.ArchList = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TARGET_ARCH]
+
+ # if no build target given in command line, get it from target.txt
+ if self.BuildTargetList == None or len(self.BuildTargetList) == 0:
+ self.BuildTargetList = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TARGET]
+
+ # if no tool chain given in command line, get it from target.txt
+ if self.ToolChainList == None or len(self.ToolChainList) == 0:
+ self.ToolChainList = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_TAG]
+ if self.ToolChainList == None or len(self.ToolChainList) == 0:
+ EdkLogger.error("build", RESOURCE_NOT_AVAILABLE, ExtraData="No toolchain given. Don't know how to build.\n")
+
+ # check if the tool chains are defined or not
+ NewToolChainList = []
+ for ToolChain in self.ToolChainList:
+ if ToolChain not in self.ToolDef.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG]:
+ EdkLogger.warn("build", "Tool chain [%s] is not defined" % ToolChain)
+ else:
+ NewToolChainList.append(ToolChain)
+ # if no tool chain available, break the build
+ if len(NewToolChainList) == 0:
+ EdkLogger.error("build", RESOURCE_NOT_AVAILABLE,
+ ExtraData="[%s] not defined. No toolchain available for build!\n" % ", ".join(self.ToolChainList))
+ else:
+ self.ToolChainList = NewToolChainList
+
+ if self.ThreadNumber == None:
+ self.ThreadNumber = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER]
+ if self.ThreadNumber == '':
+ self.ThreadNumber = 0
+ else:
+ self.ThreadNumber = int(self.ThreadNumber, 0)
+
+ if self.ThreadNumber == 0:
+ self.ThreadNumber = 1
+
+ if not self.PlatformFile:
+ PlatformFile = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_ACTIVE_PLATFORM]
+ if not PlatformFile:
+ # Try to find one in current directory
+ WorkingDirectory = os.getcwd()
+ FileList = glob.glob(os.path.normpath(os.path.join(WorkingDirectory, '*.dsc')))
+ FileNum = len(FileList)
+ if FileNum >= 2:
+ EdkLogger.error("build", OPTION_MISSING,
+ ExtraData="There are %d DSC files in %s. Use '-p' to specify one.\n" % (FileNum, WorkingDirectory))
+ elif FileNum == 1:
+ PlatformFile = FileList[0]
+ else:
+ EdkLogger.error("build", RESOURCE_NOT_AVAILABLE,
+ ExtraData="No active platform specified in target.txt or command line! Nothing can be built.\n")
+
+ self.PlatformFile = PathClass(NormFile(PlatformFile, self.WorkspaceDir), self.WorkspaceDir)
+ ErrorCode, ErrorInfo = self.PlatformFile.Validate(".dsc", False)
+ if ErrorCode != 0:
+ EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
+
+ ## Initialize build configuration
+ #
+ # This method will parse DSC file and merge the configurations from
+ # command line and target.txt, then get the final build configurations.
+ #
+ def InitBuild(self):
+ ErrorCode, ErrorInfo = self.PlatformFile.Validate(".dsc")
+ if ErrorCode != 0:
+ EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
+
+ # create metafile database
+ self.Db.InitDatabase()
+
+ # we need information in platform description file to determine how to build
+ self.Platform = self.BuildDatabase[self.PlatformFile, 'COMMON']
+ if not self.Fdf:
+ self.Fdf = self.Platform.FlashDefinition
+
+ LoadFixAddressString = None
+ if TAB_FIX_LOAD_TOP_MEMORY_ADDRESS in GlobalData.gGlobalDefines:
+ LoadFixAddressString = GlobalData.gGlobalDefines[TAB_FIX_LOAD_TOP_MEMORY_ADDRESS]
+ else:
+ LoadFixAddressString = self.Platform.LoadFixAddress
+
+ if LoadFixAddressString != None and LoadFixAddressString != '':
+ try:
+ if LoadFixAddressString.upper().startswith('0X'):
+ self.LoadFixAddress = int (LoadFixAddressString, 16)
+ else:
+ self.LoadFixAddress = int (LoadFixAddressString)
+ except:
+ EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS %s is not valid dec or hex string" % (LoadFixAddressString))
+ if self.LoadFixAddress < 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS is set to the invalid negative value %s" % (LoadFixAddressString))
+ if self.LoadFixAddress != 0xFFFFFFFFFFFFFFFF and self.LoadFixAddress % 0x1000 != 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS is set to the invalid unaligned 4K value %s" % (LoadFixAddressString))
+
+ if self.SkuId == None or self.SkuId == '':
+ self.SkuId = self.Platform.SkuName
+
+ # check FD/FV build target
+ if self.Fdf == None or self.Fdf == "":
+ if self.FdList != []:
+ EdkLogger.info("No flash definition file found. FD [%s] will be ignored." % " ".join(self.FdList))
+ self.FdList = []
+ if self.FvList != []:
+ EdkLogger.info("No flash definition file found. FV [%s] will be ignored." % " ".join(self.FvList))
+ self.FvList = []
+ else:
+ FdfParserObj = FdfParser(str(self.Fdf))
+ FdfParserObj.ParseFile()
+ for fvname in self.FvList:
+ if fvname.upper() not in FdfParserObj.Profile.FvDict.keys():
+ EdkLogger.error("build", OPTION_VALUE_INVALID,
+ "No such an FV in FDF file: %s" % fvname)
+
+ #
+ # Merge Arch
+ #
+ if self.ArchList == None or len(self.ArchList) == 0:
+ ArchList = set(self.Platform.SupArchList)
+ else:
+ ArchList = set(self.ArchList) & set(self.Platform.SupArchList)
+ if len(ArchList) == 0:
+ EdkLogger.error("build", PARAMETER_INVALID,
+ ExtraData = "Active platform supports [%s] only, but [%s] is given."
+ % (" ".join(self.Platform.SupArchList), " ".join(self.ArchList)))
+ elif len(ArchList) != len(self.ArchList):
+ SkippedArchList = set(self.ArchList).symmetric_difference(set(self.Platform.SupArchList))
+ EdkLogger.verbose("\nArch [%s] is ignored because active platform supports [%s] but [%s] is specified !"
+ % (" ".join(SkippedArchList), " ".join(self.Platform.SupArchList), " ".join(self.ArchList)))
+ self.ArchList = tuple(ArchList)
+
+ # Merge build target
+ if self.BuildTargetList == None or len(self.BuildTargetList) == 0:
+ BuildTargetList = self.Platform.BuildTargets
+ else:
+ BuildTargetList = list(set(self.BuildTargetList) & set(self.Platform.BuildTargets))
+ if BuildTargetList == []:
+ EdkLogger.error("build", PARAMETER_INVALID, "Active platform only supports [%s], but [%s] is given"
+ % (" ".join(self.Platform.BuildTargets), " ".join(self.BuildTargetList)))
+ self.BuildTargetList = BuildTargetList
+
+ ## Build a module or platform
+ #
+ # Create autogen code and makfile for a module or platform, and the launch
+ # "make" command to build it
+ #
+ # @param Target The target of build command
+ # @param Platform The platform file
+ # @param Module The module file
+ # @param BuildTarget The name of build target, one of "DEBUG", "RELEASE"
+ # @param ToolChain The name of toolchain to build
+ # @param Arch The arch of the module/platform
+ # @param CreateDepModuleCodeFile Flag used to indicate creating code
+ # for dependent modules/Libraries
+ # @param CreateDepModuleMakeFile Flag used to indicate creating makefile
+ # for dependent modules/Libraries
+ #
+ def _Build(self, Target, AutoGenObject, CreateDepsCodeFile=True, CreateDepsMakeFile=True):
+ if AutoGenObject == None:
+ return False
+
+ # skip file generation for cleanxxx targets, run and fds target
+ if Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
+ # for target which must generate AutoGen code and makefile
+ if not self.SkipAutoGen or Target == 'genc':
+ self.Progress.Start("Generating code")
+ AutoGenObject.CreateCodeFile(CreateDepsCodeFile)
+ self.Progress.Stop("done!")
+ if Target == "genc":
+ return True
+
+ if not self.SkipAutoGen or Target == 'genmake':
+ self.Progress.Start("Generating makefile")
+ AutoGenObject.CreateMakeFile(CreateDepsMakeFile)
+ self.Progress.Stop("done!")
+ if Target == "genmake":
+ return True
+ else:
+ # always recreate top/platform makefile when clean, just in case of inconsistency
+ AutoGenObject.CreateCodeFile(False)
+ AutoGenObject.CreateMakeFile(False)
+
+ if EdkLogger.GetLevel() == EdkLogger.QUIET:
+ EdkLogger.quiet("Building ... %s" % repr(AutoGenObject))
+
+ BuildCommand = AutoGenObject.BuildCommand
+ if BuildCommand == None or len(BuildCommand) == 0:
+ EdkLogger.error("build", OPTION_MISSING, ExtraData="No MAKE command found for [%s, %s, %s]" % Key)
+
+ BuildCommand = BuildCommand + [Target]
+ LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir)
+ if Target == 'cleanall':
+ try:
+ #os.rmdir(AutoGenObject.BuildDir)
+ RemoveDirectory(AutoGenObject.BuildDir, True)
+ except WindowsError, X:
+ EdkLogger.error("build", FILE_DELETE_FAILURE, ExtraData=str(X))
+ return True
+
+ ## Rebase module image and Get function address for the inpug module list.
+ #
+ def _RebaseModule (self, MapBuffer, BaseAddress, ModuleList, AddrIsOffset = True, ModeIsSmm = False):
+ if ModeIsSmm:
+ AddrIsOffset = False
+ InfFileNameList = ModuleList.keys()
+ #InfFileNameList.sort()
+ for InfFile in InfFileNameList:
+ sys.stdout.write (".")
+ sys.stdout.flush()
+ ModuleInfo = ModuleList[InfFile]
+ ModuleName = ModuleInfo.BaseName
+ ## for SMM module in SMRAM, the SMRAM will be allocated from base to top.
+ if not ModeIsSmm:
+ BaseAddress = BaseAddress - ModuleInfo.Image.Size
+ #
+ # Update Image to new BaseAddress by GenFw tool
+ #
+ LaunchCommand(["GenFw", "--rebase", str(BaseAddress), "-r", ModuleInfo.Image.FileName], ModuleInfo.OutpuDir)
+ else:
+ #
+ # Set new address to the section header only for SMM driver.
+ #
+ LaunchCommand(["GenFw", "--address", str(BaseAddress), "-r", ModuleInfo.Image.FileName], ModuleInfo.OutpuDir)
+ #
+ # Collect funtion address from Map file
+ #
+ ImageMapTable = ModuleInfo.Image.FileName.replace('.efi', '.map')
+ FunctionList = []
+ if os.path.exists(ImageMapTable):
+ OrigImageBaseAddress = 0
+ ImageMap = open (ImageMapTable, 'r')
+ for LinStr in ImageMap:
+ if len (LinStr.strip()) == 0:
+ continue
+ #
+ # Get the preferred address set on link time.
+ #
+ if LinStr.find ('Preferred load address is') != -1:
+ StrList = LinStr.split()
+ OrigImageBaseAddress = int (StrList[len(StrList) - 1], 16)
+
+ StrList = LinStr.split()
+ if len (StrList) > 4:
+ if StrList[3] == 'f' or StrList[3] =='F':
+ Name = StrList[1]
+ RelativeAddress = int (StrList[2], 16) - OrigImageBaseAddress
+ FunctionList.append ((Name, RelativeAddress))
+ if ModuleInfo.Arch == 'IPF' and Name.endswith('_ModuleEntryPoint'):
+ #
+ # Get the real entry point address for IPF image.
+ #
+ ModuleInfo.Image.EntryPoint = RelativeAddress
+ ImageMap.close()
+ #
+ # Add general information.
+ #
+ if ModeIsSmm:
+ MapBuffer.write('\n\n%s (Fixed SMRAM Offset, BaseAddress=0x%010X, EntryPoint=0x%010X)\n' % (ModuleName, BaseAddress, BaseAddress + ModuleInfo.Image.EntryPoint))
+ elif AddrIsOffset:
+ MapBuffer.write('\n\n%s (Fixed Memory Offset, BaseAddress=-0x%010X, EntryPoint=-0x%010X)\n' % (ModuleName, 0 - BaseAddress, 0 - (BaseAddress + ModuleInfo.Image.EntryPoint)))
+ else:
+ MapBuffer.write('\n\n%s (Fixed Memory Address, BaseAddress=0x%010X, EntryPoint=0x%010X)\n' % (ModuleName, BaseAddress, BaseAddress + ModuleInfo.Image.EntryPoint))
+ #
+ # Add guid and general seciton section.
+ #
+ TextSectionAddress = 0
+ DataSectionAddress = 0
+ for SectionHeader in ModuleInfo.Image.SectionHeaderList:
+ if SectionHeader[0] == '.text':
+ TextSectionAddress = SectionHeader[1]
+ elif SectionHeader[0] in ['.data', '.sdata']:
+ DataSectionAddress = SectionHeader[1]
+ if AddrIsOffset:
+ MapBuffer.write('(GUID=%s, .textbaseaddress=-0x%010X, .databaseaddress=-0x%010X)\n\n' % (ModuleInfo.Guid, 0 - (BaseAddress + TextSectionAddress), 0 - (BaseAddress + DataSectionAddress)))
+ else:
+ MapBuffer.write('(GUID=%s, .textbaseaddress=0x%010X, .databaseaddress=0x%010X)\n\n' % (ModuleInfo.Guid, BaseAddress + TextSectionAddress, BaseAddress + DataSectionAddress))
+ #
+ # Add funtion address
+ #
+ for Function in FunctionList:
+ if AddrIsOffset:
+ MapBuffer.write(' -0x%010X %s\n' % (0 - (BaseAddress + Function[1]), Function[0]))
+ else:
+ MapBuffer.write(' 0x%010X %s\n' % (BaseAddress + Function[1], Function[0]))
+ ImageMap.close()
+
+ #
+ # for SMM module in SMRAM, the SMRAM will be allocated from base to top.
+ #
+ if ModeIsSmm:
+ BaseAddress = BaseAddress + ModuleInfo.Image.Size
+
+ ## Collect MAP information of all FVs
+ #
+ def _CollectFvMapBuffer (self, MapBuffer, Wa):
+ if self.Fdf != '':
+ # First get the XIP base address for FV map file.
+ for FvName in Wa.FdfProfile.FvDict.keys():
+ FvMapBuffer = os.path.join(Wa.FvDir, FvName + '.Fv.map')
+ if not os.path.exists(FvMapBuffer):
+ continue
+ FvMap = open (FvMapBuffer, 'r')
+ #skip FV size information
+ FvMap.readline()
+ FvMap.readline()
+ FvMap.readline()
+ FvMap.readline()
+ MapBuffer.write(FvMap.read())
+ FvMap.close()
+
+ ## Collect MAP information of all modules
+ #
+ def _CollectModuleMapBuffer (self, MapBuffer, ModuleList):
+ sys.stdout.write ("Generate Load Module At Fix Address Map")
+ sys.stdout.flush()
+ PatchEfiImageList = []
+ PeiModuleList = {}
+ BtModuleList = {}
+ RtModuleList = {}
+ SmmModuleList = {}
+ PeiSize = 0
+ BtSize = 0
+ RtSize = 0
+ # reserve 4K size in SMRAM to make SMM module address not from 0.
+ SmmSize = 0x1000
+ IsIpfPlatform = False
+ if 'IPF' in self.ArchList:
+ IsIpfPlatform = True
+ for Module in ModuleList:
+ GlobalData.gProcessingFile = "%s [%s, %s, %s]" % (Module.MetaFile, Module.Arch, Module.ToolChain, Module.BuildTarget)
+
+ OutputImageFile = ''
+ for ResultFile in Module.CodaTargetList:
+ if str(ResultFile.Target).endswith('.efi'):
+ #
+ # module list for PEI, DXE, RUNTIME and SMM
+ #
+ OutputImageFile = os.path.join(Module.OutputDir, Module.Name + '.efi')
+ ImageClass = PeImageClass (OutputImageFile)
+ if not ImageClass.IsValid:
+ EdkLogger.error("build", FILE_PARSE_FAILURE, ExtraData=ImageClass.ErrorInfo)
+ ImageInfo = PeImageInfo(Module.Name, Module.Guid, Module.Arch, Module.OutputDir, ImageClass)
+ if Module.ModuleType in ['PEI_CORE', 'PEIM', 'COMBINED_PEIM_DRIVER','PIC_PEIM', 'RELOCATABLE_PEIM', 'DXE_CORE']:
+ PeiModuleList[Module.MetaFile] = ImageInfo
+ PeiSize += ImageInfo.Image.Size
+ elif Module.ModuleType in ['BS_DRIVER', 'DXE_DRIVER', 'UEFI_DRIVER']:
+ BtModuleList[Module.MetaFile] = ImageInfo
+ BtSize += ImageInfo.Image.Size
+ elif Module.ModuleType in ['DXE_RUNTIME_DRIVER', 'RT_DRIVER', 'DXE_SAL_DRIVER', 'SAL_RT_DRIVER']:
+ RtModuleList[Module.MetaFile] = ImageInfo
+ #IPF runtime driver needs to be at 2 page alignment.
+ if IsIpfPlatform and ImageInfo.Image.Size % 0x2000 != 0:
+ ImageInfo.Image.Size = (ImageInfo.Image.Size / 0x2000 + 1) * 0x2000
+ RtSize += ImageInfo.Image.Size
+ elif Module.ModuleType in ['SMM_CORE', 'DXE_SMM_DRIVER']:
+ SmmModuleList[Module.MetaFile] = ImageInfo
+ SmmSize += ImageInfo.Image.Size
+ if Module.ModuleType == 'DXE_SMM_DRIVER':
+ PiSpecVersion = 0
+ if 'PI_SPECIFICATION_VERSION' in Module.Module.Specification:
+ PiSpecVersion = Module.Module.Specification['PI_SPECIFICATION_VERSION']
+ # for PI specification < PI1.1, DXE_SMM_DRIVER also runs as BOOT time driver.
+ if PiSpecVersion < 0x0001000A:
+ BtModuleList[Module.MetaFile] = ImageInfo
+ BtSize += ImageInfo.Image.Size
+ break
+ #
+ # EFI image is final target.
+ # Check EFI image contains patchable FixAddress related PCDs.
+ #
+ if OutputImageFile != '':
+ ModuleIsPatch = False
+ for Pcd in Module.ModulePcdList:
+ if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE and Pcd.TokenCName in TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_LIST:
+ ModuleIsPatch = True
+ break
+ if not ModuleIsPatch:
+ for Pcd in Module.LibraryPcdList:
+ if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE and Pcd.TokenCName in TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_LIST:
+ ModuleIsPatch = True
+ break
+
+ if not ModuleIsPatch:
+ continue
+ #
+ # Module includes the patchable load fix address PCDs.
+ # It will be fixed up later.
+ #
+ PatchEfiImageList.append (OutputImageFile)
+
+ #
+ # Get Top Memory address
+ #
+ ReservedRuntimeMemorySize = 0
+ TopMemoryAddress = 0
+ if self.LoadFixAddress == 0xFFFFFFFFFFFFFFFF:
+ TopMemoryAddress = 0
+ else:
+ TopMemoryAddress = self.LoadFixAddress
+ if TopMemoryAddress < RtSize + BtSize + PeiSize:
+ EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS is too low to load driver")
+ # Make IPF runtime driver at 2 page alignment.
+ if IsIpfPlatform:
+ ReservedRuntimeMemorySize = TopMemoryAddress % 0x2000
+ RtSize = RtSize + ReservedRuntimeMemorySize
+
+ #
+ # Patch FixAddress related PCDs into EFI image
+ #
+ for EfiImage in PatchEfiImageList:
+ EfiImageMap = EfiImage.replace('.efi', '.map')
+ if not os.path.exists(EfiImageMap):
+ continue
+ #
+ # Get PCD offset in EFI image by GenPatchPcdTable function
+ #
+ PcdTable = parsePcdInfoFromMapFile(EfiImageMap, EfiImage)
+ #
+ # Patch real PCD value by PatchPcdValue tool
+ #
+ for PcdInfo in PcdTable:
+ ReturnValue = 0
+ if PcdInfo[0] == TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE:
+ ReturnValue, ErrorInfo = PatchBinaryFile (EfiImage, PcdInfo[1], TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE_DATA_TYPE, str (PeiSize/0x1000))
+ elif PcdInfo[0] == TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_DXE_PAGE_SIZE:
+ ReturnValue, ErrorInfo = PatchBinaryFile (EfiImage, PcdInfo[1], TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_DXE_PAGE_SIZE_DATA_TYPE, str (BtSize/0x1000))
+ elif PcdInfo[0] == TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE:
+ ReturnValue, ErrorInfo = PatchBinaryFile (EfiImage, PcdInfo[1], TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE_DATA_TYPE, str (RtSize/0x1000))
+ elif PcdInfo[0] == TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE and len (SmmModuleList) > 0:
+ ReturnValue, ErrorInfo = PatchBinaryFile (EfiImage, PcdInfo[1], TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE_DATA_TYPE, str (SmmSize/0x1000))
+ if ReturnValue != 0:
+ EdkLogger.error("build", PARAMETER_INVALID, "Patch PCD value failed", ExtraData=ErrorInfo)
+
+ MapBuffer.write('PEI_CODE_PAGE_NUMBER = 0x%x\n' % (PeiSize/0x1000))
+ MapBuffer.write('BOOT_CODE_PAGE_NUMBER = 0x%x\n' % (BtSize/0x1000))
+ MapBuffer.write('RUNTIME_CODE_PAGE_NUMBER = 0x%x\n' % (RtSize/0x1000))
+ if len (SmmModuleList) > 0:
+ MapBuffer.write('SMM_CODE_PAGE_NUMBER = 0x%x\n' % (SmmSize/0x1000))
+
+ PeiBaseAddr = TopMemoryAddress - RtSize - BtSize
+ BtBaseAddr = TopMemoryAddress - RtSize
+ RtBaseAddr = TopMemoryAddress - ReservedRuntimeMemorySize
+
+ self._RebaseModule (MapBuffer, PeiBaseAddr, PeiModuleList, TopMemoryAddress == 0)
+ self._RebaseModule (MapBuffer, BtBaseAddr, BtModuleList, TopMemoryAddress == 0)
+ self._RebaseModule (MapBuffer, RtBaseAddr, RtModuleList, TopMemoryAddress == 0)
+ self._RebaseModule (MapBuffer, 0x1000, SmmModuleList, AddrIsOffset = False, ModeIsSmm = True)
+ MapBuffer.write('\n\n')
+ sys.stdout.write ("\n")
+ sys.stdout.flush()
+
+ ## Save platform Map file
+ #
+ def _SaveMapFile (self, MapBuffer, Wa):
+ #
+ # Map file path is got.
+ #
+ MapFilePath = os.path.join(Wa.BuildDir, Wa.Name + '.map')
+ #
+ # Save address map into MAP file.
+ #
+ SaveFileOnChange(MapFilePath, MapBuffer.getvalue(), False)
+ MapBuffer.close()
+ sys.stdout.write ("\nLoad Module At Fix Address Map file saved to %s\n" %(MapFilePath))
+ sys.stdout.flush()
+
+ ## Build active platform for different build targets and different tool chains
+ #
+ def _BuildPlatform(self):
+ for BuildTarget in self.BuildTargetList:
+ for ToolChain in self.ToolChainList:
+ Wa = WorkspaceAutoGen(
+ self.WorkspaceDir,
+ self.Platform,
+ BuildTarget,
+ ToolChain,
+ self.ArchList,
+ self.BuildDatabase,
+ self.TargetTxt,
+ self.ToolDef,
+ self.Fdf,
+ self.FdList,
+ self.FvList,
+ self.SkuId
+ )
+ self.BuildReport.AddPlatformReport(Wa)
+ self.Progress.Stop("done!")
+ self._Build(self.Target, Wa)
+
+ # Create MAP file when Load Fix Address is enabled.
+ if self.Target in ["", "all", "fds"] and self.LoadFixAddress != 0:
+ for Arch in self.ArchList:
+ #
+ # Check whether the set fix address is above 4G for 32bit image.
+ #
+ if (Arch == 'IA32' or Arch == 'ARM') and self.LoadFixAddress != 0xFFFFFFFFFFFFFFFF and self.LoadFixAddress >= 0x100000000:
+ EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS can't be set to larger than or equal to 4G for the platorm with IA32 or ARM arch modules")
+ #
+ # Get Module List
+ #
+ ModuleList = []
+ for Pa in Wa.AutoGenObjectList:
+ for Ma in Pa.ModuleAutoGenList:
+ if Ma == None:
+ continue
+ if not Ma.IsLibrary:
+ ModuleList.append (Ma)
+
+ MapBuffer = StringIO('')
+ #
+ # Rebase module to the preferred memory address before GenFds
+ #
+ self._CollectModuleMapBuffer(MapBuffer, ModuleList)
+ if self.Fdf != '':
+ #
+ # create FDS again for the updated EFI image
+ #
+ self._Build("fds", Wa)
+ #
+ # Create MAP file for all platform FVs after GenFds.
+ #
+ self._CollectFvMapBuffer(MapBuffer, Wa)
+ #
+ # Save MAP buffer into MAP file.
+ #
+ self._SaveMapFile (MapBuffer, Wa)
+
+ ## Build active module for different build targets, different tool chains and different archs
+ #
+ def _BuildModule(self):
+ for BuildTarget in self.BuildTargetList:
+ for ToolChain in self.ToolChainList:
+ #
+ # module build needs platform build information, so get platform
+ # AutoGen first
+ #
+ Wa = WorkspaceAutoGen(
+ self.WorkspaceDir,
+ self.Platform,
+ BuildTarget,
+ ToolChain,
+ self.ArchList,
+ self.BuildDatabase,
+ self.TargetTxt,
+ self.ToolDef,
+ self.Fdf,
+ self.FdList,
+ self.FvList,
+ self.SkuId
+ )
+ self.BuildReport.AddPlatformReport(Wa)
+ Wa.CreateMakeFile(False)
+ self.Progress.Stop("done!")
+ MaList = []
+ for Arch in self.ArchList:
+ Ma = ModuleAutoGen(Wa, self.ModuleFile, BuildTarget, ToolChain, Arch, self.PlatformFile)
+ if Ma == None: continue
+ MaList.append(Ma)
+ self._Build(self.Target, Ma)
+ if MaList == []:
+ EdkLogger.error(
+ 'build',
+ BUILD_ERROR,
+ "Module for [%s] is not a component of active platform."\
+ " Please make sure that the ARCH and inf file path are"\
+ " given in the same as in [%s]" %\
+ (', '.join(self.ArchList), self.Platform),
+ ExtraData=self.ModuleFile
+ )
+ # Create MAP file when Load Fix Address is enabled.
+ if self.LoadFixAddress != 0 and self.Target == "fds" and self.Fdf != '':
+ for Arch in self.ArchList:
+ #
+ # Check whether the set fix address is above 4G for 32bit image.
+ #
+ if (Arch == 'IA32' or Arch == 'ARM') and self.LoadFixAddress != 0xFFFFFFFFFFFFFFFF and self.LoadFixAddress >= 0x100000000:
+ EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS can't be set to larger than or equal to 4G for the platorm with IA32 or ARM arch modules")
+ #
+ # Get Module List
+ #
+ ModuleList = []
+ for Pa in Wa.AutoGenObjectList:
+ for Ma in Pa.ModuleAutoGenList:
+ if Ma == None:
+ continue
+ if not Ma.IsLibrary:
+ ModuleList.append (Ma)
+
+ MapBuffer = StringIO('')
+ #
+ # Rebase module to the preferred memory address before GenFds
+ #
+ self._CollectModuleMapBuffer(MapBuffer, ModuleList)
+ #
+ # create FDS again for the updated EFI image
+ #
+ self._Build("fds", Wa)
+ #
+ # Create MAP file for all platform FVs after GenFds.
+ #
+ self._CollectFvMapBuffer(MapBuffer, Wa)
+ #
+ # Save MAP buffer into MAP file.
+ #
+ self._SaveMapFile (MapBuffer, Wa)
+
+ ## Build a platform in multi-thread mode
+ #
+ def _MultiThreadBuildPlatform(self):
+ for BuildTarget in self.BuildTargetList:
+ for ToolChain in self.ToolChainList:
+ Wa = WorkspaceAutoGen(
+ self.WorkspaceDir,
+ self.Platform,
+ BuildTarget,
+ ToolChain,
+ self.ArchList,
+ self.BuildDatabase,
+ self.TargetTxt,
+ self.ToolDef,
+ self.Fdf,
+ self.FdList,
+ self.FvList,
+ self.SkuId
+ )
+ self.BuildReport.AddPlatformReport(Wa)
+ Wa.CreateMakeFile(False)
+
+ # multi-thread exit flag
+ ExitFlag = threading.Event()
+ ExitFlag.clear()
+ for Arch in self.ArchList:
+ Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, ToolChain, Arch)
+ if Pa == None:
+ continue
+ for Module in Pa.Platform.Modules:
+ # Get ModuleAutoGen object to generate C code file and makefile
+ Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)
+ if Ma == None:
+ continue
+ # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'
+ if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
+ # for target which must generate AutoGen code and makefile
+ if not self.SkipAutoGen or self.Target == 'genc':
+ Ma.CreateCodeFile(True)
+ if self.Target == "genc":
+ continue
+
+ if not self.SkipAutoGen or self.Target == 'genmake':
+ Ma.CreateMakeFile(True)
+ if self.Target == "genmake":
+ continue
+ self.Progress.Stop("done!")
+ # Generate build task for the module
+ Bt = BuildTask.New(ModuleMakeUnit(Ma, self.Target))
+ # Break build if any build thread has error
+ if BuildTask.HasError():
+ # we need a full version of makefile for platform
+ ExitFlag.set()
+ BuildTask.WaitForComplete()
+ Pa.CreateMakeFile(False)
+ EdkLogger.error("build", BUILD_ERROR, "Failed to build module", ExtraData=GlobalData.gBuildingModule)
+ # Start task scheduler
+ if not BuildTask.IsOnGoing():
+ BuildTask.StartScheduler(self.ThreadNumber, ExitFlag)
+
+ # in case there's an interruption. we need a full version of makefile for platform
+ Pa.CreateMakeFile(False)
+ if BuildTask.HasError():
+ EdkLogger.error("build", BUILD_ERROR, "Failed to build module", ExtraData=GlobalData.gBuildingModule)
+
+ #
+ # All modules have been put in build tasks queue. Tell task scheduler
+ # to exit if all tasks are completed
+ #
+ ExitFlag.set()
+ BuildTask.WaitForComplete()
+
+ #
+ # Check for build error, and raise exception if one
+ # has been signaled.
+ #
+ if BuildTask.HasError():
+ EdkLogger.error("build", BUILD_ERROR, "Failed to build module", ExtraData=GlobalData.gBuildingModule)
+
+ # Create MAP file when Load Fix Address is enabled.
+ if self.Target in ["", "all", "fds"] and self.LoadFixAddress != 0:
+ for Arch in self.ArchList:
+ #
+ # Check whether the set fix address is above 4G for 32bit image.
+ #
+ if (Arch == 'IA32' or Arch == 'ARM') and self.LoadFixAddress != 0xFFFFFFFFFFFFFFFF and self.LoadFixAddress >= 0x100000000:
+ EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS can't be set to larger than or equal to 4G for the platorm with IA32 or ARM arch modules")
+ #
+ # Get Module List
+ #
+ ModuleList = []
+ for Pa in Wa.AutoGenObjectList:
+ for Ma in Pa.ModuleAutoGenList:
+ if Ma == None:
+ continue
+ if not Ma.IsLibrary:
+ ModuleList.append (Ma)
+ #
+ # Rebase module to the preferred memory address before GenFds
+ #
+ MapBuffer = StringIO('')
+ self._CollectModuleMapBuffer(MapBuffer, ModuleList)
+
+ # Generate FD image if there's a FDF file found
+ if self.Fdf != '' and self.Target in ["", "all", "fds"]:
+ LaunchCommand(Wa.BuildCommand + ["fds"], Wa.MakeFileDir)
+
+ # Create MAP file for all platform FV after GenFds
+ if self.Target in ["", "all", "fds"] and self.LoadFixAddress != 0:
+ if self.Fdf != '':
+ #
+ # Create MAP file for all platform FVs after GenFds.
+ #
+ self._CollectFvMapBuffer(MapBuffer, Wa)
+ #
+ # Save MAP buffer into MAP file.
+ #
+ self._SaveMapFile(MapBuffer, Wa)
+
+ ## Generate GuidedSectionTools.txt in the FV directories.
+ #
+ def CreateGuidedSectionToolsFile(self):
+ for Arch in self.ArchList:
+ for BuildTarget in self.BuildTargetList:
+ for ToolChain in self.ToolChainList:
+ FvDir = os.path.join(
+ self.WorkspaceDir,
+ self.Platform.OutputDirectory,
+ '_'.join((BuildTarget, ToolChain)),
+ 'FV'
+ )
+ if not os.path.exists(FvDir):
+ continue
+ # Build up the list of supported architectures for this build
+ prefix = '%s_%s_%s_' % (BuildTarget, ToolChain, Arch)
+
+ # Look through the tool definitions for GUIDed tools
+ guidAttribs = []
+ for (attrib, value) in self.ToolDef.ToolsDefTxtDictionary.iteritems():
+ if attrib.upper().endswith('_GUID'):
+ split = attrib.split('_')
+ thisPrefix = '_'.join(split[0:3]) + '_'
+ if thisPrefix == prefix:
+ guid = self.ToolDef.ToolsDefTxtDictionary[attrib]
+ guid = guid.lower()
+ toolName = split[3]
+ path = '_'.join(split[0:4]) + '_PATH'
+ path = self.ToolDef.ToolsDefTxtDictionary[path]
+ path = self.GetFullPathOfTool(path)
+ guidAttribs.append((guid, toolName, path))
+
+ # Write out GuidedSecTools.txt
+ toolsFile = os.path.join(FvDir, 'GuidedSectionTools.txt')
+ toolsFile = open(toolsFile, 'wt')
+ for guidedSectionTool in guidAttribs:
+ print >> toolsFile, ' '.join(guidedSectionTool)
+ toolsFile.close()
+
+ ## Returns the full path of the tool.
+ #
+ def GetFullPathOfTool (self, tool):
+ if os.path.exists(tool):
+ return os.path.realpath(tool)
+ else:
+ # We need to search for the tool using the
+ # PATH environment variable.
+ for dirInPath in os.environ['PATH'].split(os.pathsep):
+ foundPath = os.path.join(dirInPath, tool)
+ if os.path.exists(foundPath):
+ return os.path.realpath(foundPath)
+
+ # If the tool was not found in the path then we just return
+ # the input tool.
+ return tool
+
+ ## Launch the module or platform build
+ #
+ def Launch(self):
+ if self.ModuleFile == None or self.ModuleFile == "":
+ if not self.SpawnMode or self.Target not in ["", "all"]:
+ self.SpawnMode = False
+ self._BuildPlatform()
+ else:
+ self._MultiThreadBuildPlatform()
+ self.CreateGuidedSectionToolsFile()
+ else:
+ self.SpawnMode = False
+ self._BuildModule()
+
+ ## Do some clean-up works when error occurred
+ def Relinquish(self):
+ OldLogLevel = EdkLogger.GetLevel()
+ EdkLogger.SetLevel(EdkLogger.ERROR)
+ #self.DumpBuildData()
+ Utils.Progressor.Abort()
+ if self.SpawnMode == True:
+ BuildTask.Abort()
+ EdkLogger.SetLevel(OldLogLevel)
+
+ def DumpBuildData(self):
+ CacheDirectory = os.path.join(self.WorkspaceDir, gBuildCacheDir)
+ Utils.CreateDirectory(CacheDirectory)
+ Utils.DataDump(Utils.gFileTimeStampCache, os.path.join(CacheDirectory, "gFileTimeStampCache"))
+ Utils.DataDump(Utils.gDependencyDatabase, os.path.join(CacheDirectory, "gDependencyDatabase"))
+
+ def RestoreBuildData(self):
+ FilePath = os.path.join(self.WorkspaceDir, gBuildCacheDir, "gFileTimeStampCache")
+ if Utils.gFileTimeStampCache == {} and os.path.isfile(FilePath):
+ Utils.gFileTimeStampCache = Utils.DataRestore(FilePath)
+ if Utils.gFileTimeStampCache == None:
+ Utils.gFileTimeStampCache = {}
+
+ FilePath = os.path.join(self.WorkspaceDir, gBuildCacheDir, "gDependencyDatabase")
+ if Utils.gDependencyDatabase == {} and os.path.isfile(FilePath):
+ Utils.gDependencyDatabase = Utils.DataRestore(FilePath)
+ if Utils.gDependencyDatabase == None:
+ Utils.gDependencyDatabase = {}
+
+def ParseDefines(DefineList=[]):
+ DefineDict = {}
+ if DefineList != None:
+ for Define in DefineList:
+ DefineTokenList = Define.split("=", 1)
+ if len(DefineTokenList) == 1:
+ DefineDict[DefineTokenList[0]] = ""
+ else:
+ DefineDict[DefineTokenList[0]] = DefineTokenList[1].strip()
+ return DefineDict
+
+gParamCheck = []
+def SingleCheckCallback(option, opt_str, value, parser):
+ if option not in gParamCheck:
+ setattr(parser.values, option.dest, value)
+ gParamCheck.append(option)
+ else:
+ parser.error("Option %s only allows one instance in command line!" % option)
+
+## Parse command line options
+#
+# Using standard Python module optparse to parse command line option of this tool.
+#
+# @retval Opt A optparse.Values object containing the parsed options
+# @retval Args Target of build command
+#
+def MyOptionParser():
+ Parser = OptionParser(description=__copyright__,version=__version__,prog="build.exe",usage="%prog [options] [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run]")
+ Parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32','X64','IPF','EBC','ARM'], dest="TargetArch",
+ help="ARCHS is one of list: IA32, X64, IPF, ARM or EBC, which overrides target.txt's TARGET_ARCH definition. To specify more archs, please repeat this option.")
+ Parser.add_option("-p", "--platform", action="callback", type="string", dest="PlatformFile", callback=SingleCheckCallback,
+ help="Build the platform specified by the DSC file name argument, overriding target.txt's ACTIVE_PLATFORM definition.")
+ Parser.add_option("-m", "--module", action="callback", type="string", dest="ModuleFile", callback=SingleCheckCallback,
+ help="Build the module specified by the INF file name argument.")
+ Parser.add_option("-b", "--buildtarget", action="append", type="choice", choices=['DEBUG','RELEASE'], dest="BuildTarget",
+ help="BuildTarget is one of list: DEBUG, RELEASE, which overrides target.txt's TARGET definition. To specify more TARGET, please repeat this option.")
+ Parser.add_option("-t", "--tagname", action="append", type="string", dest="ToolChain",
+ help="Using the Tool Chain Tagname to build the platform, overriding target.txt's TOOL_CHAIN_TAG definition.")
+ Parser.add_option("-x", "--sku-id", action="callback", type="string", dest="SkuId", callback=SingleCheckCallback,
+ help="Using this name of SKU ID to build the platform, overriding SKUID_IDENTIFIER in DSC file.")
+
+ Parser.add_option("-n", action="callback", type="int", dest="ThreadNumber", callback=SingleCheckCallback,
+ help="Build the platform using multi-threaded compiler. The value overrides target.txt's MAX_CONCURRENT_THREAD_NUMBER. Less than 2 will disable multi-thread builds.")
+
+ Parser.add_option("-f", "--fdf", action="callback", type="string", dest="FdfFile", callback=SingleCheckCallback,
+ help="The name of the FDF file to use, which overrides the setting in the DSC file.")
+ Parser.add_option("-r", "--rom-image", action="append", type="string", dest="RomImage", default=[],
+ help="The name of FD to be generated. The name must be from [FD] section in FDF file.")
+ Parser.add_option("-i", "--fv-image", action="append", type="string", dest="FvImage", default=[],
+ help="The name of FV to be generated. The name must be from [FV] section in FDF file.")
+
+ Parser.add_option("-u", "--skip-autogen", action="store_true", dest="SkipAutoGen", help="Skip AutoGen step.")
+ Parser.add_option("-e", "--re-parse", action="store_true", dest="Reparse", help="Re-parse all meta-data files.")
+
+ Parser.add_option("-c", "--case-insensitive", action="store_true", dest="CaseInsensitive", help="Don't check case of file name.")
+
+ # Parser.add_option("-D", "--define", action="append", dest="Defines", metavar="NAME[=[VALUE]]",
+ # help="Define global macro which can be used in DSC/DEC/INF files.")
+
+ Parser.add_option("-w", "--warning-as-error", action="store_true", dest="WarningAsError", help="Treat warning in tools as error.")
+ Parser.add_option("-j", "--log", action="store", dest="LogFile", help="Put log in specified file as well as on console.")
+
+ Parser.add_option("-s", "--silent", action="store_true", type=None, dest="SilentMode",
+ help="Make use of silent mode of (n)make.")
+ Parser.add_option("-q", "--quiet", action="store_true", type=None, help="Disable all messages except FATAL ERRORS.")
+ Parser.add_option("-v", "--verbose", action="store_true", type=None, help="Turn on verbose output with informational messages printed, "\
+ "including library instances selected, final dependency expression, "\
+ "and warning messages, etc.")
+ Parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.")
+ Parser.add_option("-D", "--define", action="append", type="string", dest="Macros", help="Macro: \"Name [= Value]\".")
+
+ Parser.add_option("-y", "--report-file", action="store", dest="ReportFile", help="Create/overwrite the report to the specified filename.")
+ Parser.add_option("-Y", "--report-type", action="append", type="choice", choices=['PCD','LIBRARY','FLASH','DEPEX','BUILD_FLAGS','FIXED_ADDRESS', 'EXECUTION_ORDER'], dest="ReportType", default=[],
+ help="Flags that control the type of build report to generate. Must be one of: [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS, EXECUTION_ORDER]. "\
+ "To specify more than one flag, repeat this option on the command line and the default flag set is [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS]")
+
+ (Opt, Args)=Parser.parse_args()
+ return (Opt, Args)
+
+## Tool entrance method
+#
+# This method mainly dispatch specific methods per the command line options.
+# If no error found, return zero value so the caller of this tool can know
+# if it's executed successfully or not.
+#
+# @retval 0 Tool was successful
+# @retval 1 Tool failed
+#
+def Main():
+ StartTime = time.time()
+
+ # Initialize log system
+ EdkLogger.Initialize()
+
+ #
+ # Parse the options and args
+ #
+ (Option, Target) = MyOptionParser()
+ GlobalData.gOptions = Option
+ GlobalData.gCaseInsensitive = Option.CaseInsensitive
+
+ # Set log level
+ if Option.verbose != None:
+ EdkLogger.SetLevel(EdkLogger.VERBOSE)
+ elif Option.quiet != None:
+ EdkLogger.SetLevel(EdkLogger.QUIET)
+ elif Option.debug != None:
+ EdkLogger.SetLevel(Option.debug + 1)
+ else:
+ EdkLogger.SetLevel(EdkLogger.INFO)
+
+ if Option.LogFile != None:
+ EdkLogger.SetLogFile(Option.LogFile)
+
+ if Option.WarningAsError == True:
+ EdkLogger.SetWarningAsError()
+
+ if platform.platform().find("Windows") >= 0:
+ GlobalData.gIsWindows = True
+ else:
+ GlobalData.gIsWindows = False
+
+ EdkLogger.quiet(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[%s]\n" % platform.platform())
+ ReturnCode = 0
+ MyBuild = None
+ try:
+ if len(Target) == 0:
+ Target = "all"
+ elif len(Target) >= 2:
+ EdkLogger.error("build", OPTION_NOT_SUPPORTED, "More than one targets are not supported.",
+ ExtraData="Please select one of: %s" %(' '.join(gSupportedTarget)))
+ else:
+ Target = Target[0].lower()
+
+ if Target not in gSupportedTarget:
+ EdkLogger.error("build", OPTION_NOT_SUPPORTED, "Not supported target [%s]." % Target,
+ ExtraData="Please select one of: %s" %(' '.join(gSupportedTarget)))
+
+ GlobalData.gGlobalDefines = ParseDefines(Option.Macros)
+ #
+ # Check environment variable: EDK_TOOLS_PATH, WORKSPACE, PATH
+ #
+ CheckEnvVariable()
+ Workspace = os.getenv("WORKSPACE")
+ #
+ # Get files real name in workspace dir
+ #
+ GlobalData.gAllFiles = Utils.DirCache(Workspace)
+
+ WorkingDirectory = os.getcwd()
+ if not Option.ModuleFile:
+ FileList = glob.glob(os.path.normpath(os.path.join(WorkingDirectory, '*.inf')))
+ FileNum = len(FileList)
+ if FileNum >= 2:
+ EdkLogger.error("build", OPTION_NOT_SUPPORTED, "There are %d INF files in %s." % (FileNum, WorkingDirectory),
+ ExtraData="Please use '-m <INF_FILE_PATH>' switch to choose one.")
+ elif FileNum == 1:
+ Option.ModuleFile = NormFile(FileList[0], Workspace)
+
+ if Option.ModuleFile:
+ if os.path.isabs (Option.ModuleFile):
+ if os.path.normcase (os.path.normpath(Option.ModuleFile)).find (Workspace) == 0:
+ Option.ModuleFile = NormFile(os.path.normpath(Option.ModuleFile), Workspace)
+ Option.ModuleFile = PathClass(Option.ModuleFile, Workspace)
+ ErrorCode, ErrorInfo = Option.ModuleFile.Validate(".inf", False)
+ if ErrorCode != 0:
+ EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
+
+ if Option.PlatformFile != None:
+ if os.path.isabs (Option.PlatformFile):
+ if os.path.normcase (os.path.normpath(Option.PlatformFile)).find (Workspace) == 0:
+ Option.PlatformFile = NormFile(os.path.normpath(Option.PlatformFile), Workspace)
+ Option.PlatformFile = PathClass(Option.PlatformFile, Workspace)
+ ErrorCode, ErrorInfo = Option.PlatformFile.Validate(".dsc", False)
+ if ErrorCode != 0:
+ EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
+
+ if Option.FdfFile != None:
+ if os.path.isabs (Option.FdfFile):
+ if os.path.normcase (os.path.normpath(Option.FdfFile)).find (Workspace) == 0:
+ Option.FdfFile = NormFile(os.path.normpath(Option.FdfFile), Workspace)
+ Option.FdfFile = PathClass(Option.FdfFile, Workspace)
+ ErrorCode, ErrorInfo = Option.FdfFile.Validate(".fdf", False)
+ if ErrorCode != 0:
+ EdkLogger.error("build", ErrorCode, ExtraData=ErrorInfo)
+
+ MyBuild = Build(Target, Workspace, Option.PlatformFile, Option.ModuleFile,
+ Option.TargetArch, Option.ToolChain, Option.BuildTarget,
+ Option.FdfFile, Option.RomImage, Option.FvImage,
+ None, Option.SilentMode, Option.ThreadNumber,
+ Option.SkipAutoGen, Option.Reparse, Option.SkuId,
+ Option.ReportFile, Option.ReportType)
+ MyBuild.Launch()
+ #MyBuild.DumpBuildData()
+ except FatalError, X:
+ if MyBuild != None:
+ # for multi-thread build exits safely
+ MyBuild.Relinquish()
+ if Option != None and Option.debug != None:
+ EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
+ ReturnCode = X.args[0]
+ except Warning, X:
+ # error from Fdf parser
+ if MyBuild != None:
+ # for multi-thread build exits safely
+ MyBuild.Relinquish()
+ if Option != None and Option.debug != None:
+ EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
+ else:
+ EdkLogger.error(X.ToolName, FORMAT_INVALID, File=X.FileName, Line=X.LineNumber, ExtraData=X.Message, RaiseError = False)
+ ReturnCode = FORMAT_INVALID
+ except KeyboardInterrupt:
+ ReturnCode = ABORT_ERROR
+ if Option != None and Option.debug != None:
+ EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
+ except:
+ if MyBuild != None:
+ # for multi-thread build exits safely
+ MyBuild.Relinquish()
+
+ # try to get the meta-file from the object causing exception
+ Tb = sys.exc_info()[-1]
+ MetaFile = GlobalData.gProcessingFile
+ while Tb != None:
+ if 'self' in Tb.tb_frame.f_locals and hasattr(Tb.tb_frame.f_locals['self'], 'MetaFile'):
+ MetaFile = Tb.tb_frame.f_locals['self'].MetaFile
+ Tb = Tb.tb_next
+ EdkLogger.error(
+ "\nbuild",
+ CODE_ERROR,
+ "Unknown fatal error when processing [%s]" % MetaFile,
+ ExtraData="\n(Please send email to edk2-buildtools-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",
+ RaiseError=False
+ )
+ EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())
+ ReturnCode = CODE_ERROR
+ finally:
+ Utils.Progressor.Abort()
+
+ if ReturnCode == 0:
+ Conclusion = "Done"
+ elif ReturnCode == ABORT_ERROR:
+ Conclusion = "Aborted"
+ else:
+ Conclusion = "Failed"
+ FinishTime = time.time()
+ BuildDuration = time.strftime("%M:%S", time.gmtime(int(round(FinishTime - StartTime))))
+ if MyBuild != None:
+ MyBuild.BuildReport.GenerateReport(BuildDuration)
+ MyBuild.Db.Close()
+ EdkLogger.SetLevel(EdkLogger.QUIET)
+ EdkLogger.quiet("\n- %s -\n%s [%s]" % (Conclusion, time.strftime("%H:%M:%S, %b.%d %Y", time.localtime()), BuildDuration))
+
+ return ReturnCode
+
+if __name__ == '__main__':
+ r = Main()
+ ## 0-127 is a safe return range, and 1 is a standard default error
+ if r < 0 or r > 127: r = 1
+ sys.exit(r)
+
diff --git a/BaseTools/Source/Python/fpd2dsc/__init__.py b/BaseTools/Source/Python/fpd2dsc/__init__.py
index e69de29bb2..4831e80db7 100644
--- a/BaseTools/Source/Python/fpd2dsc/__init__.py
+++ b/BaseTools/Source/Python/fpd2dsc/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'fpd2dsc' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py b/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py
index a22ff5a685..496e108b1f 100644
--- a/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py
+++ b/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py
@@ -1,7 +1,7 @@
## @file
# Convert an XML-based FPD file to a text-based DSC file.
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -22,7 +22,7 @@ from optparse import OptionParser
# Version and Copyright
__version_number__ = "1.0"
__version__ = "%prog Version " + __version_number__
-__copyright__ = "Copyright (c) 2007, Intel Corporation All rights reserved."
+__copyright__ = "Copyright (c) 2007 - 2010, Intel Corporation All rights reserved."
## Parse command line options
#
diff --git a/BaseTools/Source/Python/msa2inf/ConvertModule.py b/BaseTools/Source/Python/msa2inf/ConvertModule.py
index e0d7b88695..af9aa1d8ec 100644
--- a/BaseTools/Source/Python/msa2inf/ConvertModule.py
+++ b/BaseTools/Source/Python/msa2inf/ConvertModule.py
@@ -2,7 +2,7 @@
# Convert an MSA Module class object ot an INF Module class object by filling
# several info required by INF file.
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -35,7 +35,7 @@ def AddModuleMiscVersion(Module):
Module.Header.InfVersion = Version
Version = Module.Header.Specification.get("EFI_SPECIFICATION_VERSION", "")
- Module.Header.EfiSpecificationVersion = Version
+ Module.Header.UefiSpecificationVersion = Version
Version = Module.Header.Specification.get("EDK_RELEASE_VERSION", "")
Module.Header.EdkReleaseVersion = Version
diff --git a/BaseTools/Source/Python/msa2inf/StoreInf.py b/BaseTools/Source/Python/msa2inf/StoreInf.py
index bb58dc2f2f..6bf46cf0be 100644
--- a/BaseTools/Source/Python/msa2inf/StoreInf.py
+++ b/BaseTools/Source/Python/msa2inf/StoreInf.py
@@ -64,8 +64,8 @@ def StoreModuleDefinesSection(InfFile, Module):
if ModuleHeader.ModuleType != "":
DefinesTupleList.append(("MODULE_TYPE", ModuleHeader.ModuleType))
- if ModuleHeader.EfiSpecificationVersion != "":
- DefinesTupleList.append(("EFI_SPECIFICATION_VERSION", ModuleHeader.EfiSpecificationVersion))
+ if ModuleHeader.UefiSpecificationVersion != "":
+ DefinesTupleList.append(("UEFI_SPECIFICATION_VERSION", ModuleHeader.UefiSpecificationVersion))
if ModuleHeader.EdkReleaseVersion != "":
DefinesTupleList.append(("EDK_RELEASE_VERSION", ModuleHeader.EdkReleaseVersion))
diff --git a/BaseTools/Source/Python/msa2inf/__init__.py b/BaseTools/Source/Python/msa2inf/__init__.py
index e69de29bb2..e139a80bdb 100644
--- a/BaseTools/Source/Python/msa2inf/__init__.py
+++ b/BaseTools/Source/Python/msa2inf/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'msa2inf' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/Source/Python/sitecustomize.py b/BaseTools/Source/Python/sitecustomize.py
index fa5cd40705..cd315e022f 100644
--- a/BaseTools/Source/Python/sitecustomize.py
+++ b/BaseTools/Source/Python/sitecustomize.py
@@ -1,3 +1,13 @@
+#
+# Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
import sys
import locale
diff --git a/BaseTools/Source/Python/spd2dec/__init__.py b/BaseTools/Source/Python/spd2dec/__init__.py
index e69de29bb2..ed0302b48d 100644
--- a/BaseTools/Source/Python/spd2dec/__init__.py
+++ b/BaseTools/Source/Python/spd2dec/__init__.py
@@ -0,0 +1,15 @@
+## @file
+# Python 'spd2dec' package initialization file.
+#
+# This file is required to make Python interpreter treat the directory
+# as containing package.
+#
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
diff --git a/BaseTools/UserManuals/Build_Utility_Man_Page.rtf b/BaseTools/UserManuals/Build_Utility_Man_Page.rtf
index 88ac30b3a8..ad03608261 100644
--- a/BaseTools/UserManuals/Build_Utility_Man_Page.rtf
+++ b/BaseTools/UserManuals/Build_Utility_Man_Page.rtf
@@ -1,209 +1,120 @@
-{\rtf1\adeflang1025\ansi\ansicpg936\uc2\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}
-{\f37\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}{\f38\fnil\fcharset134\fprq2{\*\panose 00000000000000000000}@\'cb\'ce\'cc\'e5;}{\f40\froman\fcharset238\fprq2 Times New Roman CE;}{\f41\froman\fcharset204\fprq2 Times New Roman Cyr;}
-{\f43\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
-{\f47\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f172\fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f410\fswiss\fcharset238\fprq2 Verdana CE;}
-{\f411\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f413\fswiss\fcharset161\fprq2 Verdana Greek;}{\f414\fswiss\fcharset162\fprq2 Verdana Tur;}{\f417\fswiss\fcharset186\fprq2 Verdana Baltic;}{\f418\fswiss\fcharset163\fprq2 Verdana (Vietnamese);}
-{\f422\fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
-\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red8\green96\blue168;}{\stylesheet{
-\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{
-\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 1;}{
-\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 2;}{\*\cs10
-\additive \ssemihidden Default Paragraph Font;}{\*
-\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
-\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}
-{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid3283161\rsid4088904\rsid6226395\rsid6423319\rsid7497612\rsid10186840\rsid12798734\rsid13729679\rsid15427098}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator jwang36}
-{\creatim\yr2008\mo12\dy31\hr14\min36}{\revtim\yr2008\mo12\dy31\hr14\min57}{\version9}{\edmins20}{\nofpages4}{\nofwords936}{\nofchars5341}{\nofcharsws6265}{\vern24613}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/20
-03/wordml}{\xmlns2 urn:schemas-microsoft-com:office:smarttags}}\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect
-\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
-\jcompress\viewkind4\viewscale100\rsidroot6226395 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl2
-\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \dbch )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}
-{\pntxta \dbch )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}
-{\pntxta \dbch )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0
-\rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Name
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build.exe \hich\f37 \endash \loch\f37 the master command that provides the {\*\xmlopen\xmlns2{\factoidname PersonName}}\hich\af37\dbch\af13\loch\f37 dev{\*\xmlclose}e
-\hich\af37\dbch\af13\loch\f37 loper with a single command for selecting various options of a build
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Synopsis
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs18
-\ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build.exe [options] [target]
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Description
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build.exe is the master command line (CLI) tool that provides the {\*\xmlopen\xmlns2{\factoidname PersonName}}\hich\af37\dbch\af13\loch\f37 dev{\*\xmlclose}eloper with a single command
-\hich\af37\dbch\af13\loch\f37 for selecting various options of a build. In general, it checks the environment variables, gets the user\hich\f37 \rquote \loch\f37
-s configuration from either the CLI or target.txt, parses the dsc, dec, inf, target.txt, tools_def.txt, generates .C, .H files and the Makefiles for \hich\af37\dbch\af13\loch\f37 o\hich\af37\dbch\af13\loch\f37
-ne or more modules and/or the active platform, calls a make (NMake or make) program to process these Makefiles, then optionally calls GenFds to generate an fd file.
-\par \hich\af37\dbch\af13\loch\f37 The build tool supports \hich\af37\dbch\af13\loch\f37 two kinds of path specifications on command line - an absolutely pa\hich\af37\dbch\af13\loch\f37 th or a \hich\af37\dbch\af13\loch\f37
-relative (to the WORKSPACE environment variable) path}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7497612 \hich\af37\dbch\af13\loch\f37 }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7497612 \loch\af37\dbch\af13\hich\f37 \endash }{
-\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid7497612 \hich\af37\dbch\af13\loch\f37 in \hich\af37\dbch\af13\loch\f37 command line}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 .
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Options
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 There are no required options.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -a, --arch <ARCH>
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
-ARCH is one of list: IA32, X64, IPF or EBC, which overrides target.txt's TARGET_ARCH definition. To specify more ARCH, please repeat\hich\af37\dbch\af13\loch\f37 this option.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -p, --platform PlatformName.dsc
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
-Build the platform specified by the DSC file name argument, overrides target.txt's ACTIVE_PLATFORM definition.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -m, --module ModuleName.inf
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build the module specified by the INF file name argument.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -b, --build\hich\af37\dbch\af13\loch\f37 target <TARGET>
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
-TARGET is one of list: DEBUG, RELEASE, which overrides target.txt's TARGET definition. To specify more TARGET, please repeat this option.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -t, --tagname Tagname
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
-Using the Tool Chain Tagname to build the platform, overrides target.txt's TOOL\hich\af37\dbch\af13\loch\f37 _CHAIN_TAG definition.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -f --fdf Filename.fdf
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 The name of the FDF file to use, which overrides the setting in the DSC file.
-
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid6423319 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6423319 \hich\af37\dbch\af13\loch\f37 -r --rom-image ROM_IMAGE_NAME
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid6423319 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6423319\charrsid6423319 \hich\af37\dbch\af13\loch\f37
-The name of FD to be generated. The name must be from [FD] section in FDF file}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6423319 \hich\af37\dbch\af13\loch\f37 .
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid6423319 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6423319 \hich\af37\dbch\af13\loch\f37 -i --fv-image\hich\af37\dbch\af13\loch\f37 FV_IMAGE_NAME
-
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid6423319 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6423319\charrsid6423319 \hich\af37\dbch\af13\loch\f37
-The name of FV to be generated. The name must be from}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6423319 \hich\af37\dbch\af13\loch\f37 }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6423319\charrsid6423319
-\hich\af37\dbch\af13\loch\f37 [FV] section in FDF file}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6423319 \hich\af37\dbch\af13\loch\f37 .
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -n NUM
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
-Build the platform using multi-threaded compiler. The value overrides target.txt's MULTIPLE_THREAD and MAX_CONCURRENT_THREAD_NUMBER}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6226395 \hich\af37\dbch\af13\loch\f37 .}{\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid6226395 \hich\af37\dbch\af13\loch\f37 L}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840
-\hich\af37\dbch\af13\loch\f37 ess than 2 will disable multi-thread builds.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid3283161 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 -x }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0
-\b\fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 --sku-id SKU_ID}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid15427098 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15427098\charrsid15427098 \hich\af37\dbch\af13\loch\f37
-Using this name of SKU ID to build the platform, overriding SKUID_IDENTIFIER in DSC file}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 .
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid3283161 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 -u}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0
-\b\fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 --skip-autogen}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid3283161 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 Skip AutoGen step. Note the build may fail if there\hich\f37
-\rquote \loch\f37 s no AutoGen-ed files before}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 .
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid3283161 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 -e}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0
-\b\fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 --re-parse}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid3283161 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15427098\charrsid15427098 \hich\af37\dbch\af13\loch\f37 Re-parse all meta-data files}{\rtlch\fcs1
-\af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 .}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 Use this option if you encounter inconsistency issue.}{\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid3283161
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid3283161 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 -w}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0
-\b\fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 --warning-as-error}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 Treat warning in tools as error}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 .
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid6423319 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6423319 \hich\af37\dbch\af13\loch\f37 -j}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0
-\b\fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 --log LOGFILE}{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid6423319
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid6423319 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15427098\charrsid15427098 \hich\af37\dbch\af13\loch\f37 Put}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid15427098 \hich\af37\dbch\af13\loch\f37 screen output}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid15427098\charrsid15427098 \hich\af37\dbch\af13\loch\f37 in specified file}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid6423319 \hich\af37\dbch\af13\loch\f37 .
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid6423319 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 -s \hich\f37 \endash \loch\f37 silent
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid3283161 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3283161 \hich\af37\dbch\af13\loch\f37 \hich\f37 Tell \'93\loch\f37 \hich\f37 make\'94\loch\f37
-\hich\f37 tool to run \'93\loch\f37 \hich\f37 silently\'94\loch\f37 . Inte\hich\af37\dbch\af13\loch\f37 rnally, a \hich\f37 \lquote \loch\f37 -s\hich\f37 \rquote \loch\f37 \hich\f37 switch will be passed to \'93\loch\f37 \hich\f37 make\'94\loch\f37
- tool. Don\hich\f37 \rquote \loch\f37 \hich\f37 t use this option if your \'93\loch\f37 \hich\f37 make\'94\loch\f37 tool doesn\hich\f37 \rquote \loch\f37 t support \hich\f37 \lquote \loch\f37 -s\hich\f37 \rquote \loch\f37 \hich\f37 . Instead, if your
-\'93\loch\f37 \hich\f37 make\'94\loch\f37 tool uses other option to do the same, you could add it to the XX_XX_XX_MAKE_FLAGS in tools_def.txt.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -d, --debug [#\hich\af37\dbch\af13\loch\f37 ]
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Enable debug messages at specified level. It is used by Tool itself.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -q, --quiet
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Disable all messages except FATAL ERRORS.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -v, --verbose
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Turn on verbose output with informational messages printed.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 --version
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Show program's copyright and version number then exit.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 -h, --help
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Print the copyright, version and usage of this program then exit.
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Target
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 If no target is given, then default target is ALL.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 ALL}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
- Build everything for either the platform or module.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 GenC}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
- Auto-generate all C files for either the platform or module.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 GenMake}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Generate the Makefiles \hich\f37 \endash
-\loch\f37 if auto-generated files are missing,
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13729679
-\hich\af37\dbch\af13\loch\f37 }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 then auto-generate all C files first for either the platform or module.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Fds}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840
-\hich\af37\dbch\af13\loch\f37 C\hich\af37\dbch\af13\loch\f37 reate the FD Image files.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Libraries}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
- Build all EDK Libraries and EDK II Library Instances which are specified.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Modules}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
- Build all EDK components and EDK II modules which are specified.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Clean}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Remove intermediate files generated by the NMAKE
-\hich\af37\dbch\af13\loch\f37 command (leaving
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
- the auto-generated C format, FD image files, PE32 output files, PCH
-\par \hich\af37\dbch\af13\loch\f37 files and LIB files).
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 CleanAll}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840
-\hich\af37\dbch\af13\loch\f37 Remove all intermmediate, auto-generated, FV and FD image files \hich\f37 \endash \loch\f37
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 state o\hich\af37\dbch\af13\loch\f37
-f the tree should be exactly as if a fresh checkout or install has
-\par \hich\af37\dbch\af13\loch\f37 occurred.
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 CleanLib}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840
-\hich\af37\dbch\af13\loch\f37 Remove intermediate files generated by the NMAKE command AND LIB
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 files (leaving the auto-generated, FV and FD image files, PE3
-\hich\af37\dbch\af13\loch\f37 2 output
-\par \hich\af37\dbch\af13\loch\f37 files and PCH files)
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid13729679 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid13729679 \hich\af37\dbch\af13\loch\f37 run}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid13729679 \hich\af37\dbch\af13\loch\f37 Run }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 platform}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13729679
-\hich\af37\dbch\af13\loch\f37 (for emulator platform only)
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid13729679 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13729679
-\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid13729679
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Examples
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Assume that $(WORKSPACE) is C:\\MyWorkspace
-\par }\pard \ltrpar\ql \li180\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build platform: Nt32Pkg.dsc
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Specify the platform description file on the command line.
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 C:\\\hich\af37\dbch\af13\loch\f37 MyWorkspace>build -p Nt32Pkg\\
-Nt32Pkg.dsc \hich\f37 \endash \loch\f37 a IA32
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37
-Build the platform in the current working directory if it contains a platform description file.
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 C:\\MyWorkspace\\Nt32Pkg>build \hich\f37 \endash \loch\f37 a IA32
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build the active platform specified in the target.txt file.
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 C:\\ MyWorkspac\hich\af37\dbch\af13\loch\f37 e>build \hich\f37 \endash
-\loch\f37 a Ia32
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840
-\par }\pard \ltrpar\ql \li180\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build Module: HelloWorld.inf
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Specify the platform and Module on the command line.
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 C:\\MyWorkspace>build -p Nt32Pkg\\Nt32Pkg.dsc \hich\f37 \endash
-\loch\f37 a IA32 \\
-\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 \hich\f37 \endash \loch\f37
-m MdeModulePkg/Application/HelloWorld/HelloWorld.inf
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Specify the Module on the command line and use t\hich\af37\dbch\af13\loch\f37
-he active platform specified in the target.txt file.
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 C:\\MyWorkspace>build \hich\f37 \endash \loch\f37 a IA32 \\
-\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \loch\af37\dbch\af13\hich\f37 \endash \loch\f37 m MdeModulePkg/Application/HelloWorld/HelloWorld.inf
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build the module \hich\af37\dbch\af13\loch\f37
-in the current working directory if it contains a module description file and specify the platform on the command line.
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 C:\\ MyWorkspace\\MdeModulePkg\\Application\\HelloWorld>build \hich\f37
-\endash \loch\f37 a Ia32 \\
-\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \loch\af37\dbch\af13\hich\f37 \endash \loch\f37 p Nt32Pkg\\Nt32Pkg.dsc
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Build the module in the current working direc\hich\af37\dbch\af13\loch\f37
-tory and use the active platform specified in the target.txt file.
-\par }\pard \ltrpar\ql \li720\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 C:\\ MyWorkspace\\MdeModulePkg\\Application\\HelloWorld>build \hich\f37
-\endash \loch\f37 a Ia32
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Bugs
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 No known bugs.
-\par \hich\af37\dbch\af13\loch\f37 Report bugs to issues@buildtools.tianocore.org
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Files
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 target.txt, tools_def.txt, platform.dsc, flashm\hich\af37\dbch\af13\loch\f37 ap.fdf, package.dec and module.inf.
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 See also
-\par }\pard\plain \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 GenFds.exe
-\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx360\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid10186840 \hich\af37\dbch\af13\loch\f37 License
-\par }\pard\plain \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid10186840 \hich\af37\dbch\af13\loch\f37 Copyright (c) 1999-200}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid12798734 \hich\af37\dbch\af13\loch\f37 9}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid10186840
-\hich\af37\dbch\af13\loch\f37 Intel Corporation. All rights reserved.
-\par
-\par \hich\af37\dbch\af13\loch\f37 This program and the accompanying materials are licensed and made available under the terms and
-\par \hich\af37\dbch\af13\loch\f37 conditions of the BSD License \hich\af37\dbch\af13\loch\f37 which accompanies this distribution. The full text of the license may be
-\par \hich\af37\dbch\af13\loch\f37 found at:
-\par \hich\af37\dbch\af13\loch\f37 http://opensource.org/licenses/bsd-license.php
-\par
-\par \hich\af37\dbch\af13\loch\f37 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES
-\par \hich\af37\dbch\af13\loch\f37 OR REPRESENTATIONS OF ANY KIND, EIT\hich\af37\dbch\af13\loch\f37 HER EXPRESS OR IMPLIED.
-\par }} \ No newline at end of file
+{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
+{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}
+{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\cf1\b\f0\fs28 Name\par
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 Build.exe \endash the master command that provides the developer with a single command for selecting various options of a build\par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\cf1\b\fs28 Synopsis\par
+\pard\nowidctlpar\li360\sb200\cf2\fs18 Build.exe [options] [target]\par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\fs28 Description\par
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 Build.exe is the master command line (CLI) tool that provides the developer with a single command for selecting various options of a build. In general, it checks the environment variables, gets the user\rquote s configuration from either the CLI or target.txt, parses the dsc, dec, inf, target.txt, tools_def.txt, generates .C, .H files and the Makefiles for one or more modules and/or the active platform, calls a make (NMake or make) program to process these Makefiles, then optionally calls GenFds to generate an fd file.\par
+The build tool supports two kinds of path specifications on command line - an absolutely path or a relative (to the WORKSPACE environment variable) path \endash in command line.\par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 Options\par
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 There are no required options. \par
+\b -a, --arch <ARCH>\par
+\pard\nowidctlpar\li720\sb200\b0 ARCH is one of list: IA32, X64, IPF or EBC, which overrides target.txt's TARGET_ARCH definition. To specify more ARCH, please repeat this option.\par
+\pard\nowidctlpar\li360\sb200\b -p, --platform PlatformName.dsc\par
+\pard\nowidctlpar\li720\sb200\b0 Build the platform specified by the DSC file name argument, overrides target.txt's ACTIVE_PLATFORM definition.\par
+\pard\nowidctlpar\li360\sb200\b -m, --module ModuleName.inf\par
+\pard\nowidctlpar\li720\sb200\b0 Build the module specified by the INF file name argument.\par
+\pard\nowidctlpar\li360\sb200\b -b, --buildtarget <TARGET>\par
+\pard\nowidctlpar\li720\sb200\b0 TARGET is one of list: DEBUG, RELEASE, which overrides target.txt's TARGET definition. To specify more TARGET, please repeat this option.\par
+\pard\nowidctlpar\li360\sb200\b -t, --tagname Tagname\par
+\pard\nowidctlpar\li720\sb200\b0 Using the Tool Chain Tagname to build the platform, overrides target.txt's TOOL_CHAIN_TAG definition.\par
+\pard\nowidctlpar\li360\sb200\b -f --fdf Filename.fdf\par
+\pard\nowidctlpar\li720\sb200\b0 The name of the FDF file to use, which overrides the setting in the DSC file.\par
+\pard\nowidctlpar\li360\sb200\b -r --rom-image ROM_IMAGE_NAME\par
+\pard\nowidctlpar\li720\sb200\b0 The name of FD to be generated. The name must be from [FD] section in FDF file.\par
+\pard\nowidctlpar\li360\sb200\b -i --fv-image FV_IMAGE_NAME\par
+\pard\nowidctlpar\li720\sb200\b0 The name of FV to be generated. The name must be from [FV] section in FDF file.\par
+\pard\nowidctlpar\li360\sb200\b -n NUM\par
+\pard\nowidctlpar\li720\sb200\b0 Build the platform using multi-threaded compiler. The value overrides target.txt's MULTIPLE_THREAD and MAX_CONCURRENT_THREAD_NUMBER. Less than 2 will disable multi-thread builds.\par
+\pard\nowidctlpar\li360\sb200\b -x --sku-id SKU_ID\f1\par
+\pard\nowidctlpar\li720\sb200\b0\f0 Using this name of SKU ID to build the platform, overriding SKUID_IDENTIFIER in DSC file.\par
+\pard\nowidctlpar\li360\sb200\b -u --skip-autogen\f1\par
+\pard\nowidctlpar\li720\sb200\b0\f0 Skip AutoGen step. Note the build may fail if there\rquote s no AutoGen-ed files before.\par
+\pard\nowidctlpar\li360\sb200\b -e --re-parse\f1\par
+\pard\nowidctlpar\li720\sb200\b0\f0 Re-parse all meta-data files. Use this option if you encounter inconsistency issue.\f1\par
+\pard\nowidctlpar\li360\sb200\b\f0 -w --warning-as-error\f1\par
+\pard\nowidctlpar\li720\sb200\b0\f0 Treat warning in tools as error.\par
+\pard\nowidctlpar\li360\sb200\b -j --log LOGFILE\f1\par
+\pard\nowidctlpar\li720\sb200\b0\f0 Put screen output in specified file.\par
+\pard\nowidctlpar\li360\sb200\b -s \endash silent\par
+\pard\nowidctlpar\li720\sb200\b0 Tell \ldblquote make\rdblquote tool to run \ldblquote silently\rdblquote . Internally, a \lquote -s\rquote switch will be passed to \ldblquote make\rdblquote tool. Don\rquote t use this option if your \ldblquote make\rdblquote tool doesn\rquote t support \lquote -s\rquote . Instead, if your \ldblquote make\rdblquote tool uses other option to do the same, you could add it to the XX_XX_XX_MAKE_FLAGS in tools_def.txt.\par
+\pard\nowidctlpar\li360\sb200\b -d, --debug [#]\par
+\pard\nowidctlpar\li720\sb200\b0 Enable debug messages at specified level. It is used by Tool itself.\par
+\pard\nowidctlpar\li360\sb200\b -q, --quiet\par
+\pard\nowidctlpar\li720\sb200\b0 Disable all messages except FATAL ERRORS.\par
+\pard\nowidctlpar\li360\sb200\b -v, --verbose\par
+\pard\nowidctlpar\li720\sb200\b0 Turn on verbose output with informational messages printed.\par
+\pard\nowidctlpar\li360\sb200\b -D, --define MACROS\par
+\pard\nowidctlpar\li720\sb200\b0 Macro: "Name [= Value]".\par
+\pard\nowidctlpar\li360\sb200\b -y, --report-file REPORTFILE\f1\par
+\pard\nowidctlpar\li720\sb200\b0\f0 Create/overwrite the report to the specified filename.\par
+\pard\nowidctlpar\li360\sb200\b -Y, --report-type REPORTTYPE\par
+\pard\nowidctlpar\li720\sb200\b0 Flags that control the type of build report to generate. Must be one of: [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS, EXECUTION_ORDER]. To specify more than one flag, repeat this option on the command line and the default flag set is [PCD, LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRESS]\par
+\pard\nowidctlpar\li360\sb200\b --version\par
+\pard\nowidctlpar\li720\sb200\b0 Show program's copyright and version number then exit.\par
+\pard\nowidctlpar\li360\sb200\b -h, --help\par
+\pard\nowidctlpar\li720\sb200\b0 Print the copyright, version and usage of this program then exit.\par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 Target\par
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 If no target is given, then default target is ALL.\par
+\b ALL\b0 Build everything for either the platform or module.\par
+\b GenC\b0 Auto-generate all C files for either the platform or module.\par
+\b GenMake\b0 Generate the Makefiles \endash if auto-generated files are missing,\par
+\pard\nowidctlpar\li360 then auto-generate all C files first for either the platform or module.\par
+\pard\nowidctlpar\li360\sb200\b Fds\b0 Create the FD Image files.\par
+\b Libraries\b0 Build all EDK Libraries and EDK II Library Instances which are specified.\par
+\b Modules\b0 Build all EDK components and EDK II modules which are specified.\par
+\b Clean\b0 Remove intermediate files generated by the NMAKE command (leaving\par
+\pard\nowidctlpar\li360 the auto-generated C format, FD image files, PE32 output files, PCH \par
+ files and LIB files).\par
+\pard\nowidctlpar\li360\sb200\b CleanAll\b0 Remove all intermmediate, auto-generated, FV and FD image files \endash \par
+\pard\nowidctlpar\li360 state of the tree should be exactly as if a fresh checkout or install has \par
+ occurred.\par
+\pard\nowidctlpar\li360\sb200\b CleanLib\b0 Remove intermediate files generated by the NMAKE command AND LIB \par
+\pard\nowidctlpar\li360 files (leaving the auto-generated, FV and FD image files, PE32 output \par
+ files and PCH files)\par
+\pard\nowidctlpar\li360\sb200\b run\b0 Run platform (for emulator platform only)\par
+\pard\nowidctlpar\li360\f1\par
+\par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\f0\fs28 Examples\par
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 Assume that $(WORKSPACE) is C:\\MyWorkspace\par
+\pard\nowidctlpar\li180\sb200 Build platform: Nt32Pkg.dsc\par
+\pard\nowidctlpar\li360\sb200 Specify the platform description file on the command line.\par
+\pard\nowidctlpar\li720\sb200\b C:\\MyWorkspace>build -p Nt32Pkg\\Nt32Pkg.dsc \endash a IA32\par
+\pard\nowidctlpar\li360\sb200\b0 Build the platform in the current working directory if it contains a platform description file.\par
+\pard\nowidctlpar\li720\sb200\b C:\\MyWorkspace\\Nt32Pkg>build \endash a IA32\par
+\pard\nowidctlpar\li360\sb200\b0 Build the active platform specified in the target.txt file.\par
+\pard\nowidctlpar\li720\sb200\b C:\\ MyWorkspace>build \endash a Ia32\par
+\pard\nowidctlpar\li360\sb200\b0\f1\par
+\pard\nowidctlpar\li180\sb200\f0 Build Module: HelloWorld.inf\par
+\pard\nowidctlpar\li360\sb200 Specify the platform and Module on the command line.\par
+\pard\nowidctlpar\li720\sb200\b C:\\MyWorkspace>build -p Nt32Pkg\\Nt32Pkg.dsc \endash a IA32 \\\par
+\pard\nowidctlpar\li720 \endash m MdeModulePkg/Application/HelloWorld/HelloWorld.inf\par
+\pard\nowidctlpar\li360\sb200\b0 Specify the Module on the command line and use the active platform specified in the target.txt file.\par
+\pard\nowidctlpar\li720\sb200\b C:\\MyWorkspace>build \endash a IA32 \\\par
+\pard\nowidctlpar\li720\endash m MdeModulePkg/Application/HelloWorld/HelloWorld.inf\par
+\pard\nowidctlpar\li360\sb200\b0 Build the module in the current working directory if it contains a module description file and specify the platform on the command line.\par
+\pard\nowidctlpar\li720\sb200\b C:\\ MyWorkspace\\MdeModulePkg\\Application\\HelloWorld>build \endash a Ia32 \\\par
+\pard\nowidctlpar\li720\endash p Nt32Pkg\\Nt32Pkg.dsc\par
+\pard\nowidctlpar\li360\sb200\b0 Build the module in the current working directory and use the active platform specified in the target.txt file.\par
+\pard\nowidctlpar\li720\sb200\b C:\\ MyWorkspace\\MdeModulePkg\\Application\\HelloWorld>build \endash a Ia32 \par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\fs28 Bugs \par
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 No known bugs.\par
+Report bugs to issues@buildtools.tianocore.org\par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 Files \par
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 target.txt, tools_def.txt, platform.dsc, flashmap.fdf, package.dec and module.inf.\par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 See also\par
+\pard\nowidctlpar\li360\sb200\cf2\b0\fs18 GenFds.exe\par
+\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx360\tx1440\cf1\b\fs28 License\par
+\pard\nowidctlpar\li360\cf2\b0\fs18 Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\par
+\par
+This program and the accompanying materials are licensed and made available under the terms and\par
+conditions of the BSD License which accompanies this distribution. The full text of the license may be\par
+found at:\par
+http://opensource.org/licenses/bsd-license.php\par
+\par
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES\par
+OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par
+}
+
diff --git a/BaseTools/UserManuals/GenVtf_Utility_Man_Page.rtf b/BaseTools/UserManuals/GenVtf_Utility_Man_Page.rtf
index e8c3a40047..68a5397ed6 100644
--- a/BaseTools/UserManuals/GenVtf_Utility_Man_Page.rtf
+++ b/BaseTools/UserManuals/GenVtf_Utility_Man_Page.rtf
@@ -1,101 +1,108 @@
-{\rtf1\adeflang1025\ansi\ansicpg936\uc2\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}
-{\f37\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}{\f38\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}{\f39\froman\fcharset238\fprq2 Times New Roman CE;}{\f40\froman\fcharset204\fprq2 Times New Roman Cyr;}
-{\f42\froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
-{\f46\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f171\fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f409\fswiss\fcharset238\fprq2 Verdana CE;}
-{\f410\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f412\fswiss\fcharset161\fprq2 Verdana Greek;}{\f413\fswiss\fcharset162\fprq2 Verdana Tur;}{\f416\fswiss\fcharset186\fprq2 Verdana Baltic;}{\f417\fswiss\fcharset163\fprq2 Verdana (Vietnamese);}
-{\f421\fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
-\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green127\blue127;}{\stylesheet{
-\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{
-\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 1;}{
-\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 2;}{\*\cs10
-\additive \ssemihidden Default Paragraph Font;}{\*
-\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc2\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}
+{\f39\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}{\f42\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana{\*\falt Tahoma};}{\f155\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}
+{\f156\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\f158\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}{\f159\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}
+{\f160\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\f161\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}{\f162\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}
+{\f163\froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\f287\fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f547\fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}{\f575\fswiss\fcharset238\fprq2 Verdana CE{\*\falt Tahoma};}
+{\f576\fswiss\fcharset204\fprq2 Verdana Cyr{\*\falt Tahoma};}{\f578\fswiss\fcharset161\fprq2 Verdana Greek{\*\falt Tahoma};}{\f579\fswiss\fcharset162\fprq2 Verdana Tur{\*\falt Tahoma};}{\f582\fswiss\fcharset186\fprq2 Verdana Baltic{\*\falt Tahoma};}
+{\f583\fswiss\fcharset163\fprq2 Verdana (Vietnamese){\*\falt Tahoma};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
+\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red8\green96\blue168;\red0\green127\blue127;}
+{\stylesheet{\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 Normal;}{
+\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 1;}{
+\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\f42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext0 heading 2;}{\*\cs10
+\additive \ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}
-{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid5839829}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator jwang36}{\creatim\yr2008\mo12\dy31\hr15\min23}{\revtim\yr2008\mo12\dy31\hr15\min24}{\version2}{\edmins1}{\nofpages3}
-{\nofwords455}{\nofchars2595}{\nofcharsws3044}{\vern24613}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect
-\deftab360\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
-\jcompress\viewkind4\viewscale100\rsidroot5839829 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl2
-\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \dbch )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}
-{\pntxta \dbch )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}
-{\pntxta \dbch )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar
-\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0
-\b\fs28\cf17\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Name
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 GenVtf.exe - generate the Boot Strap File (AKA Volume Top File, or VTF) for IPF images
-\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\lang1036\langfe2052\langnp1036\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Synopsis
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs18
-\ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 GenVtf.exe [options]}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\lang1036\langfe2052\langnp1036\insrsid5839829
-\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Description
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37
+{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid4810562\rsid4946234\rsid5839829\rsid15806093}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator lgao4}{\creatim\yr2008\mo12\dy31\hr15\min23}{\revtim\yr2010\mo2\dy12\hr10\min54}{\version5}
+{\edmins3}{\nofpages3}{\nofwords456}{\nofchars2600}{\nofcharsws3050}{\vern24615}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}
+\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect
+\deftab360\widowctrl\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
+\jcompress\viewkind4\viewscale100\rsidroot5839829 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl2
+\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \hich .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \hich )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \hich (}
+{\pntxta \hich )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \hich (}
+{\pntxta \hich )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \hich (}{\pntxta \hich )}}\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0
+\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28
+\ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 Name
+\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af42\afs18 \ltrch\fcs0
+\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 GenVtf.exe - generate the Boot Strap File (AKA Volume Top File, or VTF) for IPF images
+\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 Synopsis
+\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs18
+\ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 GenVtf.exe [options]}{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\lang1036\langfe2052\langnp1036\insrsid5839829
+\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 Description
+\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af42\afs18 \ltrch\fcs0
+\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42
GenVtf is used to generate the Boot Strap File (AKA Volume Top File, or VTF) for IPF images. This utility will parse the input BSF inf file and get the component information. If all the components which are required to put into a single VTF file, then onl
-\hich\af37\dbch\af13\loch\f37 y\hich\af37\dbch\af13\loch\f37 one VTF Base Address and Size will be needed and only one raw data output file and one symbol output file which is the symbol of raw data. If there\hich\f37 \rquote \loch\f37
-s component which is required to put into the second VTF file but there\hich\f37 \rquote \loch\f37 s no second VTF Base Address and S\hich\af37\dbch\af13\loch\f37 i\hich\af37\dbch\af13\loch\f37
-ze specified in command line interface, then this utility will exit with related error message; if there\hich\f37 \rquote \loch\f37 s second VTF Base Address and Size specified, then there are two raw data output files and one symbol output file.
-\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Options
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs18
-\ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 -f, --filename BS_INFFile
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 \hich\af37\dbch\af13\loch\f37 Name of the BS Image INF file to use
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 -r, --baseaddr hexaddress
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 The Base Address is the starting address of the Firmware Volume where the Boot Strapped Image will reside
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 -s, --size Size
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 The size of the Firmware Volume
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 -o, --output Filename
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 VTF Filename that will be created
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 --version
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \tab \hich\af37\dbch\af13\loch\f37 Print version and copyright of this program and exit
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 -v, --verbose
-\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37
-Turn on verbose output with informational messages printed. This is a count value, so specifying \hich\f37 \endash \loch\f37 vv can be used to increase the verbosity\hich\af37\dbch\af13\loch\f37 level.
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 -q, --quiet
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \tab \hich\af37\dbch\af13\loch\f37 Disable all messages except FATAL ERRORS
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 -d, --debug [#]
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \tab \hich\af37\dbch\af13\loch\f37 Enable debug messages, at level #
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 -h, --help
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \tab \hich\af37\dbch\af13\loch\f37 Print copyright, version and usage of this program and exit
-\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Example
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 \hich\f37 Generate one VTF file with inf file name, base address and size specified in command line and without output filename specified. So default filename \'93\loch\f37 \hich\f37 VTF1.RAW\'94
-\loch\f37 will be used.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 GenVtf \hich\f37 \endash \loch\f37 f bsf.inf \hich\f37 \endash \loch\f37 r 0xFFE00000 \hich\f37 \endash \loch\f37 s 0x200000
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Generate two VTF files with inf file n\hich\af37\dbch\af13\loch\f37 \hich\f37
-ame, base address and size specified in command line and without output filename specified. So default filename \'93\loch\f37 \hich\f37 VTF1.RAW\'94\loch\f37 \hich\f37 and \'93\loch\f37 \hich\f37 VTF2.RAW\'94\loch\f37 will be used.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 GenVtf \hich\f37 \endash \loch\f37 f bsf.inf \hich\f37 \endash \loch\f37 r 0xFFE00000 \hich\f37 \endash \loch\f37 s 0x200000 \hich\f37 \endash \loch\f37
-r 0xFFD00000 \hich\f37 \endash \loch\f37 s 0x100000
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Generate one VTF file with inf file\hich\af37\dbch\af13\loch\f37 name, base address and size specified in command line and output filename specified.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 GenVtf \hich\f37 \endash \loch\f37 o file.tmp \hich\f37 \endash \loch\f37 f bsf.inf \hich\f37 \endash \loch\f37 r 0xFFE00000 \hich\f37 \endash \loch\f37
+\hich\af42\dbch\af13\loch\f42 y\hich\af42\dbch\af13\loch\f42 one VTF Base Address and Size will be needed and only one raw data output file and one symbol output file which is the symbol of raw data. If there\hich\f42 \rquote \loch\f42
+s component which is required to put into the second VTF file but there\hich\f42 \rquote \loch\f42 s no second VTF Base Address and S\hich\af42\dbch\af13\loch\f42 i\hich\af42\dbch\af13\loch\f42
+ze specified in command line interface, then this utility will exit with related error message; if there\hich\f42 \rquote \loch\f42 s second VTF Base Address and Size specified, then there are two raw data output files and one symbol output file.
+\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 Options}{\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0
+\b\fs28\cf18\insrsid5839829
+\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs18
+\ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 -f, --filename BS_INFFile
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 \hich\af42\dbch\af13\loch\f42 Name of the BS Image INF file to use
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 -r, --baseaddr hexaddress
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 The Base Address is the starting address of the Firmware Volume where the Boot Strapped Image will reside
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 -s, --size Size
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 The size of the Firmware Volume
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 -o, --output Filename
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 VTF Filename that will be created
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 --version
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \tab \hich\af42\dbch\af13\loch\f42 Print version and copyright of this program and exit
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 -v, --verbose
+\par }\pard \ltrpar\ql \li360\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42
+Turn on verbose output with informational messages printed. This is a count value, so specifying \hich\f42 \endash \loch\f42 vv can be used to increase the verbosity\hich\af42\dbch\af13\loch\f42 level.
+\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 -q, --quiet
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \tab \hich\af42\dbch\af13\loch\f42 Disable all messages except FATAL ERRORS
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 -d, --debug [#]
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \tab \hich\af42\dbch\af13\loch\f42 Enable debug messages, at level #
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 -h, --help
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \tab \hich\af42\dbch\af13\loch\f42 Print copyright, version and usage of this program and exit
+\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 Example}{\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0
+\b\fs28\cf18\insrsid5839829
+\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af42\afs18 \ltrch\fcs0
+\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 \hich\f42 Generate one VTF file with inf file name, base address and size specified in command line and without output filename specified. So default filename \'93\loch\f42 \hich\f42 VTF1.RAW\'94
+\loch\f42 will be used.
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 GenVtf \hich\f42 \endash \loch\f42 f bsf.inf \hich\f42 \endash \loch\f42 r 0xFFE00000 \hich\f42 \endash \loch\f42 s 0x200000
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 Generate two VTF files with inf file n\hich\af42\dbch\af13\loch\f42 \hich\f42
+ame, base address and size specified in command line and without output filename specified. So default filename \'93\loch\f42 \hich\f42 VTF1.RAW\'94\loch\f42 \hich\f42 and \'93\loch\f42 \hich\f42 VTF2.RAW\'94\loch\f42 will be used.
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 GenVtf \hich\f42 \endash \loch\f42 f bsf.inf \hich\f42 \endash \loch\f42 r 0xFFE00000 \hich\f42 \endash \loch\f42 s 0x200000 \hich\f42 \endash \loch\f42
+r 0xFFD00000 \hich\f42 \endash \loch\f42 s 0x100000
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 Generate one VTF file with inf file\hich\af42\dbch\af13\loch\f42 name, base address and size specified in command line and output filename specified.
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 GenVtf \hich\f42 \endash \loch\f42 o file.tmp \hich\f42 \endash \loch\f42 f bsf.inf \hich\f42 \endash \loch\f42 r 0xFFE00000 \hich\f42 \endash \loch\f42
s 0x200000
-\par }{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Generate two VTF files with inf file name, base address and size specified in command line and output filename spe\hich\af37\dbch\af13\loch\f37 cified.
-\par }{\rtlch\fcs1 \ab\af37\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 GenVtf \hich\f37 \endash \loch\f37 o file1.tmp \hich\f37 \endash \loch\f37 o file2.tmp \hich\f37 \endash \loch\f37 f bsf.inf \hich\f37 \endash \loch\f37
-r 0xFFE00000 \hich\f37 \endash \loch\f37 s 0x200000 \hich\f37 \endash \loch\f37 r 0xFFD00000 \hich\f37 \endash \loch\f37 s 0x100000
-\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Bugs
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 No known bugs.
-\par \hich\af37\dbch\af13\loch\f37 Report bugs to issues@buildtools.tianocore.org
-\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Files
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 None
-\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829 \hich\af37\dbch\af13\loch\f37 See also
-\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 None
-\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
-\fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af37\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829 \hich\af37\dbch\af13\loch\f37 License
-\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af37\hich\af37\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0
-\fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 Copyright (c) 1999-200}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af37\dbch\af13\loch\f37 9}{\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829
-\hich\af37\dbch\af13\loch\f37 Intel Corporation. All right\hich\af37\dbch\af13\loch\f37 s reserved
-\par \hich\af37\dbch\af13\loch\f37 This program and the accompanying materials are licensed and made available
-\par \hich\af37\dbch\af13\loch\f37 under the terms and conditions of the BSD License which accompanies this
-\par \hich\af37\dbch\af13\loch\f37 distribution. The full text of the license may be found at
-\par \hich\af37\dbch\af13\loch\f37 http://opensource.org/licenses/bsd\hich\af37\dbch\af13\loch\f37 -license.php
-\par
-\par \hich\af37\dbch\af13\loch\f37 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-\par \hich\af37\dbch\af13\loch\f37 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af37\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 Generate two VTF files with inf file name, base address and size specified in command line and output filename spe\hich\af42\dbch\af13\loch\f42 cified.
+\par }{\rtlch\fcs1 \ab\af42\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 GenVtf \hich\f42 \endash \loch\f42 o file1.tmp \hich\f42 \endash \loch\f42 o file2.tmp \hich\f42 \endash \loch\f42 f bsf.inf \hich\f42 \endash \loch\f42
+r 0xFFE00000 \hich\f42 \endash \loch\f42 s 0x200000 \hich\f42 \endash \loch\f42 r 0xFFD00000 \hich\f42 \endash \loch\f42 s 0x100000
+\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 Bugs}{\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0
+\b\fs28\cf18\insrsid5839829
+\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af42\afs18 \ltrch\fcs0
+\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 No known bugs.
+\par \hich\af42\dbch\af13\loch\f42 Report bugs to issues@buildtools.tianocore.org
+\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 Files}{\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0
+\b\fs28\cf18\insrsid5839829
+\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af42\afs18 \ltrch\fcs0
+\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 None
+\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 See}{\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0
+\b\fs28\cf18\insrsid5839829 \hich\af42\dbch\af13\loch\f42 }{\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid15806093 \hich\af42\dbch\af13\loch\f42 also}{\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf18\insrsid5839829
+\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af42\afs18 \ltrch\fcs0
+\fs18\cf1\insrsid5839829 \hich\af42\dbch\af13\loch\f42 None
+\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid4810562 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5839829\charrsid4810562 \hich\af42\dbch\af13\loch\f42 License}{\rtlch\fcs1 \ab\af42\afs28 \ltrch\fcs0
+\b\fs28\cf18\insrsid5839829
+\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid4946234 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe2052\loch\af42\hich\af42\dbch\af13\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af42\afs18
+\ltrch\fcs0 \fs18\cf1\insrsid4946234 \hich\af42\dbch\af13\loch\f42 Copyright (c) }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4946234 \hich\af42\dbch\af13\loch\f42 1999}{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4946234
+\hich\af42\dbch\af13\loch\f42 - 2009, Intel Corporation<\hich\af42\dbch\af13\loch\f42 BR>
+\par \hich\af42\dbch\af13\loch\f42 All rights reserved. This program and the accompanying materials
+\par \hich\af42\dbch\af13\loch\f42 are licensed and made available under the terms and conditions of the BSD License
+\par \hich\af42\dbch\af13\loch\f42 which accompanies this distribution. The full text of the license may be found at
+\par \hich\af42\dbch\af13\loch\f42 http://opensource.org/\hich\af42\dbch\af13\loch\f42 licenses/bsd-license.php}{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4946234 \tab
+\par }{\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid4946234
+\par \hich\af42\dbch\af13\loch\f42 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+\par \hich\af42\dbch\af13\loch\f42 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af42\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5839829
\par }} \ No newline at end of file
diff --git a/BaseTools/gcc/mingw-gcc-build.py b/BaseTools/gcc/mingw-gcc-build.py
index 0edec75bc4..f01bedc7bc 100755
--- a/BaseTools/gcc/mingw-gcc-build.py
+++ b/BaseTools/gcc/mingw-gcc-build.py
@@ -1,10 +1,21 @@
#!/usr/bin/env python
+## @file
#
# Automation of instructions from:
# http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-doc/
# howto-build/mingw-w64-howto-build.txt?revision=216&view=markup
#
+# Copyright (c) 2008 - 2010, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
from optparse import OptionParser
import os
@@ -31,7 +42,7 @@ if sys.version_info < (2, 5):
#
VersionNumber = "0.01"
__version__ = "%prog Version " + VersionNumber
-__copyright__ = "Copyright (c) 2008, Intel Corporation. All rights reserved."
+__copyright__ = "Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved."
class Config:
"""class Config
@@ -82,6 +93,18 @@ class Config:
help = "Prefix to install binutils/gcc into"
)
Parser.add_option(
+ "--skip-binutils",
+ action = "store_true", dest = "skip_binutils",
+ default = False,
+ help = "Will skip building binutils"
+ )
+ Parser.add_option(
+ "--skip-gcc",
+ action = "store_true", dest = "skip_gcc",
+ default = False,
+ help = "Will skip building GCC"
+ )
+ Parser.add_option(
"--symlinks",
action = "store", type = "string", dest = "symlinks",
default = os.path.join(self.base_dir, 'symlinks'),
@@ -116,13 +139,25 @@ class Config:
self.symlinks = os.path.realpath(os.path.expanduser(self.options.symlinks))
def IsConfigOk(self):
-
+
+ building = []
+ if not self.options.skip_binutils:
+ building.append('binutils')
+ if not self.options.skip_gcc:
+ building.append('gcc')
+ if len(building) == 0:
+ print "Nothing will be built!"
+ print
+ print "Please try using --help and then change the configuration."
+ return False
+
print "Current directory:"
print " ", self.base_dir
print "Sources download/extraction:", self.Relative(self.src_dir)
print "Build directory :", self.Relative(self.build_dir)
print "Prefix (install) directory :", self.Relative(self.prefix)
print "Create symlinks directory :", self.Relative(self.symlinks)
+ print "Building :", ', '.join(building)
print
answer = raw_input("Is this configuration ok? (default = no): ")
if (answer.lower() not in ('y', 'yes')):
@@ -164,12 +199,19 @@ class SourceFiles:
self.config = config
self.source_files = self.source_files[config.arch]
+ if config.options.skip_binutils:
+ del self.source_files['binutils']
+
+ if config.options.skip_gcc:
+ del self.source_files['gcc']
+ del self.source_files['mingw_hdr']
+
source_files_common = {
'binutils': {
'url': 'http://www.kernel.org/pub/linux/devel/binutils/' + \
'binutils-$version.tar.bz2',
- 'version': '2.18.50.0.5',
- 'md5': 'daee18dbbf0a6ccfc186141bee18bf62',
+ 'version': '2.20.51.0.5',
+ 'md5': '6d2de7cdf7a8389e70b124e3d73b4d37',
},
}
@@ -183,10 +225,10 @@ class SourceFiles:
'mingw_hdr': {
'url': 'http://sourceforge.net/projects/' + \
'mingw-w64/files/mingw-w64/mingw-w64-snapshot/' + \
- 'mingw-w64-snapshot-$version.tar.bz2/download',
+ 'mingw-w64-trunk-snapshot-$version.tar.bz2/download',
'extract-dir': os.path.join('trunk', 'mingw-w64-headers'),
- 'version': '20090419',
- 'md5': '9146ecfabaf172e4cc427b88e8d218c1',
+ 'version': '20091222',
+ 'md5': 'fbcf282d1a05df121088d775e02095d6',
},
}
@@ -261,7 +303,7 @@ class SourceFiles:
self.dots = 0
local_file = os.path.join(self.config.src_dir, fdata['filename'])
url = fdata['url']
- print 'Downloading %s:' % fname,
+ print 'Downloading %s:' % fname, url
if retries > 0:
print '(retry)',
sys.stdout.flush()
@@ -312,8 +354,8 @@ class SourceFiles:
print '[KeyboardInterrupt]'
return False
- except:
- pass
+ except Exception, e:
+ print e
if not completed: return False
@@ -394,10 +436,12 @@ class Builder:
self.config = config
def Build(self):
- self.BuildModule('binutils')
- self.CopyIncludeDirectory()
- self.BuildModule('gcc')
- self.MakeSymLinks()
+ if not self.config.options.skip_binutils:
+ self.BuildModule('binutils')
+ if not self.config.options.skip_gcc:
+ self.CopyIncludeDirectory()
+ self.BuildModule('gcc')
+ self.MakeSymLinks()
def IsBuildStepComplete(self, step):
return \