PHPackages                             rnapoles/jlex-php-library - 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. rnapoles/jlex-php-library

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

rnapoles/jlex-php-library
=========================

A Lexical Analyzer Generator for PHP

v0.0.1(1y ago)010MITPHPPHP &gt;=7.1.0

Since Sep 7Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/rnapoles/jlex-php-library)[ Packagist](https://packagist.org/packages/rnapoles/jlex-php-library)[ RSS](/packages/rnapoles-jlex-php-library/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

jlex-php-library
================

[](#jlex-php-library)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9d9ebb07bd5b2c2249ae85ec29906ce33c2b0371de19bcb16ab186080bbbca30/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726e61706f6c65732f6a6c65782d7068702d6c6962726172792e7376673f7374796c653d666c6174)](https://packagist.org/packages/rnapoles/jlex-php-library)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/330ed5f833da1d6e0ef29bff97c8b47f145bfc191578450af35f6feb779f2d25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726e61706f6c65732f6a6c65782d7068702d6c6962726172792e7376673f7374796c653d666c6174)](https://packagist.org/packages/rnapoles/jlex-php-library)

JLexPHP: a Lexical Analyzer Generator for PHP, based on JLex. For copyright and licensing information, see the COPYING file.

This is an adaptation of some Java code that generates lexers from lex style input files.

The porting effort was pretty trivial, with the hardest part being the buffer management.

Usage is fairly typical of lexers; you'll want to create a lexer file like this:

The syntax is described [here](http://www.cs.princeton.edu/~appel/modern/java/JLex/current/manual.html).

Requirements
------------

[](#requirements)

Parser that extends [`AbstractLexer`](lib/AbstractLexer.php) requires lexer generated by [JLexPHP](https://github.com/rnapoles/JLexPHP).

Install
-------

[](#install)

Via Composer:

```
composer require rnapoles/jlex-php-library
```

### Examples

[](#examples)

Some examples is contained in the [samples](https://github.com/rnapoles/JLexPHP/tree/main/examples).

Credits
-------

[](#credits)

- [Reinier Nápoles Martínez](https://github.com/rnapoles)
- [Eridan Domoratskiy](https://github.com/ProgMiner)
- [Wez Furlong](http://wezfurlong.org/) is author of [original `JLexPHP`](https://github.com/wez/JLexPHP)
- Elliot Joel Berk and [C. Scott Ananian](http://cscott.net/) is authors of [`JLex`](http://www.cs.princeton.edu/~appel/modern/java/JLex/)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance50

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 91.7% 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

610d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad835b63a44afe75725ed61f4b5c0aa5fbedcd02b70d64a89232e9618f123cb7?d=identicon)[rnapoles](/maintainers/rnapoles)

---

Top Contributors

[![rnapoles](https://avatars.githubusercontent.com/u/682160?v=4)](https://github.com/rnapoles "rnapoles (11 commits)")[![sa-777crew](https://avatars.githubusercontent.com/u/150742339?v=4)](https://github.com/sa-777crew "sa-777crew (1 commits)")

### Embed Badge

![Health badge](/badges/rnapoles-jlex-php-library/health.svg)

```
[![Health](https://phpackages.com/badges/rnapoles-jlex-php-library/health.svg)](https://phpackages.com/packages/rnapoles-jlex-php-library)
```

###  Alternatives

[nativephp/electron

Electron wrapper for the NativePHP framework.

519114.4k8](/packages/nativephp-electron)[kadet/keylighter

Yet another syntax highlighter for PHP

333.2k1](/packages/kadet-keylighter)[code16/formoj

Customizable form renderer

332.6k](/packages/code16-formoj)[nullthoughts/laravel-data-sync

Laravel utility to keep records synced between environments through source control

331.4k](/packages/nullthoughts-laravel-data-sync)

PHPackages © 2026

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