More informative error message for unsolvable regexes
Removed tail recursion
Fixed var name typo.
--
Throwing exception from Xeger ctor is a somewhat controversial choice.
The original library seems to not do so, and we accept the other invalid constructions such as \w{7,1}.
At the same time, in the function MakeInterval there's already a precedent of throwing.
Alternatively, I thought of of adding examples of unsolvable regexes to the README, and in the error message link to this section of README. The only examples I can think of are [\w-.] and \w{7,1}.
--
Throwing exception from Xeger ctor is a somewhat controversial choice.
The original library seems to not do so, and we accept the other invalid constructions such as
\w{7,1}
. At the same time, in the functionMakeInterval
there's already a precedent of throwing.Alternatively, I thought of of adding examples of unsolvable regexes to the README, and in the error message link to this section of README. The only examples I can think of are
[\w-.]
and\w{7,1}
.--
Should solve https://github.com/moodmosaic/Fare/issues/44