Skip to content

Commit 600a766

Browse files
authored
Add start_value for json_grammar
The JSON start_values are limited to objects and arrays. Although number/boolean/null strings are also valid JSON, there is no practical use for including them as a start_value
1 parent b2fa649 commit 600a766

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

syncode/parsers/grammars/json_grammar.lark

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// Adapted from https://github.com/lapp0/outlines
2-
?start: value
2+
?start: start_value
3+
4+
?start_value: object
5+
| array
36

47
?value: object
58
| array

0 commit comments

Comments
 (0)