isLastbool// If it is the last state (acept state)
output[]*State// The outputs of the current state ie. the 'outward arrows'. A union operator state will have more than one of these.
transitionsmap[int][]*State// Transitions to different states (maps a character (int representation) to a _list of states. This is useful if one character can lead multiple states eg. ab|aa)
iflen(state.transitions)==1&&state.isKleene{// A State representing a Kleene Star has a transition going out, which loops back to it. If that is the only transition (and it contains only one state), then it must be a last-state
for_,v:=rangestate.transitions{// Should only loop once