2 ms·
You bring up good points! I think the efficiency in real-world applications is still not as good as alternative solutions, but what I really like about PWD is t
by DonaldPShimoda 9y ago
You bring up good points! I think the efficiency in real-world applications is still not as good as alternative solutions, but what I really like about PWD is that it's a general parsing algorithm that's incredibly simple to understand (if you have a working knowledge of regular languages). The implementation can be a little more tricky (e.g. if you've never written a fix-point before[0]), but the actual concepts just seem so simple. PWD was actually one of the first parsing algorithms I learned about (odd, I know), and even without much prior knowledge of the field of parsing I was able to grasp the gist of it in a single sitting.
[0] You can also just skip over establishing a fix-point if you guarantee that your language is not left-recursive.