public static TransitionTable FromEmbededResources() { const string resource = "CSharpCompiler.Lexica.vocabulary.bin"; var assembly = typeof(TransitionTable).GetTypeInfo().Assembly; using (var stream = assembly.GetManifestResourceStream(resource)) using (var reader = new TransitionTableBinaryReader(stream)) return(reader.Read()); }
public static TransitionTable FromFile(string path) { using (var stream = File.OpenRead(path)) using (var reader = new TransitionTableBinaryReader(stream)) return(reader.Read()); }