Flex is a free implementation of lexx.
Flex is available for most of the UNIX-like platforms and as the flex package from the Cygwin setup.
If GNU flex isn't already installed or available as a package for your platform, you can get it at: http://www.gnu.org/software/flex/.
After correct installation, typing at the bash command line prompt:
$
flex --version
should result in something like:
flex version 2.5.4
However, the version string may vary.
A native Win32 lexx/flex package can be obtained from http://gnuwin32.sourceforge.net/. The installation should be straightforward.