uCalc API Version: 2.1.3-preview.2 Released: 6/16/2026
Warning
uCalc API Preview Release Notice:The documentation describes the intended behavior of the API. The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.
Name = [string]
Property
Product:Â
Class:Â
Retrieves the programmatic name of a defined symbol, such as a function, variable, or operator.
Remarks
The Name() method provides runtime access to the programmatic name of a uCalc Item. This is the primary way to perform introspection on the symbols defined within a uCalc instance.
Items such as functions, operators, variables, and data types are typically assigned a name when they are created. This method retrieves that name as a string.
Why is this useful?
- Runtime Introspection: You can programmatically list and inspect all available functions, variables, or operators. This is useful for building dynamic UIs, such as a function browser or an auto-complete feature.
- Debugging and Logging: When iterating through lists of items (e.g., from ListOfItems), you can print their names to understand the current state of the parser engine.
- Metadata Retrieval: The name is a key piece of metadata that, when combined with other
Itemproperties, allows for sophisticated analysis of the uCalc environment.
An item's name can be changed programmatically using Rename.
Comparative Analysis
Item.Name() is conceptually similar to reflection mechanisms in other languages:
- vs. C# Reflection: It is analogous to the
MemberInfo.Nameproperty, which returns the name of a class member (method, property, etc.) at runtime. - vs. Python: It serves the same purpose as the
__name__attribute on functions and classes.
By providing this functionality, uCalc allows for a high degree of meta-programming and introspection that is common in more dynamic languages.
Examples
A simple demonstration of retrieving the name from a defined variable's Item object.
using uCalcSoftware;
var uc = new uCalc();
// Define a variable and retrieve its name from the Item object.
var myVarItem = uc.DefineVariable("MyCoolVariable = 10");
Console.WriteLine($"Item name: {myVarItem.Name}");
Item name: mycoolvariable using uCalcSoftware; var uc = new uCalc(); // Define a variable and retrieve its name from the Item object. var myVarItem = uc.DefineVariable("MyCoolVariable = 10"); Console.WriteLine($"Item name: {myVarItem.Name}");
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
// Define a variable and retrieve its name from the Item object.
auto myVarItem = uc.DefineVariable("MyCoolVariable = 10");
cout << "Item name: " << myVarItem.Name() << endl;
}
Item name: mycoolvariable #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // Define a variable and retrieve its name from the Item object. auto myVarItem = uc.DefineVariable("MyCoolVariable = 10"); cout << "Item name: " << myVarItem.Name() << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// Define a variable and retrieve its name from the Item object.
Dim myVarItem = uc.DefineVariable("MyCoolVariable = 10")
Console.WriteLine($"Item name: {myVarItem.Name}")
End Sub
End Module
Item name: mycoolvariable Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Define a variable and retrieve its name from the Item object. Dim myVarItem = uc.DefineVariable("MyCoolVariable = 10") Console.WriteLine($"Item name: {myVarItem.Name}") End Sub End Module
Internal Test: Verifies correct name retrieval for symbolic operators, internal tokens, and empty items.
using uCalcSoftware;
var uc = new uCalc();
// Internal Test: Verifying names of different item types and edge cases.
// 1. Operator with symbolic name
var plusOp = uc.ItemOf("+", ItemIs.Infix);
Console.WriteLine($"Operator Name: '{plusOp.Name}'");
// 2. Token with internal name
var token = uc.ExpressionTokens[TokenType.AlphaNumeric];
Console.WriteLine($"Token Name: '{token.Name}'");
// 3. Empty/invalid item
var emptyItem = uc.ItemOf("NonExistentItem");
Console.WriteLine($"Empty Item Name: '{emptyItem.Name}'");
Console.WriteLine($"Is Found: {!emptyItem.IsProperty(ItemIs.NotFound)}");
Operator Name: '+'
Token Name: '_token_alphanumeric'
Empty Item Name: ''
Is Found: False using uCalcSoftware; var uc = new uCalc(); // Internal Test: Verifying names of different item types and edge cases. // 1. Operator with symbolic name var plusOp = uc.ItemOf("+", ItemIs.Infix); Console.WriteLine($"Operator Name: '{plusOp.Name}'"); // 2. Token with internal name var token = uc.ExpressionTokens[TokenType.AlphaNumeric]; Console.WriteLine($"Token Name: '{token.Name}'"); // 3. Empty/invalid item var emptyItem = uc.ItemOf("NonExistentItem"); Console.WriteLine($"Empty Item Name: '{emptyItem.Name}'"); Console.WriteLine($"Is Found: {!emptyItem.IsProperty(ItemIs.NotFound)}");
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
#define tf(IsTrue) ((IsTrue) ? "True" : "False")
int main() {
uCalc uc;
// Internal Test: Verifying names of different item types and edge cases.
// 1. Operator with symbolic name
auto plusOp = uc.ItemOf("+", ItemIs::Infix);
cout << "Operator Name: '" << plusOp.Name() << "'" << endl;
// 2. Token with internal name
auto token = uc.ExpressionTokens()[TokenType::AlphaNumeric];
cout << "Token Name: '" << token.Name() << "'" << endl;
// 3. Empty/invalid item
auto emptyItem = uc.ItemOf("NonExistentItem");
cout << "Empty Item Name: '" << emptyItem.Name() << "'" << endl;
cout << "Is Found: " << tf(!emptyItem.IsProperty(ItemIs::NotFound)) << endl;
}
Operator Name: '+'
Token Name: '_token_alphanumeric'
Empty Item Name: ''
Is Found: False #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; #define tf(IsTrue) ((IsTrue) ? "True" : "False") int main() { uCalc uc; // Internal Test: Verifying names of different item types and edge cases. // 1. Operator with symbolic name auto plusOp = uc.ItemOf("+", ItemIs::Infix); cout << "Operator Name: '" << plusOp.Name() << "'" << endl; // 2. Token with internal name auto token = uc.ExpressionTokens()[TokenType::AlphaNumeric]; cout << "Token Name: '" << token.Name() << "'" << endl; // 3. Empty/invalid item auto emptyItem = uc.ItemOf("NonExistentItem"); cout << "Empty Item Name: '" << emptyItem.Name() << "'" << endl; cout << "Is Found: " << tf(!emptyItem.IsProperty(ItemIs::NotFound)) << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// Internal Test: Verifying names of different item types and edge cases.
'// 1. Operator with symbolic name
Dim plusOp = uc.ItemOf("+", uCalc.Properties(ItemIs.Infix))
Console.WriteLine($"Operator Name: '{plusOp.Name}'")
'// 2. Token with internal name
Dim token = uc.ExpressionTokens(TokenType.AlphaNumeric)
Console.WriteLine($"Token Name: '{token.Name}'")
'// 3. Empty/invalid item
Dim emptyItem = uc.ItemOf("NonExistentItem")
Console.WriteLine($"Empty Item Name: '{emptyItem.Name}'")
Console.WriteLine($"Is Found: {emptyItem.IsProperty(ItemIs.NotFound)=False}")
End Sub
End Module
Operator Name: '+'
Token Name: '_token_alphanumeric'
Empty Item Name: ''
Is Found: False Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Internal Test: Verifying names of different item types and edge cases. '// 1. Operator with symbolic name Dim plusOp = uc.ItemOf("+", uCalc.Properties(ItemIs.Infix)) Console.WriteLine($"Operator Name: '{plusOp.Name}'") '// 2. Token with internal name Dim token = uc.ExpressionTokens(TokenType.AlphaNumeric) Console.WriteLine($"Token Name: '{token.Name}'") '// 3. Empty/invalid item Dim emptyItem = uc.ItemOf("NonExistentItem") Console.WriteLine($"Empty Item Name: '{emptyItem.Name}'") Console.WriteLine($"Is Found: {emptyItem.IsProperty(ItemIs.NotFound)=False}") End Sub End Module
Introspecting a function or operator from within a callback to retrieve its metadata.
using uCalcSoftware;
var uc = new uCalc();
static void ItemCallback(uCalc.Callback cb) {
Console.WriteLine("Name: " + cb.Item.Name);
Console.WriteLine("Data type: " + cb.Item.DataType.Name);
Console.WriteLine("Param count: " + (cb.Item.Count).ToString());
Console.Write("Procedure type: ");
if (cb.Item.IsProperty(ItemIs.Operator)) {
Console.WriteLine("Operator");
} else if (cb.Item.IsProperty(ItemIs.Function)) {
Console.WriteLine("Function");
}
Console.WriteLine(cb.Item.Text);
Console.WriteLine(cb.Item.Description);
Console.WriteLine("---");
}
uc.DefineFunction("AAA() As Double", ItemCallback).Description = "Does this and that";
uc.DefineFunction("BBB(x, y, z) As String", ItemCallback).Description = "Does something else";
uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity.LeftToRight, ItemCallback);
uc.EvalStr("AAA()");
uc.EvalStr("BBB(9, 8, 7)");
uc.EvalStr("5 CCC 4");
Name: aaa
Data type: double
Param count: 0
Procedure type: Function
Function: AAA() As Double
Does this and that
---
Name: bbb
Data type: string
Param count: 3
Procedure type: Function
Function: BBB(x, y, z) As String
Does something else
---
Name: ccc
Data type: int
Param count: 2
Procedure type: Operator
Operator: {x} CCC {y} As Int32
--- using uCalcSoftware; var uc = new uCalc(); static void ItemCallback(uCalc.Callback cb) { Console.WriteLine("Name: " + cb.Item.Name); Console.WriteLine("Data type: " + cb.Item.DataType.Name); Console.WriteLine("Param count: " + (cb.Item.Count).ToString()); Console.Write("Procedure type: "); if (cb.Item.IsProperty(ItemIs.Operator)) { Console.WriteLine("Operator"); } else if (cb.Item.IsProperty(ItemIs.Function)) { Console.WriteLine("Function"); } Console.WriteLine(cb.Item.Text); Console.WriteLine(cb.Item.Description); Console.WriteLine("---"); } uc.DefineFunction("AAA() As Double", ItemCallback).Description = "Does this and that"; uc.DefineFunction("BBB(x, y, z) As String", ItemCallback).Description = "Does something else"; uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity.LeftToRight, ItemCallback); uc.EvalStr("AAA()"); uc.EvalStr("BBB(9, 8, 7)"); uc.EvalStr("5 CCC 4");
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
void ucalc_call ItemCallback(uCalcBase::Callback cb) {
cout << "Name: " + cb.Item().Name() << endl;
cout << "Data type: " + cb.Item().DataType().Name() << endl;
cout << "Param count: " + to_string(cb.Item().Count()) << endl;
cout << "Procedure type: ";
if (cb.Item().IsProperty(ItemIs::Operator)) {
cout << "Operator" << endl;
} else if (cb.Item().IsProperty(ItemIs::Function)) {
cout << "Function" << endl;
}
cout << cb.Item().Text() << endl;
cout << cb.Item().Description() << endl;
cout << "---" << endl;
}
int main() {
uCalc uc;
uc.DefineFunction("AAA() As Double", ItemCallback).Description("Does this and that");
uc.DefineFunction("BBB(x, y, z) As String", ItemCallback).Description("Does something else");
uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity::LeftToRight, ItemCallback);
uc.EvalStr("AAA()");
uc.EvalStr("BBB(9, 8, 7)");
uc.EvalStr("5 CCC 4");
}
Name: aaa
Data type: double
Param count: 0
Procedure type: Function
Function: AAA() As Double
Does this and that
---
Name: bbb
Data type: string
Param count: 3
Procedure type: Function
Function: BBB(x, y, z) As String
Does something else
---
Name: ccc
Data type: int
Param count: 2
Procedure type: Operator
Operator: {x} CCC {y} As Int32
--- #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; void ucalc_call ItemCallback(uCalcBase::Callback cb) { cout << "Name: " + cb.Item().Name() << endl; cout << "Data type: " + cb.Item().DataType().Name() << endl; cout << "Param count: " + to_string(cb.Item().Count()) << endl; cout << "Procedure type: "; if (cb.Item().IsProperty(ItemIs::Operator)) { cout << "Operator" << endl; } else if (cb.Item().IsProperty(ItemIs::Function)) { cout << "Function" << endl; } cout << cb.Item().Text() << endl; cout << cb.Item().Description() << endl; cout << "---" << endl; } int main() { uCalc uc; uc.DefineFunction("AAA() As Double", ItemCallback).Description("Does this and that"); uc.DefineFunction("BBB(x, y, z) As String", ItemCallback).Description("Does something else"); uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity::LeftToRight, ItemCallback); uc.EvalStr("AAA()"); uc.EvalStr("BBB(9, 8, 7)"); uc.EvalStr("5 CCC 4"); }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub ItemCallback(ByVal cb As uCalc.Callback)
Console.WriteLine("Name: " + cb.Item.Name)
Console.WriteLine("Data type: " + cb.Item.DataType.Name)
Console.WriteLine("Param count: " + (cb.Item.Count).ToString())
Console.Write("Procedure type: ")
If cb.Item.IsProperty(ItemIs.Operator) Then
Console.WriteLine("Operator")
ElseIf cb.Item.IsProperty(ItemIs.Function ) Then
Console.WriteLine("Function")
End If
Console.WriteLine(cb.Item.Text)
Console.WriteLine(cb.Item.Description)
Console.WriteLine("---")
End Sub
Public Sub Main()
Dim uc As New uCalc()
uc.DefineFunction("AAA() As Double", AddressOf ItemCallback).Description = "Does this and that"
uc.DefineFunction("BBB(x, y, z) As String", AddressOf ItemCallback).Description = "Does something else"
uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity.LeftToRight, AddressOf ItemCallback)
uc.EvalStr("AAA()")
uc.EvalStr("BBB(9, 8, 7)")
uc.EvalStr("5 CCC 4")
End Sub
End Module
Name: aaa
Data type: double
Param count: 0
Procedure type: Function
Function: AAA() As Double
Does this and that
---
Name: bbb
Data type: string
Param count: 3
Procedure type: Function
Function: BBB(x, y, z) As String
Does something else
---
Name: ccc
Data type: int
Param count: 2
Procedure type: Operator
Operator: {x} CCC {y} As Int32
--- Imports System Imports uCalcSoftware Public Module Program Public Sub ItemCallback(ByVal cb As uCalc.Callback) Console.WriteLine("Name: " + cb.Item.Name) Console.WriteLine("Data type: " + cb.Item.DataType.Name) Console.WriteLine("Param count: " + (cb.Item.Count).ToString()) Console.Write("Procedure type: ") If cb.Item.IsProperty(ItemIs.Operator) Then Console.WriteLine("Operator") ElseIf cb.Item.IsProperty(ItemIs.Function ) Then Console.WriteLine("Function") End If Console.WriteLine(cb.Item.Text) Console.WriteLine(cb.Item.Description) Console.WriteLine("---") End Sub Public Sub Main() Dim uc As New uCalc() uc.DefineFunction("AAA() As Double", AddressOf ItemCallback).Description = "Does this and that" uc.DefineFunction("BBB(x, y, z) As String", AddressOf ItemCallback).Description = "Does something else" uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity.LeftToRight, AddressOf ItemCallback) uc.EvalStr("AAA()") uc.EvalStr("BBB(9, 8, 7)") uc.EvalStr("5 CCC 4") End Sub End Module
Determining properties of an expression part
using uCalcSoftware;
var uc = new uCalc();
static void ItemCallback(uCalc.Callback cb) {
Console.WriteLine($"Name: {cb.Item.Name}");
Console.WriteLine($"Data type: {cb.Item.DataType.Name}");
Console.WriteLine($"Param count: {cb.Item.Count}");
Console.Write("Procedure type: ");
if (cb.Item.IsProperty(ItemIs.Operator)) {
Console.WriteLine("Operator");
} else if (cb.Item.IsProperty(ItemIs.Function)) {
Console.WriteLine("Function");
}
Console.WriteLine(cb.Item.Text);
Console.WriteLine(cb.Item.Description);
Console.WriteLine("---");
}
uc.DefineFunction("AAA() As Double", ItemCallback).Description = "Does this and that";
uc.DefineFunction("BBB(x, y, z) As String", ItemCallback).Description = "Does something else";
uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity.LeftToRight, ItemCallback);
uc.EvalStr("AAA()");
uc.EvalStr("BBB(9, 8, 7)");
uc.EvalStr("5 CCC 4");
Name: aaa
Data type: double
Param count: 0
Procedure type: Function
Function: AAA() As Double
Does this and that
---
Name: bbb
Data type: string
Param count: 3
Procedure type: Function
Function: BBB(x, y, z) As String
Does something else
---
Name: ccc
Data type: int
Param count: 2
Procedure type: Operator
Operator: {x} CCC {y} As Int32
--- using uCalcSoftware; var uc = new uCalc(); static void ItemCallback(uCalc.Callback cb) { Console.WriteLine($"Name: {cb.Item.Name}"); Console.WriteLine($"Data type: {cb.Item.DataType.Name}"); Console.WriteLine($"Param count: {cb.Item.Count}"); Console.Write("Procedure type: "); if (cb.Item.IsProperty(ItemIs.Operator)) { Console.WriteLine("Operator"); } else if (cb.Item.IsProperty(ItemIs.Function)) { Console.WriteLine("Function"); } Console.WriteLine(cb.Item.Text); Console.WriteLine(cb.Item.Description); Console.WriteLine("---"); } uc.DefineFunction("AAA() As Double", ItemCallback).Description = "Does this and that"; uc.DefineFunction("BBB(x, y, z) As String", ItemCallback).Description = "Does something else"; uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity.LeftToRight, ItemCallback); uc.EvalStr("AAA()"); uc.EvalStr("BBB(9, 8, 7)"); uc.EvalStr("5 CCC 4");
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
void ucalc_call ItemCallback(uCalcBase::Callback cb) {
cout << "Name: " << cb.Item().Name() << endl;
cout << "Data type: " << cb.Item().DataType().Name() << endl;
cout << "Param count: " << cb.Item().Count() << endl;
cout << "Procedure type: ";
if (cb.Item().IsProperty(ItemIs::Operator)) {
cout << "Operator" << endl;
} else if (cb.Item().IsProperty(ItemIs::Function)) {
cout << "Function" << endl;
}
cout << cb.Item().Text() << endl;
cout << cb.Item().Description() << endl;
cout << "---" << endl;
}
int main() {
uCalc uc;
uc.DefineFunction("AAA() As Double", ItemCallback).Description("Does this and that");
uc.DefineFunction("BBB(x, y, z) As String", ItemCallback).Description("Does something else");
uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity::LeftToRight, ItemCallback);
uc.EvalStr("AAA()");
uc.EvalStr("BBB(9, 8, 7)");
uc.EvalStr("5 CCC 4");
}
Name: aaa
Data type: double
Param count: 0
Procedure type: Function
Function: AAA() As Double
Does this and that
---
Name: bbb
Data type: string
Param count: 3
Procedure type: Function
Function: BBB(x, y, z) As String
Does something else
---
Name: ccc
Data type: int
Param count: 2
Procedure type: Operator
Operator: {x} CCC {y} As Int32
--- #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; void ucalc_call ItemCallback(uCalcBase::Callback cb) { cout << "Name: " << cb.Item().Name() << endl; cout << "Data type: " << cb.Item().DataType().Name() << endl; cout << "Param count: " << cb.Item().Count() << endl; cout << "Procedure type: "; if (cb.Item().IsProperty(ItemIs::Operator)) { cout << "Operator" << endl; } else if (cb.Item().IsProperty(ItemIs::Function)) { cout << "Function" << endl; } cout << cb.Item().Text() << endl; cout << cb.Item().Description() << endl; cout << "---" << endl; } int main() { uCalc uc; uc.DefineFunction("AAA() As Double", ItemCallback).Description("Does this and that"); uc.DefineFunction("BBB(x, y, z) As String", ItemCallback).Description("Does something else"); uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity::LeftToRight, ItemCallback); uc.EvalStr("AAA()"); uc.EvalStr("BBB(9, 8, 7)"); uc.EvalStr("5 CCC 4"); }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub ItemCallback(ByVal cb As uCalc.Callback)
Console.WriteLine($"Name: {cb.Item.Name}")
Console.WriteLine($"Data type: {cb.Item.DataType.Name}")
Console.WriteLine($"Param count: {cb.Item.Count}")
Console.Write("Procedure type: ")
If cb.Item.IsProperty(ItemIs.Operator) Then
Console.WriteLine("Operator")
ElseIf cb.Item.IsProperty(ItemIs.Function ) Then
Console.WriteLine("Function")
End If
Console.WriteLine(cb.Item.Text)
Console.WriteLine(cb.Item.Description)
Console.WriteLine("---")
End Sub
Public Sub Main()
Dim uc As New uCalc()
uc.DefineFunction("AAA() As Double", AddressOf ItemCallback).Description = "Does this and that"
uc.DefineFunction("BBB(x, y, z) As String", AddressOf ItemCallback).Description = "Does something else"
uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity.LeftToRight, AddressOf ItemCallback)
uc.EvalStr("AAA()")
uc.EvalStr("BBB(9, 8, 7)")
uc.EvalStr("5 CCC 4")
End Sub
End Module
Name: aaa
Data type: double
Param count: 0
Procedure type: Function
Function: AAA() As Double
Does this and that
---
Name: bbb
Data type: string
Param count: 3
Procedure type: Function
Function: BBB(x, y, z) As String
Does something else
---
Name: ccc
Data type: int
Param count: 2
Procedure type: Operator
Operator: {x} CCC {y} As Int32
--- Imports System Imports uCalcSoftware Public Module Program Public Sub ItemCallback(ByVal cb As uCalc.Callback) Console.WriteLine($"Name: {cb.Item.Name}") Console.WriteLine($"Data type: {cb.Item.DataType.Name}") Console.WriteLine($"Param count: {cb.Item.Count}") Console.Write("Procedure type: ") If cb.Item.IsProperty(ItemIs.Operator) Then Console.WriteLine("Operator") ElseIf cb.Item.IsProperty(ItemIs.Function ) Then Console.WriteLine("Function") End If Console.WriteLine(cb.Item.Text) Console.WriteLine(cb.Item.Description) Console.WriteLine("---") End Sub Public Sub Main() Dim uc As New uCalc() uc.DefineFunction("AAA() As Double", AddressOf ItemCallback).Description = "Does this and that" uc.DefineFunction("BBB(x, y, z) As String", AddressOf ItemCallback).Description = "Does something else" uc.DefineOperator("{x} CCC {y} As Int32", 0, Associativity.LeftToRight, AddressOf ItemCallback) uc.EvalStr("AAA()") uc.EvalStr("BBB(9, 8, 7)") uc.EvalStr("5 CCC 4") End Sub End Module
Displays the complete list of default token definitions, showing their type, internal name, and regex pattern.
using uCalcSoftware;
var uc = new uCalc();
// Lists all tokens currently defined for the expression evaluator.
Console.WriteLine($"Token Count: {uc.ExpressionTokens.Count}");
Console.WriteLine("");
Console.WriteLine("Index Type Name: regex");
Console.WriteLine("========================");
var Tokens = uc.ExpressionTokens;
foreach(var token in Tokens) {
Console.Write(Tokens.IndexOf(token));
Console.WriteLine($" {token.Description} {token.Name}: {token.Regex}");
}
// Note that the expression evaluator token list has a few extra tokens,
// related to hex/bin/oct notation, string interpolation, and imaginary number
// notation, which are not found in the default Transformer token list.
Token Count: 30
Index Type Name: regex
========================
0 generic _token_line: .*
1 generic _token_catchall: .
2 generic _token_catchall_utf8_other: [\xf0-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]|[\xc0-\xdf][\x80-\xbf]
3 generic _token_punctuation: (--|\.{3}|\xE2\x80\xA6|[!"#$%&'()*+,\-./:;<=>?@\[\\\]^_`{|}~]|\xE2\x80[\x90-\x95])
4 generic _token_quotechar: ("){3}|"|'
5 generic _token_quotechar_single: '
6 generic _token_quotechar_double: "
7 generic _token_quotechar_tripledouble: """
8 memberaccess _token_memberaccess: \.
9 generic _token_variableargs: \.\.\.
10 reducible _token_reducible2: [-:|+/*^&=%@!`\\<>?#$~]+
11 bracket _token_parenthesis: \(
12 bracketclose _token_parenthesis_close: \)
13 bracket _token_curlybrace: \{
14 bracketclose _token_curlybrace_close: \}
15 bracket _token_squarebracket: \[
16 bracketclose _token_squarebracket_close: \]
17 argseparator _token_argseparator: ,
18 statementseparator _token_newline: (?:\r?\n)|\r
19 statementseparator _token_semicolon: ;
20 literal _token_string_singlequoted: '([^']*(?:''[^']*)*)'
21 literal _token_string_doublequoted: "([^"]*(?:""[^"]*)*)"
22 literal _token_string_tripledoublequoted: """([\s\S]*?)"""
23 whitespace _token_whitespace: [\t\v ]+
24 reducible _token_reducible: [-:|+/*^&=%@!`\\<>?]+
25 literal _token_floatnumber: [0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?
26 alphanumeric _token_alphanumeric: [a-zA-Z_][a-zA-Z0-9_]*
27 literal _token_imaginaryunit: #i
28 tokentransform _token_binaryhexoctalnotation: #[bho][0-9A-F]+
29 tokentransform _token_stringinterpolationquote: \$['"] using uCalcSoftware; var uc = new uCalc(); // Lists all tokens currently defined for the expression evaluator. Console.WriteLine($"Token Count: {uc.ExpressionTokens.Count}"); Console.WriteLine(""); Console.WriteLine("Index Type Name: regex"); Console.WriteLine("========================"); var Tokens = uc.ExpressionTokens; foreach(var token in Tokens) { Console.Write(Tokens.IndexOf(token)); Console.WriteLine($" {token.Description} {token.Name}: {token.Regex}"); } // Note that the expression evaluator token list has a few extra tokens, // related to hex/bin/oct notation, string interpolation, and imaginary number // notation, which are not found in the default Transformer token list.
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
// Lists all tokens currently defined for the expression evaluator.
cout << "Token Count: " << uc.ExpressionTokens().Count() << endl;
cout << "" << endl;
cout << "Index Type Name: regex" << endl;
cout << "========================" << endl;
auto Tokens = uc.ExpressionTokens();
for(auto token : Tokens) {
cout << Tokens.IndexOf(token);
cout << " " << token.Description() << " " << token.Name() << ": " << token.Regex() << endl;
}
// Note that the expression evaluator token list has a few extra tokens,
// related to hex/bin/oct notation, string interpolation, and imaginary number
// notation, which are not found in the default Transformer token list.
}
Token Count: 30
Index Type Name: regex
========================
0 generic _token_line: .*
1 generic _token_catchall: .
2 generic _token_catchall_utf8_other: [\xf0-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]|[\xc0-\xdf][\x80-\xbf]
3 generic _token_punctuation: (--|\.{3}|\xE2\x80\xA6|[!"#$%&'()*+,\-./:;<=>?@\[\\\]^_`{|}~]|\xE2\x80[\x90-\x95])
4 generic _token_quotechar: ("){3}|"|'
5 generic _token_quotechar_single: '
6 generic _token_quotechar_double: "
7 generic _token_quotechar_tripledouble: """
8 memberaccess _token_memberaccess: \.
9 generic _token_variableargs: \.\.\.
10 reducible _token_reducible2: [-:|+/*^&=%@!`\\<>?#$~]+
11 bracket _token_parenthesis: \(
12 bracketclose _token_parenthesis_close: \)
13 bracket _token_curlybrace: \{
14 bracketclose _token_curlybrace_close: \}
15 bracket _token_squarebracket: \[
16 bracketclose _token_squarebracket_close: \]
17 argseparator _token_argseparator: ,
18 statementseparator _token_newline: (?:\r?\n)|\r
19 statementseparator _token_semicolon: ;
20 literal _token_string_singlequoted: '([^']*(?:''[^']*)*)'
21 literal _token_string_doublequoted: "([^"]*(?:""[^"]*)*)"
22 literal _token_string_tripledoublequoted: """([\s\S]*?)"""
23 whitespace _token_whitespace: [\t\v ]+
24 reducible _token_reducible: [-:|+/*^&=%@!`\\<>?]+
25 literal _token_floatnumber: [0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?
26 alphanumeric _token_alphanumeric: [a-zA-Z_][a-zA-Z0-9_]*
27 literal _token_imaginaryunit: #i
28 tokentransform _token_binaryhexoctalnotation: #[bho][0-9A-F]+
29 tokentransform _token_stringinterpolationquote: \$['"] #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // Lists all tokens currently defined for the expression evaluator. cout << "Token Count: " << uc.ExpressionTokens().Count() << endl; cout << "" << endl; cout << "Index Type Name: regex" << endl; cout << "========================" << endl; auto Tokens = uc.ExpressionTokens(); for(auto token : Tokens) { cout << Tokens.IndexOf(token); cout << " " << token.Description() << " " << token.Name() << ": " << token.Regex() << endl; } // Note that the expression evaluator token list has a few extra tokens, // related to hex/bin/oct notation, string interpolation, and imaginary number // notation, which are not found in the default Transformer token list. }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// Lists all tokens currently defined for the expression evaluator.
Console.WriteLine($"Token Count: {uc.ExpressionTokens.Count}")
Console.WriteLine("")
Console.WriteLine("Index Type Name: regex")
Console.WriteLine("========================")
Dim Tokens = uc.ExpressionTokens
For Each token In Tokens
Console.Write(Tokens.IndexOf(token))
Console.WriteLine($" {token.Description} {token.Name}: {token.Regex}")
Next
'// Note that the expression evaluator token list has a few extra tokens,
'// related to hex/bin/oct notation, string interpolation, and imaginary number
'// notation, which are not found in the default Transformer token list.
End Sub
End Module
Token Count: 30
Index Type Name: regex
========================
0 generic _token_line: .*
1 generic _token_catchall: .
2 generic _token_catchall_utf8_other: [\xf0-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]|[\xc0-\xdf][\x80-\xbf]
3 generic _token_punctuation: (--|\.{3}|\xE2\x80\xA6|[!"#$%&'()*+,\-./:;<=>?@\[\\\]^_`{|}~]|\xE2\x80[\x90-\x95])
4 generic _token_quotechar: ("){3}|"|'
5 generic _token_quotechar_single: '
6 generic _token_quotechar_double: "
7 generic _token_quotechar_tripledouble: """
8 memberaccess _token_memberaccess: \.
9 generic _token_variableargs: \.\.\.
10 reducible _token_reducible2: [-:|+/*^&=%@!`\\<>?#$~]+
11 bracket _token_parenthesis: \(
12 bracketclose _token_parenthesis_close: \)
13 bracket _token_curlybrace: \{
14 bracketclose _token_curlybrace_close: \}
15 bracket _token_squarebracket: \[
16 bracketclose _token_squarebracket_close: \]
17 argseparator _token_argseparator: ,
18 statementseparator _token_newline: (?:\r?\n)|\r
19 statementseparator _token_semicolon: ;
20 literal _token_string_singlequoted: '([^']*(?:''[^']*)*)'
21 literal _token_string_doublequoted: "([^"]*(?:""[^"]*)*)"
22 literal _token_string_tripledoublequoted: """([\s\S]*?)"""
23 whitespace _token_whitespace: [\t\v ]+
24 reducible _token_reducible: [-:|+/*^&=%@!`\\<>?]+
25 literal _token_floatnumber: [0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?
26 alphanumeric _token_alphanumeric: [a-zA-Z_][a-zA-Z0-9_]*
27 literal _token_imaginaryunit: #i
28 tokentransform _token_binaryhexoctalnotation: #[bho][0-9A-F]+
29 tokentransform _token_stringinterpolationquote: \$['"] Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Lists all tokens currently defined for the expression evaluator. Console.WriteLine($"Token Count: {uc.ExpressionTokens.Count}") Console.WriteLine("") Console.WriteLine("Index Type Name: regex") Console.WriteLine("========================") Dim Tokens = uc.ExpressionTokens For Each token In Tokens Console.Write(Tokens.IndexOf(token)) Console.WriteLine($" {token.Description} {token.Name}: {token.Regex}") Next '// Note that the expression evaluator token list has a few extra tokens, '// related to hex/bin/oct notation, string interpolation, and imaginary number '// notation, which are not found in the default Transformer token list. End Sub End Module
uCalc.Items
using uCalcSoftware;
var uc = new uCalc();
// Note: Some items in this list (like bool, or int*) appear more than once or out of chronological
// order because they are aliases (like bool, which is also an alias for boolean)
foreach(var item in uc.Items) {
Console.WriteLine(item.Name);
}
!
%
&
&&
*
+
,
-
/
<
<<
<=
<>
=
==
>
>=
>>
\
^
_enduserformattedoutput
_newline
_token_alphanumeric
_token_argseparator
_token_binaryhexoctalnotation
_token_catchall
_token_catchall_utf8_other
_token_curlybrace
_token_curlybrace_close
_token_floatnumber
_token_imaginaryunit
_token_line
_token_memberaccess
_token_newline
_token_parenthesis
_token_parenthesis_close
_token_punctuation
_token_quotechar
_token_quotechar_double
_token_quotechar_single
_token_quotechar_tripledouble
_token_reducible
_token_reducible2
_token_semicolon
_token_squarebracket
_token_squarebracket_close
_token_string_doublequoted
_token_string_singlequoted
_token_string_tripledoublequoted
_token_stringinterpolationquote
_token_variableargs
_token_whitespace
_ucalc_lib_is32
_ucalc_lib_is64
_ucalc_lib_release_timestamp
_ucalc_lib_version
abs
acos
acosh
addptr
addressof
and
andalso
anytype
append
append_copy
arg
argcount
asc
asin
asinh
atan
atan2
atanh
back
baseconvert
bin
bitand
bitor
bool
bool
int8u
c_str
cbrt
ceil
chr
clear
compare
complex
conj
contains
copysign
cos
cosh
define
doloop
double
endswith
erase
erase_copy
erf
erfc
error
eval
evalstr
evaluate
evaluateint
evaluatestr
exp
exp2
expm1
exprptr
fabs
false
fdim
file
filesize
fill
find_first_not_of
find_first_of
find_last_not_of
find_last_of
single
floor
fmax
fmin
fmod
forloop
format
fpclassify
frac
frexp
fromto
goto
hex
hypot
iif
ilogb
imag
indexof
inf
insert
insert_copy
int
int16
int16u
int
int32u
int64
int64u
int8
int8u
int
isfinite
isinf
isnan
isnormal
lastindexof
lastrandomnumber
lcase
ldexp
length
lgamma
llrint
llround
log
log10
log1p
log2
logb
lrint
lround
ltrim
max
min
mod
modf
nan
nearbyint
nextafter
nexttoward
norm
not
oct
omnitype
or
orelse
padleft
padright
parse
pointer
polar
pop
pow
precedence
proj
push
rand
randfromsameseed
randomnumber
randomseed
real
remainder
remquo
repeat
replace
replace_copy
reset
rint
round
rtrim
sametypeas
scalbln
scalbn
setvar
sgn
signbit
sin
single
sinh
size_t
sizeof
sort
sqr
sqrt
startswith
str
string
substr
subtractptr
swap
tan
tanh
tgamma
trim
true
trunc
ucalcinstance
ucase
valueat
valueattype
void
xor
|
||
~ using uCalcSoftware; var uc = new uCalc(); // Note: Some items in this list (like bool, or int*) appear more than once or out of chronological // order because they are aliases (like bool, which is also an alias for boolean) foreach(var item in uc.Items) { Console.WriteLine(item.Name); }
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
// Note: Some items in this list (like bool, or int*) appear more than once or out of chronological
// order because they are aliases (like bool, which is also an alias for boolean)
for(auto item : uc.Items()) {
cout << item.Name() << endl;
}
}
!
%
&
&&
*
+
,
-
/
<
<<
<=
<>
=
==
>
>=
>>
\
^
_enduserformattedoutput
_newline
_token_alphanumeric
_token_argseparator
_token_binaryhexoctalnotation
_token_catchall
_token_catchall_utf8_other
_token_curlybrace
_token_curlybrace_close
_token_floatnumber
_token_imaginaryunit
_token_line
_token_memberaccess
_token_newline
_token_parenthesis
_token_parenthesis_close
_token_punctuation
_token_quotechar
_token_quotechar_double
_token_quotechar_single
_token_quotechar_tripledouble
_token_reducible
_token_reducible2
_token_semicolon
_token_squarebracket
_token_squarebracket_close
_token_string_doublequoted
_token_string_singlequoted
_token_string_tripledoublequoted
_token_stringinterpolationquote
_token_variableargs
_token_whitespace
_ucalc_lib_is32
_ucalc_lib_is64
_ucalc_lib_release_timestamp
_ucalc_lib_version
abs
acos
acosh
addptr
addressof
and
andalso
anytype
append
append_copy
arg
argcount
asc
asin
asinh
atan
atan2
atanh
back
baseconvert
bin
bitand
bitor
bool
bool
int8u
c_str
cbrt
ceil
chr
clear
compare
complex
conj
contains
copysign
cos
cosh
define
doloop
double
endswith
erase
erase_copy
erf
erfc
error
eval
evalstr
evaluate
evaluateint
evaluatestr
exp
exp2
expm1
exprptr
fabs
false
fdim
file
filesize
fill
find_first_not_of
find_first_of
find_last_not_of
find_last_of
single
floor
fmax
fmin
fmod
forloop
format
fpclassify
frac
frexp
fromto
goto
hex
hypot
iif
ilogb
imag
indexof
inf
insert
insert_copy
int
int16
int16u
int
int32u
int64
int64u
int8
int8u
int
isfinite
isinf
isnan
isnormal
lastindexof
lastrandomnumber
lcase
ldexp
length
lgamma
llrint
llround
log
log10
log1p
log2
logb
lrint
lround
ltrim
max
min
mod
modf
nan
nearbyint
nextafter
nexttoward
norm
not
oct
omnitype
or
orelse
padleft
padright
parse
pointer
polar
pop
pow
precedence
proj
push
rand
randfromsameseed
randomnumber
randomseed
real
remainder
remquo
repeat
replace
replace_copy
reset
rint
round
rtrim
sametypeas
scalbln
scalbn
setvar
sgn
signbit
sin
single
sinh
size_t
sizeof
sort
sqr
sqrt
startswith
str
string
substr
subtractptr
swap
tan
tanh
tgamma
trim
true
trunc
ucalcinstance
ucase
valueat
valueattype
void
xor
|
||
~ #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // Note: Some items in this list (like bool, or int*) appear more than once or out of chronological // order because they are aliases (like bool, which is also an alias for boolean) for(auto item : uc.Items()) { cout << item.Name() << endl; } }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// Note: Some items in this list (like bool, or int*) appear more than once or out of chronological
'// order because they are aliases (like bool, which is also an alias for boolean)
For Each item In uc.Items
Console.WriteLine(item.Name)
Next
End Sub
End Module
!
%
&
&&
*
+
,
-
/
<
<<
<=
<>
=
==
>
>=
>>
\
^
_enduserformattedoutput
_newline
_token_alphanumeric
_token_argseparator
_token_binaryhexoctalnotation
_token_catchall
_token_catchall_utf8_other
_token_curlybrace
_token_curlybrace_close
_token_floatnumber
_token_imaginaryunit
_token_line
_token_memberaccess
_token_newline
_token_parenthesis
_token_parenthesis_close
_token_punctuation
_token_quotechar
_token_quotechar_double
_token_quotechar_single
_token_quotechar_tripledouble
_token_reducible
_token_reducible2
_token_semicolon
_token_squarebracket
_token_squarebracket_close
_token_string_doublequoted
_token_string_singlequoted
_token_string_tripledoublequoted
_token_stringinterpolationquote
_token_variableargs
_token_whitespace
_ucalc_lib_is32
_ucalc_lib_is64
_ucalc_lib_release_timestamp
_ucalc_lib_version
abs
acos
acosh
addptr
addressof
and
andalso
anytype
append
append_copy
arg
argcount
asc
asin
asinh
atan
atan2
atanh
back
baseconvert
bin
bitand
bitor
bool
bool
int8u
c_str
cbrt
ceil
chr
clear
compare
complex
conj
contains
copysign
cos
cosh
define
doloop
double
endswith
erase
erase_copy
erf
erfc
error
eval
evalstr
evaluate
evaluateint
evaluatestr
exp
exp2
expm1
exprptr
fabs
false
fdim
file
filesize
fill
find_first_not_of
find_first_of
find_last_not_of
find_last_of
single
floor
fmax
fmin
fmod
forloop
format
fpclassify
frac
frexp
fromto
goto
hex
hypot
iif
ilogb
imag
indexof
inf
insert
insert_copy
int
int16
int16u
int
int32u
int64
int64u
int8
int8u
int
isfinite
isinf
isnan
isnormal
lastindexof
lastrandomnumber
lcase
ldexp
length
lgamma
llrint
llround
log
log10
log1p
log2
logb
lrint
lround
ltrim
max
min
mod
modf
nan
nearbyint
nextafter
nexttoward
norm
not
oct
omnitype
or
orelse
padleft
padright
parse
pointer
polar
pop
pow
precedence
proj
push
rand
randfromsameseed
randomnumber
randomseed
real
remainder
remquo
repeat
replace
replace_copy
reset
rint
round
rtrim
sametypeas
scalbln
scalbn
setvar
sgn
signbit
sin
single
sinh
size_t
sizeof
sort
sqr
sqrt
startswith
str
string
substr
subtractptr
swap
tan
tanh
tgamma
trim
true
trunc
ucalcinstance
ucase
valueat
valueattype
void
xor
|
||
~ Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Note: Some items in this list (like bool, or int*) appear more than once or out of chronological '// order because they are aliases (like bool, which is also an alias for boolean) For Each item In uc.Items Console.WriteLine(item.Name) Next End Sub End Module
Token(TokenType)
using uCalcSoftware;
var uc = new uCalc();
Console.WriteLine(uc.ExpressionTokens[TokenType.AlphaNumeric].Name);
Console.WriteLine(uc.ExpressionTokens[TokenType.AlphaNumeric].Regex);
Console.WriteLine("");
// Note: In C# or VB you can simply use [TokenType::Literal, n]
// instead of ByType(TokenType::Literal, n)
Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 0).Name);
Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 1).Name);
Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 2).Name);
_token_alphanumeric
[a-zA-Z_][a-zA-Z0-9_]*
_token_string_singlequoted
_token_string_doublequoted
_token_string_tripledoublequoted using uCalcSoftware; var uc = new uCalc(); Console.WriteLine(uc.ExpressionTokens[TokenType.AlphaNumeric].Name); Console.WriteLine(uc.ExpressionTokens[TokenType.AlphaNumeric].Regex); Console.WriteLine(""); // Note: In C# or VB you can simply use [TokenType::Literal, n] // instead of ByType(TokenType::Literal, n) Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 0).Name); Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 1).Name); Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 2).Name);
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
cout << uc.ExpressionTokens()[TokenType::AlphaNumeric].Name() << endl;
cout << uc.ExpressionTokens()[TokenType::AlphaNumeric].Regex() << endl;
cout << "" << endl;
// Note: In C# or VB you can simply use [TokenType::Literal, n]
// instead of ByType(TokenType::Literal, n)
cout << uc.ExpressionTokens().ByType(TokenType::Literal, 0).Name() << endl;
cout << uc.ExpressionTokens().ByType(TokenType::Literal, 1).Name() << endl;
cout << uc.ExpressionTokens().ByType(TokenType::Literal, 2).Name() << endl;
}
_token_alphanumeric
[a-zA-Z_][a-zA-Z0-9_]*
_token_string_singlequoted
_token_string_doublequoted
_token_string_tripledoublequoted #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; cout << uc.ExpressionTokens()[TokenType::AlphaNumeric].Name() << endl; cout << uc.ExpressionTokens()[TokenType::AlphaNumeric].Regex() << endl; cout << "" << endl; // Note: In C# or VB you can simply use [TokenType::Literal, n] // instead of ByType(TokenType::Literal, n) cout << uc.ExpressionTokens().ByType(TokenType::Literal, 0).Name() << endl; cout << uc.ExpressionTokens().ByType(TokenType::Literal, 1).Name() << endl; cout << uc.ExpressionTokens().ByType(TokenType::Literal, 2).Name() << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Console.WriteLine(uc.ExpressionTokens(TokenType.AlphaNumeric).Name)
Console.WriteLine(uc.ExpressionTokens(TokenType.AlphaNumeric).Regex)
Console.WriteLine("")
'// Note: In C# or VB you can simply use [TokenType::Literal, n]
'// instead of ByType(TokenType::Literal, n)
Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 0).Name)
Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 1).Name)
Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 2).Name)
End Sub
End Module
_token_alphanumeric
[a-zA-Z_][a-zA-Z0-9_]*
_token_string_singlequoted
_token_string_doublequoted
_token_string_tripledoublequoted Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Console.WriteLine(uc.ExpressionTokens(TokenType.AlphaNumeric).Name) Console.WriteLine(uc.ExpressionTokens(TokenType.AlphaNumeric).Regex) Console.WriteLine("") '// Note: In C# or VB you can simply use [TokenType::Literal, n] '// instead of ByType(TokenType::Literal, n) Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 0).Name) Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 1).Name) Console.WriteLine(uc.ExpressionTokens.ByType(TokenType.Literal, 2).Name) End Sub End Module