Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Can match an expression such as r*ggg
- class RegularNode(object):
- def __init__(self, char, child=None, star=False):
- self.char = char
- self.star = star
- self.child = child
- def __call__(self, string):
- if self.char == '':
- return True
- else:
- if self.star:
- pass
- else:
- pass
Add Comment
Please, Sign In to add comment