V2EX  ›  英汉词典

Production Rule

定义 Definition

production rule(也称 rewrite rule)指形式文法中的一种规则,用来规定如何把一个非终结符替换成一串终结符和/或非终结符,从而生成句子或推导字符串。常见写法如:A → α。在计算机科学中,它广泛用于上下文无关文法(CFG)、语法分析与编译器等领域。

例句 Examples

A production rule tells the parser how to expand a nonterminal symbol.
产生式规则告诉解析器如何展开一个非终结符。

Using the production rules of a context-free grammar, we can derive many different strings from the same start symbol.
利用上下文无关文法的产生式规则,我们可以从同一个开始符号推导出许多不同的字符串。

发音 Pronunciation (IPA)

/prəˈdʌkʃən ruːl/

词源 Etymology

production 源自拉丁语 producere(“引出、产生”),在语言学/计算机科学语境中引申为“生成(字符串/结构)”;rule 表示“规则”。合起来,production rule 字面义就是“用于生成的规则”,对应形式文法中“把符号序列生成/改写为另一序列”的规则。

相关词 Related Words

文学与经典著作 Literary Works

  • Noam Chomsky, Syntactic Structures(讨论生成语法与规则系统时常用到“production/productions”的概念)
  • Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, Compilers: Principles, Techniques, and Tools(“龙书”,用产生式描述编程语言语法与语法分析)
  • John E. Hopcroft, Rajeev Motwani, Jeffrey D. Ullman, Introduction to Automata Theory, Languages, and Computation(用产生式规则讲解形式语言与文法)
  • Alfred V. Aho, Jeffrey D. Ullman, The Theory of Parsing, Translation, and Compiling(系统讨论文法、产生式与解析理论)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   697 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 21:40 · PVG 05:40 · LAX 13:40 · JFK 16:40
♥ Do have faith in what you're doing.