1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Syntax: bf(%required-tokens) tt(ntokens)
Whenever a syntactic error is detected during the parsing process
subsequent tokens received by the parsing function may easily cause yet
another (spurious) syntactic error. In this situation error recovery in fact
produces an avalanche of additional errors. If this happens the recovery
process may benefit from a slight modification. Rather than reporting every
syntactic error encountered by the parsing function, the parsing function may
wait for a series of successfully processed tokens before reporting the next
error.
The directive tt(%required-tokens) can be used to specify this
number. E.g., the specification tt(%required-tokens 10) requires the parsing
function to process successfully a series of 10 tokens before another
syntactic error is reported (and counted). If a syntactic error is encountered
before processing 10 tokens then the counter counting the number of
successfully processed tokens is reset to zero, no error is reported, but the
error recoery procedure continues as usual. The number of required tokens can
also be set using the option link(--required-tokens)(REQUIRED). By default the
number of required tokens is initialized to 0.
|