======== re2c ======== .. toctree:: :hidden: Release notes How to build User manual (C) User manual (Go) User manual (Rust) Benchmarks Changelog re2c is a free and open-source lexer generator for C/C++, Go and Rust with a focus on generating fast code. It compiles regular expression specifications to deterministic finite automata and encodes them in the form of conditional jumps in the target language. This approach is generally faster than table-based lexers, and the generated code is easier to debug and understand. A flexible user interface allows one to adapt the generated lexer to a particular environment and input model, avoiding the overhead on unnecessary checks and buffers. re2c is based on the `lookahead TDFA <2022_borsotti_trofimovich_a_closer_look_at_tdfa.pdf>`_ algorithm that allows it to perform fast and lightweight submatch extraction. It is used in other open-source projects such as `php `_, `ninja `_, `yasm `_, `spamassassin `_, `BRL-CAD `_, `wake `_, etc. .. |feed| image:: feed/feed/feed.png :target: feed/atom.xml :class: feed :width: 2em |feed| `Subscribe `_ to receive the latest news and updates. See the user manuals (`C/C++ `_, `Go `_, `Rust `_) for a complete overview with examples. Download -------- You can get the `latest release `_ on GitHub, as well as the `older releases `_. Many Linux distributions and other systems provide their own packages. The source code is hosted on both GitHub (``_) and SourceForge (``_). GitHub serves as the main repository, bugtracker and tarball hosting. SourceForge is used as a backup repository and email hosting. Bugs & patches -------------- Please send bugs reports, patches and other feedback to `GitHub issue tracker `_ or email them to `re2c-devel@lists.sourceforge.net `_ and `re2c-general@lists.sourceforge.net `_ mailing lists. There is an IRC channel ``#re2c`` on `irc.libera.chat `_ and `irc.oftc.net `_. Questions and contributions are welcome! Papers ------ - 2022 `A closer look at TDFA `_ by Angelo Borsotti and Ulya Trofimovich. arXiv:2206.01398 `[pdf 2022] <2022_borsotti_trofimovich_a_closer_look_at_tdfa.pdf>`_ - 2020 `RE2C: A lexer generator based on lookahead-TDFA `_ by Ulya Trofimovich. Software Impacts 6 (2020) 100027, `[pdf 2021] <2020_trofimovich_re2c_a_lexer_generator_based_on_lookahead_tdfa.pdf>`_ - 2019 `Efficient POSIX submatch extraction on NFA `_ by Angelo Borsotti and Ulya Trofimovich. Software: Practice and Experience 51, 2, pp. 159–192 `[pdf 2019] <2019_borsotti_trofimovich_efficient_posix_submatch_extraction_on_nfa.pdf>`_ - 2017 `Tagged Deterministic Finite Automata with Lookahead `_ by Ulya Trofimovich. arXiv:1907.08837, `[pdf 2017] <2017_trofimovich_tagged_deterministic_finite_automata_with_lookahead.pdf>`_ - 1994 `RE2C: a more versatile scanner generator `_ by Peter Bumbulis and Donald D. Cowan. ACM Letters on Programming Languages and Systems (LOPLAS) `[ps 1994] <1994_bumbulis_cowan_re2c_a_more_versatile_scanner_generator.ps>`_ Authors ------- re2c was originally written by Peter Bumbulis (peter@csg.uwaterloo.ca) in 1993. Since then it has been maintained and developed by multiple volunteers, most notably, Brian Young (bayoung@acm.org), Markus Boerger (helly@users.sourceforge.net), Dan Nuffer (nuffer@users.sourceforge.net), `Ulya Trofimovich `_ (skvadrik@gmail.com), `Serghei Iakovlev `_, `Sergei Trofimovich `_, `Petr Skocik `_, `ligfx `_ and `raekye `_. Many thanks to all other contributors! License ------- re2c is in the public domain. The data structures and algorithms used in re2c are all either taken from documents available to the general public or are inventions of the author. Programs generated by re2c may be distributed freely. re2c itself may be distributed freely, in source or binary, unchanged or modified. Distributors may charge whatever fees they can obtain for re2c. If you do make use of re2c, or incorporate it into a larger project an acknowledgment somewhere (documentation, research report, etc.) would be appreciated. re2c is distributed with no warranty whatsoever. The code is certain to contain errors. Neither the author nor any contributor takes responsibility for any consequences of its use. Version ------- This website describes re2c version |version|.