Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
After bison detects a syntax error, it normally enters a recovery mode in which it refrains from reporting another error until it has shifted three consecutive tokens without another error. This somewhat alleviates the problem of multiple error messages resulting from a single mistake as the parser gets resynchronized.
The macro YYRECOVERING() returns nonzero if the parser is currently in the error recovery mode and zero if it is not. It is sometimes convenient to test YYRECOVERING() to decide whether to report errors discovered in an action routine.