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.

{@Bracketed}

Product: 

Class: 

Remarks

[revisit]Description: A structural token pattern that matches content enclosed within balanced opening and closing delimiters (parentheses, brackets, or braces).

The {@Bracket} token is a specialized pattern used within a uCalc::Transformer. It is designed to solve the "Nested Delimiter Problem" that often plagues traditional string parsing.

By default, {@Bracket} recognizes:

  • Parentheses: ( ... )
  • Square Brackets: [ ... ]
  • Curly Braces: { ... }

Why use {@Bracket} instead of Regex?

Standard regular expressions are typically regular (Finite Automata) and cannot handle recursive nesting without complex extensions.

FeatureRegex (.*)uCalc {@Bracket}
Nesting AwarenessMatches to the last closing bracket (greedy) or first (non-greedy), often breaking inner logic.Tracks nesting levels; only stops when the initial opening bracket is balanced.
Mixed DelimitersRequires separate patterns for (), [], and {}.Automatically detects and balances all standard types.
Logic SpeedCan encounter "Catastrophic Backtracking" on deep nests.Linear-time token scanning.

Examples