五行缺什么怎么查询| 小孩嘴唇发红是什么原因| 胃肠化是什么意思| gu是什么品牌| 塞药塞到什么位置| 价值连城是什么意思| 晚上七八点是什么时辰| 血红蛋白偏低是什么原因| 来姨妈下面疼是为什么| 推介会是什么意思| 什么是脑中风| 石几念什么| 发烧头痛吃什么药| 智齿什么时候长| 糙米饭是什么米| 枸杞喝多了有什么坏处| 贻笑大方什么意思| 下午1点是什么时辰| 晚来天欲雪能饮一杯无什么意思| 官杀混杂是什么意思| 什么情况下怀疑白血病| 绘本是什么意思| 88是什么意思| 男生适合什么发型| 痔疮坐浴用什么药效果好| 不对劲是什么意思| 冠心病用什么药| 绝情是什么意思| 胃反酸吃什么| 低压高是什么原因| 什么什么动听| 公斤的单位是什么| 梦见涨洪水是什么兆头| 拉肚子吃什么药最好| 1037年属什么生肖| 黄瓜为什么会苦| 无法入睡是什么原因| 女左上眼皮跳是什么预兆| 精明是什么意思| 红底白杠是什么标志| 金蝉脱壳是什么意思| vegan是什么意思| 藏红花适合什么样的人喝| 在野是什么意思| 口腔义齿是什么| 什么地诉说| 梦见墙倒了有什么预兆| 什么是道德绑架| 助听器什么牌子好用| 鸡胗是鸡的什么部位| 家财万贯是什么生肖| 女性提高免疫力吃什么| 星辰大海什么意思| rpr阴性是什么意思| 女性尿频尿急吃什么药| 9月13日是什么星座| 养胃喝什么茶好| 致密是什么意思| 高铁上不能带什么东西| 什么水果糖分最低| 什么叫肾阴虚| hip是什么意思| 临幕是什么意思| 年收入10万什么水平| 河图洛书是什么意思| 献血有什么要求| 橙子和橘子有什么区别| qw医学上是什么意思| 长白班什么意思| 紫癜有什么危害| 冷冻和冷藏有什么区别| 支气管发炎用什么药| 印度的全称是什么| 不骄不躁是什么意思| 官鬼是什么意思| 唔什么意思| 十月十日是什么星座| 外阴湿疹用什么药| 男人额头凹陷预示什么| 突然头晕恶心是什么原因| 大力出奇迹什么意思| 脾囊肿是什么原因引起的| 玉米淀粉能做什么美食| 一周年祭日有什么讲究| 食邑万户是什么意思| scofield是什么品牌| 小孩一到晚上就发烧是什么原因| 六味地黄丸有什么副作用| 口嫌体正直什么意思| 你的美丽让你带走是什么歌| 沙中土是什么意思| 牙冠是什么样子的图片| 喝酒前吃什么不容易醉又不伤胃| 稀字五行属什么| 瘢痕子宫什么意思| 吃什么补白细胞效果最好| 怀孕了胃不舒服是什么原因| 鱼香肉丝是什么菜系| 京兆尹是什么官| 什么是玫瑰糠疹| 月经期不能吃什么| 锰酸钾是什么颜色| 福兮祸兮是什么意思| p波增宽什么意思| 胃萎缩是什么原因| 儿茶是什么中药| 菱形脸适合什么刘海| 国师是什么职位| 硬度单位是什么| 皮蛋吃了有什么好处和坏处| 女性痔疮挂什么科室| 老鸨是什么| 吃鸡什么意思| 颈静脉怒张见于什么病| 老年人腿无力是什么原因导致的| 没有什么了不起| 女人在什么时候最容易怀孕| 1月生日是什么星座| 什么的温度| 湿气严重吃什么药好得快| 小孩感冒发烧吃什么药| 阿司匹林什么时候吃最好| 咳嗽有白痰吃什么药最好| 孕妇吃冰的东西对胎儿有什么影响| 阳盛阴衰是什么意思| 颈部淋巴结肿大是什么原因| 11.28什么星座| 梦游为什么不能叫醒| 洋葱吃多了有什么坏处| g6pd筛查是检查什么| 红烧肉用什么肉| 2333是什么意思| 原子序数等于什么| 秋天什么水果成熟| 10月22日是什么星座| 静心是什么意思| 什么是尿酸| 轻度抑郁有什么症状| 为什么不能用红笔写名字| 内膜欠均匀是什么意思| nu11是什么意思| 倒反天罡是什么意思| 吃什么提神醒脑抗疲劳| 尽虚空遍法界什么意思| 小厨宝是什么| 痔疮什么情况下需要做手术| 什么油好| 胎儿肠管扩张是什么原因造成的| 味精和鸡精有什么区别| 心率过快是什么原因| 梦见别人装修房子是什么预兆| 9月3号是什么星座| 支气管炎吃什么药最好| 甘草配什么泡水喝最好| 小腹疼是什么原因| pd医学上是什么意思| 怀孕了挂什么科| 快递什么时候上班| 4.5是什么星座| 什么是核糖核酸| 维c有什么功效和作用| 京东自营店是什么意思| 却的偏旁叫什么| 一天老是放屁是什么原因| 手麻去医院挂什么科| 什么是免疫力| 男人时间短吃什么药好| 阴虱用什么药| 施食是什么意思| 排骨和什么菜搭配最好| 大战三百回合是什么意思| 钓黑鱼用什么饵最好| 什么是文爱| 晚8点是什么时辰| 金字旁的字有什么| 固执是什么意思| 含五行属什么| 凤是什么意思| 北京大裤衩建筑叫什么| 肾结石什么原因引起的| 婴儿老是放屁是什么原因| 刚柔并济是什么意思| 个体户是什么职业| 宫颈筛查是什么| bpd是胎儿的什么| 占位是什么意思| 什么叫囊性结节| 咏柳的咏是什么意思| 伊拉克是什么人种| elsevier是什么期刊| 三眼花翎是什么意思| 晚上血压高是什么原因| 二月二十一是什么星座| 异想天开什么意思| 支原体阳性是什么病| 玟字五行属什么| 红霉素软膏治什么病| 石楠花是什么| 拉墨绿色的大便是什么原因| 屁股上的骨头叫什么骨| 什么的小朋友填词语| 枸杞泡酒有什么作用和功效| 每天半夜两三点醒是什么原因| 廿读什么| 熟石灰是什么| 大黄泡水喝有什么功效| 漫展是什么| touch是什么牌子| 意思是什么意思| 胖大海配什么喝治咽炎| 三丧日是什么意思| 2026年属什么生肖| 老鼠吃什么| 幽门螺旋杆菌阳性吃什么药| 耳朵轮廓痒是什么原因| 考军校要什么条件| 青榄配什么煲汤止咳做法| 男生的蛋蛋长什么样| 小确幸是什么意思| 基层是什么意思| 查询电话号码拨打什么| 扁桃体发炎用什么药| 巴沙鱼为什么不能吃| 防蓝光眼镜有什么用| 伪娘是什么| 右眼上眼皮跳是什么预兆| 籍贯写什么| 说笑了是什么意思| 补气血喝什么口服液好| 8023是什么意思| 新加坡什么工作最挣钱| 补休是什么意思| 朋友越来越少暗示什么| 睡觉口干舌燥什么原因| 口苦是什么病| 朊病毒是什么| 奶水不足是什么原因造成的| 青城之恋是什么生肖| 中性粒细胞绝对值高是什么原因| 小腿细是什么原因| 是什么有什么| 滇红茶属于什么茶| 玫瑰花茶和什么搭配好| 异常出汗是什么原因| 一个虫一个圣念什么| 倒灌是什么意思| 肾结石吃什么药最好| 啤酒是什么味道| 大便一粒一粒的是什么原因| 枭神夺食会发生什么| nag是什么意思| 君山银针属于什么茶| 甲功能5项检查是查的什么| 金丝皇菊有什么功效| 吃什么水果对嗓子好| 尿胆原normal是什么意思| 五什么六什么| 狗狗感冒了吃什么药| 什么是癔症病| 博爱是什么意思| 馨字取名有什么寓意| 枸杞和山楂泡水喝有什么功效| 家家酒是什么意思| 液基细胞学检查是什么| 百度Jump to content

