Olivier Chafik
55b2d0849d
grammars: x{min,max} repetition operator (#6640)
* grammars: x{min,max} repetition operator + tweak +/*/? to avoid duplication of original over alternates
* grammars: handle `x{n}` and fix `x{n,n}`
* grammars: document new repetition operators
* grammars: uniform use of int for min & max
* grammars: refactor parser test
* grammar: parsing tests w/ natural pretty print of updated expectations
* grammars: much prettier print of expectations (+ TEST_GRAMMAR_PARSER_PRINT_ALL=1 to force all)
* grammars: improve test pretty print again
* grammars: pretty print rules and chars
* grammars: fix copy rule skipping
* grammars: disallow `a{,}` (not allowed in regexps)
* Update common/grammar-parser.cpp
Co-authored-by: Clint Herron <hanclinto@gmail.com>
* grammars: fix copy rule skipping (again) & display of expectations
* grammars: more test cases
* grammars: update reps parsing to bring ? / * / + closer to before
* json: use new GBNF repetitions{m,n} syntax
* grammars: update performance gotchas w/ repetition advice
* Update examples/json_schema_to_grammar.py
Co-authored-by: Clint Herron <hanclinto@gmail.com>
* Update examples/server/public/json-schema-to-grammar.mjs
Co-authored-by: Clint Herron <hanclinto@gmail.com>
* grammars: comment on rule repetitions
* grammars: ensure unambiguous number alternatives
* grammar: nit typo switched error msgs
* grammar: nit numbering in comment
* json: update numeric rule to be unambiguous
* Apply suggestions from code review
Co-authored-by: Clint Herron <hanclinto@gmail.com>
* Update examples/server/public/json-schema-to-grammar.mjs
Co-authored-by: Clint Herron <hanclinto@gmail.com>
* json: fix integral-part
* grammar: add repetition tests
---------
Co-authored-by: Clint Herron <hanclinto@gmail.com>
2024-06-06 10:07:06 +01:00
..
2024-06-05 11:29:20 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-04-21 18:36:45 +03:00
2024-03-09 15:53:59 +02:00
2024-05-25 15:22:35 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-02-17 23:03:14 +02:00
2024-06-05 11:29:20 +03:00
2024-04-11 19:47:34 +01:00
2024-04-10 21:16:48 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2023-10-06 16:16:38 +03:00
2024-06-04 21:23:39 +03:00
2024-05-25 11:11:33 +03:00
2024-04-21 18:36:45 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-06-05 09:40:49 +03:00
2024-06-04 21:23:20 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-04-30 00:52:50 +01:00
2024-06-04 21:23:39 +03:00
2024-06-02 12:13:54 +03:00
2024-06-04 21:23:39 +03:00
2024-06-06 10:07:06 +01:00
2024-06-04 21:23:39 +03:00
2024-06-04 21:23:39 +03:00
2024-05-24 10:06:56 +08:00
2024-05-25 11:14:42 +10:00
2024-06-05 11:29:20 +03:00
2023-07-06 19:17:50 +03:00
2024-01-06 11:40:24 +02:00
2023-03-29 20:21:09 +03:00
2023-05-03 20:58:11 +03:00
2023-10-03 21:04:01 +03:00
2023-06-15 21:05:53 +03:00
2023-08-30 09:29:32 +03:00
2024-06-04 21:23:05 +03:00
2024-06-05 11:29:20 +03:00
2023-04-13 16:03:39 +03:00
2024-06-06 10:07:06 +01:00
2024-03-21 11:50:43 +00:00
2023-07-21 13:53:27 +03:00
2023-07-21 13:53:27 +03:00
2024-01-23 08:51:27 +02:00
2023-08-30 09:50:55 +03:00
2023-07-21 11:13:18 +03:00
2024-06-06 10:07:06 +01:00
2024-01-25 14:51:24 -05:00
2023-08-23 17:29:09 +03:00
2024-04-12 19:43:38 +01:00
2024-03-07 11:41:53 +02:00
2023-08-23 17:29:09 +03:00
2024-04-12 19:43:38 +01:00