Exemplo n.º 1
0
 public Thread(Node node, InstructionStream instructionStream, AutomataContextState contextState) : this()
 {
     CurrentNode        = node;
     InstructionPointer = InstructionStream.InitializeInstructionPointer();
     InstructionStream  = instructionStream.AddReference();
     ContextState       = contextState;
 }
Exemplo n.º 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);
                }