ExpressionParser
INCLUDE FILE
#include "ExpressionParser.h"
class ExpressionParser
DEFINITION
class ExpressionParser;
class BinaryOperatorprivate
DEFINITION
class BinaryOperator;
constructor BinaryOperator
DEFINITION
| BinaryOperator | ( | BinaryExpression::Operation operation, | |
| int level | ); |
| PARAMETER | DESCRIPTION |
|---|---|
operation |
|
level |
member level
DEFINITION
int level;
member operation
DEFINITION
BinaryExpression::Operation operation;
class Elementprivate
DEFINITION
class Element;
constructor Element
DEFINITION
| Element | ( | const Location & location, | |
| BinaryOperator binary | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
binary |
constructor Element
DEFINITION
| Element | ( | const Location & location, | |
| ElementType type | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
type |
constructor Element
DEFINITION
| Element | ( | const Location & location, | |
| UnaryExpression::Operation unary | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
unary |
constructor Element
DEFINITION
| Element | ( | const Expression & node, | |
| int level = 0, | |||
| ElementType type = OPERAND | ); |
| PARAMETER | DESCRIPTION |
|---|---|
node |
|
level |
|
type |
constructor Element
DEFINITION
| Element | ( | const Token & token, | |
| ElementType type = OPERAND | ); |
| PARAMETER | DESCRIPTION |
|---|---|
token |
|
type |
method descriptionconst
DEFINITION
| const char * description | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
const char * |
method is_binary_operatorconst
DEFINITION
| bool is_binary_operator | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method is_operandconst
DEFINITION
| bool is_operand | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method is_unary_operatorconst
DEFINITION
| bool is_unary_operator | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
member arguments
DEFINITION
std::vector< Expression > arguments;
member binary
DEFINITION
BinaryOperator binary;
member level
DEFINITION
int level;
member location
DEFINITION
Location location;
member node
DEFINITION
Expression node;
member none
DEFINITION
int none;
member operation
DEFINITION
union ExpressionParser::Element::@361161000317077212171372275022333040324041164215 operation;
member type
DEFINITION
ElementType type;
member unary
DEFINITION
UnaryExpression::Operation unary;
enum ElementType
DEFINITION
enum ElementType;
| VALUE | DESCRIPTION |
|---|---|
BINARY_OPERATOR |
|
COMMA |
|
END |
|
FUNCTION_CALL |
|
OPERAND |
|
PARENTHESIS_CLOSED |
|
PARENTHESIS_OPEN |
|
START |
|
UNARY_OPERATOR |
|
UNNAMED_LABEL |
constructor ExpressionParser
DEFINITION
| ExpressionParser | ( | Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
|---|---|
tokenizer |
method do_parseprivate
DEFINITION
| Expression do_parse | ( | ); |
| RETURNS | DESCRIPTION |
|---|---|
Expression |
method initializestatic private
DEFINITION
| static void initialize | ( | ); |
method next_elementconst private
DEFINITION
| Element next_element | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
Element |
method parse
DEFINITION
| Expression parse | ( | ); |
| RETURNS | DESCRIPTION |
|---|---|
Expression |
method parse
DEFINITION
| Expression parse | ( | const Expression & left | ); |
| PARAMETER | DESCRIPTION |
|---|---|
left |
| RETURNS | DESCRIPTION |
|---|---|
Expression |
method parse_encodingconst
DEFINITION
| std::optional< Encoder > parse_encoding | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Encoder > |
method parse_list
DEFINITION
| Body parse_list | ( | ); |
| RETURNS | DESCRIPTION |
|---|---|
Body |
method reduce_argument_listprivate
DEFINITION
| void reduce_argument_list | ( | ); |
method reduce_binaryprivate
DEFINITION
| void reduce_binary | ( | int up_to_level | ); |
| PARAMETER | DESCRIPTION |
|---|---|
up_to_level |
method reduce_function_callprivate
DEFINITION
| void reduce_function_call | ( | ); |
method reduce_unaryprivate
DEFINITION
| void reduce_unary | ( | const Element & next | ); |
| PARAMETER | DESCRIPTION |
|---|---|
next |
method setupstatic
DEFINITION
| static void setup | ( | FileTokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
|---|---|
tokenizer |
method shiftprivate
DEFINITION
| void shift | ( | Element next | ); |
| PARAMETER | DESCRIPTION |
|---|---|
next |
member binary_operatorsstatic private
DEFINITION
static std::unordered_map< Token, BinaryOperator > binary_operators;
member initializedstatic private
DEFINITION
static bool initialized;
member stackprivate
DEFINITION
std::vector< Element > stack;
member token_big_endianstatic private
DEFINITION
static const Token token_big_endian;
member token_falsestatic private
DEFINITION
static const Token token_false;
member token_little_endianstatic private
DEFINITION
static const Token token_little_endian;
member token_modstatic private
DEFINITION
static const Token token_mod;
member token_nonestatic private
DEFINITION
static const Token token_none;
member token_stringstatic private
DEFINITION
static const Token token_string;
member token_truestatic private
DEFINITION
static const Token token_true;
member tokenizerprivate
DEFINITION
Tokenizer & tokenizer;
member topprivate
DEFINITION
Element top;
member unary_operatorsstatic private
DEFINITION
static std::unordered_map< Token, UnaryExpression::Operation > unary_operators;
class BinaryOperatorprivate
DEFINITION
class BinaryOperator;
constructor BinaryOperator
DEFINITION
| BinaryOperator | ( | BinaryExpression::Operation operation, | |
| int level | ); |
| PARAMETER | DESCRIPTION |
|---|---|
operation |
|
level |
member level
DEFINITION
int level;
member operation
DEFINITION
BinaryExpression::Operation operation;
class Elementprivate
DEFINITION
class Element;
constructor Element
DEFINITION
| Element | ( | const Location & location, | |
| BinaryOperator binary | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
binary |
constructor Element
DEFINITION
| Element | ( | const Location & location, | |
| ElementType type | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
type |
constructor Element
DEFINITION
| Element | ( | const Location & location, | |
| UnaryExpression::Operation unary | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
unary |
constructor Element
DEFINITION
| Element | ( | const Expression & node, | |
| int level = 0, | |||
| ElementType type = OPERAND | ); |
| PARAMETER | DESCRIPTION |
|---|---|
node |
|
level |
|
type |
constructor Element
DEFINITION
| Element | ( | const Token & token, | |
| ElementType type = OPERAND | ); |
| PARAMETER | DESCRIPTION |
|---|---|
token |
|
type |
method descriptionconst
DEFINITION
| const char * description | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
const char * |
method is_binary_operatorconst
DEFINITION
| bool is_binary_operator | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method is_operandconst
DEFINITION
| bool is_operand | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method is_unary_operatorconst
DEFINITION
| bool is_unary_operator | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
member arguments
DEFINITION
std::vector< Expression > arguments;
member binary
DEFINITION
BinaryOperator binary;
member level
DEFINITION
int level;
member location
DEFINITION
Location location;
member node
DEFINITION
Expression node;
member none
DEFINITION
int none;
member operation
DEFINITION
union ExpressionParser::Element::@361161000317077212171372275022333040324041164215 operation;
member type
DEFINITION
ElementType type;
member unary
DEFINITION
UnaryExpression::Operation unary;