Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
lexy Namespace Reference

Namespaces

 _detail
 
 _unicode_db
 
 parse_events
 
 placeholders
 

Classes

struct  _acfr
 
struct  _as_aggregate
 
struct  _as_string
 
struct  _bit_cast
 
struct  _bound_cb
 
struct  _bound_sink
 
class  _br
 
struct  _callback
 
struct  _callback_with_state
 
struct  _cb_from_sink
 
class  _collect
 
class  _collect_sink
 
class  _collect_sink< void, Callback >
 
struct  _collection
 
struct  _collection_alloc
 
struct  _collection_sink
 
struct  _compose_cb
 
struct  _compose_s
 
struct  _compose_state
 
struct  _compose_state< Cb, State, std::enable_if_t< lexy::is_callback_state< Cb, State > > >
 
struct  _concat
 
struct  _constant
 
struct  _construct
 
struct  _construct< void >
 
struct  _deduce_encoding
 
struct  _deduce_encoding< char >
 
struct  _deduce_encoding< char16_t >
 
struct  _deduce_encoding< char32_t >
 
struct  _deduce_encoding< std::byte >
 
struct  _deduce_encoding< unsigned char >
 
struct  _default
 
struct  _fn_holder
 
struct  _fold
 
struct  _fold_sfinae
 
struct  _fold_sfinae< false >
 
struct  _fold_sfinae< true >
 
struct  _fwd
 
struct  _fwd< void >
 
struct  _int
 
struct  _list
 
struct  _list_alloc
 
struct  _list_sink
 
struct  _make_buffer
 
struct  _make_buffer< utf16_encoding, encoding_endianness::bom >
 
struct  _make_buffer< utf32_encoding, encoding_endianness::bom >
 
struct  _make_buffer< utf8_char_encoding, encoding_endianness::bom >
 
struct  _make_buffer< utf8_encoding, encoding_endianness::bom >
 
struct  _mem_fn
 
struct  _mem_fn< MemFn T::* >
 
struct  _mem_fn_traits
 
struct  _mem_ptr_fn
 
class  _mh
 
struct  _new
 
struct  _noop
 
struct  _nth_value
 
struct  _nth_value< N, T, void >
 
struct  _nth_value< N, void, Fn >
 
struct  _nth_value< N, void, void >
 
struct  _op
 
struct  _opv
 
struct  _overloaded
 
struct  _parse_state
 
struct  _parse_state< void >
 
struct  _parse_tree_eof
 
struct  _partial_input
 
struct  _pb
 
struct  _pc
 
class  _ph
 
class  _pt_node
 
class  _pt_node_kind
 
class  _pth
 
class  _ptr
 
struct  _read_file_user_data
 
class  _rr
 
struct  _scp
 
struct  _scp< void >
 
struct  _sfinae_sink
 
struct  _sign
 
struct  _sink_wrapper
 
struct  _subgrammar
 
struct  _sucfr
 
struct  _sucfr32
 
struct  _sucfrm
 
class  _symbol_table
 
class  _th
 
struct  _tk_map
 
struct  _tk_map_empty
 
struct  _validate_callbacks
 
class  _vh
 
class  argv_input
 
class  argv_iterator
 An iterator over the command-line arguments. More...
 
class  argv_sentinel
 A sentinel for the command-line arguments. More...
 
struct  ascii_encoding
 
struct  bounded
 
class  buffer
 
struct  byte_encoding
 An encoding where the input is just raw bytes, not characters. More...
 
class  byte_location_counting
 Counts bytes for columns, lines end after LineWidth bytes. More...
 
struct  cfile_output_iterator
 
class  code_point
 A unicode code point. More...
 
class  code_point_location_counting
 Counts code points for columns, newlines for lines. More...
 
class  code_unit_location_counting
 Counts code units for columns, newlines for lines. More...
 
struct  combination_duplicate
 
struct  continuation_branch_parser
 A branch parser that parses a branch rule but with a special continuation. More...
 
struct  default_encoding
 An encoding where the input is some 8bit encoding (ASCII, UTF-8, extended ASCII etc.). More...
 
struct  different_identifier
 
struct  duplicate_flag
 
class  error
 Generic failure. More...
 
class  error< Reader, expected_char_class >
 
class  error< Reader, expected_keyword >
 
class  error< Reader, expected_literal >
 
class  error< Reader, void >
 Type erased generic failure. More...
 
class  error_context
 Contains information about the context of an error, production is type-erased. More...
 
struct  exhausted_choice
 
struct  expected_char_class
 Expected a character of the specified character class. More...
 
struct  expected_eof
 
struct  expected_keyword
 
struct  expected_literal
 Expected the literal character sequence. More...
 
struct  expected_literal_set
 
struct  expected_newline
 
struct  expected_production_end
 
struct  expected_token_end
 
struct  expression_production
 
struct  follow_restriction
 
struct  forbidden_leading_zero
 
struct  input_line_annotation
 
class  input_location
 A location in the input. More...
 
struct  input_location_anchor
 Anchor for the location search. More...
 
struct  integer_overflow
 
struct  integer_traits
 
struct  integer_traits< bounded< T, Max > >
 
struct  integer_traits< code_point >
 
struct  integer_traits< unbounded< T > >
 
struct  invalid_code_point
 
struct  invalid_code_unit
 
struct  invalid_escape_sequence
 
class  lexeme
 
class  lexeme_input
 
struct  lookahead_failure
 We've failed to match a lookahead. More...
 
struct  match_action
 
struct  max_operator_nesting_exceeded
 
struct  max_recursion_depth_exceeded
 
struct  member
 
struct  minus_sign
 
struct  mismatched_byte_count
 
struct  missing_delimiter
 The reader ends before the closing delimiter was found. More...
 
struct  missing_token
 
struct  nullopt
 
struct  operator_chain_error
 
struct  operator_group_error
 
struct  parse_action
 
struct  parse_as_tree_action
 
class  parse_result
 
class  parse_tree
 
class  parse_tree_encoding
 
class  parse_tree_input
 
struct  parse_tree_input_traits
 
struct  pattern_parser
 A parser that does not support any arguments. More...
 
struct  peek_failure
 We've failed to match a peek. More...
 
struct  plus_sign
 
struct  production_info
 
class  production_value_callback
 
class  range_input
 
class  read_file_result
 
struct  reserved_identifier
 Error when we matched a reserved. More...
 
class  rule_scanner
 
struct  scan_failed_t
 
struct  scan_production
 
class  scan_result
 
class  scan_result< void >
 
class  scanner
 
struct  sink_finish_parser
 A parser that finishes a sink and continues with the next one. More...
 
struct  sink_parser
 A parser that forwards all arguments to a sink, which is the first argument. More...
 
struct  stderr_output_iterator
 
struct  stdout_output_iterator
 
class  string_input
 An input that refers to a string. More...
 
struct  subexpression_production
 
class  token
 A parsed token, i.e. its kind and its lexeme. More...
 
class  token_kind
 What sort of token it is. More...
 
struct  token_production
 
struct  trace_action
 
struct  transparent_production
 
struct  unbounded
 
struct  unconditional_branch_parser
 A branch parser that takes a branch unconditionally and forwards to the regular parser. More...
 
struct  unequal_counts
 
struct  unexpected
 We've failed to match a peek not. More...
 
struct  unexpected_trailing_separator
 
struct  unknown_symbol
 
struct  utf16_encoding
 An encoding where the input is assumed to be valid UTF-16. More...
 
struct  utf32_encoding
 An encoding where the input is assumed to be valid UTF-32. More...
 
struct  utf8_char_encoding
 An encoding where the input is assumed to be valid UTF-8, but the char type is char. More...
 
struct  utf8_encoding
 An encoding where the input is assumed to be valid UTF-8. More...
 
struct  validate_action
 
class  validate_result
 
struct  visualization_options
 Options that control visualization. More...
 
struct  whitespace_parser
 
struct  whitespace_parser< Context, NextParser, void >
 

Typedefs

using _char8_t = unsigned char
 
template<typename Input >
using _default_location_counting = decltype(_compute_default_location_counting< Input >())
 
template<typename Container >
using _detect_append = decltype(LEXY_DECLVAL(Container &).append(LEXY_DECLVAL(Container &&)))
 
template<typename T >
using _detect_callback = typename T::return_type
 
template<typename T , typename... Args>
using _detect_callback_for = decltype(LEXY_DECLVAL(const T)(LEXY_DECLVAL(Args)...))
 
template<typename T , typename State >
using _detect_callback_state = decltype(LEXY_DECLVAL(const T)[LEXY_DECLVAL(State &)])
 
template<typename T , typename State , typename... Args>
using _detect_callback_with_state_for = decltype(LEXY_DECLVAL(const T)[LEXY_DECLVAL(State &)](LEXY_DECLVAL(Args)...))
 
template<typename Input >
using _detect_input_data = decltype(LEXY_DECLVAL(Input &).data())
 
template<typename Production >
using _detect_max_recursion_depth = decltype(Production::max_recursion_depth)
 
template<typename T >
using _detect_optional_like = decltype(T(), *LEXY_DECLVAL(T &), !LEXY_DECLVAL(const T &))
 
template<typename Input >
using _detect_parent_input = decltype(LEXY_DECLVAL(Input).parent_input())
 
template<typename Container >
using _detect_reserve = decltype(LEXY_DECLVAL(Container &).reserve(std::size_t()))
 
template<typename T , typename... Args>
using _detect_sink = decltype(LEXY_DECLVAL(const T).sink(LEXY_DECLVAL(Args)...).finish())
 
template<typename T , typename... Args>
using _detect_sink_callback_for = decltype(LEXY_DECLVAL(T &)(LEXY_DECLVAL(Args)...))
 
template<typename Production >
using _detect_value = decltype(Production::value)
 
template<typename ParseState , typename Production >
using _detect_value_of = typename decltype(LEXY_DECLVAL(ParseState &).value_of(Production{}))::return_type
 
template<typename Production >
using _detect_whitespace = decltype(Production::whitespace)
 
template<typename T >
using _enable_production_or_operation = std::enable_if_t< is_production< T >||is_operation< T > >
 
template<typename Callback >
using _error_sink_t = decltype(_get_error_sink(LEXY_DECLVAL(Callback)))
 
template<typename Fn >
using _fn_as_base = std::conditional_t< std::is_class_v< Fn >, Fn, _fn_holder< Fn > >
 
template<typename Handler , typename State , typename Production >
using _production_value_type = typename Handler::template value_callback< Production, State >::return_type
 
template<typename String >
using _string_char_type = LEXY_DECAY_DECLTYPE(LEXY_DECLVAL(String)[0])
 
template<typename View >
using _string_view_char_type = LEXY_DECAY_DECLTYPE(*LEXY_DECLVAL(View).data())
 
template<typename Production , typename Action >
using _subgrammar_for = _subgrammar< Production, typename Action::handler, typename Action::state, lexy::input_reader< typename Action::input > >
 
template<typename Reader >
using _sucfr_for = std::conditional_t< std::is_same_v< typename Reader::encoding, lexy::utf32_encoding >, _sucfr32< Reader >, _sucfrm< Reader > >
 
template<typename Production >
using _whitespace_production_of = std::conditional_t< _production_defines_whitespace< Production >, Production, void >
 
template<typename Tag , typename Encoding = default_encoding>
using argv_error = error_for< argv_input< Encoding >, Tag >
 
