summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2002-08-16 22:32:02 +0000
committerJohn Millaway <john43@users.sourceforge.net>2002-08-16 22:32:02 +0000
commit6d7c3321ba710da3a984ec5da9dc7faf4bbcca23 (patch)
treeaef195d74a0e584597ac7e1c478eb0d1675d543d /main.c
parent2bb924b502c41a23ab2bc8a29355f08746f8eb21 (diff)
Added --tables option.
Omitted tables code from generated scanner when unused.
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/main.c b/main.c
index 762d328..895b5ce 100644
--- a/main.c
+++ b/main.c
@@ -105,6 +105,10 @@ jmp_buf flex_main_jmp_buf;
bool *rule_has_nl, *ccl_has_nl;
int nlch = '\n';
+bool tablesext, tablestoggle;
+char* tablesfilename;
+FILE* tablesout;
+
/* Make sure program_name is initialized so we don't crash if writing
* out an error message before getting the program name from argv[0].
*/
@@ -966,6 +970,9 @@ char **argv;
prefix = "yy";
yyclass = 0;
use_read = use_stdout = false;
+ tablesext = tablestoggle = false;
+ tablesfilename = NULL;
+ tablesout = NULL;
sawcmpflag = false;
@@ -1169,7 +1176,11 @@ char **argv;
case OPT_NO_UNISTD_H:
buf_strdefine(&userdef_buf,"YY_NO_UNISTD_H", "1");
break;
-
+
+ case OPT_TABLES:
+ tablesext = true;
+ break;
+
case OPT_TRACE:
trace = true;
break;
@@ -1794,6 +1805,7 @@ _(
" -t, --stdout write scanner on stdout instead of %s\n"
" --yyclass=NAME name of C++ class\n"
" --header=FILE create a C header file in addition to the scanner\n"
+" --tables[=FILE] write tables to FILE\n"
"\n"
"Scanner behavior:\n"