Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FExpressionGrammar Class Reference

#include <ExpressionParserTypes.h>

+ Collaboration diagram for FExpressionGrammar:

Public Member Functions

template<typename TStartGroup , typename TEndGroup >
void DefineGrouping ()
 
template<typename TExpressionNode >
void DefinePreUnaryOperator ()
 
template<typename TExpressionNode >
void DefinePostUnaryOperator ()
 
template<typename TExpressionNode >
void DefineBinaryOperator (int32 InPrecedence, EAssociativity InAssociativity=EAssociativity::RightToLeft, bool bCanShortCircuit=false)
 
const FGuidGetGrouping (const FGuid &TypeId) const
 
bool HasPreUnaryOperator (const FGuid &TypeId) const
 
bool HasPostUnaryOperator (const FGuid &TypeId) const
 
const FOpParametersGetBinaryOperatorDefParameters (const FGuid &TypeId) const
 

Private Attributes

TMap< FGuid, FGuidGroupings
 
TSet< FGuidPreUnaryOperators
 
TSet< FGuidPostUnaryOperators
 
TMap< FGuid, FOpParametersBinaryOperators
 

Detailed Description

A lexical gammer defining how to parse an expression. Clients must define the tokens and operators to be interpreted by the parser.

Definition at line 520 of file ExpressionParserTypes.h.

Member Function Documentation

◆ DefineBinaryOperator()

void FExpressionGrammar::DefineBinaryOperator ( int32 InPrecedence,
EAssociativity InAssociativity = EAssociativity::RightToLeft,
bool bCanShortCircuit = false )
inline

Define a binary operator for the specified symbol, with the specified precedence and associativity NOTE: Associativity defaults to RightToLeft for legacy reasons.

Parameters
InPrecedenceThe precedence (priority of execution) this operator should have
InAssociativityWith operators of the same precedence, determines whether they execute left to right, or right to left

Definition at line 543 of file ExpressionParserTypes.h.

◆ DefineGrouping()

void FExpressionGrammar::DefineGrouping ( )
inline

Define a grouping operator from two expression node types

Definition at line 525 of file ExpressionParserTypes.h.

◆ DefinePostUnaryOperator()

void FExpressionGrammar::DefinePostUnaryOperator ( )
inline

Define a post-unary operator for the specified symbol

Definition at line 533 of file ExpressionParserTypes.h.

◆ DefinePreUnaryOperator()

void FExpressionGrammar::DefinePreUnaryOperator ( )
inline

Define a pre-unary operator for the specified symbol

Definition at line 529 of file ExpressionParserTypes.h.

◆ GetBinaryOperatorDefParameters()

const FOpParameters * FExpressionGrammar::GetBinaryOperatorDefParameters ( const FGuid & TypeId) const

Get the binary operator precedence and associativity parameters, for the specified symbol, if any

◆ GetGrouping()

const FGuid * FExpressionGrammar::GetGrouping ( const FGuid & TypeId) const

Retrieve the corresponding grouping token for the specified open group type, or nullptr if it's not a group token

◆ HasPostUnaryOperator()

bool FExpressionGrammar::HasPostUnaryOperator ( const FGuid & TypeId) const

Check if this grammar defines a post-unary operator for the specified symbol

◆ HasPreUnaryOperator()

bool FExpressionGrammar::HasPreUnaryOperator ( const FGuid & TypeId) const

Check if this grammar defines a pre-unary operator for the specified symbol

Member Data Documentation

◆ BinaryOperators

TMap<FGuid, FOpParameters> FExpressionGrammar::BinaryOperators
private

Definition at line 580 of file ExpressionParserTypes.h.

◆ Groupings

TMap<FGuid, FGuid> FExpressionGrammar::Groupings
private

Definition at line 577 of file ExpressionParserTypes.h.

◆ PostUnaryOperators

TSet<FGuid> FExpressionGrammar::PostUnaryOperators
private

Definition at line 579 of file ExpressionParserTypes.h.

◆ PreUnaryOperators

TSet<FGuid> FExpressionGrammar::PreUnaryOperators
private

Definition at line 578 of file ExpressionParserTypes.h.


The documentation for this class was generated from the following file: