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-05-03 21:58:01 UTC


README

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.