Reentrancy īy default the scanner generated by Flex is not reentrant. The REJECT feature is not enabled by default, and because of its performance implications its use is discouraged in the Flex manual. This will cause the DFA to backtrack to find other accept states. In this case, the programmer has explicitly told Flex to "go back and try again" after it has already matched some input. However, using the REJECT macro in a scanner with the potential to match extremely long tokens can cause Flex to generate a scanner with non-linear performance. Note that the constant is independent of the length of the token, the length of the regular expression and the size of the DFA. This constant is quite low: GCC generates 12 instructions for the DFA match loop. That is, it performs a constant number of operations for each input symbol.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |