mirror of
https://github.com/westes/flex.git
synced 2026-10-28 09:43:43 +00:00
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:
1 parent
92f5c96d69
commit
5b0389c945
1 file changed
+1
-1
+1
-1
@@ -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 \
|
||||
|
||||
Reference in new issue
Block a user