define current grammar
export grammar to file