Skip to content

Commit 694e346

Browse files
authored
gh-98831: Move DSL documentation here from ideas repo (#101629)
1 parent 1fcc0ef commit 694e346

File tree

2 files changed

+415
-3
lines changed

2 files changed

+415
-3
lines changed

Tools/cases_generator/README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Tooling to generate interpreters
22

3+
Documentation for the instruction definitions in `Python/bytecodes.c`
4+
("the DSL") is [here](interpreter_definition.md).
5+
36
What's currently here:
47

58
- `lexer.py`: lexer for C, originally written by Mark Shannon
69
- `plexer.py`: OO interface on top of lexer.py; main class: `PLexer`
710
- `parser.py`: Parser for instruction definition DSL; main class `Parser`
811
- `generate_cases.py`: driver script to read `Python/bytecodes.c` and
912
write `Python/generated_cases.c.h`
13+
- `test_generator.py`: tests, require manual running using `pytest`
1014

11-
The DSL for the instruction definitions in `Python/bytecodes.c` is described
12-
[here](https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md).
13-
Note that there is some dummy C code at the top and bottom of the file
15+
Note that there is some dummy C code at the top and bottom of
16+
`Python/bytecodes.c`
1417
to fool text editors like VS Code into believing this is valid C code.
1518

1619
## A bit about the parser

0 commit comments

Comments
 (0)