예제 #1
0
        public static bool HasCompilationErros(BTSource[] texts, BTSource text)
        {
            bool     hasErrors = false;
            BTLCache btlCache  = Fetch(texts);

            for (int i = 0; i < texts.Length; i++)
            {
                if (texts[i] == text)
                {
                    hasErrors = btlCache.exceptions[i] != null;
                }
            }
            return(hasErrors);
        }
예제 #2
0
        public static BTLParser.Node[] GetBTLRoots(BTSource[] texts, BTSource text)
        {
            BTLParser.Node[] roots    = null;
            BTLCache         btlCache = Fetch(texts);

            for (int i = 0; i < texts.Length; i++)
            {
                if (texts[i] == text)
                {
                    roots = btlCache.rootSets[i];
                }
            }
            return(roots);
        }
예제 #3
0
        public static BTLTokenizer.Token[] GetBTLTokens(BTSource[] texts, BTSource text)
        {
            BTLTokenizer.Token[] tokens   = null;
            BTLCache             btlCache = Fetch(texts);

            for (int i = 0; i < texts.Length; i++)
            {
                if (texts[i] == text && i < btlCache.tokenSets.Length)
                {
                    tokens = btlCache.tokenSets[i];
                }
            }
            return(tokens);
        }
예제 #4
0
 public bool IsSame(BTSource a)
 {
     return(this.btSource == a);
 }
예제 #5
0
 public SourceInfo(BTSource a)
 {
     btSource = a;
 }