Comments (7)
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.
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.
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.
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.
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.
- E.g. for Haskell, we use the
happy
parser generator which does not have lists built-in but you have to code them yourself as in https://haskell-happy.readthedocs.io/en/latest/using.html#parsing-sequences. - For the C-family (C, C++) we use
bison
which also only supports BNF and not EBNF: https://www.gnu.org/software/bison/manual/html_node/Rules-Syntax.html
There are feature requests, though, that ask for an extension of the LBNF formalism, e.g. for ?
:
from bnfc.
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.
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)
- Weird special behavior of layout resolution at beginning of file
- Error location missing with recent `menhir` (starting with 2021-12-30 release) HOT 1
- `bnfc-system-tests` does not build with `HTF-0.15`
- command line parameter to omit built-in lexical elements? HOT 2
- Another `non-exhaustive case` in generated layout code HOT 2
- Generate syntax highlighters HOT 4
- Haskell: errors as record types HOT 2
- Build testsuites with GHC 9.4 HOT 2
- Parse error should close layout block
- Issue in Makefile of Haskell parser HOT 6
- Get rid of custom setup and `cabal-doctest` dependency
- bnfc 2.9.4 does not build with ventura m1 HOT 4
- Generated C++ parser does not allow whitespace to be a token HOT 3
- Release 2.9.4.1
- Juxtaposing quotation mark HOT 4
- GHC 9.6 HOT 1
- The Ocaml printer crashes if the indent level becomes negative HOT 1
- Improve generated CPP code to trace function calls HOT 5
- Optional Semicolons HOT 5
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 bnfc.