Improved grammar3, fixed a bug in rand.py which prevents multiline comments next to production rules