taeluf/lexer

A declarative lexer seamlessly hooking into php functions, building ASTs for multiple languages.

v0.8.x-dev 2024-02-03 15:33 UTC

This package is auto-updated.

Last update: 2024-10-03 22:49:30 UTC


README

Lexer

Parse code and other text into structured trees.

The Lexer loops over the characters in a string, and processes them through Grammars to generate Asymmetrical Syntax Trees (AST) - Basically just a multi-dimensional array that describes the code.

Documentation

  • Installation & Getting Started are below
  • Create a Parser - Create a language parser that builds an AST, or modify an existing parser.