2016
DOI: 10.1016/j.scico.2016.08.004
|View full text |Cite
|
Sign up to set email alerts
|

Error reporting in Parsing Expression Grammars

Abstract: Parsing Expression Grammars (PEGs) describe top-down parsers. Unfortunately, the errorreporting techniques used in conventional top-down parsers do not directly apply to parsers based on Parsing Expression Grammars (PEGs), so they have to be somehow simulated. While the PEG formalism has no account of semantic actions, actual PEG implementations add them, and we show how to simulate an error-reporting heuristic through these semantic actions.We also propose a complementary error reporting strategy that may lea… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
15
0

Year Published

2017
2017
2020
2020

Publication Types

Select...
3
2
1

Relationship

3
3

Authors

Journals

citations
Cited by 8 publications
(15 citation statements)
references
References 12 publications
0
15
0
Order By: Relevance
“…We have presented a mechanism for partially automating the process of adding error reporting and error recovery to parsers based on Parsing Expression Grammars. To achieve this, we proposed algorithms that automatically annotate the LL(1) parts of a PEG with error labels [2,3] and associates recovery expressions for these labels [4].…”
Section: Resultsmentioning
confidence: 99%
See 1 more Smart Citation
“…We have presented a mechanism for partially automating the process of adding error reporting and error recovery to parsers based on Parsing Expression Grammars. To achieve this, we proposed algorithms that automatically annotate the LL(1) parts of a PEG with error labels [2,3] and associates recovery expressions for these labels [4].…”
Section: Resultsmentioning
confidence: 99%
“…A naive interpretation of PEGs is problematic when dealing with inputs with syntactic errors, as a failure during parsing an input is not necessarily an error, but can be just an indication that the parser should backtrack and try another alternative. Labeled failures [2,3] are a conservative extension of PEGs that address this problem of error reporting in PEGs by using explicit error labels, which are distinct from a regular failure. We throw a label to signal an error during parsing, and each label can then be tied to a specific error message.…”
Section: Introductionmentioning
confidence: 99%
“…In this section, we revisit the problem of error handling in PEGs, and show how labeled failures [10,11] combined with the farthest failure heuristic [6] can improve the error messages of a PEG-based parser. en we show how labeled PEGs can be the basis of an error recovery mechanism for PEGs, and show an extension of previous semantics for labeled PEGs that adds recovery expressions.…”
Section: Pegs With Error Recoverymentioning
confidence: 99%
“…e great advantage of using the farthest failure is that the grammar writer does not need to do anything to get a parser with be er error reporting, as the error messages can be generated automatically. However, although this approach gives us error messages with a fine approximation of the error location, these messages may not give a good clue about how to fix the error, and may contain a long list of expected tokens [11].…”
Section: Pegs and Error Reportingmentioning
confidence: 99%
See 1 more Smart Citation