Tokeko

An LR(1) and LALR parser visualizer.

About Tokeko

Tokeko builds an LR(1) or LALR parser from a grammar you write in the browser. Grammars can include terminals, non-terminals and tokens defined with regular expressions.

You can inspect the FIRST and FOLLOW sets, automaton states and transitions, and ACTION and GOTO tables. Enter an input string to follow the parse one step at a time and see the resulting tree.

The parser generator is dotlr, a Rust library also available on npm as @specy/dotlr.

Features

LR(1) and LALR parsers

Build either parser from the same grammar and compare the results.

FIRST and FOLLOW sets

Inspect the FIRST and FOLLOW sets for the symbols in your grammar.

Automaton

View parser states and transitions in a table or graph.

ACTION and GOTO tables

Inspect the actions and state transitions the parser uses for each input symbol.

Parsing steps and parse tree

Follow the state stack, symbol stack and remaining input at each step. Select a step for details, or inspect the final parse tree.

Editor and TypeScript runner

The grammar editor includes completion and error messages. Run TypeScript code in the app to work with the parser and its output.

Other apps