Esempio n. 1
0
        /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/


        /*  given two actions, and an action type, return the
         * action of that action type.  give an error if they are of
         * the same action, because that should never have tried
         * to be fixed
         *
         */
        protected internal virtual parse_action insert_action(parse_action a1, parse_action a2, int act_type)
        {
            if ((a1.kind() == act_type) && (a2.kind() == act_type))
            {
                throw new internal_error("Conflict resolution of bogus actions");
            }
            else if (a1.kind() == act_type)
            {
                return(a1);
            }
            else if (a2.kind() == act_type)
            {
                return(a2);
            }
            else
            {
                throw new internal_error("Conflict resolution of bogus actions");
            }
        }
Esempio n. 2
0
        /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/

        /// <summary>Equality test.
        /// </summary>
        public virtual bool equals(parse_action other)
        {
            /* we match all error actions */
            return(other != null && other.kind() == ERROR);
        }
Esempio n. 3
0
        /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/

        /// <summary>Equality test.
        /// </summary>
        public override bool equals(parse_action other)
        {
            return(other != null && other.kind() == NONASSOC);
        }
Esempio n. 4
0
 /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 /// <summary>Equality test. 
 /// </summary>
 public override bool equals(parse_action other)
 {
     return other != null && other.kind() == NONASSOC;
 }
Esempio n. 5
0
        /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
        /*  given two actions, and an action type, return the
        action of that action type.  give an error if they are of
        the same action, because that should never have tried
        to be fixed

        */
        protected internal virtual parse_action insert_action(parse_action a1, parse_action a2, int act_type)
        {
            if ((a1.kind() == act_type) && (a2.kind() == act_type))
            {
                throw new internal_error("Conflict resolution of bogus actions");
            }
            else if (a1.kind() == act_type)
            {
                return a1;
            }
            else if (a2.kind() == act_type)
            {
                return a2;
            }
            else
            {
                throw new internal_error("Conflict resolution of bogus actions");
            }
        }
Esempio n. 6
0
 /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 /// <summary>Equality test. 
 /// </summary>
 public virtual bool equals(parse_action other)
 {
     /* we match all error actions */
     return other != null && other.kind() == ERROR;
 }