A refined, expressive parser combinator library.
npm install terrario

A refined, expressive parser combinator library.
Try it out!
- 📍 Minimal yet powerful APIs
- 🖨 Scannerless parsing
- ⚙ Supports conditional control by state
- ✨ Zero dependency
The Terrario is inspired by PEG.js, Parsimmon, etc.
npm i terrario
`Documentation
See WebsiteBasic Example
`ts
import * as T from 'terrario';// build a parser
const parser = T.alt([
T.str('hello'),
T.str('world'),
T.str(' '),
]).many();
// parse the input string
const input = 'hello world';
const result = parser.parse(input);
console.log(result);
// => { success: true, value: [ 'hello', ' ', 'world' ], index: 11 }
``