2015
DOI: 10.1145/2813885.2737961
|View full text |Cite
|
Sign up to set email alerts
|

Finding counterexamples from parsing conflicts

Abstract: Writing a parser remains remarkably painful. Automatic parser generators offer a powerful and systematic way to parse complex grammars, but debugging conflicts in grammars can be time-consuming even for experienced language designers. Better tools for diagnosing parsing conflicts will alleviate this difficulty. This paper proposes a practical algorithm that generates compact, helpful counterexamples for LALR grammars. For each parsing conflict in a grammar, a counterexample demonstrating the conflict is constr… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
5
0

Year Published

2017
2017
2022
2022

Publication Types

Select...
2
1

Relationship

0
3

Authors

Journals

citations
Cited by 3 publications
(5 citation statements)
references
References 19 publications
0
5
0
Order By: Relevance
“…Creating a parser can be a difficult and time-consuming endeavor. Parser generators provide an easier way to tackle this problem [IM15]. Basically, we write the syntax specification using a formal grammar and the generator automatically builds the parser.…”
Section: Parser Generator Toolsmentioning
confidence: 99%
See 2 more Smart Citations
“…Creating a parser can be a difficult and time-consuming endeavor. Parser generators provide an easier way to tackle this problem [IM15]. Basically, we write the syntax specification using a formal grammar and the generator automatically builds the parser.…”
Section: Parser Generator Toolsmentioning
confidence: 99%
“…Shift-reduce is a process to handle input on bottom-up parsers, used by LR and LALR methods. However, there are context-free grammars where the shift-reduce process cannot decide if it should employ shift or reduce, thus creating a shift-reduce conflict [IM15,ALSU06]. SmaCC uses this process, and one of its error messages is a shift-reduce conflict [BLGD17].…”
Section: Shift-reduce Problemsmentioning
confidence: 99%
See 1 more Smart Citation
“…As writing parsers is a complex activity, Isradisaikul et al [21] attempt to assist in debugging conflicts by counterexamples from a parser run. As a parse conditions encodes the parser runs on all possible strings, they can also assist in such debugging activities by extracting the smallest counterexample and localizing a conflict to a smaller set of the grammar rules that are inconsistent (by extracting entities like unsat cores).…”
Section: Parser Synthesismentioning
confidence: 99%
“…Writing and debugging parsers is remarkably painful-debugging conflicts in grammars remains an arduous activity even for experienced language designers [21]. The difficulty stems from the fact that all efficiently parsable languages, like LL(1), lack a simple syntactic identity-given a context-free grammar, it is not possible to deduce it to be LL(1) simply by examining its structure; successful construction of an LL(1) parse table is the test that a grammar needs to pass to qualify as LL (1).…”
Section: Introductionmentioning
confidence: 99%