How to enable shortest match rule in flex (lexer)?

By default, flex uses the longest matching rule. Is there a way to override this behavior so that it matches the shortest sequence?

thanks

+6
source share
1 answer

This page in the Flex manual says that it does not have any inanimate operators, because it is more of a scanner than a parser, and suggests that regular expressions can be used to add missing functions.

0
source

Source: https://habr.com/ru/post/902789/


All Articles