The parser first extracts all tokens containing MATCH clauses, then replace them with multiline comment. The original parser will parse remaining tokens and return a syntax tree. Finally, MATCH clauses are inserted into appropriate QueryBlock by traversing the syntax tree.