Skip to content

Commit 78fc0d7

Browse files
Fix dead links to the tokenizer's source code (#1250)
1 parent 47d44b3 commit 78fc0d7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

developer-workflow/grammar.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Note: sometimes things mysteriously don't work. Before giving up, try ``make cl
4242
Then run ``make regen-ast`` to regenerate
4343
:cpy-file:`Include/internal/pycore_ast.h` and :cpy-file:`Python/Python-ast.c`.
4444

45-
* :cpy-file:`Parser/tokenizer.c` contains the tokenization code.
45+
* :cpy-file:`Parser/lexer/` contains the tokenization code.
4646
This is where you would add a new type of comment or string literal, for example.
4747

4848
* :cpy-file:`Python/ast.c` will need changes to validate AST objects

internals/compiler.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Abstract
1111

1212
In CPython, the compilation from source code to bytecode involves several steps:
1313

14-
1. Tokenize the source code (:cpy-file:`Parser/tokenizer.c`).
14+
1. Tokenize the source code (:cpy-file:`Parser/lexer/` and :cpy-file:`Parser/tokenizer/`).
1515
2. Parse the stream of tokens into an Abstract Syntax Tree
1616
(:cpy-file:`Parser/parser.c`).
1717
3. Transform AST into an instruction sequence (:cpy-file:`Python/compile.c`).

internals/parser.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,9 @@ If you are on Windows you can use the Visual Studio project files to regenerate
599599

600600
./PCbuild/build.bat --regen
601601

602-
How tokens are generated and the rules governing this is completely up to the tokenizer (:cpy-file:`Parser/tokenizer.c`)
603-
and the parser just receives tokens from it.
602+
How tokens are generated and the rules governing this are completely up to the tokenizer
603+
(:cpy-file:`Parser/lexer/` and :cpy-file:`Parser/tokenizer/`);
604+
the parser just receives tokens from it.
604605

605606
Memoization
606607
-----------

0 commit comments

Comments
 (0)