60 "T_BOOL" ,
A_CHAR(
"Boolean"),
61 "T_INT" ,
A_CHAR(
"Integer"),
62 "T_FLOAT" ,
A_CHAR(
"Float"),
63 "T_STR" ,
A_CHAR(
"String"),
64 "T_DATE" ,
A_CHAR(
"DateTime"),
65 "T_DUR" ,
A_CHAR(
"Duration"),
72 "BO0" ,
A_CHAR(
"0,NONE,0"),
73 "BO1" ,
A_CHAR(
"1,[],100"),
79 "BO7" ,
A_CHAR(
"7,<<,700"),
80 "BO8" ,
A_CHAR(
"8,>>,700"),
82 "BO10" ,
A_CHAR(
"10,<=,600"),
83 "BO11" ,
A_CHAR(
"11,>,600"),
84 "BO12" ,
A_CHAR(
"12,>=,600"),
85 "BO13" ,
A_CHAR(
"13,==,500"),
86 "BO14" ,
A_CHAR(
"14,!=,500"),
87 "BO15" ,
A_CHAR(
"15,&,470"),
88 "BO16" ,
A_CHAR(
"16,^,460"),
89 "BO17" ,
A_CHAR(
"17,|,450"),
90 "BO18" ,
A_CHAR(
"18,&&,440"),
91 "BO19" ,
A_CHAR(
"19,||,430"),
92 "BO20" ,
A_CHAR(
"20,=,300"),
93 "BO21" ,
A_CHAR(
"21,?:,200"),
94 "UOA0" ,
A_CHAR(
"0,Not,!"),
95 "BOA0" ,
A_CHAR(
"0,And,&&"),
96 "BOA1" ,
A_CHAR(
"1,Or,||"),
98 "BOA3" ,
A_CHAR(
"3,Smaller,<"),
99 "BOA4" ,
A_CHAR(
"4,Smeq,<="),
100 "BOA5" ,
A_CHAR(
"5,Smaller_Or_Equal,<="),
101 "BOA6" ,
A_CHAR(
"6,Gt,>"),
102 "BOA7" ,
A_CHAR(
"7,Greater,>"),
103 "BOA8" ,
A_CHAR(
"8,Gteq,>="),
104 "BOA9" ,
A_CHAR(
"9,Greater_Or_Equal,>="),
105 "BOA10" ,
A_CHAR(
"10,Eq,=="),
106 "BOA11" ,
A_CHAR(
"11,Equals,=="),
107 "BOA12" ,
A_CHAR(
"12,Neq,!="),
108 "BOA13" ,
A_CHAR(
"13,Not_equals,!="),
109 "EF" ,
A_CHAR(
"Expression I 4"),
111 "E<" ,
A_CHAR(
"expressions::"),
112 "E0" ,
A_CHAR(
"1,SyntaxError,ED1"),
113 "E1" ,
A_CHAR(
"-1,ExpressionInfo,ED-1"),
114 "E2" ,
A_CHAR(
"-2,StdExceptionInfo,ED-2"),
115 "E3" ,
A_CHAR(
"2,EmptyExpressionString,ED2"),
116 "E4" ,
A_CHAR(
"5,SyntaxErrorExpectation,ED5"),
117 "E5" ,
A_CHAR(
"6,UnknownUnaryOperatorSymbol,ED6"),
118 "E6" ,
A_CHAR(
"7,UnknownBinaryOperatorSymbol,ED7"),
119 "E7" ,
A_CHAR(
"14,UnknownIdentifier,ED14"),
120 "E8" ,
A_CHAR(
"15,UnknownFunction,ED15"),
121 "E9" ,
A_CHAR(
"-15,FunctionHint,ED-15"),
122 "E10" ,
A_CHAR(
"16,UnaryOperatorNotDefined,ED16"),
123 "E11" ,
A_CHAR(
"17,BinaryOperatorNotDefined,ED17"),
124 "E12" ,
A_CHAR(
"22,MissingFunctionParentheses,ED22"),
125 "E13" ,
A_CHAR(
"23,IdentifierWithFunctionParentheses,ED23"),
126 "E14" ,
A_CHAR(
"25,IncompatibleTypesInConditional,ED25"),
127 "E15" ,
A_CHAR(
"30,ExceptionInPlugin,ED30"),
128 "E16" ,
A_CHAR(
"40,ExceptionInCallback,ED40"),
129 "E17" ,
A_CHAR(
"50,NamedExpressionNotConstant,ED50"),
130 "E18" ,
A_CHAR(
"51,NamedExpressionNotFound,ED51"),
131 "E19" ,
A_CHAR(
"52,NestedExpressionNotFoundCT,ED52"),
132 "E20" ,
A_CHAR(
"53,NestedExpressionCallArgumentMismatch,ED53"),
133 "E21" ,
A_CHAR(
"54,NestedExpressionNotFoundET,ED54"),
134 "E22" ,
A_CHAR(
"-54,WhenEvaluatingNestedExpression,ED-54"),
135 "E23" ,
A_CHAR(
"55,NestedExpressionResultTypeError,ED55"),
136 "E24" ,
A_CHAR(
"56,CircularNestedExpressions,ED56"),
137 "E25" ,
A_CHAR(
"-56,CircularNestedExpressionsInfo,ED-56"),
138 "E26" ,
A_CHAR(
"-500,InExpressionFormatter,ED-500"),
139 "ED1" ,
A_CHAR(
"Syntax error parsing expression."),
140 "ED-1" ,
A_CHAR(
"Expression: {{{}}}\n")
142 "ED-2" ,
A_CHAR(
"std::exception thrown: {!Q}."),
143 "ED2" ,
A_CHAR(
"Trying to parse empty expression string."),
144 "ED5" ,
A_CHAR(
"Syntax error while parsing expression{}"),
145 "ED6" ,
A_CHAR(
"Unknown unary operator {!Q'} found."),
146 "ED7" ,
A_CHAR(
"Unknown binary operator {!Q'} found."),
147 "ED14" ,
A_CHAR(
"Unknown identifier {!Q}."),
148 "ED15" ,
A_CHAR(
"Unknown function '{}{}'."),
149 "ED-15" ,
A_CHAR(
"Found function {!Q}. Arguments not applicable."),
150 "ED16" ,
A_CHAR(
"Operator {!Q'} not defined for type {!Q}."),
151 "ED17" ,
A_CHAR(
"Operator {!Q'} not defined for types {!Q} and {!Q}."),
152 "ED22" ,
A_CHAR(
"Missing function parentheses '()' with call to function {!Q'}."),
153 "ED23" ,
A_CHAR(
"Function parentheses '()' are not allowed on identifier {!Q'}."),
154 "ED25" ,
A_CHAR(
"Incompatible types for conditional expression operator {!Q<>} : {!Q<>}."),
155 "ED30" ,
A_CHAR(
"Exception caught in 'callback function' while evaluating expression {!Q}."),
156 "ED40" ,
A_CHAR(
"Exception caught in 'callback function' while evaluating expression {!Q}."),
157 "ED50" ,
A_CHAR(
"Expression name has to be constant, if no expression return type is given."),
158 "ED51" ,
A_CHAR(
"Named expression {!Q} not found."),
159 "ED52" ,
A_CHAR(
"Compile-time defined nested expression {!Q} not found."),
160 "ED53" ,
A_CHAR(
"Erroneous arguments given with nested expression function {!Q}."),
161 "ED54" ,
A_CHAR(
"Evaluation-time defined nested expression {!Q} not found."),
162 "ED-54" ,
A_CHAR(
"Exception evaluating nested expression {!Q}."),
163 "ED55" ,
A_CHAR(
"Nested expression {!Q} returned wrong result type.\n")
164 A_CHAR(
"Type expected: {}\n")
165 A_CHAR(
"Type returned: {}"),
166 "ED56" ,
A_CHAR(
"Circular nested expressions detected. Circular evaluation stack follows."),
167 "ED-56" ,
A_CHAR(
"Expression {!Q} contains nested expression {!Q}."),
168 "ED-500" ,
A_CHAR(
"Occurred in ExpressionFormatter expression #{}.\n")
169 A_CHAR(
"of formatter string: {!Q}"),
170 "EE1" ,
A_CHAR(
": Closing brace ')' expected."),
171 "EE2" ,
A_CHAR(
": Closing function parameter brace ')' expected."),
172 "EE3" ,
A_CHAR(
": Closing subscript brace ']' expected."),
173 "EE4" ,
A_CHAR(
": String literal closing quote ('') expected."),
174 "EE5" ,
A_CHAR(
": Operator expected."),
175 "EE6" ,
A_CHAR(
": Colon ':' of conditional term expected."),
176 "EE7" ,
A_CHAR(
": Right-hand side binary operand expected."),
177 "EE20" ,
A_CHAR(
": Unexpected end of expression."),
178 "EE21" ,
A_CHAR(
": Misplaced closing bracket."),
179 "EE22" ,
A_CHAR(
": Misplaced subscript operator symbol."),
180 "EE23" ,
A_CHAR(
": Misplaced comma."),
181 "ANON_EXPR_NAME",
A_CHAR(
"ANONYMOUS"),
182 "CPA0" ,
A_CHAR(
"true I 4"),
183 "CPA1" ,
A_CHAR(
"false I 5"),
184 "CPA2" ,
A_CHAR(
"yes I 3"),
185 "CPA3" ,
A_CHAR(
"no I 2"),
186 "CPA4" ,
A_CHAR(
"on I 2"),
187 "CPA5" ,
A_CHAR(
"off I 3"),
188 "CPA6" ,
A_CHAR(
"Boolean I 4"),
189 "CPA7" ,
A_CHAR(
"Integer I 3"),
190 "CPA8" ,
A_CHAR(
"Float I 5"),
191 "CPALen" ,
A_CHAR(
"Length I 3"),
192 "CPM0" ,
A_CHAR(
"PI I 2"),
194 "CPM2" ,
A_CHAR(
"abs I 3"),
195 "CPM3" ,
A_CHAR(
"ceil I 4"),
196 "CPM4" ,
A_CHAR(
"floor I 5"),
197 "CPM5" ,
A_CHAR(
"trunc I 5"),
198 "CPM6" ,
A_CHAR(
"round I 5"),
199 "CPM7" ,
A_CHAR(
"rint I 4"),
200 "CPM8" ,
A_CHAR(
"max I 3"),
201 "CPM9" ,
A_CHAR(
"min I 3"),
202 "CPM10" ,
A_CHAR(
"remainder I 6"),
203 "CPM11" ,
A_CHAR(
"random I 4"),
204 "CPM12" ,
A_CHAR(
"sin I 3"),
205 "CPM13" ,
A_CHAR(
"asin I 4"),
206 "CPM14" ,
A_CHAR(
"cos I 3"),
207 "CPM15" ,
A_CHAR(
"acos I 4"),
208 "CPM16" ,
A_CHAR(
"tan I 3"),
209 "CPM17" ,
A_CHAR(
"atan I 4"),
210 "CPM18" ,
A_CHAR(
"sinh I 4"),
211 "CPM19" ,
A_CHAR(
"asinh I 5"),
212 "CPM20" ,
A_CHAR(
"cosh I 4"),
213 "CPM21" ,
A_CHAR(
"acosh I 5"),
214 "CPM22" ,
A_CHAR(
"tanh I 4"),
215 "CPM23" ,
A_CHAR(
"atanh I 5"),
216 "CPM24" ,
A_CHAR(
"exp I 3"),
217 "CPM25" ,
A_CHAR(
"exp2 I 4"),
218 "CPM26" ,
A_CHAR(
"exp10 I 5"),
219 "CPM27" ,
A_CHAR(
"log I 3"),
220 "CPM28" ,
A_CHAR(
"log2 I 4"),
221 "CPM29" ,
A_CHAR(
"log10 I 5"),
222 "CPM30" ,
A_CHAR(
"pow I 3"),
223 "CPM31" ,
A_CHAR(
"pow10 I 5"),
224 "CPM32" ,
A_CHAR(
"sqrt I 4"),
225 "CPM33" ,
A_CHAR(
"cbrt I 4"),
226 "CPS0" ,
A_CHAR(
"NewLine I 1 1"),
227 "CPS1" ,
A_CHAR(
"Tabulator I 3"),
228 "CPS2" ,
A_CHAR(
"String I 3"),
229 "CPS3" ,
A_CHAR(
"WildCardMatch I 1 1 1"),
230 "CPS4" ,
A_CHAR(
"Format I 6"),
231 "CPS5" ,
A_CHAR(
"ToUpper I 1 1"),
232 "CPS6" ,
A_CHAR(
"ToLower I 1 1"),
233 "CPS7" ,
A_CHAR(
"Compare I 4"),
234 "CPS8" ,
A_CHAR(
"StartsWith I 1 1"),
235 "CPS9" ,
A_CHAR(
"EndsWith I 1 1"),
236 "CPS10" ,
A_CHAR(
"Substring I 4"),
237 "CPS11" ,
A_CHAR(
"IndexOf I 3 1"),
238 "CPS12" ,
A_CHAR(
"Count I 5"),
239 "CPS13" ,
A_CHAR(
"Trim I 4"),
240 "CPS14" ,
A_CHAR(
"TrimStart I 4 1"),
241 "CPS15" ,
A_CHAR(
"TrimEnd I 4 1"),
242 "CPS16" ,
A_CHAR(
"Integer I 3"),
243 "CPS17" ,
A_CHAR(
"Float I 5"),
244 "CPS18" ,
A_CHAR(
"Token I 3"),
245 "CPS19" ,
A_CHAR(
"Hexadecimal I 3"),
246 "CPS20" ,
A_CHAR(
"Octal I 3"),
247 "CPS21" ,
A_CHAR(
"Binary I 3"),
248 "CPS22" ,
A_CHAR(
"Replace I 4"),
249 "CPS23" ,
A_CHAR(
"Repeat I 6"),
250 "CPS24" ,
A_CHAR(
"RegExMatch I 1 1 1"),
251 "CPD0" ,
A_CHAR(
"January I 3"),
252 "CPD1" ,
A_CHAR(
"February I 3"),
253 "CPD2" ,
A_CHAR(
"March I 3"),
254 "CPD3" ,
A_CHAR(
"April I 3"),
255 "CPD4" ,
A_CHAR(
"May I 3"),
256 "CPD5" ,
A_CHAR(
"June I 3"),
257 "CPD6" ,
A_CHAR(
"July I 3"),
258 "CPD7" ,
A_CHAR(
"August I 3"),
259 "CPD8" ,
A_CHAR(
"September I 3"),
260 "CPD9" ,
A_CHAR(
"October I 3"),
261 "CPD10" ,
A_CHAR(
"November I 3"),
262 "CPD11" ,
A_CHAR(
"December I 3"),
263 "CPD12" ,
A_CHAR(
"Sunday I 3"),
264 "CPD13" ,
A_CHAR(
"Monday I 3"),
265 "CPD14" ,
A_CHAR(
"Tuesday I 3"),
266 "CPD15" ,
A_CHAR(
"Wednesday I 3"),
267 "CPD16" ,
A_CHAR(
"Thursday I 3"),
268 "CPD17" ,
A_CHAR(
"Friday I 3"),
269 "CPD18" ,
A_CHAR(
"Saturday I 3"),
270 "CPD19" ,
A_CHAR(
"NanoSecondS I 1 1 0"),
271 "CPD20" ,
A_CHAR(
"MicroSecondS I 3 1 0"),
272 "CPD21" ,
A_CHAR(
"MilliSecondS I 1 1 0"),
273 "CPD22" ,
A_CHAR(
"SecondS I 3 0"),
274 "CPD23" ,
A_CHAR(
"MinuteS I 3 0"),
275 "CPD24" ,
A_CHAR(
"Hours I 4"),
276 "CPD25" ,
A_CHAR(
"Days I 3"),
277 "CPD26" ,
A_CHAR(
"Weeks I 4"),
278 "CPD27" ,
A_CHAR(
"Months I 3"),
279 "CPD28" ,
A_CHAR(
"Years I 4"),
280 "CPD29" ,
A_CHAR(
"InDayS I 2 1 0"),
281 "CPD30" ,
A_CHAR(
"InHourS I 2 1 0"),
282 "CPD31" ,
A_CHAR(
"InMinuteS I 2 3 0"),
283 "CPD32" ,
A_CHAR(
"InSecondS I 2 3 0"),
284 "CPD33" ,
A_CHAR(
"InMilliSecondS I 2 1 1 0"),
285 "CPD34" ,
A_CHAR(
"InMicroSecondS I 2 3 1 0"),
286 "CPD35" ,
A_CHAR(
"InNanoSecondS I 2 1 1 0"),
287 "CPD36" ,
A_CHAR(
"InHertZ I 2 1 1"),
288 "CPD37" ,
A_CHAR(
"DateTime I 1 1"),
289 "CPD38" ,
A_CHAR(
"UtcDateTime I 1 1 1"),
290 "CPD39" ,
A_CHAR(
"Now I 3"),
291 "CPD40" ,
A_CHAR(
"Today I 5"),
292 "CPD41" ,
A_CHAR(
"UtcToday I 1 5"),
293 "CPD42" ,
A_CHAR(
"Age I 3"),
294 "CPD43" ,
A_CHAR(
"IsOlderThan I 2 1 1"),
295 "CPD44" ,
A_CHAR(
"GetYear I 1 1"),
296 "CPD45" ,
A_CHAR(
"GetMonth I 1 3"),
297 "CPD46" ,
A_CHAR(
"GetDay I 1 1"),
298 "CPD47" ,
A_CHAR(
"GetDayOfWeek I 1 1 1 1"),
299 "CPD48" ,
A_CHAR(
"GetHour I 1 1"),
300 "CPD49" ,
A_CHAR(
"GetMinute I 1 3"),
301 "CPD50" ,
A_CHAR(
"GetMilliSecond I 1 1 1"),
302 "CPD51" ,
A_CHAR(
"GetUtcYear I 1 1 1"),
303 "CPD52" ,
A_CHAR(
"GetUtcMonth I 1 1 3"),
304 "CPD53" ,
A_CHAR(
"GetUtcDay I 1 1 1"),
305 "CPD54" ,
A_CHAR(
"GetUtcDayOfWeek I 1 1 1 1 1"),
306 "CPD55" ,
A_CHAR(
"GetUtcHour I 1 1 1"),
307 "CPD56" ,
A_CHAR(
"GetUtcMinute I 1 1 3"),
308 "CPD57" ,
A_CHAR(
"GetUtcMilliSecond I 1 1 1 1"),
324 #if ALIB_DEBUG && !ALIB_DEBUG_ASSERTION_PRINTABLES
326 "Instances of class Expressions must not be created. Use singleton alib::EXPRESSIONS" )
340#if !ALIB_CAMP_OMIT_DEFAULT_RESOURCES
353 "VM_CMD_OPCODES",
A_CHAR(
"0,Constant" ",1,"
356 "4,JumpIfFalse" ",5,"
359 "ProgListHeader",
A_CHAR(
"@HL-"
360 "ALib Expression Compiler\n"
361 "(c) 2025 AWorx GmbH. Published under MIT License (Open Source).\n"
362 "More Info: https://alib.dev\n"
364 "Expression name: {}\n"
365 " Normalized: {{{}}}\n"
369 "ProgListHdl0",
A_CHAR(
"PC" ),
370 "ProgListHdl1",
A_CHAR(
"ResultType" ),
371 "ProgListHdl2",
A_CHAR(
"Command" ),
372 "ProgListHdl3",
A_CHAR(
"Param" ),
373 "ProgListHdl4",
A_CHAR(
"Stack" ),
374 "ProgListHdl5",
A_CHAR(
"Description" ),
375 "ProgListHdl6",
A_CHAR(
"ArgNo{Start..End}" ),
377 "ProgListLine",
A_CHAR(
"{:<02} | {!AW} | {!AW} | {!AW} | {!AW} | {!AW} | {!AW} |{!Fill}{}\n") ,
380 "ProgListFooter",
A_CHAR(
"@HL-") ,
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_BOXING_VTABLE_DEFINE(TMapped, Identifier)
#define ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE(TAppendable)
#define ALIB_BOXING_BOOTSTRAP_VTABLE_DBG_REGISTER(Identifier)
BootstrapPhases GetBootstrapState()
Camp(const NCString &resourceCategory)
bool Do(const NString &alibrcFileName, const NString &callingFile, Camp &campInstance, const NString &resourceCategory, bool allowReplacements, const NString &cppFileName)
virtual void Bootstrap() override
Initializes this camp.
OpCodes
The opcode type of VM commands.
NCString ResourceCategory
SPResourcePool resourcePool
Shared pointer to the resource pool.
ResourcePool & GetResourcePool()
virtual void BootstrapBulk(const nchar *category,...)=0
static DateTime FromRaw(TRaw raw)
void Bootstrap(camp::Camp &camp, const NString &name, character innerDelim=',', character outerDelim=',')
resources::ResourcePool ResourcePool
Type alias in namespace #"%alib".
strings::TCString< nchar > NCString
Type alias in namespace #"%alib".
@ Final
The final initialization phase. Here, camps are initializing their custom setup.
lang::integer integer
Type alias in namespace #"%alib".
boxing::Box Box
Type alias in namespace #"%alib".
expressions::ExpressionsCamp EXPRESSIONS
The singleton instance of ALib Camp class #"ExpressionsCamp".
static void Get(String &result, bool isLastField=false)
void Parse()
Implementation of #"EnumRecordPrototype::Parse;*".
String Symbol
The parable symbol of an operator.
int Precedence
The precedence of an operator in respect to other binary operators.
void Parse()
Implementation of #"EnumRecordPrototype::Parse;*".
String Replacement
The replacement operator symbol.
String Symbol
The parsable symbol of an alias operator.
static Box * SI[2]
Function accepts one string argument, followed by an integral argument.
static Box * FF[2]
Function accepts two floating point arguments.
static Box * B[1]
Function accepts one boolean argument.
static Box * IVar[2]
Function accepts one integral argument, followed by variadic arguments.
static Box * BB[2]
Function accepts two boolean arguments.
static Box * II[2]
Function accepts two integral arguments.
static Box * Dur[1]
Function accepts a #"TimePointBase::Duration" argument.
static Box * SII[3]
Function accepts one string argument, followed by two integral arguments.
static Box * SSB[3]
Function accepts two string arguments, followed by a boolean argument.
static Box * F[1]
Function accepts one floating point argument.
static Box * SVar[2]
Function accepts one string argument, followed by variadic arguments.
static Box * SS[2]
Function accepts two string arguments.
static Box * Var[1]
Function accepts variadic arguments.
static Box * DDur[2]
Function accepts a #"time::DateTime" argument; followed by a #"TimePointBase::Duration".
static Box * SSI[3]
Function accepts two string arguments, followed by an integral argument.
static Box * D[1]
Function accepts a #"time::DateTime" argument.
static Box * SSS[3]
Function accepts three string arguments.
static Box * S[1]
Function accepts one string argument.
static Box * I[1]
Function accepts one integral argument.
static Box Integer
Sample type-box for integer types. (Precisely for type #"lang::integer".).
static Box Boolean
Sample type-box for C++ type bool.
static Box Void
Sample type-box for C++ type void.
static Box Float
Sample type-box for C++ type double.
static Box DateTime
Sample type-box for date and time values of type #"time::DateTime").