|
3 | 3 | racket/contract/option)
|
4 | 4 | (provide lexer/c
|
5 | 5 | lexer*/c
|
| 6 | + lexer*/c-without-random-testing |
6 | 7 | (struct-out dont-stop)
|
7 | 8 | (contract-out
|
8 | 9 | [check-colorer-results-match-port-before-and-after
|
|
33 | 34 | [new-mode any/c])))
|
34 | 35 | #:tester (λ (lexer) (try-some-random-streams lexer))))
|
35 | 36 |
|
| 37 | +(define lexer*/c-without-option |
| 38 | + (or/c (->i ([in (and/c input-port? port-counts-lines?)]) |
| 39 | + (values [txt any/c] |
| 40 | + [type (or/c symbol? (hash/c symbol? any/c #:immutable #t))] |
| 41 | + [paren (or/c symbol? #f)] |
| 42 | + [start (or/c exact-positive-integer? #f)] |
| 43 | + [end (start type) (end/c start type)])) |
| 44 | + (->i ([in (and/c input-port? port-counts-lines?)] |
| 45 | + [offset exact-nonnegative-integer?] |
| 46 | + [mode (not/c dont-stop?)]) |
| 47 | + (values [txt any/c] |
| 48 | + [type (or/c symbol? (hash/c symbol? any/c #:immutable #t))] |
| 49 | + [paren (or/c symbol? #f)] |
| 50 | + [start (or/c exact-positive-integer? #f)] |
| 51 | + [end (start type) (end/c start type)] |
| 52 | + [backup exact-nonnegative-integer?] |
| 53 | + [new-mode any/c])))) |
| 54 | + |
| 55 | +(define lexer*/c-without-random-testing |
| 56 | + (option/c |
| 57 | + lexer*/c-without-option)) |
| 58 | + |
36 | 59 | (define lexer*/c
|
37 | 60 | (option/c
|
38 |
| - (or/c (->i ([in (and/c input-port? port-counts-lines?)]) |
39 |
| - (values [txt any/c] |
40 |
| - [type (or/c symbol? (hash/c symbol? any/c #:immutable #t))] |
41 |
| - [paren (or/c symbol? #f)] |
42 |
| - [start (or/c exact-positive-integer? #f)] |
43 |
| - [end (start type) (end/c start type)])) |
44 |
| - (->i ([in (and/c input-port? port-counts-lines?)] |
45 |
| - [offset exact-nonnegative-integer?] |
46 |
| - [mode (not/c dont-stop?)]) |
47 |
| - (values [txt any/c] |
48 |
| - [type (or/c symbol? (hash/c symbol? any/c #:immutable #t))] |
49 |
| - [paren (or/c symbol? #f)] |
50 |
| - [start (or/c exact-positive-integer? #f)] |
51 |
| - [end (start type) (end/c start type)] |
52 |
| - [backup exact-nonnegative-integer?] |
53 |
| - [new-mode any/c]))) |
| 61 | + lexer*/c-without-option |
54 | 62 | #:tester (λ (lexer) (try-some-random-streams lexer))))
|
55 | 63 |
|
56 | 64 | (define (try-some-random-streams lexer)
|
|
0 commit comments