2013
DOI: 10.1007/978-3-319-02654-1_8
|View full text |Cite
|
Sign up to set email alerts
|

Safe Specification of Operator Precedence Rules

Abstract: Abstract. In this paper we present an approach to specifying operator precedence based on declarative disambiguation constructs and an implementation mechanism based on grammar rewriting. We identify a problem with existing generalized context-free parsing and disambiguation technology: generating a correct parser for a language such as OCaml using declarative precedence specification is not possible without resorting to some manual grammar transformation. Our approach provides a fully declarative solution to … Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
3
1
1

Citation Types

2
23
0

Year Published

2015
2015
2022
2022

Publication Types

Select...
3
1
1

Relationship

2
3

Authors

Journals

citations
Cited by 12 publications
(25 citation statements)
references
References 14 publications
2
23
0
Order By: Relevance
“…For each challenge we selected a programming language that exhibits it, and wrote a data-dependent grammar 3 , derived from the specification grammar of the language. For evaluation, we parsed real source files from the source distribution of the language and some popular open source libraries, see Table 2.…”
Section: Discussionmentioning
confidence: 99%
See 4 more Smart Citations
“…For each challenge we selected a programming language that exhibits it, and wrote a data-dependent grammar 3 , derived from the specification grammar of the language. For evaluation, we parsed real source files from the source distribution of the language and some popular open source libraries, see Table 2.…”
Section: Discussionmentioning
confidence: 99%
“…To test the correctness of parsers resulting from the desugaring of >, left, and right to data-dependent grammars, we tested their resulting parse trees against a GLL parser for the same natural grammar of Java, using our previous work on rewriting operator precedence rules [3]. Both parsers, using desugaring to data-dependent grammars and rewriting operator precedence rules, produced the same parse trees for all Java files, providing an evidence that our desugaring of operator precedence to data-dependent grammars implements the same semantics as the rewriting in [3]. Despite its prototype status, the data-dependent parser is at the moment on average only 25% slower than the rewritten one.…”
Section: Discussionmentioning
confidence: 99%
See 3 more Smart Citations