摘要: 注意顺序,a和b的顺序不能搞反 (辅助理解:非终结符就像一个括号,括号里面的终结符优先级都高一些) 阅读全文
posted @ 2021-05-23 23:41 肥泽~ 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 算符优先分析 算符优先文法及优先表构造 FIRSTVT LASTVT 阅读全文
posted @ 2021-05-23 23:27 肥泽~ 阅读(51) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/2006461/202105/2006461-20210523215016344-1529913449.png) ![](https://img2020.cnblogs.com/blog/2006461/202105/2006461-20210523215038761-1725310905.png) ![](https:// 阅读全文
posted @ 2021-05-23 21:52 肥泽~ 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 分析树 规范规约 阅读全文
posted @ 2021-05-23 21:44 肥泽~ 阅读(40) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/2006461/202105/2006461-20210523190649677-565467328.png) ![](https://img2020.cnblogs.com/blog/2006461/202105/2006461-20210523190708390-888266739.png) ![](https://im 阅读全文
posted @ 2021-05-23 19:09 肥泽~ 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 文法的另一种表示法 语法图 阅读全文
posted @ 2021-05-23 18:56 肥泽~ 阅读(31) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/2006461/202105/2006461-20210523183615292-1948264987.png) ![](https://img2020.cnblogs.com/blog/2006461/202105/2006461-20210523183650775-28726266.png) ![](https://im 阅读全文
posted @ 2021-05-23 18:40 肥泽~ 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 例题 LL(1)分析表如下图: 注:acc意为accepted,接受的意思 阅读全文
posted @ 2021-05-23 17:54 肥泽~ 阅读(82) 评论(0) 推荐(0) 编辑
摘要: FIRST集和FOLLOW集的定义 注意:1:FIRST集的定义中$\alpha和\beta$可以是终结符也可以是非终结符. 2:FOLLOW集的定义中$\mu和\beta$可以是终结符也可以是非终结符,但$\mu$可以为$\varepsilon$; $\beta$不能为$\varepsilon$. 阅读全文
posted @ 2021-05-23 13:35 肥泽~ 阅读(202) 评论(0) 推荐(0) 编辑
摘要: ##LL(1)分析条件 预测分析(LL(1))法是实现自上而下分析的另一种有效方法。它使用一个分析栈和一张分析表。 LL(1)分析法的工作过程 阅读全文
posted @ 2021-05-23 12:26 肥泽~ 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 左递归的消除 使用自顶向下的任何一种算法必须消除左递归和提取公共左因子。 1.直接左递归的消除 2.完全消除左递归 提取左因子,消除回溯 1.FIRST(\(\alpha\)) 2.应用 3.公共左因子的提取 阅读全文
posted @ 2021-05-23 11:31 肥泽~ 阅读(585) 评论(0) 推荐(0) 编辑