template<typename Encoding = default_encoding>
using argv_error_context = error_context< argv_input< Encoding > >
 
template<typename Encoding = default_encoding>
using argv_lexeme = lexeme_for< argv_input< Encoding > >
 
template<typename BranchRule , typename Reader >
using branch_parser_for = typename BranchRule::template bp< Reader >
 
template<typename Tag , typename Encoding = default_encoding, typename MemoryResource = void>
using buffer_error = error_for< buffer< Encoding, MemoryResource >, Tag >
 
template<typename Encoding = default_encoding, typename MemoryResource = void>
using buffer_error_context = error_context< buffer< Encoding, MemoryResource > >
 
template<typename Encoding = default_encoding, typename MemoryResource = void>
using buffer_lexeme = lexeme_for< buffer< Encoding, MemoryResource > >
 
template<typename CharT >
using deduce_encoding = typename _deduce_encoding< CharT >::type
 
template<typename Input , typename Tag >
using error_for = error< input_reader< Input >, Tag >
 
template<typename Input >
using input_reader = decltype(LEXY_DECLVAL(Input).reader())
 
template<typename Input >
using lexeme_for = lexeme< input_reader< Input > >
 
template<auto Ptr>
using make_member_ptr = member< _mem_ptr_fn< Ptr > >
 
template<const auto & Operator>
using op = typename LEXY_DECAY_DECLTYPE(Operator)::op_tag_type
 
template<typename Tag , typename Node >
using parse_tree_error = error_for< parse_tree_input< Node >, Tag >
 
template<typename Node >
using parse_tree_error_context = error_context< parse_tree_input< Node > >
 
template<typename Input , typename TokenKind = void, typename MemoryResource = void>
using parse_tree_for = lexy::parse_tree< lexy::input_reader< Input >, TokenKind, MemoryResource >
 
template<typename Node >
using parse_tree_lexeme = lexeme_for< parse_tree_input< Node > >
 
template<typename Rule , typename NextParser >
using parser_for = typename Rule::template p< NextParser >
 
template<typename Production , typename Reader >
using production_branch_parser = _pb< Production, Reader >
 
template<typename Production >
using production_rule = LEXY_DECAY_DECLTYPE(Production::rule)
 
template<typename Production , typename WhitespaceProduction >
using production_whitespace = decltype(_production_whitespace< Production, WhitespaceProduction >())
 
template<typename Sink , typename... Args>
using sink_callback = decltype(LEXY_DECLVAL(Sink).sink(LEXY_DECLVAL(Args)...))
 Returns the type of the .sink() function. More...
 
template<typename Tag , typename Encoding = default_encoding>
using string_error = error_for< string_input< Encoding >, Tag >
 
template<typename Encoding = default_encoding>
using string_error_context = error_context< string_input< Encoding > >
 
template<typename Encoding = default_encoding>
using string_lexeme = lexeme_for< string_input< Encoding > >
 
template<typename Input , typename TokenKind = void>
using token_for = token< lexy::input_reader< Input >, TokenKind >
 
template<typename TokenRule , typename Reader >
using token_parser_for = typename TokenRule::template tp< Reader >
 

Enumerations

enum  encoding_endianness { encoding_endianness::little, encoding_endianness::big, encoding_endianness::bom }
 The endianness used by an encoding. More...
 
enum  file_error { file_error::_success, file_error::os_error, file_error::file_not_found, file_error::permission_denied }
 Errors that might occur while reading the file. More...
 
enum  predefined_token_kind : std::uint_least16_t {
  unknown_token_kind = UINT_LEAST16_MAX, error_token_kind = UINT_LEAST16_MAX - 1, whitespace_token_kind = UINT_LEAST16_MAX - 2, any_token_kind = UINT_LEAST16_MAX - 3,
  literal_token_kind = UINT_LEAST16_MAX - 4, position_token_kind = UINT_LEAST16_MAX - 5, eof_token_kind = UINT_LEAST16_MAX - 6, identifier_token_kind = UINT_LEAST16_MAX - 7,
  digits_token_kind = UINT_LEAST16_MAX - 8, _smallest_predefined_token_kind = digits_token_kind
}
 
enum  traverse_event { traverse_event::enter, traverse_event::exit, traverse_event::leaf }
 
enum  visualization_flags {
  visualize_default = 0, visualize_use_unicode = 1 << 0, visualize_use_color = 1 << 1, visualize_use_symbols = 1 << 2,
  visualize_fancy = visualize_use_unicode | visualize_use_color | visualize_use_symbols, visualize_space = 1 << 3
}
 

Functions

template<typename Encoding >
constexpr auto _buffer_reader (const typename Encoding::char_type *data)
 
template<typename Input >
auto _compute_default_location_counting ()
 
template<typename Integer >
constexpr std::size_t _digit_count (int radix, Integer value)
 
template<typename Handler , typename State , typename Production , typename Reader >
constexpr auto _do_action (_pc< Handler, State, Production > &context, Reader &reader)
 
template<typename Callback >
constexpr auto _get_error_sink (const Callback &callback)
 
template<typename Input >
constexpr void _get_input_line_annotation (input_line_annotation< Input > &result, lexy::lexeme_for< Input > line, lexy::lexeme_for< Input > newline, typename lexy::input_reader< Input >::iterator begin, typename lexy::input_reader< Input >::iterator end)
 
template<typename... Op>
constexpr auto _make_overloaded (Op &&... op)
 
template<typename Production , typename WhitespaceProduction >
auto _production_whitespace ()
 
template<typename Encoding , typename Iterator , typename Sentinel >
constexpr auto _range_reader (Iterator begin, Sentinel end)
 
constexpr argv_iterator argv_begin (int argc, char *argv[]) noexcept
 Returns an iterator to the beginning of the command-line arguments. More...
 
constexpr argv_iterator argv_end (int argc, char *argv[]) noexcept
 Returns an iterator one past the end of the command-line arguments. More...
 
 argv_input (int argc, char *argv[]) -> argv_input<>
 
template<typename Callback , typename... BoundArgs>
constexpr auto bind (Callback &&callback, BoundArgs &&... args)
 Binds the operator() of the callback with pre-defined/remapped values. More...
 
template<typename Sink , typename... BoundArgs>
constexpr auto bind_sink (Sink &&sink, BoundArgs &&... args)
 
template<typename CharT >
 buffer (const CharT *, const CharT *) -> buffer< deduce_encoding< CharT >>
 
template<typename CharT , typename MemoryResource >
 buffer (const CharT *, const CharT *, MemoryResource *) -> buffer< deduce_encoding< CharT >, MemoryResource >
 
template<typename CharT >
 buffer (const CharT *, std::size_t) -> buffer< deduce_encoding< CharT >>
 
template<typename CharT , typename MemoryResource >
 buffer (const CharT *, std::size_t, MemoryResource *) -> buffer< deduce_encoding< CharT >, MemoryResource >
 
template<typename View >
 buffer (const View &) -> buffer< deduce_encoding< LEXY_DECAY_DECLTYPE(*LEXY_DECLVAL(View).data())>>
 
template<typename View , typename MemoryResource >
 buffer (const View &, MemoryResource *) -> buffer< deduce_encoding< LEXY_DECAY_DECLTYPE(*LEXY_DECLVAL(View).data())>, MemoryResource >
 
template<typename... Fns>
constexpr auto callback (Fns &&... fns)
 Creates a callback. More...
 
template<typename ReturnType , typename... Fns>
constexpr auto callback (Fns &&... fns)
 
template<typename Sink , typename = lexy::sink_callback<Sink>>
constexpr auto callback (Sink &&sink)
 Creates a callback that forwards all arguments to the sink. More...
 
template<typename... Fns>
constexpr auto callback_with_state (Fns &&... fns)
 Creates a callback that also receives the parse state. More...
 
template<typename ReturnType , typename... Fns>
constexpr auto callback_with_state (Fns &&... fns)
 
template<typename Callback >
constexpr auto collect (Callback &&callback)
 
template<typename Container , typename Callback >
constexpr auto collect (Callback &&callback)
 Returns a sink that invokes the callback multiple times, storing each result in the container. More...
 
template<typename Arg >
LEXY_CONSTEVAL auto constant (Arg &&value)
 Creates a callback that produces the given value without accepting arguments. More...
 
template<typename Production , template< typename > typename Result, typename Handler , typename State , typename Reader >
constexpr auto do_action (Handler &&handler, State *state, Reader &reader)
 
template<typename T , typename Arg = T, typename... Op>
constexpr auto fold (Arg &&init, Op &&... op)
 Sink that folds all the arguments with the binary operation op. More...
 
template<typename T , typename Arg = T, typename... Op>
constexpr auto fold_inplace (Arg &&init, Op &&... op)
 
template<typename Input , typename Counting >
constexpr auto get_input_line_annotation (const Input &input, const input_location< Input, Counting > &begin_location, typename lexy::input_reader< Input >::iterator end) -> input_line_annotation< Input >
 
template<typename Input , typename Counting >
constexpr auto get_input_line_annotation (const Input &input, const input_location< Input, Counting > &location, std::size_t size)
 Computes the annotation for e.g. an error message covering [location, location + size). More...
 
template<typename Counting , typename Input >
constexpr auto get_input_location (const Input &input, typename lexy::input_reader< Input >::iterator position)
 
template<typename Input >
constexpr auto get_input_location (const Input &input, typename lexy::input_reader< Input >::iterator position)
 
template<typename Input >
constexpr auto get_input_location (const Input &input, typename lexy::input_reader< Input >::iterator position, input_location_anchor< Input > anchor)
 
template<typename Counting , typename Input >
constexpr auto get_input_location (const Input &input, typename lexy::input_reader< Input >::iterator position, input_location_anchor< Input > anchor) -> input_location< Input, Counting >
 The location for a position in the input; search starts at the anchor. More...
 
template<typename Reader >
 lexeme (const Reader &, typename Reader::iterator) -> lexeme< typename Reader::canonical_reader >
 
 LEXY_INSTANTIATION_NEWTYPE (_br32, _br, lexy::utf32_encoding)
 
 LEXY_INSTANTIATION_NEWTYPE (_br8, _br, lexy::utf8_encoding)
 
 LEXY_INSTANTIATION_NEWTYPE (_bra, _br, lexy::ascii_encoding)
 
 LEXY_INSTANTIATION_NEWTYPE (_brc, _br, lexy::utf8_char_encoding)
 
template<typename Encoding >
 LEXY_INSTANTIATION_NEWTYPE (_pr, _rr, Encoding, const typename Encoding::char_type *)
 
 LEXY_INSTANTIATION_NEWTYPE (_pr8, _pr, lexy::utf8_encoding)
 
 LEXY_INSTANTIATION_NEWTYPE (_prb, _pr, lexy::byte_encoding)
 
 LEXY_INSTANTIATION_NEWTYPE (_prc, _pr, lexy::utf8_char_encoding)
 
 LEXY_INSTANTIATION_NEWTYPE (_prd, _pr, lexy::default_encoding)
 
template<typename Input , typename MemoryResource = void>
constexpr auto make_buffer_from_input (const Input &input, MemoryResource *resource=_detail::get_memory_resource< MemoryResource >()) -> buffer< typename input_reader< Input >::encoding, MemoryResource >
 
