UCL Parser
ucl-parser provides parsing and execution support for the Unified Content Language (UCL) — a token-efficient command language for document manipulation.
Overview
UCL Parser handles:
- Parsing - Convert UCL text into structured commands
- Validation - Check command syntax and semantics
- Execution Support - Convert commands to engine operations
- Error Reporting - Detailed error messages and locations
Installation
[]
= "0.1"
Quick Example
use ;
UCL Syntax
UCL commands follow a simple, token-efficient format:
EDIT <block_id> SET <path> = "<value>"
APPEND <parent_id> <type> :: <content>
MOVE <block_id> TO <parent_id>
DELETE <block_id> [CASCADE]
LINK <source> <edge_type> <target>
Core Components
Parser
Parse UCL text into structured commands:
use ;
let parser = new;
let commands = parser.parse_multiple?;
Command Types
All UCL commands are represented as enums:
Expressions
Support for path expressions and conditions:
use ;
// Path expressions
let path = from_str?;
let expr = Literal;
Public API
pub use ;
pub use ;
pub use ;
pub use ;
See Also
- Syntax Reference - Complete syntax documentation
- Command Reference - All UCL commands
- Expressions - Path and condition expressions