Moved grammar rules to external resource document.