devel/re2c 4.1_1 MidnightBSD
Lexer generator for C, C++ and Go with a focus on generating fast code
- System
- MidnightBSD
- Repository
- mports
- Maintainer
- [email protected]
- License
- publicdom
- Categories
- devel
Description
Re2c is a free and open-source lexer generator for C, C++ and Go 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 algorithm that allows it to perform fast and lightweight submatch extraction.
In the other systems
The newest version among them is 4.6, as upstream numbers it.
| System | Port | Version | Vulnerabilities | Status | Maintainer | Last update |
|---|---|---|---|---|---|---|
| MidnightBSD | devel/re2c | 4.1_1 | no data | - | [email protected] | - |
| FreeBSD | devel/re2c | 4.6 newest | none known | - | [email protected] | 2026-09-09 |
| OpenBSD | devel/re2c | 4.6 newest | no data | - | The OpenBSD ports mailing-list <[email protected]> | 2026-09-03 |
| NetBSD | devel/re2c | 4.6 newest | 1 known | - | [email protected] | 2026-08-30 |
| DragonFly | devel/re2c | 4.1 | none known | - | [email protected] | - |
| HardenedBSD | devel/re2c | 4.6 newest | no data | - | [email protected] | - |
| GhostBSD | devel/re2c | 4.6 newest | no data | - | [email protected] | - |
Install
Binary package:
mport install re2c
From mports:
cd /usr/mports/devel/re2c && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= re2c>0:devel/re2c
LIB_DEPENDS= libre2c.so:devel/re2c
Dependencies
As this port's Makefile names them.
Test 1
bash: shells/bash
Required by 1
Configuration
Options name: devel_re2c
| Option | Default | Description |
|---|---|---|
| EXAMPLES | off |
- USES
- cmake:testing compiler:c++11-lib cpe python:test shebangfix tar:xz
- Service scripts
- none
Files
Manual pages 11
- re2c(1)
- re2d(1)
- re2go(1)
- re2hs(1)
- re2java(1)
- re2js(1)
- re2ocaml(1)
- re2py(1)
- re2rust(1)
- re2v(1)
- re2zig(1)
pkg-plist 543
- bin/re2c
- bin/re2d
- bin/re2go
- bin/re2hs
- bin/re2java
- bin/re2js
- bin/re2ocaml
- bin/re2py
- bin/re2rust
- bin/re2v
- bin/re2zig
- lib/libre2c.so
- share/examples/re2c/c/01_basic.c
- share/examples/re2c/c/01_basic.re
- share/examples/re2c/c/__run_all.sh
- share/examples/re2c/c/conditions/parse_u32_blocks.c
- share/examples/re2c/c/conditions/parse_u32_blocks.re
- share/examples/re2c/c/conditions/parse_u32_conditions.c
- share/examples/re2c/c/conditions/parse_u32_conditions.re
- share/examples/re2c/c/encodings/unicode_identifier.c
- share/examples/re2c/c/encodings/unicode_identifier.re
- share/examples/re2c/c/eof/01_sentinel.c
- share/examples/re2c/c/eof/01_sentinel.re
- share/examples/re2c/c/eof/02_bounds_checking.c
- share/examples/re2c/c/eof/02_bounds_checking.re
- share/examples/re2c/c/eof/03_eof_rule.c
- share/examples/re2c/c/eof/03_eof_rule.re
- share/examples/re2c/c/eof/04_fake_sentinel.c
- share/examples/re2c/c/eof/04_fake_sentinel.re
- share/examples/re2c/c/eof/05_fake_sentinel_eof_rule.c
- share/examples/re2c/c/eof/05_fake_sentinel_eof_rule.re
- share/examples/re2c/c/fill/01_fill.c
- share/examples/re2c/c/fill/01_fill.re
- share/examples/re2c/c/fill/02_fill.c
- share/examples/re2c/c/fill/02_fill.re
- share/examples/re2c/c/generic_api/ifstream.c
- share/examples/re2c/c/generic_api/ifstream.re
- share/examples/re2c/c/headers/header.c
- share/examples/re2c/c/headers/header.re
- share/examples/re2c/c/headers/lexer/state.h
- share/examples/re2c/c/includes/definitions.h
- share/examples/re2c/c/includes/extra_rules.re.inc
- share/examples/re2c/c/includes/include.c
- share/examples/re2c/c/includes/include.re
- share/examples/re2c/c/real_world/cxx98.c
- share/examples/re2c/c/real_world/cxx98.re
- share/examples/re2c/c/reuse/braille.c
- share/examples/re2c/c/reuse/braille.re
- share/examples/re2c/c/reuse/braille.ucs2.txt
- share/examples/re2c/c/reuse/braille.utf16.txt
- share/examples/re2c/c/reuse/braille.utf32.txt
- share/examples/re2c/c/reuse/braille.utf8.txt
- share/examples/re2c/c/reuse/reuse.c
- share/examples/re2c/c/reuse/reuse.re
- share/examples/re2c/c/reuse/usedir.c
- share/examples/re2c/c/reuse/usedir.re
- share/examples/re2c/c/state/push.c
- share/examples/re2c/c/state/push.re
- share/examples/re2c/c/submatch/01_stags.c
- share/examples/re2c/c/submatch/01_stags.re
- share/examples/re2c/c/submatch/01_stags_fill.c
- share/examples/re2c/c/submatch/01_stags_fill.re
- share/examples/re2c/c/submatch/02_mtags.c
- share/examples/re2c/c/submatch/02_mtags.re
- share/examples/re2c/c/submatch/03_captures.c
- share/examples/re2c/c/submatch/03_captures.re
- share/examples/re2c/c/submatch/04_posix_captures.c
- share/examples/re2c/c/submatch/04_posix_captures.re
- share/examples/re2c/c/submatch/http_rfc7230.c
- share/examples/re2c/c/submatch/http_rfc7230.re
- share/examples/re2c/c/submatch/parse_etc_passwd.c
- share/examples/re2c/c/submatch/parse_etc_passwd.re
- share/examples/re2c/c/submatch/parse_options.c
- share/examples/re2c/c/submatch/parse_options.re
- share/examples/re2c/c/submatch/parse_records.c
- share/examples/re2c/c/submatch/parse_records.re
- share/examples/re2c/c/submatch/uri_rfc3986.c
- share/examples/re2c/c/submatch/uri_rfc3986.re
- share/examples/re2c/d/01_basic.d
- share/examples/re2c/d/01_basic.re
- share/examples/re2c/d/__run_all.sh
- share/examples/re2c/d/conditions/parse_u32_blocks.d
- share/examples/re2c/d/conditions/parse_u32_blocks.re
- share/examples/re2c/d/conditions/parse_u32_conditions.d
- share/examples/re2c/d/conditions/parse_u32_conditions.re
- share/examples/re2c/d/encodings/unicode_identifier.d
- share/examples/re2c/d/encodings/unicode_identifier.re
- share/examples/re2c/d/eof/01_sentinel.d
- share/examples/re2c/d/eof/01_sentinel.re
- share/examples/re2c/d/eof/02_bounds_checking.d
- share/examples/re2c/d/eof/02_bounds_checking.re
- share/examples/re2c/d/eof/03_eof_rule.d
- share/examples/re2c/d/eof/03_eof_rule.re
- share/examples/re2c/d/eof/04_fake_sentinel.d
- share/examples/re2c/d/eof/04_fake_sentinel.re
- share/examples/re2c/d/fill/01_fill.d
- share/examples/re2c/d/fill/01_fill.re
- share/examples/re2c/d/fill/02_fill.d
- share/examples/re2c/d/fill/02_fill.re
- share/examples/re2c/d/headers/header.d
The first 100 are listed.
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| re2c-4.1.tar.xz | 1.812048e+06 | cd7d9bbadb3f04f20da25e20e155655de57beef48e0807266938069f0e322e8b |
Master sites 1
- https://github.com/skvadrik/re2c/releases/download/4.1/