public static int findSignal(final List<Token> tokens, final Signal signal)
    {
        for (int i = 0, endIndex = tokens.size() - 1; i < endIndex; i++)
        {
            if (signal == tokens.get(i).signal())
            {
                return i;
            }
        }

        return -1;
    }
Find the first instance of a given signal.

@param tokens to search.
@param signal to search for.
@return index the signal was found at or -1 if not found.
sbe-tool/src/main/java/uk/co/real_logic/sbe/ir/GenerationUtil.java