def get_transformer() -> TransformationFunc: try: THREAD_LOCALS = access_thread_locals() transformer = THREAD_LOCALS.ArithmeticSimple_00000001_transformer_singleton except AttributeError: THREAD_LOCALS.ArithmeticSimple_00000001_transformer_singleton = ArithmeticSimpleTransform() transformer = THREAD_LOCALS.ArithmeticSimple_00000001_transformer_singleton return transformer
def get_compiler() -> ArithmeticRightRecursiveCompiler: THREAD_LOCALS = access_thread_locals() try: compiler = THREAD_LOCALS.ArithmeticRightRecursive_00000001_compiler_singleton except AttributeError: THREAD_LOCALS.ArithmeticRightRecursive_00000001_compiler_singleton = ArithmeticRightRecursiveCompiler() compiler = THREAD_LOCALS.ArithmeticRightRecursive_00000001_compiler_singleton return compiler
def get_compiler() -> atfCompiler: """Returns a thread/process-exclusive atfCompiler-singleton.""" THREAD_LOCALS = access_thread_locals() try: compiler = THREAD_LOCALS.atf_00000001_compiler_singleton except AttributeError: THREAD_LOCALS.atf_00000001_compiler_singleton = atfCompiler() compiler = THREAD_LOCALS.atf_00000001_compiler_singleton return compiler
def get_transformer() -> TransformationFunc: """Returns a thread/process-exclusive transformation function.""" THREAD_LOCALS = access_thread_locals() try: transformer = THREAD_LOCALS.FixedEBNF_00000001_transformer_singleton except AttributeError: THREAD_LOCALS.FixedEBNF_00000001_transformer_singleton = CreateFixedEBNFTransformer() transformer = THREAD_LOCALS.FixedEBNF_00000001_transformer_singleton return transformer
def get_compiler() -> LameArithmeticCompiler: """Returns a thread/process-exclusive LameArithmeticCompiler-singleton.""" THREAD_LOCALS = access_thread_locals() try: compiler = THREAD_LOCALS.LameArithmetic_00000001_compiler_singleton except AttributeError: THREAD_LOCALS.LameArithmetic_00000001_compiler_singleton = LameArithmeticCompiler( ) compiler = THREAD_LOCALS.LameArithmetic_00000001_compiler_singleton return compiler
def get_transformer() -> TransformationFunc: """Returns a thread/process-exclusive transformation function.""" try: THREAD_LOCALS = access_thread_locals() transformer = THREAD_LOCALS.ArithmeticRightRecursive_00000001_transformer_singleton except AttributeError: THREAD_LOCALS.ArithmeticRightRecursive_00000001_transformer_singleton = \ CreateArithmeticRightRecursiveTransformer() transformer = THREAD_LOCALS.ArithmeticRightRecursive_00000001_transformer_singleton return transformer
def get_compiler() -> json_fail_tolerantCompiler: """Returns a thread/process-exclusive json_fail_tolerantCompiler-singleton.""" THREAD_LOCALS = access_thread_locals() try: compiler = THREAD_LOCALS.json_fail_tolerant_00000001_compiler_singleton except AttributeError: THREAD_LOCALS.json_fail_tolerant_00000001_compiler_singleton = json_fail_tolerantCompiler( ) compiler = THREAD_LOCALS.json_fail_tolerant_00000001_compiler_singleton return compiler
def get_grammar() -> LyrikGrammar: """Returns a thread/process-exclusive LyrikGrammar-singleton.""" THREAD_LOCALS = access_thread_locals() try: grammar = THREAD_LOCALS.Lyrik_00000001_grammar_singleton except AttributeError: THREAD_LOCALS.Lyrik_00000001_grammar_singleton = LyrikGrammar() if hasattr(get_grammar, 'python_src__'): THREAD_LOCALS.Lyrik_00000001_grammar_singleton.python_src__ = get_grammar.python_src__ grammar = THREAD_LOCALS.Lyrik_00000001_grammar_singleton if get_config_value('resume_notices'): resume_notices_on(grammar) elif get_config_value('history_tracking'): set_tracer(grammar, trace_history) return grammar