This reStructuredText validator is written in Perl and is powered by rst2html.py. You can download the program source for your own use.