GithubHelp home page GithubHelp logo

Where do I get grammars :P about bnfc HOT 7 CLOSED

ShalokShalom avatar ShalokShalom commented on June 23, 2024
Where do I get grammars :P

from bnfc.

Comments (7)

andreasabel avatar andreasabel commented on June 23, 2024

Do you know, where I can get a F# xBNF grammar, or alternatively one from OCaml?

Sorry, I don't know anything off the top of my head, but I leave this issue open for a while so folks can chime in.
If you find something, please let us know.

from bnfc.

ShalokShalom avatar ShalokShalom commented on June 23, 2024

Well, I found a couple, and all of them were about a different implementation.
How compatible is BNFC with BNF, EBNF and others? How much is the labeling required?

That list is huge and out of date since 2015: https://slebok.github.io/zoo/index.html
And here is a list from EBNF files, that got translated from treesitter. https://github.com/mingodad/plgh

from bnfc.

andreasabel avatar andreasabel commented on June 23, 2024

In labelled BNF (BNFC), each rule needs a distinct label. It does not cover all of EBNF, which also has * for lists etc. (and ? and +).

from bnfc.

ShalokShalom avatar ShalokShalom commented on June 23, 2024

Aha. So I wont be able to convert EBNF files properly. But partly? Your website doesnt make this clear. Lots of BNF files are out there, and you dont seem to know about a lot of grammars for LBNF.

Does it seem to make sense, that full compatibility could raise the usefulness of this tool since we could produce a lot of grammars?

In terms of backends and overall maintenance seems this project to be one of the leading figures. 😄

from bnfc.

andreasabel avatar andreasabel commented on June 23, 2024

BNFC's concept is to be a common front-end to YACC-like parser generators in different languages. So we are just serving the common feature set.

There are feature requests, though, that ask for an extension of the LBNF formalism, e.g. for ?:

from bnfc.

ShalokShalom avatar ShalokShalom commented on June 23, 2024

Ok? I didnt know you are supporting Yacc either?

I am looking for a Yacc translator.

Can you help me to translate the FSharp grammar?

https://github.com/dotnet/fsharp/blob/main/src/Compiler/pars.fsy
https://github.com/dotnet/fsharp/blob/main/src/Compiler/pppars.fsy

from bnfc.

andreasabel avatar andreasabel commented on June 23, 2024

Can you help me to translate the FSharp grammar?

FSharp uses layout, so this does not fit into pure BNF or LBNF: https://fsharpforfunandprofit.com/posts/fsharp-syntax/

from bnfc.

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.