Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace IntegerScanner
  6. {
  7.     class Delimiter : State
  8.     {
  9.         private State s4, s6;
  10.         public void setTransitions(State s4, State s6)
  11.         {
  12.             this.s4 = s4;
  13.             this.s6 = s6;
  14.         }
  15.  
  16.         public override State Transition(char c)
  17.         {
  18.  
  19.             if ('0' <= c && c <= '9')
  20.                 return s6;
  21.             else
  22.                 return s4;
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement