I'm setting about to write a mini language of sorts for defining recurring intervals that will be used in a recurring billing application. In the past I wrote a simpler version in perl using the awsome Date::Manip module, and am looking for the best way to do it in ruby. I'm not too concerned about the date calculations themselves I'm mainly thinking about how to parse the language. My first thought is to just use a parser such as lemon or ragel. Any suggestions? A recurring definition would be compiled into a set of billing dates. Recurring definitions might look something like the following: * Every month for 12 months starting in 1 month * Every week for 1 week starting in one week then every month for 12 months * Every month until cancelled starting in one week