Hacker News new | past | comments | ask | show | jobs | submit login

JSON is a sub-set of what GBNF can do, so there are still advantages to that approach. But even GBNF doesn’t go far enough. Ever try to restrict a model to a single sentence?

root ::= \" \" item{{{min_count},{max_count}}}

item ::= [A-Z] [^\\r\\n\\x0b\\x0c\\x85\\u2028\\u2029.?!]+ [a-z] (\". \" | \"? \" | \"! \")

This kinda works if you don't mind no abbreviations, but you can't do something like this with JSON grammars afaik.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: