Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You are given a string that you have to parse into tokens, which you can see in the "Token Grammar". For example:
str = 'return "String" + "number"'
From the table you must map each part of the string to a token from the table
result_tokens = 'return' - keyword; ' ' - whitespace; 'String' - string; ' - whitespace; 'number' - string
In addition, you need to implement an iteration protocol.
I hope this makes more sense to you.
I understand almost nothing from the description of this Kata and the examples given just can't make up for the 75% missing explanation. Can someone please explain me what I even have to do for this Kata?
HINT: You should probably try to make your function work the same, regardless of the spacing
Maybe try regular expressions, they are quite powerful but not that easy to get the actual pattern right
The spaces are quite easy to get around.
HINT: You should probably make your function space independent, as in working the same regardless of spacing
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Most 4 kyu Katas I did were easier than even figuring out how to get started on solving this one...