Changelog
=========


4.5.1 (2026-03-27)
~~~~~~~~~~~~~~~~~~

- Added missing include files to the distribution
  (`#573 <https://github.com/skvadrik/re2c/issues/573>`_).

- Updated the documentation to mention the new include files.


4.5 (2026-03-23)
~~~~~~~~~~~~~~~~

- Migrated include files to Unicode 17.0.0 standard.

- Added Unicode include files:

  + `include/unicode_blocks.re <https://github.com/skvadrik/re2c/blob/master/include/unicode_blocks.re>`_
  + `include/unicode_properties.re <https://github.com/skvadrik/re2c/blob/master/include/unicode_properties.re>`_

- Implemented Unicode case mapping for case-insensitive string literals
  (`#235 <https://github.com/skvadrik/re2c/issues/235>`_).

- Fixed `#571 <https://github.com/skvadrik/re2c/issues/571>`_
  (segmentation fault on erroneous input during determinization).

- Updated paper `A closer look at TDFA <https://arxiv.org/abs/2206.01398>`_
  (applied corrections by Lisa Felidae).


4.4 (2025-12-20)
~~~~~~~~~~~~~~~~

- Added generalized end-of-input symbol ``$``
  (`#525 <https://github.com/skvadrik/re2c/issues/525>`_).
  This change may break old code with conflicitng end-of-input rules,
  as they now have position-based precedence. The broken cases were
  reported with ``-Wdeprecated-eof-rule`` since version 4.3.


4.3.1 (2025-12-01)
~~~~~~~~~~~~~~~~~~

- Fixed bugs:

    + `#560 <https://github.com/skvadrik/re2c/issues/560>`_
      (allow conditions that have no rules except for default rule)

    + `#561 <https://github.com/skvadrik/re2c/issues/561>`_
      (use unsigned character type in C/C++ examples)

    + `#564 <https://github.com/skvadrik/re2c/issues/564>`_
      (fix broken end of input rule $ with captures)


4.3 (2025-06-30)
~~~~~~~~~~~~~~~~

- Added warning ``-Wdeprecated-eof-rule``, this will be turned to error in the
  future (`#525 <https://github.com/skvadrik/re2c/issues/525>`_).

- Improved re2c performance (made determinization faster,
  `#544 <https://github.com/skvadrik/re2c/discussions/544>`_).


4.2 (2025-04-23)
~~~~~~~~~~~~~~~~

- Added Swift backend
  (`#506 <https://github.com/skvadrik/re2c/issues/506>`_).

- Added options:

  + ``--lang swift``
  + ``--computed-gotos-relative``

- Added configurations:

  + ``re2c:cgoto:relative``, ``re2c:computed-gotos:relative``
  + ``re2c:yyfn:throw``

- Added syntax file code templates:

  + ``code:cgoto``
  + ``code:cgoto_data``
  + ``code:yytarget_filter``
  + ``code:type_yyctable``

- Added syntax file conditionals:

  + ``.cgoto.relative``
  + ``.yyfn.throw``

- Added some C++ benchmarks without submatch extraction.


4.1 (2025-02-16)
~~~~~~~~~~~~~~~~

- Added new syntax for actions
  (`#521 <https://github.com/skvadrik/re2c/issues/521>`_).

- Added entry, pre-rule and post-rule actions
  (`#521 <https://github.com/skvadrik/re2c/issues/521>`_):

  + ``!entry`` action binds code at the start of the current finite state machine
  + ``!pre_rule`` action prepernds code to semantic actions of all rules in the
    current block or condiiton.
  + ``!post_rule`` action appernds code to semantic actions of all rules in the
    current block or condiiton.

- Added syntax file option ``special_escapes`` that describes allowed escape
  sequences (`#516 <https://github.com/skvadrik/re2c/issues/516>`_).

- Fixed bugs:

  + `#518 <https://github.com/skvadrik/re2c/issues/518>`_
    (allow using lookahead operator with captures).

  + `#519 <https://github.com/skvadrik/re2c/issues/519>`_
    (integer overflow caused a very long loop when generating tag names).

  + `#522 <https://github.com/skvadrik/re2c/issues/522>`_
    (segfault on ``!use`` directive in a block with conditions).

  + `#523 <https://github.com/skvadrik/re2c/issues/523>`_
    (regression with bit-vector optimization).

  + `#529 <https://github.com/skvadrik/re2c/issues/529>`_
    (failure to recognize escaped double quotes in character literals).

- OCaml backend now uses ``unsafe_get`` instead of ``get`` as the default ``YYPEEK``
  implementation.

- Zig backend now uses ``const`` for ``yych`` declaration in
  ``--recursive-functions`` mode.

- Benchmarks (C/C++):

  + Reimplemented benchmarks using google-benchmark library.
  + Added simple variants without buffer refill.
  + Removed Kleenex benchmarks.
  + Removed deprecated TDFA(0) and StaDFA algorithms.
  + Updated benchmark results.

- Build system:

  + Migrated to Bazel 8 using bzlmod.


4.0.2 (2024-12-11)
~~~~~~~~~~~~~~~~~~

