Resolve() public method

public Resolve ( ) : SymbolSet
return SymbolSet
Beispiel #1
0
        public static SymbolSet operator +(SymbolSet s, SymbolSet t)
        {
            SymbolSet symbolSet = new SymbolSet(s);

            symbolSet.Add(t);
            return(symbolSet.Resolve());
        }
Beispiel #2
0
		public static SymbolSet operator+ (SymbolSet s,SymbolSet t) 
		{
			SymbolSet r = new SymbolSet(s);
			r.Add(t);
			return r.Resolve();
		}
Beispiel #3
0
		public SymbolSet FirstOfRest(SymbolsGen syms) 
		{
			if (follow!=null)
				return follow;
			follow = new SymbolSet(syms); 
			bool broke=false;
			int n = m_prod.m_rhs.Count;
			for (int j=m_pos+1;j<n;j++) 
			{
				CSymbol s = (CSymbol)m_prod.m_rhs[j];
				foreach (CSymbol a in s.m_first.Keys)
						follow.CheckIn(a);
				if (!s.IsNullable()) 
				{
					broke = true;
					break;
				}
			}
			if (!broke) 
				follow.Add(m_prod.m_lhs.m_follow);
			follow = follow.Resolve();
			return follow;
		}