Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BNF or EBNF? #11

Open
mistermboy opened this issue Jan 30, 2019 · 2 comments
Open

BNF or EBNF? #11

mistermboy opened this issue Jan 30, 2019 · 2 comments

Comments

@mistermboy
Copy link

Taking a look to the bnf makes me wonder if it would be an EBNF instead of a BNF

I compared this syntax with the sprql EBNF grammar and they look the same.

Other references:
https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form
https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form
http://xahlee.info/parser/bnf_ebnf_abnf.html

@ericprud
Copy link

That's a very good question. SPARQL 19.8 Grammar passes the buck to XML 'cause some slacker author of the SPARQL 1.0 spec was trying to duck the whole naming question. XML 6 Notation claims that it's EBNF and immediately uses the BNF rule notation (symbol ::= expression). XML's (E-ish)BNF is pretty widely used and has inter-operable running code, though no name.

ShEx spec 6 Grammar deliberately avoids labeling the grammar language:

Below is the ShExC grammar following the notation in the XML specification[XML]:

PROPOSE: no change to spec, maybe a comment in the bnf document and some effort to make sure that the bnf doc isn't out of sync with the spec.

@gkellogg
Copy link

Definitely EBNF, which could use its own spec. There are some W3C conventions that go beyond what’s in the XML documents.

Strict BNF would not include “*”, “+”, and such. However, it needs to be turned into BNF via transformation for an LL parser to make use of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants