Microparsec Versions Save

⭐ A performant Nim parsing library built for humans.

v0.1-alpha

2 years ago

This is the first release of Microparsec, a performant Nim parsing library built for humans. This release mostly implements features from Attoparsec. This supports Nim 1.2.6+ and can be installed using Nimble:

$ nimble install microparsec

The basic design consists of wrapping a stream (from the standard streams library) to hold a state as we parse. All parsers then use this wrapped interface, so that the state is always in sync.

The error messages are heavily inspired by Megaparsec.

Some notable features

  • Changed project name to Microparsec (#1)
  • Implemented a stream wrapper (#10)
  • Added good error messages, inspired by Megaparsec (#14)
  • Implemented debugParse (#19)
  • Implemented character parsers from Attoparsec (#35):
    • satisfy (#38)
    • skip
    • satisfyWith
    • anyChar
    • ch (Attoparsec: char) (#20)
    • notChar
    • peekCh (Attoparsec: peekChar)
    • peekChF (Attoparsec: peekChar')
    • digit
    • letter
    • space
    • inClass
    • notInClass
  • Implemented parser combinators from Attoparsec (#26):
    • attempt (Attoparsec: try)
    • <?>
    • choice
    • count
    • option
    • many (#20)
    • many1
    • manyTil
    • sepBy
    • sepBy1
    • skipMany
    • skipMany1
    • match
  • Implemented other generic combinators and parsers:
    • <|> (#20)
    • str (Attoparsec: string) (#2)
    • eof
    • optional
    • between (#20)
  • Implemented other functions:
    • flatMap (#20)
    • map (#7, #20)
  • Added identifier to the documentation (#4)