PHPackages                             makadev/re2dfa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. makadev/re2dfa

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

makadev/re2dfa
==============

Library for Regular Expression to DFA transformation.

0.1.0(5y ago)23[1 PRs](https://github.com/makadev/php-re2dfa/pulls)MITPHPPHP &gt;=7.4.0

Since Nov 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/makadev/php-re2dfa)[ Packagist](https://packagist.org/packages/makadev/re2dfa)[ RSS](/packages/makadev-re2dfa/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

[![CI Testing](https://github.com/makadev/php-re2dfa/workflows/CI%20Testing/badge.svg)](https://github.com/makadev/php-re2dfa/workflows/CI%20Testing/badge.svg)

php-re2dfa
----------

[](#php-re2dfa)

PHP Library for Regular Expression to DFA transformation.

### What it is

[](#what-it-is)

A Library for transforming [Regular Expressions](https://en.wikipedia.org/wiki/Regular_expression#Formal_language_theory) (RegEx) into [Nondeterministic Finitie Automaton with ɛ-transitions](https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton#NFA_with_%CE%B5-moves) (ɛ-NFA) and [Deterministic Finitie Automaton](https://en.wikipedia.org/wiki/Deterministic_finite_automaton) (DFA) with named final states for the purpose of analyzing and further use the constructed DFA / ɛ-NFA for example in visualizations or to build tokenizer.

### What it's not

[](#what-its-not)

- PCRE compatible
- a fast Regular Expression matching alternative

### Features

[](#features)

- RegEx to ɛ-NFA transformation
- direct ɛ-NFA construction
- transform multiple ɛ-NFA with separate finitie states into a DFA
- ɛ-NFA simulation
- DFA simulation

### planned Features

[](#planned-features)

- DFA minimization (f.e. Moore's partition algorithm)
- DFA and ɛ-NFA output (f.e. dot, json, text)

### internal TODOs

[](#internal-todos)

- add usage examples for the features
- optimizations here and there
- replace stack oriented RegExParser with AST
    - character classes like whitespace (like `:whitespace:`)
    - repetition expression (like `RE{min,max}`, `RE{exact}`)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2003d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6022741?v=4)[Matthias Karbe](/maintainers/makadev)[@makadev](https://github.com/makadev)

---

Top Contributors

[![makadev](https://avatars.githubusercontent.com/u/6022741?v=4)](https://github.com/makadev "makadev (25 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/makadev-re2dfa/health.svg)

```
[![Health](https://phpackages.com/badges/makadev-re2dfa/health.svg)](https://phpackages.com/packages/makadev-re2dfa)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
