Converting parser to coffeescript