Esempio n. 1
0
        public static TransitionTable FromDefaultVocabulary()
        {
            const string resource = "CSharpCompiler.Lexica.vocabulary.txt";
            var          assembly = typeof(TransitionTable).GetTypeInfo().Assembly;

            using (var stream = assembly.GetManifestResourceStream(resource))
                using (var reader = new VocabularyConverter(stream))
                    return(reader.Convert());
        }
Esempio n. 2
0
 public static TransitionTable FromVocabularyString(string content)
 {
     using (var reader = new VocabularyConverter(content))
         return(reader.Convert());
 }
Esempio n. 3
0
 public static TransitionTable FromVocabularyFile(string path)
 {
     using (var stream = File.OpenRead(path))
         using (var reader = new VocabularyConverter(stream))
             return(reader.Convert());
 }