I'm currently on a cpython guide: https://realpython.com/products/cpython-internals-book/
I will detail what i did and what the problem is. So as it says on the book, i cloned the github :
git clone directory https://github.com/python/cpython
Then i compiled:
./configure --with-pydebug --enable-shared
make -j2 -s
Then, on the part that talks about grammar, i modified the python.gram file and on the small_stmt line i made an addition:
| ('pass' | 'proceed') { _Py_Pass(EXTRA) }
Then i tried to run the command make regen-pegen.
I had an error with the dataclass module so i decided to start from scratch.
After a new installation, i ran the command make all.
I don't know if it's a mistake but i don't have python 3.9 anymore but python 3.10.
This time the command make regen-pegen works but when i try to use it, i get a proceed is not defined error.
I tried to remove the keyword pass from python.gram to see if the changes were taken into account.
While trying to recompile I got a pass is not defined error so the changes made to the file worked fine.
I then checked that the new keyword does appear on the generated C file and yes it is in it.
(KeywordToken[]) {{NULL, -1}},
(KeywordToken[]) {{NULL, -1}},
(KeywordToken[]) {
{"if", 509},
{"in", 517},
{"ace", 519},
{"is", 526},
{"gold", 532},
{NULL, -1},
},
(KeywordToken[]) {
{"del", 502},
{"try", 510},
{"for", 516},
{"def", 522},
{"not", 525},
{"and", 533},
{NULL, -1},
},
(KeywordToken[]) {
{"from", 513},
{"elif", 514},
{"else", 515},
{"with", 518},
{"True", 527},
{"None", 529},
{"pass", 530},
{NULL, -1},
},
(KeywordToken[]) {
{"raise", 501},
{"yield", 503},
{"break", 505},
{"while", 511},
{"class", 523},
{"False", 528},
{NULL, -1},
},
(KeywordToken[]) {
{"return", 500},
{"assert", 504},
{"global", 507},
{"import", 512},
{"except", 520},
{"lambda", 524},
{NULL, -1},
},
(KeywordToken[]) {
{"finally", 521},
{"proceed", 531},
{NULL, -1},
},
(KeywordToken[]) {
{"continue", 506},
{"non-local", 508},
{NULL, -1},
},
};
I don't understand why the change is not taken into account. Thank you