AST Generator for N1QL

@Zagham_Arif - the client-side Query Workbench has its own version of the N1QL parser to assist with query handling in the UI. It is written in Jison/JavaScript, and generates an AST. The code is kind of ugly - it’s not intended for public use, but it may do what you need. Check out the files here:

https://github.com/couchbase/query-ui/tree/master/query-ui/n1ql_parser

The n1ql-validator.js shows some examples of using the parser.

1 Like