Comments (4)
This is true - there are several different dialects, all of which people call "ebnf". Those examples are other people's various different things I've found, which (confusingly) all get called "ebnf".
I didn't want to implement parsers for dialects unless there is a clear specification to follow. I don't want to accidentally invent yet more dialects.
I think we should split the ebnf dialect into separate parsers:
- W3C's own EBNF: https://www.w3.org/TR/REC-xml/#sec-notation - this does not use semicolons, or commas between concatenated terms. The W3C are also wildly inconsistent - see https://lists.w3.org/Archives/Public/spec-prod/2006JanMar/0017.html;
- BS EBNF: BS 6154 - (withdrawn) which does require a comma. Brief overview here: http://csci.csusb.edu/dick/cs320/comp.text.Meta.html#BS6154
- ISO/IEC 14977 : 1996(E) - there's a brief description of it here: https://www.cl.cam.ac.uk/~mgk25/iso-14977-paper.pdf
Then we could figure out which examples are supposed to be which dialect, and rename them accordingly.
from kgt.
@perlawk which ebnf dialect would you like to use?
from kgt.
Renamed the ebnf dialect to iso-ebnf in 94137d5. This is ISO/IEC 14977 : 1996(E).
expr-minus.iso-ebnf and json.iso-ebnf are the only examples in the ISO dialect. The other .ebnf examples are some other ebnf dialect.
Note ebnf2.ebnf is probably intended to be ISO EBNF, but technically incorrect; the standard requires an empty newline to separate productions. I imagine the author did not realise that, or have a way to validate it.
from kgt.
I'm closing this because the EBNF dialect was split to multiple dialects. I'm sure there are bugs to fix for all of them.
from kgt.
Related Issues (20)
- Feature Request: Configurable production rule separator
- Feature Request: Configurable "equality" symbol in production rule HOT 3
- error: implicit declaration of function 'strdup' during installation HOT 1
- Exponential grow for case insensitive input. HOT 3
- Stop using exit(EXIT_FAILURE) HOT 6
- Feature request: add language from the "Railroad-diagram Generator" HOT 1
- How can I readably display the man page - on Linux? HOT 2
- Makefile for man/kgt.1/kgt.1 HOT 1
- ABNF: silently chokes on dhall.abnf HOT 5
- Makefile, needed to create directories HOT 17
- Compilation instructions. HOT 3
- Is ABNF supported? HOT 3
- ABNF > Blab - Core rules not exported HOT 1
- Blab output - grouping is not perserved HOT 2
- examples/ebnf2.ebnf not parsed as iso-ebnf
- Segfault in `collapse_suffix` HOT 2
- Build fails with recent bmake HOT 1
- Completion of error handling HOT 2
- Text output for Model 33 ASR teletypes HOT 2
- Incorrect railroad diagram HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kgt.