uCalc API Version: 5.7.0-preview.1 Released: 7/30/2026
Warning
uCalc API Preview Release Notice:This preview documentation describes the intended behavior of the API. It is not fully accurate or complete.The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.Use of the preview version in your production code is not recommended.
Description: An overview of the symbols appended to pattern variables to override default capture logic, ignore structural boundaries, or force immediate transformations.
While Directives (starting with {@) define structural engine commands, Variable Postfix Modifiers are specific symbols used within pattern variables (like {x}) to qualify how text is matched.
By default, uCalc is structurally aware: it respects bracket levels and treats quoted strings as atomic units. Postfix modifiers allow you to override these safe defaults when a specific transformation requires more "raw" or "aggressive" text handling.
^): By default, uCalc respects balanced brackets (nesting). Use ^ to ignore balance levels, allowing the capture to stop at a terminal character even if it is inside a nested structure.`): By default, quoted strings are atomic and cannot be split. Use the backtick to ignore quote boundaries, allowing the capture to break or include partial contents of a quoted string.+): Instructs the engine to ignore standard statement separators (like ; or specific line breaks) that would otherwise terminate a variable capture.~): Captures the text exactly as it appears and prevents the engine from scanning for nested matches inside the captured block. This ensures the content remains "opaque" to other rules.%): The opposite of verbatim; it forces the engine to immediately search for and execute nested transformation rules within the captured text before finalizing the outer match.Multiple postfix modifiers can be combined within a single variable definition if their logic does not conflict. For example, {content^~} would capture a block of text while ignoring bracket levels and preventing internal nested matches.
ID: 210
using uCalcSoftware;
var uc = new uCalc();
var t = uc.NewTransformer();
t.FromTo("a {txt} c", "<{@Self}>"); // Quoted text treated as 1 token
t.FromTo("x {txt`} z", "<{@Self}>"); // Quotes treated as ordinary chars
Console.WriteLine(t.Transform("a 'b c' b c :: x 'y z' y z"));
<a 'b c' b c> :: <x 'y z>' y z using uCalcSoftware; var uc = new uCalc(); var t = uc.NewTransformer(); t.FromTo("a {txt} c", "<{@Self}>"); // Quoted text treated as 1 token t.FromTo("x {txt`} z", "<{@Self}>"); // Quotes treated as ordinary chars Console.WriteLine(t.Transform("a 'b c' b c :: x 'y z' y z"));
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
auto t = uc.NewTransformer();
t.FromTo("a {txt} c", "<{@Self}>"); // Quoted text treated as 1 token
t.FromTo("x {txt`} z", "<{@Self}>"); // Quotes treated as ordinary chars
cout << t.Transform("a 'b c' b c :: x 'y z' y z") << endl;
}
<a 'b c' b c> :: <x 'y z>' y z #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); t.FromTo("a {txt} c", "<{@Self}>"); // Quoted text treated as 1 token t.FromTo("x {txt`} z", "<{@Self}>"); // Quotes treated as ordinary chars cout << t.Transform("a 'b c' b c :: x 'y z' y z") << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim t = uc.NewTransformer()
t.FromTo("a {txt} c", "<{@Self}>") '// Quoted text treated as 1 token
t.FromTo("x {txt`} z", "<{@Self}>") '// Quotes treated as ordinary chars
Console.WriteLine(t.Transform("a 'b c' b c :: x 'y z' y z"))
End Sub
End Module
<a 'b c' b c> :: <x 'y z>' y z Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t = uc.NewTransformer() t.FromTo("a {txt} c", "<{@Self}>") '// Quoted text treated as 1 token t.FromTo("x {txt`} z", "<{@Self}>") '// Quotes treated as ordinary chars Console.WriteLine(t.Transform("a 'b c' b c :: x 'y z' y z")) End Sub End Module