Setting default uCalc instance with uCalc.IsDefault(); also clearing all uCalc instances from default list
Shows how a full reset clears all rules and input, allowing a transformer object to be reconfigured from a clean slate.
Shows how importing a comment token definition can prevent find-and-replace rules from incorrectly modifying text inside comments.
Shows how the constructor's context (default vs. specific instance) affects variable resolution during parsing.
Shows how to use WasModified to avoid an expensive operation, like saving to a file, if no changes were made during a data sanitization process.
Shows the creation of a uCalc.String and its use of a fluent, token-aware API to modify text in-place.
Shows the RAII pattern in C++ using a stack-allocated object and the `Owned()` method for automatic cleanup.
Simulates the core logic of a calculator, showing how user input is built into an expression string and evaluated.
The complete financial DSL processing a multi-line script of deposits, withdrawals, and interest calculation.
Use the 'properties' parameter to disambiguate between the infix (binary) and prefix (unary) versions of the minus '-' operator.
Uses descriptions to differentiate between two transformers used for different environments, such as a verbose 'debug' transformer and a silent 'production' one.
Uses descriptions to identify and differentiate between two separate token configurations at runtime.
Uses the parent uCalc context from a Tokens object to define a variable that is then used by a transformer rule.
Using Properties with ItemOf to disambiguate between the infix and prefix versions of the '-' operator.