Setting up grammar formalization