we-like-parsers / pegen_experiments

Experiments for the official PEG parser generator for Python
https://github.com/python/cpython/tree/master/Tools/peg_generator
Other
275 stars 29 forks source link

Missing pegen header file #249

Closed smichaut closed 4 years ago

smichaut commented 4 years ago

Hi, I have tried to compile the project on Redhat after installing Python 3.10.0a1, running make in the root directory and I have the following error : .../pegen-master/peg_extension/peg_extension.c:1:10: fatal error: pegen.h: No such file or directory

include "pegen.h"

This prevents me to test the new PEG parser!!!

lysnikolaou commented 4 years ago

That's probably because you need to have an env variable set, that holds the path to a clone of the CPython repo. You can run something like: CPYTHON_ROOT="/home/user/repos/cpython" make and it'll solve this problem. Unfortunately, there are some more compatibility issues with 3.10 (mostly related to @pablogsal's work on typed asdl_seqs), that currently make it impossible to compile pegen. I'll try and push a PR later today to fix those.