summaryrefslogtreecommitdiff
path: root/src/flexdef.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2020-10-02 00:17:31 -0400
committerEric S. Raymond <esr@thyrsus.com>2020-10-02 00:17:31 -0400
commit9dbc704ad47129dcd2c4846b94473d618e6869a8 (patch)
tree24f60251276155148231b6a027ea01d16a87dba1 /src/flexdef.h
parent99e6b1c89a8e889991acf5de3da4a665dfeda023 (diff)
downloadflex-git-9dbc704ad47129dcd2c4846b94473d618e6869a8.tar.gz
yytext_is_array moves to the ctrl structure.
This is separate from the big reorganization in commit #52 because there's a comment about this variable in flexdef.h that makes me nervous. According to the comment this variable is a trit, but it looks to me like flexinit sets it to false and I can't find anywhere in the code that sets it to a non-boolean value. This commit asumes that the comment is stale and the member can be typed boolean. Should be audited.
Diffstat (limited to 'src/flexdef.h')
-rw-r--r--src/flexdef.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/flexdef.h b/src/flexdef.h
index 929baf7..ea049c1 100644
--- a/src/flexdef.h
+++ b/src/flexdef.h
@@ -383,6 +383,9 @@ struct ctrl_bundle_t {
bool use_read; // (-f, -F, or -Cr) use read() for scanner input
// otherwise, use fread().
char *yyclass; // yyFlexLexer subclass to use for YY_DECL
+ bool yytext_is_array; // if true (i.e., %array directive), then declare
+ // yytext as a array instead of a character pointer.
+ // Nice and inefficient.
};
/* Environment variables. These control the lexer operation, but do
@@ -416,10 +419,7 @@ extern struct env_bundle_t env;
/* Variables for flags:
* syntaxerror - true if a syntax error has been found
* eofseen - true if we've seen an eof in the input file
- * yytext_is_array - if true (i.e., %array directive), then declare
- * yytext as a array instead of a character pointer. Nice and inefficient.
- * Note that 0 is unset, 1 corresponds to --no-main, and 2 to --main.
-ya * yymore_used - if true, yymore() is used in input rules
+ * yymore_used - if true, yymore() is used in input rules
* reject - if true, generate back-up tables for REJECT macro
* real_reject - if true, scanner really uses REJECT (as opposed to just
* having "reject" set for variable trailing context)
@@ -432,7 +432,6 @@ ya * yymore_used - if true, yymore() is used in input rules
*/
extern int syntaxerror, eofseen;
-extern int yytext_is_array;
extern int yymore_used, reject, real_reject, continued_action, in_rule;
extern int yymore_really_used, reject_really_used;