A small parser for sql like where expressions, so the frontend developer can safely send queries to the backend developer. Some example code for validating, building and pretty printing the AST is in expressionChecker.php. In the example I am validating the tree for the existence of ids, creating valid sql out of the AST and a small set of functions for creating AST. The lexer and parser definitions are included. The generator is jison. The PHP code is only provided as example of how to process the AST.