Ragel is a finite-state machine compiler and a parser generator targeting C, C++ and ASM. It can recognize byte sequences and execute code at arbitrary points in the process.
Cost / License
- Free
- Open Source
Platforms
- Windows

Apps similar to Flex include Ragel, which is free and open source. Other options are ANTLR, Owl parser generator and textX. In total there are four apps like Flex for Windows, Linux and Mac.
Ragel is a finite-state machine compiler and a parser generator targeting C, C++ and ASM. It can recognize byte sequences and execute code at arbitrary points in the process.

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
Owl is a parser generator which targets the class of visibly pushdown languages.
textX is a meta-language for building Domain-Specific Languages (DSLs) in Python. It is inspired by Xtext.
It will help you build your textual language easily. You can invent your own language or build a support for an existing textual language.