public void InitTests() { fileName = Path.GetTempFileName(); File.WriteAllText(fileName, SOURCE); tokenizer = new RegExpTokenizer(); tokenizer.SetTransitionFunction(new TableDrivenTransitionFunction()); Array.ForEach(lexemes, (s) => tokenizer.UseTerminal(RegExp.Literal(s))); tokenizer.BuildTransitions(); lexer = new Lexer(tokenizer); fileStream = File.OpenRead(fileName); lexer.SetDataSource(fileStream); }
public void InitTests() { tokenizer = new RegExpTokenizer(); tokenizer.SetTransitionFunction(new TableDrivenTransitionFunction()); }