Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. var choice = new Choice(
  2. new Character('c'),
  3. new Character('p'),
  4. new Character('r'),
  5. new Character('i'),
  6. new Character('a'),
  7. new Character('n'),
  8. new Character('u'),
  9. new Character('s'));
  10.  
  11. var whiteSpace = new Character(' ');
  12.  
  13. var firstName = new Choice(new Sequence(choice, choice, choice, choice, choice, choice, choice),
  14. new Sequence(choice, choice, choice, choice, choice));
  15.  
  16. var lastName = new Choice(new Sequence(choice, choice, choice, choice));
  17.  
  18. var fullName = new Sequence(firstName, whiteSpace, lastName);
  19.  
  20. Assert.Equal("", fullName.Match("cipri rusu").RemainingText());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement