Python是开放源码 所以你可以检查源码...
在 Python 源目录中, Python 源目录是一个含有“ Python. asdl” 的“ Parser” 目录, 带有该注释
-- ASDL s four builtin types are identifier, int, string, object
同一目录中还有一个“ asdl. py” 文件...
"""An implementation of the Zephyr Abstract Syntax Definition Language.
See http://asdl.sourceforge.net/ and
http://www.cs.princeton.edu/research/techreps/TR-554-97
Only supports top level module decl, not view. I m guessing that view
is intended to support the browser and I m not interested in the
browser.
Changes for Python: Add support for module versions
"""
因此,它似乎是一个定制的采集器生成器。 LALR(1) 采集器生成器并不难写。