Skip to content

sftsrv/parz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parz

A simple parser combinator library

Trying to learn Gleam while also Learning about Parser Combinators using The YouTube Series by Low Byte Productions and Understanding Parser Combinators

Package Version Hex Docs

The project exposes the following modules:

  1. parz. - contains the run method which is used for executing a parser
  2. parz/combinators - the parser combinator library
  3. pars/parsers - some simple, prmiitive parsers

Usage

gleam add parz
import parz.{run}
import pars/combinators
import pars/parsers

pub fn main() {
  // For an example usage look at the `tests/sample_parser_test.gleam` file
  let parser = // .. define a parser

  let result = run(parser, content_to_parse)
}

Further documentation can be found at https://hexdocs.pm/parz.

Development

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell