1.0.1 • Published 3 years ago

paco-js v1.0.1

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
3 years ago

paco-js

Parser combinators for the browser

File parsers.js contains an implementation of chainable parser combinators, featuring both applicative and monadic interfaces.

The complete parsers namespace is:

{
  parser,
  charParser,
  digitParser,
  predicateBasedParser,
  pchar,
  pdigit,
  andThen,
  andThenBind,
  orElse,
  fail,
  succeed,
  choice,
  anyOf,
  lowercaseP,
  uppercaseP,
  letterP,
  digitP,
  whiteP,
  fmap,
  returnP,
  applyPx,
  applyP,
  lift2,
  sequenceP,
  sequenceP2,
  pstring,
  stringP,
  zeroOrMore,
  many,
  manyChars,
  many1,
  manyChars1,
  opt,
  optBook,
  discardSecond,
  discardFirst,
  sepBy1Book,
  sepBy1,
  between,
  betweenParens,
  bindP,
  tapP,
  logP,
  pword,
  trimP,
 }

how to use

  • import parsers from 'paco-js';

Test page is here.

Live examples page is here. Open devtools to see how the code works.

NB - with a big credit due to Understanding Parser Combinators and to Paco.

This project is being maintained during Open Source Saturday

1.0.1

3 years ago

1.0.0

3 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago