OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
client::parser::expression< Iterator > Struct Template Reference

#include <expression.hpp>

Public Member Functions

 expression (error_handler< Iterator > &error_handler)
 
bool parse (Iterator &first, Iterator last, ast::expression &attr)
 

Private Member Functions

void skip_ws (Iterator &it, Iterator last) const
 
bool match (Iterator &it, Iterator last, char c) const
 
bool match_word (Iterator &it, Iterator last, char const *word) const
 
bool match_op_token (Iterator &it, Iterator last, char const *token) const
 
bool try_identifier_token (Iterator &it, Iterator last, std::string &word) const
 
template<typename NextLevel , typename OpMatcher >
bool parse_level (Iterator &it, Iterator last, ast::expression &out, NextLevel next, OpMatcher match_op)
 
bool parse_expr (Iterator &it, Iterator last, ast::expression &out)
 
bool parse_logical_or (Iterator &it, Iterator last, ast::expression &out)
 
bool parse_logical_and (Iterator &it, Iterator last, ast::expression &out)
 
bool parse_equality (Iterator &it, Iterator last, ast::expression &out)
 
bool parse_relational (Iterator &it, Iterator last, ast::expression &out)
 
bool parse_additive (Iterator &it, Iterator last, ast::expression &out)
 
bool parse_multiplicative (Iterator &it, Iterator last, ast::expression &out)
 
bool parse_unary (Iterator &it, Iterator last, ast::operand &out)
 
bool parse_primary (Iterator &it, Iterator last, ast::operand &out)
 
bool parse_constant (Iterator &it, Iterator last, ast::operand &out)
 
bool parse_argument_list (Iterator &it, Iterator last, std::list< ast::function_call_argument > &out)
 
bool parse_call_argument (Iterator &it, Iterator last, ast::function_call_argument &out)
 
bool parse_quoted_string (Iterator &it, Iterator last, std::string &out)
 

Static Private Member Functions

static ast::operand to_operand (ast::expression &&e)
 

Private Attributes

error_handler< Iterator > & error_handler_
 
annotation< Iterator > annotation_
 

Detailed Description

template<typename Iterator>
struct client::parser::expression< Iterator >

Definition at line 36 of file expression.hpp.

Constructor & Destructor Documentation

◆ expression()

template<typename Iterator >
client::parser::expression< Iterator >::expression ( error_handler< Iterator > &  error_handler)
explicit

Definition at line 12 of file expression_def.hpp.

Member Function Documentation

◆ match()

template<typename Iterator >
bool client::parser::expression< Iterator >::match ( Iterator &  it,
Iterator  last,
char  c 
) const
private

Definition at line 39 of file expression_def.hpp.

◆ match_op_token()

template<typename Iterator >
bool client::parser::expression< Iterator >::match_op_token ( Iterator &  it,
Iterator  last,
char const *  token 
) const
private

Definition at line 50 of file expression_def.hpp.

◆ match_word()

template<typename Iterator >
bool client::parser::expression< Iterator >::match_word ( Iterator &  it,
Iterator  last,
char const *  word 
) const
private

Definition at line 67 of file expression_def.hpp.

◆ parse()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse ( Iterator &  first,
Iterator  last,
ast::expression< Iterator > &  attr 
)

Parses an expression starting at first. On success, first is advanced past the consumed input and attr is filled in; on failure first is left unchanged and false is returned.

Definition at line 479 of file expression_def.hpp.

Referenced by Expression::parse().

◆ parse_additive()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_additive ( Iterator &  it,
Iterator  last,
ast::expression< Iterator > &  out 
)
private

Definition at line 215 of file expression_def.hpp.

References client::ast::op_minus, and client::ast::op_plus.

◆ parse_argument_list()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_argument_list ( Iterator &  it,
Iterator  last,
std::list< ast::function_call_argument > &  out 
)
private

Definition at line 419 of file expression_def.hpp.

References arg().

Here is the call graph for this function:

◆ parse_call_argument()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_call_argument ( Iterator &  it,
Iterator  last,
ast::function_call_argument &  out 
)
private

Definition at line 397 of file expression_def.hpp.

◆ parse_constant()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_constant ( Iterator &  it,
Iterator  last,
ast::operand &  out 
)
private

Definition at line 278 of file expression_def.hpp.

References end().

Here is the call graph for this function:

◆ parse_equality()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_equality ( Iterator &  it,
Iterator  last,
ast::expression< Iterator > &  out 
)
private

Definition at line 189 of file expression_def.hpp.

References client::ast::op_equal, and client::ast::op_not_equal.

◆ parse_expr()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_expr ( Iterator &  it,
Iterator  last,
ast::expression< Iterator > &  out 
)
private

Definition at line 473 of file expression_def.hpp.

◆ parse_level()

template<typename Iterator >
template<typename NextLevel , typename OpMatcher >
bool client::parser::expression< Iterator >::parse_level ( Iterator &  it,
Iterator  last,
ast::expression< Iterator > &  out,
NextLevel  next,
OpMatcher  match_op 
)
private

◆ parse_logical_and()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_logical_and ( Iterator &  it,
Iterator  last,
ast::expression< Iterator > &  out 
)
private

Definition at line 178 of file expression_def.hpp.

References client::ast::op_and.

◆ parse_logical_or()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_logical_or ( Iterator &  it,
Iterator  last,
ast::expression< Iterator > &  out 
)
private

Definition at line 167 of file expression_def.hpp.

References client::ast::op_or.

◆ parse_multiplicative()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_multiplicative ( Iterator &  it,
Iterator  last,
ast::expression< Iterator > &  out 
)
private

◆ parse_primary()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_primary ( Iterator &  it,
Iterator  last,
ast::operand &  out 
)
private

◆ parse_quoted_string()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_quoted_string ( Iterator &  it,
Iterator  last,
std::string &  out 
)
private

Definition at line 448 of file expression_def.hpp.

◆ parse_relational()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_relational ( Iterator &  it,
Iterator  last,
ast::expression< Iterator > &  out 
)
private

◆ parse_unary()

template<typename Iterator >
bool client::parser::expression< Iterator >::parse_unary ( Iterator &  it,
Iterator  last,
ast::operand &  out 
)
private

◆ skip_ws()

template<typename Iterator >
void client::parser::expression< Iterator >::skip_ws ( Iterator &  it,
Iterator  last 
) const
private

Definition at line 19 of file expression_def.hpp.

◆ to_operand()

template<typename Iterator >
ast::operand client::parser::expression< Iterator >::to_operand ( ast::expression< Iterator > &&  e)
staticprivate

Definition at line 109 of file expression_def.hpp.

◆ try_identifier_token()

template<typename Iterator >
bool client::parser::expression< Iterator >::try_identifier_token ( Iterator &  it,
Iterator  last,
std::string &  word 
) const
private

Definition at line 87 of file expression_def.hpp.

Member Data Documentation

◆ annotation_

template<typename Iterator >
annotation<Iterator> client::parser::expression< Iterator >::annotation_
private

Definition at line 47 of file expression.hpp.

◆ error_handler_

template<typename Iterator >
error_handler<Iterator>& client::parser::expression< Iterator >::error_handler_
private

Definition at line 46 of file expression.hpp.


The documentation for this struct was generated from the following files: