grammar compilation