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