예제 #1
0
        public LRItemSet SelectByLookahead(Terminal lookahead)
        {
            var result = new LRItemSet();

            foreach (var item in this)
            {
                if (item.Lookaheads.Contains(lookahead))
                {
                    result.Add(item);
                }
            }

            return(result);
        }
예제 #2
0
        public LRItemSet SelectByCurrent(BnfTerm current)
        {
            var result = new LRItemSet();

            foreach (var item in this)
            {
                if (item.Core.Current == current)
                {
                    result.Add(item);
                }
            }

            return(result);
        }