コード例 #1
0
ファイル: Automata.Process.Thread.cs プロジェクト: Egaros/lib
 public Thread(Node node, InstructionStream instructionStream, AutomataContextState contextState) : this()
 {
     CurrentNode        = node;
     InstructionPointer = InstructionStream.InitializeInstructionPointer();
     InstructionStream  = instructionStream.AddReference();
     ContextState       = contextState;
 }
コード例 #2
0
                public ReaderProcess(TextSource textSource, Lexer <TGrammar, TToken> lexer, LexerContext <TToken> lexerContext) : base(textSource)
                {
                    _dfaInitialState    = lexer.Automata._dfaBuilder.InitialState;
                    _instructionStream  = new InstructionStream().AddReference().Mount(new TextInstructionReader(textSource.CreateReader()), lexer.Automata);
                    _instructionPointer = InstructionStream.InitializeInstructionPointer();

                    Context = new LexerAutomataContext();

                    Context.Mount(textSource, lexerContext);
                }