I am want to calculate the number of nodes in a AST od a AQL expression. My code is as following.
public static void aqlParser(String queryString ) {
IQueryEnvironment queryEnvironment = Query.newEnvironment();
QueryBuilderEngine builder = new QueryBuilderEngine(queryEnvironment);
AstResult astResult = builder.build(queryString);
System.out.println(astResult);
System.out.println(astResult.getAst());
System.out.println(astResult);
//AQLSiriusInterpreter asi= new AQLSiriusInterpreter() ;
}
THe idea is to build an expression from a String query and calculate the number of nodes in the AST .