# 3A.4 语法分析工具

上文中讨论了如何对文法进行语法分析，并详细讨论了如何构造 LL 及 LR 文法的语法分析表（即上文中提到的预测表），但这只是为了深入理解语法分析的原理，在实践中的大多数情况下，我们都会直接使用语法分析器生成工具来直接生成语法分析器。因为在上述分析中我们可以发现一个事实：语法分析的总体流程是固定的，不同的仅仅是不同文法的语法分析表。而语法分析表的生成算法也是确定的，所以只要能够将文法的表示结构化，就可以将其作为输入，通过语法分析器生成工具直接生成一个语法分析器出来。Yacc(Yet Another Compiler-Compiler) 就是这样的一个工具。


---

# 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.4-yu-fa-fen-xi-gong-ju.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.
