Esempio n. 1
0
 def __init__(self):
     StateDescription.__init__(
         self, PythonState(), SimpleForwardDefaultTransition(PythonState()),
         [
             TransitionWithoutAction(
                 Configuration(PythonState(), '"'),
                 Configuration(CodeStringState(PythonState()), '"')),
             TransitionWithoutAction(
                 Configuration(PythonState(), '}'),
                 Configuration(PythonClosingBraceState(), ''))
         ])
Esempio n. 2
0
 def __init__(self):
     StateDescription.__init__(
         self, OperatorState(), _OperatorDefaultTransition(), [
             TransitionWithoutAction(Configuration(OperatorState(), '"'),
                                     Configuration(ValueState(), '')),
             _OperatorWhitespaceTransition()
         ])
Esempio n. 3
0
 def __init__(self):
     StateDescription.__init__(
         self, ConstraintStartState(), _ConstraintDefaultTransition(), [
             TransitionWithoutAction(
                 Configuration(ConstraintStartState(), ' '),
                 Configuration(VariableState(), ''))
         ])
Esempio n. 4
0
 def __init__(self):
     StateDescription.__init__(
         self, ValueState(), SimpleForwardDefaultTransition(ValueState()), [
             TransitionWithoutAction(Configuration(ValueState(), '\\'),
                                     Configuration(ValueEscapeState(), '')),
             _StringEndTransition()
         ])
Esempio n. 5
0
 def __init__(self):
     StateDescription.__init__(
         self, MessageState(), SimpleForwardDefaultTransition(MessageState()), [
             TransitionWithoutAction(Configuration(MessageState(), '\\'),
                                     Configuration(EscapeState(MessageState()), '')),
             _TransitionFromMessageToCode(),
             _TransitionFromMessageToAccept()
         ])
Esempio n. 6
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)
         ])
Esempio n. 7
0
 def __init__(self):
     StateDescription.__init__(self, ConstraintEndState(), _InvalidConstraintTransition(), [
         TransitionWithAction(Configuration(ConstraintEndState(), '&'),
                              Configuration(ConstraintStartState(), ''),
                              lambda stack: stack.add_level()),
         TransitionWithoutAction(Configuration(ConstraintEndState(), ' '),
                                 Configuration(ConstraintEndState(), ''))
     ])
Esempio n. 8
0
 def __init__(self):
     StateDescription.__init__(
         self, ExpressionState(), _ExpressionDefaultTransition(), [
             TransitionWithoutAction(Configuration(ExpressionState(), ' '),
                                     Configuration(ExpressionState(), '')),
             TransitionWithAction(Configuration(ExpressionState(), '"'),
                                  Configuration(StringState(), ''),
                                  lambda stack: stack.add_level())
         ])
Esempio n. 9
0
 def __init__(self):
     StateDescription.__init__(self, CodeState(), _CodeDefaultTransition(), [
         TransitionWithoutAction(Configuration(CodeState(), '{'),
                                 Configuration(PythonState(), ''))
     ])