Transfer of grammar and lex