(formatting)
Refactored Parser parse() and toString() methods, refactored Grammar.