UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FExpressionGrammar Class Reference

#include <ExpressionParserTypes.h>

Public Member Functions

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

Detailed Description

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

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

◆ DefineGrouping()

void FExpressionGrammar::DefineGrouping ( )
inline

Define a grouping operator from two expression node types

◆ DefinePostUnaryOperator()

void FExpressionGrammar::DefinePostUnaryOperator ( )
inline

Define a post-unary operator for the specified symbol

◆ DefinePreUnaryOperator()

void FExpressionGrammar::DefinePreUnaryOperator ( )
inline

Define a pre-unary operator for the specified symbol

◆ 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


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