Package org.antlr.runtime.tree

Examples of org.antlr.runtime.tree.Tree


    }
   
    private void checkTreeWhere(String statement) {
        LOG.info("\ncheckTreeWhere: " + statement);
        traverseStatementAndCatchExc(statement);
        Tree whereTree = walker.getWherePredicateTree();
        evalWhereTree(whereTree);
    }
View Full Code Here


        evalWhereTree(whereTree);
    }
   
    private Tree findSearchExpression(String statement) {
        traverseStatementAndCatchExc(statement);
        Tree whereTree = walker.getWherePredicateTree();
        return findTextSearchNode(whereTree);
    }
View Full Code Here

        int count = node.getChildCount();
        if (node.getType() == CmisQlStrictLexer.CONTAINS) {
            return node;
        } else {
            for (int i=0; i<count; i++) {
                Tree child = node.getChild(i);
                node = findTextSearchNode(child); // recursive descent
                if (null != node)
                    return node;
            }
            return null;
View Full Code Here

        int count = root.getChildCount();
        if (root.getType() == CmisQlStrictLexer.CONTAINS) {
            evalSearchExprTree(root);
        } else {
            for (int i=0; i<count; i++) {
                Tree child = root.getChild(i);
                evaluateWhereNode(child);
                evalWhereTree(child); // recursive descent
            }
        }
    }
View Full Code Here

    }
   
    private void evalSearchExprTree(Tree root) {
        int count = root.getChildCount();
        for (int i=0; i<count; i++) {
            Tree child = root.getChild(i);
            evaluateSearchExprNode(child);
            evalSearchExprTree(child); // recursive descent
        }
    }
View Full Code Here

    private void printTree(Tree node) {
        LOG.info(indentString() + printNode(node));
        ++indent;
        int count = node.getChildCount();
        for (int i=0;i<count;i++) {
            Tree child = node.getChild(i);
            printTree(child);
        }
        --indent;
    }
View Full Code Here

    private void printSearchTree(Tree node) {
        LOG.info(indentString() + printSearchNode(node));
        ++indent;
        int count = node.getChildCount();
        for (int i=0;i<count;i++) {
            Tree child = node.getChild(i);
            printSearchTree(child);
        }
        --indent;
    }
View Full Code Here

        List<ColumnDef> columnDefinitions = new ArrayList<ColumnDef>();
       
        // each child node is a ^(HASH ...)
        for (int i = 0; i < meta.getChildCount(); i++)
        {
            Tree metaHash = meta.getChild(i);

            ColumnDef columnDefinition = new ColumnDef();
           
            // each child node is ^(PAIR $key $value)
            for (int j = 0; j < metaHash.getChildCount(); j++)
            {
                Tree metaPair = metaHash.getChild(j);

                // current $key
                String metaKey = CliUtils.unescapeSQLString(metaPair.getChild(0).getText());
                // current $value
                String metaVal = CliUtils.unescapeSQLString(metaPair.getChild(1).getText());

                if (metaKey.equals("column_name"))
                {
                    if (cfDef.column_type.equals("Super"))
                        columnDefinition.setName(subColumnNameAsByteArray(metaVal, cfDef));
View Full Code Here

        Map<String, String> strategyOptions = new HashMap<String, String>();

        // each child node is a ^(HASH ...)
        for (int i = 0; i < options.getChildCount(); i++)
        {
            Tree optionsHash = options.getChild(i);
           
            // each child node is ^(PAIR $key $value)
            for (int j = 0; j < optionsHash.getChildCount(); j++)
            {
                Tree optionPair = optionsHash.getChild(j);

                // current $key
                String key = CliUtils.unescapeSQLString(optionPair.getChild(0).getText());
                // current $value
                String val = CliUtils.unescapeSQLString(optionPair.getChild(1).getText());

                strategyOptions.put(key, val);
            }
        }
View Full Code Here

     * @return byte[] - string value as byte[]
     */
    private ByteBuffer convertValueByFunction(Tree functionCall, CfDef columnFamily, ByteBuffer columnName, boolean withUpdate)
    {
        String functionName = functionCall.getChild(0).getText();
        Tree argumentTree = functionCall.getChild(1);
        String functionArg  = (argumentTree == null) ? "" : CliUtils.unescapeSQLString(argumentTree.getText());
        AbstractType validator = getTypeByFunction(functionName);

        try
        {

View Full Code Here

TOP

Related Classes of org.antlr.runtime.tree.Tree

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.