public static int collectGroups(final List<Token> tokens, final int index, final List<Token> groups)
    {
        return collect(Signal.BEGIN_GROUP, tokens, index, groups);
    }
Collect the groups for a message.

@param tokens for the message.
@param index  index at which to begin.
@param groups to collect the group tokens into.
@return resulting index.
sbe-tool/src/main/java/uk/co/real_logic/sbe/ir/GenerationUtil.java