A practical method for LR and LL syntactic error diagnosis and recovery

Michael G. Burke, Gerald A. Fisher
1987 ACM Transactions on Programming Languages and Systems  
This paper presents a powerful, practical, and essentially language-independent syntactic error diagnosis and recovery method that is applicable within the frameworks of LR and LL parsing. The method generally issues accurate diagnoses even where multiple errors occur within close proximity, yet seldom issues spurious error messages. It employs a new technique, parse action deferral, that allows the most appropriate recovery in cases where this would ordinarily be precluded by late detection of
more » ... the error. The method is practical in that it does not impose substantial space or time overhead on the parsing of correct programs, and in that its time efficiency in processing an error allows for its incorporation in a production compiler. The method is language independent, but it does allow for tuning with respect to particular languages and implementations through the setting of language-specific parameters.
doi:10.1145/22719.22720 fatcat:avosowuc6ba5rlzecc4yodcjgu