Ejemplo n.º 1
0
        private ireg_name decode_ireg_name()
        {
            push("ireg-name");

            bool decoded = true;
            int s0 = index;
            var e0 = new List<Rule>();
            Rule rule;

            decoded = false;
            if (!decoded)
            {
                {
                    var e1 = new List<Rule>();
                    int s1 = index;
                    decoded = true;
                    if (decoded)
                    {
                        bool f1 = true;
                        int c1 = 0;
                        while (f1)
                        {
                            decoded = false;
                            if (!decoded)
                            {
                                {
                                    var e2 = new List<Rule>();
                                    int s2 = index;
                                    decoded = true;
                                    if (decoded)
                                    {
                                        bool f2 = true;
                                        int c2 = 0;
                                        for (int i2 = 0; i2 < 1 && f2; i2++)
                                        {
                                            rule = decode_iunreserved();
                                            if ((f2 = rule != null))
                                            {
                                                e2.Add(rule);
                                                c2++;
                                            }
                                        }
                                        decoded = c2 == 1;
                                    }
                                    if (decoded)
                                        e1.AddRange(e2);
                                    else
                                        index = s2;
                                }
                            }
                            if (!decoded)
                            {
                                {
                                    var e2 = new List<Rule>();
                                    int s2 = index;
                                    decoded = true;
                                    if (decoded)
                                    {
                                        bool f2 = true;
                                        int c2 = 0;
                                        for (int i2 = 0; i2 < 1 && f2; i2++)
                                        {
                                            rule = decode_pct_encoded();
                                            if ((f2 = rule != null))
                                            {
                                                e2.Add(rule);
                                                c2++;
                                            }
                                        }
                                        decoded = c2 == 1;
                                    }
                                    if (decoded)
                                        e1.AddRange(e2);
                                    else
                                        index = s2;
                                }
                            }
                            if (!decoded)
                            {
                                {
                                    var e2 = new List<Rule>();
                                    int s2 = index;
                                    decoded = true;
                                    if (decoded)
                                    {
                                        bool f2 = true;
                                        int c2 = 0;
                                        for (int i2 = 0; i2 < 1 && f2; i2++)
                                        {
                                            rule = decode_sub_delims();
                                            if ((f2 = rule != null))
                                            {
                                                e2.Add(rule);
                                                c2++;
                                            }
                                        }
                                        decoded = c2 == 1;
                                    }
                                    if (decoded)
                                        e1.AddRange(e2);
                                    else
                                        index = s2;
                                }
                            }
                            if (decoded)
                                c1++;
                            f1 = decoded;
                        }
                        decoded = true;
                    }
                    if (decoded)
                        e0.AddRange(e1);
                    else
                        index = s1;
                }
            }

            rule = null;
            if (decoded)
                rule = new ireg_name(text.Substring(s0, index - s0), e0);
            else
                index = s0;

            pop("ireg-name", decoded, index - s0);

            return (ireg_name)rule;
        }
Ejemplo n.º 2
0
 public ireg_name(ireg_name rule)
     : base(rule.spelling, rule.rules)
 {
 }