gabrielfalcao / lettuce

Behavior-driven-development tool for python, inspired by Cucumber for Ruby ⛺
http://lettuce.it
GNU General Public License v3.0
1.27k stars 324 forks source link

Rewrite the parser #319

Closed gabrielfalcao closed 10 years ago

gabrielfalcao commented 11 years ago

The lettuce parser should be rewritten in order to achieve speed and trustfulness

refs #194

andreyshipilov commented 11 years ago

Hi there. Are there any plans to fix that issue, Gabriel? Would be really awesome. We are using Behave in the meantime, it's kinda horrible I'd say. And we also have no interest to use Cucumber, because of Ruby of course.

gabrielfalcao commented 11 years ago

@clarete is my best friend and is working on a pure lexer/parser implementation of gherkin, he should be done in the next weeks and I'll plug it into lettuce fixing all those parsing-related problems that lettuce has now

thedrow commented 11 years ago

Could @clarete please release it as a separate package?

clarete commented 11 years ago

Hi folks, that's actually what I'm doing! I'm planning to release the first version of this new guy in the next weekend and it will definitely be a separate package.

andreyshipilov commented 11 years ago

Very much appreciated.

erisilbe commented 11 years ago

I'm also interested in this thread. I'd like to be able to pull UserStories from an agile artifact repo, parse out a delimited section containing the acceptance tests detailed in Lettuce/Gherkin, edit and write out runnable test(s)

clarete commented 11 years ago

Hi there. Since I've been working on a different project these days, gherking is in my wait list. Since I might take more time to finish my current thing, I'll share the current state of the work with you guys in this repo.

I'll eventually finish this project I just think it's good to share it now, so anyone else can join whenever they want! :)

danni commented 10 years ago

@clarete I'm not sure where you go to with this, but I knocked out a parser using pyparsing today. It passes the parser tests (sans max_length, which I'm ignoring for now). I'm in the process of retro-fitting it into the Lettuce core.

The code is in https://github.com/infoxchange/lettuce/tree/new-parser

adaschevici commented 10 years ago

@danni I've been doing a bit of digging in the code and it seems max_length is tied in with the spaces on each line so i think it may be a good idea to adapt the tests for less spacey values since the pyparsing lib is not very fond of spaces. I haven't been able to run the batch of tests. It's not detecting this method: Feature.from_string = classmethod(from_string)

adaschevici commented 10 years ago

430 closing this