Package com.blazebit.regex.node

Examples of com.blazebit.regex.node.OrNode


    return false;
  }

  private Node parseUnion() {
    OrNode rootNode = new OrNode();

    do {
      rootNode.add(parseTerm());
    } while (match('|'));

    return rootNode;
  }
View Full Code Here


    } else
      return parseAtom();
  }

  private Node parseCharacterClasses() {
    OrNode node = new OrNode();

    do {
      node.add(parseCharacterRange());
    } while (hasNext() && !peek("]"));

    return node;
  }
View Full Code Here

  private Node parseCharacterRange() {
    char c = parseCharacter();

    if (match('-')) {
      if (peek("]")) {
        OrNode node = new OrNode();
        node.add(new CharNode(c));
        node.add(new CharNode('-'));
        return node;
      } else {
        return new CharRangeNode(c, parseCharacter());
      }
    } else {
View Full Code Here

      moreRequiredSet = moreRequiredExists(node, context);
      context.setHasMoreRequired(moreRequiredSet);
    }

    if (node instanceof OrNode) {
      OrNode orNode = (OrNode) node;
      List<Node> nodes = orNode.getNodes();
      newNodes = new ArrayList<TrieNode<V>>(trieNodes.size()
          * nodes.size());

      for (int i = 0; i < nodes.size(); i++) {
        newNodes.addAll(traverse(nodes.get(i), context, trieNodes,
View Full Code Here

TOP

Related Classes of com.blazebit.regex.node.OrNode

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.