ISCAS OpenIR  > 中科院软件所  > 中科院软件所
二级文法和分块属性计算
蔡晓莉
1988
学位授予单位中国科学院软件研究所
学位博士
学位授予地点中国科学院软件研究所
摘要本文提出了广义二级文法和狭义二级文法这两个新概念;给出了文法分划的算法;叙述了解决冲突的办法;引进了对狭义二级文法的自顶向下与自底向上这两种语法分析方法有机结合的语法分析方法(LRLL(1)分析方法),本文又基于狭义二级文法提出了分块属性文法这一新概念,引进了对分块属性文法的自顶向下与自底向上这两种属性计算形式有机结合的属性计算方法(分块属性计算方法)。二级文法和分块属性文法能使语言的定义和属性文法模块化,从而增强它的可读性和可修改性。把LRLL(1)分析方法和分块属性计算方法有机地结合起来,其特点是语法分析和属性计算同时进行,使属性计算局限在相关的子结构树上,大大地减少了内存空间开销,从而达到在内存较小的微机上实现属性计算的目的。本文还介绍了基于狭义二级文法的语法分析器及分块属性计算器的自动产生器的实现。
其他摘要In this paper, the concepts of general and restricted partitioned grammars are proposed, the algorithm for partitioning context-free grammars is given. Methods for conflict resolution are discussed. A new parsing method for restricted partitioned grammars which we call LRLL(1) and is an integration of LL(1) and LR(1) is introduced. Based on restricted partitioned grammars, partitioned attribute grammar (PAG) is proposed and the attribute evaluation method for PAG is introduced. The language definition and attribute evaluation can be made modular by using PAG so that they are easy to read and modify. By using LRLL (1) parsing method with partitioned attribute evaluation method, part of the attribute evaluation can be interleaved with parsing, and attribute evaluation can be confined to the related subtree, to that the space needed for attribute evaluation can be greatly reduced. In this way, a compiler generator can be implemented on microcomputers with small storage capacity. The implementation of compiler generator based on partitioned grammar and PAG is also introduced in this paper.
页数109
语种中文
内容类型学位论文
URI标识http://ir.iscas.ac.cn/handle/311060/5596
专题中科院软件所_中科院软件所
推荐引用方式
GB/T 7714
蔡晓莉. 二级文法和分块属性计算[D]. 中国科学院软件研究所. 中国科学院软件研究所,1988.
条目包含的文件
条目无相关文件。
个性服务
推荐该条目
保存到收藏夹
查看访问统计
导出为Endnote文件
谷歌学术
谷歌学术中相似的文章
[蔡晓莉]的文章
百度学术
百度学术中相似的文章
[蔡晓莉]的文章
必应学术
必应学术中相似的文章
[蔡晓莉]的文章
相关权益政策
暂无数据
收藏/分享
所有评论 (0)
暂无评论
 

除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。