In the mentioned document, http://www.ietf.org/rfc/rfc4627.txt, it is stated that

The grammatical rules in this document are to be interpreted as described in [RFC4234].

RFC4234 describes ABNF (Augmented BNF), not EBNF. If you look through this document, you will find the following definition:

3.6.  Variable Repetition:  *Rule

   The operator "*" preceding an element indicates repetition.  The full
   form is:

         <a>*<b>element

   where <a> and <b> are optional decimal values, indicating at least
   <a> and at most <b> occurrences of the element.

   Default values are 0 and infinity so that *<element> allows any
   number, including zero; 1*<element> requires at least one;
   3*3<element> allows exactly 3 and 1*2<element> allows one or two.

So, notation

*( value-separator member )

is correct according to ABNF definition, and allows any number of repetitions, including zero.

Answer from hooke on Stack Overflow
🌐
pytz
pythonhosted.org › pyrser › tutorial1.html
Tutorial I: A guided JSON parser: — pyrser 0.0.10 documentation
This describes a rule name object as members surrounded by braces. members could be empty. That BNF could be literaly translate as: from pyrser import grammar class JSON(grammar.Grammar): """Our JSON parser""" entry = "object" grammar = """ object = [ '{' '}' | '{' members '}' ] """
Top answer
1 of 3
17

In the mentioned document, http://www.ietf.org/rfc/rfc4627.txt, it is stated that

The grammatical rules in this document are to be interpreted as described in [RFC4234].

RFC4234 describes ABNF (Augmented BNF), not EBNF. If you look through this document, you will find the following definition:

3.6.  Variable Repetition:  *Rule

   The operator "*" preceding an element indicates repetition.  The full
   form is:

         <a>*<b>element

   where <a> and <b> are optional decimal values, indicating at least
   <a> and at most <b> occurrences of the element.

   Default values are 0 and infinity so that *<element> allows any
   number, including zero; 1*<element> requires at least one;
   3*3<element> allows exactly 3 and 1*2<element> allows one or two.

So, notation

*( value-separator member )

is correct according to ABNF definition, and allows any number of repetitions, including zero.

2 of 3
9

Syntax is about the way somebody chooses to write down concrete entities to represent something.

I'll agree that puttting Kleene star before the entity to repeated is non-standard, and the authors choice to do that simply confuses people that are used to convention. But it is perfectly valid; the authors get to define what syntax means, and you, the user of the standard, just get to accept it.

There's some argument for putting the Kleene star where he did; it indicates that there is list following at a point where you might expect a list. The suffix-style Kleene star indicates the same, but it is sort of a surprise; first you read the list element (from left to right), then you discover the star.

As a practical matter, the surprise factor of post-Kleene-star isn't enough in general to outweigh the surprise factor of violating convention. But the authors of that standard made their choice.

Welcome to syntax.

