Guest User

Untitled

a guest
Feb 21st, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. # Can match an expression such as r*ggg
  2.  
  3. class RegularNode(object):
  4.  
  5. def __init__(self, char, child=None, star=False):
  6. self.char = char
  7. self.star = star
  8. self.child = child
  9.  
  10. def __call__(self, string):
  11. if self.char == '':
  12. return True
  13. else:
  14. if self.star:
  15. pass
  16. else:
  17. pass
Add Comment
Please, Sign In to add comment