176
|
1 using System;
|
|
2
|
|
3 namespace Implab.Formats {
|
|
4 public class ScannerContext<TTag> {
|
|
5 public int[,] Dfa { get; private set; }
|
|
6 public bool[] Final { get; private set; }
|
|
7 public TTag[][] Tags { get; private set; }
|
|
8 public int State { get; private set; }
|
|
9 public int[] Alphabet { get; private set; }
|
|
10
|
|
11 public ScannerContext(int[,] dfa, bool[] final, TTag[][] tags, int state, int[] alphabet) {
|
|
12 Dfa = dfa;
|
|
13 Final = final;
|
|
14 Tags = tags;
|
|
15 State = state;
|
|
16 Alphabet = alphabet;
|
|
17 }
|
|
18
|
|
19 public bool Execute(TextScanner scanner, out TTag[] tag) {
|
|
20 return scanner.ReadToken(Dfa, Final, Tags, State, Alphabet, out tag);
|
|
21 }
|
|
22 }
|
|
23 }
|
|
24
|