在学习了本教程之后,您将了解如何定义词法元素、编写yacc规则,并使用相应的规则机制来构建和定义各种不同的分析引擎和应用程序。
By the end of this tutorial, you'll understand how to define lexical elements, write yacc rules, and use the rule mechanism to build and define a range of different parsing engines and applications.
类似于P: RD,那些语法使用简单的规则来进行词法分析,然后使用更复杂的规则来解析经过词法分析后的输入内容。
Like p: : RD, those grammars use simple rules to do lexing, and then use more complex rules to parse the lexed input.
句法注意:在本章和之后的章节中,描述句法时使用与词法分析时不同的扩展BNF记法。当某个句法规则(可能是可选的)具有如下形式。
Syntax Notes: in this and the following chapters, extended BNF notation will be used to describe syntax, not lexical analysis. When (one alternative of) a syntax rule has the form.
应用推荐