template<typename Production , typename Input >
constexpr bool match (const Input &input)
 
template<typename Production , typename Input , typename State >
constexpr bool match (const Input &input, const State &state)
 
template<typename Production , typename Input , typename State >
constexpr bool match (const Input &input, State &state)
 
template<typename EntryProduction >
LEXY_CONSTEVAL std::size_t max_recursion_depth ()
 
template<typename MemFn , typename T >
constexpr auto mem_fn (MemFn T::*fn)
 Creates a callback from a member function. More...
 
template<typename Sink , typename Callback , typename = _detect_callback<Callback>>
constexpr auto operator>> (Sink sink, Callback cb)
 Composes a sink with a callback. More...
 
template<typename S , typename Cb , typename Second >
constexpr auto operator| (_compose_s< S, Cb > composed, Second second)
 
template<typename First , typename Second , typename = _detect_callback<First>, typename = _detect_callback<Second>>
constexpr auto operator| (First first, Second second)
 Composes two callbacks. More...
 
constexpr visualization_flags operator| (visualization_flags lhs, visualization_flags rhs) noexcept
 
template<typename Production , typename Input , typename ErrorCallback >
constexpr auto parse (const Input &input, const ErrorCallback &callback)
 Parses the production into a value, invoking the callback on error. More...
 
template<typename Production , typename Input , typename State , typename ErrorCallback >
constexpr auto parse (const Input &input, const State &state, const ErrorCallback &callback)
 
template<typename Production , typename Input , typename State , typename ErrorCallback >
constexpr auto parse (const Input &input, State &state, const ErrorCallback &callback)
 
template<typename Production , typename TokenKind , typename MemoryResource , typename Input , typename ErrorCallback >
auto parse_as_tree (parse_tree< lexy::input_reader< Input >, TokenKind, MemoryResource > &tree, const Input &input, const ErrorCallback &callback) -> validate_result< ErrorCallback >
 
template<typename Production , typename TokenKind , typename MemoryResource , typename Input , typename State , typename ErrorCallback >
auto parse_as_tree (parse_tree< lexy::input_reader< Input >, TokenKind, MemoryResource > &tree, const Input &input, const State &state, const ErrorCallback &callback) -> validate_result< ErrorCallback >
 
template<typename Production , typename TokenKind , typename MemoryResource , typename Input , typename State , typename ErrorCallback >
auto parse_as_tree (parse_tree< lexy::input_reader< Input >, TokenKind, MemoryResource > &tree, const Input &input, State &state, const ErrorCallback &callback) -> validate_result< ErrorCallback >
 
template<typename ParseTree >
 parse_tree_input (const ParseTree &) -> parse_tree_input< LEXY_DECAY_DECLTYPE(LEXY_DECLVAL(ParseTree).root())>
 
template<typename Reader >
constexpr auto partial_input (const Reader &, typename Reader::iterator begin, typename Reader::iterator end)
 
template<typename Reader >
constexpr auto partial_input (const Reader &reader, typename Reader::iterator end)
 Creates an input that only reads until the given end. More...
 
template<typename Production >
const LEXY_CONSTEVAL char * production_name ()
 
template<typename Iterator , typename Sentinel >
 range_input (Iterator begin, Sentinel end) -> range_input< deduce_encoding< LEXY_DECAY_DECLTYPE(*begin)>, Iterator, Sentinel >
 
template<typename Encoding = default_encoding, encoding_endianness Endian = encoding_endianness::bom, typename MemoryResource = void>
auto read_file (const char *path, MemoryResource *resource=_detail::get_memory_resource< MemoryResource >()) -> read_file_result< Encoding, MemoryResource >
 Reads the file at the specified path into a buffer. More...
 
template<typename Encoding = default_encoding, encoding_endianness Endian = encoding_endianness::bom, typename MemoryResource = void>
auto read_stdin (MemoryResource *resource=_detail::get_memory_resource< MemoryResource >()) -> read_file_result< Encoding, MemoryResource >
 Reads stdin into a buffer. More...
 
template<typename ControlProduction = void, typename Input , typename ErrorCallback >
constexpr auto scan (const Input &input, const ErrorCallback &callback)
 
template<typename ControlProduction = void, typename Input , typename State , typename ErrorCallback >
constexpr auto scan (const Input &input, const State &state, const ErrorCallback &callback)
 
template<typename ControlProduction = void, typename Input , typename State , typename ErrorCallback >
constexpr auto scan (const Input &input, State &state, const ErrorCallback &callback)
 
template<typename T >
 scan_result (_detail::lazy_init< T > &&) -> scan_result< T >
 
template<typename T >
 scan_result (T &&) -> scan_result< std::decay_t< T >>
 
LEXY_UNICODE_CONSTEXPR code_point simple_case_fold (code_point cp) noexcept
 
template<typename CharT >
 string_input (const CharT *begin, const CharT *end) -> string_input< deduce_encoding< CharT >>
 
template<typename CharT >
 string_input (const CharT *data, std::size_t size) -> string_input< deduce_encoding< CharT >>
 
template<typename View >
 string_input (const View &) -> string_input< deduce_encoding< _string_view_char_type< View >>>
 
template<typename TokenKind , typename Reader >
 token (token_kind< TokenKind >, lexy::lexeme< Reader >) -> token< Reader, TokenKind >
 
template<typename TokenKind , typename Reader , typename = std::enable_if_t<std::is_integral_v<TokenKind>>>
 token (TokenKind, lexy::lexeme< Reader >) -> token< Reader, void >
 
template<typename TokenRule , typename Reader , typename = std::enable_if_t<_has_special_token_kind<TokenRule>>>
 token (TokenRule, lexy::lexeme< Reader >) -> token< Reader, LEXY_DECAY_DECLTYPE(lexy::token_kind_of< TokenRule >)>
 
template<typename TokenKind , typename = std::enable_if_t<std::is_integral_v<TokenKind>>>
 token_kind (TokenKind) -> token_kind< void >
 
template<typename TokenRule , typename = std::enable_if_t<_has_special_token_kind<TokenRule>>>
 token_kind (TokenRule) -> token_kind< LEXY_DECAY_DECLTYPE(lexy::token_kind_of< TokenRule >)>
 
template<typename T >
constexpr const char * token_kind_name (const T &) noexcept
 
constexpr const char * token_kind_name (predefined_token_kind kind) noexcept
 
template<typename Production , typename TokenKind = void, typename Input , typename State >
void trace (std::FILE *file, const Input &input, const State &state, visualization_options opts={})
 
template<typename Production , typename TokenKind = void, typename Input , typename State >
void trace (std::FILE *file, const Input &input, State &state, visualization_options opts={})
 
template<typename Production , typename TokenKind = void, typename Input >
void trace (std::FILE *file, const Input &input, visualization_options opts={})
 
template<typename Production , typename TokenKind = void, typename OutputIt , typename Input , typename State >
OutputIt trace_to (OutputIt out, const Input &input, const State &state, visualization_options opts={})
 
template<typename Production , typename TokenKind = void, typename OutputIt , typename Input , typename State >
OutputIt trace_to (OutputIt out, const Input &input, State &state, visualization_options opts={})
 
template<typename Production , typename TokenKind = void, typename OutputIt , typename Input >
OutputIt trace_to (OutputIt out, const Input &input, visualization_options opts={})
 
template<typename TokenRule , typename Reader >
constexpr LEXY_FORCE_INLINE auto try_match_token (TokenRule, Reader &reader)
 
template<typename Production , typename Input , typename ErrorCallback >
constexpr auto validate (const Input &input, const ErrorCallback &callback) -> validate_result< ErrorCallback >
 
template<typename Production , typename Input , typename State , typename ErrorCallback >
constexpr auto validate (const Input &input, const State &state, const ErrorCallback &callback) -> validate_result< ErrorCallback >
 
template<typename Production , typename Input , typename State , typename ErrorCallback >
constexpr auto validate (const Input &input, State &state, const ErrorCallback &callback) -> validate_result< ErrorCallback >
 
template<typename T >
std::size_t visualization_display_width (const T &obj, visualization_options opts={})
 
template<typename T >
void visualize (std::FILE *file, const T &obj, visualization_options opts={})
 Writes the visualization to the FILE. More...
 
template<typename OutputIt , typename Tree , typename = decltype(LEXY_DECLVAL(Tree&).traverse())>
OutputIt visualize_to (OutputIt out, const Tree &tree, visualization_options opts={})
 
template<typename OutputIt >
OutputIt visualize_to (OutputIt out, lexy::code_point cp, visualization_options opts={})
 
template<typename OutputIt , typename Reader >
OutputIt visualize_to (OutputIt out, lexy::lexeme< Reader > lexeme, [[maybe_unused]] visualization_options opts={})
 
template<typename Encoding , typename CharT >
constexpr string_input< Encoding > zstring_input (const CharT *str) noexcept
 
template<typename CharT >
constexpr auto zstring_input (const CharT *str) noexcept
 

Variables

constexpr auto _1 = nth_value<1>
 
constexpr auto _2 = nth_value<2>
 
constexpr auto _3 = nth_value<3>
 
constexpr auto _4 = nth_value<4>
 
constexpr auto _5 = nth_value<5>
 
constexpr auto _6 = nth_value<6>
 
constexpr auto _7 = nth_value<7>
 
constexpr auto _8 = nth_value<8>
 
template<typename Container >
constexpr auto _has_append = _detail::is_detected<_detect_append, Container>
 
template<typename Container >
constexpr auto _has_reserve = _detail::is_detected<_detect_reserve, Container>
 
template<typename TokenRule >
constexpr auto _has_special_token_kind
 
template<typename To , typename... Args>
constexpr auto _is_convertible = false
 
template<typename To , typename Arg >
constexpr auto _is_convertible< To, Arg > = std::is_convertible_v<Arg, To>
 
template<>
constexpr auto _is_convertible< void > = true
 
template<typename Production >
constexpr auto _production_defines_whitespace = lexy::_detail::is_detected<_detect_whitespace, Production>
 
template<typename... T>
constexpr bool _require_branch_rule = (is_branch_rule<T> && ...)
 
template<typename T >
constexpr auto as_aggregate = _as_aggregate<T>{}
 A callback with sink that creates an aggregate. More...
 
template<typename T >
constexpr auto as_collection = _collection<T>{}
 
template<typename T >
constexpr auto as_integer = _int<T>{}
 
template<typename Container >
constexpr auto as_list = _list<Container>{}
 
template<typename String , typename Encoding = deduce_encoding<_string_char_type<String>>>
constexpr auto as_string = _as_string<String, Encoding>{}
 
template<typename T >
constexpr auto bit_cast = _bit_cast<T>{}
 std::bit_cast as a callback. More...
 
template<typename Reader , typename CharT >
constexpr bool char_type_compatible_with_reader
 
template<typename Container >
constexpr auto concat = _concat<Container>{}
 
template<typename T >
constexpr auto construct = _construct<T>{}
 A callback that constructs an object of type T by forwarding the arguments. More...
 
constexpr auto count = fold_inplace<std::size_t>(0u, [](std::size_t& result, auto&&...) { ++result; })
 Sink that counts all arguments. More...
 
template<typename T >
constexpr auto forward = _fwd<T>{}
 A callback that just forwards an existing object. More...
 
template<typename Input >
constexpr bool input_is_view = std::is_trivially_copyable_v<Input>
 
