예제 #1
0
 def __init__(self):
     StateDescription.__init__(
         self, OperatorEndState(), _InvalidValueTransition(), [
             TransitionWithAction(Configuration(OperatorEndState(), '"'),
                                  Configuration(ValueState(), ''),
                                  lambda stack: stack.add_level())
         ])
예제 #2
0
 def __init__(self):
     StateDescription.__init__(
         self, ValueState(), SimpleForwardDefaultTransition(ValueState()), [
             TransitionWithoutAction(Configuration(ValueState(), '\\'),
                                     Configuration(ValueEscapeState(), '')),
             _StringEndTransition()
         ])
예제 #3
0
 def __init__(self):
     StateDescription.__init__(
         self, OperatorState(), _OperatorDefaultTransition(), [
             TransitionWithoutAction(Configuration(OperatorState(), '"'),
                                     Configuration(ValueState(), '')),
             _OperatorWhitespaceTransition()
         ])
예제 #4
0
 def __init__(self):
     StateDescription.__init__(
         self, StartState(), _InvalidStartTransition(), [
             TransitionWithAction(Configuration(StartState(), '"'),
                                  Configuration(MessageState(), ''),
                                  lambda stack: stack.add_level())
         ])
예제 #5
0
 def __init__(self):
     StateDescription.__init__(
         self, VariableEndState(), _InvalidOperatorTransition(), [
             TransitionWithAction(Configuration(VariableEndState(), '='),
                                  Configuration(OperatorState(), ''),
                                  lambda stack: stack.add_level())
         ])
예제 #6
0
 def __init__(self):
     StateDescription.__init__(
         self, ConstraintStartState(), _ConstraintDefaultTransition(), [
             TransitionWithoutAction(
                 Configuration(ConstraintStartState(), ' '),
                 Configuration(VariableState(), ''))
         ])
예제 #7
0
 def __init__(self):
     StateDescription.__init__(self, MemberState(),
                               _MemberDefaultTransition(), [
                                   _TransitionFromMemberToAccept(),
                                   _MemberCommaTransition(),
                                   _MemberWhitespaceTransition(),
                                   _TransitionFromMemberToCloseFunction()
                               ])
예제 #8
0
 def __init__(self):
     StateDescription.__init__(self, ConstraintEndState(), _InvalidConstraintTransition(), [
         TransitionWithAction(Configuration(ConstraintEndState(), '&'),
                              Configuration(ConstraintStartState(), ''),
                              lambda stack: stack.add_level()),
         TransitionWithoutAction(Configuration(ConstraintEndState(), ' '),
                                 Configuration(ConstraintEndState(), ''))
     ])
예제 #9
0
 def __init__(self):
     StateDescription.__init__(
         self, MessageState(), SimpleForwardDefaultTransition(MessageState()), [
             TransitionWithoutAction(Configuration(MessageState(), '\\'),
                                     Configuration(EscapeState(MessageState()), '')),
             _TransitionFromMessageToCode(),
             _TransitionFromMessageToAccept()
         ])
예제 #10
0
 def __init__(self):
     StateDescription.__init__(
         self, RequiredArgumentState(),
         _RequiredArgumentDefaultTransition(), [
             TransitionWithAction(
                 Configuration(RequiredArgumentState(), '*'),
                 Configuration(FreeArgumentState(), ''),
                 lambda stack: stack.add_level())
         ])
예제 #11
0
 def __init__(self):
     StateDescription.__init__(
         self, ExpressionState(), _ExpressionDefaultTransition(), [
             TransitionWithoutAction(Configuration(ExpressionState(), ' '),
                                     Configuration(ExpressionState(), '')),
             TransitionWithAction(Configuration(ExpressionState(), '"'),
                                  Configuration(StringState(), ''),
                                  lambda stack: stack.add_level())
         ])
예제 #12
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())
         ])
예제 #13
0
 def __init__(self):
     StateDescription.__init__(self, VariableState(),
                               _VariableDefaultTransition(), [
                                   _TransitionFromVariableToAccept(),
                                   _VariableCommaTransition(),
                                   _TransitionFromVariableToMember(),
                                   _TransitionFromVariableToOpenFunction(),
                                   _VariableWhitespaceTransition(),
                                   _TransitionFromVariableToCloseFunction()
                               ])
예제 #14
0
 def __init__(self):
     StateDescription.__init__(
         self, PythonState(), SimpleForwardDefaultTransition(PythonState()),
         [
             TransitionWithoutAction(
                 Configuration(PythonState(), '"'),
                 Configuration(CodeStringState(PythonState()), '"')),
             TransitionWithoutAction(
                 Configuration(PythonState(), '}'),
                 Configuration(PythonClosingBraceState(), ''))
         ])
예제 #15
0
 def __init__(self):
     StateDescription.__init__(
         self, ExpressionEndState(), _ExpressionEndDefaultTransition(), [
             TransitionWithoutAction(
                 Configuration(ExpressionEndState(), ' '),
                 Configuration(ExpressionEndState(), '')),
             TransitionWithAction(Configuration(ExpressionEndState(), '$'),
                                  Configuration(AcceptState(), ''),
                                  AcceptState.check_stack),
             TransitionWithoutAction(
                 Configuration(ExpressionEndState(), ','),
                 Configuration(ExpressionState(), '')),
             _ConversionFromVariableToFunctionName(),
             TransitionWithAction(Configuration(ExpressionEndState(), ')'),
                                  Configuration(ExpressionEndState(), ''),
                                  ExpressionEndState.add_function_to_stack)
         ])
예제 #16
0
 def __init__(self):
     StateDescription.__init__(self, StringEscapeState(),
                               _EscapeDefaultTransition(), [])
예제 #17
0
 def __init__(self):
     StateDescription.__init__(self, FunctionNameState(),
                               _FunctionNameDefaultTransition(),
                               [_TransitionFromFunctionToArgument()])
예제 #18
0
 def __init__(self):
     StateDescription.__init__(self, VariableState(), _VariableDefaultTransition(), [
         _TransitionFromArgumentToOperator(),
         _VariableWhitespaceTransition()
     ])
예제 #19
0
 def __init__(self):
     StateDescription.__init__(self, FreeArgumentState(),
                               _ArgumentDefaultTransition(),
                               [_TransitionFromArgumentToAccept()])
예제 #20
0
 def __init__(self):
     StateDescription.__init__(self, CodeState(), _CodeDefaultTransition(), [
         TransitionWithoutAction(Configuration(CodeState(), '{'),
                                 Configuration(PythonState(), ''))
     ])
예제 #21
0
 def __init__(self):
     StateDescription.__init__(self, PythonClosingBraceState(),
                               _InvalidSingleClosingBraceTransition(),
                               [PythonEndTransition()])
예제 #22
0
 def __init__(self):
     StateDescription.__init__(self, EscapeState(None),
                               _EscapeDefaultTransition(), [])
예제 #23
0
 def __init__(self):
     StateDescription.__init__(self, AcceptState(),
                               _InvalidAcceptTransition(), [])
예제 #24
0
 def __init__(self):
     StateDescription.__init__(
         self, CodeStringState(None),
         SimpleForwardDefaultTransition(CodeStringState(None)),
         [TransitionFromCodeStringToEscape(),
          CodeStringEndTransition()])