0.11.0 • Published 9 months ago

terrario v0.11.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Test License: MIT

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.

Installation

npm i terrario

Documentation

See Website

Basic Example

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 }

Examples

License

MIT License

0.10.0-dev.10

9 months ago

0.10.0-dev.11

9 months ago

0.11.0

9 months ago

0.10.0

9 months ago

0.10.0-dev.8

9 months ago

0.10.0-dev.7

9 months ago

0.10.0-dev.9

9 months ago

0.10.0-dev.2

9 months ago

0.10.0-dev.1

9 months ago

0.10.0-dev.4

9 months ago

0.10.0-dev.3

9 months ago

0.10.0-dev.6

9 months ago

0.10.0-dev.5

9 months ago

0.11.0-dev.2

9 months ago

0.9.0

10 months ago

0.8.1

10 months ago

0.8.0

10 months ago

0.11.0-dev.1

9 months ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago