View Source Cogito.Primitives (Cogito v1.0.0)

A list of primitive parsers.

The meaning of each parser is derived from the names:

  • chars
  • not_chars
  • word
  • space
  • ws
  • digit
  • natural
  • integer
  • float
  • letter
  • letter_or_digit
  • identifier
  • wrap
  • string

Summary

Functions

chars(codes)

@spec chars([integer()] | String.t() | Range.t()) :: Cogito.parser()

digit()

@spec digit() :: Cogito.parser()

float()

@spec float() :: Cogito.parser()

identifier()

@spec identifier() :: Cogito.parser()

integer()

@spec integer() :: Cogito.parser()

letter()

@spec letter() :: Cogito.parser()

letter_or_digit()

@spec letter_or_digit() :: Cogito.parser()

natural()

@spec natural() :: Cogito.parser()

not_chars(string)

@spec not_chars(String.t()) :: Cogito.parser()

space()

@spec space() :: Cogito.parser()

string()

@spec string() :: Cogito.parser()

word(string)

@spec word(String.t()) :: Cogito.parser()

wrap(parser, left, right)

@spec wrap(Cogito.parser(), String.t(), String.t()) :: Cogito.parser()

ws()

@spec ws() :: Cogito.parser()