manpagez: man pages & more
info flex
Home | html | info | man

File: flex.info,  Node: Options for Specifying Filenames,  Next: Options Affecting Scanner Behavior,  Prev: Scanner_Options.php">Scanner Options,  Up: Scanner_Options.php">Scanner Options

16.1 Options for Specifying Filenames
=====================================

'--header-file=FILE, '%option header-file="FILE"''
     instructs flex to write a C header to 'FILE'.  This file contains
     function prototypes, extern variables, and types used by the
     scanner.  Only the external API is exported by the header file.
     Many rule hooks that are usable from within scanner actions are not
     exported to the header file.  This is due to namespace problems and
     the goal of a clean external API.

     While in the header, the macro 'yyIN_HEADER' is defined, where 'yy'
     is substituted with the appropriate prefix.

     The '--header-file' option is not compatible with the '--c++'
     option, since the C++ scanner provides its own header in
     'FlexLexer.h'.  This option will generally be a no-op under target
     languages other than C.

'-oFILE, --outfile=FILE, '%option outfile="FILE"''
     directs flex to write the scanner to the file 'FILE' instead of
     'lex.yy.c'.  If you combine '--outfile' with the '--stdout' option,
     then the scanner is written to 'stdout' but its '#line' directives
     (see the '-l' option above) refer to the file 'FILE'.

'-t, --stdout, '%option stdout''
     instructs 'flex' to write the scanner it generates to standard
     output instead of 'lex.yy.c'.

'-SFILE, --skel=FILE'
     overrides the default skeleton file from which 'flex' constructs
     its scanners.  You'll never need this option unless you are doing
     'flex' maintenance or development.

'--tables-file=FILE'
     Write serialized scanner dfa tables to FILE. The generated scanner
     will not contain the tables, and requires them to be loaded at
     runtime.  *Note serialization::.

'--tables-verify'
     This option is for flex development.  We document it here in case
     you stumble upon it by accident or in case you suspect some
     inconsistency in the serialized tables.  Flex will serialize the
     scanner dfa tables but will also generate the in-code tables as it
     normally does.  At runtime, the scanner will verify that the
     serialized tables match the in-code tables, instead of loading
     them.

© manpagez.com 2000-2026
Individual documents may contain additional copyright information.