Getting nodes of a Abstract Syntax Tree of Acceleo Query Language in java

92 Views Asked by At

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 .

0

There are 0 best solutions below