请输入您要查询的字词:

 

单词 tree grammar
释义
tree grammar

Computer
  • A generalization of the notion of grammar, applying to trees (often called terms in this context) rather than strings (see tree language). A regular tree grammar is the corresponding generalization of the notion of regular grammar. Productions have the form

    At,
    where A is a nonterminal and t a term, e.g.
    Sh(a,g(S),b)|c
    These productions generate the regular tree language shown in the diagram. Note that the frontiers of these trees are the strings shown below each tree in the diagram. A set of strings is context-free if and only if it is the set of frontiers of the trees in a regular tree language.

    tree grammar

    Tree grammar. Language generated by a tree grammar

    The notion of context-free grammar can be similarly generalized. This time nonterminals can themselves be function symbols having an arbitrary number of arguments, e.g.

    F(x1,x2)f(x2,F(x1,g(x2)))|h(x1,x1,x2)
    This means, for example, that F(a,b) could be rewritten to
    f(b,F(a,g(b))),
    and then to
    f(b,f(g(b),F(a,g(g(b))))),
    and then to
    f(b,f(g(b),h(a,a,g(g(b)))))


随便看

 

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

 

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