re2c  1.3
About: re2c is a preprocessor that generates C-based recognizers from regular expressions.
  Fossies Dox: re2c-1.3.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

re2c Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies
  4. re2c-1.3.tar.xz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).


re2c is a free and open-source lexer generator for C and C++.

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.


Official re2c website is


Release tarballs:

Source code:

$ git clone
$ git clone

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


The simplest possible way to build re2c is this:

$ ./configure [--prefix=<prefix>]
$ make
$ make install

See the official documantation for full details on more sophisticated build types. If you want to build from git, you will first need to generate autotools files:

$ ./


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


Please report any bugs and send feature requests to


Re2c was originally written by Peter Bumbulis Since then many people contributed to the project. Current maintainers are Ulya Trofimovich and Dan Nuffer