What is this?
Doctrine Lexer is a base PHP library for building lexers — the components that turn raw text into tokens — for top-down, recursive descent parsers.
Is it a tool I can run, or code I build on?
Code you build on: it is a base library, so you extend it to write the lexer for your own grammar — there is no command to run and no user interface.
How do I get it into my project?
It ships as a Composer package: pull it in with 'composer require doctrine/lexer' — nothing to build or configure on top of that.
Does it bring other dependencies along?
No — the library declares no dependencies of its own; it is a small, self-contained piece of plain PHP.
Where is it actually used in the wild?
Inside the Doctrine ecosystem: it powers the lexer behind Doctrine Annotations and the parser for Doctrine ORM's DQL query language.
What does the lexer do inside Doctrine ORM?
It provides the tokenization layer that lets Doctrine ORM read DQL, its SQL-like query language, so a query can be broken into tokens and parsed before it is executed.
Is the project actively maintained?
It has been on GitHub since 2013, holds about 11k stars, and runs automated CI covering coding standards, Composer lint, static analysis and continuous integration.
What are similar projects?
parsedown, antlr4, PHP-Parser, compromise, nom, pypdf, acwj, acorn
Which topics is it in?
composer, tokenizer, annotations, parsing, text-processing, parser, orm, php, computer-science, compiler, library, developer-tools