Galore

A toolbox for language analyzers and parser generators

Build parsers for custom languages with support for SLR, LALR, and LR(1) parsing algorithms. Interactive playground included.

Multiple Parser Types

Support for SLR, LALR, and LR(1) parsing algorithms. Choose the right parser for your grammar.

Interactive Playground

Test your grammars in real-time with our interactive playground. See parse trees and parse tables instantly.

TypeScript Native

Written in TypeScript with full type definitions. Works in Node.js and browsers.

Quick Example

import * as G from "galore";

// Define a simple arithmetic grammar
const grammar = `
  Expr -> Expr "+" Term | Term
  Term -> Term "*" Factor | Factor
  Factor -> "(" Expr ")" | NUMBER
`;

// Create a parser
const parser = G.newParser(grammar, { type: "lalr" });

// Parse input
const result = parser.parse("1 + 2 * 3");
console.log(result);