Title of article :
Formal ambiguity-resolving syntax de nition with asserted shift reduce sets
Author/Authors :
Jaberipur، G. نويسنده PhD degree in Computer Engineering from Sharif University of Technology , , Dorrigiv، M. نويسنده PhD student in the Department of Electrical and Computer Engineering, Shahid Beheshti University, Tehran ,
Issue Information :
دوفصلنامه با شماره پیاپی D2 سال 2013
Pages :
14
From page :
1939
To page :
1952
Abstract :
There are parser generators that accept ambiguous context-free grammars, where ambiguities are resolved via disambiguation rules, with the outcome of smaller parse tables and more ecient parsers. However, the compiler writers are expected to develop compact ambiguous grammars and extract ambiguity-resolving information from the syntax and semantics of the language. The aforementioned tasks require considerable expertise, not often owned by casual compiler writers, or even expert programmers who are assigned a serious compiler-writing task, while programming language designers are usually capable of providing a concise and compact ambiguous description of the language that may include ambiguity-resolving information. In this paper, we aim to provide a powerful notation for syntax de nition, which enables the language designer to assert some shifts and reduce sets associated with each production rule of the possibly ambiguous grammar. These sets of language tokens guide the parser generator to resolve the parse table con icts that are caused by the ambiguities in the grammar or by other sources. The practicality of the proposed asserted shift reduce notation is supported by several examples from the constructs of contemporary programming languages, and is tested to work properly via developing a parser generator that constructs con ict-free LALR (1) parse tables.
Journal title :
Scientia Iranica(Transactions D: Computer Science and Electrical Engineering)
Serial Year :
2013
Journal title :
Scientia Iranica(Transactions D: Computer Science and Electrical Engineering)
Record number :
1019014
Link To Document :
بازگشت