Files
whetstone_DSL/tools/mcp/grammars/whetstone_estimate_porting_cost.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_estimate_porting_cost ---
root ::= "{" ws "\"tool\"" ws ":" ws "\"whetstone_estimate_porting_cost\"" ws "," ws "\"arguments\"" ws ":" ws whetstone-estimate-porting-cost-args-obj-7 ws "}"
whetstone-estimate-porting-cost-args-ambiguity_score-pair-2 ::= "\"ambiguity_score\"" ws ":" ws number
whetstone-estimate-porting-cost-args-lines_of_code-pair-4 ::= "\"lines_of_code\"" ws ":" ws integer
whetstone-estimate-porting-cost-args-obj-7 ::= "{" ws whetstone-estimate-porting-cost-args-pair_id-pair-6 (ws "," ws whetstone-estimate-porting-cost-args-opt-8)* ws "}"
whetstone-estimate-porting-cost-args-opt-8 ::= whetstone-estimate-porting-cost-args-ambiguity_score-pair-2 | whetstone-estimate-porting-cost-args-lines_of_code-pair-4
whetstone-estimate-porting-cost-args-pair_id-pair-6 ::= "\"pair_id\"" ws ":" ws string