Search code examples
flex-lexer

Meaning of rule " <*> " in flex


I have seen this and im not sure of his meaning.

<*> -- Does it mean that it cover any state (Initial + all the ones declared with /x) ?


Solution

  • Yes, that's exactly what it means. See the start conditions section in the flex manual.

    Note that start conditions can be declared either with %x or %s. The difference is explained in the manual section linked above.