Files
whetstone_DSL/tools/mcp/grammars/whetstone_batch_mutate.gbnf

20 lines
1.2 KiB
Plaintext

# ---------------------------------------------------------------------------
# JSON primitives
# ---------------------------------------------------------------------------
ws ::= [ \t\n\r]*
string ::= "\"" ([^"\\\x7F\x00-\x1F] | "\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]))* "\""
number ::= "-"? ([0-9] | [1-9] [0-9]*) ("." [0-9]+)? ([eE] [-+]? [0-9]+)?
integer ::= "-"? ([0-9] | [1-9] [0-9]*)
boolean ::= "true" | "false"
null ::= "null"
any-value ::= string | number | boolean | null | any-object | any-array
any-object ::= "{" ws (string ws ":" ws any-value (ws "," ws string ws ":" ws any-value)*)? ws "}"
any-array ::= "[" ws (any-value (ws "," ws any-value)*)? ws "]"
# --- whetstone_batch_mutate ---
root ::= "{" ws "\"tool\"" ws ":" ws "\"whetstone_batch_mutate\"" ws "," ws "\"arguments\"" ws ":" ws whetstone-batch-mutate-args-obj-5 ws "}"
whetstone-batch-mutate-args-mutations-1-arr-3 ::= "[" ws (any-object (ws "," ws any-object)*)? ws "]"
whetstone-batch-mutate-args-mutations-pair-4 ::= "\"mutations\"" ws ":" ws whetstone-batch-mutate-args-mutations-1-arr-3
whetstone-batch-mutate-args-obj-5 ::= "{" ws whetstone-batch-mutate-args-mutations-pair-4 ws "}"