Factor out grammar
document grammar
Merge pull request #21 from Ceasar/grammar

Factor out a Grammar