-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Gherkin 3 #43
Comments
Your interpretation is correct, actually the line starting with the asterisk is not interpreted as a |
Interesting - Cucumber happily executes my Gherkin features that contain the asterisk, but I cannnot find it documented in the Cucumber documentation. I know the asterisk-feature from this book: https://pragprog.com/book/srjcuc/the-cucumber-for-java-book. The asterisk-feature is also described in blog entries on Cucumber (e.g., http://antonymarcano.com/blog/tag/gherkin/). Nevertheless, the asterisk-feature is not documented in the attempt to define a BNF grammar for Gherkin (https://github.com/cucumber/gherkin/wiki/BNF). I will try to find out where these asterisks are handled in Cucumber's Gherkin parser... |
Sadly the Natural plugin doesn't use the Gherkin parser, but one I've described myself in an EBNF like syntax. If you wish I'm still strugglying to find a way to use the official parser and get rid of the many parsing issues we are experiencing. Would you be willing to help me on this? |
In the Gherkin3 parser project the asterisk is defined in the language definition file (https://github.com/cucumber/gherkin3/blob/master/gherkin-languages.json), where the asterisk is just one of potentially multiple "translations" for keywords like "when", "given", etc. It seems odd to me defining the asterisk as a translation, but the Gherkin3-people will have had a good reason for that, I guess. Yes, I would be willing to help, but cannot say yet when I will find time for this. I'll keep in touch. |
Updated URL: https://github.com/cucumber/cucumber/blob/master/gherkin/gherkin-languages.json This will most likely need to be included in a general "localization" update. The issue is in fact that newer versions of Gherkin will match practically any starting word as a keyword. I have even seen joke implementations written in Klingon. We will probably need to update the AST to use any keyword as the starting word, or just ignore it altogether and consume the whole line of text as the step. This would actually solve another problem I'm running into with the code generator, which is the lack of support in the AST to access the keyword, preventing serialization until an update can be made. It will also make step matching a bit more expensive, but this can be mitigated in other ways. |
@rlogiacco Confirmed partial fix in next. |
This issue has not been updated for a while: marking it as stale. |
@rlogiacco This will be closed by #86 |
In the following example, I get java hyperlinks for the second line in the scenario outline, but not for the first. It seems to be caused by using '*' and not one of the keywords 'And', 'Given', etc.
The text was updated successfully, but these errors were encountered: