8#ifndef HPP_ALIB_EXPRESSIONS_COMPILER
9#define HPP_ALIB_EXPRESSIONS_COMPILER
11#ifndef HPP_ALIB_EXPRESSIONS_EXPRESSION
15#ifndef HPP_ALIB_LANG_PLUGINS
19#if !defined(HPP_ALIB_COMPATIBILITY_STD_TYPEINFO)
23#if !defined(HPP_ALIB_STRINGS_UTIL_TOKEN)
27#if !defined(HPP_ALIB_LANG_FORMAT_FWDS)
31#if !defined(HPP_ALIB_CAMP_MESSAGE_REPORT)
35#if !defined (HPP_ALIB_MONOMEM_HASHMAP)
39#if !defined (HPP_ALIB_MONOMEM_LIST)
43namespace alib {
namespace expressions {
91 #if !defined(ALIB_DOX)
99 using Plugins= std::vector<lang::PluginContainer<CompilerPlugin, CompilePriorities>::Slot>;
153 alib::hash_string_ignore_case<character>,
165 alib::hash_string_ignore_case<character>,
180 if( op.Equals<
false>( symbol ) )
181 ALIB_ASSERT_ERROR(
false,
"EXPR",
"Unary operator {!Q'} already defined.", symbol )
213 "Binary operator {!Q'} already defined.", symbol )
232 "Unknown binary operator {!Q'}.", symbol )
236 "Unknown binary operator {!Q'} which was aliased by {!Q'}.",
237 aliasOp->second, symbol )
void AddBinaryOperator(const String &symbol, int precedence)
HashMap< String, String, alib::hash_string_ignore_case< character >, alib::equal_to_string_ignore_case< character > > AlphabeticUnaryOperatorAliases
HashMap< TypeFunctors::Key, NAString, TypeFunctors::Hash, TypeFunctors::EqualTo > typeMap
List< String > UnaryOperators
virtual ALIB_API SPExpression Compile(const String &expressionString)
HashMap< String, int > BinaryOperators
std::vector< lang::PluginContainer< CompilerPlugin, CompilePriorities >::Slot > Plugins
virtual ALIB_API SPExpression GetNamed(const String &name)
ALIB_API NString TypeName(Type box)
String CfgNestedExpressionOperator
ExpressionRepository * Repository
int GetBinaryOperatorPrecedence(const String &symbol)
ALIB_API void getOptimizedExpressionString(Expression *expression)
ALIB_API void AddType(Type sample, const NString &name)
virtual ALIB_API Scope * getCompileTimeScope()
bool RemoveNamed(const String &name)
Compilation CfgCompilation
strings::util::Token CfgNestedExpressionFunction
virtual ALIB_API bool AddNamed(const String &name, const String &expressionString)
Normalization CfgNormalization
String CfgNestedExpressionThrowIdentifier
ALIB_API void WriteFunctionSignature(Box **boxArray, size_t qty, AString &target)
ALIB_API void SetupDefaults()
virtual ALIB_API ~Compiler()
HashMap< String, String, alib::hash_string_ignore_case< character >, alib::equal_to_string_ignore_case< character > > AlphabeticBinaryOperatorAliases
@ AutoCast
Installs plugins::AutoCast .
@ ALL
Installs all plug-ins.
@ Arithmetics
Installs plugins::Arithmetics .
@ Strings
Installs plugins::Strings .
@ ALIB_IF_CAMP
Installs plugins::DateAndTime . )
@ Math
Installs plugins::Math .
@ NONE
Installs no plug-in.
@ ElvisOperator
Installs plugins::ElvisOperator .
HashMap< AString, SPExpression, std::hash< String >, std::equal_to< String > > namedExpressions
std::vector< AString > CfgNormalizationDisallowed
BuiltInPlugins CfgBuiltInPlugins
void AddUnaryOperator(const String &symbol)
virtual bool Get(const String &identifier, AString &target)=0
virtual ~ExpressionRepository()
#define ALIB_ENUMS_MAKE_BITWISE(TEnum)
#define ALIB_ASSERT_ERROR(cond,...)
std::vector< Box >::iterator ArgIterator
std::shared_ptr< Expression > SPExpression
strings::TAString< nchar > NAString
Type alias in namespace alib.
constexpr String NullString()
std::shared_ptr< lang::format::Formatter > SPFormatter
strings::TAString< character > AString
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
const ::std::type_info * Key