Regex equivalence command-line interface#1
Regex equivalence command-line interface#1JLimperg wants to merge 3 commits intopeterthiemann:masterfrom
Conversation
For now, the modules Examples Regexp2 Tests are not listed in the Cabal file at all, thus won't be built. It would be desirable to convert Tests into a proper test suite.
|
Using attoparsec seems like overkill to me. Simply using parsec would have done the job just fine, |
|
Certainly. I use Attoparsec over Parsec whenever I can (i.e. whenever I don't need good error messages) because the backtracking semantics are less annoying. But if you prefer Parsec (or the recent fork, Megaparsec), a rewrite should not take long. (Earley would be another interesting alternative, trading performance for implementation complexity.) |
|
The thing is that Attoparsec is tuned to run on space efficient text encodings, Earley is an algorithm to parse general CFG, which is not required in this generality. On Dec 23, 2015, at 7:06 PM, Jannis Limperg notifications@github.com wrote:
|
|
I'm not too concerned about efficiency issues because we won't be dealing with particularly big inputs. But as I said, if you like Parsec better, I'll port to Parsec. (I find Earley appealing because it is able to deal with left-recursive grammars, which would allow for a more natural specification of the grammar for infix operators. I might experiment a bit to see how bad the performance gets.) |
This PR contains code for the
regex-equivprogramme I sent earlier. The regex parser is insrc/Regexp/Parser.hs; the rest of this pull request consists mainly of build-related boilerplate because the parser requires some external packages.