二元文法和一元文法_计算理论文法概论

二元文法和一元文法

Noam Chomsky gave a mathematical model of grammar. This model is used to write computer languages effectively.

诺姆•乔姆斯基 ( Noam Chomsky)给出了语法数学模型 。 该模型用于有效地编写计算机语言。

A grammar can be represented as a 4 tuple:

语法可以表示为4元组:

(N, T, P, S)

(N,T,P,S)

  • N denotes the set of variables or non-terminal symbols.

    N表示变量或非结束符号的集合。

  • T denotes the set of terminal symbols.

    T表示终端符号集。

  • S is a special variable called start symbol and S belongs to N.

    S是一个特殊的变量,称为开始符号, S属于N。

  • P is production rules for terminals and non-terminals α → β, where α and β are strings on VN ∪ ∑ and least one symbol of α belongs to VN.

    P是用于终端和非端子α→β,其中αβ是在VN∪Σ串和至少一个符号的α属于VN产生式规则。

Example:

例:

Grammar G1 − ({S, C, D}, {c, d}, S, {S → CD, C → c, D → d})

语法G1 −

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值