template<typename Encoding , typename Iterator , typename Sentinel >
constexpr bool input_is_view< range_input< Encoding, Iterator, Sentinel > > = true
 
template<typename T >
constexpr bool is_branch_rule = std::is_base_of_v<dsl::branch_base, T>
 
template<typename Encoding >
constexpr auto is_byte_encoding = std::is_same_v<Encoding, byte_encoding>
 
template<typename T >
constexpr bool is_callback = _detail::is_detected<_detect_callback, T>
 
template<typename T , typename... Args>
constexpr bool is_callback_for = _detail::is_detected<_detect_callback_for, std::decay_t<T>, Args...>
 
template<typename T , typename State >
constexpr bool is_callback_state = _detail::is_detected<_detect_callback_state, T, std::decay_t<State>>
 
template<typename T , typename State , typename... Args>
constexpr bool is_callback_with_state_for = _detail::is_detected<_detect_callback_with_state_for, std::decay_t<T>, State, Args...>
 
template<typename T >
constexpr bool is_char_class_rule = std::is_base_of_v<dsl::_char_class_base, T>
 
template<typename Encoding >
constexpr auto is_char_encoding = is_text_encoding<Encoding> || is_byte_encoding<Encoding>
 
template<typename T >
constexpr bool is_literal_rule = std::is_base_of_v<dsl::_lit_base, T>
 
template<typename T >
constexpr bool is_literal_set_rule = std::is_base_of_v<dsl::_lset_base, T>
 
template<typename Encoding >
constexpr auto is_node_encoding = false
 
template<typename Node >
constexpr auto is_node_encoding< parse_tree_encoding< Node > > = true
 
template<typename T >
constexpr auto is_operation = std::is_base_of_v<lexy::dsl::_operation_base, T>
 
template<typename Production >
constexpr bool is_production = _detail::is_detected<production_rule, Production>
 
template<typename T >
constexpr bool is_rule = std::is_base_of_v<dsl::rule_base, T>
 
template<typename T >
constexpr auto is_separator = std::is_base_of_v<lexy::dsl::_sep_base, T>
 
template<typename T , typename... Args>
constexpr bool is_sink = _detail::is_detected<_detect_sink, T, Args...>
 
template<typename T , typename... Args>
constexpr bool is_sink_callback_for = _detail::is_detected<_detect_sink_callback_for, std::decay_t<T>, Args...>
 
template<typename Encoding >
constexpr auto is_text_encoding = is_unicode_encoding<Encoding> || std::is_same_v<Encoding, default_encoding>
 
template<typename Production >
constexpr bool is_token_production = std::is_base_of_v<token_production, Production>
 
template<typename T >
constexpr bool is_token_rule = std::is_base_of_v<dsl::_token_base, T>
 
template<typename Production >
constexpr bool is_transparent_production = std::is_base_of_v<transparent_production, Production>
 
template<typename T >
constexpr bool is_unconditional_branch_rule = std::is_base_of_v<dsl::unconditional_branch_base, T>
 
template<typename Encoding >
constexpr auto is_unicode_encoding
 
template<typename Encoding , encoding_endianness Endianness>
constexpr auto make_buffer_from_raw = _make_buffer<Encoding, Endianness>{}
 Creates a buffer with the specified encoding/endianness from raw memory. More...
 
template<typename T , typename PtrT = T*>
constexpr auto new_ = _new<T, PtrT>{}
 A callback that constructs an object of type T on the heap by forwarding the arguments. More...
 
constexpr void * no_parse_state = nullptr
 
constexpr auto noop = _noop{}
 A callback with sink that does nothing. More...
 
template<std::size_t N>
constexpr auto nth_value = _nth_value<N, void, void>{}
 Placeholder for bind that expands to the nth value produced by the rule. More...
 
constexpr auto parse_state = _parse_state<void>{}
 
template<typename Production , typename ParseState = void>
constexpr bool production_has_value_callback
 
constexpr struct lexy::scan_failed_t scan_failed
 
template<typename T >
constexpr auto symbol_table = _symbol_table<T, _detail::lit_no_case_fold>{}
 
constexpr auto token_kind_map = _tk_map_empty{}
 
template<typename TokenKind >
constexpr auto token_kind_map_for = token_kind_map
 A mapping of token rule to token kind; specialize for your own kinds. More...
 
template<>
constexpr auto token_kind_map_for< void > = token_kind_map
 
template<typename TokenRule >
constexpr auto token_kind_of = lexy::unknown_token_kind
 Specialize to define the token kind of a rule. More...
 
template<typename TokenRule >
constexpr auto token_kind_of< const TokenRule > = token_kind_of<TokenRule>
 
constexpr auto values = _detail::all_values_placeholder{}
 Placeholder for bind that expands to all values produced by the rule. More...
 

Typedef Documentation

◆ _char8_t

using lexy::_char8_t = typedef unsigned char

Definition at line 135 of file config.hpp.

◆ _default_location_counting

template<typename Input >
using lexy::_default_location_counting = typedef decltype(_compute_default_location_counting<Input>())

Definition at line 130 of file input_location.hpp.

◆ _detect_append

template<typename Container >
using lexy::_detect_append = typedef decltype(LEXY_DECLVAL(Container&).append(LEXY_DECLVAL(Container&&)))

Definition at line 19 of file container.hpp.

◆ _detect_callback

template<typename T >
using lexy::_detect_callback = typedef typename T::return_type

Definition at line 14 of file callback/base.hpp.

◆ _detect_callback_for

template<typename T , typename... Args>
using lexy::_detect_callback_for = typedef decltype(LEXY_DECLVAL(const T)(LEXY_DECLVAL(Args)...))

Definition at line 19 of file callback/base.hpp.

◆ _detect_callback_state

template<typename T , typename State >
using lexy::_detect_callback_state = typedef decltype(LEXY_DECLVAL(const T)[LEXY_DECLVAL(State&)])

Definition at line 25 of file callback/base.hpp.

◆ _detect_callback_with_state_for

template<typename T , typename State , typename... Args>
using lexy::_detect_callback_with_state_for = typedef decltype(LEXY_DECLVAL(const T)[LEXY_DECLVAL(State&)](LEXY_DECLVAL(Args)...))

Definition at line 32 of file callback/base.hpp.

◆ _detect_input_data

template<typename Input >
using lexy::_detect_input_data = typedef decltype(LEXY_DECLVAL(Input&).data())

Definition at line 457 of file buffer.hpp.

◆ _detect_max_recursion_depth

template<typename Production >
using lexy::_detect_max_recursion_depth = typedef decltype(Production::max_recursion_depth)

Definition at line 178 of file grammar.hpp.

◆ _detect_optional_like

template<typename T >
using lexy::_detect_optional_like = typedef decltype(T(), *LEXY_DECLVAL(T&), !LEXY_DECLVAL(const T&))

Definition at line 23 of file option.hpp.

◆ _detect_parent_input

template<typename Input >
using lexy::_detect_parent_input = typedef decltype(LEXY_DECLVAL(Input).parent_input())

Definition at line 229 of file error.hpp.

◆ _detect_reserve

template<typename Container >
using lexy::_detect_reserve = typedef decltype(LEXY_DECLVAL(Container&).reserve(std::size_t()))

Definition at line 14 of file container.hpp.

◆ _detect_sink

template<typename T , typename... Args>
using lexy::_detect_sink = typedef decltype(LEXY_DECLVAL(const T).sink(LEXY_DECLVAL(Args)...).finish())

Definition at line 48 of file callback/base.hpp.

◆ _detect_sink_callback_for

template<typename T , typename... Args>
using lexy::_detect_sink_callback_for = typedef decltype(LEXY_DECLVAL(T&)(LEXY_DECLVAL(Args)...))

Definition at line 42 of file callback/base.hpp.

◆ _detect_value

template<typename Production >
using lexy::_detect_value = typedef decltype(Production::value)

Definition at line 262 of file grammar.hpp.

◆ _detect_value_of

template<typename ParseState , typename Production >
using lexy::_detect_value_of = typedef typename decltype(LEXY_DECLVAL(ParseState&).value_of(Production{}))::return_type

Definition at line 259 of file grammar.hpp.

◆ _detect_whitespace

template<typename Production >
using lexy::_detect_whitespace = typedef decltype(Production::whitespace)

Definition at line 220 of file grammar.hpp.

◆ _enable_production_or_operation

template<typename T >
using lexy::_enable_production_or_operation = typedef std::enable_if_t<is_production<T> || is_operation<T> >

Definition at line 190 of file grammar.hpp.

◆ _error_sink_t

template<typename Callback >
using lexy::_error_sink_t = typedef decltype(_get_error_sink(LEXY_DECLVAL(Callback)))

Definition at line 42 of file validate.hpp.

◆ _fn_as_base

template<typename Fn >
using lexy::_fn_as_base = typedef std::conditional_t<std::is_class_v<Fn>, Fn, _fn_holder<Fn> >

Definition at line 71 of file callback/base.hpp.

◆ _production_value_type

template<typename Handler , typename State , typename Production >
using lexy::_production_value_type = typedef typename Handler::template value_callback<Production, State>::return_type

Definition at line 113 of file action/base.hpp.

◆ _string_char_type

template<typename String >
using lexy::_string_char_type = typedef LEXY_DECAY_DECLTYPE(LEXY_DECLVAL(String)[0])

Definition at line 19 of file string.hpp.

◆ _string_view_char_type

template<typename View >
using lexy::_string_view_char_type = typedef LEXY_DECAY_DECLTYPE(*LEXY_DECLVAL(View).data())

Definition at line 14 of file string_input.hpp.

◆ _subgrammar_for

template<typename Production , typename Action >
using lexy::_subgrammar_for = typedef _subgrammar<Production, typename Action::handler, typename Action::state, lexy::input_reader<typename Action::input> >

Definition at line 17 of file subgrammar.hpp.

◆ _sucfr_for

template<typename Reader >
using lexy::_sucfr_for = typedef std::conditional_t<std::is_same_v<typename Reader::encoding, lexy::utf32_encoding>, _sucfr32<Reader>, _sucfrm<Reader> >

Definition at line 270 of file case_folding.hpp.

◆ _whitespace_production_of

template<typename Production >
using lexy::_whitespace_production_of = typedef std::conditional_t<_production_defines_whitespace<Production>, Production, void>

Definition at line 109 of file action/base.hpp.

◆ argv_error

template<typename Tag , typename Encoding = default_encoding>
using lexy::argv_error = typedef error_for<argv_input<Encoding>, Tag>

Definition at line 159 of file argv_input.hpp.

◆ argv_error_context

template<typename Encoding = default_encoding>
using lexy::argv_error_context = typedef error_context<argv_input<Encoding> >

Definition at line 162 of file argv_input.hpp.

◆ argv_lexeme

template<typename Encoding = default_encoding>
using lexy::argv_lexeme = typedef lexeme_for<argv_input<Encoding> >

Definition at line 156 of file argv_input.hpp.

◆ branch_parser_for

template<typename BranchRule , typename Reader >
using lexy::branch_parser_for = typedef typename BranchRule::template bp<Reader>

Definition at line 116 of file dsl/base.hpp.

◆ buffer_error

template<typename Tag , typename Encoding = default_encoding, typename MemoryResource = void>
using lexy::buffer_error = typedef error_for<buffer<Encoding, MemoryResource>, Tag>

