grammar.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:beepboop 作者: nicolehe 项目源码 文件源码
def __init__(self, start, productions):
        """
        Create a new feature-based grammar, from the given start
        state and set of ``Productions``.

        :param start: The start symbol
        :type start: FeatStructNonterminal
        :param productions: The list of productions that defines the grammar
        :type productions: list(Production)
        """
        CFG.__init__(self, start, productions)

    # The difference with CFG is that the productions are
    # indexed on the TYPE feature of the nonterminals.
    # This is calculated by the method _get_type_if_possible().
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号