Skip to content

cdecompilador/parser-combinators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parser Combinators library in TypeScript

:) coded live at cdecompilador twitch

Examples

Simple usage example

new Pair(new Match("Hello"), new Item()).map((_) => ":)").parse("Hello World");
/*
  This generates:
  {
    state: Result.Ok,
    remainder: "World",
    value: ":)"
  }
*/

Contains simple Json parser implemented with the library as proof of concept

new JsonObject().parse("{'hello': 'world'}");
/*
  This parses JSON and returns a JavaScript object, equivalent to `JSON.parse` :D
*/

About

Parser combinators in typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published