manpagez: man pages & more
info flex
Home | html | info | man

File: flex.info,  Node: Diagnostics,  Next: Limitations,  Prev: Serialized Tables,  Up: Top

23 Diagnostics
**************

The following is a list of 'flex' diagnostic messages:

   * 'warning, rule cannot be matched' indicates that the given rule
     cannot be matched because it follows other rules that will always
     match the same text as it.  For example, in the following 'foo'
     cannot be matched because it comes after an identifier "catch-all"
     rule:

              [a-z]+    got_identifier();
              foo       got_foo();

     Using 'yyreject()' in a scanner suppresses this warning.

   * 'warning, -s option given but default rule can be matched' means
     that it is possible (perhaps only in a particular start condition)
     that the default rule (match any single character) is the only one
     that will match a particular input.  Since '-s' was given,
     presumably this is not intended.

   * 'reject_used_but_not_detected undefined' or
     'yymore_used_but_not_detected undefined'.  These errors can occur
     at compile time.  They indicate that the scanner uses 'yyreject()'
     or 'yymore()' but that 'flex' failed to notice the fact, meaning
     that 'flex' scanned the first two sections looking for occurrences
     of these actions and failed to find any, but somehow you snuck some
     in (via a #include file, for example).  Use '%option reject' or
     '%option yymore' to indicate to 'flex' that you really do use these
     features.

   * 'flex scanner jammed'.  a scanner compiled with '-s' has
     encountered an input string which wasn't matched by any of its
     rules.  This error can also occur due to internal problems.

   * 'token too large, exceeds YYLMAX'.  your scanner uses '%array' and
     one of its rules matched a string longer than the 'YYLMAX' constant
     (8K bytes by default).  You can increase the value with the
     '%yylmax' option.

   * 'scanner requires -8 flag to use the character 'x''.  Your scanner
     specification includes recognizing the 8-bit character ''x'' and
     you generated a 7-bit scanner, with the '-7' flag or because your
     site configured '-Cf' and '-CF' to default to 7-bit.  See the
     discussion of the '-7' flag, *note Scanner Options::, for details.

   * 'flex scanner push-back overflow'.  you used 'yyunput()' to push
     back so much text that the scanner's buffer could not hold both the
     pushed-back text and the current token in 'yytext'.  Ideally the
     scanner should dynamically resize the buffer in this case, but at
     present it does not.

   * 'input buffer overflow, can't enlarge buffer because scanner uses
     yyreject()'.  the scanner was working on matching an extremely
     large token and needed to expand the input buffer.  This doesn't
     work with scanners that use 'yyreject()'.

   * 'fatal flex scanner internal error--end of buffer missed'.  This
     can occur in a scanner which is reentered after a long-jump has
     jumped out (or over) the scanner's activation frame.  Before
     reentering the scanner, use:
              yyrestart( yyin );
     or, as noted above, switch to using the C++ scanner class.

   * 'too many start conditions in <> construct!' you listed more start
     conditions in a <> construct than exist (so you must have listed at
     least one of them twice).

© manpagez.com 2000-2026
Individual documents may contain additional copyright information.