I believe there are tools that are significantly faster than flex. I
believe re2c generates code that is faster. But the key thing is to
test, probably, or perhaps ask around. I'm out of touch, but from
memory flex wasn't the be-all and end-all.
Lemon is definitely easy to maintain/port and the result is pretty nice,
too (I know Bison/Yacc wasn't the focus here).