Limn  0.1
Classes | Namespaces | Functions | Variables
limn.h File Reference

A tiny parser designed to compile quickly. More...

#include <cctype>
#include <string_view>
#include <functional>
Include dependency graph for limn.h:

Go to the source code of this file.

Classes

class  lm::char_
 Single character parser based on a char. More...
 
class  lm::charset_
 Single character parser for any of several characters. More...
 
class  lm::char_if_
 Single character parser based on a function. More...
 
class  lm::lit_
 String literal parser. More...
 
class  lm::action_< Func >
 Customizable parser. More...
 
class  lm::opt_< Base >
 Zero or one of the match parser, in another word it is an optional item. More...
 

Namespaces

 lm
 The namesapce for all Limn types, functions, and variables.
 

Functions

template<typename Left , typename Right >
constexpr auto lm::operator>> (Left &&left, Right &&right) noexcept
 The sequence parser combinator. More...
 
template<typename Left , typename Right >
constexpr auto lm::operator| (Left &&left, Right &&right) noexcept
 The alternate parser combinator. More...
 
template<typename Parser >
constexpr bool lm::parse (std::string_view input, Parser const &parser, Skipper &skipper=skws) noexcept
 The parse function. More...
 
template<typename Parser >
constexpr bool lm::parse_ref (std::string_view &input, Parser const &parser, Skipper &skipper=skws) noexcept
 The parse function that takes input by reference. More...
 

Variables

static auto lm::alnum_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isalnum(ch); })
 Single character parser based on std::isalnum. More...
 
static auto lm::alpha_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isalpha(ch); })
 Single character parser based on std::isalpha. More...
 
static auto lm::lower_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::islower(ch); })
 Single character parser based on std::islower. More...
 
static auto lm::upper_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isupper(ch); })
 Single character parser based on std::isupper. More...
 
static auto lm::digit_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isdigit(ch); })
 Single character parser based on std::isdigit. More...
 
static auto lm::xdigit_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isxdigit(ch); })
 Single character parser based on std::xdigit. More...
 
static auto lm::cntrl_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::iscntrl(ch); })
 Single character parser based on std::cntrl. More...
 
static auto lm::graph_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isgraph(ch); })
 Single character parser based on std::graph. More...
 
static auto lm::space_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isspace(ch); })
 Single character parser based on std::space. More...
 
static auto lm::blank_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isblank(ch); })
 Single character parser based on std::blank. More...
 
static auto lm::print_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::isprint(ch); })
 Single character parser based on std::print. More...
 
static auto lm::punct_ = char_if_([](char const ch) noexcept -> bool { return 0 != std::ispunct(ch); })
 Single character parser based on std::punct. More...
 
static constexpr auto lm::end_ = impl::endtype_()
 End of input parser. More...
 
static constexpr auto lm::empty_ = impl::emptytype_()
 Empty parser. More...
 

Detailed Description

A tiny parser designed to compile quickly.

Author
Joseph Malle

Inspired by Boost X3. See README.md