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

22 lines
1.5 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_assemble_fix_context ---
root ::= "{" ws "\"tool\"" ws ":" ws "\"whetstone_assemble_fix_context\"" ws "," ws "\"arguments\"" ws ":" ws whetstone-assemble-fix-context-args-obj-7 ws "}"
whetstone-assemble-fix-context-args-mode-pair-2 ::= "\"mode\"" ws ":" ws string
whetstone-assemble-fix-context-args-obj-7 ::= "{" ws whetstone-assemble-fix-context-args-slices-pair-6 (ws "," ws whetstone-assemble-fix-context-args-opt-8)* ws "}"
whetstone-assemble-fix-context-args-opt-8 ::= whetstone-assemble-fix-context-args-mode-pair-2
whetstone-assemble-fix-context-args-slices-3-arr-5 ::= "[" ws (any-value (ws "," ws any-value)*)? ws "]"
whetstone-assemble-fix-context-args-slices-pair-6 ::= "\"slices\"" ws ":" ws whetstone-assemble-fix-context-args-slices-3-arr-5