- CMake build system: fixed bug
  `#515 <https://github.com/skvadrik/re2c/issues/515>`_ where language-specific
  binaries erroneously defaulted to generating code for C.

- Playground: address bar now reflects navigation between examples, editors use
  a more high-contrast CSS theme.


4.0.1 (2024-11-25)
~~~~~~~~~~~~~~~~~~

- Added missing doc sources to the distribution tarball
  (`#503 <https://github.com/skvadrik/re2c/issues/503>`_)

- Reworked C/C++ examples to avoid using new configuration aliases until the
  world has updated to re2c 4.0, made them compatible with C.

- A few build system changes: increased CMake minimum required version to 3.15,
  added missing dependencies on doc sources in Makefile.am.

- Fixed typos in docs.


4.0 (2024-11-19)
~~~~~~~~~~~~~~~~

- Added a generic technique for describing language backends based on the idea
  of syntax files (`#450 <https://github.com/skvadrik/re2c/issues/450>`_).

- Added support for new languages: D, Haskell, Java, JavaScript, OCaml, Python,
  V, Zig.

- Added new record API for all languages (enabled with ``--api record``,
  ``re2c:api = record``) and made it the default API for Haskell and OCaml.

- Renamed former "default API" to "simple API", implemented it for all backends
  except Haskell and OCaml, and enabled by default API for C, D, Java,
  JavaScript, Python, V and Zig.

- Added new code generation model - recursive functions (enabled with
  ``--recursive-functions``), primarily to be used for functional languages.

- Added options:

  + ``--syntax <file>``
  + ``--api simple``
  + ``--api generic``
  + ``--api record``
  + ``--goto-label``
  + ``--recursive-functions``
  + ``--lang none``
  + ``--lang d``
  + ``--lang haskell``
  + ``--lang java``
  + ``--lang js``
  + ``--lang ocaml``
  + ``--lang python``
  + ``--lang v``
  + ``--lang zig``
  + ``--leftmost-captvars``
  + ``--posix-captvars``
  + ``--captvars`` (alias for ``--leftmost-captvars``)
  + ``--captures`` (alias for ``--leftmost-captures``)

- Added configurations:

  + ``re2c:api = simple`` (alias for ``re2c:api = default``)
  + ``re2c:api = generic`` (alias for ``re2c:api = custom``)
  + ``re2c:api = record``
  + ``re2c:computed-gotos`` (alias for ``re2c:cgoto``)
  + ``re2c:cond:abort``
  + ``re2c:tags:negative``
  + ``re2c:leftmost-captvars``
  + ``re2c:posix-captvars``
  + ``re2c:captvars`` (alias for ``re2c:leftmost-captvars``)
  + ``re2c:captures`` (alias for ``re2c:leftmost-captures``)
  + ``re2c:monadic``
  + ``re2c:fn:sep``
  + ``re2c:[define:]YYFN``
  + ``re2c:[define:]YYINPUT``
  + ``re2c:[define:]YYGETACCEPT``
  + ``re2c:[define:]YYSETACCEPT``
  + ``re2c:[define:]YYCOPYSTAG``
  + ``re2c:[define:]YYCOPYMTAG``
  + ``re2c:[define:]YYGETCOND`` (alias for ``re2c:[define:]YYGETCONDITION``)
  + ``re2c:[define:]YYSETCOND`` (alias for ``re2c:[define:]YYSETCONDITION``)
  + ``re2c:[variable:]yyfill``
  + ``re2c:[variable:]yynmatch``
  + ``re2c:[variable:]yypmatch``
  + ``re2c:[variable:]yych:literals``

- All configurations that have ``define:`` or ``variable:`` part in their name
  now have an alias without this part.

- Added new block types:

  + ``/*!svars:re2c ... */``
  + ``/*!mvars:re2c ... */``

- Flex-style opening/closing braces ``%{`` and ``%}`` for block start/end
  markers now work for all block types.

- Added syntax file feature lists:

  + ``supported_apis`` with values from the list:
    ``simple``, ``generic``, ``record``

  + ``supported_api_styles`` with values from the list:
    ``free-form``, ``functions``

  + ``supported_code_models`` with values from the list:
    ``goto-label``, ``loop-switch``, ``recursive-functions``

  + ``supported_targets`` with values from the list:
    ``code``, ``dot``, ``skeleton``

  + ``supported_features`` with values from the list:
    ``nested-ifs``, ``bitmaps``, ``computed-gotos``, ``case-ranges``,
    ``tags``, ``captures``, ``captvars``, ``monadic``, ``unsafe``

- Added syntax file language-specific options:

  + ``semicolons``
  + ``backtick_quoted_strings``
  + ``single_quoted_strings``
  + ``indentation_sensitive``
  + ``wrap_blocks_in_braces``

