Main grammar