期刊文献+

一般上下文无关文法的一个分析算法 被引量:2

An Efficient Parsing Algorithm for General Context-free Grammars
在线阅读 下载PDF
导出
摘要 本文给出一般上下文无关文法的一个分析算法。该算法可以看成是LR分析算法的推广,它既是自底向上,又是从左到右。理论分析表明本算法对一般文法具有时间界O(n^3)这里n是输入句子的长度);对有界歧义文法时间界为O(n^2),而对LR文法时间界为O(n)。由于本算法是先将文法转换成分析表,然后用分析表来指导对句子的分析。因而在实际应用中本算法一般要比Earley算法快,另外本算法输出中包含输入句子的所有可能的分析,并且仅需一简单枚举就可从此输出中找出句子的一个分析。 This paper presents an efficient general context-free parsing algorithm. The algorithm. can be viewed as an extension of the LR parsing algorithm. It is both bottom-up and left-to-right. Theoretical study shows that the algorithm has a time bound O(n3) (where n is the length of the input string.) in general, it has an O(n2) time bound for bounded-ambiguous grammars, and run in linear time on LR grammars. Due to the utilization of LR parsing table, the algorithm appears to be faster than Earley's algorithm in practical runnings. Moreover, the algorithm produces all the parses for an input string in an efficient representation in which a parse can be extracted simply by an enumeration.
作者 潘培琛
出处 《北京大学学报(自然科学版)》 CAS CSCD 北大核心 1989年第5期615-625,共11页 Acta Scientiarum Naturalium Universitatis Pekinensis
关键词 上下文无关文法 语法分析 算法设计与分析 context-free grammar parsing design and.analysis of algorithm
  • 相关文献

同被引文献16

  • 1温敬和.语法制导翻译在汇编程序自动构造中的应用[J].计算机工程,2005,31(12):75-77. 被引量:4
  • 2杨永安,余培军,张武光,冯祖仁,骆永进.面向航天器控制的专用语言及编译程序设计[J].计算机工程,2006,32(12):247-249. 被引量:6
  • 3杨永安,余培军,陈建平,冯祖仁,崔卫华.基于SCL的航天器遥控操作平台设计与实现[J].宇航学报,2006,27(3):438-441. 被引量:8
  • 4秦振松.编译原理及程序设计[M].南京:东南大学出版社.2001,36~40
  • 5Alfred V.Aho.RaviSethi.JeffreyD.Ullman.compilers:Principles.Techniques.
  • 6Uniled Space Alliance. HAL/S language specificalion: US 003088 [P]- 2005-11-23.
  • 7MARTINH,任新潮.HAL/S用于航天飞机的编程系统[J].导弹与航天运载技术,1988(3):36-49.
  • 8MIMS T L. Use of spacecraft command language for ad- vanced command and control applications[ EB/OL]. ( 2011- 09-23) [2015 03-28]. http://ntrs, nasa. gov/search, jsp.
  • 9BR()WN R A. Automating space operations using timeliner and ADEPT[ R]. Houston = AIAA ATS2005,2005: 4-11.
  • 10SWANTON D R. Integrating timeliner and autonomous planning[D]. Boston= Massachusetts Institute of Technolo- gy,2006:1 74.

引证文献2

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部