【问题标题】:Converting a CFG into Greibach normal form将 CFG 转换为 Greibach 范式
【发布时间】:2015-05-17 22:55:43
【问题描述】:

我们是否需要先将上下文无关文法转换为乔姆斯基范式才能将其转换为格雷巴赫范式?

【问题讨论】:

    标签: grammar context-free-grammar finite-automata automata automata-theory


    【解决方案1】:

    这个问题可能更适合https://cs.stackexchange.com/,但这里也有很多人可以回答。

    答案是,你不需要经过乔姆斯基范式。教科书中有一种方法:Hopcroft, J.E & Ullman J.D. (1969) Formal Languages and their relationship to Automata, Addison-Wesley, pp.55-57。然而,大多数简单的转换都会首先通过乔姆斯基范式。其他技术更长,并使用 Weak Greibach Normal Form 作为中间步骤。

    如果你想了解更多关于方法的细节,网上有很多课堂笔记;例如herehere;然而,许多课堂笔记只显示通过 CNF 的路线。

    【讨论】:

      猜你喜欢
      • 2021-12-08
      • 1970-01-01
      • 2021-12-02
      • 1970-01-01
      • 1970-01-01
      • 2018-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多