全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...

利用基本文法改写模式解决语法分析冲突

DOI: 10.13190/jbupt.200603.86.lih, PP. 86-90

Keywords: LALR(1),语法分析器生成器,YACC,语法分析冲突,文法改写,消歧

Full-Text   Cite this paper   Add to My Lib

Abstract:

分析了LALR(1)分析器生成系统中语法分析冲突问题的起因和解决冲突的时机及策略,提出改写文法应遵循的4条规则,将常用的文法改写技巧总结为7个基本的文法改写模式。应用案例表明,提出的文法改写规则和基本文法改写模式可有效解决语法分析冲突。

References

[1]  Levine J R, Mason T, Brown D. Lex & yacc (3rd edition)[M]. New York: O'reilly & Associates Inc, 1995.
[2]  Annika A. User defined syntax . Goteborg, Sweden: Chalmers University of Technology, 1992.
[3]  Eun J L, Kwang M C. Grammar coverings of a deterministic parser with action conflicts [J]. Information Processing Letters, 1994, 51: 85-92.
[4]  Power J F, Malloy B A. Exploiting metrics to facilitate grammar transformation into LALR format//Proceedings of 16th ACM Symposium on Applied Computing. Las Vegas:, 2001: 11-14.
[5]  Sarbo J J. Grammar transformation for optimizing backtrack parsers. Computer Languages, 1994, 20(2): 89-100.
[6]  Aycock J, Horspool R N. Schrodinger's token[J]. Sofware-Practice and Experience, 2001, 31(8): 803-814.
[7]  Quyang S T, Wu P C, Wang F J. Locating free positions in LR(k) grammars [J]. Journal of Information Science and Engineering, 2002, 18(2): 411-423.
[8]  American National Standards Institute. ISO/IEC International Standard No.14882(E) in ASC X3. Programming Languages-C++[S]. 1998.

Full-Text

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133