中国队06惨败威尔士 贝尔上演“帽子戏法”

From Wikipedia, the free encyclopedia
The string "the dog ate the bone" was created using production rules that replaced nonterminal with terminal symbols.[1]
百度 中印佛教文学发展过程中形成了许多具有普遍性的主题或题旨,比如源于森林文明的“山林栖居”是佛教独特的修行方式和生活方式,也是佛教文学的重要主题,由此在佛教文学中形成了大量的山居诗。

In formal languages, terminal and nonterminal symbols are parts of the vocabulary under a formal grammar. Vocabulary is a finite, nonempty set of symbols. Terminal symbols are symbols that cannot be replaced by other symbols of the vocabulary. Nonterminal symbols are symbols that can be replaced by other symbols of the vocabulary by the production rules under the same formal grammar.[2]

A formal grammar defines a formal language over the vocabulary of the grammar.

In the context of formal language, the term vocabulary is more commonly known as alphabet. Nonterminal symbols are also called syntactic variables.

Terminal symbols

[edit]

Terminal symbols are those symbols that can appear in the formal language defined by a formal grammar. The process of applying the production rules successively to a start symbol might not terminate, but if it terminates when there is no more production rule can be applied, the output string will consist only of terminal symbols.

For example, consider a grammar defined by two rules. In this grammar, the symbol Б is a terminal symbol and Ψ is both a nonterminal symbol and the start symbol. The production rules for creating strings are as follows:

  1. The symbol Ψ can become БΨ
  2. The symbol Ψ can become Б

