Format grammar nicely