请输入您要查询的字词:

 

单词 linear grammar
释义
linear grammar

Computer
  • A grammar in which each production contains at most one nonterminal in its right-hand side. Such a grammar is right-linear if a nonterminal can only occur as the rightmost symbol, i.e. if each production has one of the forms

    AwAwB
    where A and B are nonterminals and w is a string of terminals. A left-linear grammar can be similarly defined:
    AwABw
    The right- and left-linear grammars generate precisely the regular languages.

    The word linear relates to an analogy with ordinary algebra. For example, a right-linear grammar such as

    SaS|abT|abcT|abcdTS|cS|bcT|abc|abcd
    corresponds to the simultaneous linear equations
    X={a}X{ab,abc}Y{abcd}Y={Λ,c}X{bc}Y{abc,abcd}
    where X and Y are sets of strings and Λ‎ is the empty string. Union and concatenation play roles analogous to addition and multiplication. The smallest solution to the equations gives the language generated by the grammar. See Arden’s rule.


随便看

 

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

 

Copyright © 2000-2023 Sciref.net All Rights Reserved
京ICP备2021023879号 更新时间:2024/6/30 23:45:47