//->	^(PARAM_SEQUENCE pSeqTokens)
776038
@Override
	public T visitPSeq(PSeqContext ctx) {
//		on(ctx);
		appendAst(ctx, tok(PARAM_SEQUENCE));
		return super.visitPSeq(ctx);
	}
1303194
func (s *StreamRecord) SetSequenceNumber(v string) *StreamRecord {
	s.SequenceNumber = &v
	return s
}
901220
func (cs *chainSupport) Sequence() uint64 {
	sb := cs.bundleSource.StableBundle()
	return sb.ConfigtxValidator().Sequence()
}
113346
def seqrecord2sequence(record, qlen, index):
    
    # aligned_len = sum(map(str.isupper, str(record.seq)))
    # assert qlen == aligned_len, (
    #         "Aligned sequence length %s, query %s\n%s"
    #         % (aligned_len, qlen, str(record)))

    description = (record.description.split(' ', 1)[1]
            if ' ' in record.description
            else ' ')
    return dict(index=index,
                id=record.id,
                description=description,
                dbxrefs={},
                phylum='',
                taxchar='',
                head_len=None,
                tail_len=None,
                head_seq='',
                tail_seq='',
                length=len(record.seq) - record.seq.count('-'),
                seq=str(record.seq),
                )
1203639
func StartAtSequence(seq uint64) SubscriptionOption {
	return func(o *SubscriptionOptions) error {
		o.StartAt = pb.StartPosition_SequenceStart
		o.StartSequence = seq
		return nil
	}
}
133935
func (f *MathFuncs) Seq(n ...interface{}) ([]int64, error) {
	start := int64(1)
	end := int64(0)
	step := int64(1)
	if len(n) == 0 {
		return nil, fmt.Errorf("math.Seq must be given at least an 'end' value")
	}
	if len(n) == 1 {
		end = conv.ToInt64(n[0])
	}
	if len(n) == 2 {
		start = conv.ToInt64(n[0])
		end = conv.ToInt64(n[1])
	}
	if len(n) == 3 {
		start = conv.ToInt64(n[0])
		end = conv.ToInt64(n[1])
		step = conv.ToInt64(n[2])
	}
	return math.Seq(conv.ToInt64(start), conv.ToInt64(end), conv.ToInt64(step)), nil
}
225012
func InterpretMessageRange(imapMessageRange string) (seqRange SequenceRange, err error) {
	result := rangeRegexp.FindStringSubmatch(imapMessageRange)
	if len(result) == 0 {
		return SequenceRange{}, errInvalidRangeString(imapMessageRange)
	}

	first := SequenceNumber(result[1])
	second := SequenceNumber(result[2])

	// Reduce *:* to *
	if first.Last() && second.Last() {
		return SequenceRange{Min: SequenceNumber("*"), Max: SequenceNumber("")}, nil
	}

	// Ensure "*" is always placed in 'Max'
	if first.Last() && !second.Nil() {
		return SequenceRange{Min: second, Max: first}, nil
	}

	// If both sequence numbers are integer values, we need to sort them
	if first.IsValue() && second.IsValue() {
		firstVal, _ := first.Value()
		secondVal, _ := second.Value()
		if firstVal > secondVal {
			return SequenceRange{Min: second, Max: first}, nil
		}
	}

	return SequenceRange{Min: first, Max: second}, nil
}
1003254
func sequence(mb modelBackend, name string) (int, error) {
	sequences, closer := mb.db().GetCollection(sequenceC)
	defer closer()
	query := sequences.FindId(name)
	inc := mgo.Change{
		Update: bson.M{
			"$set": bson.M{
				"name":       name,
				"model-uuid": mb.modelUUID(),
			},
			"$inc": bson.M{"counter": 1},
		},
		Upsert: true,
	}
	result := &sequenceDoc{}
	_, err := query.Apply(inc, result)
	if err != nil {
		return -1, fmt.Errorf("cannot increment %q sequence number: %v", name, err)
	}
	return result.Counter, nil
}
807278
func DecryptRequestWithSequenceNumber(client io.Writer, r *http.Request, bucket, object string, seqNumber uint32, metadata map[string]string) (io.WriteCloser, error) {
	if crypto.S3.IsEncrypted(metadata) {
		return newDecryptWriter(client, nil, bucket, object, seqNumber, metadata)
	}

	key, err := ParseSSECustomerRequest(r)
	if err != nil {
		return nil, err
	}
	return newDecryptWriter(client, key, bucket, object, seqNumber, metadata)
}
7952
func (v *PVector) Seq() iseq.Seq {
	if cs := v.chunkedSeq(); cs != nil {
		// avoid the dreaded nil interface problem
		return cs
	}
	return nil
}
21785
func (c *RPCClient) handleSeq(seq uint64, handler seqHandler) {
	c.dispatchLock.Lock()
	defer c.dispatchLock.Unlock()
	c.dispatch[seq] = handler
}
661035
func (s *PutLogEventsInput) SetSequenceToken(v string) *PutLogEventsInput {
	s.SequenceToken = &v
	return s
}
1147841
func (c *DialContext) NextSeq(db string, collection string, id string) (int, error) {
	s := c.Ref()
	defer c.UnRef(s)

	var res struct {
		Seq int
	}
	_, err := s.DB(db).C(collection).FindId(id).Apply(mgo.Change{
		Update:    bson.M{"$inc": bson.M{"seq": 1}},
		ReturnNew: true,
	}, &res)

	return res.Seq, err
}
542905
func InterpretSequenceSet(imapSequenceSet string) (seqSet SequenceSet, err error) {
	// Ensure the sequence set is valid
	if !setRegexp.MatchString(imapSequenceSet) {
		return nil, errInvalidSequenceSetString(imapSequenceSet)
	}

	ranges := strings.Split(imapSequenceSet, ",")

	seqSet = make(SequenceSet, len(ranges))
	for index, rng := range ranges {
		seqSet[index], err = InterpretMessageRange(rng)
		if err != nil {
			return seqSet, err
		}
	}

	return seqSet, nil
}
545720
func (st *State) Sequences() (map[string]int, error) {
	sequences, closer := st.db().GetCollection(sequenceC)
	defer closer()

	var docs []sequenceDoc
	if err := sequences.Find(nil).All(&docs); err != nil {
		return nil, errors.Trace(err)
	}

	result := make(map[string]int)
	for _, doc := range docs {
		result[doc.Name] = doc.Counter
	}
	return result, nil
}
649334
func makeSortedSequences(sequences map[uint64]int64) []uint64 {
	results := make([]uint64, 0, len(sequences))
	for seq := range sequences {
		results = append(results, seq)
	}
	sort.Sort(bySeq(results))
	return results
}
259010
func (p *parser) sequence(t *Token) ([]*Token, Error) {
	// extract the sequence of tokens for a valid path
	//      - this excludes the negation token, which is handled as
	//        a special case before sequence() is called
	switch t.Type {
	// the path starts with a separator
	case SEPARATOR:
		return p.separator(t)

	// the path starts with the "any" pattern ("**")
	case ANY:
		return p.any(t)

	// the path starts with whitespace, wildcard or a pattern
	case WHITESPACE:
		fallthrough
	case PATTERN:
		return p.pattern(t)
	}

	// otherwise, we have an invalid specification
	p.undo(t)
	return nil, p.err(InvalidPatternError)
}