- Added syntax file code templates:

  + ``code:var_local``
  + ``code:var_global``
  + ``code:const_local``
  + ``code:const_global``
  + ``code:array_local``
  + ``code:array_global``
  + ``code:array_elem``
  + ``code:enum``
  + ``code:enum_elem``
  + ``code:assign``
  + ``code:type_int``
  + ``code:type_uint``
  + ``code:type_cond_enum``
  + ``code:type_yybm``
  + ``code:type_yytarget``
  + ``code:cmp_eq``
  + ``code:cmp_ne``
  + ``code:cmp_lt``
  + ``code:cmp_gt``
  + ``code:cmp_le``
  + ``code:cmp_ge``
  + ``code:if_then_else``
  + ``code:if_then_else_oneline``
  + ``code:switch``
  + ``code:switch_cases``
  + ``code:switch_cases_oneline``
  + ``code:switch_case_range``
  + ``code:switch_case_default``
  + ``code:loop``
  + ``code:continue``
  + ``code:goto``
  + ``code:fndecl``
  + ``code:fndef``
  + ``code:fncall``
  + ``code:tailcall``
  + ``code:recursive_functions``
  + ``code:fingerprint``
  + ``code:line_info``
  + ``code:abort``
  + ``code:yydebug``
  + ``code:yypeek``
  + ``code:yyskip``
  + ``code:yybackup``
  + ``code:yybackupctx``
  + ``code:yyskip_yypeek``
  + ``code:yypeek_yyskip``
  + ``code:yyskip_yybackup``
  + ``code:yybackup_yyskip``
  + ``code:yybackup_yypeek``
  + ``code:yyskip_yybackup_yypeek``
  + ``code:yybackup_yypeek_yyskip``
  + ``code:yyrestore``
  + ``code:yyrestorectx``
  + ``code:yyrestoretag``
  + ``code:yyshift``
  + ``code:yyshiftstag``
  + ``code:yyshiftmtag``
  + ``code:yystagp``
  + ``code:yymtagp``
  + ``code:yystagn``
  + ``code:yymtagn``
  + ``code:yycopystag``
  + ``code:yycopymtag``
  + ``code:yygetaccept``
  + ``code:yysetaccept``
  + ``code:yygetcond``
  + ``code:yysetcond``
  + ``code:yygetstate``
  + ``code:yysetstate``
  + ``code:yylessthan``
  + ``code:yybm_filter``
  + ``code:yybm_match``

- Added global variables in syntax files:

  + ``nl``
  + ``indent``
  + ``dedent``
  + ``topindent``

- Added global conditionals in syntax files:

  + ``.api.simple``
  + ``.api.generic``
  + ``.api.record``
  + ``.api_style.functions``
  + ``.api_style.freeform``
  + ``.case_ranges``
  + ``.code_model.goto_label``
  + ``.code_model.loop_switch``
  + ``.code_model.recursive_functions``
  + ``.date``
  + ``.loop_label``
  + ``.monadic``
  + ``.start_conditions``
  + ``.storable_state``
  + ``.unsafe``
  + ``.version``

- Added warning ``-Wundefined-syntax-config``.

