Search code examples
flex-lexerlexlexical

Are there any papers describe why flex is faster than lex?


flex is called the "fast" lexical analyzer, but I can not find any document that explains why it is faster than lex. flex has a manual, but it focus on its usage instead of its internals. Could any experts in this field give some help please? Either an explanation about flex's performance improvements or a link to it is welcome.


Solution

  • This answer is from Vern Paxson, and he allows it being shared here.

    Alas, this would take quite a bit of time to sketch in any sort of useful detail, as there are a number of techniques that contribute to its performance. I wrote a paper about it a loooong time ago (mid 80s!) but don't have a copy of it. Evidently you can buy it from:

        http://www.ntis.gov/search/product.aspx?ABBR=DE85000703
    

    Sorry not to be of more help ...