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

Namespaces

 _detail
 

Classes

class  _filtered_node_range
 
struct  _report_error
 
struct  default_prompt
 Prompt using stdin and stdout. More...
 
class  diagnostic_writer
 Formats and writes diagnostic messages. More...
 
class  parse_tree_desc
 
class  shell
 Reads input from an interactive shell. More...
 

Typedefs

template<typename Tag >
using compiler_explorer_error = lexy::buffer_error< Tag, lexy::utf8_encoding >
 
template<typename Production >
using compiler_explorer_error_context = lexy::buffer_error_context< Production, lexy::utf8_encoding >
 
using compiler_explorer_lexeme = lexy::buffer_lexeme< lexy::utf8_encoding >
 
template<typename Tag , typename Prompt = default_prompt<>>
using shell_error = lexy::error_for< shell< Prompt >, Tag >
 
template<typename Prompt = default_prompt<>>
using shell_error_context = lexy::error_context< shell< Prompt > >
 
template<typename Prompt = default_prompt<>>
using shell_lexeme = lexy::lexeme_for< shell< Prompt > >
 

Enumerations

enum  annotation_kind { annotation_kind::primary, annotation_kind::secondary }
 Classifies a source code annotation. More...
 
enum  diagnostic_kind {
  diagnostic_kind::error, diagnostic_kind::warning, diagnostic_kind::note, diagnostic_kind::info,
  diagnostic_kind::debug, diagnostic_kind::fixit, diagnostic_kind::help
}
 The kind of diagnostic message. More...
 

Functions

template<typename Predicate , typename Iterator , typename Sentinel >
 _filtered_node_range (Predicate &&pred, Iterator begin, Sentinel end) noexcept -> _filtered_node_range< std::decay_t< Predicate >, Iterator, Sentinel >
 
template<typename Reader , typename TokenKind , typename MemoryResource , typename Predicate >
auto child (const lexy::parse_tree< Reader, TokenKind, MemoryResource > &tree, typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node node, Predicate predicate) -> std::optional< typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node >
 Returns the first child that matches predicate, if there is any. More...
 
template<typename Reader , typename TokenKind , typename MemoryResource , typename Predicate >
auto children (const lexy::parse_tree< Reader, TokenKind, MemoryResource > &, typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node node, Predicate predicate)
 
lexy::buffer< lexy::utf8_encodingcompiler_explorer_input ()
 
template<typename Reader , typename TokenKind , typename MemoryResource >
auto find_covering_node (const lexy::parse_tree< Reader, TokenKind, MemoryResource > &tree, typename Reader::iterator position) -> typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node
 
template<typename Reader , typename TokenKind , typename MemoryResource >
auto node_position (const lexy::parse_tree< Reader, TokenKind, MemoryResource > &tree, typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node node) -> typename Reader::iterator
 
template<typename Reader , typename TokenKind , typename MemoryResource >
auto tokens (const lexy::parse_tree< Reader, TokenKind, MemoryResource > &tree)
 
template<typename Reader , typename TokenKind , typename MemoryResource >
auto tokens (const lexy::parse_tree< Reader, TokenKind, MemoryResource > &tree, typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node node)
 

Variables

constexpr auto report_error = _report_error<lexy::stderr_output_iterator>{}
 An error callback that uses diagnostic_writer to print to stderr (by default). More...
 

Typedef Documentation

◆ compiler_explorer_error

template<typename Tag >
using lexy_ext::compiler_explorer_error = typedef lexy::buffer_error<Tag, lexy::utf8_encoding>

Definition at line 53 of file compiler_explorer.hpp.

◆ compiler_explorer_error_context

template<typename Production >
using lexy_ext::compiler_explorer_error_context = typedef lexy::buffer_error_context<Production, lexy::utf8_encoding>

Definition at line 56 of file compiler_explorer.hpp.

◆ compiler_explorer_lexeme

Definition at line 50 of file compiler_explorer.hpp.

◆ shell_error

template<typename Tag , typename Prompt = default_prompt<>>
using lexy_ext::shell_error = typedef lexy::error_for<shell<Prompt>, Tag>

Definition at line 415 of file shell.hpp.

◆ shell_error_context

template<typename Prompt = default_prompt<>>
using lexy_ext::shell_error_context = typedef lexy::error_context<shell<Prompt> >

