3 ms·
I completed the make a lisp project in Reason (alternative syntax for OCaml) a few months ago. I used the PCRE library, which has pretty much all the features
by bgorman 6y ago
I completed the make a lisp project in Reason (alternative syntax for OCaml) a few months ago.
I used the PCRE library, which has pretty much all the features you expect, and it is actively maintained. Note: the heavy lifting is done by C libraries.
https://opam.ocaml.org/packages/pcre/ https://opam.ocaml.org/packages/pcre/
If you want to see how I integrated it with the interpreter the code is here:
https://github.com/briangorman/reason-mal/blob/master/reader.re https://github.com/briangorman/reason-mal/blob/master/reader...
- johnisgood 6y agoMight be outdated (or not), but this page has tons and tons of examples, incl. lookahead: http://pleac.sourceforge.net/pleac_ocaml/patternmatching.html http://pleac.sourceforge.net/pleac_ocaml/patternmatching.htm... And the GitHub page of the aforementioned library: https://mmottl.github.io/pcre-ocaml/ https://mmottl.github.io/pcre-ocaml/