fix(scanner): detect yyreject() without %option reject

CHECK_YYREJECT passed the whole matched text, parentheses included, to
all_lower, which is never true for it. A scanner that used yyreject()
had to say %option reject or it failed to compile. The tests all do.

Compare the name instead of the whole text.
This commit is contained in:
Will Estes authored and Will Estes committed 2026-10-27 14:05:33 -04:00
1 parent 92f5c96d69
commit 5b0389c945
1 file changed
+1 -1
+1 -1
View File
@@ -85,7 +85,7 @@ extern const char *escaped_qstart, *escaped_qend;
reject = true;
#define CHECK_YYREJECT(str) \
if ( all_lower( str ) ) \
if ( strncmp( str, "yyreject", 8 ) == 0 ) \
reject = true;
#define YY_USER_INIT \