Definition at line 418 of file shell.hpp.

◆ shell_lexeme

template<typename Prompt = default_prompt<>>
using lexy_ext::shell_lexeme = typedef lexy::lexeme_for<shell<Prompt> >

Definition at line 412 of file shell.hpp.

Enumeration Type Documentation

◆ annotation_kind

Classifies a source code annotation.

Enumerator
primary 
secondary 

Definition at line 28 of file report_error.hpp.

◆ diagnostic_kind

The kind of diagnostic message.

Enumerator
error 
warning 
note 
info 
debug 
fixit 
help 

Definition at line 16 of file report_error.hpp.

Function Documentation

◆ _filtered_node_range()

template<typename Predicate , typename Iterator , typename Sentinel >
lexy_ext::_filtered_node_range ( Predicate &&  pred,
Iterator  begin,
Sentinel  end 
) -> _filtered_node_range< std::decay_t< Predicate >, Iterator, Sentinel >
noexcept

◆ child()

template<typename Reader , typename TokenKind , typename MemoryResource , typename Predicate >
auto lexy_ext::child ( const lexy::parse_tree< Reader, TokenKind, MemoryResource > &  tree,
typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node  node,
Predicate  predicate 
) -> std::optional<typename lexy::parse_tree<Reader, TokenKind, MemoryResource>::node>

Returns the first child that matches predicate, if there is any.

Definition at line 244 of file parse_tree_algorithm.hpp.

◆ children()

template<typename Reader , typename TokenKind , typename MemoryResource , typename Predicate >
auto lexy_ext::children ( const lexy::parse_tree< Reader, TokenKind, MemoryResource > &  ,
typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node  node,
Predicate  predicate 
)

Returns the children that of node that match the predicate.

If predicate is a token kind, keeps only children of the same token kind. If predicate is a production, keeps only children of that production. Otherwise, predicate is a function object that is invoked with the node.

Definition at line 227 of file parse_tree_algorithm.hpp.

◆ compiler_explorer_input()

lexy::buffer<lexy::utf8_encoding> lexy_ext::compiler_explorer_input ( )

Input that uses Compiler Explorer's stdin. It consumes the entire stdin, which is then at EOF.

Definition at line 16 of file compiler_explorer.hpp.

◆ find_covering_node()

template<typename Reader , typename TokenKind , typename MemoryResource >
auto lexy_ext::find_covering_node ( const lexy::parse_tree< Reader, TokenKind, MemoryResource > &  tree,
typename Reader::iterator  position 
) -> typename lexy::parse_tree<Reader, TokenKind, MemoryResource>::node

Returns the node of the tree that covers the position. It is always a token.

Definition at line 114 of file parse_tree_algorithm.hpp.

◆ node_position()

template<typename Reader , typename TokenKind , typename MemoryResource >
auto lexy_ext::node_position ( const lexy::parse_tree< Reader, TokenKind, MemoryResource > &  tree,
typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node  node 
) -> typename Reader::iterator

Returns the position of a node.

For a token node, this is the beginning of its lexeme. For a production node, this is the position designated by a dsl::position rule, or otherwise the position of its first non-empty child. If a production node is empty, it returns a default constructed iterator.

Definition at line 266 of file parse_tree_algorithm.hpp.

◆ tokens() [1/2]

template<typename Reader , typename TokenKind , typename MemoryResource >
auto lexy_ext::tokens ( const lexy::parse_tree< Reader, TokenKind, MemoryResource > &  tree)

Definition at line 102 of file parse_tree_algorithm.hpp.

◆ tokens() [2/2]

template<typename Reader , typename TokenKind , typename MemoryResource >
auto lexy_ext::tokens ( const lexy::parse_tree< Reader, TokenKind, MemoryResource > &  tree,
typename lexy::parse_tree< Reader, TokenKind, MemoryResource >::node  node 
)

Returns a range that contains only the token nodes that are descendants of the node. If the node is itself a token, returns a range that contains only the node itself.

Definition at line 15 of file parse_tree_algorithm.hpp.

Variable Documentation

◆ report_error

constexpr auto lexy_ext::report_error = _report_error<lexy::stderr_output_iterator>{}
constexpr

An error callback that uses diagnostic_writer to print to stderr (by default).

Definition at line 377 of file report_error.hpp.



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