Installation

How to install Galore

Installation

npm / pnpm / yarn

# npm
npm install galore

# pnpm
pnpm add galore

# yarn
yarn add galore

Browser (CDN)

<script src="https://unpkg.com/galore/dist/galore.min.js"></script>

TypeScript

Galore includes TypeScript type definitions out of the box. No additional @types package needed.

import * as G from "galore";

const parser = G.newParser(`
  Expr -> Expr "+" Term | Term
  Term -> NUMBER
  NUMBER -> /[0-9]+/
`, { type: "lalr" });

const result = parser.parse("1 + 2");

Requirements

  • Node.js 14+ (for Node.js usage)
  • Modern browser with ES2015+ support (for browser usage)

Next Steps

Now that you have Galore installed, check out: