Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 1.78 KB

index.md

File metadata and controls

36 lines (32 loc) · 1.78 KB

Welcome to Dissect!

Dissect is a set of tools for lexical and syntactical analysis written in pure PHP.

This guide assumes that you're already familiar with basic concepts of parsing. Explaining them is beyond the scope of this simple guide, so if you're not, see, for example, this article. This page serves as an index for individual documentation pages.

  1. Lexical analysis with Dissect
    1. SimpleLexer
    2. StatefulLexer
    3. Improving lexer performance
    4. RegexLexer
  2. Parsing with Dissect
    1. Why an LALR(1) parser?
    2. Writing a grammar
    3. Example: Parsing mathematical expressions
    4. Invalid input
    5. Precomputing the parse table
    6. Resolving conflicts
  3. Building an AST
    1. Travesing the AST
  4. Describing common syntactic structures
    1. List of 1 or more Foos
    2. List of 0 or more Foos
    3. A comma separated list
    4. Expressions
  5. The command-line interface
    1. Running the tool
    2. Dumping the parse table in the debug format
    3. Dumping the handle-finding automaton