Questions tagged [error-recovery]
28 questions
77
votes
24 answers
Is "Out Of Memory" A Recoverable Error?
I've been programming a long time, and the programs I see, when they run out of memory, attempt to clean up and exit, i.e. fail gracefully. I can't remember the last time I saw one actually attempt to recover and continue operating normally.
So much…

Walter Bright
- 4,277
- 1
- 23
- 28
6
votes
1 answer
Does the Marpa parser library support error recovery?
I know Perl's "Marpa" Earley parser has very good error reporting.
But I can't find in its documentation or via Googling whether it has error recovery.
For instance, most C/C++ compilers have error recovery, which they use to report multiple syntax…

hippietrail
- 15,848
- 18
- 99
- 158
4
votes
1 answer
Kubernetes StatefulSet pod startup error recovery
A Kubernetes StatefulSet (v1.8) will automagically rollover the pods it is managing to a new image if you patch the image name in the StatefulSet spec -- orchestrating this kind of update is one of its main jobs, after all. However, if deployment…

Chip Morningstar
- 49
- 3
3
votes
0 answers
Understanding the heuristics in error recovery (panic mode) in predictive parsing through suitable example
I was going through the text Compilers: Principles,Techniques and Tools by Ullman et. al where I came across the concept of Panic mode recovery in predictive parsing. The text says about some heuristics which should be followed. But the example…

Abhishek Ghosh
- 597
- 7
- 18
3
votes
3 answers
Python Lex-Yacc (PLY) Error recovery at the end of input
Problem
I am trying to implement an error tolerant parser using Python Lex-Yacc (PLY), but I have trouble using error recovery rules at the end of my input string.
How can I recover from an unexpected end of input?
Example
This example grammar…

Jen-Ya
- 328
- 4
- 14
3
votes
1 answer
bison error recovery
I have found out that I can use 'error' in the grammar rule as a mechanism for error recovery. So if there was an error, the parser must discard the current line and resume parsing from the next line. An example from bison manual to achieve this…

mhmhsh
- 161
- 1
- 13
2
votes
1 answer
Cypress and unstable DOM
I am using cypress for some e2e tests on a react application and I am having problems clicking on an element.
I have this simple script:
it('can bookmark/unbookmark the posting', () => {
cy.visit(pdfPosting.url)
.wait(1000)
…

kosto
- 21
- 2
2
votes
1 answer
Bison error recovery for automatic semicolon insertion
I'm trying to write a Bison C++ parser for parsing JavaScript files, but I can't figure out how to make the semicolon optional.
As to ECMAScript 2018 specification (https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf, chapter…

Marco
- 108
- 1
- 10
2
votes
0 answers
Sun (or Oracle) JDK parser and error recovery technique
Does anyone know what parsing and error recovery technique used by Sun (or Oracle) JDK parser? I'm interested especially in the high quality error messages produced (exact error location + related statement and/or expression, pretty neat) and the…

LeleDumbo
- 9,192
- 4
- 24
- 38
2
votes
1 answer
GLR parser with error recovery: too much alternatives when there are errors in input
Preamble
I have written GLR-parser with error recovery. When it encounters an error it splits into following alternatives:
Insert the expected element into input (may be the user just missed it) and proceed as usual.
Replace the erroneous element…

Lavir the Whiolet
- 1,006
- 9
- 18
2
votes
1 answer
Can Erlang clean-up the open file descriptors of crashed/stuck processes?
If a process crashes, what happens with the file descriptors that were only referenced by that erlang process? Is there some way to make erlang clean up automatically like an OS process or some design pattern that might help?

Vladimir Ralev
- 1,371
- 9
- 18
2
votes
1 answer
Android background network error recovery
Given an Android intent service whose job is do background network communication (e.g. make a REST call to synchronize data), when the intent service catches an IOException, what is a good practice for recovering from the error?
Let's assume the…

Edward Brey
- 40,302
- 20
- 199
- 253
2
votes
1 answer
How to stop ANTLR from suppressing syntax errors?
So I'm writing a compiler in Java using ANTLR, and I'm a little puzzled by how it deals with errors.
The default behavior seems to be to print an error message and then attempt, by means of token insertion and such, to recover from the error and…

Taymon
- 24,950
- 9
- 62
- 84
1
vote
1 answer
What is ANTLR3 error recovery method?
This seems to be a theoretical question.
As I far as I know ANTLR3 handles errors itself using its recover(###) method. I want to know what the method ANTLR3 uses for error recovery. (i.e. panic-mode/phrase-level etc.) Can someone help me figure…

Bee
- 12,251
- 11
- 46
- 73
1
vote
1 answer
ANTLR4 error recovery issues for class bodies
I've found a strange issue regarding error recovery in ANTLR4. If I take the grammar example from the ANTLR book
grammar simple;
prog: classDef+ ; // match one or more class definitions
classDef
: 'class' ID '{' member+ '}' // a class has…

sazz
- 11
- 1