Definition at line 500 of file buffer.hpp.

◆ buffer_error_context

template<typename Encoding = default_encoding, typename MemoryResource = void>
using lexy::buffer_error_context = typedef error_context<buffer<Encoding, MemoryResource> >

Definition at line 503 of file buffer.hpp.

◆ buffer_lexeme

template<typename Encoding = default_encoding, typename MemoryResource = void>
using lexy::buffer_lexeme = typedef lexeme_for<buffer<Encoding, MemoryResource> >

Definition at line 497 of file buffer.hpp.

◆ deduce_encoding

template<typename CharT >
using lexy::deduce_encoding = typedef typename _deduce_encoding<CharT>::type

Definition at line 209 of file encoding.hpp.

◆ error_for

template<typename Input , typename Tag >
using lexy::error_for = typedef error<input_reader<Input>, Tag>

Definition at line 223 of file error.hpp.

◆ input_reader

template<typename Input >
using lexy::input_reader = typedef decltype(LEXY_DECLVAL(Input).reader())

Definition at line 106 of file input/base.hpp.

◆ lexeme_for

template<typename Input >
using lexy::lexeme_for = typedef lexeme<input_reader<Input> >

Definition at line 79 of file lexeme.hpp.

◆ make_member_ptr

template<auto Ptr>
using lexy::make_member_ptr = typedef member<_mem_ptr_fn<Ptr> >

Definition at line 28 of file member.hpp.

◆ op

template<const auto & Operator>
using lexy::op = typedef typename LEXY_DECAY_DECLTYPE(Operator)::op_tag_type

Definition at line 41 of file operator.hpp.

◆ parse_tree_error

template<typename Tag , typename Node >
using lexy::parse_tree_error = typedef error_for<parse_tree_input<Node>, Tag>

Definition at line 177 of file parse_tree_input.hpp.

◆ parse_tree_error_context

template<typename Node >
using lexy::parse_tree_error_context = typedef error_context<parse_tree_input<Node> >

Definition at line 180 of file parse_tree_input.hpp.

◆ parse_tree_for

template<typename Input , typename TokenKind = void, typename MemoryResource = void>
using lexy::parse_tree_for = typedef lexy::parse_tree<lexy::input_reader<Input>, TokenKind, MemoryResource>

Definition at line 423 of file parse_tree.hpp.

◆ parse_tree_lexeme

template<typename Node >
using lexy::parse_tree_lexeme = typedef lexeme_for<parse_tree_input<Node> >

Definition at line 174 of file parse_tree_input.hpp.

◆ parser_for

template<typename Rule , typename NextParser >
using lexy::parser_for = typedef typename Rule::template p<NextParser>

Definition at line 113 of file dsl/base.hpp.

◆ production_branch_parser

template<typename Production , typename Reader >
using lexy::production_branch_parser = typedef _pb<Production, Reader>

Definition at line 123 of file dsl/base.hpp.

◆ production_rule

template<typename Production >
using lexy::production_rule = typedef LEXY_DECAY_DECLTYPE(Production::rule)

Definition at line 147 of file grammar.hpp.

◆ production_whitespace

template<typename Production , typename WhitespaceProduction >
using lexy::production_whitespace = typedef decltype(_production_whitespace<Production, WhitespaceProduction>())

Definition at line 243 of file grammar.hpp.

◆ sink_callback

template<typename Sink , typename... Args>
using lexy::sink_callback = typedef decltype(LEXY_DECLVAL(Sink).sink(LEXY_DECLVAL(Args)...))

Returns the type of the .sink() function.

Definition at line 39 of file callback/base.hpp.

◆ string_error

template<typename Tag , typename Encoding = default_encoding>
using lexy::string_error = typedef error_for<string_input<Encoding>, Tag>

Definition at line 108 of file string_input.hpp.

◆ string_error_context

template<typename Encoding = default_encoding>
using lexy::string_error_context = typedef error_context<string_input<Encoding> >

Definition at line 111 of file string_input.hpp.

◆ string_lexeme

template<typename Encoding = default_encoding>
using lexy::string_lexeme = typedef lexeme_for<string_input<Encoding> >

Definition at line 105 of file string_input.hpp.

◆ token_for

template<typename Input , typename TokenKind = void>
using lexy::token_for = typedef token<lexy::input_reader<Input>, TokenKind>

Definition at line 281 of file token.hpp.

◆ token_parser_for

template<typename TokenRule , typename Reader >
using lexy::token_parser_for = typedef typename TokenRule::template tp<Reader>

Definition at line 242 of file dsl/base.hpp.

Enumeration Type Documentation

◆ encoding_endianness

The endianness used by an encoding.

Enumerator
little 

Little endian.

big 

Big endian.

bom 

Checks for a BOM and uses its endianness. If there is no BOM, assumes big endian.

Definition at line 15 of file encoding.hpp.

◆ file_error

enum lexy::file_error
strong

Errors that might occur while reading the file.

Enumerator
_success 
os_error 

An internal OS error, such as failure to read from the file.

file_not_found 

The file was not found.

permission_denied 

The file cannot be opened.

Definition at line 19 of file file.hpp.

◆ predefined_token_kind

enum lexy::predefined_token_kind : std::uint_least16_t
Enumerator
unknown_token_kind 
error_token_kind 
whitespace_token_kind 
any_token_kind 
literal_token_kind 
position_token_kind 
eof_token_kind 
identifier_token_kind 
digits_token_kind 
_smallest_predefined_token_kind 

Definition at line 82 of file grammar.hpp.

◆ traverse_event

enum lexy::traverse_event
strong
Enumerator
enter 

We're visiting a production node before all its children.

exit 

We're visiting a production node after all its children.

leaf 

We're visiting a token.

Definition at line 1099 of file parse_tree.hpp.

◆ visualization_flags

Enumerator
visualize_default 
visualize_use_unicode 

Visualization can use unicode characters.

visualize_use_color 

Visualization can use ANSI color escape sequences.

visualize_use_symbols 

Visualization can use Unicode symbols e.g. for newline/space instead of the code point.

visualize_fancy 

Visualization can use unicode, color and symbols.

visualize_space 

Visualize space ' ' as visible character/symbol.

Definition at line 16 of file visualize.hpp.

Function Documentation

◆ _buffer_reader()

template<typename Encoding >
constexpr auto lexy::_buffer_reader ( const typename Encoding::char_type *  data)
constexpr

Definition at line 74 of file buffer.hpp.

◆ _compute_default_location_counting()

template<typename Input >
auto lexy::_compute_default_location_counting ( )

Definition at line 117 of file input_location.hpp.

◆ _digit_count()

template<typename Integer >
constexpr std::size_t lexy::_digit_count ( int  radix,
Integer  value 
)
constexpr

Definition at line 18 of file dsl/integer.hpp.

◆ _do_action()

template<typename Handler , typename State , typename Production , typename Reader >
constexpr auto lexy::_do_action ( _pc< Handler, State, Production > &  context,
Reader &  reader 
)
constexpr

Definition at line 201 of file action/base.hpp.

◆ _get_error_sink()

template<typename Callback >
constexpr auto lexy::_get_error_sink ( const Callback &  callback)
constexpr

Definition at line 19 of file validate.hpp.

◆ _get_input_line_annotation()

template<typename Input >
constexpr void lexy::_get_input_line_annotation ( input_line_annotation< Input > &  result,
lexy::lexeme_for< Input >  line,
lexy::lexeme_for< Input >  newline,
typename lexy::input_reader< Input >::iterator  begin,
typename lexy::input_reader< Input >::iterator  end 
)
constexpr

Definition at line 376 of file input_location.hpp.

◆ _make_overloaded()

template<typename... Op>
constexpr auto lexy::_make_overloaded ( Op &&...  op)
constexpr

Definition at line 82 of file callback/base.hpp.

◆ _production_whitespace()

template<typename Production , typename WhitespaceProduction >
auto lexy::_production_whitespace ( )

Definition at line 227 of file grammar.hpp.

◆ _range_reader()

template<typename Encoding , typename Iterator , typename Sentinel >
constexpr auto lexy::_range_reader ( Iterator  begin,
Sentinel  end 
)
constexpr

Definition at line 81 of file input/base.hpp.

◆ argv_begin()

constexpr argv_iterator lexy::argv_begin ( int  argc,
char *  argv[] 
)
constexprnoexcept

Returns an iterator to the beginning of the command-line arguments.

Definition at line 89 of file argv_input.hpp.

◆ argv_end()

constexpr argv_iterator lexy::argv_end ( int  argc,
char *  argv[] 
)
constexprnoexcept

Returns an iterator one past the end of the command-line arguments.

Definition at line 99 of file argv_input.hpp.

◆ argv_input()

lexy::argv_input ( int  argc,
char *  argv[] 
) -> argv_input<>

◆ bind()

template<typename Callback , typename... BoundArgs>
constexpr auto lexy::bind ( Callback &&  callback,
BoundArgs &&...  args 
)
constexpr

Binds the operator() of the callback with pre-defined/remapped values.

Definition at line 321 of file bind.hpp.

◆ bind_sink()

template<typename Sink , typename... BoundArgs>
constexpr auto lexy::bind_sink ( Sink &&  sink,
BoundArgs &&...  args 
)
constexpr

Binds the .sink() function of a sink. The result has a .sink() function that accepts the state (i.e. the parse state), but no additional values.

Definition at line 375 of file bind.hpp.

◆ buffer() [1/6]

template<typename CharT >
lexy::buffer ( const CharT *  ,
const CharT *   
) -> buffer< deduce_encoding< CharT >>

◆ buffer() [2/6]

template<typename CharT , typename MemoryResource >
lexy::buffer ( const CharT *  ,
const CharT *  ,
MemoryResource *   
) -> buffer< deduce_encoding< CharT >, MemoryResource >

◆ buffer() [3/6]

template<typename CharT >
lexy::buffer ( const CharT *  ,
std::size_t   
) -> buffer< deduce_encoding< CharT >>

◆ buffer() [4/6]

template<typename CharT , typename MemoryResource >
lexy::buffer ( const CharT *  ,
std::size_t  ,
MemoryResource *   
) -> buffer< deduce_encoding< CharT >, MemoryResource >

◆ buffer() [5/6]

template<typename View >
lexy::buffer ( const View &  ) -> buffer< deduce_encoding< LEXY_DECAY_DECLTYPE(*LEXY_DECLVAL(View).data())>>

◆ buffer() [6/6]

template<typename View , typename MemoryResource >
lexy::buffer ( const View &  ,
MemoryResource *   
) -> buffer< deduce_encoding< LEXY_DECAY_DECLTYPE(*LEXY_DECLVAL(View).data())>, MemoryResource >

◆ callback() [1/3]

template<typename... Fns>
constexpr auto lexy::callback ( Fns &&...  fns)
constexpr

Creates a callback.

Definition at line 48 of file adapter.hpp.

◆ callback() [2/3]

template<typename ReturnType , typename... Fns>
constexpr auto lexy::callback ( Fns &&...  fns)
constexpr

Definition at line 57 of file adapter.hpp.

◆ callback() [3/3]

template<typename Sink , typename = lexy::sink_callback<Sink>>
constexpr auto lexy::callback ( Sink &&  sink)
constexpr

Creates a callback that forwards all arguments to the sink.

