bool TransitionMatches(char c, StateTransition transition) { bool ret = false; if (current_state == transition.Previous) { ret = Regex.IsMatch(c.ToString(), transition.Pattern); } return(ret); }
int StateChange(StateTransition transition) { int ret = 0; if (transition.Next.Acceptance) { // send token to analizar sintáctico } ret = transition.Next.Return; current_state = transition.Next; return(ret); }
public void Add( State before, string pattern, State after, Action CustomAction = null ) { StateTransition transition = new StateTransition() { Previous = before, Pattern = pattern, Next = after, CustomWork = CustomAction }; Add(transition); }