longest_match

Basic operator: it matches if one of its subrules (stored in the rules template parameter tuple) match the input. All subrules are tested and the one producing the longest match is taken.

The longest matching subrule's parse tree is stored as its only child and its matches field will contain all the subrule matches, in order.

template longest_match(rules...)
longest_match
if (
rules.length > 0
)

Meta