ASDL代表什么?

2024-09-28 15:36:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我看到了^{} docs

-- ASDL's 7 builtin types are:
-- identifier, int, string, bytes, object, singleton, constant

在这种情况下,ASDL代表什么?只是cpython语法吗?在


Tags: docsstringbytesobject情况代表cpythonare
1条回答
网友
1楼 · 发布于 2024-09-28 15:36:06

抽象语法描述语言(ASDL)是一种用来描述编译器中树状数据结构的语言

The abstract syntax tree (AST) is a high-level representation of the program structure without the necessity of containing the source code; it can be thought of as an abstract representation of the source code. The specification of the AST nodes is specified using the Zephyr Abstract Syntax Definition Language (ASDL)Wang97. PEP 339 Design of the CPython Compiler

您可以看到一个good write up of it here

相关问题 更多 >