ocaml-ooxml
ocaml-ooxml copied to clipboard
Improve classify_format (with a parser?)
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.
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.