Back to flexr

Follow every match.

Edit Ruby, run the real lexer, and inspect its decisions. Source and input stay in your browser.

Run executes Ruby and its actions in a separate worker. Review shared source before running it. Runs stop after five seconds; Stop cancels the worker immediately. Ruby loads only on your first run.
editable
up to 20,000 characters

Choose a preset or write a specification, then select Run.

Tokens
Run a specification to see its token stream.
Diagnostics
Compiler warnings and source locations appear here.
Match decisionsNo scan steps.
Run a specification to inspect its decisions.
DFA
Run a specification to inspect its DFA.
DOT output
Generated Ruby
The real generated scanner appears after a run.
Console output