004 json full recognizer

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

ok {"a":[1,2.5e3,true],"b":{"c":null},"d":"x y","e":[]}
ok {"a": [1, 2], "b": null}
err 1:9 expected "([^"\\]|\\.)*" found }

Expected output

ok {"a":[1,2.5e3,true],"b":{"c":null},"d":"x y","e":[]}
ok {"a": [1, 2], "b": null}
err 1:9 expected "([^"\\]|\\.)*" found }

Flows

flow ~grammar click a branch to expand · @labels scroll to their anchor
grammar (expr: json)
flow ~parse click a branch to expand · @labels scroll to their anchor
parse (expr: "{\"a\":[1,2.5e3,true],\"b\":{\"c\":null},\"d\":\"x y\",\"e\":[]}", grammar: json)
flow ~parse click a branch to expand · @labels scroll to their anchor
parse (expr: "{\"a\": [1, 2], \"b\": null}", grammar: json)
flow ~parse click a branch to expand · @labels scroll to their anchor
parse (expr: "{\"a\":[1,}", grammar: json)

Test Configuration

MUST_RUN