- 1、本文档共105页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[本章小结] 考察本章知识点最典型的题目是 1.已知文法G[A],写出它定义的语言描述 如:G[A]: A → 0B|1C B → 1|1A|0BB C → 0|0A|1CC 答案:G[A]定义的语言由0、1符号串组成,串中0和1的个数相同. 2.给出语言描述,构造文法. 如:构造一文法,其定义的语言是由算符+, *, (,)和运算对象a构成的算术表达式的集合. 答案1: G[E] E→E+T|T T→T*F|F F→(E)|a 答案2: G[E] E→E+E|E*E|(E)|a 相关术语的回顾(英文版) 上下文无关文法 A context free grammar(grammar for short) consists of terminals ,nonterminals,a start symbol,and productions. Terminals are the basic symbols from which strings are formed. Nonterminals are syntactic variables that denote sets of strings that help define the language generated by the grammar. In a grammar,one nonterminal is distinguished as the start symbol,and the set of strings it denotes is the language defined by the grammar. The productions of a grammar specify the manner in which the terminals and nonterminals can be combined to form string. 句型句子和语言 Given a grammar G with start symbol S,we can use the =* relation to define L(G),the language generated by G. Strings in L(G) may contain only terminal symbols of G. We say a string of terminals w is in L(G) if and only if S =* w .The string w is called a sentence of G. If S =* α,wher α may contain nonterminals then we say that α is a sentential form of G 验证文法生成的语言 A proof that a grammar G generates a language L has two parts:we must show that every string generated by G is in L,and coversely that every string in L can indeed be generated by G. 语法树和推导 A parse tree may be viewed as a graphical representation for a derivation that filt out the choice regarding replacement order. The leaves of the parse tree are labeled by nonterminals or terminals and ,read from left to right,they constitute a sentential form,called the yield or frontier of the tree. 句型分析,语法分析 Parsing is the process of determing if a string of token can be generated by a grammar. Most parsing methods fall into one of two classes,called the top-down and bottom-up methods. These terms refer to the order in which nodes in the parse tree are construct
您可能关注的文档
- 2018年思想道德修养与法律基础第6章123节.ppt
- 2018年修订版高教版《毛概》课第一章.ppt
- ANSYS电磁场教程电磁模拟.ppt
- CSC公派留学项目详细说明附邀请函模板联合培养博士.ppt
- C语言数据类型和变量.ppt
- eviews操作实例-向量自回归模型VAR和VEC.ppt
- FMEA培训教材第四版西门子.ppt
- GCT、管理类联考逻辑辅导讲义.ppt
- ISO1302表面粗糙度、波纹度、原始轮廓讲义.ppt
- MSA培训教材第4版.ppt
- 河南省郑州市第一中学2017-2018学年高一下学期周测物理试题(325)扫描版含答案.doc
- 山西省怀仁县第一中学2017-2018学年高二下学期第一次月考生物试题扫描版.doc
- 河南省六市高三下学期第一次联考试题(3月)理科综合扫描版含答案.doc
- 四川省高三全国Ⅲ卷冲刺演练(一)文综地理试卷扫描版含答案.doc
- 河南省洛阳市高三第二次统考文综试卷扫描版含答案.doc
- 甘肃省靖远县高三下学期第二次联考理科综合试题扫描版含答案.doc
- 问题导学法在办公场景中的实施策略及效果评估.docx
- 退休后的个人品牌打造与传播策略.docx
- 问题解决在办公流程优化中的应用.docx
- 问题导向的办公环境创新设计.docx
最近下载
- 2023-2024学年教科版四年级科学下册全册教案.docx
- 2025年山东劳动职业技术学院高职单招职业技能测试近5年常考版参考题库含答案解析.docx
- 2025年外科护理主管护师(中级)真题精选 .pdf VIP
- 亮剑精神与企业管理.ppt
- 保险分级分类考测试题(含答案).doc
- 2025山西大同云冈文化旅游产业发展有限公司招聘笔试模拟试题及答案解析.docx
- 小学奥数 定义新运算 精选练习例题 含答案解析(附知识点拨及考点).pdf
- 2023年11月上海市教育委员会教育技术装备中心招考聘用笔试历年高频考点(难、易错点荟萃)附带答案详解.docx
- 幼儿园认识玉米ppt课件.pptx
- 《外国新闻史》全套教学课件.pptx
文档评论(0)