Debian Codegraph @

documentation/manual/directives/required.yo

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