private QueryType buildQueryType(OperatorNode<ExpressionOperator> ast) {
        String grammar = getAnnotation(ast, USER_INPUT_GRAMMAR, String.class,
                                       Query.Type.WEAKAND.toString(), "The overall query type of the user input");
        String composite = getAnnotation(ast, USER_INPUT_GRAMMAR_COMPOSITE, String.class,
                                         null, "The composite type terms should be collected under");
        String tokenization = getAnnotation(ast, USER_INPUT_GRAMMAR_TOKENIZATION, String.class,
                                            null, "The tokenization type to apply to the user input string");
        String syntax = getAnnotation(ast, USER_INPUT_GRAMMAR_SYNTAX, String.class,
                                      null, "The syntax type of the user input");

        return QueryType.from(grammar).setComposite(composite)
                                      .setTokenization(tokenization)
                                      .setSyntax(syntax);
    }
The YQL query language.

This class <em>must</em> be kept in lockstep with {@link VespaSerializer}.
Adding anything here will usually require a corresponding addition in
VespaSerializer.

@author Steinar Knutsen
@author Stian Kristoffersen
@author Simon Thoresen Hult
container-search/src/main/java/com/yahoo/search/yql/YqlParser.java