microparsec

    Dark Mode
Search:
Group by:

Lets

digit: Parser[char] = satisfy(isDigit, ["digit"])
A Parser that consumes a single digit, as recognised by isDigit.   Source Edit
letter: Parser[char] = satisfy(isAlphaAscii, ["letter"])
A Parser that consumes a single letter, as recognised by isAlphaAscii.   Source Edit

Funcs

func map[S, T](parser: Parser[S]; f: S -> T): Parser[T] {...}{.inline.}

Apply a function to the result of a Parser.

This is required in "functor" parsing.

  Source Edit
func `<*>`[S, T](parser0: Parser[proc (i0: S): T]; parser1: Parser[S]): Parser[T] {...}{.
    inline.}

Apply the function parsed by a Parser to the result of another Parser.

This is required in applicative parsing.

  Source Edit
func str(s: string; t = ""): Parser[string] {...}{.inline, raises: [], tags: [].}

Build a Parser that consumes a given string if present.

This function is called string in Parsec, but this conflicts with the type string in Nim.

  Source Edit