doctrine/lexer

Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 2 minutes ago
Added to GitGenius on September 5th, 2026
Created on January 12th, 2013
Open Issues & Pull Requests: 3 (+0)
GitHub issues: Enabled
Number of forks: 67
Total Stargazers: 11,150 (+0)
Total Subscribers: 20 (+0)

Repository Insights (GitGenius)

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Doctrine Lexer is a base library for building lexers that tokenize input for Top-Down, Recursive Descent Parsers.

The lexer solves the problem of converting raw input strings into a stream of meaningful tokens that parsers can consume. It works by scanning input character by character, recognizing patterns that match defined token types, and emitting tokens with their type, value, and position information. This foundation allows developers to build domain-specific language parsers without implementing lexical analysis from scratch. The tool is actively used within the Doctrine ecosystem itself, powering both the Annotations parser and the DQL query language parser in Doctrine ORM.

Developers should choose this library when building a parser that needs reliable tokenization as a preprocessing step. It suits projects that implement query languages, configuration file parsers, or other domain-specific languages where input must be broken into meaningful units before syntactic analysis. The library is particularly valuable for teams already working within the Doctrine ecosystem or those building similar recursive descent parsers in PHP applications.

The project maintains a stable codebase with focused, targeted updates addressing specific issues and edge cases in tokenization behavior. Development activity shows consistent attention to bug fixes and refinements rather than major feature additions, reflecting the mature nature of a foundational parsing library.