asdl

What parser generator does CPython use?

旧巷老猫 提交于 2020-01-24 03:24:25
问题 I was reading this page in the documentation, and noticed that it says This is the full Python grammar, as it is read by the parser generator and used to parse Python source files However, I'm having difficulty finding out what parser generator CPython uses. So what parser generator does CPython use? Are there other parser generators that would take the grammar on that page without any modifications? 回答1: Python is open-source, so you can inspect the source code... In the Python source