Original REX paper by Robert D. Cameron:
http://www.cs.sfu.ca/~cameron/REX.html ftp://fas.sfu.ca/pub/cs/TR/1998/CMPT1998-17.html
This paper contains REX implementations in Perl, JavaScript, and LEX. The Perl implementation was used as the basis of XML parsing in xmlformat.pl and xmlformat.rb.
A Python implementation of REX:
http://mail.python.org/pipermail/xml-sig/1999-November/001628.html
A PHP implementation of REX:
http://traumwind.de/computer/php/REX/