doctrine/lexer
Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. observed · 2026-08-28
Health v2 · maintenance only
62/100
- Activity 87
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4981
- days_rel: n/a
- days_push: 80
- n_releases_24m: 0
Adoption not part of the score
11146 stars · 65 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A PHP base library providing an abstract lexer for building Top-Down, Recursive Descent Parsers. It tokenizes input strings and is used internally by Doctrine Annotations and Doctrine ORM's DQL parser.
Use cases
- write a custom lexer for a DSL in PHP
- tokenize input strings for a recursive descent parser
- build a query language parser like DQL
- parse annotation syntax in PHP
- walk a string token by token with lookahead
When to choose
- you are building a top-down or recursive descent parser in PHP
- you need a small, battle-tested tokenizer base class
- you are already in the Doctrine ecosystem (ORM, Annotations)
When to avoid
- you need a full parser generator or grammar tool (use ANTLR or similar)
- you need high-performance lexing outside PHP
- you want a ready-made parser for an existing format
Facets
library · maturity stable
parser developer-tools parsers developer-tools programming-languages php lexer tokenizer recursive-descent doctrine dql
9 sources
- readme: https://github.com/doctrine/lexer · fetched 2026-08-28 · c9274d68574e
- homepage: https://www.doctrine-project.org/projects/lexer.html · fetched 2026-08-29 · 0049457f107b
- site_page: https://www.doctrine-project.org/projects/doctrine-lexer/en/3.1/index.html · fetched 2026-08-29 · 762c30c119a7
- site_page: https://www.doctrine-project.org/projects/doctrine-lexer/en/latest/index.html · fetched 2026-08-29 · f66d2975c561
- site_page: https://www.doctrine-project.org/projects/doctrine-lexer/en/2.1/index.html · fetched 2026-08-29 · 82cb6db6f742
- site_page: https://www.doctrine-project.org/projects/doctrine-lexer/en/2.0/index.html · fetched 2026-08-29 · 7d8b4c898481
- site_page: https://www.doctrine-project.org/projects/doctrine-lexer/en/1.2/index.html · fetched 2026-08-29 · 018dd689df94
- site_page: https://www.doctrine-project.org/projects/doctrine-lexer/en/1.1/index.html · fetched 2026-08-29 · 538cca910e27
- site_page: https://www.doctrine-project.org/projects/doctrine-lexer/en/1.0/index.html · fetched 2026-08-29 · 62fb9c0efa68
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| doctrine/lexer | main | 62 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem