art-w/sherlocode

Realtime grep for OCaml/Coq sources available on opam

OCaml

89

24 commits

updated Sep 5, 2024

See the code

README

Find it online at sherlocode.com for OCaml projects!

And at sherlocoq.sirref.org for Coq libraries! (thanks to patricoferris <3)

This is a straightforward implementation of Regular Expression Matching with a Trigram Index by Russ Cox. For each of the characters, bigrams and trigrams, we store the set of line numbers where they appear. To answer a query, we first approximate the regex by enumerating the ngrams that are required/optional: the intersection/union of their indexed set yields good line candidates against which we can match the query.

Contributors

art-w

23 commits

muzimuzhi

1 commits

art-w/sherlocode

Realtime grep for OCaml/Coq sources available on opam

OCaml

89

24 commits

updated Sep 5, 2024

See the code

README

Find it online at sherlocode.com for OCaml projects!

And at sherlocoq.sirref.org for Coq libraries! (thanks to patricoferris <3)

This is a straightforward implementation of Regular Expression Matching with a Trigram Index by Russ Cox. For each of the characters, bigrams and trigrams, we store the set of line numbers where they appear. To answer a query, we first approximate the regex by enumerating the ngrams that are required/optional: the intersection/union of their indexed set yields good line candidates against which we can match the query.

Contributors

art-w

23 commits

muzimuzhi

1 commits

Languages

OCaml

88.0%

CSS

10.5%