Skip to content

Instantly share code, notes, and snippets.

@jerobado
Created July 20, 2020 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerobado/9c4d1aecdae2443f198f8ed6b48fb5ec to your computer and use it in GitHub Desktop.
Save jerobado/9c4d1aecdae2443f198f8ed6b48fb5ec to your computer and use it in GitHub Desktop.
CPython developer common task

CPython Internal Developer Guide

How to Update Python Grammar

  1. Update Grammar/python.gram
  2. Create a Makefile
    ./configure
    
  3. Update keyword.py
    make regen-keyword
    
  4. Update parser.c
    make regen-pegen
    
  5. Build codebase to create python
    make -j4
    

Test your changes by running ./python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment