Factoring out meta-grammar