- Warnings that indicate serious issues are now turned on by default
  (and can be disabled with ``-Wno-<warning>`` options.

- Added configure options:

  + ``--enable-syntax`` (Autoconf)
  + ``RE2C_REBUILD_SYNTAX`` (CMake)

- Dropped support for function-like API style for Rust.
  (it was hard to use, if at all possible)

- Added online playground that allows one to run re2c in a web browser:
  https://re2c.org/playground.

- Infra work on Github Actions CI.


3.1 (2023-07-19)
~~~~~~~~~~~~~~~~

- Added capturing groups with leftmost greedy semantics:

  + Enabled with ``--leftmost-captures`` option or ``re2c:leftmost_captures``
    configuration
    (`55de79d8 <https://github.com/skvadrik/re2c/commit/55de79d8>`_,
    `3a98b543 <https://github.com/skvadrik/re2c/commit/3a98b543>`_).

- Added non-capturing groups:

  + Added new syntax ``(! ...)`` for non-capturing groups
    (`1edd25d3 <https://github.com/skvadrik/re2c/commit/1edd25d3>`_,
    `b813c9b4 <https://github.com/skvadrik/re2c/commit/b813c9b4>`_,
    `338806b9 <https://github.com/skvadrik/re2c/commit/338806b9>`_).

  + Added the ability to flip defaults: make ``(...)`` capturing and ``(! ...)``
    non-capturing with ``--invert-captures`` option or ``re2c:invert_captures``
    configuration
    (`20030ff1 <https://github.com/skvadrik/re2c/commit/20030ff1>`_,
    `ce756195 <https://github.com/skvadrik/re2c/commit/ce756195>`_).

- Regenerated Unicode include header to support a newer standard
  (`e3ec2597 <https://github.com/skvadrik/re2c/commit/e3ec2597>`_).

- Published TDFA paper: https://arxiv.org/abs/2206.01398, co-authored with
  Angelo Borsotti
  (`fa94d9c7 <https://github.com/skvadrik/re2c/commit/fa94d9c7>`_).

- Removed experimental algorithms that are superseded by TDFA(1) and
  generally less efficient:

  + Removed staDFA algorithm and deprecated ``--stadfa`` option
    (`ac5c06cc <https://github.com/skvadrik/re2c/commit/ac5c06cc>`_).

  + Removed TDFA(0) algorithm and deprecated ``--no-lookahead`` option
    (`dc8f264a <https://github.com/skvadrik/re2c/commit/dc8f264a>`_).

  + (libre2c) Removed backward-matching algorithm
    (`27256be1 <https://github.com/skvadrik/re2c/commit/27256be1>`_).

  + (libre2c) Removed Kuklewicz POSIX disambiguation algorithm
    (`aa97b014 <https://github.com/skvadrik/re2c/commit/aa97b014>`_).

  + (libre2c) Removed GTOP shortest path finding algorithm
    (`511a030c <https://github.com/skvadrik/re2c/commit/511a030c>`_).

- Bug fixes:

  + Fixed parsing of raw UTF-8 characters in Flex compatibility mode
    (`d87f86ed <https://github.com/skvadrik/re2c/commit/d87f86ed>`_).

  + Added header file to the dependencies generated with ``--depfile`` option
    (`f807f763 <https://github.com/skvadrik/re2c/commit/f807f763>`_
    and `2dda36aa <https://github.com/skvadrik/re2c/commit/2dda36aa>`_).

  + Fixed stack overflow on large regular expressions by rewriting recursive
    functions in iterative form
    (`46a9b4c4 <https://github.com/skvadrik/re2c/commit/46a9b4c4>`_,
    `aaf68292 <https://github.com/skvadrik/re2c/commit/aaf68292>`_,
    `02e5d797 <https://github.com/skvadrik/re2c/commit/02e5d797>`_,
    `5fffb187 <https://github.com/skvadrik/re2c/commit/5fffb187>`_)
    and limited stack to 256K on GithubActions CI
    (`111ee5da <https://github.com/skvadrik/re2c/commit/111ee5da>`_).

- Build system:

  + Added minimal http://bazel.build integration
    (`3205c867 <https://github.com/skvadrik/re2c/commit/3205c867>`_).

  + Added configure option ``--enable-parsers`` that regenerates bison parsers
    (`9e0dbd3c <https://github.com/skvadrik/re2c/commit/9e0dbd3c>`_).

  + Added CMake option ``RE2C_REBUILD_PARSERS``
    (`6e91c22d <https://github.com/skvadrik/re2c/commit/6e91c22d>`_).

  + With CMake, fixed documentation generation on Windows.

- Codebase improvements:

  + Moved the entire codebase to C++11.
  + Added uniform error handling (return codes are now properly checked and
    returned to the caller).
  + Reorganized codegen subsystem in four well-defined phases (analyze,
    generate, fixup, render) and separated codegen from parsing phase.
  + Improved memory allocation by using slab allocators instead of global free
    lists.
  + Moved to pure API for bison parsers.
  + Unified code style.

- Testing:

  + Added ``--verbose`` flag to run_tests.py and suppressed verbose output by
    default.
  + Multiple improvements of continuous testing with GithubActions.


3.0 (2022-01-27)
~~~~~~~~~~~~~~~~

- Added code generation backend for Rust:

  + Enabled with ``--lang rust`` option.
  + A new ``re2rust`` binary (built by default, or configured with
    ``--enable-rust`` Autoconf option and ``RE2C_BUILD_RE2RUST`` CMake option).

- Added options:

  + ``--loop-switch``
  + ``--no-unsafe``

- Added configurations;

  + ``re2c:label:yyloop``
  + ``re2c:unsafe``

- Renamed options to use common naming scheme. The old names are supported as
  aliases, so the change does not break existing code. Documentation has been
  updated to use new names.

  + ``--api`` is a new alias for ``--input``
  + ``--ebcdic`` is a new alias for ``--ecb``
  + ``--ucs2`` is a new alias for ``--wide-chars``
  + ``--utf32`` is a new alias for ``--unicode``
  + ``--utf16`` is a new alias for ``--utf-16``
  + ``--utf8`` is a new alias for ``--utf-8``
  + ``--header`` is a new alias for ``--type-header``

- Renamed configurations to use common naming scheme and support proper scoping
  under subcategories such as ``:define``, ``:label``, ``:variable``, etc. The
  old names are supported as aliases, so the change does not break existing
  code. Documentation has been updated to use new names.

  + ``re2c:api`` is a new alias for ``re2c:flags:input``
  + ``re2c:bit-vectors`` is a new alias for ``re2c:flags:bit-vectors``
  + ``re2c:case-insensitive`` is a new alias for ``re2c:flags:case-insensitive``
  + ``re2c:case-inverted`` is a new alias for ``re2c:flags:case-inverted``
  + ``re2c:case-ranges`` is a new alias for ``re2c:flags:case-ranges``
  + ``re2c:cond:prefix`` is a new alias for ``re2c:condprefix``
  + ``re2c:cond:enumprefix`` is a new alias for ``re2c:condenumprefix``
  + ``re2c:computed-gotos`` is a new alias for ``re2c:flags:computed-gotos``
  + ``re2c:computed-gotos:threshold`` is a new alias for ``re2c:cgoto:threshold``
  + ``re2c:debug-output`` is a new alias for ``re2c:flags:debug-output``
  + ``re2c:encoding:ebcdic`` is a new alias for ``re2c:flags:ecb``
  + ``re2c:encoding:utf32`` is a new alias for ``re2c:flags:unicode``
  + ``re2c:encoding:ucs2`` is a new alias for ``re2c:flags:wide-chars``
  + ``re2c:encoding:utf16`` is a new alias for ``re2c:flags:utf-16``
  + ``re2c:encoding:utf8`` is a new alias for ``re2c:flags:utf-8``
  + ``re2c:encoding-policy`` is a new alias for ``re2c:flags:encoding-policy``
  + ``re2c:empty-class`` is a new alias for ``re2c:flags:empty-class``
  + ``re2c:header`` is a new alias for ``re2c:flags:type-header``
  + ``re2c:label:prefix`` is a new alias for ``re2c:labelprefix``
  + ``re2c:label:yyfill`` is a new alias for ``re2c:label:yyFillLabel``
  + ``re2c:label:start`` is a new alias for ``re2c:startlabel``
  + ``re2c:nested-ifs`` is a new alias for ``re2c:flags:nested-ifs``
  + ``re2c:posix-captures`` is a new alias for ``re2c:flags:posix-captures``
  + ``re2c:tags`` is a new alias for ``re2c:flags:tags``
  + ``re2c:variable:yych:conversion`` is a new alias for ``re2c:yych:conversion``
  + ``re2c:variable:yych:emit`` is a new alias for ``re2c:yych:emit``
  + ``re2c:variable:yybm:hex`` is a new alias for ``re2c:yybm:hex``
  + ``re2c:unsafe`` is a new alias for ``re2c:flags:unsafe``

- Added directive alias ``conditions:re2c`` for ``types:re2c``.

- Multiple small changes in code generation, including some formatting changes
  that result in large diffs in the generated code:

  + Do not allocate indices for unused state labels (this results in a change in
    state enumeration), commits
    `919570c4 <https://github.com/skvadrik/re2c/commit/919570c4>`_ and
    `82b704f6 <https://github.com/skvadrik/re2c/commit/82b704f6>`_.
  + Do not generate redundant ``YYPEEK`` statements, commit
    `cca31d22 <https://github.com/skvadrik/re2c/commit/cca31d22>`_.
  + Do not generate ``YYDEBUG`` statements for unused states labels, commit
    `a46f01e6 <https://github.com/skvadrik/re2c/commit/a46f01e6>`_.
  + C backend: change formatting of switch statements, commit
    `ed88e12e <https://github.com/skvadrik/re2c/commit/ed88e12e>`_.
  + Go backend: render continuous character ranges in compact form, commit
    `09161b14 <https://github.com/skvadrik/re2c/commit/09161b14>`_.
  + Mark start and end of included .re files with line directives, commit
    `48e83fca <https://github.com/skvadrik/re2c/commit/48e83fca>`_.

- A fix to limit maximum allowed NFA and DFA size (to avoid out of memory
  crashes and stack overflows), commit
  `a3473fd7 <https://github.com/skvadrik/re2c/commit/a3473fd7>`_.

- A fix to correctly compute fixed tags in trailing context, commit
  `68e1ab71 <https://github.com/skvadrik/re2c/commit/68e1ab71>`_.

- A fix to generate non-overlapping names for s-tag and m-tag variables, commit
  `7c6b5c95 <https://github.com/skvadrik/re2c/commit/7c6b5c95>`_.

- Infrastructural: added support for CMake presets.

- Updated documentation.

- Backwards-incompatible changes that are unlikely to affect any users:

  + Restrict lexical contexts where ``%{`` is recognized as a block start,
    commit `dba7d055 <https://github.com/skvadrik/re2c/commit/dba7d055>`_.
  + Emit an error when repetition lower bound exceeds upper bound, commit
    `039c1894 <https://github.com/skvadrik/re2c/commit/039c1894>`_.


2.2 (2021-08-01)
~~~~~~~~~~~~~~~~

- Added named blocks and block lists in directives.

- Added local blocks ``/*!local:re2c ... */``.

- Added in-block ``!include`` directive.

- Added in-block ``!use`` directive.

- Allowed reusable blocks without ``-r --reusable`` option.

- Allowed customizing the generated code with configurations for directives
  ``max:re2c``, ``maxnmatch:re2c``, ``stags:re2c``, ``mtags:re2c`` and
  ``types:re2c`` (see directive descriptions for details).

- Forbid arbitrary text at the end of ``max:re2c`` directive. This may break
  backwards compatibility, although it is unlikely that this was used by anyone.
  The change was necessary in order to allow customization of the generated code
  with configurations.

- Deprecated configurations ``flags:i``, ``flags:no-debug-info`` in favour of
  the global options ``-i``, ``--no-debug-info``.

- Reimplemented re2c test runner in Python (thanks to
  `Serghei Iakovlev <https://github.com/sergeyklay>`_). Improved integration
  with GitHub Actions.

- Changes in the experimental libre2c library: added new algorithms that
  construct t-string or extract submatch on all repetitions; added TDFA
  benchmark written in Java by Angelo Borsotti.

- Updated documentation.


2.1.1 (2021-03-27)
~~~~~~~~~~~~~~~~~~

- Added missing CMakeLists.txt to release tarballs
  (`#346 <https://github.com/skvadrik/re2c/issues/346>`_).

2.1 (2021-03-26)
~~~~~~~~~~~~~~~~

- Added GitHub Actions CI for Linux, macOS and Windows and fixed numerous build
  issues on those platforms (thanks to
  `Serghei Iakovlev <https://github.com/sergeyklay>`_).

- Added benchmarks for submatch extraction in lexer generators (ragel vs.
  kleenex vs. re2c with TDFA(0), TDFA(1) or sta-DFA algorithms).

  + New Autotools (configure) options: ``--enable-benchmarks``,
    ``--enable-benchmarks-regenerate``

  + New CMake options: ``-DRE2C_BUILD_BENCHMARKS``, ``-DRE2C_REGEN_BENCHMARKS``

  + New `json2pgfplot.py
    <https://github.com/skvadrik/re2c/blob/master/benchmarks/json2pgfplot.py>`_
    script that converts benchmark results in JSON to a PDF with bar charts

- Added option ``--depfile <filename>`` to generate build dependency files
  (allows to track ``/*!include:re2c*/`` dependencies in the build system).

- Added option ``--fixed-tags <none | all | toplevel>`` and improved fixed-tag
  optimization to work with nested tags.

- Added lzip to the distribution tarballs.

- Added registerless-TDFA algorithm in the experimental libre2c library.

- Explicitly disallowed invalid configuration when ``-f``, ``--storable-state``
  option is used, but ``YYFILL`` is disabled
  (`#306 <https://github.com/skvadrik/re2c/issues/306>`_).

- Fixed bug in UTF-8 decode for 4-bytes rune
  (`#307 <https://github.com/skvadrik/re2c/pull/307>`_, thanks to
  `Satoshi Yasushima <https://github.com/s-yasu>`_).

- Fixed bugs in rare cases of the end-of-input rule ``$`` usage
  (`277f0295 <https://github.com/skvadrik/re2c/commit/277f0295fc77a2dad3b9838e45f787319b54a25f>`_,
  `68611a57 <https://github.com/skvadrik/re2c/commit/68611a57a9683c05801255b35ba6217b91391dd8>`_
  and `a9d582f9 <https://github.com/skvadrik/re2c/commit/a9d582f9d2a6d123aa55f3b8b73076aae7cb5616>`_).

- Optimized ``--skeleton`` generation time.

- Renamed internal option ``--dfa`` to ``--nested-negative-tags``.

- Updated documentation for end of input handling and submatch extraction.


2.0.3 (2020-08-22)
~~~~~~~~~~~~~~~~~~

- Fix issues when building re2c as a CMake subproject
  (`#302 <https://github.com/skvadrik/re2c/pull/302>`_:
  Using CMake add_subdirectory fails)

- Final corrections in the SIMPA article "RE2C: A lexer generator based on
  lookahead-TDFA", https://doi.org/10.1016/j.simpa.2020.100027

2.0.2 (2020-08-08)
~~~~~~~~~~~~~~~~~~

- Enable re2go building by default.

- Package CMake files into release tarball.

2.0.1 (2020-07-29)
~~~~~~~~~~~~~~~~~~

- Updated version for CMake build system (forgotten in release 2.0).

- Added a short article about re2c for the Software Impacts journal.

2.0 (2020-07-20)
~~~~~~~~~~~~~~~~

- Added new code generation backend for Go and a new ``re2go`` program
  (`#272 <https://github.com/skvadrik/re2c/issues/272>`_: Go support).
  Added option ``--lang <c | go>``.

- Added CMake build system as an alternative to Autotools
  (`#275 <https://github.com/skvadrik/re2c/pull/275>`_:
  Add a CMake build system (thanks to ligfx),
  `#244 <https://github.com/skvadrik/re2c/issues/244>`_: Switching to CMake).

- Changes in generic API:

  + Removed primitives ``YYSTAGPD`` and ``YYMTAGPD``.
  + Added primitives ``YYSHIFT``, ``YYSHIFTSTAG``, ``YYSHIFTMTAG``
    that allow to express fixed tags in terms of generic API.
  + Added configurations ``re2c:api:style`` and ``re2c:api:sigil``.
  + Added named placeholders in interpolated configuration strings.

- Changes in reuse mode (``-r, --reuse`` option):

  + Do not reset API-related configurations in each `use:re2c` block
    (`#291 <https://github.com/skvadrik/re2c/issues/291>`_:
    Defines in rules block are not propagated to use blocks).
  + Use block-local options instead of last block options.
  + Do not accumulate options from rules/reuse blocks in whole-program options.
  + Generate non-overlapping YYFILL labels for reuse blocks.
  + Generate start label for each reuse block in storable state mode.

- Changes in start-conditions mode (``-c, --start-conditions`` option):

  + Allow to use normal (non-conditional) blocks in `-c` mode
    (`#263 <https://github.com/skvadrik/re2c/issues/263>`_:
    allow mixing conditional and non-conditional blocks with -c,
    `#296 <https://github.com/skvadrik/re2c/issues/296>`_:
    Conditions required for all lexers when using '-c' option).
  + Generate condition switch in every re2c block
    (`#295 <https://github.com/skvadrik/re2c/issues/295>`_:
    Condition switch generated for only one lexer per file).

- Changes in the generated labels:

  + Use ``yyeof`` label prefix instead of ``yyeofrule``.
  + Use ``yyfill`` label prefix instead of ``yyFillLabel``.
  + Decouple start label and initial label (affects label numbering).

- Removed undocumented configuration ``re2c:flags:o``, ``re2c:flags:output``.

- Changes in ``re2c:flags:t``, ``re2c:flags:type-header`` configuration:
  filename is now relative to the output file directory.

- Added option ``--case-ranges`` and configuration ``re2c:flags:case-ranges``.

- Extended fixed tags optimization for the case of fixed-counter repetition.

- Fixed bugs related to EOF rule:

  + `#276 <https://github.com/skvadrik/re2c/issues/276>`_:
    Example 01_fill.re in docs is broken
  + `#280 <https://github.com/skvadrik/re2c/issues/280>`_:
    EOF rules with multiple blocks
  + `#284 <https://github.com/skvadrik/re2c/issues/284>`_:
    mismatched YYBACKUP and YYRESTORE
    (Add missing fallback states with EOF rule)

- Fixed miscellaneous bugs:

  + `#286 <https://github.com/skvadrik/re2c/issues/286>`_:
    Incorrect submatch values with fixed-length trailing context.
  + `#297 <https://github.com/skvadrik/re2c/issues/297>`_:
    configure error on ubuntu 18.04 / cmake 3.10

- Changed bootstrap process (require explicit configuration flags and a path to
  re2c executable to regenerate the lexers).

- Added internal options ``--posix-prectable <naive | complex>``.

- Added debug option ``--dump-dfa-tree``.

- Major revision of the paper "Efficient POSIX submatch extraction on NFA".


1.3 (2019-12-14)
~~~~~~~~~~~~~~~~

- Added option: ``--stadfa``.

- Added warning: ``-Wsentinel-in-midrule``.

- Added generic API primitives:

  + ``YYSTAGPD``
  + ``YYMTAGPD``

- Added configurations:

  + ``re2c:sentinel = 0;``
  + ``re2c:define:YYSTAGPD = "YYSTAGPD";``
  + ``re2c:define:YYMTAGPD = "YYMTAGPD";``

- Worked on reproducible builds
  (`#258 <https://github.com/skvadrik/re2c/pull/258>`_:
  Make the build reproducible).


1.2.1 (2019-08-11)
~~~~~~~~~~~~~~~~~~

- Fixed bug `#253 <https://github.com/skvadrik/re2c/issues/253>`_:
  re2c should install unicode_categories.re somewhere.

- Fixed bug `#254 <https://github.com/skvadrik/re2c/issues/254>`_:
  Turn off re2c:eof = 0.

1.2 (2019-08-02)
~~~~~~~~~~~~~~~~

- Added EOF rule ``$`` and configuration ``re2c:eof``.

- Added ``/*!include:re2c ... */`` directive and ``-I`` option.

- Added ``/*!header:re2c:on*/`` and ``/*!header:re2c:off*/`` directives.

- Added ``--input-encoding <ascii | utf8>`` option.

  + `#237 <https://github.com/skvadrik/re2c/issues/237>`_:
    Handle non-ASCII encoded characters in regular expressions
  + `#250 <https://github.com/skvadrik/re2c/issues/250>`_
    UTF8 enoding

- Added include file with a list of definitions for Unicode character classes.

  + `#235 <https://github.com/skvadrik/re2c/issues/235>`_:
    Unicode character classes

- Added ``--location-format <gnu | msvc>`` option.

  + `#195 <https://github.com/skvadrik/re2c/issues/195>`_:
    Please consider using Gnu format for error messages

- Added ``--verbose`` option that prints "success" message if re2c exits
  without errors.

- Added configurations for options:

  + ``-o --output`` (specify output file)
  + ``-t --type-header`` (specify header file)

- Removed configurations for internal/debug options.

- Extended ``-r`` option: allow to mix multiple ``/*!rules:re2c*/``,
  ``/*!use:re2c*/`` and ``/*!re2c*/`` blocks.

  + `#55 <https://github.com/skvadrik/re2c/issues/55>`_:
    allow standard re2c blocks in reuse mode

- Fixed ``-F --flex-support`` option: parsing and operator precedence.

  + `#229 <https://github.com/skvadrik/re2c/issues/229>`_:
    re2c option -F (flex syntax) broken
  + `#242 <https://github.com/skvadrik/re2c/issues/242>`_:
    Operator precedence with --flex-syntax is broken

- Changed difference operator ``/`` to apply before encoding expansion of
  operands.

  + `#236 <https://github.com/skvadrik/re2c/issues/236>`_:
    Support range difference with variable-length encodings

- Changed output generation of output file to be atomic.

  + `#245 <https://github.com/skvadrik/re2c/issues/245>`_:
    re2c output is not atomic

- Authored research paper "Efficient POSIX Submatch Extraction on NFA"
  together with Dr Angelo Borsotti.

- Added experimental libre2c library (``--enable-libs`` configure option) with
  the following algorithms:

  + TDFA with leftmost-greedy disambiguation
  + TDFA with POSIX disambiguation (Okui-Suzuki algorithm)
  + TNFA with leftmost-greedy disambiguation
  + TNFA with POSIX disambiguation (Okui-Suzuki algorithm)
  + TNFA with lazy POSIX disambiguation (Okui-Suzuki algorithm)
  + TNFA with POSIX disambiguation (Kuklewicz algorithm)
  + TNFA with POSIX disambiguation (Cox algorithm)

- Added debug subsystem (``--enable-debug`` configure option) and new debug
  options:

  + ``-dump-cfg`` (dump control flow graph of tag variables)
  + ``-dump-interf`` (dump interference table of tag variables)
  + ``-dump-closure-stats`` (dump epsilon-closure statistics)

- Added internal options:

  + ``--posix-closure <gor1 | gtop>`` (switch between shortest-path algorithms
    used for the construction of POSIX closure)

- Fixed a number of crashes found by American Fuzzy Lop fuzzer:

  + `#226 <https://github.com/skvadrik/re2c/issues/226>`_,
    `#227 <https://github.com/skvadrik/re2c/issues/227>`_,
    `#228 <https://github.com/skvadrik/re2c/issues/228>`_,
    `#231 <https://github.com/skvadrik/re2c/issues/231>`_,
    `#232 <https://github.com/skvadrik/re2c/issues/232>`_,
    `#233 <https://github.com/skvadrik/re2c/issues/233>`_,
    `#234 <https://github.com/skvadrik/re2c/issues/234>`_,
    `#238 <https://github.com/skvadrik/re2c/issues/238>`_

- Fixed handling of newlines:

  + correctly parse multi-character newlines CR LF in ``#line`` directives
  + consistently convert all newlines in the generated file to Unix-style LF

- Changed default tarball format from .gz to .xz.

  + `#221 <https://github.com/skvadrik/re2c/issues/221>`_:
    big source tarball

- Fixed a number of other bugs and resolved issues:

  + `#2 <https://github.com/skvadrik/re2c/issues/2>`_: abort
  + `#6 <https://github.com/skvadrik/re2c/issues/6>`_: segfault
  + `#10 <https://github.com/skvadrik/re2c/issues/10>`_:
    lessons/002_upn_calculator/calc_002 doesn't produce a useful example program
  + `#44 <https://github.com/skvadrik/re2c/issues/44>`_:
    Access violation when translating the attached file
  + `#49 <https://github.com/skvadrik/re2c/issues/49>`_:
    wildcard state \000 rules makes lexer behave weard
  + `#98 <https://github.com/skvadrik/re2c/issues/98>`_:
    Transparent handling of #line directives in input files
  + `#104 <https://github.com/skvadrik/re2c/issues/104>`_:
    Improve const-correctness
  + `#105 <https://github.com/skvadrik/re2c/issues/105>`_:
    Conversion of pointer parameters into references
  + `#114 <https://github.com/skvadrik/re2c/issues/114>`_:
    Possibility of fixing bug 2535084
  + `#120 <https://github.com/skvadrik/re2c/issues/120>`_:
    condition consisting of default rule only is ignored
  + `#167 <https://github.com/skvadrik/re2c/issues/167>`_:
    Add word boundary support
  + `#168 <https://github.com/skvadrik/re2c/issues/168>`_:
    Wikipedia's article on re2c
  + `#180 <https://github.com/skvadrik/re2c/issues/180>`_:
    Comment syntax?
  + `#182 <https://github.com/skvadrik/re2c/issues/182>`_:
    yych being set by YYPEEK () and then not used
  + `#196 <https://github.com/skvadrik/re2c/issues/196>`_:
    Implicit type conversion warnings
  + `#198 <https://github.com/skvadrik/re2c/issues/198>`_:
    no match for ‘operator!=’ in ‘i != std::vector<_Tp, _Alloc>::rend() [with _Tp = re2c::bitmap_t, _Alloc = std::allocator<re2c::bitmap_t>]()’
  + `#210 <https://github.com/skvadrik/re2c/issues/210>`_:
    How to build re2c in windows?
  + `#215 <https://github.com/skvadrik/re2c/issues/215>`_:
    A memory read overrun issue in s_to_n32_unsafe.cc
  + `#220 <https://github.com/skvadrik/re2c/issues/220>`_:
    src/dfa/dfa.h: simplify constructor to avoid g++-3.4 bug
  + `#223 <https://github.com/skvadrik/re2c/issues/223>`_:
    Fix typo
  + `#224 <https://github.com/skvadrik/re2c/issues/224>`_:
    src/dfa/closure_posix.cc: pack() tweaks
  + `#225 <https://github.com/skvadrik/re2c/issues/225>`_:
    Documentation link is broken in libre2c/README
  + `#230 <https://github.com/skvadrik/re2c/issues/230>`_:
    Changes for upcoming Travis' infra migration
  + `#239 <https://github.com/skvadrik/re2c/issues/239>`_:
    Push model example has wrong re2c invocation, breaks guide
  + `#241 <https://github.com/skvadrik/re2c/issues/241>`_:
    Guidance on how to use re2c for full-duplex command & response protocol
  + `#243 <https://github.com/skvadrik/re2c/issues/243>`_:
    A code generated for period (.) requires 4 bytes
  + `#246 <https://github.com/skvadrik/re2c/issues/246>`_:
    Please add a license to this repo
[--snip--]
