Crate parsell [] [src]

Parsell: an LL(1) streaming parser combinator library for Rust

The goal of this library is to provide parser combinators that:

  • are optimized for LL(1) grammars,
  • support streaming input,
  • do as little buffering or copying as possible, and
  • do as little dynamic method dispatch as possible.

It is based on:

Video | Slides | Repo | Crate | CI

Modules

impls

Provide implementations of parser traits.

Structs

InState

A parser that knows its current state.

Enums

ParseResult

The result of parsing

Constants

CHARACTER

A committed parser that reads one character.

Traits

Boxable

A trait for boxable parsers.

Committed

A trait for committed parsers.

CommittedInfer

A trait for committed parsers which can infer their output type from their input types.

Consumer

A trait for consumers of data, typically buffers.

Downcast

A trait for subtyping where conversion downwards is possible (e.g. Cow<'a,str> can be converted to Cow<'static,str>).

Factory

A trait for factories.

Function

A trait for one-argument functions.

HasOutput

A trait for parsers which can infer their output type from their input types.

Parser

A trait for stateless parsers.

PeekableIterator
Stateful

A trait for stateful parsers.

StatefulInfer

A trait for stateful parsers which can infer their output type from their input types.

StatefulStr

A trait for stateful string parsers.

StaticMarker

A marker trait for static data.

ToStatic

A trait for data which can be saved to and restored from long-lived state.

Uncommitted

A trait for uncommitted parsers.

UncommittedInfer

A trait for uncommitted parsers which can infer their output type from their input types.

UncommittedStr

A trait for uncommitted string parsers.

Upcast

A trait for subtyping

VariantFunction

A trait for functions that can compute their inputs from their outputs

Functions

character

An uncommitted parser that reads one character.

character_map

An uncommitted parser that reads one character and applies a function to it.

character_map_ref

An uncommitted parser that reads one character by reference and applies a function to it.

character_ref

An uncommitted parser that reads one character by reference.

emit

A committed parser that reads zero characters.