Closed
Description
How would you go about moving all the pegen code into cpython? What I have done so far is the following.
- Copy the pegen directory into cpython/Parser (and remove all the stuff that's not needed).
- Move pegen.c and parse_string.c from cpython/Parser/pegen into cpython/Parser.
- Move pegen.h and parse_string.h from cpython/Parser/pegen into cpython/Include.
- Generate two new functions that call run_parser_* and can be called from C.
- Add a parse.h in cpython/Include that exports both the new generated functions.
- Generate the parser into Parser/parse.c.
All the names are just dummy names that I didn't give much thought, but do you think something like this would work?
Metadata
Metadata
Assignees
Labels
No labels