com.sun.org.apache.xerces.internal.impl.dtd.XMLContentSpec Java Examples

The following examples show how to use com.sun.org.apache.xerces.internal.impl.dtd.XMLContentSpec. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CMBinOp.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #2
Source File: CMBinOp.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #3
Source File: CMBinOp.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #4
Source File: CMBinOp.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #5
Source File: CMBinOp.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
protected void calcFirstPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.firstPos());
        toSet.union(fRightChild.firstPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our left child is nullable, then its the union of our
        //  children's first positions. Else is our left child's first
        //  positions.
        //
        toSet.setTo(fLeftChild.firstPos());
        if (fLeftChild.isNullable())
            toSet.union(fRightChild.firstPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #6
Source File: CMBinOp.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected void calcFirstPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.firstPos());
        toSet.union(fRightChild.firstPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our left child is nullable, then its the union of our
        //  children's first positions. Else is our left child's first
        //  positions.
        //
        toSet.setTo(fLeftChild.firstPos());
        if (fLeftChild.isNullable())
            toSet.union(fRightChild.firstPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #7
Source File: CMBinOp.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
protected void calcFirstPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.firstPos());
        toSet.union(fRightChild.firstPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our left child is nullable, then its the union of our
        //  children's first positions. Else is our left child's first
        //  positions.
        //
        toSet.setTo(fLeftChild.firstPos());
        if (fLeftChild.isNullable())
            toSet.union(fRightChild.firstPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #8
Source File: CMBinOp.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected void calcFirstPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.firstPos());
        toSet.union(fRightChild.firstPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our left child is nullable, then its the union of our
        //  children's first positions. Else is our left child's first
        //  positions.
        //
        toSet.setTo(fLeftChild.firstPos());
        if (fLeftChild.isNullable())
            toSet.union(fRightChild.firstPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #9
Source File: CMBinOp.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #10
Source File: CMBinOp.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected void calcFirstPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.firstPos());
        toSet.union(fRightChild.firstPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our left child is nullable, then its the union of our
        //  children's first positions. Else is our left child's first
        //  positions.
        //
        toSet.setTo(fLeftChild.firstPos());
        if (fLeftChild.isNullable())
            toSet.union(fRightChild.firstPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #11
Source File: CMBinOp.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #12
Source File: CMBinOp.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected void calcFirstPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.firstPos());
        toSet.union(fRightChild.firstPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our left child is nullable, then its the union of our
        //  children's first positions. Else is our left child's first
        //  positions.
        //
        toSet.setTo(fLeftChild.firstPos());
        if (fLeftChild.isNullable())
            toSet.union(fRightChild.firstPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #13
Source File: CMBinOp.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
protected void calcFirstPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.firstPos());
        toSet.union(fRightChild.firstPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our left child is nullable, then its the union of our
        //  children's first positions. Else is our left child's first
        //  positions.
        //
        toSet.setTo(fLeftChild.firstPos());
        if (fLeftChild.isNullable())
            toSet.union(fRightChild.firstPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #14
Source File: CMBinOp.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #15
Source File: CMBinOp.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #16
Source File: CMBinOp.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected void calcLastPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.lastPos());
        toSet.union(fRightChild.lastPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our right child is nullable, then its the union of our
        //  children's last positions. Else is our right child's last
        //  positions.
        //
        toSet.setTo(fRightChild.lastPos());
        if (fRightChild.isNullable())
            toSet.union(fLeftChild.lastPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #17
Source File: CMBinOp.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected void calcFirstPos(CMStateSet toSet)
{
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
    {
        // Its the the union of the first positions of our children.
        toSet.setTo(fLeftChild.firstPos());
        toSet.union(fRightChild.firstPos());
    }
     else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
    {
        //
        //  If our left child is nullable, then its the union of our
        //  children's first positions. Else is our left child's first
        //  positions.
        //
        toSet.setTo(fLeftChild.firstPos());
        if (fLeftChild.isNullable())
            toSet.union(fRightChild.firstPos());
    }
     else
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }
}
 
Example #18
Source File: CMLeaf.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/** Constructs a content model leaf. */
public CMLeaf(QName element)  {
    super(XMLContentSpec.CONTENTSPECNODE_LEAF);

    // Store the element index and position
    fElement.setValues(element);
}
 
Example #19
Source File: CMLeaf.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/** Constructs a content model leaf. */
public CMLeaf(QName element, int position)  {
    super(XMLContentSpec.CONTENTSPECNODE_LEAF);

    // Store the element index and position
    fElement.setValues(element);
    fPosition = position;
}
 
Example #20
Source File: CMUniOp.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public CMUniOp(int type, CMNode childNode)
{
    super(type);

    // Insure that its one of the types we require
    if ((type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
    &&  (type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE)
    &&  (type() != XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE))
    {
        throw new RuntimeException("ImplementationMessages.VAL_UST");
    }

    // Store the node and init any data that needs it
    fChild = childNode;
}
 
Example #21
Source File: CMBinOp.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public boolean isNullable()
{
    //
    //  If its an alternation, then if either child is nullable then
    //  this node is nullable. If its a concatenation, then both of
    //  them have to be nullable.
    //
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
        return (fLeftChild.isNullable() || fRightChild.isNullable());
    else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
        return (fLeftChild.isNullable() && fRightChild.isNullable());
    else
        throw new RuntimeException("ImplementationMessages.VAL_BST");
}
 
Example #22
Source File: CMBinOp.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public CMBinOp(int type, CMNode leftNode, CMNode rightNode)
{
    super(type);

    // Insure that its one of the types we require
    if ((type() != XMLContentSpec.CONTENTSPECNODE_CHOICE)
    &&  (type() != XMLContentSpec.CONTENTSPECNODE_SEQ))
    {
        throw new RuntimeException("ImplementationMessages.VAL_BST");
    }

    // Store the nodes and init any data that needs it
    fLeftChild = leftNode;
    fRightChild = rightNode;
}
 
Example #23
Source File: CMLeaf.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a content model leaf. */
public CMLeaf(QName element)  {
    super(XMLContentSpec.CONTENTSPECNODE_LEAF);

    // Store the element index and position
    fElement.setValues(element);
}
 
Example #24
Source File: CMLeaf.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a content model leaf. */
public CMLeaf(QName element, int position)  {
    super(XMLContentSpec.CONTENTSPECNODE_LEAF);

    // Store the element index and position
    fElement.setValues(element);
    fPosition = position;
}
 
Example #25
Source File: CMUniOp.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public boolean isNullable()
{
    //
    //  For debugging purposes, make sure we got rid of all non '*'
    //  repetitions. Otherwise, '*' style nodes are always nullable.
    //
    if (type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
        return fChild.isNullable();
    else
        return true;
}
 
Example #26
Source File: CMUniOp.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isNullable()
{
    //
    //  For debugging purposes, make sure we got rid of all non '*'
    //  repetitions. Otherwise, '*' style nodes are always nullable.
    //
    if (type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
        return fChild.isNullable();
    else
        return true;
}
 
Example #27
Source File: CMLeaf.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a content model leaf. */
public CMLeaf(QName element)  {
    super(XMLContentSpec.CONTENTSPECNODE_LEAF);

    // Store the element index and position
    fElement.setValues(element);
}
 
Example #28
Source File: CMBinOp.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isNullable()
{
    //
    //  If its an alternation, then if either child is nullable then
    //  this node is nullable. If its a concatenation, then both of
    //  them have to be nullable.
    //
    if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
        return (fLeftChild.isNullable() || fRightChild.isNullable());
    else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
        return (fLeftChild.isNullable() && fRightChild.isNullable());
    else
        throw new RuntimeException("ImplementationMessages.VAL_BST");
}
 
Example #29
Source File: CMUniOp.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isNullable()
{
    //
    //  For debugging purposes, make sure we got rid of all non '*'
    //  repetitions. Otherwise, '*' style nodes are always nullable.
    //
    if (type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
        return fChild.isNullable();
    else
        return true;
}
 
Example #30
Source File: CMUniOp.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public CMUniOp(int type, CMNode childNode)
{
    super(type);

    // Insure that its one of the types we require
    if ((type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
    &&  (type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE)
    &&  (type() != XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE))
    {
        throw new RuntimeException("ImplementationMessages.VAL_UST");
    }

    // Store the node and init any data that needs it
    fChild = childNode;
}