add q expressions to grammar