Initial grammar implementation