Title: | 二级文法和分块属性计算 |
Author: | 蔡晓莉
|
Issued Date: | 1988
|
Degree Grantor: | 中国科学院软件研究所
|
Place of Degree Grantor: | 中国科学院软件研究所
|
Degree Level: | 博士
|
Abstract: | 本文提出了广义二级文法和狭义二级文法这两个新概念;给出了文法分划的算法;叙述了解决冲突的办法;引进了对狭义二级文法的自顶向下与自底向上这两种语法分析方法有机结合的语法分析方法(LRLL(1)分析方法),本文又基于狭义二级文法提出了分块属性文法这一新概念,引进了对分块属性文法的自顶向下与自底向上这两种属性计算形式有机结合的属性计算方法(分块属性计算方法)。二级文法和分块属性文法能使语言的定义和属性文法模块化,从而增强它的可读性和可修改性。把LRLL(1)分析方法和分块属性计算方法有机地结合起来,其特点是语法分析和属性计算同时进行,使属性计算局限在相关的子结构树上,大大地减少了内存空间开销,从而达到在内存较小的微机上实现属性计算的目的。本文还介绍了基于狭义二级文法的语法分析器及分块属性计算器的自动产生器的实现。 |
English Abstract: | 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. |
Language: | 中文
|
Content Type: | 学位论文
|
URI: | http://ir.iscas.ac.cn/handle/311060/5596
|
Appears in Collections: | 中科院软件所
|
There are no files associated with this item.
|
Recommended Citation: |
蔡晓莉. 二级文法和分块属性计算[D]. 中国科学院软件研究所. 中国科学院软件研究所. 1988-01-01.
|
|
|