请输入您要查询的字词:

 

单词 context-free grammar
释义
context-free grammar

Computer
  • A grammar in which the left-hand side of each production is a single nonterminal, i.e. productions have the form

    Aα
    (read as ‘rewrite A as α‎’), where α‎ is a string of terminals and/or nonterminals. These productions apply irrespective of the context of A. For brevity one writes
    Aα1|α2|..|αn
    to indicate the separate productions
    Aα1,Aα2,.,.,Aαn
    As an example, the following generates a simple class of arithmetic expressions typified by (a + b) × c:
    ET|T+E|(E)TE|E×T|a|b|c
    The BNF notation used in defining the syntax of programming languages is simply a context-free grammar.

    Context-free grammars are a class of phrase-structure grammar (PSG). GPSG represents the principal attempt at constructing context-free grammars capable of characterizing the grammars of natural language.

    Compare context-sensitive grammar.


随便看

 

科学参考收录了60776条科技类词条,基本涵盖了常见科技类参考文献及英语词汇的翻译,是科学学习和研究的有利工具。

 

Copyright © 2000-2023 Sciref.net All Rights Reserved
京ICP备2021023879号 更新时间:2024/12/26 1:38:28