<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/BaseTools/Source/Python, branch dependabot/github_actions/actions/github-script-9</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-04-21T00:18:43+00:00</updated>
<entry>
<title>BaseTools: Reject Inline Comments in tools_def</title>
<updated>2026-04-21T00:18:43+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2026-04-03T20:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=be4fc071eb01c7420707e887c92a3adf3e07ea72'/>
<id>urn:sha1:be4fc071eb01c7420707e887c92a3adf3e07ea72</id>
<content type='text'>
There is a bug in BaseTools currently when an inline
comment is used in tools_def. The comment is not
stripped out and wreaks havoc down the line,
causing BaseTools to get confused elsewhere and
drop build options it should be applying.

This fixes that behavior by following the build spec
which states:

Comments are only allows on separate lines and may not
be appended appear on actual entry lines.

Inline comments are now not allowed and the build will
fail and specify why and where.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Ecc: Update to ANTLR 4.13.2</title>
<updated>2026-04-08T22:23:35+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2026-03-19T22:23:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=35c03c1c9f53af6ff9bbc5f8748eb30614259687'/>
<id>urn:sha1:35c03c1c9f53af6ff9bbc5f8748eb30614259687</id>
<content type='text'>
ANTLR 4.9 is broken in python 3.13 because
it uses a library in the autogenerated files
that is removed.

This updates to 4.13.2 and also updates the autogen
files, which contain support for python 3.13 as well
as backwards compat.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Ecc: Use SPDX in AutoGen Template</title>
<updated>2026-04-08T22:23:35+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2026-04-03T16:28:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9b676f7cc2d13c0666ef47010bfb093768896195'/>
<id>urn:sha1:9b676f7cc2d13c0666ef47010bfb093768896195</id>
<content type='text'>
The ANTLR autogen files are currently created
without an SPDX identifer. Add the BSD-2-Clause-Patent
ID.

While here, correct the command to do the autogeneration
by using the right filename.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Ecc: Drop ANTLR 3 Support</title>
<updated>2026-04-08T22:23:35+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2026-03-19T22:20:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=229600664e264072bbca368c7cbbe26223af16a4'/>
<id>urn:sha1:229600664e264072bbca368c7cbbe26223af16a4</id>
<content type='text'>
BaseTools hasn't been using ANTLR3 since at
least 2019. Drop the files.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Source/Python/Trim: Add -f/--source-code-format option</title>
<updated>2026-03-06T19:47:31+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-01-31T22:34:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e22f4a61c9e68fdf18e5dc202c9b1495f5cdca05'/>
<id>urn:sha1:e22f4a61c9e68fdf18e5dc202c9b1495f5cdca05</id>
<content type='text'>
Add --source-code-format option that can be NASM or not
specified. This can be used for file format specific actions
when --source-code is used.

A NASM specific action is added to convert #line to %line to
preserve reference the originating NASM source file for source
level debug in NASM format.

Without this change, the source level debug of NASM files
loads the generated intermediate file in the build output
directory.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: fix mdlint issues</title>
<updated>2026-03-04T22:02:33+00:00</updated>
<author>
<name>Sherry Fan</name>
<email>sherryfan@microsoft.com</email>
</author>
<published>2026-01-20T17:54:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=75cce8c66ff3311a64c7c0ccd50052f9905a1890'/>
<id>urn:sha1:75cce8c66ff3311a64c7c0ccd50052f9905a1890</id>
<content type='text'>
Fix markdownlint formatting issues in READMEs.

Signed-off-by: Sherry Fan &lt;sherryfan@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Eot: Apply CParser4 ANTLR 4.9 regeneration whitespace changes</title>
<updated>2026-02-27T23:18:15+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-26T20:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=801abc03cd9e75a8a3085bfd9661da113b6f9a5d'/>
<id>urn:sha1:801abc03cd9e75a8a3085bfd9661da113b6f9a5d</id>
<content type='text'>
Whitespace-only changes produced by the ANTLR 4.9 code generator.

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Eot: Regenerate CParser4 files with ANTLR 4.9</title>
<updated>2026-02-27T23:18:15+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-26T20:59:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0cdbc92544909d1843605ba0561eb4e4519ded34'/>
<id>urn:sha1:0cdbc92544909d1843605ba0561eb4e4519ded34</id>
<content type='text'>
The CParser4 Python parser files (CLexer.py, CParser.py, CListener.py)
were generated 7 years ago with ANTLR 4.7.1.

Meanwhile, pip-requirements.txt pins antlr4-python3-runtime to version
4.9 in commit 4a7dd50, but the files were patched, not fully
regenerated. This version mismatch could result in failures when
running against non-trivial C code.

This change regenerates the CParser4 files with ANTLR 4.9 to resolve
the version mismatch. It also updates import statements to correctly
reference Eot instead of Ecc.

Steps used to regenerate the files:

  1. Download the ANTLR 4.9 complete tool JAR:
     - `https://www.antlr.org/download/antlr-4.9-complete.jar`

  2. Generate Python3 parser files

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Ecc: Apply CParser4 ANTLR 4.9 regeneration whitespace changes</title>
<updated>2026-02-27T23:18:15+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-26T20:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ba8010bc6c04af4932f69acd1cbf6afa2a423a91'/>
<id>urn:sha1:ba8010bc6c04af4932f69acd1cbf6afa2a423a91</id>
<content type='text'>
Whitespace-only changes produced by the ANTLR 4.9 code generator.

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Ecc: Regenerate CParser4 files with ANTLR 4.9</title>
<updated>2026-02-27T23:18:15+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-26T20:58:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ae240285120b7249a8ce1cae7fa49c7341583c3b'/>
<id>urn:sha1:ae240285120b7249a8ce1cae7fa49c7341583c3b</id>
<content type='text'>
The CParser4 Python parser files (CLexer.py, CParser.py, CListener.py)
were generated 7 years ago with ANTLR 4.7.1.

Meanwhile, pip-requirements.txt pins antlr4-python3-runtime to version
4.9 in commit 4a7dd50, but the files were patched, not fully
regenerated. This version mismatch produced two failures when running
EccMain.py against non-trivial C code:

1. A runtime warning on every file parsed:
   "ANTLR runtime and generated code versions disagree: 4.9!=4.7.1"

2. A crash when parsing complex C constructs that exercise the
   struct/union definition rule in CParser.py:

   TypeError: '&lt;' not supported between instances of 'tuple' and 'int'

   This occurs in antlr4/BufferedTokenStream.py getText() because the
   4.9 runtime changed the expected argument types for that method,
   and the 4.7.1-generated parser was passing a tuple where an int is
   now required.

This change regenerates the CParser4 files with ANTLR 4.9 to resolve
the version mismatch.

Steps used to regenerate the files:

  1. Download the ANTLR 4.9 complete tool JAR:
     - `https://www.antlr.org/download/antlr-4.9-complete.jar`

  2. Generate Python3 parser files from the grammar:

     ```
     java -jar antlr-4.9-complete.jar `
       -Dlanguage=Python3 -visitor `
       -o BaseTools/Source/Python/Ecc/CParser4_new `
       BaseTools/Source/Python/Ecc/CParser4/C.g4
     ```

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
</feed>
