cpython/Parser
Marta Gómez Macías 6715f91edc
gh-102856: Python tokenizer implementation for PEP 701 (#104323)
This commit replaces the Python implementation of the tokenize module with an implementation
that reuses the real C tokenizer via a private extension module. The tokenize module now implements
a compatibility layer that transforms tokens from the C tokenizer into Python tokenize tokens for backward
compatibility.

As the C tokenizer does not emit some tokens that the Python tokenizer provides (such as comments and non-semantic newlines), a new special mode has been added to the C tokenizer mode that currently is only used via
the extension module that exposes it to the Python layer. This new mode forces the C tokenizer to emit these new extra tokens and add the appropriate metadata that is needed to match the old Python implementation.

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2023-05-21 01:03:02 +01:00
..
Python.asdl gh-103763: Implement PEP 695 (#103764) 2023-05-15 20:36:23 -07:00
action_helpers.c gh-103763: Implement PEP 695 (#103764) 2023-05-15 20:36:23 -07:00
asdl.py bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25142) 2021-04-02 12:53:46 +09:00
asdl_c.py gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205) 2023-05-05 21:11:27 +00:00
myreadline.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
parser.c gh-103763: Implement PEP 695 (#103764) 2023-05-15 20:36:23 -07:00
peg_api.c bpo-43244: Remove parser_interface.h header file (GH-25001) 2021-03-24 01:29:09 +01:00
pegen.c gh-102856: Python tokenizer implementation for PEP 701 (#104323) 2023-05-21 01:03:02 +01:00
pegen.h gh-103656: Transfer f-string buffers to parser to avoid use-after-free (GH-103896) 2023-04-27 01:33:31 +00:00
pegen_errors.c gh-102856: Python tokenizer implementation for PEP 701 (#104323) 2023-05-21 01:03:02 +01:00
string_parser.c gh-102310: Change error range for invalid bytes literals (#103663) 2023-04-22 18:08:27 -06:00
string_parser.h gh-102856: Initial implementation of PEP 701 (#102855) 2023-04-19 11:18:16 -05:00
token.c gh-102856: Python tokenizer implementation for PEP 701 (#104323) 2023-05-21 01:03:02 +01:00
tokenizer.c gh-102856: Python tokenizer implementation for PEP 701 (#104323) 2023-05-21 01:03:02 +01:00
tokenizer.h gh-102856: Python tokenizer implementation for PEP 701 (#104323) 2023-05-21 01:03:02 +01:00