Definition at line 98 of file adapter.hpp.

◆ callback_with_state() [1/2]

template<typename... Fns>
constexpr auto lexy::callback_with_state ( Fns &&...  fns)
constexpr

Creates a callback that also receives the parse state.

Definition at line 64 of file adapter.hpp.

◆ callback_with_state() [2/2]

template<typename ReturnType , typename... Fns>
constexpr auto lexy::callback_with_state ( Fns &&...  fns)
constexpr

Definition at line 73 of file adapter.hpp.

◆ collect() [1/2]

template<typename Callback >
constexpr auto lexy::collect ( Callback &&  callback)
constexpr

Returns a sink that invokes the void-returning callback multiple times, resulting in the number of times it was invoked.

Definition at line 491 of file container.hpp.

◆ collect() [2/2]

template<typename Container , typename Callback >
constexpr auto lexy::collect ( Callback &&  callback)
constexpr

Returns a sink that invokes the callback multiple times, storing each result in the container.

Definition at line 501 of file container.hpp.

◆ constant()

template<typename Arg >
LEXY_CONSTEVAL auto lexy::constant ( Arg &&  value)

Creates a callback that produces the given value without accepting arguments.

Definition at line 26 of file constant.hpp.

◆ do_action()

template<typename Production , template< typename > typename Result, typename Handler , typename State , typename Reader >
constexpr auto lexy::do_action ( Handler &&  handler,
State *  state,
Reader &  reader 
)
constexpr

Definition at line 228 of file action/base.hpp.

◆ fold()

template<typename T , typename Arg = T, typename... Op>
constexpr auto lexy::fold ( Arg &&  init,
Op &&...  op 
)
constexpr

Sink that folds all the arguments with the binary operation op.

Definition at line 68 of file fold.hpp.

◆ fold_inplace()

template<typename T , typename Arg = T, typename... Op>
constexpr auto lexy::fold_inplace ( Arg &&  init,
Op &&...  op 
)
constexpr

Sink that folds all the arguments with the binary operation op that modifies the result in-place.

Definition at line 77 of file fold.hpp.

◆ get_input_line_annotation() [1/2]

template<typename Input , typename Counting >
constexpr auto lexy::get_input_line_annotation ( const Input &  input,
const input_location< Input, Counting > &  begin_location,
typename lexy::input_reader< Input >::iterator  end 
) -> input_line_annotation<Input>
constexpr

Definition at line 418 of file input_location.hpp.

◆ get_input_line_annotation() [2/2]

template<typename Input , typename Counting >
constexpr auto lexy::get_input_line_annotation ( const Input &  input,
const input_location< Input, Counting > &  location,
std::size_t  size 
)
constexpr

Computes the annotation for e.g. an error message covering [location, location + size).

Definition at line 461 of file input_location.hpp.

◆ get_input_location() [1/4]

template<typename Counting , typename Input >
constexpr auto lexy::get_input_location ( const Input &  input,
typename lexy::input_reader< Input >::iterator  position 
)
constexpr

Definition at line 282 of file input_location.hpp.

◆ get_input_location() [2/4]

template<typename Input >
constexpr auto lexy::get_input_location ( const Input &  input,
typename lexy::input_reader< Input >::iterator  position 
)
constexpr

Definition at line 295 of file input_location.hpp.

◆ get_input_location() [3/4]

template<typename Input >
constexpr auto lexy::get_input_location ( const Input &  input,
typename lexy::input_reader< Input >::iterator  position,
input_location_anchor< Input >  anchor 
)
constexpr

Definition at line 288 of file input_location.hpp.

◆ get_input_location() [4/4]

template<typename Counting , typename Input >
constexpr auto lexy::get_input_location ( const Input &  input,
typename lexy::input_reader< Input >::iterator  position,
input_location_anchor< Input >  anchor 
) -> input_location<Input, Counting>
constexpr

The location for a position in the input; search starts at the anchor.

Definition at line 217 of file input_location.hpp.

◆ lexeme()

template<typename Reader >
lexy::lexeme ( const Reader &  ,
typename Reader::iterator   
) -> lexeme< typename Reader::canonical_reader >

◆ LEXY_INSTANTIATION_NEWTYPE() [1/9]

lexy::LEXY_INSTANTIATION_NEWTYPE ( _br32  ,
_br  ,
lexy::utf32_encoding   
)

◆ LEXY_INSTANTIATION_NEWTYPE() [2/9]

lexy::LEXY_INSTANTIATION_NEWTYPE ( _br8  ,
_br  ,
lexy::utf8_encoding   
)

◆ LEXY_INSTANTIATION_NEWTYPE() [3/9]

lexy::LEXY_INSTANTIATION_NEWTYPE ( _bra  ,
_br  ,
lexy::ascii_encoding   
)

◆ LEXY_INSTANTIATION_NEWTYPE() [4/9]

lexy::LEXY_INSTANTIATION_NEWTYPE ( _brc  ,
_br  ,
lexy::utf8_char_encoding   
)

◆ LEXY_INSTANTIATION_NEWTYPE() [5/9]

template<typename Encoding >
lexy::LEXY_INSTANTIATION_NEWTYPE ( _pr  ,
_rr  ,
Encoding  ,
const typename Encoding::char_type *   
)

◆ LEXY_INSTANTIATION_NEWTYPE() [6/9]

lexy::LEXY_INSTANTIATION_NEWTYPE ( _pr8  ,
_pr  ,
lexy::utf8_encoding   
)

◆ LEXY_INSTANTIATION_NEWTYPE() [7/9]

lexy::LEXY_INSTANTIATION_NEWTYPE ( _prb  ,
_pr  ,
lexy::byte_encoding   
)

◆ LEXY_INSTANTIATION_NEWTYPE() [8/9]

lexy::LEXY_INSTANTIATION_NEWTYPE ( _prc  ,
_pr  ,
lexy::utf8_char_encoding   
)

◆ LEXY_INSTANTIATION_NEWTYPE() [9/9]

lexy::LEXY_INSTANTIATION_NEWTYPE ( _prd  ,
_pr  ,
lexy::default_encoding   
)

◆ make_buffer_from_input()

template<typename Input , typename MemoryResource = void>
constexpr auto lexy::make_buffer_from_input ( const Input &  input,
MemoryResource *  resource = _detail::get_memory_resource<MemoryResource>() 
) -> buffer<typename input_reader<Input>::encoding, MemoryResource>
constexpr

Definition at line 460 of file buffer.hpp.

◆ match() [1/3]

template<typename Production , typename Input >
constexpr bool lexy::match ( const Input &  input)
constexpr

Definition at line 73 of file match.hpp.

◆ match() [2/3]

template<typename Production , typename Input , typename State >
constexpr bool lexy::match ( const Input &  input,
const State &  state 
)
constexpr

Definition at line 83 of file match.hpp.

◆ match() [3/3]

template<typename Production , typename Input , typename State >
constexpr bool lexy::match ( const Input &  input,
State &  state 
)
constexpr

Definition at line 78 of file match.hpp.

◆ max_recursion_depth()

template<typename EntryProduction >
LEXY_CONSTEVAL std::size_t lexy::max_recursion_depth ( )

Definition at line 181 of file grammar.hpp.

◆ mem_fn()

template<typename MemFn , typename T >
constexpr auto lexy::mem_fn ( MemFn T::*  fn)
constexpr

Creates a callback from a member function.

Definition at line 161 of file adapter.hpp.

◆ operator>>()

template<typename Sink , typename Callback , typename = _detect_callback<Callback>>
constexpr auto lexy::operator>> ( Sink  sink,
Callback  cb 
)
constexpr

Composes a sink with a callback.

Definition at line 113 of file composition.hpp.

◆ operator|() [1/3]

template<typename S , typename Cb , typename Second >
constexpr auto lexy::operator| ( _compose_s< S, Cb >  composed,
Second  second 
)
constexpr

Definition at line 105 of file composition.hpp.

◆ operator|() [2/3]

template<typename First , typename Second , typename = _detect_callback<First>, typename = _detect_callback<Second>>
constexpr auto lexy::operator| ( First  first,
Second  second 
)
constexpr

Composes two callbacks.

Definition at line 100 of file composition.hpp.

◆ operator|() [3/3]

constexpr visualization_flags lexy::operator| ( visualization_flags  lhs,
visualization_flags  rhs 
)
constexprnoexcept

Definition at line 34 of file visualize.hpp.

◆ parse() [1/3]

template<typename Production , typename Input , typename ErrorCallback >
constexpr auto lexy::parse ( const Input &  input,
const ErrorCallback &  callback 
)
constexpr

Parses the production into a value, invoking the callback on error.

Definition at line 171 of file parse.hpp.

◆ parse() [2/3]

template<typename Production , typename Input , typename State , typename ErrorCallback >
constexpr auto lexy::parse ( const Input &  input,
const State &  state,
const ErrorCallback &  callback 
)
constexpr

Definition at line 184 of file parse.hpp.

◆ parse() [3/3]

template<typename Production , typename Input , typename State , typename ErrorCallback >
constexpr auto lexy::parse ( const Input &  input,
State &  state,
const ErrorCallback &  callback 
)
constexpr

Parses the production into a value, invoking the callback on error. All callbacks gain access to the specified parse state.

Definition at line 179 of file parse.hpp.

◆ parse_as_tree() [1/3]

template<typename Production , typename TokenKind , typename MemoryResource , typename Input , typename ErrorCallback >
auto lexy::parse_as_tree ( parse_tree< lexy::input_reader< Input >, TokenKind, MemoryResource > &  tree,
const Input &  input,
const ErrorCallback &  callback 
) -> validate_result<ErrorCallback>

Definition at line 189 of file parse_as_tree.hpp.

◆ parse_as_tree() [2/3]

template<typename Production , typename TokenKind , typename MemoryResource , typename Input , typename State , typename ErrorCallback >
auto lexy::parse_as_tree ( parse_tree< lexy::input_reader< Input >, TokenKind, MemoryResource > &  tree,
const Input &  input,
const State &  state,
const ErrorCallback &  callback 
) -> validate_result<ErrorCallback>

Definition at line 207 of file parse_as_tree.hpp.

◆ parse_as_tree() [3/3]

template<typename Production , typename TokenKind , typename MemoryResource , typename Input , typename State , typename ErrorCallback >
auto lexy::parse_as_tree ( parse_tree< lexy::input_reader< Input >, TokenKind, MemoryResource > &  tree,
const Input &  input,
State &  state,
const ErrorCallback &  callback 
) -> validate_result<ErrorCallback>

Definition at line 198 of file parse_as_tree.hpp.

◆ parse_tree_input()

template<typename ParseTree >
lexy::parse_tree_input ( const ParseTree &  ) -> parse_tree_input< LEXY_DECAY_DECLTYPE(LEXY_DECLVAL(ParseTree).root())>

◆ partial_input() [1/2]

template<typename Reader >
constexpr auto lexy::partial_input ( const Reader &  ,
typename Reader::iterator  begin,
typename Reader::iterator  end 
)
constexpr

Definition at line 133 of file input/base.hpp.

◆ partial_input() [2/2]

template<typename Reader >
constexpr auto lexy::partial_input ( const Reader &  reader,
typename Reader::iterator  end 
)
constexpr

Creates an input that only reads until the given end.

Definition at line 141 of file input/base.hpp.

