Skip to content

Commit

Permalink
Merge pull request nojb#6 from ALPHA-60/fix-sequence-set-grammar
Browse files Browse the repository at this point in the history
Use longest match when parsing a `sequence-set'
  • Loading branch information
nojb committed Nov 15, 2014
2 parents 5c4ae43 + 98c20cc commit fc82dea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imap/imapParser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ sequence-set = (seq-number / seq-range) *("," sequence-set)
; overlap coalesced to be 4,5,6,7,8,9,10.
*)
let sequence_set =
let elem = alt (seq_number >>= fun x -> ret (ImapSet.single x)) seq_range in
let elem = alt seq_range (seq_number >>= fun x -> ret (ImapSet.single x)) in
elem >>= fun x ->
rep (char ',' >> elem) >>= fun xs ->
ret (List.fold_left ImapSet.union x xs)
Expand Down

0 comments on commit fc82dea

Please sign in to comment.