GetNonDeterministicAlts() protected method

protected GetNonDeterministicAlts ( ) : HashSet
return HashSet
Exemplo n.º 1
0
        // I N F O R M A T I O N  A B O U T  D E C I S I O N

        /** Return the sorted list of alts that conflict within a single state.
         *  Note that predicates may resolve the conflict.
         */
        public virtual IList <int> GetNonDeterministicAltsForState(DFAState targetState)
        {
            IEnumerable <int> nondetAlts = targetState.GetNonDeterministicAlts();

            if (nondetAlts == null)
            {
                return(null);
            }

            return(nondetAlts.OrderBy(i => i).ToList());

            //HashSet<int> nondetAlts = targetState.getNonDeterministicAlts();
            //if ( nondetAlts == null )
            //{
            //    return null;
            //}
            //List sorted = new LinkedList();
            //sorted.addAll( nondetAlts );
            //Collections.sort( sorted ); // make sure it's 1, 2, ...
            //return sorted;
        }
Exemplo n.º 2
0
        // I N F O R M A T I O N  A B O U T  D E C I S I O N
        /** Return the sorted list of alts that conflict within a single state.
         *  Note that predicates may resolve the conflict.
         */
        public virtual IList<int> GetNonDeterministicAltsForState( DFAState targetState )
        {
            IEnumerable<int> nondetAlts = targetState.GetNonDeterministicAlts();
            if ( nondetAlts == null )
                return null;

            return nondetAlts.OrderBy( i => i ).ToList();

            //HashSet<int> nondetAlts = targetState.getNonDeterministicAlts();
            //if ( nondetAlts == null )
            //{
            //    return null;
            //}
            //List sorted = new LinkedList();
            //sorted.addAll( nondetAlts );
            //Collections.sort( sorted ); // make sure it's 1, 2, ...
            //return sorted;
        }