节点文献
BCLR(k)文法及其分析算法
BCLR(k) GRAMMAR AND ITS PARSING ALGORITHM
【摘要】 LR(k)是很重要的一类文法,但是用正规方法构成的分析算法,需要过多的状态和很大的存储空间,因此它不适合于实际应用。后来虽然提出了SLR(k)和LALR(k)文法,但是它们都只是LR(k)文法较小的子集。本文给出了状态图和状态链的概念,并且定义了BCLR(k)文法。它是LR(k)文法较大的子集,并且包含了作为它的真子集的LALR(k)和SLR(k)文法。可是它所需的状态数却与SLR(k)文法一样多。在本文的最后,我们对算法作了某些改动,使之能分析一般的LR(k)文法。
【Abstract】 LR(k) is a very important kind of grammar, but its parsing algorithm which is constructed by a canonical method needs quite many states and very large store space. Therefore LR(k) is inadequate in actual applications. Although SLR(k) grammar and LALR(k) grammar were once proposed, they are only smaller subsets of LR(k) grammar. This paper gives the concept of state graphs and state chains and defines BCLR(k) grammar. The BCLR(K) grammar is a larger subset of LR(k) grammar and includes LALR(k) and SLR(k) grammars as its proper subsets. However, this grammar needs as many states as SLR(k) grammar does. In the end of the paper, some changes are made in this algorithm, so that it can parse general LR(k) grammar.
- 【文献出处】 计算机学报 ,Chinese Journal of Computers , 编辑部邮箱 ,1980年03期
- 【被引频次】5
- 【下载频次】18