This page brings the grammar rules together into complete examples. Each example shows how the notation, tokenization rules, repetition model, and binding semantics work together in real command shapes.
Good examples do more than compile. They make the intended authoring contract obvious to future maintainers.
PING ;
This is the smallest complete command shape: one keyword phrase followed by a literal delimiter.
CREATE USER username [ PASSWORD password ] ;
CREATE USER john ;
CREATE USER john PASSWORD secret ;
username is always required.PASSWORD password is optional as one unit.PROCESS { FILE file_path | DIRECTORY dir_path } ;
PROCESS FILE 'report.pdf' ;
PROCESS DIRECTORY '/srv/archive' ;
The required group forces one declared branch to succeed. The order of branches matters if two branches could compete on a shared prefix.
GRANT ACCESS TO target_user ... ;
GRANT ACCESS TO alice bob charlie ;
This is the canonical one-or-more repetition form. Each captured user is produced in encounter order.
BLOCK TRAFFIC FROM { IP ip_address | SUBNET subnet_mask } ... ;
BLOCK TRAFFIC FROM IP 10.0.0.1 SUBNET 255.255.255.0 ;
Each repetition must match one whole branch of the required group. The group does not partially match one branch and then switch in the middle of the same occurrence.
GENERATE REPORT [ WITH metric_name ] ... ;
GENERATE REPORT ;
GENERATE REPORT WITH cpu WITH ram ;
Because the repeated unit is optional, the effective cardinality is zero or more. This is valid, but it should be used carefully and tested thoroughly.
EXECUTE ${available_tasks} ON target_name ;
EXECUTE full backup ON db01 ;
EXECUTE 'COMPLEX.TASK' ON db01 ;
The grammar stays stable while the allowed task values come from the macro registry at runtime.
SET DATE day . month . year ;
SET DATE 07 . 03 . 2026 ;
The dots are literal punctuation, not repetition markers.
PROVISION USER username [ WITH AGE user_age ] { AS ACTIVE | AS SUSPENDED } [ FORCE ] ;
PROVISION USER maria AS ACTIVE ;
PROVISION USER maria WITH AGE 34 AS SUSPENDED FORCE ;
username is mandatory.WITH AGE user_age is an optional context-bearing clause.FORCE is an optional clause flag.Together, these examples cover the dominant grammar patterns used in production DSLs: minimal commands, optional clauses, branch selection, controlled repetition, runtime-driven vocabulary, and exact clause binding.