[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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 macros 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 ‘yyFlexLexer.h’.
- ‘-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 doingflex
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. See 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.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on November 4, 2011 using texi2html 5.0.