I am supposed to read a text file containing "lyrics", then format it out based on special symbols like +,-, and spaces.
Here's the lyrics syntax:
Spaces are significant: A single space between two words makes the two words go in two successive beats. Each additional space causes the lyric skip to skip an extra beat.
input = " Mary had a little lamb."; output = "", "", "Mary", "", "had", "a", "little", "lamb."
-: force a single word to be split into multiple beats
input = "a b- c d"; output = "a", "b-", "", "c", "d"
I can't figure out how to come up with a solution for the spaces and minus signs so what have i done so far is to remove strings enclosed in braces, break down the string into tokens then assign the first plus sign as spaces, can somebody out there help me come up with a n algorithm for the spaces and minus signs? Please don't be mean, I'm just a newbie :-/