1/* flex - tool to generate fast lexical analyzers */
2
3/*  Copyright (c) 1990 The Regents of the University of California. */
4/*  All rights reserved. */
5
6/*  This code is derived from software contributed to Berkeley by */
7/*  Vern Paxson. */
8
9/*  The United States Government has rights in this work pursuant */
10/*  to contract no. DE-AC03-76SF00098 between the United States */
11/*  Department of Energy and the University of California. */
12
13/*  This file is part of flex. */
14
15/*  Redistribution and use in source and binary forms, with or without */
16/*  modification, are permitted provided that the following conditions */
17/*  are met: */
18
19/*  1. Redistributions of source code must retain the above copyright */
20/*     notice, this list of conditions and the following disclaimer. */
21/*  2. Redistributions in binary form must reproduce the above copyright */
22/*     notice, this list of conditions and the following disclaimer in the */
23/*     documentation and/or other materials provided with the distribution. */
24
25/*  Neither the name of the University nor the names of its contributors */
26/*  may be used to endorse or promote products derived from this software */
27/*  without specific prior written permission. */
28
29/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
30/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
31/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
32/*  PURPOSE. */
33
34#include "options.h"
35
36/* Be sure to synchronize these options with those defined in "options.h",
37 * the giant switch() statement in "main.c", and the %option processing in
38 * "scan.l".
39 */
40
41
42/* The command-line options, passed to scanopt_init() */
43optspec_t flexopts[] = {
44
45	{"-7", OPT_7BIT, 0}
46	,
47	{"--7bit", OPT_7BIT, 0}
48	,			/* Generate 7-bit scanner. */
49	{"-8", OPT_8BIT, 0}
50	,
51	{"--8bit", OPT_8BIT, 0}
52	,			/* Generate 8-bit scanner. */
53	{"--align", OPT_ALIGN, 0}
54	,			/* Trade off larger tables for better memory alignment. */
55	{"--noalign", OPT_NO_ALIGN, 0}
56	,
57	{"--always-interactive", OPT_ALWAYS_INTERACTIVE, 0}
58	,
59	{"--array", OPT_ARRAY, 0}
60	,
61	{"-b", OPT_BACKUP, 0}
62	,
63	{"--backup", OPT_BACKUP, 0}
64	,			/* Generate backing-up information to lex.backup. */
65	{"-B", OPT_BATCH, 0}
66	,
67	{"--batch", OPT_BATCH, 0}
68	,			/* Generate batch scanner (opposite of -I). */
69	{"--bison-bridge", OPT_BISON_BRIDGE, 0}
70	,			/* Scanner to be called by a bison pure parser. */
71	{"--bison-locations", OPT_BISON_BRIDGE_LOCATIONS, 0}
72	,			/* Scanner to be called by a bison pure parser. */
73	{"-i", OPT_CASE_INSENSITIVE, 0}
74	,
75	{"--case-insensitive", OPT_CASE_INSENSITIVE, 0}
76	,			/* Generate case-insensitive scanner. */
77
78		{"-C[aefFmr]", OPT_COMPRESSION,
79	 "Specify degree of table compression (default is -Cem)"},
80	{"-+", OPT_CPLUSPLUS, 0}
81	,
82	{"--c++", OPT_CPLUSPLUS, 0}
83	,			/* Generate C++ scanner class. */
84	{"-d", OPT_DEBUG, 0}
85	,
86	{"--debug", OPT_DEBUG, 0}
87	,			/* Turn on debug mode in generated scanner. */
88	{"--nodebug", OPT_NO_DEBUG, 0}
89	,
90	{"-s", OPT_NO_DEFAULT, 0}
91	,
92	{"--nodefault", OPT_NO_DEFAULT, 0}
93	,			/* Suppress default rule to ECHO unmatched text. */
94	{"--default", OPT_DEFAULT, 0}
95	,
96	{"-c", OPT_DONOTHING, 0}
97	,			/* For POSIX lex compatibility. */
98	{"-n", OPT_DONOTHING, 0}
99	,			/* For POSIX lex compatibility. */
100	{"--ecs", OPT_ECS, 0}
101	,			/* Construct equivalence classes. */
102	{"--noecs", OPT_NO_ECS, 0}
103	,
104	{"-F", OPT_FAST, 0}
105	,
106	{"--fast", OPT_FAST, 0}
107	,			/* Same as -CFr. */
108	{"-f", OPT_FULL, 0}
109	,
110	{"--full", OPT_FULL, 0}
111	,			/* Same as -Cfr. */
112	{"--header-file[=FILE]", OPT_HEADER_FILE, 0}
113	,
114	{"-?", OPT_HELP, 0}
115	,
116	{"-h", OPT_HELP, 0}
117	,
118	{"--help", OPT_HELP, 0}
119	,			/* Produce this help message. */
120	{"-I", OPT_INTERACTIVE, 0}
121	,
122	{"--interactive", OPT_INTERACTIVE, 0}
123	,			/* Generate interactive scanner (opposite of -B). */
124	{"-l", OPT_LEX_COMPAT, 0}
125	,
126	{"--lex-compat", OPT_LEX_COMPAT, 0}
127	,			/* Maximal compatibility with original lex. */
128	{"-X", OPT_POSIX_COMPAT, 0}
129	,
130	{"--posix-compat", OPT_POSIX_COMPAT, 0}
131	,			/* Maximal compatibility with POSIX lex. */
132        {"--preproc=NUM", OPT_PREPROC_LEVEL, 0}
133        ,
134	{"-L", OPT_NO_LINE, 0}
135	,			/* Suppress #line directives in scanner. */
136	{"--noline", OPT_NO_LINE, 0}
137	,			/* Suppress #line directives in scanner. */
138	{"--main", OPT_MAIN, 0}
139	,			/* use built-in main() function. */
140	{"--nomain", OPT_NO_MAIN, 0}
141	,
142	{"--meta-ecs", OPT_META_ECS, 0}
143	,			/* Construct meta-equivalence classes. */
144	{"--nometa-ecs", OPT_NO_META_ECS, 0}
145	,
146	{"--never-interactive", OPT_NEVER_INTERACTIVE, 0}
147	,
148	{"-o FILE", OPT_OUTFILE, 0}
149	,
150	{"--outfile=FILE", OPT_OUTFILE, 0}
151	,			/* Write to FILE (default is lex.yy.c) */
152	{"-p", OPT_PERF_REPORT, 0}
153	,
154	{"--perf-report", OPT_PERF_REPORT, 0}
155	,			/* Generate performance report to stderr. */
156	{"--pointer", OPT_POINTER, 0}
157	,
158	{"-P PREFIX", OPT_PREFIX, 0}
159	,
160	{"--prefix=PREFIX", OPT_PREFIX, 0}
161	,			/* Use PREFIX (default is yy) */
162	{"-Dmacro", OPT_PREPROCDEFINE, 0}
163	,			/* Define a preprocessor symbol. */
164	{"--read", OPT_READ, 0}
165	,			/* Use read(2) instead of stdio. */
166	{"-R", OPT_REENTRANT, 0}
167	,
168	{"--reentrant", OPT_REENTRANT, 0}
169	,			/* Generate a reentrant C scanner. */
170	{"--noreentrant", OPT_NO_REENTRANT, 0}
171	,
172	{"--reject", OPT_REJECT, 0}
173	,
174	{"--noreject", OPT_NO_REJECT, 0}
175	,
176	{"-S FILE", OPT_SKEL, 0}
177	,
178	{"--skel=FILE", OPT_SKEL, 0}
179	,			/* Use skeleton from FILE */
180	{"--stack", OPT_STACK, 0}
181	,
182	{"--stdinit", OPT_STDINIT, 0}
183	,
184	{"--nostdinit", OPT_NO_STDINIT, 0}
185	,
186	{"-t", OPT_STDOUT, 0}
187	,
188	{"--stdout", OPT_STDOUT, 0}
189	,			/* Write generated scanner to stdout. */
190	{"-T", OPT_TRACE, 0}
191	,
192	{"--trace", OPT_TRACE, 0}
193	,			/* Flex should run in trace mode. */
194	{"--tables-file[=FILE]", OPT_TABLES_FILE, 0}
195	,			/* Save tables to FILE */
196        {"--tables-verify", OPT_TABLES_VERIFY, 0}
197        ,                       /* Tables integrity check */
198	{"--nounistd", OPT_NO_UNISTD_H, 0}
199	,			/* Do not include unistd.h */
200	{"-v", OPT_VERBOSE, 0}
201	,
202	{"--verbose", OPT_VERBOSE, 0}
203	,			/* Write summary of scanner statistics to stdout. */
204	{"-V", OPT_VERSION, 0}
205	,
206	{"--version", OPT_VERSION, 0}
207	,			/* Report flex version. */
208	{"--warn", OPT_WARN, 0}
209	,
210	{"-w", OPT_NO_WARN, 0}
211	,
212	{"--nowarn", OPT_NO_WARN, 0}
213	,			/* Suppress warning messages. */
214	{"--noansi-definitions", OPT_NO_ANSI_FUNC_DEFS, 0}
215	,
216	{"--noansi-prototypes", OPT_NO_ANSI_FUNC_PROTOS, 0}
217	,
218	{"--yyclass=NAME", OPT_YYCLASS, 0}
219	,
220	{"--yylineno", OPT_YYLINENO, 0}
221	,
222	{"--noyylineno", OPT_NO_YYLINENO, 0}
223	,
224
225	{"--yymore", OPT_YYMORE, 0}
226	,
227	{"--noyymore", OPT_NO_YYMORE, 0}
228	,
229	{"--noyywrap", OPT_NO_YYWRAP, 0}
230	,
231	{"--yywrap", OPT_YYWRAP, 0}
232	,
233
234	{"--nounput", OPT_NO_UNPUT, 0}
235	,
236	{"--noyy_push_state", OPT_NO_YY_PUSH_STATE, 0}
237	,
238	{"--noyy_pop_state", OPT_NO_YY_POP_STATE, 0}
239	,
240	{"--noyy_top_state", OPT_NO_YY_TOP_STATE, 0}
241	,
242	{"--noyy_scan_buffer", OPT_NO_YY_SCAN_BUFFER, 0}
243	,
244	{"--noyy_scan_bytes", OPT_NO_YY_SCAN_BYTES, 0}
245	,
246	{"--noyy_scan_string", OPT_NO_YY_SCAN_STRING, 0}
247	,
248	{"--noyyget_extra", OPT_NO_YYGET_EXTRA, 0}
249	,
250	{"--noyyset_extra", OPT_NO_YYSET_EXTRA, 0}
251	,
252	{"--noyyget_leng", OPT_NO_YYGET_LENG, 0}
253	,
254	{"--noyyget_text", OPT_NO_YYGET_TEXT, 0}
255	,
256	{"--noyyget_lineno", OPT_NO_YYGET_LINENO, 0}
257	,
258	{"--noyyset_lineno", OPT_NO_YYSET_LINENO, 0}
259	,
260	{"--noyyget_in", OPT_NO_YYGET_IN, 0}
261	,
262	{"--noyyset_in", OPT_NO_YYSET_IN, 0}
263	,
264	{"--noyyget_out", OPT_NO_YYGET_OUT, 0}
265	,
266	{"--noyyset_out", OPT_NO_YYSET_OUT, 0}
267	,
268	{"--noyyget_lval", OPT_NO_YYGET_LVAL, 0}
269	,
270	{"--noyyset_lval", OPT_NO_YYSET_LVAL, 0}
271	,
272	{"--noyyget_lloc", OPT_NO_YYGET_LLOC, 0}
273	,
274	{"--noyyset_lloc", OPT_NO_YYSET_LLOC, 0}
275	,
276
277	{0, 0, 0}		/* required final NULL entry. */
278};
279
280/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
281