Re: [racket-dev] regexp.c and lookahead

2014-06-16 Thread Tony Garnock-Jones
On 2014-06-15 3:40 AM, Matthew Flatt wrote: >[(queue-empty? ports) > (cond > [(zero? (random 100)) > (suspend) > (retry)] > [else 0])] > > and that's obviously a hack, but it should illustrate that regexp > matching can be happy to work with th

Re: [racket-dev] regexp.c and lookahead

2014-06-15 Thread Matthew Flatt
At Sat, 14 Jun 2014 18:18:05 -0400, Tony Garnock-Jones wrote: > At the moment, when regexp.c runs out of buffered lookahead during a > regexp-try-match, it peeks a few bytes. However, it looks like it will > never peek *fewer* than 16 bytes (unless eof occurs before then). I don't think that's rig

[racket-dev] regexp.c and lookahead

2014-06-14 Thread Tony Garnock-Jones
Hi all, At the moment, when regexp.c runs out of buffered lookahead during a regexp-try-match, it peeks a few bytes. However, it looks like it will never peek *fewer* than 16 bytes (unless eof occurs before then). I have written the package "incremental-input" which lets a blocking read (e.g. rea