On
discovering an error, a parser may perform local correction on the remaining
input; that is, it may replace a prefix of the remaining input by some string
that allows the parser to continue. A typical local correction is to replace a
comma by a semicolon, delete an extraneous semicolon, or insert
a missing semicolon. The choice of the local correction is left to the compiler
designer. Of course, we must be careful to choose replacements that do not lead
to infinite loops, as would be the case, for example, if we always inserted
something on the input ahead of the current input symbol. Phrase-level
replacement has been used in several error-repairing compilers, as it can
correct any input string. Its major drawback is the difficulty it has in coping
with situations in which the actual error has occurred before the point of
detection.
Search
find me
Categories
- ANALOG ELECTRONIC CIRCUITS
- ATM
- Commerce
- COMPILER DESIGN
- COMPUTER NETWORKS - II
- COMPUTER NETWORKS-I
- COMPUTER NETWORKS-I Chapter I
- Database Management System
- Diode
- Engineering
- Entity-Relationship Model
- Feedback Amplifier:
- General Amplifiers:
- IELTS
- IELTS Essays
- Introduction to Database
- Local Area Networks
- Medicine
- Oscillator
- Performance Issues
- Power Amplifiers
- Syllabus
- TCP
- The Relational Data Model and Relational Database
- Transistor Biasing
- Transistor Frequency Response
- Transistor modeling
- UDP
- UDP & TCP
0 comments