GithubHelp home page GithubHelp logo

.abnf grammar about opencypher HOT 3 CLOSED

opencypher avatar opencypher commented on May 4, 2024
.abnf grammar

from opencypher.

Comments (3)

Mats-SX avatar Mats-SX commented on May 4, 2024

Hello @venkatd and thanks for your question.

The thing with grammars is that each parser or tool seems to have their own interpretation of BNF-like syntax. We went with EBNF because it has an ISO standard (ISO14977), but we do not expect that the generated artifact (the EBNF grammar) will be readily consumed in its raw form. Rather we'd expect some tool to have to rewrite it into the target flavour of EBNF syntax, and I think it would be possible to do so for ABNF as well.

It would probably also be possible to add a custom ABNF-writer, however, which perhaps is what you really were after. You're correct that we are generating the grammars from an XML specification. This XML specification is what we regard as the source of truth (although it is not currently complete), rather than the generated BNF grammars. We do currently have two such writers, one that uses ISO14977 format, and one that uses Antlrv4 format (http://www.antlr.org/). I don't see any immediate blockers to adding another subclass of BnfWriter, AbnfWriter or similar, that would output the grammar in the ABNF format. From the little I've gathered on ABNF so far, it seems to be similar enough to EBNF that the current ISO14977 implementation could be of good use in such an effort.

As for our own plans, we do not currently intend on adding more output formats, but we welcome both the discussion and possible contributions, if you are interested in implementing something like this yourself.

All the best
Mats

from opencypher.

thobe avatar thobe commented on May 4, 2024

ABNF is defined in RFC5234, like Mats says it should be pretty simple to implement a generator for that format.

from opencypher.

Mats-SX avatar Mats-SX commented on May 4, 2024

I'm closing this as answered. Please reopen if there are any follow-up questions.

from opencypher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.