-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support multiple languages #6
Comments
Any idea on how to start working on this? |
I need this, I'll start working on it and ask form help if I get stuck... But it looks like I should start from here, right? https://github.com/codegram/gherkin-ruby/blob/master/lib/gherkin/parser/lexer.rb#L61-104 |
We need to hook into the lexer (defined here, the file you mentioned is autogenerated from this one) to identify the header like:
And then use the corresponding set of tokens. The lexer is written in Rexical, so we just need to figure out how to execute some code before, dynamically set which set of tokens are we using, and then let the lexer tokenize the file, and then we're done. Makes sense? |
Actually it's very easy, look at this part of the code. Here, before the call to locale = code.scan(/language/ bla bla whatever
@tokens = get_tokens_from_locale(locale) # => this would return something like { :When => "Quan", :Then => "Llavors" ... }
scan_setup(code) And then I don't know how to use these tokens in the lexer. But it's something. What do you think? |
Looks nice to me, but I don't see myself succeeding on this alone... Marc Riera Casals On Saturday, April 7, 2012 at 4:02 PM, Josep M. Bach wrote:
|
Just a small status update, anyone up for implementing this? @mrcasals @Dor3nz @divins @oriolgual @josepjaume ? |
We haven't actually needed this, so.... :P |
I do have needed this, but I don't know how to fixnit :(
|
Sorry, I will not contribute because I'm working on my own vegetable: a Gherkin DSL on top of RSpec: https://github.com/21croissants/maniok_bdd/ |
OK, nevermind. |
Hi, I'm wondering if this feature are planned to be implemented? |
No description provided.
The text was updated successfully, but these errors were encountered: