A Pure Ruby LR parser generator

Build the parser.
See how it works.

Turn racc-compatible or extended EBNF grammars into deterministic Ruby parsers, inspectable automata, and diagnostics that explain the conflict—not just its line number.

gem install ibex
calculator.y LALR(1)
rule
  expr : expr '+' term
       | term
  term : term '*' NUMBER
       | NUMBER
end
0expr → • expr '+' term
4expr → expr '+' • term
9expr → expr '+' term •

Grammar in. Ruby parser and reviewable states out.

Why Ibex

A parser generator you can inspect.

Generate the familiar Ruby interface when you need it. Open the machinery when the grammar needs investigation.

Explain the machine

Trace conflicts through states, lookaheads, resolutions, and bounded counterexamples.

Conflict diagnostics

Choose the construction

Compare LALR(1), IELR(1), canonical LR(1), and SLR from the same grammar.

Algorithm guide

Build tooling on stable data

Validate and compare versioned grammar, lexer, automaton, and diagnostic IR.

Architecture and IR

First parser

From install to output in three commands.

  1. 1
    Install Ibexgem install ibex
  2. 2
    Generate Rubyibex -o calculator.rb calculator.y
  3. 3
    Run the parserruby calculator.rb
Follow the calculator tutorial

Private by design

Your grammar stays in your browser.

The playground runs Ibex under ruby.wasm in a dedicated worker. It treats action bodies as source data, never executes them, and makes no server round-trip.

Open the playground

Adopt with clear boundaries

Choose the contract you need.

Stable defaults, opt-in extensions, and research surfaces are documented separately.

Ibex is pre-1.0. The compatible baseline is available now.

Bring one grammar. Leave with a parser you understand.