ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
arithmetics.cpp
1// #################################################################################################
2// ALib C++ Library
3//
4// Copyright 2013-2024 A-Worx GmbH, Germany
5// Published under 'Boost Software License' (a free software license, see LICENSE.txt)
6// #################################################################################################
8
9#if !defined(ALIB_DOX)
10#if !defined (HPP_ALIB_EXPRESSIONS_PLUGINS_ARITHMETICS)
12#endif
13
14#include <math.h>
15#endif // !defined(ALIB_DOX)
16
17#if !defined(ALIB_DOX)
18#define ARG0 (*args)
19#define ARG1 (*(args+1))
20#define BOL(box) (box).Unbox<bool >()
21#define INT(box) (box).Unbox<integer>()
22#define ITF(box) static_cast<double>((box).Unbox<integer>() )
23#define BTF(box) static_cast<double>((box).Unbox<bool >() )
24#define FLT(box) (box).Unbox<double >()
25#define FUNC( name,...) Box name( Scope& scope, \
26 ArgIterator args, \
27 ArgIterator end ) \
28 { (void) scope; (void) args; (void) end; __VA_ARGS__ }
29
30#if !ALIB_FEAT_BOXING_BIJECTIVE_INTEGRALS
31# define TOINT(arg) arg
32#else
33# define TOINT(arg) static_cast<integer>(arg)
34#endif
35
36
37namespace alib { namespace expressions { namespace plugins {
38
39
40FUNC( ToBoolean , return args->Call<FIsTrue>(); )
41
42namespace {
43
44
45// #################################################################################################
46// ### Arithmetics - constants
47// #################################################################################################
48
49Box constTrue = true;
50Box constFalse = false;
51Box identity = nullptr;
52Box bool_false = false;
53Box bool_true = true;
54Box int_0 = static_cast<integer>( 0 );
55Box int_1 = static_cast<integer>( 1 );
56Box float_0 = 0.0;
57Box float_1 = 1.0;
58
59
60// #################################################################################################
61// ### Arithmetics - Functions
62// #################################################################################################
63FUNC( toInt_B , return static_cast<integer>(BOL(ARG0)); )
64FUNC( toInt_I , return ARG0; )
65FUNC( toInt_F , return static_cast<integer>(FLT(ARG0)); )
66FUNC( toFloat_B, return static_cast<double >(BOL(ARG0)); )
67FUNC( toFloat_I, return static_cast<double >(INT(ARG0)); )
68FUNC( toFloat_F, return ARG0; )
69
70FUNC( arrLen, return ARG0.UnboxLength(); )
71
72
73// #################################################################################################
74// ### Arithmetics - unary operations
75// #################################################################################################
76
77FUNC( pos , return ARG0; )
78FUNC( pos_B , return static_cast<integer>(BOL(ARG0)); )
79FUNC( neg_B , return -static_cast<integer>(BOL(ARG0)); )
80FUNC( neg_I , return -INT(ARG0); )
81FUNC( neg_F , return -FLT(ARG0); )
82FUNC( bitNot , return ~INT(ARG0); )
83FUNC( boolNot_B, return !BOL(ARG0); )
84FUNC( boolNot_I, return INT(ARG0) == static_cast<integer>(0); )
85FUNC( boolNot_F, return FLT(ARG0) == 0.0; )
86
87
88// #################################################################################################
89// ### Arithmetics - binary operations
90// #################################################################################################
91
92#if defined(_MSC_VER)
93 #pragma warning( push )
94 #pragma warning( disable : 4804 ) // unsafe use of type bool
95 #pragma warning( disable : 4805 ) // unsafe mix of type bool and int
96#endif
97
98FUNC( mul_BB, return BOL(ARG0) * BOL(ARG1) ; )
99FUNC( mul_BI, return BOL(ARG0) * INT(ARG1) ; )
100FUNC( mul_BF, return BOL(ARG0) * FLT(ARG1) ; )
101FUNC( mul_IB, return INT(ARG0) * BOL(ARG1) ; )
102FUNC( mul_II, return INT(ARG0) * INT(ARG1) ; )
103FUNC( mul_IF, return ITF(ARG0) * FLT(ARG1) ; )
104FUNC( mul_FB, return FLT(ARG0) * BTF(ARG1) ; )
105FUNC( mul_FI, return FLT(ARG0) * ITF(ARG1) ; )
106FUNC( mul_FF, return FLT(ARG0) * FLT(ARG1) ; )
107FUNC( div_BI, return BOL(ARG0) / INT(ARG1) ; )
108FUNC( div_BF, return BOL(ARG0) / FLT(ARG1) ; )
109FUNC( div_II, return INT(ARG0) / INT(ARG1) ; )
110FUNC( div_IF, return ITF(ARG0) / FLT(ARG1) ; )
111FUNC( div_FI, return FLT(ARG0) / ITF(ARG1) ; )
112FUNC( div_FF, return FLT(ARG0) / FLT(ARG1) ; )
113FUNC( mod_BI, return BOL(ARG0) % INT(ARG1) ; )
114FUNC( mod_II, return INT(ARG0) % INT(ARG1) ; )
115FUNC( mod_BF, return fmod(BOL(ARG0), FLT(ARG1)); )
116FUNC( mod_FI, return fmod(FLT(ARG0), INT(ARG1)); )
117FUNC( mod_IF, return fmod(INT(ARG0), FLT(ARG1)); )
118FUNC( mod_FF, return fmod(FLT(ARG0), FLT(ARG1)); )
119
120FUNC( add_BB, return BOL(ARG0) + BOL(ARG1) ; )
121FUNC( add_BI, return BOL(ARG0) + INT(ARG1) ; )
122FUNC( add_BF, return BOL(ARG0) + FLT(ARG1) ; )
123FUNC( add_IB, return INT(ARG0) + BOL(ARG1) ; )
124FUNC( add_II, return INT(ARG0) + INT(ARG1) ; )
125FUNC( add_IF, return ITF(ARG0) + FLT(ARG1) ; )
126FUNC( add_FB, return FLT(ARG0) + BOL(ARG1) ; )
127FUNC( add_FI, return FLT(ARG0) + ITF(ARG1) ; )
128FUNC( add_FF, return FLT(ARG0) + FLT(ARG1) ; )
129FUNC( sub_BB, return BOL(ARG0) - BOL(ARG1) ; )
130FUNC( sub_BI, return BOL(ARG0) - INT(ARG1) ; )
131FUNC( sub_BF, return BOL(ARG0) - FLT(ARG1) ; )
132FUNC( sub_IB, return INT(ARG0) - BOL(ARG1) ; )
133FUNC( sub_II, return INT(ARG0) - INT(ARG1) ; )
134FUNC( sub_IF, return ITF(ARG0) - FLT(ARG1) ; )
135FUNC( sub_FB, return FLT(ARG0) - BOL(ARG1) ; )
136FUNC( sub_FI, return FLT(ARG0) - ITF(ARG1) ; )
137FUNC( sub_FF, return FLT(ARG0) - FLT(ARG1) ; )
138
139FUNC( shfL_BI, return TOINT( BOL(ARG0) << INT(ARG1) ); )
140FUNC( shfL_IB, return INT(ARG0) << BOL(ARG1) ; )
141FUNC( shfL_II, return INT(ARG0) << INT(ARG1) ; )
142FUNC( shfR_BI, return TOINT( BOL(ARG0) << INT(ARG1) ); )
143FUNC( shfR_IB, return INT(ARG0) << BOL(ARG1) ; )
144FUNC( shfR_II, return INT(ARG0) >> INT(ARG1) ; )
145
146FUNC( sm_BB, return BOL(ARG0) < BOL(ARG1) ; )
147FUNC( sm_BI, return BOL(ARG0) < INT(ARG1) ; )
148FUNC( sm_BF, return isless(static_cast<double>(BOL(ARG0)), FLT(ARG1) ); )
149FUNC( sm_IB, return INT(ARG0) < BOL(ARG1) ; )
150FUNC( sm_II, return INT(ARG0) < INT(ARG1) ; )
151FUNC( sm_IF, return isless(static_cast<double>(INT(ARG0)), FLT(ARG1) ); )
152FUNC( sm_FB, return isless( FLT(ARG0) , static_cast<double>(BOL(ARG1))); )
153FUNC( sm_FI, return isless( FLT(ARG0) , static_cast<double>(INT(ARG1))); )
154FUNC( sm_FF, return isless( FLT(ARG0) , FLT(ARG1) ); )
155FUNC( smeq_BB, return BOL(ARG0) <= BOL(ARG1) ; )
156FUNC( smeq_BI, return BOL(ARG0) <= INT(ARG1) ; )
157FUNC( smeq_BF, return islessequal(static_cast<double>(BOL(ARG0)), FLT(ARG1) ); )
158FUNC( smeq_IB, return INT(ARG0) <= BOL(ARG1) ; )
159FUNC( smeq_II, return INT(ARG0) <= INT(ARG1) ; )
160FUNC( smeq_IF, return islessequal(static_cast<double>(INT(ARG0)), FLT(ARG1) ); )
161FUNC( smeq_FB, return islessequal( FLT(ARG0) , static_cast<double>(BOL(ARG1))); )
162FUNC( smeq_FI, return islessequal( FLT(ARG0) , static_cast<double>(INT(ARG1))); )
163FUNC( smeq_FF, return islessequal( FLT(ARG0) , FLT(ARG1) ); )
164FUNC( gt_BB, return BOL(ARG0) > BOL(ARG1) ; )
165FUNC( gt_BI, return BOL(ARG0) > INT(ARG1) ; )
166FUNC( gt_BF, return isgreater(static_cast<double>(BOL(ARG0)), FLT(ARG1) ); )
167FUNC( gt_IB, return INT(ARG0) > BOL(ARG1) ; )
168FUNC( gt_II, return INT(ARG0) > INT(ARG1) ; )
169FUNC( gt_IF, return isgreater(static_cast<double>(INT(ARG0)), FLT(ARG1) ); )
170FUNC( gt_FB, return isgreater( FLT(ARG0) , static_cast<double>(BOL(ARG1))); )
171FUNC( gt_FI, return isgreater( FLT(ARG0) , static_cast<double>(INT(ARG1))); )
172FUNC( gt_FF, return isgreater( FLT(ARG0) , FLT(ARG1) ); )
173FUNC( gteq_BB, return BOL(ARG0) >= BOL(ARG1) ; )
174FUNC( gteq_BI, return BOL(ARG0) >= INT(ARG1) ; )
175FUNC( gteq_BF, return isgreaterequal(static_cast<double>(BOL(ARG0)), FLT(ARG1) ); )
176FUNC( gteq_IB, return INT(ARG0) >= BOL(ARG1) ; )
177FUNC( gteq_II, return INT(ARG0) >= INT(ARG1) ; )
178FUNC( gteq_IF, return isgreaterequal(static_cast<double>(INT(ARG0)), FLT(ARG1) ); )
179FUNC( gteq_FB, return isgreaterequal( FLT(ARG0) , static_cast<double>(BOL(ARG1))); )
180FUNC( gteq_FI, return isgreaterequal( FLT(ARG0) , static_cast<double>(INT(ARG1))); )
181FUNC( gteq_FF, return isgreaterequal( FLT(ARG0) , FLT(ARG1) ); )
182
183FUNC( eq_BB, return BOL(ARG0) == BOL(ARG1) ; )
184FUNC( eq_BI, return BOL(ARG0) == INT(ARG1) ; )
185FUNC( eq_BF, return std::fabs( BOL(ARG0) - FLT(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
186FUNC( eq_IB, return INT(ARG0) == BOL(ARG1) ; )
187FUNC( eq_II, return INT(ARG0) == INT(ARG1) ; )
188FUNC( eq_IF, return std::fabs( ITF(ARG0) - FLT(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
189FUNC( eq_FB, return std::fabs( FLT(ARG0) - BOL(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
190FUNC( eq_FI, return std::fabs( FLT(ARG0) - ITF(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
191FUNC( eq_FF, return std::fabs( FLT(ARG0) - FLT(ARG1) ) <= std::numeric_limits<double>::epsilon(); )
192
193
194
195FUNC( neq_BB, return BOL(ARG0) != BOL(ARG1) ; )
196FUNC( neq_BI, return BOL(ARG0) != INT(ARG1) ; )
197FUNC( neq_BF, return std::fabs( BOL(ARG0) - FLT(ARG1) ) > std::numeric_limits<double>::epsilon(); )
198FUNC( neq_IB, return INT(ARG0) != BOL(ARG1) ; )
199FUNC( neq_II, return INT(ARG0) != INT(ARG1) ; )
200FUNC( neq_IF, return std::fabs( INT(ARG0) - INT(ARG1) ) > std::numeric_limits<double>::epsilon(); )
201FUNC( neq_FB, return std::fabs( FLT(ARG0) - BOL(ARG1) ) > std::numeric_limits<double>::epsilon(); )
202FUNC( neq_FI, return std::fabs( FLT(ARG0) - ITF(ARG1) ) > std::numeric_limits<double>::epsilon(); )
203FUNC( neq_FF, return std::fabs( FLT(ARG0) - FLT(ARG1) ) > std::numeric_limits<double>::epsilon(); )
204
205
206FUNC( bitAnd, return INT(ARG0) & INT(ARG1) ; )
207FUNC( bitXOr, return INT(ARG0) ^ INT(ARG1) ; )
208FUNC( bitOr , return INT(ARG0) | INT(ARG1) ; )
209FUNC( boolAnd_BB, return BOL(ARG0) && BOL(ARG1) ; )
210FUNC( boolAnd_BI, return BOL(ARG0) && INT(ARG1) != 0 ; )
211FUNC( boolAnd_BF, return BOL(ARG0) && FLT(ARG1) != 0.0 ; )
212FUNC( boolAnd_IB, return INT(ARG0) != 0 && BOL(ARG1) ; )
213FUNC( boolAnd_II, return INT(ARG0) != 0 && INT(ARG1) != 0 ; )
214FUNC( boolAnd_IF, return INT(ARG0) != 0 && FLT(ARG1) != 0.0 ; )
215FUNC( boolAnd_FB, return FLT(ARG0) != 0.0 && BOL(ARG1) ; )
216FUNC( boolAnd_FI, return FLT(ARG0) != 0.0 && INT(ARG1) != 0 ; )
217FUNC( boolAnd_FF, return FLT(ARG0) != 0.0 && FLT(ARG1) != 0.0 ; )
218FUNC( boolOr_BB, return BOL(ARG0) || BOL(ARG1) ; )
219FUNC( boolOr_BI, return BOL(ARG0) || INT(ARG1) != 0 ; )
220FUNC( boolOr_BF, return BOL(ARG0) || FLT(ARG1) != 0.0 ; )
221FUNC( boolOr_IB, return INT(ARG0) != 0 || BOL(ARG1) ; )
222FUNC( boolOr_II, return INT(ARG0) != 0 || INT(ARG1) != 0 ; )
223FUNC( boolOr_IF, return INT(ARG0) != 0 || FLT(ARG1) != 0.0 ; )
224FUNC( boolOr_FB, return FLT(ARG0) != 0.0 || BOL(ARG1) ; )
225FUNC( boolOr_FI, return FLT(ARG0) != 0.0 || INT(ARG1) != 0 ; )
226FUNC( boolOr_FF, return FLT(ARG0) != 0.0 || FLT(ARG1) != 0.0 ; )
227
228#if defined(_MSC_VER)
229 #pragma warning( pop )
230#endif
231
232Calculus::OperatorTableEntry OperatorTable[] =
233{
234 // unary operators
245
246 // binary operators
367};
368
369Calculus::OperatorAliasTableEntry bitwiseOpsAliasBooleanOps[] =
370{
371 { A_CHAR("&"), Types::Boolean, Types::Boolean ,A_CHAR("&&") },
372 { A_CHAR("&"), Types::Boolean, Types::Integer ,A_CHAR("&&") },
373 { A_CHAR("&"), Types::Boolean, Types::Float ,A_CHAR("&&") },
374 { A_CHAR("&"), Types::Integer, Types::Boolean ,A_CHAR("&&") },
375 { A_CHAR("&"), Types::Float , Types::Boolean ,A_CHAR("&&") },
376 { A_CHAR("|"), Types::Boolean, Types::Boolean ,A_CHAR("||") },
377 { A_CHAR("|"), Types::Boolean, Types::Integer ,A_CHAR("||") },
378 { A_CHAR("|"), Types::Boolean, Types::Float ,A_CHAR("||") },
379 { A_CHAR("|"), Types::Integer, Types::Boolean ,A_CHAR("||") },
380 { A_CHAR("|"), Types::Float , Types::Boolean ,A_CHAR("||") },
381};
382
383Calculus::BinaryOpOptimizationsTableEntry binaryOperatorOptimizations[] =
384{
385 // optimizations with LEFT side constant value
386 { A_CHAR("||"), lang::Side::Left , bool_true , Types::Boolean, bool_true },
387 { A_CHAR("||"), lang::Side::Left , bool_false, Types::Boolean, identity },
388 { A_CHAR("&&"), lang::Side::Left , bool_true , Types::Boolean, identity },
389 { A_CHAR("&&"), lang::Side::Left , bool_false, Types::Boolean, bool_false },
390
391 { A_CHAR("+") , lang::Side::Left , int_0 , Types::Integer, identity },
392 { A_CHAR("+") , lang::Side::Left , float_0 , Types::Float , identity },
393 { A_CHAR("-") , lang::Side::Left , int_0 , Types::Integer, identity },
394 { A_CHAR("-") , lang::Side::Left , float_0 , Types::Float , identity },
395
396 { A_CHAR("*") , lang::Side::Left , int_0 , Types::Integer, int_0 },
397 { A_CHAR("*") , lang::Side::Left , int_1 , Types::Integer, identity },
398 { A_CHAR("*") , lang::Side::Left , float_0 , Types::Float , float_0 },
399 { A_CHAR("*") , lang::Side::Left , float_1 , Types::Float , identity },
400
401
402 // optimizations with RIGHT side constant value (repeat from above)
403 { A_CHAR("||"), lang::Side::Right, bool_true , Types::Boolean, bool_true },
404 { A_CHAR("||"), lang::Side::Right, bool_false, Types::Boolean, identity },
405 { A_CHAR("&&"), lang::Side::Right, bool_true , Types::Boolean, identity },
406 { A_CHAR("&&"), lang::Side::Right, bool_false, Types::Boolean, bool_false },
407
408 { A_CHAR("+") , lang::Side::Right, int_0 , Types::Integer, identity },
409 { A_CHAR("+") , lang::Side::Right, float_0 , Types::Float , identity },
410 { A_CHAR("-") , lang::Side::Right, int_0 , Types::Integer, identity },
411 { A_CHAR("-") , lang::Side::Right, float_0 , Types::Float , identity },
412
413 { A_CHAR("*") , lang::Side::Right, int_0 , Types::Integer, int_0 },
414 { A_CHAR("*") , lang::Side::Right, int_1 , Types::Integer, identity },
415 { A_CHAR("*") , lang::Side::Right, float_0 , Types::Float , float_0 },
416 { A_CHAR("*") , lang::Side::Right, float_1 , Types::Float , identity },
417
418 // further optimizations with RIGHT side constant value (not available for left-side)
419 { A_CHAR("/") , lang::Side::Right, int_1 , Types::Integer, identity },
420 { A_CHAR("/") , lang::Side::Right, int_1 , Types::Float , identity },
421 { A_CHAR("/") , lang::Side::Right, float_1 , Types::Float , identity },
422
423 { A_CHAR("%") , lang::Side::Right, int_1 , Types::Integer, identity },
424 { A_CHAR("%") , lang::Side::Right, int_1 , Types::Float , identity },
425 { A_CHAR("%") , lang::Side::Right, float_1 , Types::Float , identity },
426};
427
428
429} // anonymous namespace
430
431
432// #################################################################################################
433// ### Arithmetics - Constructor. Creates the hash map
434// #################################################################################################
436: Calculus( "ALib Arithmetics", compiler )
437{
438 constexpr int tableSize= 9;
439 Token functionNames[tableSize];
440 Token::LoadResourcedTokens( EXPRESSIONS, "CPA", functionNames
441 ALIB_DBG(,tableSize) );
443 Token* descriptor= functionNames;
444 ConstantIdentifiers=
445 {
446 { *descriptor++, constTrue },
447 { *descriptor++, constFalse },
448 { *descriptor++, constTrue },
449 { *descriptor++, constFalse },
450 { *descriptor++, constTrue },
451 { *descriptor++, constFalse },
452 };
453
454 Functions=
455 {
456 { *descriptor++, CALCULUS_SIGNATURE(Signatures::Var), CALCULUS_CALLBACK(ToBoolean), &Types::Boolean , CTI },
457 { *descriptor , CALCULUS_SIGNATURE(Signatures::B ), CALCULUS_CALLBACK(toInt_B ), &Types::Integer , CTI },
458 { *descriptor , CALCULUS_SIGNATURE(Signatures::I ), CALCULUS_CALLBACK(toInt_I ), &Types::Integer , CTI },
459 { *descriptor++, CALCULUS_SIGNATURE(Signatures::F ), CALCULUS_CALLBACK(toInt_F ), &Types::Integer , CTI },
460 { *descriptor , CALCULUS_SIGNATURE(Signatures::B ), CALCULUS_CALLBACK(toFloat_B), &Types::Float , CTI },
461 { *descriptor , CALCULUS_SIGNATURE(Signatures::I ), CALCULUS_CALLBACK(toFloat_I), &Types::Float , CTI },
462 { *descriptor++, CALCULUS_SIGNATURE(Signatures::F ), CALCULUS_CALLBACK(toFloat_F), &Types::Float , CTI },
463 };
464
465 AddOperators( OperatorTable );
466
467 if( HasBits(compiler.CfgCompilation, Compilation::AllowBitwiseBooleanOperators ) )
468 {
469 AddOperatorAliases( bitwiseOpsAliasBooleanOps );
470 AddOperatorAlias ( A_CHAR("~"), Types::Boolean, Types::Void, A_CHAR("!") );
471 }
472
473 AddBinaryOpOptimizations( binaryOperatorOptimizations);
474
475 ALIB_ASSERT_ERROR( descriptor - functionNames == tableSize, "EXPR",
476 "Descriptor table size mismatch: Consumed {} descriptors, {} available.",
477 descriptor - functionNames, tableSize)
479}
480
481bool Arithmetics::TryCompilation( CIFunction& ciFunction )
482{
483 if( Calculus::TryCompilation( ciFunction ) )
484 return true;
485
486 if( ciFunction.QtyArgs() == 1 && ciFunction.ArgsBegin->IsArray() )
487 {
488 constexpr int tableSize= 1;
489 Token functionNames[tableSize];
490
491 Token::LoadResourcedTokens( EXPRESSIONS, "CPALen", functionNames
492 ALIB_DBG(,tableSize) );
493
494 if( functionNames[0].Match( ciFunction.Name ) )
495 {
496 ciFunction.Name.Reset( functionNames[0] );
497ALIB_DBG( ciFunction.DbgCallbackName = "arrLen"; )
498
499 // for constants, the callback might b invoked right away (optimizing call out)
500 if( ciFunction.AllArgsAreConst )
501 {
502 ciFunction.TypeOrValue = ciFunction.ArgsBegin->UnboxLength();
503 return true;
504 }
505
506 ciFunction.Callback = arrLen;
507 ciFunction.TypeOrValue = Types::Integer;
508
509 return true;
510 }
511 }
512
513 return false;
514}
515
516}}} // namespace [alib::expressions::detail]
517
518#undef BOL
519#undef INT
520#undef FLT
521#undef FUNC
522#undef FUNC
523#undef UN_MAP_ENTRY
524#undef BIN_MAP_ENTRY
525#undef BIN_ALIAS_ENTRY
526
527
528#endif //ALIB_DOX
decltype(std::declval< typename TFDecl::Signature >()(std::declval< Box & >(), std::declval< TArgs >()...)) Call(TArgs &&... args) const
Definition box.inl:1135
#define A_CHAR(STR)
#define ALIB_WARNINGS_RESTORE
Definition alib.hpp:715
#define CALCULUS_CALLBACK(func)
Definition calculus.hpp:34
#define CALCULUS_SIGNATURE(BoxPointerArray)
Definition calculus.hpp:41
#define ALIB_ASSERT_ERROR(cond,...)
Definition alib.hpp:984
#define ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE
Definition alib.hpp:644
#define ALIB_DBG(...)
Definition alib.hpp:457
constexpr bool HasBits(TEnum element, TEnum selection) noexcept
ALIB_API Box ToBoolean(Scope &scope, ArgIterator args, ArgIterator)
@ Right
Denotes the right side of something.
@ Left
Denotes the left side of something.
Definition alib.cpp:57
expressions::plugins::Calculus Calculus
Type alias in namespace alib.
Definition calculus.hpp:903
boxing::FIsTrue FIsTrue
Type alias in namespace alib.
strings::util::Token Token
Type alias in namespace alib.
Definition token.hpp:537
boxing::Box Box
Type alias in namespace alib.
expressions::Compiler Compiler
Type alias in namespace alib.
Definition compiler.hpp:596
lang::integer integer
Type alias in namespace alib.
Definition integers.hpp:286
static ALIB_API Box Void
static ALIB_API Box Integer
static ALIB_API Box Boolean
static ALIB_API Box Float
ALIB_API Arithmetics(Compiler &compiler)
const std::tuple< String, Type, Type, CallbackDecl, Type, CTInvokable > OperatorTableEntry
Definition calculus.hpp:506
static constexpr CTInvokable CTI
Definition calculus.hpp:258
const std::tuple< String, lang::Side, Type, const Box &, const Box & > BinaryOpOptimizationsTableEntry
Definition calculus.hpp:705
const std::tuple< String, Type, Type, String > OperatorAliasTableEntry
Definition calculus.hpp:521