3 ms·
So it be, I have also build a simplistic regex engine: - http://blog.marcinchwedczuk.pl/matching-regexes-using-backtracking http://blog.marcinchwedczuk.pl/matc
by 0xmarcin 5y ago
So it be, I have also build a simplistic regex engine:
- http://blog.marcinchwedczuk.pl/matching-regexes-using-backtracking http://blog.marcinchwedczuk.pl/matching-regexes-using-backtr...
- https://github.com/marcin-chwedczuk/reng/blob/master/src/pl/marcinchwedczuk/reng/BacktrackingMatcher.java https://github.com/marcin-chwedczuk/reng/blob/master/src/pl/...
I was learning about continuations in LISP and how you can use them to get rid of the call stack and implement pseudo-concurrency. After reading some articles I realised that the same approach can be used to implement a backtracking regex engine in just few lines of code.
I was reading about LISP, but the code is in Java. Don't judge me.