Comments (7)
Shall we use the .cf format used by http://code.haskell.org/bnfc/ ?
Is there a possibility that we can use bnfc instead of Ragel to obtain the same goals as we have set out for with Ragel? (Speed and portability)
from gherkin2.
There's no downside I can see to specifying the BNF in the .cf format, but I'm not sure about using bnfc itself as the backend. There's not a lot of information out there about it, including references to its speed, (or not much that I could find with some googling), and it doesn't target Ruby, so that would make development slower. On the other hand, if all we had to produce was a BNF, we might make up a lot of that time. There are some papers about it on the website. I'll dig into those and play around with it and see if I can't learn some more.
from gherkin2.
Remember that we only need Ruby for development purposes. The gem will C or Java for better speed. If we can save development time by writing less code (.cf) maybe that will outweigh the time lost on having to rebuild the C every time we run a spec. Of course, the time to research this also adds time and effort.
As far as speed is concerned - isn't it the speed of the parser generators supported by bnfc that counts?
from gherkin2.
Yes on all counts. I was thinking of the difference in speed between the C generated by Ragel, by all acounts insanely fast, and that of bnfc, which uses flex and bison behind the scenes, but whatever the case, it's likely an academic concern--both should ought to be significantly faster than Treetop.
from gherkin2.
I've looked at bnfc a bit, and it seems that using it would be more trouble than it's worth, especially considering how fast the Ragel work is coming along. It produces lex and yacc files like a champ, but these also depend on some code for creating an AST that bnfc produces. As the aim of Gherkin is explicitly not to create an AST, in order to use bnfc we would need to create the scanner and parser generator files, then edit them to remove the references to the AST, etc.
from gherkin2.
Thanks for looking into it Mike. Let's forget about bnfc and just do the BNF by hand in the wiki. It isn't that big anyway.
from gherkin2.
OK. Closing this ticket then; we've got the BNF page on the wiki.
from gherkin2.
Related Issues (20)
- JS JSONFormatter - No way to attach an embedding without base64 encoding HOT 2
- Unable to compile
- Support i18n in snippet generation HOT 4
- cannot load such file -- 2.1/gherkin_lexer_en HOT 10
- [Java] Ugly formatting for CJK data containing full-width characters
- [Suggestion] Delete merged branches from the repo
- [Ruby] Backslashes in tables HOT 1
- SyntaxError in output HOT 1
- Background.feature is nil (in Cucumber 2.0) HOT 1
- Couldn't load 2.1/gherkin_lexer_en HOT 3
- Scenerios should be randomized across feature files, not just within a feature file HOT 2
- NPE in JSONFormatter in scenario print in a @Before HOT 1
- Getting Lexing Error HOT 5
- Cucumber generating empty JSON file upon multiple feature failures. HOT 1
- cucumber for java: number format exception when using tag with semicolon in name HOT 5
- allow tagging individual outline examples HOT 1
- Request for new release HOT 3
- Pretty formatter cannot handle comments in feature correctly
- Source files without license headers HOT 4
- NullPointerException when 'type' property is missing HOT 2
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 gherkin2.