Here Б is a terminal symbol because no rule exists to replace it with other symbols. On the other hand, Ψ has two rules that can change it, thus it is nonterminal. The rules define a formal language that contains countably infinite many finite-length words by the fact that we can apply the first rule any countable times as we wish. Diagram 1 illustrates a string that can be produced with this grammar.

Diagram 1. The string Б Б Б Б was formed by the grammar defined by the given production rules. This grammar can create strings with any number of the symbol Б

Nonterminal symbols

[edit]

Nonterminal symbols are those symbols that cannot appear in the formal language defined by a formal grammar. A formal grammar includes a start symbol, which is a designated member of the set of nonterminal symbols. We can derive a set of strings of only terminal symbols by successively applying the production rules. The generated set is a formal language over the set of terminal symbols.

Context-free grammars are those grammars in which the left-hand side of each production rule consists of only a single nonterminal symbol. This restriction is non-trivial; not all languages can be generated by context-free grammars. Those that can are called context-free languages. These are exactly the languages that can be recognized by a non-deterministic push down automaton. Context-free languages are the theoretical basis for the syntax of most programming languages.

Production rules

[edit]

A grammar is defined by production rules (or just 'productions') that specify which symbols can replace which other symbols; these rules can be used to generate strings, or to parse them. Each such rule has a head, or left-hand side, which consists of the string that can be replaced, and a body, or right-hand side, which consists of a string that can replace it. Rules are often written in the form headbody; e.g., the rule ab specifies that a can be replaced by b.

In the classic formalization of generative grammars first proposed by Noam Chomsky in the 1950s,[3][4] a grammar G consists of the following components:

  • A finite set N of nonterminal symbols.
  • A finite set Σ of terminal symbols that is disjoint from N.
  • A finite set P of production rules, each rule of the form
