1228072Sbapt/* flex - tool to generate fast lexical analyzers */ 2228072Sbapt 3228072Sbapt/* Copyright (c) 1990 The Regents of the University of California. */ 4228072Sbapt/* All rights reserved. */ 5228072Sbapt 6228072Sbapt/* This code is derived from software contributed to Berkeley by */ 7228072Sbapt/* Vern Paxson. */ 8228072Sbapt 9228072Sbapt/* The United States Government has rights in this work pursuant */ 10228072Sbapt/* to contract no. DE-AC03-76SF00098 between the United States */ 11228072Sbapt/* Department of Energy and the University of California. */ 12228072Sbapt 13228072Sbapt/* This file is part of flex. */ 14228072Sbapt 15228072Sbapt/* Redistribution and use in source and binary forms, with or without */ 16228072Sbapt/* modification, are permitted provided that the following conditions */ 17228072Sbapt/* are met: */ 18228072Sbapt 19228072Sbapt/* 1. Redistributions of source code must retain the above copyright */ 20228072Sbapt/* notice, this list of conditions and the following disclaimer. */ 21228072Sbapt/* 2. Redistributions in binary form must reproduce the above copyright */ 22228072Sbapt/* notice, this list of conditions and the following disclaimer in the */ 23228072Sbapt/* documentation and/or other materials provided with the distribution. */ 24228072Sbapt 25228072Sbapt/* Neither the name of the University nor the names of its contributors */ 26228072Sbapt/* may be used to endorse or promote products derived from this software */ 27228072Sbapt/* without specific prior written permission. */ 28228072Sbapt 29228072Sbapt/* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */ 30228072Sbapt/* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */ 31228072Sbapt/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */ 32228072Sbapt/* PURPOSE. */ 33228072Sbapt 34228072Sbapt#include "options.h" 35228072Sbapt 36228072Sbapt/* Be sure to synchronize these options with those defined in "options.h", 37228072Sbapt * the giant switch() statement in "main.c", and the %option processing in 38228072Sbapt * "scan.l". 39228072Sbapt */ 40228072Sbapt 41228072Sbapt 42228072Sbapt/* The command-line options, passed to scanopt_init() */ 43228072Sbaptoptspec_t flexopts[] = { 44228072Sbapt 45228072Sbapt {"-7", OPT_7BIT, 0} 46228072Sbapt , 47228072Sbapt {"--7bit", OPT_7BIT, 0} 48228072Sbapt , /* Generate 7-bit scanner. */ 49228072Sbapt {"-8", OPT_8BIT, 0} 50228072Sbapt , 51228072Sbapt {"--8bit", OPT_8BIT, 0} 52228072Sbapt , /* Generate 8-bit scanner. */ 53228072Sbapt {"--align", OPT_ALIGN, 0} 54228072Sbapt , /* Trade off larger tables for better memory alignment. */ 55228072Sbapt {"--noalign", OPT_NO_ALIGN, 0} 56228072Sbapt , 57228072Sbapt {"--always-interactive", OPT_ALWAYS_INTERACTIVE, 0} 58228072Sbapt , 59228072Sbapt {"--array", OPT_ARRAY, 0} 60228072Sbapt , 61228072Sbapt {"-b", OPT_BACKUP, 0} 62228072Sbapt , 63228072Sbapt {"--backup", OPT_BACKUP, 0} 64228072Sbapt , /* Generate backing-up information to lex.backup. */ 65228072Sbapt {"-B", OPT_BATCH, 0} 66228072Sbapt , 67228072Sbapt {"--batch", OPT_BATCH, 0} 68228072Sbapt , /* Generate batch scanner (opposite of -I). */ 69228072Sbapt {"--bison-bridge", OPT_BISON_BRIDGE, 0} 70228072Sbapt , /* Scanner to be called by a bison pure parser. */ 71228072Sbapt {"--bison-locations", OPT_BISON_BRIDGE_LOCATIONS, 0} 72228072Sbapt , /* Scanner to be called by a bison pure parser. */ 73228072Sbapt {"-i", OPT_CASE_INSENSITIVE, 0} 74228072Sbapt , 75228072Sbapt {"--case-insensitive", OPT_CASE_INSENSITIVE, 0} 76228072Sbapt , /* Generate case-insensitive scanner. */ 77228072Sbapt 78228072Sbapt {"-C[aefFmr]", OPT_COMPRESSION, 79228072Sbapt "Specify degree of table compression (default is -Cem)"}, 80228072Sbapt {"-+", OPT_CPLUSPLUS, 0} 81228072Sbapt , 82228072Sbapt {"--c++", OPT_CPLUSPLUS, 0} 83228072Sbapt , /* Generate C++ scanner class. */ 84228072Sbapt {"-d", OPT_DEBUG, 0} 85228072Sbapt , 86228072Sbapt {"--debug", OPT_DEBUG, 0} 87228072Sbapt , /* Turn on debug mode in generated scanner. */ 88228072Sbapt {"--nodebug", OPT_NO_DEBUG, 0} 89228072Sbapt , 90228072Sbapt {"-s", OPT_NO_DEFAULT, 0} 91228072Sbapt , 92228072Sbapt {"--nodefault", OPT_NO_DEFAULT, 0} 93228072Sbapt , /* Suppress default rule to ECHO unmatched text. */ 94228072Sbapt {"--default", OPT_DEFAULT, 0} 95228072Sbapt , 96228072Sbapt {"-c", OPT_DONOTHING, 0} 97228072Sbapt , /* For POSIX lex compatibility. */ 98228072Sbapt {"-n", OPT_DONOTHING, 0} 99228072Sbapt , /* For POSIX lex compatibility. */ 100228072Sbapt {"--ecs", OPT_ECS, 0} 101228072Sbapt , /* Construct equivalence classes. */ 102228072Sbapt {"--noecs", OPT_NO_ECS, 0} 103228072Sbapt , 104228072Sbapt {"-F", OPT_FAST, 0} 105228072Sbapt , 106228072Sbapt {"--fast", OPT_FAST, 0} 107228072Sbapt , /* Same as -CFr. */ 108228072Sbapt {"-f", OPT_FULL, 0} 109228072Sbapt , 110228072Sbapt {"--full", OPT_FULL, 0} 111228072Sbapt , /* Same as -Cfr. */ 112228072Sbapt {"--header-file[=FILE]", OPT_HEADER_FILE, 0} 113228072Sbapt , 114228072Sbapt {"-?", OPT_HELP, 0} 115228072Sbapt , 116228072Sbapt {"-h", OPT_HELP, 0} 117228072Sbapt , 118228072Sbapt {"--help", OPT_HELP, 0} 119228072Sbapt , /* Produce this help message. */ 120228072Sbapt {"-I", OPT_INTERACTIVE, 0} 121228072Sbapt , 122228072Sbapt {"--interactive", OPT_INTERACTIVE, 0} 123228072Sbapt , /* Generate interactive scanner (opposite of -B). */ 124228072Sbapt {"-l", OPT_LEX_COMPAT, 0} 125228072Sbapt , 126228072Sbapt {"--lex-compat", OPT_LEX_COMPAT, 0} 127228072Sbapt , /* Maximal compatibility with original lex. */ 128228072Sbapt {"-X", OPT_POSIX_COMPAT, 0} 129228072Sbapt , 130228072Sbapt {"--posix-compat", OPT_POSIX_COMPAT, 0} 131228072Sbapt , /* Maximal compatibility with POSIX lex. */ 132228072Sbapt {"--preproc=NUM", OPT_PREPROC_LEVEL, 0} 133228072Sbapt , 134228072Sbapt {"-L", OPT_NO_LINE, 0} 135228072Sbapt , /* Suppress #line directives in scanner. */ 136228072Sbapt {"--noline", OPT_NO_LINE, 0} 137228072Sbapt , /* Suppress #line directives in scanner. */ 138228072Sbapt {"--main", OPT_MAIN, 0} 139228072Sbapt , /* use built-in main() function. */ 140228072Sbapt {"--nomain", OPT_NO_MAIN, 0} 141228072Sbapt , 142228072Sbapt {"--meta-ecs", OPT_META_ECS, 0} 143228072Sbapt , /* Construct meta-equivalence classes. */ 144228072Sbapt {"--nometa-ecs", OPT_NO_META_ECS, 0} 145228072Sbapt , 146228072Sbapt {"--never-interactive", OPT_NEVER_INTERACTIVE, 0} 147228072Sbapt , 148228072Sbapt {"-o FILE", OPT_OUTFILE, 0} 149228072Sbapt , 150228072Sbapt {"--outfile=FILE", OPT_OUTFILE, 0} 151228072Sbapt , /* Write to FILE (default is lex.yy.c) */ 152228072Sbapt {"-p", OPT_PERF_REPORT, 0} 153228072Sbapt , 154228072Sbapt {"--perf-report", OPT_PERF_REPORT, 0} 155228072Sbapt , /* Generate performance report to stderr. */ 156228072Sbapt {"--pointer", OPT_POINTER, 0} 157228072Sbapt , 158228072Sbapt {"-P PREFIX", OPT_PREFIX, 0} 159228072Sbapt , 160228072Sbapt {"--prefix=PREFIX", OPT_PREFIX, 0} 161228072Sbapt , /* Use PREFIX (default is yy) */ 162228072Sbapt {"-Dmacro", OPT_PREPROCDEFINE, 0} 163228072Sbapt , /* Define a preprocessor symbol. */ 164228072Sbapt {"--read", OPT_READ, 0} 165228072Sbapt , /* Use read(2) instead of stdio. */ 166228072Sbapt {"-R", OPT_REENTRANT, 0} 167228072Sbapt , 168228072Sbapt {"--reentrant", OPT_REENTRANT, 0} 169228072Sbapt , /* Generate a reentrant C scanner. */ 170228072Sbapt {"--noreentrant", OPT_NO_REENTRANT, 0} 171228072Sbapt , 172228072Sbapt {"--reject", OPT_REJECT, 0} 173228072Sbapt , 174228072Sbapt {"--noreject", OPT_NO_REJECT, 0} 175228072Sbapt , 176228072Sbapt {"-S FILE", OPT_SKEL, 0} 177228072Sbapt , 178228072Sbapt {"--skel=FILE", OPT_SKEL, 0} 179228072Sbapt , /* Use skeleton from FILE */ 180228072Sbapt {"--stack", OPT_STACK, 0} 181228072Sbapt , 182228072Sbapt {"--stdinit", OPT_STDINIT, 0} 183228072Sbapt , 184228072Sbapt {"--nostdinit", OPT_NO_STDINIT, 0} 185228072Sbapt , 186228072Sbapt {"-t", OPT_STDOUT, 0} 187228072Sbapt , 188228072Sbapt {"--stdout", OPT_STDOUT, 0} 189228072Sbapt , /* Write generated scanner to stdout. */ 190228072Sbapt {"-T", OPT_TRACE, 0} 191228072Sbapt , 192228072Sbapt {"--trace", OPT_TRACE, 0} 193228072Sbapt , /* Flex should run in trace mode. */ 194228072Sbapt {"--tables-file[=FILE]", OPT_TABLES_FILE, 0} 195228072Sbapt , /* Save tables to FILE */ 196228072Sbapt {"--tables-verify", OPT_TABLES_VERIFY, 0} 197228072Sbapt , /* Tables integrity check */ 198228072Sbapt {"--nounistd", OPT_NO_UNISTD_H, 0} 199228072Sbapt , /* Do not include unistd.h */ 200228072Sbapt {"-v", OPT_VERBOSE, 0} 201228072Sbapt , 202228072Sbapt {"--verbose", OPT_VERBOSE, 0} 203228072Sbapt , /* Write summary of scanner statistics to stdout. */ 204228072Sbapt {"-V", OPT_VERSION, 0} 205228072Sbapt , 206228072Sbapt {"--version", OPT_VERSION, 0} 207228072Sbapt , /* Report flex version. */ 208228072Sbapt {"--warn", OPT_WARN, 0} 209228072Sbapt , 210228072Sbapt {"-w", OPT_NO_WARN, 0} 211228072Sbapt , 212228072Sbapt {"--nowarn", OPT_NO_WARN, 0} 213228072Sbapt , /* Suppress warning messages. */ 214228072Sbapt {"--noansi-definitions", OPT_NO_ANSI_FUNC_DEFS, 0} 215228072Sbapt , 216228072Sbapt {"--noansi-prototypes", OPT_NO_ANSI_FUNC_PROTOS, 0} 217228072Sbapt , 218228072Sbapt {"--yyclass=NAME", OPT_YYCLASS, 0} 219228072Sbapt , 220228072Sbapt {"--yylineno", OPT_YYLINENO, 0} 221228072Sbapt , 222228072Sbapt {"--noyylineno", OPT_NO_YYLINENO, 0} 223228072Sbapt , 224228072Sbapt 225228072Sbapt {"--yymore", OPT_YYMORE, 0} 226228072Sbapt , 227228072Sbapt {"--noyymore", OPT_NO_YYMORE, 0} 228228072Sbapt , 229228072Sbapt {"--noyywrap", OPT_NO_YYWRAP, 0} 230228072Sbapt , 231228072Sbapt {"--yywrap", OPT_YYWRAP, 0} 232228072Sbapt , 233228072Sbapt 234228072Sbapt {"--nounput", OPT_NO_UNPUT, 0} 235228072Sbapt , 236228072Sbapt {"--noyy_push_state", OPT_NO_YY_PUSH_STATE, 0} 237228072Sbapt , 238228072Sbapt {"--noyy_pop_state", OPT_NO_YY_POP_STATE, 0} 239228072Sbapt , 240228072Sbapt {"--noyy_top_state", OPT_NO_YY_TOP_STATE, 0} 241228072Sbapt , 242228072Sbapt {"--noyy_scan_buffer", OPT_NO_YY_SCAN_BUFFER, 0} 243228072Sbapt , 244228072Sbapt {"--noyy_scan_bytes", OPT_NO_YY_SCAN_BYTES, 0} 245228072Sbapt , 246228072Sbapt {"--noyy_scan_string", OPT_NO_YY_SCAN_STRING, 0} 247228072Sbapt , 248228072Sbapt {"--noyyget_extra", OPT_NO_YYGET_EXTRA, 0} 249228072Sbapt , 250228072Sbapt {"--noyyset_extra", OPT_NO_YYSET_EXTRA, 0} 251228072Sbapt , 252228072Sbapt {"--noyyget_leng", OPT_NO_YYGET_LENG, 0} 253228072Sbapt , 254228072Sbapt {"--noyyget_text", OPT_NO_YYGET_TEXT, 0} 255228072Sbapt , 256228072Sbapt {"--noyyget_lineno", OPT_NO_YYGET_LINENO, 0} 257228072Sbapt , 258228072Sbapt {"--noyyset_lineno", OPT_NO_YYSET_LINENO, 0} 259228072Sbapt , 260228072Sbapt {"--noyyget_in", OPT_NO_YYGET_IN, 0} 261228072Sbapt , 262228072Sbapt {"--noyyset_in", OPT_NO_YYSET_IN, 0} 263228072Sbapt , 264228072Sbapt {"--noyyget_out", OPT_NO_YYGET_OUT, 0} 265228072Sbapt , 266228072Sbapt {"--noyyset_out", OPT_NO_YYSET_OUT, 0} 267228072Sbapt , 268228072Sbapt {"--noyyget_lval", OPT_NO_YYGET_LVAL, 0} 269228072Sbapt , 270228072Sbapt {"--noyyset_lval", OPT_NO_YYSET_LVAL, 0} 271228072Sbapt , 272228072Sbapt {"--noyyget_lloc", OPT_NO_YYGET_LLOC, 0} 273228072Sbapt , 274228072Sbapt {"--noyyset_lloc", OPT_NO_YYSET_LLOC, 0} 275228072Sbapt , 276228072Sbapt 277228072Sbapt {0, 0, 0} /* required final NULL entry. */ 278228072Sbapt}; 279228072Sbapt 280228072Sbapt/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */ 281