Lexer generator for C, C++, D, Go, Haskell, Java, JS, OCaml, Python, Rust, Swift, V and Zig. https://re2c.org
Find a file
dependabot[bot] 55802e3b40 Actions(deps): Bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 11:13:01 +00:00
.github Actions(deps): Bump actions/upload-artifact from 6 to 7 2026-03-02 11:13:01 +00:00
bazel [re2c.bzl] Always pass --no-generation-date 2025-12-23 21:00:53 +00:00
benchmarks Benchmarks(C/C++): use the same benchmark names as filename infixes. 2025-03-18 16:50:44 +00:00
bootstrap Release 4.4. 2025-12-20 20:36:43 +00:00
build Add support for Swift 2025-03-20 22:32:00 +01:00
cmake CMake: align disabled warnings with configure.ac. 2024-11-14 10:55:48 +00:00
doc TDFA paper: apply corrections by https://github.com/Raekye. 2026-01-16 21:50:29 +00:00
examples V backend: more updates in the examples/tests for the new version of V. 2025-12-08 21:21:11 +00:00
fuzz Remove staDFA algorithm. 2022-06-13 21:44:17 +01:00
include Change default implementation of YYEND to be like YYLESSTHAN. 2025-12-17 21:44:14 +00:00
lib Allow $ to be used with any end-of-input handling method. 2025-12-17 21:44:14 +00:00
libre2c_old docs: fix simple typo, otheriwse -> otherwise 2020-12-17 13:53:02 +00:00
src Fix null pointer dereference when actions are used without rules. 2026-02-03 21:33:11 +00:00
test Add tests for #571. 2026-02-03 21:48:21 +00:00
.gitattributes Move and rename backend specific tests. 2024-07-16 06:55:25 +01:00
.gitignore Provide a min viable http://bazel.build integration. 2023-04-27 13:22:59 +01:00
.gitmodules Restructure benchmark layout (prepare to add new benchmarks). 2024-12-11 07:38:40 +00:00
.travis.yml Travis CI: use Ubuntu 20.04 (Focal Fossa) to have Python 3 by default. 2021-07-25 11:08:03 +01:00
add-release.txt Prepare release 0.15: updated release instructions. 2015-11-22 19:48:37 +00:00
autogen.sh autogen.sh: drop dangerous 'git clean -dfx' command 2022-07-05 23:44:22 +01:00
BUILD.bazel support WORKSPACE; use lastest skylib 2025-02-03 09:23:33 +00:00
BUILD.md Make build directory name explicit in the instructions. 2025-04-21 06:46:12 +01:00
CHANGELOG Update CHANGELOG for release 4.4. 2025-12-20 13:14:52 +00:00
CMakeLists.txt Release 4.4. 2025-12-20 20:36:43 +00:00
CMakePresets.json Disable Swift in builds configs that are used for bootstrap and need only C. 2025-04-23 22:32:06 +01:00
configure.ac Release 4.4. 2025-12-20 20:36:43 +00:00
CONTRIBUTING.md Update CONTRIBUTING.md. 2024-10-27 16:07:26 +00:00
IDEAS.md IDEAS.md: fix typo s/inforamtion/information/ 2024-02-26 07:11:34 +00:00
LICENSE Moved LICENSE, README, NO_WARRANTY and CHANGELOG to the root directory. 2019-03-04 17:32:50 +00:00
MAINTAINERS.md Remove TDFA(0) algorithm. 2022-06-13 23:15:50 +01:00
Makefile.am Add support for Swift 2025-03-20 22:32:00 +01:00
Makefile.lib.am Restructure benchmark layout (prepare to add new benchmarks). 2024-12-11 07:38:40 +00:00
MODULE.bazel support WORKSPACE; use lastest skylib 2025-02-03 09:23:33 +00:00
NO_WARRANTY Moved LICENSE, README, NO_WARRANTY and CHANGELOG to the root directory. 2019-03-04 17:32:50 +00:00
README.md Update README.md and BUILD.md. 2022-01-24 07:38:02 +00:00
release.sh release.sh: Add option --ignore-examples. 2025-12-01 22:13:08 +00:00
run_tests.py.in Add support for Swift 2025-03-20 22:32:00 +01:00
sf-cheatsheet Added text file 'sf-cheatsheet' to make some notes about sourceforge administration. 2015-03-26 16:27:21 +00:00
WORKSPACE support WORKSPACE; use lastest skylib 2025-02-03 09:23:33 +00:00
WORKSPACE.bzlmod support WORKSPACE; use lastest skylib 2025-02-03 09:23:33 +00:00

DESCRIPTION

re2c is a free and open-source lexer generator for C/C++, Go and Rust.

Its main goal is generating fast lexers: at least as fast as their reasonably optimized hand-coded counterparts. Instead of using traditional table-driven approach, re2c encodes the generated finite state automata directly in the form of conditional jumps and comparisons. The resulting programs are faster and often smaller than their table-driven analogues, and they are much easier to debug and understand. re2c applies quite a few optimizations in order to speed up and compress the generated code.

Another distinctive feature is its flexible interface: instead of assuming a fixed program template, re2c lets the programmer write most of the interface code and adapt the generated lexer to any particular environment.

DOCUMENTATION

Official re2c website is re2c.org. It has a lot of examples.

DOWNLOAD

Release tarballs: https://github.com/skvadrik/re2c/releases

Source code:

$ git clone https://github.com/skvadrik/re2c.git
$ git clone https://git.code.sf.net/p/re2c/code-git

Github is the main repo, sourceforge is a mirror and can be slightly outdated.

CONTRIBUTING

re2c is an Open Source, community-driven project. See CONTRIBUTING.md for details about contributions to this repository.

BUILD

See BUILD.md or the online docs for instructions how to build re2c.

FEEDBACK

Bugtracker:

Mailing lists:

IRC channels:

  • irc.oftc.net/#re2c
  • irc.libera.chat/#re2c

You are welcome to ask for help or share your thoughts and ideas.

AUTHORS

re2c was originally written by Peter Bumbulis peter@csg.uwaterloo.ca. Since then many volunteers have contributed to the project. The current maintainer is Ulya Trofimovich skvadrik@gmail.com.