Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
marihachi committed Aug 6, 2022
2 parents 55794b4 + 9ab6596 commit 6cfd4ec
Show file tree
Hide file tree
Showing 13 changed files with 365 additions and 289 deletions.
27 changes: 19 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,33 @@
-->

## 0.6.0 (2022/08/06)

### Changes
- Improves type inference
- T.seq (#8 by @ThinaticSystem)
- T.alt
- Improves type declaration
- T.regexp
- T.sep
- T.notMatch

## 0.5.0 (2022/08/02)

### Features
- Add api: P.eof
- Add api: P.cond
- Add api: P.succeeded
- Add api: T.eof
- Add api: T.cond
- Add api: T.succeeded

## 0.4.0 (2022/07/24)

### Features
- Add api: parser.parse
- Add api: P.match
- Add api: P.lazy
- Add api: T.match
- Add api: T.lazy

### Changes
- Change api: parser.sep(separator, min) -> P.sep(item, separator, min)
- Change api: parser.sep(separator, min) -> T.sep(item, separator, min)

## 0.3.0 (2022/07/18)

Expand All @@ -35,13 +46,13 @@

### Changes
- Change api: parser.sep1(separator) -> parser.sep(separator, min)
- Change api: P.option(parser) -> parser.option()
- Change api: T.option(parser) -> parser.option()

## 0.2.0 (2022/07/17)

### Changes
- Rename api: parser.atLeast(n) -> parser.many(min)
- Rename api: P.any -> P.char
- Rename api: T.any -> T.char

## 0.1.0 (2022/07/16)

Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Terrario
A simple parser-combinator library with TypeScript.
[Try it out!](https://npm.runkit.com/terrario)
<h1><img src="https://github.com/marihachi/terrario/blob/develop/assets/terrario-logo.svg?raw=true" alt="Terrario" width="230px" /></h1>

[![Test](https://github.com/marihachi/terrario/actions/workflows/test.yml/badge.svg)](https://github.com/marihachi/terrario/actions/workflows/test.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

<img alt="Terrario" src="https://github.com/marihachi/terrario/blob/develop/assets/terrario-logo.png?raw=true" />
A simple parser combinator library with TypeScript.
[Try it out!](https://npm.runkit.com/terrario)

- 📍Simple APIs
- ⚙Supports conditional branching by state
- ✨Zero dependency
- 📍 Simple APIs
- 🖨 Scannerless parsing
- ⚙ Supports conditional branching by state
- ✨ Zero dependency

The Terrario is inspired by PEG.js, Parsimmon, etc.

[![NPM](https://nodei.co/npm/terrario.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/terrario)
**Notice:**
**This library is under development.**
**The API may change without notice, and the behavior may be unstable.**

## Installation
```
Expand All @@ -25,13 +27,13 @@ npm i terrario

## Basic Example
```ts
import * as P from 'terrario';
import * as T from 'terrario';

// build a parser
const parser = P.alt([
P.str('hello'),
P.str('world'),
P.str(' '),
const parser = T.alt([
T.str('hello'),
T.str('world'),
T.str(' '),
]).many(0);

// parse the input string
Expand Down
Binary file removed assets/terrario-logo.png
Binary file not shown.
15 changes: 15 additions & 0 deletions assets/terrario-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6cfd4ec

Please sign in to comment.