(1) Fix a parse bug (2) fix a query processor bug which can not process the same gram twice