Download the PHP package edin/lexicon without Composer
On this page you can find all versions of the php package edin/lexicon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package lexicon
Lexicon
Attribute-driven PHP lexer and parser toolkit.
Lexicon lets you define tokens with PHP enums, parse into typed AST nodes, and inspect tokens, AST shape, and generated BNF-like grammar.
Features
- enum-based token definitions with PHP attributes
- matcher-backed literals, fixed tokens, keywords, symbols, trivia, unknown tokens, and EOF
- trivia preservation with
Token::fullText() - user-defined lexer modes with enter/push/pop transitions
- diagnostics for lexer and parser errors
- recursive descent parser primitives
- attribute grammar recipes:
Terminal,OneOf,Between,Optional,Many,SeparatedBy,SeparatedByRequired,ListBetween,Sequence,Fold - reusable parser extension points with parslets and
#[Parse(...)] - custom parser escape hatch with
ParseableNodeInterface - token table, AST printer, and BNF grammar printer
Install
For local development:
Quick Taste
Generated grammar:
Documentation
- Quick Start
- Token Attributes
- Matchers
- Modes
- Parser Primitives And Recipes
- Debugging Tokens
- Examples
Run Examples
Test
License
MIT
All versions of lexicon with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
The package edin/lexicon contains the following files
Loading the files please wait ...