/**
	 * Shorthand for creating a new object and calling parse.
	 *
	 * @param null   $string
	 * @param string $dialect
	 *
	 * @return array
	 *
	 * @throws Exception
	 */
	public static function ConstructAndParse($string = null, $dialect = 'ANSI') {
		$parser = new self($string, $dialect);
		$tree = $parser->parseQuery();
		if (! is_null($parser->token)) {
			throw new Exception('Expected EOQ');
		}

		return $tree;
	}