ocaml-ooxml icon indicating copy to clipboard operation
ocaml-ooxml copied to clipboard

Improve classify_format (with a parser?)

Open brendanlong opened this issue 6 years ago • 1 comments

classify_format uses a crazy regex and several String.contains checks. We should replace it with a Menhir parser, which would be substantially faster and probably more readable.

Note: I don't know how much the performance of this function actually matters right now, but this is an improvement I'd like to do because it's both faster and cleaner.

brendanlong avatar Feb 28 '18 20:02 brendanlong

Menhir is also just an example. Some other parser format might be reasonable too (Angstrom? something custom?). The main thing is that I want the code to be relatively straightforward (preferably functional), and preferably not have to make several passes of each string.

brendanlong avatar Mar 06 '18 20:03 brendanlong