The Flex manual warns that an opening caret (^) disables implicit grouping. This is fine. The goal is to protect the opening caret. For example,
is implicitly rewritten as
but
is not rewritten. The problem is, Flex does not recognize that the definition below has an opening caret:
SIGNATURE {SIG_HEAD}{SIG_BODY}{SIG_FOOT}
and rewrites it as
SIGNATURE (^<< ... expansion of SIG_BODY and SIG_FOOT ... )
Then, because Flex has rewritten the expression so the caret is no longer an opening caret, it throws an error. It trips over its own feet, which is exactly the outcome that the exception is trying to prevent. Flex should recognize the opening caret in this case too, and disable implicit grouping.