예제 #1
0
 def __init__(self):
     ModifiedPushdownAutomaton.__init__(
         self, FunctionNameState(), [AcceptState()], [
             FunctionNameStateDescription(),
             ArgumentStartStateDescription(),
             ArgumentStateDescription(),
             FreeArgumentStateDescription(),
             RequiredArgumentStateDescription(),
             AcceptStateDescription()
         ])
예제 #2
0
 def __init__(self):
     StateDescription.__init__(
         self, ArgumentStartState(), _ArgumentStartDefaultTransition(), [
             TransitionWithAction(Configuration(ArgumentStartState(), ')'),
                                  Configuration(AcceptState(), ''),
                                  AcceptState.add_function_to_stack),
             TransitionWithAction(Configuration(ArgumentStartState(), '*'),
                                  Configuration(FreeArgumentState(), ''),
                                  lambda stack: stack.add_level())
         ])
예제 #3
0
 def __init__(self):
     TransitionWithoutAction.__init__(
         self, Configuration(FreeArgumentState(), ')'),
         Configuration(AcceptState(), ''))
예제 #4
0
 def __init__(self):
     StateDescription.__init__(self, AcceptState(),
                               _InvalidAcceptTransition(), [])
예제 #5
0
 def __init__(self):
     DefaultTransition.__init__(self, AcceptState())