[][src]Crate sexpy

Structs

VerboseError

this error type accumulates errors and their position when backtracking through a parse tree. With some post processing (cf examples/json.rs), it can be used to display user friendly error messages

Enums

Err

The Err enum indicates the parser was not successful

Traits

Sexpy

Functions

alpha1

Recognizes one or more lowercase and uppercase ASCII alphabetic characters: a-z, A-Z

alphanumeric0

Recognizes zero or more ASCII numerical and alphabetic characters: 0-9, a-z, A-Z

alt

tests a list of parsers one by one until one succeeds

context

create a new error from an input position, a static string and an existing error. This is used mainly in the context combinator, to add user friendly information to errors when backtracking through a parse tree

convert_error

transforms a VerboseError into a trace with input position information

digit1

Recognizes one or more ASCII numerical characters: 0-9

head

Parses a head pattern. Takes a string head_tag and a parser, inner and creates a parser for [head tag inner]

many0

Repeats the embedded parser until it fails and returns the results in a Vec.

multispace0

Recognizes zero or more spaces, tabs, carriage returns and line feeds.

multispace1

Recognizes one or more spaces, tabs, carriage returns and line feeds.

opt

optional parser: will return None if not successful

preceded

Matches an object from the first parser and discards it, then gets an object from the second parser.

surround

Create a parser that surrounds whatever inner parses with brackets or parentheses

tag

Recognizes a pattern

tuple

applies a tuple of parsers one by one and returns their results as a tuple

Type Definitions

IResult

Holds the result of parsing functions

Derive Macros

Sexpy