PHPackages                             kothman/lexer - 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. kothman/lexer

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

kothman/lexer
=============

A lexical analyser.

0.1.2(9y ago)022MITPHP

Since Aug 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/kothman/lexer)[ Packagist](https://packagist.org/packages/kothman/lexer)[ RSS](/packages/kothman-lexer/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Lexer
=====

[](#lexer)

Performs lexical analysis on a string given a set of rules.

Installation
------------

[](#installation)

Via Composer

```
composer require kothman\lexer

```

Usage
-----

[](#usage)

```
$expression = '( 1 + 2 )-3';
$lexer = new Kothman\Lexer\Lexer($expression, Kothman\Lexer\ArithmeticRules::class);
print_r($lexer->getTokens());

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~0 days

Total

3

Last Release

3600d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4342254?v=4)[Morgan Kothman](/maintainers/kothman)[@kothman](https://github.com/kothman)

---

Top Contributors

[![kothman](https://avatars.githubusercontent.com/u/4342254?v=4)](https://github.com/kothman "kothman (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kothman-lexer/health.svg)

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

###  Alternatives

[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46891.8k1](/packages/tonysm-rich-text-laravel)[recca0120/laravel-erd

Laravel ERD automatically generates Entity-Relationship Diagrams from your Laravel models and displays them using Vuerd.

36283.9k](/packages/recca0120-laravel-erd)[openeuropa/oe_content

OpenEuropa Drupal module that contains the EC corporate entity types.

13143.8k13](/packages/openeuropa-oe-content)

PHPackages © 2026

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