◆ production_name()

template<typename Production >
const LEXY_CONSTEVAL char* lexy::production_name ( )

Definition at line 172 of file grammar.hpp.

◆ range_input()

template<typename Iterator , typename Sentinel >
lexy::range_input ( Iterator  begin,
Sentinel  end 
) -> range_input< deduce_encoding< LEXY_DECAY_DECLTYPE(*begin)>, Iterator, Sentinel >

◆ read_file()

template<typename Encoding = default_encoding, encoding_endianness Endian = encoding_endianness::bom, typename MemoryResource = void>
auto lexy::read_file ( const char *  path,
MemoryResource *  resource = _detail::get_memory_resource<MemoryResource>() 
) -> read_file_result<Encoding, MemoryResource>

Reads the file at the specified path into a buffer.

Definition at line 116 of file file.hpp.

◆ read_stdin()

template<typename Encoding = default_encoding, encoding_endianness Endian = encoding_endianness::bom, typename MemoryResource = void>
auto lexy::read_stdin ( MemoryResource *  resource = _detail::get_memory_resource<MemoryResource>()) -> read_file_result<Encoding, MemoryResource>

Reads stdin into a buffer.

Definition at line 128 of file file.hpp.

◆ scan() [1/3]

template<typename ControlProduction = void, typename Input , typename ErrorCallback >
constexpr auto lexy::scan ( const Input &  input,
const ErrorCallback &  callback 
)
constexpr

Definition at line 80 of file action/scan.hpp.

◆ scan() [2/3]

template<typename ControlProduction = void, typename Input , typename State , typename ErrorCallback >
constexpr auto lexy::scan ( const Input &  input,
const State &  state,
const ErrorCallback &  callback 
)
constexpr

Definition at line 91 of file action/scan.hpp.

◆ scan() [3/3]

template<typename ControlProduction = void, typename Input , typename State , typename ErrorCallback >
constexpr auto lexy::scan ( const Input &  input,
State &  state,
const ErrorCallback &  callback 
)
constexpr

Definition at line 86 of file action/scan.hpp.

◆ scan_result() [1/2]

template<typename T >
lexy::scan_result ( _detail::lazy_init< T > &&  ) -> scan_result< T >

◆ scan_result() [2/2]

template<typename T >
lexy::scan_result ( T &&  ) -> scan_result< std::decay_t< T >>

◆ simple_case_fold()

LEXY_UNICODE_CONSTEXPR code_point lexy::simple_case_fold ( code_point  cp)
noexcept

◆ string_input() [1/3]

template<typename CharT >
lexy::string_input ( const CharT *  begin,
const CharT *  end 
) -> string_input< deduce_encoding< CharT >>

◆ string_input() [2/3]

template<typename CharT >
lexy::string_input ( const CharT *  data,
std::size_t  size 
) -> string_input< deduce_encoding< CharT >>

◆ string_input() [3/3]

template<typename View >
lexy::string_input ( const View &  ) -> string_input< deduce_encoding< _string_view_char_type< View >>>

◆ token() [1/3]

template<typename TokenKind , typename Reader >
lexy::token ( token_kind< TokenKind >  ,
lexy::lexeme< Reader >   
) -> token< Reader, TokenKind >

◆ token() [2/3]

template<typename TokenKind , typename Reader , typename = std::enable_if_t<std::is_integral_v<TokenKind>>>
lexy::token ( TokenKind  ,
lexy::lexeme< Reader >   
) -> token< Reader, void >

◆ token() [3/3]

template<typename TokenRule , typename Reader , typename = std::enable_if_t<_has_special_token_kind<TokenRule>>>
lexy::token ( TokenRule  ,
lexy::lexeme< Reader >   
) -> token< Reader, LEXY_DECAY_DECLTYPE(lexy::token_kind_of< TokenRule >)>

◆ token_kind() [1/2]

template<typename TokenKind , typename = std::enable_if_t<std::is_integral_v<TokenKind>>>
lexy::token_kind ( TokenKind  ) -> token_kind< void >

◆ token_kind() [2/2]

template<typename TokenRule , typename = std::enable_if_t<_has_special_token_kind<TokenRule>>>
lexy::token_kind ( TokenRule  ) -> token_kind< LEXY_DECAY_DECLTYPE(lexy::token_kind_of< TokenRule >)>

◆ token_kind_name() [1/2]

template<typename T >
constexpr const char* lexy::token_kind_name ( const T &  )
constexprnoexcept

Definition at line 101 of file grammar.hpp.

◆ token_kind_name() [2/2]

constexpr const char* lexy::token_kind_name ( predefined_token_kind  kind)
constexprnoexcept

Definition at line 105 of file grammar.hpp.

◆ trace() [1/3]

template<typename Production , typename TokenKind = void, typename Input , typename State >
void lexy::trace ( std::FILE *  file,
const Input &  input,
const State &  state,
visualization_options  opts = {} 
)

Definition at line 499 of file trace.hpp.

◆ trace() [2/3]

template<typename Production , typename TokenKind = void, typename Input , typename State >
void lexy::trace ( std::FILE *  file,
const Input &  input,
State &  state,
visualization_options  opts = {} 
)

Definition at line 494 of file trace.hpp.

◆ trace() [3/3]

template<typename Production , typename TokenKind = void, typename Input >
void lexy::trace ( std::FILE *  file,
const Input &  input,
visualization_options  opts = {} 
)

Definition at line 489 of file trace.hpp.

◆ trace_to() [1/3]

template<typename Production , typename TokenKind = void, typename OutputIt , typename Input , typename State >
OutputIt lexy::trace_to ( OutputIt  out,
const Input &  input,
const State &  state,
visualization_options  opts = {} 
)

Definition at line 481 of file trace.hpp.

◆ trace_to() [2/3]

template<typename Production , typename TokenKind = void, typename OutputIt , typename Input , typename State >
OutputIt lexy::trace_to ( OutputIt  out,
const Input &  input,
State &  state,
visualization_options  opts = {} 
)

Definition at line 475 of file trace.hpp.

◆ trace_to() [3/3]

template<typename Production , typename TokenKind = void, typename OutputIt , typename Input >
OutputIt lexy::trace_to ( OutputIt  out,
const Input &  input,
visualization_options  opts = {} 
)

Definition at line 469 of file trace.hpp.

◆ try_match_token()

template<typename TokenRule , typename Reader >
constexpr LEXY_FORCE_INLINE auto lexy::try_match_token ( TokenRule  ,
Reader &  reader 
)
constexpr

Definition at line 245 of file dsl/base.hpp.

◆ validate() [1/3]

template<typename Production , typename Input , typename ErrorCallback >
constexpr auto lexy::validate ( const Input &  input,
const ErrorCallback &  callback 
) -> validate_result<ErrorCallback>
constexpr

Definition at line 299 of file validate.hpp.

◆ validate() [2/3]

template<typename Production , typename Input , typename State , typename ErrorCallback >
constexpr auto lexy::validate ( const Input &  input,
const State &  state,
const ErrorCallback &  callback 
) -> validate_result<ErrorCallback>
constexpr

Definition at line 312 of file validate.hpp.

◆ validate() [3/3]

template<typename Production , typename Input , typename State , typename ErrorCallback >
constexpr auto lexy::validate ( const Input &  input,
State &  state,
const ErrorCallback &  callback 
) -> validate_result<ErrorCallback>
constexpr

Definition at line 306 of file validate.hpp.

◆ visualization_display_width()

template<typename T >
std::size_t lexy::visualization_display_width ( const T &  obj,
visualization_options  opts = {} 
)

Definition at line 675 of file visualize.hpp.

◆ visualize()

template<typename T >
void lexy::visualize ( std::FILE *  file,
const T &  obj,
visualization_options  opts = {} 
)

Writes the visualization to the FILE.

Definition at line 665 of file visualize.hpp.

◆ visualize_to() [1/3]

template<typename OutputIt , typename Tree , typename = decltype(LEXY_DECLVAL(Tree&).traverse())>
OutputIt lexy::visualize_to ( OutputIt  out,
const Tree &  tree,
visualization_options  opts = {} 
)

Definition at line 494 of file visualize.hpp.

◆ visualize_to() [2/3]

template<typename OutputIt >
OutputIt lexy::visualize_to ( OutputIt  out,
lexy::code_point  cp,
visualization_options  opts = {} 
)

Definition at line 194 of file visualize.hpp.

◆ visualize_to() [3/3]

template<typename OutputIt , typename Reader >
OutputIt lexy::visualize_to ( OutputIt  out,
lexy::lexeme< Reader >  lexeme,
[[maybe_unused] ] visualization_options  opts = {} 
)

Definition at line 349 of file visualize.hpp.

◆ zstring_input() [1/2]

template<typename Encoding , typename CharT >
constexpr string_input<Encoding> lexy::zstring_input ( const CharT *  str)
constexprnoexcept

Definition at line 89 of file string_input.hpp.

◆ zstring_input() [2/2]

template<typename CharT >
constexpr auto lexy::zstring_input ( const CharT *  str)
constexprnoexcept

Definition at line 98 of file string_input.hpp.

Variable Documentation

◆ _has_append

template<typename Container >
constexpr auto lexy::_has_append = _detail::is_detected<_detect_append, Container>
constexpr

Definition at line 21 of file container.hpp.

◆ _has_reserve

template<typename Container >
constexpr auto lexy::_has_reserve = _detail::is_detected<_detect_reserve, Container>
constexpr

Definition at line 16 of file container.hpp.

◆ _has_special_token_kind

template<typename TokenRule >
constexpr auto lexy::_has_special_token_kind
constexpr
Initial value:
= [] {
using kind = LEXY_DECAY_DECLTYPE(lexy::token_kind_of<TokenRule>);
return !std::is_same_v<kind, lexy::predefined_token_kind> && std::is_enum_v<kind>;
}()

Definition at line 92 of file token.hpp.

◆ _is_convertible

template<typename To , typename... Args>
constexpr auto lexy::_is_convertible = false
inlineconstexpr

Definition at line 249 of file grammar.hpp.

◆ _is_convertible< To, Arg >

template<typename To , typename Arg >
constexpr auto lexy::_is_convertible< To, Arg > = std::is_convertible_v<Arg, To>
inlineconstexpr

Definition at line 251 of file grammar.hpp.

◆ _is_convertible< void >

template<>
constexpr auto lexy::_is_convertible< void > = true
inlineconstexpr

Definition at line 253 of file grammar.hpp.

◆ _production_defines_whitespace

template<typename Production >
constexpr auto lexy::_production_defines_whitespace = lexy::_detail::is_detected<_detect_whitespace, Production>
constexpr

Definition at line 224 of file grammar.hpp.

◆ _require_branch_rule

template<typename... T>
constexpr bool lexy::_require_branch_rule = (is_branch_rule<T> && ...)
constexpr

Definition at line 70 of file grammar.hpp.

◆ as_aggregate

template<typename T >
constexpr auto lexy::as_aggregate = _as_aggregate<T>{}
constexpr

A callback with sink that creates an aggregate.

Definition at line 68 of file aggregate.hpp.

◆ as_collection

template<typename T >
constexpr auto lexy::as_collection = _collection<T>{}
constexpr

A callback with sink that creates an unordered collection of things (e.g. a std::set, std::unordered_map, etc.). It repeatedly calls insert() and emplace().

