If you are considering feature requests then I would suggest using a no bracket gherkin feature file to create a test class pretty much like cucumber's step definitions.
Don't worry about bad long stringy names, the good thing is that they raise the chance of being unique.
The result is something that can be run directly in autotest as a manual test.
Your not trying to make a complete file, just something you can copy and paste from. You would try to avoid clobbering peoples work.
So Gherkin Feature name -> test class name
Scenario name -> individual test name (in the autotest sense)
test has no require and no ensure, it has do .... clause1, clause2, clause3, .... end
each clause becomes a eiffel feature with the keyword stripped and has the long ugly name and lives in a feature{NONE} section. it has some initial "I'm not done" exception.
in the scenario outline mode, the feature can be parameterized, you may have already determined how to work this.
for the scenario outline the do ... has some kind of iterator ... end calling the clauses
you would translate the scenario data into something simple, like an array of TUPLE with the scenario name to make it identifiable
Motivation for these suggestions:
I played with Autotest a little more, and it calls test in a random order.
Also, it treats returns from exceptions differently. There's pass (green), fail (fail) , and unresolved(yellow)
If you fail a requires or ensure clause on a test you get a yellow, if you fail a requires on a called class you get a yellow.
If you assert a falsehood or cause an exception in the test you get a red.
If you fail the ensure in a called class you get a red.
If you cause an exception in the called class you get a red.
It is not the end of the world for people to decide that yellow is the same as red, but it adds complication.
One thing I know for sure is that people hate automatically generated code, and will throw it away almost without thinking.
I think I can see the motivation for how you are doing the generator, you want two classes of the given name so that one is auto-generated and one can be coded by hand.
I had assumed that you were using the bracketed items for generating a first implementation for a target class, that was why I was suspicious of the design/implementation intermix.
It might be that there is a way to make this work. The cucumber method seems to be using Java's nested class approach to build up a target class, using the step definition file as the scratch pad.
I do think you should use the @-sign tags for marking instead of brackets, then in the generated code, these would turn into notes (along with given, when, etc) so people can tell how something was generated.
Are you intending to make a separate application, using a Lexer and Parser? This could probably be made to work using the console tool to copy and paste from.
Carl