Tokenize a phase name into legs.

For example, PcS becomes 'P' + 'c' + 'S' while p^410P would become 'p' + '^410' + 'P'. Once a phase name has been broken into tokens, we can begin to construct the sequence of branches to which it corresponds. Only minor error checking is done at this point, for instance PIP generates an exception but ^410 doesn’t. It also appends "END" as the last leg.