Definition at line 302 of file container.hpp.

◆ as_integer

template<typename T >
constexpr auto lexy::as_integer = _int<T>{}
constexpr

Definition at line 40 of file callback/integer.hpp.

◆ as_list

template<typename Container >
constexpr auto lexy::as_list = _list<Container>{}
constexpr

A callback with sink that creates a list of things (e.g. a std::vector, std::list, etc.). It repeatedly calls push_back() and emplace_back().

Definition at line 161 of file container.hpp.

◆ as_string

template<typename String , typename Encoding = deduce_encoding<_string_char_type<String>>>
constexpr auto lexy::as_string = _as_string<String, Encoding>{}
constexpr

A callback with sink that creates a string (e.g. std::string). As a callback, it converts a lexeme into the string. As a sink, it repeatedly calls .push_back() for individual characters, or .append() for lexemes or other strings.

Definition at line 206 of file string.hpp.

◆ bit_cast

template<typename T >
constexpr auto lexy::bit_cast = _bit_cast<T>{}
constexpr

std::bit_cast as a callback.

Definition at line 76 of file bit_cast.hpp.

◆ char_type_compatible_with_reader

template<typename Reader , typename CharT >
constexpr bool lexy::char_type_compatible_with_reader
constexpr
Initial value:
= (std::is_same_v<CharT, typename Reader::encoding::char_type>)
|| Reader::encoding::template is_secondary_char_type<CharT>()

Definition at line 113 of file input/base.hpp.

◆ concat

template<typename Container >
constexpr auto lexy::concat = _concat<Container>{}
constexpr

Definition at line 407 of file container.hpp.

◆ construct

template<typename T >
constexpr auto lexy::construct = _construct<T>{}
constexpr

A callback that constructs an object of type T by forwarding the arguments.

Definition at line 57 of file object.hpp.

◆ count

constexpr auto lexy::count = fold_inplace<std::size_t>(0u, [](std::size_t& result, auto&&...) { ++result; })
constexpr

Sink that counts all arguments.

Definition at line 88 of file fold.hpp.

◆ forward

template<typename T >
constexpr auto lexy::forward = _fwd<T>{}
constexpr

A callback that just forwards an existing object.

Definition at line 47 of file forward.hpp.

◆ input_is_view

template<typename Input >
constexpr bool lexy::input_is_view = std::is_trivially_copyable_v<Input>
constexpr

Definition at line 109 of file input/base.hpp.

◆ input_is_view< range_input< Encoding, Iterator, Sentinel > >

template<typename Encoding , typename Iterator , typename Sentinel >
constexpr bool lexy::input_is_view< range_input< Encoding, Iterator, Sentinel > > = true
constexpr

Definition at line 55 of file range_input.hpp.

◆ is_branch_rule

template<typename T >
constexpr bool lexy::is_branch_rule = std::is_base_of_v<dsl::branch_base, T>
constexpr

Definition at line 49 of file grammar.hpp.

◆ is_byte_encoding

template<typename Encoding >
constexpr auto lexy::is_byte_encoding = std::is_same_v<Encoding, byte_encoding>
constexpr

Definition at line 270 of file encoding.hpp.

◆ is_callback

template<typename T >
constexpr bool lexy::is_callback = _detail::is_detected<_detect_callback, T>
constexpr

Definition at line 16 of file callback/base.hpp.

◆ is_callback_for

template<typename T , typename... Args>
constexpr bool lexy::is_callback_for = _detail::is_detected<_detect_callback_for, std::decay_t<T>, Args...>
constexpr

Definition at line 22 of file callback/base.hpp.

◆ is_callback_state

template<typename T , typename State >
constexpr bool lexy::is_callback_state = _detail::is_detected<_detect_callback_state, T, std::decay_t<State>>
constexpr

Definition at line 28 of file callback/base.hpp.

◆ is_callback_with_state_for

template<typename T , typename State , typename... Args>
constexpr bool lexy::is_callback_with_state_for = _detail::is_detected<_detect_callback_with_state_for, std::decay_t<T>, State, Args...>
constexpr

Definition at line 35 of file callback/base.hpp.

◆ is_char_class_rule

template<typename T >
constexpr bool lexy::is_char_class_rule = std::is_base_of_v<dsl::_char_class_base, T>
constexpr

Definition at line 57 of file grammar.hpp.

◆ is_char_encoding

template<typename Encoding >
constexpr auto lexy::is_char_encoding = is_text_encoding<Encoding> || is_byte_encoding<Encoding>
constexpr

Definition at line 273 of file encoding.hpp.

◆ is_literal_rule

template<typename T >
constexpr bool lexy::is_literal_rule = std::is_base_of_v<dsl::_lit_base, T>
constexpr

Definition at line 59 of file grammar.hpp.

◆ is_literal_set_rule

template<typename T >
constexpr bool lexy::is_literal_set_rule = std::is_base_of_v<dsl::_lset_base, T>
constexpr

Definition at line 61 of file grammar.hpp.

◆ is_node_encoding

template<typename Encoding >
constexpr auto lexy::is_node_encoding = false
constexpr

Definition at line 276 of file encoding.hpp.

◆ is_node_encoding< parse_tree_encoding< Node > >

template<typename Node >
constexpr auto lexy::is_node_encoding< parse_tree_encoding< Node > > = true
constexpr

Definition at line 68 of file parse_tree_input.hpp.

◆ is_operation

template<typename T >
constexpr auto lexy::is_operation = std::is_base_of_v<lexy::dsl::_operation_base, T>
constexpr

Definition at line 67 of file grammar.hpp.

◆ is_production

template<typename Production >
constexpr bool lexy::is_production = _detail::is_detected<production_rule, Production>
constexpr

Definition at line 150 of file grammar.hpp.

◆ is_rule

template<typename T >
constexpr bool lexy::is_rule = std::is_base_of_v<dsl::rule_base, T>
constexpr

Definition at line 46 of file grammar.hpp.

◆ is_separator

template<typename T >
constexpr auto lexy::is_separator = std::is_base_of_v<lexy::dsl::_sep_base, T>
constexpr

Definition at line 64 of file grammar.hpp.

◆ is_sink

template<typename T , typename... Args>
constexpr bool lexy::is_sink = _detail::is_detected<_detect_sink, T, Args...>
constexpr

Definition at line 50 of file callback/base.hpp.

◆ is_sink_callback_for

template<typename T , typename... Args>
constexpr bool lexy::is_sink_callback_for = _detail::is_detected<_detect_sink_callback_for, std::decay_t<T>, Args...>
constexpr

Definition at line 45 of file callback/base.hpp.

◆ is_text_encoding

template<typename Encoding >
constexpr auto lexy::is_text_encoding = is_unicode_encoding<Encoding> || std::is_same_v<Encoding, default_encoding>
constexpr

Definition at line 267 of file encoding.hpp.

◆ is_token_production

template<typename Production >
constexpr bool lexy::is_token_production = std::is_base_of_v<token_production, Production>
constexpr

Definition at line 160 of file grammar.hpp.

◆ is_token_rule

template<typename T >
constexpr bool lexy::is_token_rule = std::is_base_of_v<dsl::_token_base, T>
constexpr

Definition at line 54 of file grammar.hpp.

◆ is_transparent_production

template<typename Production >
constexpr bool lexy::is_transparent_production = std::is_base_of_v<transparent_production, Production>
constexpr

Definition at line 169 of file grammar.hpp.

◆ is_unconditional_branch_rule

template<typename T >
constexpr bool lexy::is_unconditional_branch_rule = std::is_base_of_v<dsl::unconditional_branch_base, T>
constexpr

Definition at line 51 of file grammar.hpp.

◆ is_unicode_encoding

template<typename Encoding >
constexpr auto lexy::is_unicode_encoding
constexpr
Initial value:
= std::is_same_v<Encoding, ascii_encoding> || std::is_same_v<Encoding, utf8_encoding>
|| std::is_same_v<Encoding, utf8_char_encoding> || std::is_same_v<Encoding, utf16_encoding>
|| std::is_same_v<Encoding, utf32_encoding>

Definition at line 261 of file encoding.hpp.

◆ make_buffer_from_raw

template<typename Encoding , encoding_endianness Endianness>
constexpr auto lexy::make_buffer_from_raw = _make_buffer<Encoding, Endianness>{}
constexpr

Creates a buffer with the specified encoding/endianness from raw memory.

Definition at line 453 of file buffer.hpp.

◆ new_

template<typename T , typename PtrT = T*>
constexpr auto lexy::new_ = _new<T, PtrT>{}
constexpr

A callback that constructs an object of type T on the heap by forwarding the arguments.

Definition at line 94 of file object.hpp.

◆ no_parse_state

constexpr void* lexy::no_parse_state = nullptr
constexpr

Definition at line 198 of file action/base.hpp.

◆ noop

constexpr auto lexy::noop = _noop{}
inlineconstexpr

A callback with sink that does nothing.

Definition at line 30 of file noop.hpp.

◆ nth_value

template<std::size_t N>
constexpr auto lexy::nth_value = _nth_value<N, void, void>{}
constexpr

Placeholder for bind that expands to the nth value produced by the rule.

Definition at line 230 of file bind.hpp.

◆ parse_state

constexpr auto lexy::parse_state = _parse_state<void>{}
constexpr

Definition at line 275 of file bind.hpp.

◆ production_has_value_callback

template<typename Production , typename ParseState = void>
constexpr bool lexy::production_has_value_callback
constexpr
Initial value:
= lexy::_detail::is_detected<_detect_value_of, ParseState, Production>
|| lexy::_detail::is_detected<_detect_value, Production>

Definition at line 292 of file grammar.hpp.

◆ scan_failed

constexpr struct lexy::scan_failed_t lexy::scan_failed

◆ symbol_table

template<typename T >
constexpr auto lexy::symbol_table = _symbol_table<T, _detail::lit_no_case_fold>{}
constexpr

Definition at line 244 of file symbol.hpp.

◆ token_kind_map

constexpr auto lexy::token_kind_map = _tk_map_empty{}
inlineconstexpr

Definition at line 78 of file token.hpp.

◆ token_kind_map_for

template<typename TokenKind >
constexpr auto lexy::token_kind_map_for = token_kind_map
constexpr

A mapping of token rule to token kind; specialize for your own kinds.

Definition at line 82 of file token.hpp.

◆ token_kind_map_for< void >

template<>
constexpr auto lexy::token_kind_map_for< void > = token_kind_map
inlineconstexpr

Definition at line 86 of file token.hpp.

◆ token_kind_of

template<typename TokenRule >
constexpr auto lexy::token_kind_of< lexy::dsl::_until< Condition > > = lexy::unknown_token_kind
constexpr

Specialize to define the token kind of a rule.

Definition at line 137 of file grammar.hpp.

◆ token_kind_of< const TokenRule >

template<typename TokenRule >
constexpr auto lexy::token_kind_of< const TokenRule > = token_kind_of<TokenRule>
constexpr

Definition at line 140 of file grammar.hpp.

◆ values

constexpr auto lexy::values = _detail::all_values_placeholder{}
constexpr

Placeholder for bind that expands to all values produced by the rule.

Definition at line 100 of file bind.hpp.

LEXY_DECAY_DECLTYPE
#define LEXY_DECAY_DECLTYPE(...)
Definition: config.hpp:34


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:19