Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
usr
/
share
/
doc
/
re2c
/
manual
/
configurations
/
Filename :
configurations.rst_
back
Copy
``re2c:flags:t``, ``re2c:flags:type-header`` Specify the name of the generated header file relative to the directory of the output file. (Same as ``-t``, ``--type-header`` command-line option except that the filepath is relative.) ``re2c:flags:input`` Same as ``--input`` command-line option. ``re2c:api:style`` Allows one to specify the style of generic API. Possible values are ``functions`` and ``free-form``. With ``functions`` style (the default for the C backend) API primitives behave like functions, and re2c generates parentheses with an argument list after the name of each primitive. With ``free-form`` style (the default for the Go backend) re2c treats API definitions as interpolated strings and substitutes argument placeholders with the actual argument values. This option can be overridden by options for individual API primitives, e.g. ``re2c:define:YYFILL:naked`` for ``YYFILL``. ``re2c:api:sigil`` Allows one to specify the "sigil" symbol (or string) that is used to recognize argument placeholders in the definitions of generic API primitives. The default value is ``@@``. Placeholders start with sigil, followed by the argument name in curly braces. For example, if sigil is set to ``$``, then placeholders will have the form ``${name}``. Single-argument APIs may use shorthand notation without the name in braces. This option can be overridden by options for individual API primitives, e.g. ``re2c:define:YYFILL@len`` for ``YYFILL``. ``re2c:define:YYCTYPE`` Defines ``YYCTYPE`` (see the user interface section). ``re2c:define:YYCURSOR`` Defines C API primitive ``YYCURSOR`` (see the user interface section). ``re2c:define:YYLIMIT`` Defines C API primitive ``YYLIMIT`` (see the user interface section). ``re2c:define:YYMARKER`` Defines C API primitive ``YYMARKER`` (see the user interface section). ``re2c:define:YYCTXMARKER`` Defines C API primitive ``YYCTXMARKER`` (see the user interface section). ``re2c:define:YYFILL`` Defines API primitive ``YYFILL`` (see the user interface section). ``re2c:define:YYFILL@len`` Specifies the sigil used for argument substitution in ``YYFILL`` definition. Defaults to ``@@``. Overrides the more generic ``re2c:api:sigil`` configuration. ``re2c:define:YYFILL:naked`` Allows one to override ``re2c:api:style`` for ``YYFILL``. Value ``0`` corresponds to free-form API style. ``re2c:yyfill:enable`` Defaults to ``1`` (``YYFILL`` is enabled). Set this to zero to suppress the generation of ``YYFILL``. Use warnings (``-W`` option) and ``re2c:sentinel`` configuration to verify that the generated lexer cannot read past the end of input, as this might introduce severe security issues to your programs. ``re2c:yyfill:parameter`` Controls the argument in the parentheses that follow ``YYFILL``. Defaults to ``1``, which means that the argument is generated. If zero, the argument is omitted. Can be overridden with ``re2c:define:YYFILL:naked`` or ``re2c:api:style``. ``re2c:eof`` Specifies the sentinel symbol used with EOF rule ``$`` to check for the end of input in the generated lexer. The default value is ``-1`` (EOF rule is not used). Other possible values include all valid code units. Only decimal numbers are recognized. ``re2c:sentinel`` Specifies the sentinel symbol used with the sentinel method of checking for the end of input in the generated lexer (the case when bounds checking is disabled with ``re2c:yyfill:enable = 0;`` and EOF rule ``$`` is not used). This configuration does not affect code generation. It is used by re2c to verify that the sentinel symbol is not allowed in the middle of the rule, and prevent possible reads past the end of buffer in the generated lexer. The default value is ``-1`` (re2c assumes that the sentinel symbol is ``0``, which is the most common case). Other possible values include all valid code units. Only decimal numbers are recognized. ``re2c:define:YYLESSTHAN`` Defines generic API primitive ``YYLESSTHAN`` (see the user interface section). ``re2c:yyfill:check`` Setting this to zero allows to suppress the generation of ``YYFILL`` check (``YYLESSTHAN`` in generic API of ``YYLIMIT``-based comparison in default C API). This configuration is useful when the necessary input is always available. it defaults to ``1`` (the check is generated). ``re2c:label:yyFillLabel`` Allows one to change the prefix of ``YYFILL`` labels (used with EOF rule or with storable states). ``re2c:define:YYPEEK`` Defines generic API primitive ``YYPEEK`` (see the user interface section). ``re2c:define:YYSKIP`` Defines generic API primitive ``YYSKIP`` (see the user interface section). ``re2c:define:YYBACKUP`` Defines generic API primitive ``YYBACKUP`` (see the user interface section). ``re2c:define:YYBACKUPCTX`` Defines generic API primitive ``YYBACKUPCTX`` (see the user interface section). ``re2c:define:YYRESTORE`` Defines generic API primitive ``YYRESTORE`` (see the user interface section). ``re2c:define:YYRESTORECTX`` Defines generic API primitive ``YYRESTORECTX`` (see the user interface section). ``re2c:define:YYRESTORETAG`` Defines generic API primitive ``YYRESTORETAG`` (see the user interface section). ``re2c:define:YYSHIFT`` Defines generic API primitive ``YYSHIFT`` (see the user interface section). ``re2c:define:YYSHIFTMTAG`` Defines generic API primitive ``YYSHIFTMTAG`` (see the user interface section). ``re2c:define:YYSHIFTSTAG`` Defines generic API primitive ``YYSHIFTSTAG`` (see the user interface section). ``re2c:define:YYSTAGN`` Defines generic API primitive ``YYSTAGN`` (see the user interface section). ``re2c:define:YYSTAGP`` Defines generic API primitive ``YYSTAGP`` (see the user interface section). ``re2c:define:YYMTAGN`` Defines generic API primitive ``YYMTAGN`` (see the user interface section). ``re2c:define:YYMTAGP`` Defines generic API primitive ``YYMTAGP`` (see the user interface section). ``re2c:flags:T``, ``re2c:flags:tags`` Same as ``-T --tags`` command-line option. ``re2c:flags:P``, ``re2c:flags:posix-captures`` Same as ``-P --posix-captures`` command-line option. ``re2c:tags:expression`` Allows one to customize the way re2c addresses tag variables. By default re2c generates expressions of the form ``yyt<N>``. This might be inconvenient, for example if tag variables are defined as fields in a struct. Re2c recognizes placeholder of the form ``@@{tag}`` or ``@@`` and replaces it with the actual tag name. Sigil ``@@`` can be redefined with ``re2c:api:sigil`` configuration. For example, setting ``re2c:tags:expression = "p->@@";`` results in expressions of the form ``p->yyt<N>`` in the generated code. ``re2c:tags:prefix`` Allows one to override the prefix of tag variables (defaults to ``yyt``). ``re2c:flags:lookahead`` Same as inverted ``--no-lookahead`` command-line option. ``re2c:flags:optimize-tags`` Same as inverted ``--no-optimize-tags`` command-line option. ``re2c:define:YYCONDTYPE`` Defines ``YYCONDTYPE`` (see the user interface section). ``re2c:define:YYGETCONDITION`` Defines API primitive ``YYGETCONDITION`` (see the user interface section). ``re2c:define:YYGETCONDITION:naked`` Allows one to override ``re2c:api:style`` for ``YYGETCONDITION``. Value ``0`` corresponds to free-form API style. ``re2c:define:YYSETCONDITION`` Defines API primitive ``YYSETCONDITION`` (see the user interface section). ``re2c:define:YYSETCONDITION@cond`` Specifies the sigil used for argument substitution in ``YYSETCONDITION`` definition. The default value is ``@@``. Overrides the more generic ``re2c:api:sigil`` configuration. ``re2c:define:YYSETCONDITION:naked`` Allows one to override ``re2c:api:style`` for ``YYSETCONDITION``. Value ``0`` corresponds to free-form API style. ``re2c:cond:goto`` Allows one to customize the goto statements used with the shortcut ``:=>`` rules in conditions. The default value is ``goto @@;``. Placeholders are substituted with condition name (see ``re2c:api;sigil`` and ``re2c:cond:goto@cond``). ``re2c:cond:goto@cond`` Specifies the sigil used for argument substitution in ``re2c:cond:goto`` definition. The default value is ``@@``. Overrides the more generic ``re2c:api:sigil`` configuration. ``re2c:cond:divider`` Defines the divider for condition blocks. The default value is ``/* *********************************** */``. Placeholders are substituted with condition name (see ``re2c:api;sigil`` and ``re2c:cond:divider@cond``). ``re2c:cond:divider@cond`` Specifies the sigil used for argument substitution in ``re2c:cond:divider`` definition. The default value is ``@@``. Overrides the more generic ``re2c:api:sigil`` configuration. ``re2c:condprefix`` Specifies the prefix used for condition labels. The default value is ``yyc_``. ``re2c:condenumprefix`` Specifies the prefix used for condition identifiers. The default value is ``yyc``. ``re2c:define:YYGETSTATE`` Defines API primitive ``YYGETSTATE`` (see the user interface section). ``re2c:define:YYGETSTATE:naked`` Allows one to override ``re2c:api:style`` for ``YYGETSTATE``. Value ``0`` corresponds to free-form API style. ``re2c:define:YYSETSTATE`` Defines API primitive ``YYSETSTATE`` (see the user interface section). ``re2c:define:YYSETSTATE@state`` Specifies the sigil used for argument substitution in ``YYSETSTATE`` definition. The default value is ``@@``. Overrides the more generic ``re2c:api:sigil`` configuration. ``re2c:define:YYSETSTATE:naked`` Allows one to override ``re2c:api:style`` for ``YYSETSTATE``. Value ``0`` corresponds to free-form API style. ``re2c:state:abort`` If set to a positive integer value, changes the form of the ``YYGETSTATE`` switch: instead of using default case to jump to the beginning of the lexer block, a ``-1`` case is used, and the default case aborts the program. ``re2c:state:nextlabel`` With storable states, allows to control if the ``YYGETSTATE`` block is followed by a ``yyNext`` label (the default value is zero, which corresponds to no label). Instead of using ``yyNext`` it is possible to use ``re2c:startlabel`` to force the generation of a specific start label. Instead of using labels it is often more convenient to generate ``YYGETSTATE`` code using ``/*!getstate:re2c*/``. ``re2c:label:yyNext`` Allows one to change the name of the ``yyNext`` label. ``re2c:startlabel`` Controls the generation of start label for the next lexer block. The default value is zero, which means that the start label is generated only if it is used. An integer value greater than zero forces the generation of start label even if it is unused by the lexer. A string value also forces start label generation and sets the label name to the specified string. This configuration applies only to the current block (it is reset to default for the next block). ``re2c:flags:s``, ``re2c:flags:nested-ifs`` Same as ``-s --nested-ifs`` command-line option. ``re2c:flags:b``, ``re2c:flags:bit-vectors`` Same as ``-b --bit-vectors`` command-line option. ``re2c:variable:yybm`` Overrides the name of the ``yybm`` variable. ``re2c:yybm:hex`` Defaults to zero (a decimal bitmap table is generated). If set to nonzero, a hexadecimal table is generated. ``re2c:flags:g``, ``re2c:flags:computed-gotos`` Same as ``-g --computed-gotos`` command-line option. ``re2c:cgoto:threshold`` With ``-g`` ``--computed-gotos`` option this value specifies the complexity threshold that triggers the generation of jump tables instead of nested ``if`` statements and bitmaps. The default value is ``9``. ``re2c:flags:case-ranges`` Same as ``--case-ranges`` command-line option. ``re2c:flags:e``, ``re2c:flags:ecb`` Same as ``-e --ecb`` command-line option. ``re2c:flags:8``, ``re2c:flags:utf-8`` Same as ``-8 --utf-8`` command-line option. ``re2c:flags:w``, ``re2c:flags:wide-chars`` Same as ``-w --wide-chars`` command-line option. ``re2c:flags:x``, ``re2c:flags:utf-16`` Same as ``-x --utf-16`` command-line option. ``re2c:flags:u``, ``re2c:flags:unicode`` Same as ``-u --unicode`` command-line option. ``re2c:flags:encoding-policy`` Same as ``--encoding-policy`` command-line option. ``re2c:flags:empty-class`` Same as ``--empty-class`` command-line option. ``re2c:flags:case-insensitive`` Same as ``--case-insensitive`` command-line option. ``re2c:flags:case-inverted`` Same as ``--case-inverted`` command-line option. ``re2c:indent:string`` Specifies the string to use for indentation. The default value is ``"\t"``. Indent string should contain only whitespace characters. To disable indentation entirely, set this configuration to empty string ``""``. ``re2c:indent:top`` Specifies the minimum amount of indentation to use. The default value is zero. The value should be a non-negative integer number. ``re2c:labelprefix`` Allows one to change the prefix of DFA state labels. The default value is ``yy``. ``re2c:yych:emit`` Set this to zero to suppress the generation of ``yych`` definition. Defaults to ``1`` (the definition is generated). ``re2c:variable:yych`` Overrides the name of the ``yych`` variable. ``re2c:yych:conversion`` If set to nonzero, re2c automatically generates a cast to ``YYCTYPE`` every time ``yych`` is read. Defaults to zero (no cast). ``re2c:variable:yyaccept`` Overrides the name of the ``yyaccept`` variable. ``re2c:variable:yytarget`` Overrides the name of the ``yytarget`` variable. ``re2c:variable:yystable`` Deprecated. ``re2c:variable:yyctable`` When both ``-c`` ``--conditions`` and ``-g`` ``--computed-gotos`` are active, re2c will use this variable to generate a static jump table for ``YYGETCONDITION``. ``re2c:define:YYDEBUG`` Defines ``YYDEBUG`` (see the user interface section). ``re2c:flags:d``, ``re2c:flags:debug-output`` Same as ``-d --debug-output`` command-line option. ``re2c:flags:dfa-minimization`` Same as ``--dfa-minimization`` command-line option. ``re2c:flags:eager-skip`` Same as ``--eager-skip`` command-line option.