prefix grammar — formal grammar