public boolean isEmpty() { return mbuf == null && bs.isEmpty(); }
public boolean isEmpty() { return mbuf == null && bs.isEmpty(); }
private int compileLengthCClassNode(CClassNode cc) { int len; if (cc.mbuf == null) { len = OPSize.OPCODE + BitSet.BITSET_SIZE; } else { if (enc.minLength() > 1 || cc.bs.isEmpty()) { len = OPSize.OPCODE; } else { len = OPSize.OPCODE + BitSet.BITSET_SIZE; } len += OPSize.LENGTH + cc.mbuf.getUsed(); } return len; }
private int compileLengthCClassNode(CClassNode cc) { int len; if (cc.mbuf == null) { len = OPSize.OPCODE + BitSet.BITSET_SIZE; } else { if (enc.minLength() > 1 || cc.bs.isEmpty()) { len = OPSize.OPCODE; } else { len = OPSize.OPCODE + BitSet.BITSET_SIZE; } len += OPSize.LENGTH + cc.mbuf.getUsed(); } return len; }
@Override protected void compileCClassNode(CClassNode cc) { if (cc.mbuf == null) { if (cc.isNot()) { addOpcode(OPCode.CCLASS_NOT); } else { addOpcode(OPCode.CCLASS); } addInts(cc.bs.bits, BitSet.BITSET_SIZE); // add_bitset } else { if (enc.minLength() > 1 || cc.bs.isEmpty()) { if (cc.isNot()) { addOpcode(OPCode.CCLASS_MB_NOT); } else { addOpcode(OPCode.CCLASS_MB); } addMultiByteCClass(cc.mbuf); } else { if (cc.isNot()) { addOpcode(OPCode.CCLASS_MIX_NOT); } else { addOpcode(OPCode.CCLASS_MIX); } // store the bit set and mbuf themself! addInts(cc.bs.bits, BitSet.BITSET_SIZE); // add_bitset addMultiByteCClass(cc.mbuf); } } }
@Override protected void compileCClassNode(CClassNode cc) { if (cc.mbuf == null) { if (cc.isNot()) { addOpcode(OPCode.CCLASS_NOT); } else { addOpcode(OPCode.CCLASS); } addInts(cc.bs.bits, BitSet.BITSET_SIZE); // add_bitset } else { if (enc.minLength() > 1 || cc.bs.isEmpty()) { if (cc.isNot()) { addOpcode(OPCode.CCLASS_MB_NOT); } else { addOpcode(OPCode.CCLASS_MB); } addMultiByteCClass(cc.mbuf); } else { if (cc.isNot()) { addOpcode(OPCode.CCLASS_MIX_NOT); } else { addOpcode(OPCode.CCLASS_MIX); } // store the bit set and mbuf themself! addInts(cc.bs.bits, BitSet.BITSET_SIZE); // add_bitset addMultiByteCClass(cc.mbuf); } } }