Common Query Language parse written in JavaScript