# 3A.3 语法解析

如果一个程序是良构的，那么代表该程序的 Token 序列就一定可以通过该程序的文法推导出来，并且只有一种推导方式，语法解析的核心逻辑就是还原该推导过程。如果将解析过程看着是构建一个解析树的过程，那么根据构建方式的不同，可以分为自顶向下与自底向上两种。接下来我们依次对其进行分析。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gocompiler.shizhz.me/3.b-yu-fa-fen-xi-li-lun-zhi-shi/3.3-yu-fa-jie-xi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