where denotes the set of all possible finite-length strings over the vocabulary using Kleene star. That is, each production rule replaces one string of symbols that contains at least one nonterminal symbol with another. In the case that the body consists solely of the empty string[note 1], it can be denoted with a special notation (often Λ, e or ε) to avoid confusion.
  • A distinguished symbol that is the start symbol.

A grammar is formally defined as the ordered quadruple . Such a formal grammar is often called a rewriting system or a phrase structure grammar in the literature.[5][6]

Example

[edit]

Backus–Naur form is a notation for expressing certain grammars. For instance, the following production rules in Backus-Naur form are used to represent an integer (which can be signed):

<digit> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
<integer> ::= ['-'] <digit> {<digit>}

In this example, terminal symbols are , and nonterminal symbols are <digit>, <integer>. [note 2]

Another example is:

In this example, terminal symbols are , and nonterminal symbols are .

See also

[edit]

Notes

[edit]
  1. ^ It contains no symbols at all.
  2. ^ This example supports strings with leading zeroes like "0056" or "0000", as well as negative zero strings like "-0" and "-00000".


References

[edit]
  1. ^ Rosen, K. H. (2012). Discrete mathematics and its applications. McGraw-Hill. pages 847-851.
  2. ^ Rosen, K. H. (2018). Discrete mathematics and its applications. McGraw-Hill. page 887.
  3. ^ Chomsky, Noam (1956). "Three Models for the Description of Language". IRE Transactions on Information Theory. 2 (3): 113–123. doi:10.1109/TIT.1956.1056813. S2CID 19519474.
  4. ^ Chomsky, Noam (1957). Syntactic Structures. The Hague: Mouton.
  5. ^ Ginsburg, Seymour (1975). Algebraic and automata theoretic properties of formal languages. North-Holland. pp. 8–9. ISBN 0-7204-2506-9.
  6. ^ Harrison, Michael A. (1978). Introduction to Formal Language Theory. Reading, Mass.: Addison-Wesley Publishing Company. pp. 13. ISBN 0-201-02955-3.
留存是什么意思 梦见狗打架是什么意思 伏天是什么意思 马齿苋长什么样子 青蒿素是什么
秀才相当于现在的什么学历 人分三六九等什么意思 浑身发抖是什么原因 生姜和红糖熬水有什么作用 肋膈角锐利是什么意思
满字是什么结构 金牛座有什么特点 一品诰命夫人是什么意思 老虎头衣服是什么牌子 梦到黄鳝是什么意思
调侃是什么意思 孩子老是流鼻血是什么原因 感冒流黄鼻涕吃什么药 动物的脖子有什么作用 病理科是干什么的
叫床是什么wzqsfys.com 乳清粉是什么东西hcv8jop4ns5r.cn 又什么又什么的词语hcv8jop4ns8r.cn 吃什么最补脑xinjiangjialails.com 黔驴技穷是什么意思hcv9jop2ns8r.cn
血细胞分析能查出什么hcv8jop8ns6r.cn cuff是什么意思hcv9jop1ns0r.cn 调理是什么意思hcv9jop1ns3r.cn 耗儿鱼是什么鱼hcv8jop7ns4r.cn 对什么有好处hcv7jop9ns2r.cn
属猴的跟什么属相最配hcv9jop3ns2r.cn 人五人六是什么意思hcv8jop8ns8r.cn 大黄泡水喝有什么功效hcv9jop1ns0r.cn 三国是什么朝代hcv8jop8ns0r.cn 来例假吃什么好hcv9jop7ns2r.cn
一蹴而就什么意思hcv9jop6ns9r.cn 胎动是什么感觉hcv9jop5ns1r.cn 脂肪粒是什么原因引起的hcv9jop6ns4r.cn 脚热是什么原因引起的hcv9jop2ns3r.cn 梦见旋风是什么预兆hcv9jop7ns4r.cn
百度