FLEX(1)

๐Ÿ’– FLEX(1) โ€” the flex page, bestie ๐Ÿ’–

okay so this is the Programming section, the title is FLEX(1), and the manual name is flex โ€” the fast lexical analyser generator. She's iconic, she's useful, and we're getting into every single flag. ๐Ÿซถ


โœจ NAME โœจ

flex โ€” the fast lexical analyser generator. That's the whole name section, bestie. ๐Ÿ’…

๐ŸŒธ SYNOPSIS ๐ŸŒธ

flex [OPTIONS] [FILE]...

That's the whole vibe: you run flex with options and files. โœจ

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

Generates programs that perform pattern-matching on text. That's the core, and the rest is all the knobs, dials, and little details. ๐Ÿฆ‹

๐ŸŽ€ Table Compression ๐ŸŽ€

  • -Ca, --align โ€” trade off larger tables for better memory alignment
  • -Ce, --ecs โ€” construct equivalence classes
  • -Cf โ€” do not compress tables; use -f representation
  • -CF โ€” do not compress tables; use -F representation
  • -Cm, --meta-ecs โ€” construct meta-equivalence classes
  • -Cr, --read โ€” use read() instead of stdio for scanner input
  • -f, --full โ€” generate fast, large scanner. Same as -Cfr
  • -F, --fast โ€” use alternate table representation. Same as -CFr
  • -Cem โ€” default compression (same as --ecs --meta-ecs)

๐Ÿ› Debugging ๐Ÿ›

  • -d, --debug โ€” enable debug mode in scanner
  • -b, --backup โ€” write backing-up information to lex.backup
  • -p, --perf-report โ€” write performance report to stderr
  • -s, --nodefault โ€” suppress default rule to ECHO unmatched text
  • -T, --trace โ€” flex should run in trace mode
  • -w, --nowarn โ€” do not generate warnings
  • -v, --verbose โ€” write summary of scanner statistics to stdout
  • --hex โ€” use hexadecimal numbers instead of octal in debug outputs

๐Ÿ“ FILES ๐Ÿ“

okay the page labels this whole next chunk FILES, and we're keeping the order exactly as she wrote it. No notes. ๐Ÿ’…

  • -o, --outfile=FILE โ€” specify output filename
  • -S, --skel=FILE โ€” specify skeleton file
  • -t, --stdout โ€” write scanner on stdout instead of lex.yy.c
  • --yyclass=NAME โ€” name of C++ class
  • --header-file=FILE โ€” create a C header file in addition to the scanner
  • --tables-file[=FILE] โ€” write tables to FILE

๐Ÿ’… Scanner behavior ๐Ÿ’…

  • -7, --7bit โ€” generate 7-bit scanner
  • -8, --8bit โ€” generate 8-bit scanner
  • -B, --batch โ€” generate batch scanner (opposite of -I)
  • -i, --case-insensitive โ€” ignore case in patterns
  • -l, --lex-compat โ€” maximal compatibility with original lex
  • -X, --posix-compat โ€” maximal compatibility with POSIX lex
  • -I, --interactive โ€” generate interactive scanner (opposite of -B)
  • --yylineno โ€” track line count in yylineno

๐ŸŒˆ Generated code ๐ŸŒˆ

  • -+, --c++ โ€” generate C++ scanner class
  • -Dmacro[=defn] โ€” #define macro defn (default defn is '1')
  • -L, --noline โ€” suppress #line directives in scanner
  • -P, --prefix=STRING โ€” use STRING as prefix instead of "yy"
  • -R, --reentrant โ€” generate a reentrant C scanner
  • --bison-bridge โ€” scanner for bison pure parser.
  • --bison-locations โ€” include yylloc support.
  • --stdinit โ€” initialize yyin/yyout to stdin/stdout
  • --nounistd โ€” do not include <unistd.h>
  • --noFUNCTION โ€” do not generate a particular FUNCTION

๐Ÿ“ Miscellaneous ๐Ÿ“

  • -c โ€” do-nothing POSIX option
  • -n โ€” do-nothing POSIX option
  • -? โ€” (the page gives no description for this one, bestie)
  • -h, --help โ€” produce this help message
  • -V, --version โ€” report flex version

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

The full documentation for flex is maintained as a Texinfo manual. If the info and flex programs are properly installed at your site, the command

info flex

should give you access to the complete manual. โœจ


๐Ÿซถ okay that's the page โ€” footer sign-off vibes: The Flex Project ยท February 2024 ยท FLEX(1). Mwah. ๐Ÿ’‹

๐Ÿ“ฆ where this page comes from