Ejemplo n.º 1
0
 protected bool Equals(MatchTupleRule other)
 {
     return(ElementRules.SequenceEqual(other.ElementRules));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// rule_tuple                                  = "(" match_rule { ";" match_rule } ")"
        /// </summary>
        private MatchTupleRule parseRuleTuple()
        {
            if (!check(LexemType.ParenOpen))
                return null;

            var node = new MatchTupleRule();
            node.ElementRules.Add(ensure(parseMatchRule, ParserMessages.MatchRuleExpected));
            while(check(LexemType.Semicolon))
                node.ElementRules.Add(ensure(parseMatchRule, ParserMessages.MatchRuleExpected));

            ensure(LexemType.ParenClose, ParserMessages.SymbolExpected, ")");

            return node;
        }