This is my patch submission after a while. I have submitted fixes for grub_printf in the past, which is still pending on merge conflicts.
Attached patch contains changes on top of "for-loops" branch to support "elif" construct in grub script. Please review and let me know if anything else needs to be done to get this comitted.