🌐
ResearchGate
researchgate.net › figure › Figure-A1-The-execution-trace-of-applyPR-for-the-JSON-instance-3-with-syntax-tree-in_fig4_358683793
The BNF syntax of the JSON language. | Download Scientific Diagram
Download scientific diagram | The BNF syntax of the JSON language. from publication: JUpdate: A JSON Update Language | Although JSON documents are being used in several emerging applications (e.g., Big Data applications, IoT, mobile computing, smart cities, and online social networks), there is no consensual or standard language for updating JSON documents (i.e., creating, deleting or...
🌐
Cswr
cswr.github.io › JsonSchema › spec › grammar
Syntax - JSON Schema
A more formal description of how JSON Schemas are built · In this section we define how every JSON Document can be built using a formal grammar. The purpose of this is to have a rigurous specification for JSON documents and to enable the community to solve ambiguities about each operator and type
🌐
Timodenk
blog.timodenk.com › haskell-bnf-parser
Haskell BNF Parser - Timo Denk's Blog
That is Haskell functions, which parse a string and return it in an internal-type representation (BNFDefinition). The internal types come along with an implementation of the instance ToJSON. If another Haskell project was going to use the parser logic it could simply import this library and make use of the functions. The application (app folder) starts a scotty web server and parses the request body of incoming requests using the aforementioned library. The response is in JSON format.
🌐
My Blog
camillemo.github.io › posts › bnf
Data - What is BNF Grammar and how to use it with LLMs
February 2, 2024 - As of the current state of technology, these platforms do not offer direct support for passing custom grammar rules alongside API requests. This limitation means that developers seeking to enforce a specific output format, like JSON, cannot directly embed BNF Grammar constraints into the model’s generation process.
🌐
GitHub
github.com › JetBrains › Grammar-Kit › blob › master › testData › livePreview › Json.bnf
Grammar-Kit/testData/livePreview/Json.bnf at master · JetBrains/Grammar-Kit
Grammar files support & parser/PSI generation for IntelliJ IDEA - Grammar-Kit/testData/livePreview/Json.bnf at master · JetBrains/Grammar-Kit
Author   JetBrains
🌐
LocalAI
localai.io › features › constrained_grammars
✍️ Constrained Grammars :: LocalAI
November 19, 2025 - Overview The chat endpoint supports the grammar parameter, which allows users to specify a grammar in Backus-Naur Form (BNF). This feature enables the Large Language Model (LLM) to generate outputs adhering to a user-defined schema, such as JSON, YAML, or any other format that can be defined ...
Find elsewhere
🌐
npm
npmjs.com › search
bnf - npm search
Parse bnf expressions to a structured json.
🌐
Wesleytsai
wesleytsai.io › 2015 › 06 › 13 › a-json-parser
A JSON Parser by Wesley Tsai
<JSON> ::= <value> <value> ::= <object> | <array> | <boolean> | <string> | <number> | <null> <array> ::= "[" [<value>] {"," <value>}* "]" <object> ::= "{" [<property>] {"," <property>}* "}" <property> ::= <string> ":" <value> This is BNF (Backus-Naur Form) notation to describe context-free grammars.
🌐
GitHub
github.com › d3x0r › JSOX › blob › master › json.bnf
JSOX/json.bnf at master · d3x0r/JSOX
JavaScript Object eXchange format; extended JSON/JSON6 - JSOX/json.bnf at master · d3x0r/JSOX
Author   d3x0r
🌐
Oracle
docs.oracle.com › en › database › oracle › oracle-database › 19 › adjsn › diagrams-basic-sql-json-path-expression-syntax.html
B Diagrams for Basic SQL/JSON Path Expression Syntax
November 17, 2023 - Syntax diagrams and corresponding Backus-Naur Form (BNF) syntax descriptions are presented for the basic SQL/JSON path expression syntax.
🌐
npm
npmjs.com › package › ebnf-parser
ebnf-parser - npm
A parser for BNF and EBNF grammars used by jison. ... This will generate parser.js, which is required by ebnf-parser.js. The parser translates a string grammar or JSON grammar into a JSON grammar that jison can use (ENBF is transformed into BNF).
      » npm install ebnf-parser
    
Published   Apr 05, 2014
Version   0.1.10
Author   Zach Carter
🌐
GitHub
github.com › zaach › ebnf-parser
GitHub - zaach/ebnf-parser: A parser for BNF and EBNF grammars used by jison · GitHub
A parser for BNF and EBNF grammars used by jison. ... This will generate parser.js, which is required by ebnf-parser.js. The parser translates a string grammar or JSON grammar into a JSON grammar that jison can use (ENBF is transformed into BNF).
Starred by 81 users
Forked by 18 users
Languages   JavaScript
🌐
Evergreen-ils
wiki.evergreen-ils.org › doku.php
Grammar of JSON Queries
Since both EBNF and JSON use curly braces and square brackets, pay close attention to whether these characters are in single quotes. If they're in single quotes, they are literal elements of the JSON notation.
🌐
Dev Shorts
devshorts.in › p › gbnfggml-bnf-explained-an-approach
GBNF(GGML BNF) Explained- An Approach to Structuring LLM Outputs
November 22, 2024 - It provides a formal way to define grammars that constrain and structure the output of LLMs. By implementing GBNF, developers can guide LLMs to generate content in specific formats, such as JSON or custom data structures, while maintaining the ...
🌐
Lm-kit
docs.lm-kit.com › lm-kit-net › guides › glossary › grammar-sampling.html
LM-Kit.NET Grammar Sampling - GBNF Constrained Output Generation in C# .NET
GBNF (GGML Backus-Naur Form): An extension of BNF used for defining grammars in LM-Kit.NET, adding modern regex-like features. Grammar Class: A class in LM-Kit.NET that represents grammar rules and enables constrained text generation. Predefined Grammars: Built-in grammar definitions provided by LM-Kit.NET for common structures like JSON and arithmetic expressions.
🌐
IETF
datatracker.ietf.org › doc › html › rfc7159
RFC 7159 - The JavaScript Object Notation (JSON) Data Interchange Format
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008. [UNICODE] The Unicode Consortium, "The Unicode Standard", <http://www.unicode.org/versions/latest/>. 15.2. Informative References [ECMA-262] Ecma International, "ECMAScript Language Specification Edition 5.1", Standard ECMA-262, June 2011, <http://www.ecma-international.org/publications/standards/ Ecma-262.htm>. [ECMA-404] Ecma International, "The JSON Data Interchange Format", Standard ECMA-404, October 2013, <http://www.ecma-international.org/publications/standards/ Ecma-404.htm>. [Err3607] RFC Errata, Errata ID 3607, RFC 3607, <http://www.rfc-editor.org>. Bray Standards Track [Page 13]