Esempio n. 1
0
        protected override bool FindFirstChar()
        {
            int    num     = this.runtextpos;
            string runtext = this.runtext;
            int    num2    = this.runtextend - num;

            if (num2 > 0)
            {
                do
                {
                    num2--;
                    if (RegexRunner.CharInClass(char.ToLower(runtext[num++]), "\0\u0003\u0001\0\n\v\t"))
                    {
                        goto IL_63;
                    }
                }while (num2 > 0);
                bool arg_74_0 = false;
                goto IL_6C;
IL_63:
                num--;
                arg_74_0 = true;
IL_6C:
                this.runtextpos = num;
                return(arg_74_0);
            }
            return(false);
        }
Esempio n. 2
0
        protected override bool FindFirstChar()
        {
            int    num     = base.runtextpos;
            string runtext = base.runtext;
            int    num2    = base.runtextend - num;

            if (num2 > 0)
            {
                int result;
                while (true)
                {
                    num2--;
                    if (!RegexRunner.CharInClass(runtext[num++], "\0\u0006\n-.:;_`d\0\u0002\u0004\u0005\u0003\u0001\t\u0013\0"))
                    {
                        if (num2 > 0)
                        {
                            continue;
                        }
                        result = 0;
                    }
                    else
                    {
                        num--;
                        result = 1;
                    }
                    break;
                }
                base.runtextpos = num;
                return((byte)result != 0);
            }
            return(false);
        }
Esempio n. 3
0
        public override void Go()
        {
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_00D8;
            }
            runtextpos++;
            if (!RegexRunner.CharInClass(runtext[runtextpos], "\x0001\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
            {
                goto Label_00D8;
            }
            int start = runstack[runstackpos++];

            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 2;
Label_00CF:
            base.runtextpos = runtextpos;
            return;

Label_00D8:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_00D8;

            case 2:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_00D8;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_00CF;
        }
Esempio n. 4
0
        /*
         * Internal worker called by all the public APIs
         */
        internal Match Run(bool quick, int prevlen, char[] input, int beginning, int length, int startat)
        {
            Match       match;
            RegexRunner runner = null;

            if (startat < 0 || startat > input.Length)
            {
                throw new ArgumentOutOfRangeException("start", SR.GetString(SR.BeginIndexNotNegative));
            }

            if (length < 0 || length > input.Length)
            {
                throw new ArgumentOutOfRangeException("length", SR.GetString(SR.LengthNotNegative));
            }

            // There may be a cached runner; grab ownership of it if we can.

            runner = (RegexRunner)runnerref.Get();

            // Create a RegexRunner instance if we need to

            if (runner == null)
            {
                // Use the compiled RegexRunner factory if the code was compiled to MSIL

                if (factory != null)
                {
                    runner = factory.CreateInstance();
                }
                else
                {
                    runner = new RegexInterpreter(code, UseOptionInvariant() ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture);
                }
            }

            try {
                // Do the scan starting at the requested position
                match = runner.Scan(this, input, beginning, beginning + length, startat, prevlen, quick, internalMatchTimeout);
            } finally {
                // Release or fill the cache slot
                runnerref.Release(runner);
            }

#if DBG
            if (Debug && match != null)
            {
                match.Dump();
            }
#endif
            return(match);
        }
        public override bool FindFirstChar()
        {
            int    runtextpos = base.runtextpos;
            string runtext    = base.runtext;
            int    num3       = base.runtextend - runtextpos;

            if (num3 <= 0)
            {
                return(false);
            }
            num3--;
            runtextpos++;
            if (!RegexRunner.CharInClass(char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture), "\0\x0002\x0001bcd"))
            {
            }
            runtextpos--;
            base.runtextpos = runtextpos;
            return(num3 > 0);
        }
Esempio n. 6
0
        public override bool FindFirstChar()
        {
            int    runtextpos = base.runtextpos;
            string runtext    = base.runtext;
            int    num3       = base.runtextend - runtextpos;

            if (num3 <= 0)
            {
                return(false);
            }
            num3--;
            runtextpos++;
            if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\x0004\x0001\"#'(d"))
            {
            }
            runtextpos--;
            base.runtextpos = runtextpos;
            return(num3 > 0);
        }
Esempio n. 7
0
        public async Task EnginesThrowNotImplementedForGoAndFFC(RegexEngine engine)
        {
            Regex re = await RegexHelpers.GetRegexAsync(engine, @"abc");

            // Use reflection to ensure the runner is created so it can be fetched.
            MethodInfo  createRunnerMethod = typeof(Regex).GetMethod("CreateRunner", BindingFlags.Instance | BindingFlags.NonPublic);
            RegexRunner runner             = createRunnerMethod.Invoke(re, new object[] { }) as RegexRunner;

            // Use reflection to call Go and FFC and ensure it throws NotImplementedException
            MethodInfo goMethod  = typeof(RegexRunner).GetMethod("Go", BindingFlags.Instance | BindingFlags.NonPublic);
            MethodInfo ffcMethod = typeof(RegexRunner).GetMethod("FindFirstChar", BindingFlags.Instance | BindingFlags.NonPublic);

            // FindFirstChar and Go methods should not be implemented since built-in engines should be overriding and using Scan instead.
            TargetInvocationException goInvocationException = Assert.Throws <TargetInvocationException>(() => goMethod.Invoke(runner, new object[] { }));

            Assert.Equal(typeof(NotImplementedException), goInvocationException.InnerException.GetType());
            TargetInvocationException ffcInvocationException = Assert.Throws <TargetInvocationException>(() => ffcMethod.Invoke(runner, new object[] { }));

            Assert.Equal(typeof(NotImplementedException), ffcInvocationException.InnerException.GetType());
        }
Esempio n. 8
0
        /*
         * Release an object back to the cache
         *
         * If the object is the one that's under lock, the lock
         * is released.
         *
         * If there is no cached object, then the lock is obtained
         * and the object is placed in the cache.
         *
         */
        internal void Release(Object obj)
        {
            if (obj == null)
            {
                throw new ArgumentNullException("obj");
            }

            // if this reference owns the lock, release it

            if (_obj == obj)
            {
                _obj    = null;
                _locked = 0;
                return;
            }

            // if no reference owns the lock, try to cache this reference

            if (_obj == null)
            {
                // try to obtain the lock

                if (0 == Interlocked.Exchange(ref _locked, 1))
                {
                    // if there's really no reference, cache this reference

                    if (_ref == null)
                    {
                        _ref = (RegexRunner)obj;
                    }

                    // release the lock

                    _locked = 0;
                    return;
                }
            }
        }
Esempio n. 9
0
        public async Task EnsureRunmatchValueIsNulledAfterIsMatch(RegexEngine engine)
        {
            Regex re = await RegexHelpers.GetRegexAsync(engine, @"abc");

            // First call IsMatch which should initialize runmatch on the runner.
            Assert.True(re.IsMatch("abcabcabc"));

            // Ensure runmatch wasn't nulled out, since after calling IsMatch it should be reused.
            FieldInfo   runnerField   = typeof(Regex).GetField("_runner", BindingFlags.Instance | BindingFlags.NonPublic);
            RegexRunner runner        = runnerField.GetValue(re) as RegexRunner;
            FieldInfo   runmatchField = typeof(RegexRunner).GetField("runmatch", BindingFlags.Instance | BindingFlags.NonPublic);
            Match       runmatch      = runmatchField.GetValue(runner) as Match;

            Assert.NotNull(runmatch);

            // Ensure that the Value of runmatch was nulled out, so as to not keep a reference to it in a cache.
            MethodInfo getTextMethod = typeof(Match).GetMethod("get_Text", BindingFlags.Instance | BindingFlags.NonPublic);

            Assert.Null(getTextMethod.Invoke(runmatch, new object[] { }));
            Assert.Equal(string.Empty, runmatch.Value);
#if NET7_0_OR_GREATER
            Assert.True(runmatch.ValueSpan == ReadOnlySpan <char> .Empty);
#endif
        }
Esempio n. 10
0
        internal void RegexRunnerFinished(RegexRunner sender)
        {
            Busy = false;
            Runner = null;

            if (sender.Error != null)
            {
                Status.Text = "Error encountered during processing";
                MessageBox.Show(this, sender.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (string.IsNullOrEmpty(sender.Replace)) // find
            {
                Captures.BeginUpdate();
                foreach (Match m in sender.Matches)
                {
                    TreeNode n = Captures.Nodes.Add("{" + ReplaceNewLines(m.Value) + "}");
                    foreach (Group g in m.Groups)
                    {
                        if (g.Captures.Count > 1)
                        {
                            TreeNode nn = n.Nodes.Add("...");
                            foreach (Capture c in g.Captures)
                                nn.Nodes.Add("{" + ReplaceNewLines(c.Value) + "}");
                        }
                        else if (g.Captures.Count == 1)
                            n.Nodes.Add(ReplaceNewLines("{" + g.Captures[0].Value) + "}");
                    }
                }
                switch (sender.Matches.Count)
                {
                    case 0:
                        Status.Text = "No matches";
                        break;
                    case 1:
                        Status.Text = "1 match found";
                        break;
                    default:
                        Status.Text = sender.Matches.Count + " matches found";
                        break;
                }

                Status.Text += " in " + sender.GetExecutionTime() + " ms";

                Captures.ExpandAll();
                Captures.EndUpdate();
            }
            else // replace
            {
                ResultText.Text = sender.Result;
                if (sender.Matches.Count != 1)
                    Status.Text = sender.Matches.Count + " replacements performed";
                else
                    Status.Text = "1 replacement performed";

                Status.Text += " in " + sender.GetExecutionTime() + " ms";
                
                Captures.Visible = false;
                ResultText.Visible = true;

                txtInput.Text = NewLineRegex.Replace(txtInput.Text, "\r\n");
                ResultText.Text = ResultText.Text.Replace("\r\n", "\n");
                ResultText.Text = NewLineRegex.Replace(ResultText.Text, "\r\n");
            }
        }
        public override void Go()
        {
            int    num1;
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if ((((runtextpos != base.runtextstart) || (4 > (runtextend - runtextpos))) || ((runtext[runtextpos] != '<') || (runtext[runtextpos + 1] != '!'))) || ((runtext[runtextpos + 2] != '-') || (runtext[runtextpos + 3] != '-')))
            {
                goto Label_0730;
            }
            runtextpos += 4;
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_0122;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0122:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_0155:
            if (runtextpos >= runtextend)
            {
                goto Label_0730;
            }
            runtextpos++;
            if (((((runtext[runtextpos] != '#') || (7 > (runtextend - runtextpos))) || ((char.ToLower(runtext[runtextpos], CultureInfo.CurrentCulture) != 'i') || (char.ToLower(runtext[runtextpos + 1], CultureInfo.CurrentCulture) != 'n'))) || (((char.ToLower(runtext[runtextpos + 2], CultureInfo.CurrentCulture) != 'c') || (char.ToLower(runtext[runtextpos + 3], CultureInfo.CurrentCulture) != 'l')) || ((char.ToLower(runtext[runtextpos + 4], CultureInfo.CurrentCulture) != 'u') || (char.ToLower(runtext[runtextpos + 5], CultureInfo.CurrentCulture) != 'd')))) || (char.ToLower(runtext[runtextpos + 6], CultureInfo.CurrentCulture) != 'e'))
            {
                goto Label_0730;
            }
            runtextpos += 7;
            start       = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0290;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0290:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 3;
            }
Label_02C3:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (1 > (runtextend - runtextpos))
            {
                goto Label_0730;
            }
            runtextpos++;
            start = 1;
            do
            {
                start--;
                if (!RegexRunner.CharInClass(runtext[runtextpos - start], "\0\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
                {
                    goto Label_0730;
                }
            }while (start > 0);
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_035D;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
            runtextpos--;
Label_035D:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 4;
            }
Label_0390:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0401;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0401:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 6;
            }
Label_0434:
            if (runtextpos >= runtextend)
            {
                goto Label_0730;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0730;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0494;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0494:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 7;
            }
Label_04C7:
            num1 = runtextend - runtextpos;
            if (num1 >= 1)
            {
            }
            start = (num5 = 1) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0510;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0004\0\"#'("));
            runtextpos--;
Label_0510:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 8;
            }
Label_0543:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = runtextend - runtextpos;
            if (start > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 9;
            }
Label_058E:
            start = runstack[runstackpos++];
            this.Capture(2, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
            int num10 = runtextend - runtextpos;

            if (num10 >= 1)
            {
            }
            start = (num5 = 1) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0607;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0004\0\"#'("));
            runtextpos--;
Label_0607:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 10;
            }
Label_063A:
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_067B;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_067B:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 11;
            }
Label_06AE:
            if (((3 > (runtextend - runtextpos)) || (runtext[runtextpos] != '-')) || ((runtext[runtextpos + 1] != '-') || (runtext[runtextpos + 2] != '>')))
            {
                goto Label_0730;
            }
            runtextpos += 3;
            start       = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
Label_0727:
            base.runtextpos = runtextpos;
            return;

Label_0730:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_0730;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_0155;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 3;
                }
                goto Label_02C3;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 4;
                }
                goto Label_0390;

            case 5:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_0730;

            case 6:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 6;
                }
                goto Label_0434;

            case 7:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 7;
                }
                goto Label_04C7;

            case 8:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 8;
                }
                goto Label_0543;

            case 9:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\x0001\x0004\0\"#'("))
                {
                    goto Label_0730;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 9;
                }
                goto Label_058E;

            case 10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 10;
                }
                goto Label_063A;

            case 11:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 11;
                }
                goto Label_06AE;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_0727;
        }
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos != base.runtextstart)
            {
                goto Label_03A5;
            }
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_00C6;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_00C6:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_00F9:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '<')) || (runtext[runtextpos + 1] != '%'))
            {
                goto Label_03A5;
            }
            runtextpos += 2;
            start       = runtextend - runtextpos;
            if (start > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 3;
            }
Label_0162:
            if (runtextpos >= runtextend)
            {
                goto Label_03A5;
            }
            runtextpos++;
            if (runtext[runtextpos] != '#')
            {
                goto Label_03A5;
            }
            runstack[--runstackpos] = -1;
            runstack[--runstackpos] = 0;
            runtrack[--runtrackpos] = 4;
            goto Label_0225;
Label_01AA:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = runtextend - runtextpos;
            if (start > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 5;
            }
Label_01F5:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
Label_0225:
            start = runstack[runstackpos++];
            runtrack[--runtrackpos] = num5;
            if ((((num5 = runstack[runstackpos++]) != runtextpos) || (start < 0)) && (start < 1))
            {
                runstack[--runstackpos] = runtextpos;
                runstack[--runstackpos] = start + 1;
                runtrack[--runtrackpos] = 7;
                if ((runtrackpos > 0x30) && (runstackpos > 0x24))
                {
                    goto Label_01AA;
                }
                runtrack[--runtrackpos] = 8;
                goto Label_03A5;
            }
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 9;
Label_02B9:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '%')) || (runtext[runtextpos + 1] != '>'))
            {
                goto Label_03A5;
            }
            runtextpos += 2;
            start       = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0330;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0330:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 10;
            }
Label_0363:
            if (runtextpos < runtextend)
            {
                goto Label_03A5;
            }
            start = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
Label_039C:
            base.runtextpos = runtextpos;
            return;

Label_03A5:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_03A5;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_00F9;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"))
                {
                    goto Label_03A5;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 3;
                }
                goto Label_0162;

            case 4:
                runstackpos += 2;
                goto Label_03A5;

            case 5:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"))
                {
                    goto Label_03A5;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 5;
                }
                goto Label_01F5;

            case 6:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_03A5;

            case 7:
                start = runstack[runstackpos++] - 1;
                if (start < 0)
                {
                    runstack[runstackpos]   = runtrack[runtrackpos++];
                    runstack[--runstackpos] = start;
                    goto Label_03A5;
                }
                runtextpos = runstack[runstackpos++];
                runtrack[--runtrackpos] = start;
                runtrack[--runtrackpos] = 9;
                goto Label_02B9;

            case 8:
                goto Label_01AA;

            case 9:
                start = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtrack[runtrackpos++];
                runstack[--runstackpos] = start;
                goto Label_03A5;

            case 10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 10;
                }
                goto Label_0363;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_039C;
        }
Esempio n. 13
0
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_00B9;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_00B9:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_00EC:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 3;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0E4C;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 4;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (1 > (runtextend - runtextpos))
            {
                goto Label_0E4C;
            }
            runtextpos++;
            start = 1;
            do
            {
                start--;
                if (!RegexRunner.CharInClass(runtext[runtextpos - start], "\0\x0002\t./\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
                {
                    goto Label_0E4C;
                }
            }while (start > 0);
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0235;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0002\t./\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
            runtextpos--;
Label_0235:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 5;
            }
Label_0268:
            start = runstack[runstackpos++];
            this.Capture(4, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            goto Label_03D8;
Label_0356:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 7;
            }
Label_0389:
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != ']')
            {
                goto Label_0E4C;
            }
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
Label_03D8:
            start = runstack[runstackpos++];
            this.Capture(3, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            start = runstack[runstackpos++];
            this.Capture(14, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0E4C;
            }
            start = runstack[runstackpos++];
            this.Capture(2, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            goto Label_07F7;
Label_05A5:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 9;
            }
Label_05D8:
            start = runstack[runstackpos++];
            this.Capture(8, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            goto Label_0748;
Label_06C6:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 10;
            }
Label_06F9:
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != ']')
            {
                goto Label_0E4C;
            }
            start = runstack[runstackpos++];
            this.Capture(9, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
Label_0748:
            start = runstack[runstackpos++];
            this.Capture(7, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            start = runstack[runstackpos++];
            this.Capture(14, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != '\'')
            {
                goto Label_0E4C;
            }
            start = runstack[runstackpos++];
            this.Capture(6, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
Label_07F7:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0868;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0868:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 11;
            }
Label_089B:
            runstack[--runstackpos] = -1;
            runstack[--runstackpos] = 0;
            runtrack[--runtrackpos] = 12;
            goto Label_0CFC;
Label_08C4:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != ',')
            {
                goto Label_0E4C;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_093C;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_093C:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 13;
            }
Label_096F:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 14;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0E4C;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0A2F;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"));
            runtextpos--;
Label_0A2F:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 15;
            }
Label_0A62:
            start = runstack[runstackpos++];
            this.Capture(15, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0E4C;
            }
            start = runstack[runstackpos++];
            this.Capture(12, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            goto Label_0C28;
Label_0B76:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x10;
            }
Label_0BA9:
            start = runstack[runstackpos++];
            this.Capture(15, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            if (runtextpos >= runtextend)
            {
                goto Label_0E4C;
            }
            runtextpos++;
            if (runtext[runtextpos] != '\'')
            {
                goto Label_0E4C;
            }
            start = runstack[runstackpos++];
            this.Capture(13, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
Label_0C28:
            start = runstack[runstackpos++];
            this.Capture(11, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0C99;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0C99:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x11;
            }
Label_0CCC:
            start = runstack[runstackpos++];
            this.Capture(10, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
Label_0CFC:
            start = runstack[runstackpos++];
            runtrack[--runtrackpos] = num5;
            if ((((num5 = runstack[runstackpos++]) != runtextpos) || (start < 0)) && (start < 1))
            {
                runstack[--runstackpos] = runtextpos;
                runstack[--runstackpos] = start + 1;
                runtrack[--runtrackpos] = 0x12;
                if ((runtrackpos > 0xec) && (runstackpos > 0xb1))
                {
                    goto Label_08C4;
                }
                runtrack[--runtrackpos] = 0x13;
                goto Label_0E4C;
            }
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 20;
Label_0D96:
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0DD7;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0DD7:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x15;
            }
Label_0E0A:
            if (runtextpos < runtextend)
            {
                goto Label_0E4C;
            }
            start = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 6;
Label_0E43:
            base.runtextpos = runtextpos;
            return;

Label_0E4C:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_0E4C;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_00EC;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                if (runtextpos >= runtextend)
                {
                    goto Label_0E4C;
                }
                runtextpos++;
                if (runtext[runtextpos] != '\'')
                {
                    goto Label_0E4C;
                }
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 8;
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                if (1 > (runtextend - runtextpos))
                {
                    goto Label_0E4C;
                }
                runtextpos++;
                start = 1;
                do
                {
                    start--;
                    if (!RegexRunner.CharInClass(runtext[runtextpos - start], "\0\x0002\t./\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
                    {
                        goto Label_0E4C;
                    }
                }while (start > 0);
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_05A5;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0002\t./\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
                runtextpos--;
                goto Label_05A5;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                if (runtextpos >= runtextend)
                {
                    goto Label_0E4C;
                }
                runtextpos++;
                if ((runtext[runtextpos] != '[') || (1 > (runtextend - runtextpos)))
                {
                    goto Label_0E4C;
                }
                runtextpos++;
                start = 1;
                do
                {
                    start--;
                    if (!RegexRunner.CharInClass(runtext[runtextpos - start], "\0\x0001\0\0"))
                    {
                        goto Label_0E4C;
                    }
                }while (start > 0);
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_0356;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"));
                runtextpos--;
                goto Label_0356;

            case 5:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 5;
                }
                goto Label_0268;

            case 6:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_0E4C;

            case 7:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 7;
                }
                goto Label_0389;

            case 8:
                runtextpos = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                if (runtextpos >= runtextend)
                {
                    goto Label_0E4C;
                }
                runtextpos++;
                if ((runtext[runtextpos] != '[') || (1 > (runtextend - runtextpos)))
                {
                    goto Label_0E4C;
                }
                runtextpos++;
                start = 1;
                do
                {
                    start--;
                    if (!RegexRunner.CharInClass(runtext[runtextpos - start], "\0\x0001\0\0"))
                    {
                        goto Label_0E4C;
                    }
                }while (start > 0);
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_06C6;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"));
                runtextpos--;
                goto Label_06C6;

            case 9:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 9;
                }
                goto Label_05D8;

            case 10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 10;
                }
                goto Label_06F9;

            case 11:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 11;
                }
                goto Label_089B;

            case 12:
                runstackpos += 2;
                goto Label_0E4C;

            case 13:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 13;
                }
                goto Label_096F;

            case 14:
                runtextpos = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                if (runtextpos >= runtextend)
                {
                    goto Label_0E4C;
                }
                runtextpos++;
                if (runtext[runtextpos] != '\'')
                {
                    goto Label_0E4C;
                }
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_0B76;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"));
                runtextpos--;
                goto Label_0B76;

            case 15:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 15;
                }
                goto Label_0A62;

            case 0x10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x10;
                }
                goto Label_0BA9;

            case 0x11:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x11;
                }
                goto Label_0CCC;

            case 0x12:
                start = runstack[runstackpos++] - 1;
                if (start < 0)
                {
                    runstack[runstackpos]   = runtrack[runtrackpos++];
                    runstack[--runstackpos] = start;
                    goto Label_0E4C;
                }
                runtextpos = runstack[runstackpos++];
                runtrack[--runtrackpos] = start;
                runtrack[--runtrackpos] = 20;
                goto Label_0D96;

            case 0x13:
                goto Label_08C4;

            case 20:
                start = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtrack[runtrackpos++];
                runstack[--runstackpos] = start;
                goto Label_0E4C;

            case 0x15:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x15;
                }
                goto Label_0E0A;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_0E43;
        }
Esempio n. 14
0
        internal void RegexRunnerFinished(RegexRunner sender)
        {
            Busy = false;
            Runner = null;

            if (sender.Error != null)
            {
                Status.Text = "Error encountered during processing";
                MessageBox.Show(this, sender.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (string.IsNullOrEmpty(sender.Replace)) // find
            {
                foreach (Match m in sender.Matches)
                {
                    TreeNode n = Captures.Nodes.Add("{" + ReplaceNewLines(m.Value) + "}");
                    foreach (Group g in m.Groups)
                    { // TODO: Is there any way to get the name of the group when explicit capture is on?
                        if (g.Captures.Count > 1)
                        {
                            TreeNode nn = n.Nodes.Add("...");
                            foreach (Capture c in g.Captures)
                                nn.Nodes.Add("{" + ReplaceNewLines(c.Value) + "}");
                        }
                        else if (g.Captures.Count == 1)
                            n.Nodes.Add(ReplaceNewLines("{" + g.Captures[0].Value) + "}");
                    }
                }
                if (sender.Matches.Count == 0)
                    Status.Text = "No matches";
                else if (sender.Matches.Count == 1)
                    Status.Text = "1 match found";
                else
                    Status.Text = sender.Matches.Count + " matches found";

                Status.Text += " in " + sender.GetExecutionTime() + " ms";

                Captures.ExpandAll();
            }
            else // replace
            {
                ResultText.Text = sender.Result;
                if (sender.Matches.Count != 1)
                    Status.Text = sender.Matches.Count + " replacements performed";
                else
                    Status.Text = "1 replacement performed";

                Status.Text += " in " + sender.GetExecutionTime() + " ms";
                
                Captures.Visible = false;
                ResultText.Visible = true;

                txtInput.Text = txtInput.Text.Replace("\n", "\r\n");
                ResultText.Text = ResultText.Text.Replace("\r\n", "\n");
                ResultText.Text = ResultText.Text.Replace("\n", "\r\n");
            }
        }
Esempio n. 15
0
        private void Replace_Click(object sender, EventArgs e)
        {
            try
            {
                Captures.Nodes.Clear();
                ResultText.Text = "";
                Status.Text = "";
                txtInput.Text = txtInput.Text.Replace("\r\n", "\n");
                Busy = true;

                Regex r = new Regex(txtFind.Text, Options);

                Runner = new RegexRunner(this, txtInput.Text, txtReplace.Text.Replace("\\n", "\r\n"), r);
            }
            catch (Exception ex)
            {
                ErrorHandler(ex);
                Busy = false;
            }
        }
Esempio n. 16
0
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '$')) || (runtext[runtextpos + 1] != '{'))
            {
                goto Label_0203;
            }
            runtextpos += 2;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (1 > (runtextend - runtextpos))
            {
                goto Label_0203;
            }
            runtextpos++;
            int start = 1;

            do
            {
                start--;
                if (!RegexRunner.CharInClass(runtext[runtextpos - start], "\0\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
                {
                    goto Label_0203;
                }
            }while (start > 0);
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0148;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
            runtextpos--;
Label_0148:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_017B:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
            if (runtextpos >= runtextend)
            {
                goto Label_0203;
            }
            runtextpos++;
            if (runtext[runtextpos] != '}')
            {
                goto Label_0203;
            }
            start = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
Label_01FA:
            base.runtextpos = runtextpos;
            return;

Label_0203:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_0203;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_017B;

            case 3:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_0203;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_01FA;
        }
Esempio n. 17
0
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (((runtextpos != base.runtextstart) || (2 > (runtextend - runtextpos))) || ((runtext[runtextpos] != '<') || (runtext[runtextpos + 1] != '%')))
            {
                goto Label_0CCC;
            }
            runtextpos += 2;
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_00FC;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_00FC:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_012F:
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (runtext[runtextpos] != '@')
            {
                goto Label_0CCC;
            }
            runstack[--runstackpos] = -1;
            runtrack[--runtrackpos] = 1;
            goto Label_0BB7;
Label_016B:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_01C4;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_01C4:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 3;
            }
Label_01F7:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
            {
                goto Label_0CCC;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0277;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0002\t:;\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
            runtextpos--;
Label_0277:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 4;
            }
Label_02AA:
            runstack[--runstackpos] = base.runtrack.Length - runtrackpos;
            runstack[--runstackpos] = this.Crawlpos();
            runtrack[--runtrackpos] = 5;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (!RegexRunner.CharInClass(runtext[runtextpos], "\x0001\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
            {
                goto Label_0CCC;
            }
            runtrack[--runtrackpos] = runtextpos = runstack[runstackpos++];
            runtrack[--runtrackpos] = 6;
            start                   = runstack[runstackpos++];
            runtrackpos             = base.runtrack.Length - runstack[runstackpos++];
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 7;
            start                   = runstack[runstackpos++];
            this.Capture(3, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 9;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0415;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0415:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 10;
            }
Label_0448:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0CCC;
            }
            start = runstack[runstackpos++];
            this.Capture(4, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_04F0;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_04F0:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 11;
            }
Label_0523:
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0CCC;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_058D;
                }
                runtextpos++;
            }while (runtext[runtextpos] != '"');
            runtextpos--;
Label_058D:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 12;
            }
Label_05C0:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0CCC;
            }
            goto Label_0B57;
Label_066D:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 14;
            }
Label_06A0:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0CCC;
            }
            start = runstack[runstackpos++];
            this.Capture(4, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0748;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0748:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 15;
            }
Label_077B:
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (runtext[runtextpos] != '\'')
            {
                goto Label_0CCC;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_07E5;
                }
                runtextpos++;
            }while (runtext[runtextpos] != '\'');
            runtextpos--;
Label_07E5:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x10;
            }
Label_0818:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (runtext[runtextpos] != '\'')
            {
                goto Label_0CCC;
            }
            goto Label_0B57;
Label_08C5:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x12;
            }
Label_08F8:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CCC;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0CCC;
            }
            start = runstack[runstackpos++];
            this.Capture(4, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_09A0;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_09A0:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x13;
            }
Label_09D3:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0A2C;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\x0001\b\x0001\"#%&'(>?d"));
            runtextpos--;
Label_0A2C:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 20;
            }
Label_0A5F:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            goto Label_0B57;
Label_0B27:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
Label_0B57:
            start = runstack[runstackpos++];
            this.Capture(2, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
Label_0BB7:
            runtrack[--runtrackpos] = start;
            if ((start = runstack[runstackpos++]) != runtextpos)
            {
                runtrack[--runtrackpos] = runtextpos;
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x16;
                if ((runtrackpos > 0xcc) && (runstackpos > 0x99))
                {
                    goto Label_016B;
                }
                runtrack[--runtrackpos] = 0x17;
                goto Label_0CCC;
            }
            runtrack[--runtrackpos] = 0x18;
Label_0C2A:
            if ((start = runtextend - runtextpos) > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x19;
            }
Label_0C5D:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '%')) || (runtext[runtextpos + 1] != '>'))
            {
                goto Label_0CCC;
            }
            runtextpos += 2;
            start       = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
Label_0CC3:
            base.runtextpos = runtextpos;
            return;

Label_0CCC:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_0CCC;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_012F;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 3;
                }
                goto Label_01F7;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 4;
                }
                goto Label_02AA;

            case 5:
                runstackpos += 2;
                goto Label_0CCC;

            case 6:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                goto Label_0CCC;

            case 7:
            {
                int num1 = runtrack[runtrackpos++];
                if (num1 != this.Crawlpos())
                {
                    do
                    {
                        this.Uncapture();
                    }while (num1 != this.Crawlpos());
                }
                goto Label_0CCC;
            }

            case 8:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_0CCC;

            case 9:
                runtextpos = runtrack[runtrackpos++];
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 13;
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_066D;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
                runtextpos--;
                goto Label_066D;

            case 10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 10;
                }
                goto Label_0448;

            case 11:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 11;
                }
                goto Label_0523;

            case 12:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 12;
                }
                goto Label_05C0;

            case 13:
                runtextpos = runtrack[runtrackpos++];
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x11;
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_08C5;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
                runtextpos--;
                goto Label_08C5;

            case 14:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 14;
                }
                goto Label_06A0;

            case 15:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 15;
                }
                goto Label_077B;

            case 0x10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x10;
                }
                goto Label_0818;

            case 0x11:
                runtextpos = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                start = runstack[runstackpos++];
                this.Capture(4, start, runtextpos);
                runtrack[--runtrackpos] = start;
                runtrack[--runtrackpos] = 8;
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                start = runtextend - runtextpos;
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x15;
                }
                goto Label_0B27;

            case 0x12:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x12;
                }
                goto Label_08F8;

            case 0x13:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x13;
                }
                goto Label_09D3;

            case 20:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 20;
                }
                goto Label_0A5F;

            case 0x15:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"))
                {
                    goto Label_0CCC;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x15;
                }
                goto Label_0B27;

            case 0x16:
            {
                runtextpos = runtrack[runtrackpos++];
                int num10 = runstack[runstackpos++];
                runtrack[--runtrackpos] = 0x18;
                goto Label_0C2A;
            }

            case 0x17:
                goto Label_016B;

            case 0x18:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                goto Label_0CCC;

            case 0x19:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"))
                {
                    goto Label_0CCC;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x19;
                }
                goto Label_0C5D;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_0CC3;
        }
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if ((runtextpos != base.runtextstart) || (runtextpos >= runtextend))
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '<')
            {
                goto Label_0EE8;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (1 > (runtextend - runtextpos))
            {
                goto Label_0EE8;
            }
            runtextpos++;
            int start = 1;

            do
            {
                start--;
                if (!RegexRunner.CharInClass(runtext[runtextpos - start], "\0\x0004\t./:;\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
                {
                    goto Label_0EE8;
                }
            }while (start > 0);
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_013E;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0004\t./:;\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
            runtextpos--;
Label_013E:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_0171:
            start = runstack[runstackpos++];
            this.Capture(3, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
            runstack[--runstackpos] = -1;
            runtrack[--runtrackpos] = 1;
            goto Label_0C7F;
Label_01BE:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (1 > (runtextend - runtextpos))
            {
                goto Label_0EE8;
            }
            runtextpos++;
            start = 1;
            do
            {
                start--;
                if (!RegexRunner.CharInClass(runtext[runtextpos - start], "\0\0\x0001d"))
                {
                    goto Label_0EE8;
                }
            }while (start > 0);
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0258;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0258:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 4;
            }
Label_028B:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
            {
                goto Label_0EE8;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_030B;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0004\t-.:;\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
            runtextpos--;
Label_030B:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 5;
            }
Label_033E:
            start = runstack[runstackpos++];
            this.Capture(4, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 6;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_03DF;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_03DF:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 7;
            }
Label_0412:
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0EE8;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0472;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0472:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 8;
            }
Label_04A5:
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0EE8;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_050F;
                }
                runtextpos++;
            }while (runtext[runtextpos] != '"');
            runtextpos--;
Label_050F:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 9;
            }
Label_0542:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0EE8;
            }
            goto Label_0C1F;
Label_05EF:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 11;
            }
Label_0622:
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0EE8;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0682;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0682:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 12;
            }
Label_06B5:
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '\'')
            {
                goto Label_0EE8;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_071F;
                }
                runtextpos++;
            }while (runtext[runtextpos] != '\'');
            runtextpos--;
Label_071F:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 13;
            }
Label_0752:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '\'')
            {
                goto Label_0EE8;
            }
            goto Label_0C1F;
Label_07FF:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 15;
            }
Label_0832:
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0EE8;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0892;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0892:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x10;
            }
Label_08C5:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (((3 > (runtextend - runtextpos)) || (runtext[runtextpos] != '<')) || ((runtext[runtextpos + 1] != '%') || (runtext[runtextpos + 2] != '#')))
            {
                goto Label_0EE8;
            }
            runtextpos += 3;
            start       = runtextend - runtextpos;
            if (start > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x11;
            }
Label_0959:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '%')) || (runtext[runtextpos + 1] != '>'))
            {
                goto Label_0EE8;
            }
            runtextpos += 2;
            start       = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
            goto Label_0C1F;
Label_0A1D:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x13;
            }
Label_0A50:
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0EE8;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0AB0;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0AB0:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 20;
            }
Label_0AE3:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0B3C;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\x0001\b\x0001\"#'(/0=?d"));
            runtextpos--;
Label_0B3C:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x15;
            }
Label_0B6F:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
            goto Label_0C1F;
Label_0BEF:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
Label_0C1F:
            start = runstack[runstackpos++];
            this.Capture(2, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
Label_0C7F:
            runtrack[--runtrackpos] = start;
            if ((start = runstack[runstackpos++]) != runtextpos)
            {
                runtrack[--runtrackpos] = runtextpos;
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x17;
                if ((runtrackpos > 0xd4) && (runstackpos > 0x9f))
                {
                    goto Label_01BE;
                }
                runtrack[--runtrackpos] = 0x18;
                goto Label_0EE8;
            }
            runtrack[--runtrackpos] = 0x19;
Label_0CF2:
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0D33;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0D33:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x1a;
            }
Label_0D66:
            runstack[--runstackpos] = -1;
            runstack[--runstackpos] = 0;
            runtrack[--runtrackpos] = 0x1b;
            goto Label_0DF6;
Label_0D8F:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '/')
            {
                goto Label_0EE8;
            }
            start = runstack[runstackpos++];
            this.Capture(6, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
Label_0DF6:
            start = runstack[runstackpos++];
            runtrack[--runtrackpos] = num5;
            if ((((num5 = runstack[runstackpos++]) != runtextpos) || (start < 0)) && (start < 1))
            {
                runstack[--runstackpos] = runtextpos;
                runstack[--runstackpos] = start + 1;
                runtrack[--runtrackpos] = 0x1c;
                if ((runtrackpos > 0xd4) && (runstackpos > 0x9f))
                {
                    goto Label_0D8F;
                }
                runtrack[--runtrackpos] = 0x1d;
                goto Label_0EE8;
            }
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 30;
Label_0E90:
            if (runtextpos >= runtextend)
            {
                goto Label_0EE8;
            }
            runtextpos++;
            if (runtext[runtextpos] != '>')
            {
                goto Label_0EE8;
            }
            start = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
Label_0EDF:
            base.runtextpos = runtextpos;
            return;

Label_0EE8:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_0EE8;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_0171;

            case 3:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_0EE8;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 4;
                }
                goto Label_028B;

            case 5:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 5;
                }
                goto Label_033E;

            case 6:
                runtextpos = runtrack[runtrackpos++];
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 10;
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_05EF;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
                runtextpos--;
                goto Label_05EF;

            case 7:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 7;
                }
                goto Label_0412;

            case 8:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 8;
                }
                goto Label_04A5;

            case 9:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 9;
                }
                goto Label_0542;

            case 10:
                runtextpos = runtrack[runtrackpos++];
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 14;
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_07FF;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
                runtextpos--;
                goto Label_07FF;

            case 11:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 11;
                }
                goto Label_0622;

            case 12:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 12;
                }
                goto Label_06B5;

            case 13:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 13;
                }
                goto Label_0752;

            case 14:
                runtextpos = runtrack[runtrackpos++];
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x12;
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_0A1D;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
                runtextpos--;
                goto Label_0A1D;

            case 15:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 15;
                }
                goto Label_0832;

            case 0x10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x10;
                }
                goto Label_08C5;

            case 0x11:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"))
                {
                    goto Label_0EE8;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x11;
                }
                goto Label_0959;

            case 0x12:
                runtextpos = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                start = runtextend - runtextpos;
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x16;
                }
                goto Label_0BEF;

            case 0x13:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x13;
                }
                goto Label_0A50;

            case 20:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 20;
                }
                goto Label_0AE3;

            case 0x15:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x15;
                }
                goto Label_0B6F;

            case 0x16:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"))
                {
                    goto Label_0EE8;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x16;
                }
                goto Label_0BEF;

            case 0x17:
            {
                runtextpos = runtrack[runtrackpos++];
                int num1 = runstack[runstackpos++];
                runtrack[--runtrackpos] = 0x19;
                goto Label_0CF2;
            }

            case 0x18:
                goto Label_01BE;

            case 0x19:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                goto Label_0EE8;

            case 0x1a:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x1a;
                }
                goto Label_0D66;

            case 0x1b:
                runstackpos += 2;
                goto Label_0EE8;

            case 0x1c:
                start = runstack[runstackpos++] - 1;
                if (start < 0)
                {
                    runstack[runstackpos]   = runtrack[runtrackpos++];
                    runstack[--runstackpos] = start;
                    goto Label_0EE8;
                }
                runtextpos = runstack[runstackpos++];
                runtrack[--runtrackpos] = start;
                runtrack[--runtrackpos] = 30;
                goto Label_0E90;

            case 0x1d:
                goto Label_0D8F;

            case 30:
                start = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtrack[runtrackpos++];
                runstack[--runstackpos] = start;
                goto Label_0EE8;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_0EDF;
        }
Esempio n. 19
0
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (((runtextpos != base.runtextstart) || (2 > (runtextend - runtextpos))) || ((runtext[runtextpos] != '<') || (runtext[runtextpos + 1] != '%')))
            {
                goto Label_02B4;
            }
            runtextpos += 2;
            int start = runtextend - runtextpos;

            if (start > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 2;
            }
Label_00EE:
            if (runtextpos >= runtextend)
            {
                goto Label_02B4;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_02B4;
            }
            runstack[--runstackpos] = -1;
            runstack[--runstackpos] = 0;
            runtrack[--runtrackpos] = 3;
            goto Label_01B1;
Label_0136:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = runtextend - runtextpos;
            if (start > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 4;
            }
Label_0181:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
Label_01B1:
            start = runstack[runstackpos++];
            runtrack[--runtrackpos] = num5;
            if ((((num5 = runstack[runstackpos++]) != runtextpos) || (start < 0)) && (start < 1))
            {
                runstack[--runstackpos] = runtextpos;
                runstack[--runstackpos] = start + 1;
                runtrack[--runtrackpos] = 6;
                if ((runtrackpos > 40) && (runstackpos > 30))
                {
                    goto Label_0136;
                }
                runtrack[--runtrackpos] = 7;
                goto Label_02B4;
            }
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
Label_0245:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '%')) || (runtext[runtextpos + 1] != '>'))
            {
                goto Label_02B4;
            }
            runtextpos += 2;
            start       = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
Label_02AB:
            base.runtextpos = runtextpos;
            return;

Label_02B4:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_02B4;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"))
                {
                    goto Label_02B4;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_00EE;

            case 3:
                runstackpos += 2;
                goto Label_02B4;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"))
                {
                    goto Label_02B4;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 4;
                }
                goto Label_0181;

            case 5:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_02B4;

            case 6:
                start = runstack[runstackpos++] - 1;
                if (start < 0)
                {
                    runstack[runstackpos]   = runtrack[runtrackpos++];
                    runstack[--runstackpos] = start;
                    goto Label_02B4;
                }
                runtextpos = runstack[runstackpos++];
                runtrack[--runtrackpos] = start;
                runtrack[--runtrackpos] = 8;
                goto Label_0245;

            case 7:
                goto Label_0136;

            case 8:
                start = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtrack[runtrackpos++];
                runstack[--runstackpos] = start;
                goto Label_02B4;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_02AB;
        }
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos != base.runtextstart)
            {
                goto Label_049B;
            }
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_00C6;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_00C6:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_00F9:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '<')) || (runtext[runtextpos + 1] != '%'))
            {
                goto Label_049B;
            }
            runtextpos += 2;
            start       = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0170;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0170:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 3;
            }
Label_01A3:
            if (runtextpos >= runtextend)
            {
                goto Label_049B;
            }
            runtextpos++;
            if (runtext[runtextpos] != '$')
            {
                goto Label_049B;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0203;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0203:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 4;
            }
Label_0236:
            runstack[--runstackpos] = -1;
            runstack[--runstackpos] = 0;
            runtrack[--runtrackpos] = 5;
            goto Label_031B;
Label_025F:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_02B8;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"));
            runtextpos--;
Label_02B8:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 6;
            }
Label_02EB:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 7;
Label_031B:
            start = runstack[runstackpos++];
            runtrack[--runtrackpos] = num5;
            if ((((num5 = runstack[runstackpos++]) != runtextpos) || (start < 0)) && (start < 1))
            {
                runstack[--runstackpos] = runtextpos;
                runstack[--runstackpos] = start + 1;
                runtrack[--runtrackpos] = 8;
                if ((runtrackpos > 0x34) && (runstackpos > 0x27))
                {
                    goto Label_025F;
                }
                runtrack[--runtrackpos] = 9;
                goto Label_049B;
            }
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 10;
Label_03AF:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '%')) || (runtext[runtextpos + 1] != '>'))
            {
                goto Label_049B;
            }
            runtextpos += 2;
            start       = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0426;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0426:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 11;
            }
Label_0459:
            if (runtextpos < runtextend)
            {
                goto Label_049B;
            }
            start = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 7;
Label_0492:
            base.runtextpos = runtextpos;
            return;

Label_049B:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_049B;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_00F9;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 3;
                }
                goto Label_01A3;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 4;
                }
                goto Label_0236;

            case 5:
                runstackpos += 2;
                goto Label_049B;

            case 6:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 6;
                }
                goto Label_02EB;

            case 7:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_049B;

            case 8:
                start = runstack[runstackpos++] - 1;
                if (start < 0)
                {
                    runstack[runstackpos]   = runtrack[runtrackpos++];
                    runstack[--runstackpos] = start;
                    goto Label_049B;
                }
                runtextpos = runstack[runstackpos++];
                runtrack[--runtrackpos] = start;
                runtrack[--runtrackpos] = 10;
                goto Label_03AF;

            case 9:
                goto Label_025F;

            case 10:
                start = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtrack[runtrackpos++];
                runstack[--runstackpos] = start;
                goto Label_049B;

            case 11:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 11;
                }
                goto Label_0459;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_0492;
        }
Esempio n. 21
0
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '<')) || (runtext[runtextpos + 1] != '%'))
            {
                goto Label_0CBF;
            }
            runtextpos += 2;
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_00EF;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_00EF:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_0122:
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (runtext[runtextpos] != '@')
            {
                goto Label_0CBF;
            }
            runstack[--runstackpos] = -1;
            runtrack[--runtrackpos] = 1;
            goto Label_0BAA;
Label_015E:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_01B7;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_01B7:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 3;
            }
Label_01EA:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
            {
                goto Label_0CBF;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_026A;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0002\t:;\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
            runtextpos--;
Label_026A:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 4;
            }
Label_029D:
            runstack[--runstackpos] = base.runtrack.Length - runtrackpos;
            runstack[--runstackpos] = this.Crawlpos();
            runtrack[--runtrackpos] = 5;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (!RegexRunner.CharInClass(runtext[runtextpos], "\x0001\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"))
            {
                goto Label_0CBF;
            }
            runtrack[--runtrackpos] = runtextpos = runstack[runstackpos++];
            runtrack[--runtrackpos] = 6;
            start                   = runstack[runstackpos++];
            runtrackpos             = base.runtrack.Length - runstack[runstackpos++];
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 7;
            start                   = runstack[runstackpos++];
            this.Capture(3, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 9;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0408;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0408:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 10;
            }
Label_043B:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0CBF;
            }
            start = runstack[runstackpos++];
            this.Capture(4, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_04E3;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_04E3:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 11;
            }
Label_0516:
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0CBF;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0580;
                }
                runtextpos++;
            }while (runtext[runtextpos] != '"');
            runtextpos--;
Label_0580:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 12;
            }
Label_05B3:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (runtext[runtextpos] != '"')
            {
                goto Label_0CBF;
            }
            goto Label_0B4A;
Label_0660:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 14;
            }
Label_0693:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0CBF;
            }
            start = runstack[runstackpos++];
            this.Capture(4, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_073B;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_073B:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 15;
            }
Label_076E:
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (runtext[runtextpos] != '\'')
            {
                goto Label_0CBF;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_07D8;
                }
                runtextpos++;
            }while (runtext[runtextpos] != '\'');
            runtextpos--;
Label_07D8:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x10;
            }
Label_080B:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (runtext[runtextpos] != '\'')
            {
                goto Label_0CBF;
            }
            goto Label_0B4A;
Label_08B8:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x12;
            }
Label_08EB:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (runtextpos >= runtextend)
            {
                goto Label_0CBF;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0CBF;
            }
            start = runstack[runstackpos++];
            this.Capture(4, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0993;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0993:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 0x13;
            }
Label_09C6:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0A1F;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\x0001\b\x0001\"#%&'(>?d"));
            runtextpos--;
Label_0A1F:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 20;
            }
Label_0A52:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            goto Label_0B4A;
Label_0B1A:
            start = runstack[runstackpos++];
            this.Capture(5, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
Label_0B4A:
            start = runstack[runstackpos++];
            this.Capture(2, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
Label_0BAA:
            runtrack[--runtrackpos] = start;
            if ((start = runstack[runstackpos++]) != runtextpos)
            {
                runtrack[--runtrackpos] = runtextpos;
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x16;
                if ((runtrackpos > 0xcc) && (runstackpos > 0x99))
                {
                    goto Label_015E;
                }
                runtrack[--runtrackpos] = 0x17;
                goto Label_0CBF;
            }
            runtrack[--runtrackpos] = 0x18;
Label_0C1D:
            if ((start = runtextend - runtextpos) > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x19;
            }
Label_0C50:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '%')) || (runtext[runtextpos + 1] != '>'))
            {
                goto Label_0CBF;
            }
            runtextpos += 2;
            start       = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 8;
Label_0CB6:
            base.runtextpos = runtextpos;
            return;

Label_0CBF:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_0CBF;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_0122;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 3;
                }
                goto Label_01EA;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 4;
                }
                goto Label_029D;

            case 5:
                runstackpos += 2;
                goto Label_0CBF;

            case 6:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                goto Label_0CBF;

            case 7:
            {
                int num1 = runtrack[runtrackpos++];
                if (num1 != this.Crawlpos())
                {
                    do
                    {
                        this.Uncapture();
                    }while (num1 != this.Crawlpos());
                }
                goto Label_0CBF;
            }

            case 8:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_0CBF;

            case 9:
                runtextpos = runtrack[runtrackpos++];
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 13;
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_0660;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
                runtextpos--;
                goto Label_0660;

            case 10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 10;
                }
                goto Label_043B;

            case 11:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 11;
                }
                goto Label_0516;

            case 12:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 12;
                }
                goto Label_05B3;

            case 13:
                runtextpos = runtrack[runtrackpos++];
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 0x11;
                start = (num5 = runtextend - runtextpos) + 1;
                do
                {
                    if (--start <= 0)
                    {
                        goto Label_08B8;
                    }
                    runtextpos++;
                }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
                runtextpos--;
                goto Label_08B8;

            case 14:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 14;
                }
                goto Label_0693;

            case 15:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 15;
                }
                goto Label_076E;

            case 0x10:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x10;
                }
                goto Label_080B;

            case 0x11:
                runtextpos = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                start = runstack[runstackpos++];
                this.Capture(4, start, runtextpos);
                runtrack[--runtrackpos] = start;
                runtrack[--runtrackpos] = 8;
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                start = runtextend - runtextpos;
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x15;
                }
                goto Label_0B1A;

            case 0x12:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x12;
                }
                goto Label_08EB;

            case 0x13:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 0x13;
                }
                goto Label_09C6;

            case 20:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 20;
                }
                goto Label_0A52;

            case 0x15:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"))
                {
                    goto Label_0CBF;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x15;
                }
                goto Label_0B1A;

            case 0x16:
            {
                runtextpos = runtrack[runtrackpos++];
                int num10 = runstack[runstackpos++];
                runtrack[--runtrackpos] = 0x18;
                goto Label_0C1D;
            }

            case 0x17:
                goto Label_015E;

            case 0x18:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                goto Label_0CBF;

            case 0x19:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"))
                {
                    goto Label_0CBF;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 0x19;
                }
                goto Label_0C50;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_0CB6;
        }
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if ((((runtextpos != base.runtextstart) || (3 > (runtextend - runtextpos))) || ((runtext[runtextpos] != '<') || (runtext[runtextpos + 1] != '%'))) || (runtext[runtextpos + 2] != '#'))
            {
                goto Label_0275;
            }
            runtextpos += 3;
            runstack[--runstackpos] = -1;
            runstack[--runstackpos] = 0;
            runtrack[--runtrackpos] = 2;
            goto Label_0172;
Label_00F7:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            int start = runtextend - runtextpos;

            if (start > 0)
            {
                runtrack[--runtrackpos] = start - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 3;
            }
Label_0142:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 4;
Label_0172:
            start = runstack[runstackpos++];
            runtrack[--runtrackpos] = num5;
            if ((((num5 = runstack[runstackpos++]) != runtextpos) || (start < 0)) && (start < 1))
            {
                runstack[--runstackpos] = runtextpos;
                runstack[--runstackpos] = start + 1;
                runtrack[--runtrackpos] = 5;
                if ((runtrackpos > 0x24) && (runstackpos > 0x1b))
                {
                    goto Label_00F7;
                }
                runtrack[--runtrackpos] = 6;
                goto Label_0275;
            }
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 7;
Label_0206:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '%')) || (runtext[runtextpos + 1] != '>'))
            {
                goto Label_0275;
            }
            runtextpos += 2;
            start       = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 4;
Label_026C:
            base.runtextpos = runtextpos;
            return;

Label_0275:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_0275;

            case 2:
                runstackpos += 2;
                goto Label_0275;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                num5       = runtrack[runtrackpos++];
                runtextpos++;
                if (!RegexRunner.CharInClass(runtext[runtextpos], "\0\x0001\0\0"))
                {
                    goto Label_0275;
                }
                if (num5 > 0)
                {
                    runtrack[--runtrackpos] = num5 - 1;
                    runtrack[--runtrackpos] = runtextpos;
                    runtrack[--runtrackpos] = 3;
                }
                goto Label_0142;

            case 4:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_0275;

            case 5:
                start = runstack[runstackpos++] - 1;
                if (start < 0)
                {
                    runstack[runstackpos]   = runtrack[runtrackpos++];
                    runstack[--runstackpos] = start;
                    goto Label_0275;
                }
                runtextpos = runstack[runstackpos++];
                runtrack[--runtrackpos] = start;
                runtrack[--runtrackpos] = 7;
                goto Label_0206;

            case 6:
                goto Label_00F7;

            case 7:
                start = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtrack[runtrackpos++];
                runstack[--runstackpos] = start;
                goto Label_0275;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_026C;
        }
Esempio n. 23
0
        internal void RegexRunnerFinished(RegexRunner sender)
        {
            Busy = false;
            Runner = null;

            if (sender.Error != null)
            {
                Status.Text = "Error encountered during processing";
                MessageBox.Show(this, sender.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            // replace may be with nothing (zero length string), so find mode is when replace is null
            if (sender.Replace == null) // find
            {
                Captures.BeginUpdate();
                int i = 0;
                foreach (Match m in sender.Matches)
                {
                    i++;
                    TreeNode n = Captures.Nodes.Add("{" + ReplaceNewLines(m.Value) + "}");
                    foreach (Group g in m.Groups)
                    {
                        if (g.Captures.Count > 1)
                        {
                            TreeNode nn = n.Nodes.Add("...");
                            foreach (Capture c in g.Captures)
                                nn.Nodes.Add("{" + ReplaceNewLines(c.Value) + "}");
                        }
                        else if (g.Captures.Count == 1)
                            n.Nodes.Add(ReplaceNewLines("{" + g.Captures[0].Value) + "}");
                    }
                    // For performance limit tree view to first 500 results
                    if(i > 499)
                        break;
                }
                switch (sender.Matches.Count)
                {
                    case 0:
                        Status.Text = "No matches";
                        break;
                    case 1:
                        Status.Text = "1 match found";
                        break;
                    default:
                        if(sender.Matches.Count > 500)
                            Status.Text = sender.Matches.Count + " matches found (showing first 500)";
                        else
                            Status.Text = sender.Matches.Count + " matches found";
                        break;
                }

                Status.Text += " in " + sender.GetExecutionTime() + " ms";

                Captures.ExpandAll();
                Captures.EndUpdate();
            }
            else // replace
            {
                ResultText.Text = sender.Result;
                if (sender.Matches.Count != 1)
                    Status.Text = sender.Matches.Count + " replacements performed";
                else
                    Status.Text = "1 replacement performed";

                Status.Text += " in " + sender.GetExecutionTime() + " ms";

                Captures.Visible = false;
                ResultText.Visible = true;

                txtInput.Text = NewLineRegex.Replace(txtInput.Text, "\r\n");

                // make user-inserted \n show as a genuine newline
                ResultText.Text = ResultText.Text.Replace("\\n", "\r\n");
                // make any existing newlines in replace text display as newlines
                ResultText.Text = NewLineRegex.Replace(ResultText.Text, "\r\n");
            }
        }
Esempio n. 24
0
        protected override void Go()
        {
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            int num;

            if (runtextpos <= runtextbeg)
            {
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 1;
                if (1 <= runtextend - runtextpos)
                {
                    runtextpos++;
                    num = 1;
                    while (true)
                    {
                        if (!RegexRunner.CharInClass(runtext[runtextpos - num--], "\0\u0006\t-.:;_`\0\u0002\u0004\u0005\u0003\u0001\t\u0013\0"))
                        {
                            break;
                        }
                        if (num > 0)
                        {
                            continue;
                        }
                        goto IL_00da;
                    }
                }
            }
            goto IL_01d9;
IL_01d9:
            while (true)
            {
                base.runtrackpos = runtrackpos;
                base.runstackpos = runstackpos;
                EnsureStorage();
                runtrackpos = base.runtrackpos;
                runstackpos = base.runstackpos;
                runtrack    = base.runtrack;
                runstack    = base.runstack;
                switch (runtrack[runtrackpos++])
                {
                case 1:
                    runstackpos++;
                    continue;

                case 2:
                    goto IL_024b;

                case 3:
                    runstack[--runstackpos] = runtrack[runtrackpos++];
                    Uncapture();
                    continue;
                }
                break;
            }
            runtextpos = runtrack[runtrackpos++];
            goto IL_01d0;
IL_01d0:
            base.runtextpos = runtextpos;
            return;

IL_014e:
            num = runstack[runstackpos++];
            Capture(1, num, runtextpos);
            runtrack[--runtrackpos] = num;
            runtrack[--runtrackpos] = 3;
            if (runtextpos >= runtextend - 1 && (runtextpos >= runtextend || runtext[runtextpos] == '\n'))
            {
                num = runstack[runstackpos++];
                Capture(0, num, runtextpos);
                runtrack[--runtrackpos] = num;
                runtrack[--runtrackpos] = 3;
                goto IL_01d0;
            }
            goto IL_01d9;
IL_024b:
            runtextpos = runtrack[runtrackpos++];
            num        = runtrack[runtrackpos++];
            if (num > 0)
            {
                runtrack[--runtrackpos] = num - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
            goto IL_014e;
IL_00da:
            int num10;

            num = (num10 = runtextend - runtextpos) + 1;
            while (--num > 0)
            {
                if (RegexRunner.CharInClass(runtext[runtextpos++], "\0\u0006\t-.:;_`\0\u0002\u0004\u0005\u0003\u0001\t\u0013\0"))
                {
                    continue;
                }
                runtextpos--;
                break;
            }
            if (num10 > num)
            {
                runtrack[--runtrackpos] = num10 - num - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
            goto IL_014e;
        }
Esempio n. 25
0
        private void FindBtn_Click(object sender, EventArgs e)
        {
            try
            {
                Captures.Nodes.Clear();
                Captures.Visible = true;
                ResultText.Text = "";
                ResultText.Visible = false;
                Status.Text = "";
                Busy = true;

                Regex r = new Regex(txtFind.Text, Options);

                Runner = new RegexRunner(this, txtInput.Text, r);
            }
            catch (Exception ex)
            {
                ErrorHandler(ex);
                Busy = false;
            }
        }
Esempio n. 26
0
        protected override void Go()
        {
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    num          = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = num;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = num;
            runtrack[--runtrackpos] = 1;
            int num4;

            if (num <= runtextbeg)
            {
                runstack[--runstackpos] = num;
                runtrack[--runtrackpos] = 1;
                if (num < runtextend && RegexRunner.CharInClass(runtext[num++], "\0\u0004\0A[a{"))
                {
                    int num3;
                    num4 = (num3 = runtextend - num) + 1;
                    while (--num4 > 0)
                    {
                        if (RegexRunner.CharInClass(runtext[num++], "\0\n\0-/0;A[_`a{"))
                        {
                            continue;
                        }
                        num--;
                        break;
                    }
                    if (num3 > num4)
                    {
                        runtrack[--runtrackpos] = num3 - num4 - 1;
                        runtrack[--runtrackpos] = num - 1;
                        runtrack[--runtrackpos] = 2;
                    }
                    goto IL_0134;
                }
            }
            goto IL_01bf;
IL_0231:
            num  = runtrack[runtrackpos++];
            num4 = runtrack[runtrackpos++];
            if (num4 > 0)
            {
                runtrack[--runtrackpos] = num4 - 1;
                runtrack[--runtrackpos] = num - 1;
                runtrack[--runtrackpos] = 2;
            }
            goto IL_0134;
IL_0134:
            num4 = runstack[runstackpos++];
            Capture(1, num4, num);
            runtrack[--runtrackpos] = num4;
            runtrack[--runtrackpos] = 3;
            if (num >= runtextend - 1 && (num >= runtextend || runtext[num] == '\n'))
            {
                num4 = runstack[runstackpos++];
                Capture(0, num4, num);
                runtrack[--runtrackpos] = num4;
                runtrack[--runtrackpos] = 3;
                goto IL_01b6;
            }
            goto IL_01bf;
IL_01bf:
            while (true)
            {
                base.runtrackpos = runtrackpos;
                base.runstackpos = runstackpos;
                EnsureStorage();
                runtrackpos = base.runtrackpos;
                runstackpos = base.runstackpos;
                runtrack    = base.runtrack;
                runstack    = base.runstack;
                switch (runtrack[runtrackpos++])
                {
                case 1:
                    runstackpos++;
                    continue;

                case 2:
                    goto IL_0231;

                case 3:
                    runstack[--runstackpos] = runtrack[runtrackpos++];
                    Uncapture();
                    continue;
                }
                break;
            }
            num = runtrack[runtrackpos++];
            goto IL_01b6;
IL_01b6:
            base.runtextpos = num;
        }
Esempio n. 27
0
        private void AbortProcessing()
        {
            Busy = false;
            if (Runner == null) return;

            Runner.Abort();
            Runner = null;
            Status.Text = "Processing aborted";
        }
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '<')) || (runtext[runtextpos + 1] != '%'))
            {
                goto Label_0483;
            }
            runtextpos += 2;
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_00EF;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_00EF:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_0122:
            if (runtextpos >= runtextend)
            {
                goto Label_0483;
            }
            runtextpos++;
            if (runtext[runtextpos] != '=')
            {
                goto Label_0483;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0182;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_0182:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 3;
            }
Label_01B5:
            if (((((13 > (runtextend - runtextpos)) || (runtext[runtextpos] != 'W')) || ((runtext[runtextpos + 1] != 'e') || (runtext[runtextpos + 2] != 'b'))) || (((runtext[runtextpos + 3] != 'R') || (runtext[runtextpos + 4] != 'e')) || ((runtext[runtextpos + 5] != 's') || (runtext[runtextpos + 6] != 'o')))) || ((((runtext[runtextpos + 7] != 'u') || (runtext[runtextpos + 8] != 'r')) || ((runtext[runtextpos + 9] != 'c') || (runtext[runtextpos + 10] != 'e'))) || ((runtext[runtextpos + 11] != '(') || (runtext[runtextpos + 12] != '"'))))
            {
                goto Label_0483;
            }
            runtextpos += 13;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0307;
                }
                runtextpos++;
            }while (runtext[runtextpos] != '"');
            runtextpos--;
Label_0307:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 4;
            }
Label_033A:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '"')) || (runtext[runtextpos + 1] != ')'))
            {
                goto Label_0483;
            }
            runtextpos += 2;
            start       = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_03E1;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(runtext[runtextpos], "\0\0\x0001d"));
            runtextpos--;
Label_03E1:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 6;
            }
Label_0414:
            if (((2 > (runtextend - runtextpos)) || (runtext[runtextpos] != '%')) || (runtext[runtextpos + 1] != '>'))
            {
                goto Label_0483;
            }
            runtextpos += 2;
            start       = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
Label_047A:
            base.runtextpos = runtextpos;
            return;

Label_0483:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_0483;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_0122;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 3;
                }
                goto Label_01B5;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 4;
                }
                goto Label_033A;

            case 5:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_0483;

            case 6:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 6;
                }
                goto Label_0414;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_047A;
        }
Esempio n. 29
0
        protected override void Go()
        {
            string runtext      = this.runtext;
            int    runtextstart = this.runtextstart;
            int    runtextbeg   = this.runtextbeg;
            int    runtextend   = this.runtextend;
            int    num          = this.runtextpos;

            int[] runtrack = this.runtrack;
            int   num2     = this.runtrackpos;

            int[] runstack = this.runstack;
            int   num3     = this.runstackpos;

            this.CheckTimeout();
            runtrack[--num2] = num;
            runtrack[--num2] = 0;
            this.CheckTimeout();
            runstack[--num3] = num;
            runtrack[--num2] = 1;
            this.CheckTimeout();
            int num5;
            int num4 = (num5 = runtextend - num) + 1;

            while (--num4 > 0)
            {
                if (char.ToLower(runtext[num++]) == '\n')
                {
                    num--;
                    break;
                }
            }
            if (num5 > num4)
            {
                runtrack[--num2] = num5 - num4 - 1;
                runtrack[--num2] = num - 1;
                runtrack[--num2] = 2;
            }
            while (true)
            {
                this.CheckTimeout();
                if (!this.IsBoundary(num, runtextbeg, runtextend))
                {
                    this.CheckTimeout();
                    runstack[--num3] = num;
                    runtrack[--num2] = 1;
                    this.CheckTimeout();
                    if (1 <= runtextend - num)
                    {
                        num++;
                        num4 = 1;
                        while (RegexRunner.CharInClass(char.ToLower(runtext[num - num4--]), "\0\0\u0001\t"))
                        {
                            if (num4 <= 0)
                            {
                                this.CheckTimeout();
                                num4 = (num5 = runtextend - num) + 1;
                                while (--num4 > 0)
                                {
                                    if (!RegexRunner.CharInClass(char.ToLower(runtext[num++]), "\0\0\u0001\t"))
                                    {
                                        num--;
                                        break;
                                    }
                                }
                                if (num5 > num4)
                                {
                                    runtrack[--num2] = num5 - num4 - 1;
                                    runtrack[--num2] = num - 1;
                                    runtrack[--num2] = 3;
                                    goto IL_204;
                                }
                                goto IL_204;
                            }
                        }
                    }
                }
IL_441:
                while (true)
                {
                    this.runtrackpos = num2;
                    this.runstackpos = num3;
                    this.EnsureStorage();
                    num2     = this.runtrackpos;
                    num3     = this.runstackpos;
                    runtrack = this.runtrack;
                    runstack = this.runstack;
                    switch (runtrack[num2++])
                    {
                    case 1:
                        this.CheckTimeout();
                        num3++;
                        continue;

                    case 2:
                        goto IL_4C7;

                    case 3:
                        goto IL_51D;

                    case 4:
                        this.CheckTimeout();
                        runstack[--num3] = runtrack[num2++];
                        this.Uncapture();
                        continue;

                    case 5:
                        goto IL_598;
                    }
                    goto IL_49E;
                }
IL_4C7:
                this.CheckTimeout();
                num  = runtrack[num2++];
                num4 = runtrack[num2++];
                if (num4 > 0)
                {
                    runtrack[--num2] = num4 - 1;
                    runtrack[--num2] = num - 1;
                    runtrack[--num2] = 2;
                    continue;
                }
                continue;
IL_51D:
                this.CheckTimeout();
                num  = runtrack[num2++];
                num4 = runtrack[num2++];
                if (num4 > 0)
                {
                    runtrack[--num2] = num4 - 1;
                    runtrack[--num2] = num - 1;
                    runtrack[--num2] = 3;
                }
IL_204:
                this.CheckTimeout();
                num4 = runstack[num3++];
                this.Capture(1, num4, num);
                runtrack[--num2] = num4;
                runtrack[--num2] = 4;
                this.CheckTimeout();
                runstack[--num3] = num;
                runtrack[--num2] = 1;
                this.CheckTimeout();
                if (7 > runtextend - num || char.ToLower(runtext[num]) != 's' || char.ToLower(runtext[num + 1]) != 'u' || char.ToLower(runtext[num + 2]) != 'c' || char.ToLower(runtext[num + 3]) != 'c' || char.ToLower(runtext[num + 4]) != 'e' || char.ToLower(runtext[num + 5]) != 's' || char.ToLower(runtext[num + 6]) != 's')
                {
                    goto IL_441;
                }
                num += 7;
                this.CheckTimeout();
                num4 = runstack[num3++];
                this.Capture(2, num4, num);
                runtrack[--num2] = num4;
                runtrack[--num2] = 4;
                this.CheckTimeout();
                if (!this.IsBoundary(num, runtextbeg, runtextend))
                {
                    break;
                }
                goto IL_441;
            }
            this.CheckTimeout();
            num4 = (num5 = runtextend - num) + 1;
            while (--num4 > 0)
            {
                if (char.ToLower(runtext[num++]) == '\n')
                {
                    num--;
                    break;
                }
            }
            if (num5 > num4)
            {
                runtrack[--num2] = num5 - num4 - 1;
                runtrack[--num2] = num - 1;
                runtrack[--num2] = 5;
            }
IL_3FC:
            this.CheckTimeout();
            num4 = runstack[num3++];
            this.Capture(0, num4, num);
            runtrack[--num2]   = num4;
            runtrack[num2 - 1] = 4;
IL_432:
            this.CheckTimeout();
            this.runtextpos = num;
            return;

IL_49E:
            this.CheckTimeout();
            num = runtrack[num2++];
            goto IL_432;
IL_598:
            this.CheckTimeout();
            num  = runtrack[num2++];
            num4 = runtrack[num2++];
            if (num4 > 0)
            {
                runtrack[--num2] = num4 - 1;
                runtrack[--num2] = num - 1;
                runtrack[--num2] = 5;
                goto IL_3FC;
            }
            goto IL_3FC;
        }
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if ((runtextpos > runtextbeg) && (runtext[runtextpos - 1] != '\n'))
            {
                goto Label_03E9;
            }
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_00DC;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture), "\0\0\x0001d"));
            runtextpos--;
Label_00DC:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_010F:
            if ((((4 > (runtextend - runtextpos)) || (char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture) != 'b')) || ((char.ToLower(runtext[runtextpos + 1], CultureInfo.InvariantCulture) != 'i') || (char.ToLower(runtext[runtextpos + 2], CultureInfo.InvariantCulture) != 'n'))) || (char.ToLower(runtext[runtextpos + 3], CultureInfo.InvariantCulture) != 'd'))
            {
                goto Label_03E9;
            }
            runtextpos += 4;
            start       = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_01DE;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture), "\0\0\x0001d"));
            runtextpos--;
Label_01DE:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 3;
            }
Label_0211:
            if (runtextpos >= runtextend)
            {
                goto Label_03E9;
            }
            runtextpos++;
            if (char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture) != '(')
            {
                goto Label_03E9;
            }
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_029D;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture), "\0\x0001\0\0"));
            runtextpos--;
Label_029D:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 4;
            }
Label_02D0:
            start = runstack[runstackpos++];
            this.Capture(1, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
            if (runtextpos >= runtextend)
            {
                goto Label_03E9;
            }
            runtextpos++;
            if (char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture) != ')')
            {
                goto Label_03E9;
            }
            start = (num5 = runtextend - runtextpos) + 1;
            do
            {
                if (--start <= 0)
                {
                    goto Label_0374;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture), "\0\0\x0001d"));
            runtextpos--;
Label_0374:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 6;
            }
Label_03A7:
            if (runtextpos < runtextend)
            {
                goto Label_03E9;
            }
            start = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 5;
Label_03E0:
            base.runtextpos = runtextpos;
            return;

Label_03E9:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_03E9;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_010F;

            case 3:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 3;
                }
                goto Label_0211;

            case 4:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 4;
                }
                goto Label_02D0;

            case 5:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_03E9;

            case 6:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 6;
                }
                goto Label_03A7;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_03E0;
        }
Esempio n. 31
0
        protected unsafe override void Go()
        {
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    num          = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = num;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = num;
            runtrack[--runtrackpos] = 1;
            int num4;
            int num5;

            if (num == base.runtextstart && num < runtextend && runtext[num++] == '<')
            {
                runstack[--runstackpos] = num;
                runtrack[--runtrackpos] = 1;
                if (num < runtextend && RegexRunner.CharInClass(runtext[num++], "\0\u0004\0A[a{"))
                {
                    num5 = (num4 = runtextend - num) + 1;
                    while (--num5 > 0)
                    {
                        if (RegexRunner.CharInClass(runtext[num++], "\0\n\0-/0;A[_`a{"))
                        {
                            continue;
                        }
                        num--;
                        break;
                    }
                    if (num4 > num5)
                    {
                        runtrack[--runtrackpos] = num4 - num5 - 1;
                        runtrack[--runtrackpos] = num - 1;
                        runtrack[--runtrackpos] = 2;
                    }
                    goto IL_0157;
                }
            }
            goto IL_07c0;
IL_07c0:
            while (true)
            {
                base.runtrackpos = runtrackpos;
                base.runstackpos = runstackpos;
                EnsureStorage();
                runtrackpos = base.runtrackpos;
                runstackpos = base.runstackpos;
                runtrack    = base.runtrack;
                runstack    = base.runstack;
                switch (runtrack[runtrackpos++])
                {
                case 16:
                    break;

                default:
                    goto IL_084d;

                case 1:
                    runstackpos++;
                    continue;

                case 2:
                    goto IL_086a;

                case 3:
                    runstack[--runstackpos] = runtrack[runtrackpos++];
                    Uncapture();
                    continue;

                case 4:
                    num = runtrack[runtrackpos++];
                    runtrack[--runtrackpos] = num;
                    runtrack[--runtrackpos] = 5;
                    runstack[--runstackpos] = (int)((long)(IntPtr)(void *)base.runtrack.LongLength - (long)runtrackpos);
                    runstack[--runstackpos] = Crawlpos();
                    runtrack[--runtrackpos] = 6;
                    if (num < runtextend && runtext[num++] == '=')
                    {
                        num5 = (num4 = runtextend - num) + 1;
                        while (--num5 > 0)
                        {
                            if (RegexRunner.CharInClass(runtext[num++], "\0\0\t\0\u0002\u0004\u0005\u0003\u0001\t\u0013\0"))
                            {
                                continue;
                            }
                            num--;
                            break;
                        }
                        if (num4 > num5)
                        {
                            runtrack[--runtrackpos] = num4 - num5 - 1;
                            runtrack[--runtrackpos] = num - 1;
                            runtrack[--runtrackpos] = 7;
                        }
                        goto IL_02d3;
                    }
                    continue;

                case 5:
                    num = runtrack[runtrackpos++];
                    runtrack[--runtrackpos] = num;
                    runtrack[--runtrackpos] = 10;
                    runstack[--runstackpos] = (int)((long)(IntPtr)(void *)base.runtrack.LongLength - (long)runtrackpos);
                    runstack[--runstackpos] = Crawlpos();
                    runtrack[--runtrackpos] = 6;
                    if (num < runtextend && runtext[num++] == '=')
                    {
                        num5 = (num4 = runtextend - num) + 1;
                        while (--num5 > 0)
                        {
                            if (RegexRunner.CharInClass(runtext[num++], "\0\0\t\0\u0002\u0004\u0005\u0003\u0001\t\u0013\0"))
                            {
                                continue;
                            }
                            num--;
                            break;
                        }
                        if (num4 > num5)
                        {
                            runtrack[--runtrackpos] = num4 - num5 - 1;
                            runtrack[--runtrackpos] = num - 1;
                            runtrack[--runtrackpos] = 11;
                        }
                        goto IL_048f;
                    }
                    continue;

                case 6:
                    runstackpos += 2;
                    continue;

                case 7:
                    num  = runtrack[runtrackpos++];
                    num5 = runtrack[runtrackpos++];
                    if (num5 > 0)
                    {
                        runtrack[--runtrackpos] = num5 - 1;
                        runtrack[--runtrackpos] = num - 1;
                        runtrack[--runtrackpos] = 7;
                    }
                    goto IL_02d3;

                case 8:
                    num  = runtrack[runtrackpos++];
                    num5 = runtrack[runtrackpos++];
                    if (num5 > 0)
                    {
                        runtrack[--runtrackpos] = num5 - 1;
                        runtrack[--runtrackpos] = num - 1;
                        runtrack[--runtrackpos] = 8;
                    }
                    goto IL_0358;

                case 9:
                {
                    int num17 = runtrack[runtrackpos++];
                    if (num17 != Crawlpos())
                    {
                        do
                        {
                            Uncapture();
                        }while (num17 != Crawlpos());
                    }
                    continue;
                }

                case 10:
                    goto IL_09cf;

                case 11:
                    num  = runtrack[runtrackpos++];
                    num5 = runtrack[runtrackpos++];
                    if (num5 > 0)
                    {
                        runtrack[--runtrackpos] = num5 - 1;
                        runtrack[--runtrackpos] = num - 1;
                        runtrack[--runtrackpos] = 11;
                    }
                    goto IL_048f;

                case 12:
                    num  = runtrack[runtrackpos++];
                    num5 = runtrack[runtrackpos++];
                    if (num5 > 0)
                    {
                        runtrack[--runtrackpos] = num5 - 1;
                        runtrack[--runtrackpos] = num - 1;
                        runtrack[--runtrackpos] = 12;
                    }
                    goto IL_0514;

                case 13:
                    goto IL_0a80;

                case 14:
                    runstack[runstackpos] = runtrack[runtrackpos++];
                    continue;

                case 15:
                    goto IL_0ad8;

                case 17:
                {
                    num5 = runtrack[runtrackpos++];
                    runstack[--runstackpos] = runtrack[runtrackpos++];
                    runstack[--runstackpos] = num5;
                    continue;
                }
IL_0514:
                    if (num < runtextend)
                    {
                        goto IL_051d;
                    }
                    continue;
IL_048f:
                    if (num < runtextend && runtext[num++] == '"')
                    {
                        num5 = (num4 = runtextend - num) + 1;
                        while (--num5 > 0)
                        {
                            if (runtext[num++] != '"')
                            {
                                continue;
                            }
                            num--;
                            break;
                        }
                        if (num4 > num5)
                        {
                            runtrack[--runtrackpos] = num4 - num5 - 1;
                            runtrack[--runtrackpos] = num - 1;
                            runtrack[--runtrackpos] = 12;
                        }
                        goto IL_0514;
                    }
                    continue;
IL_0358:
                    if (num < runtextend)
                    {
                        goto IL_0361;
                    }
                    continue;
IL_02d3:
                    if (num < runtextend && runtext[num++] == '\'')
                    {
                        num5 = (num4 = runtextend - num) + 1;
                        while (--num5 > 0)
                        {
                            if (runtext[num++] != '\'')
                            {
                                continue;
                            }
                            num--;
                            break;
                        }
                        if (num4 > num5)
                        {
                            runtrack[--runtrackpos] = num4 - num5 - 1;
                            runtrack[--runtrackpos] = num - 1;
                            runtrack[--runtrackpos] = 8;
                        }
                        goto IL_0358;
                    }
                    continue;
                }
                break;
IL_0ad8:
                if ((num5 = runstack[runstackpos++] - 1) >= 0)
                {
                    goto IL_0aec;
                }
                runstack[runstackpos]   = runtrack[runtrackpos++];
                runstack[--runstackpos] = num5;
                continue;
IL_09cf:
                num = runtrack[runtrackpos++];
                if (num < runtextend && runtext[num++] == '=')
                {
                    goto IL_058f;
                }
                continue;
IL_0a80:
                num = runtrack[runtrackpos++];
                runstack[--runstackpos] = num;
                runtrack[--runtrackpos] = 14;
                if (runtrackpos > 116 && runstackpos > 87)
                {
                    runtrack[--runtrackpos] = num;
                    runtrack[--runtrackpos] = 4;
                    if (num < runtextend && runtext[num++] != '=')
                    {
                        goto IL_058f;
                    }
                }
                else
                {
                    runtrack[--runtrackpos] = 18;
                }
                continue;
IL_051d:
                if (runtext[num++] == '"')
                {
                    num5                    = runstack[runstackpos++];
                    runtrackpos             = (int)((long)(IntPtr)(void *)base.runtrack.LongLength - (long)runstack[runstackpos++]);
                    runtrack[--runtrackpos] = num5;
                    runtrack[--runtrackpos] = 9;
                    goto IL_058f;
                }
                continue;
IL_0361:
                if (runtext[num++] == '\'')
                {
                    num5                    = runstack[runstackpos++];
                    runtrackpos             = (int)((long)(IntPtr)(void *)base.runtrack.LongLength - (long)runstack[runstackpos++]);
                    runtrack[--runtrackpos] = num5;
                    runtrack[--runtrackpos] = 9;
                    goto IL_058f;
                }
            }
            goto IL_064b;
IL_0746:
            if (num < runtextend && runtext[num++] == '>' && num >= runtextend - 1 && (num >= runtextend || runtext[num] == '\n'))
            {
                num5 = runstack[runstackpos++];
                Capture(0, num5, num);
                runtrack[--runtrackpos] = num5;
                runtrack[--runtrackpos] = 3;
                goto IL_07b7;
            }
            goto IL_07c0;
IL_0157:
            num5 = runstack[runstackpos++];
            Capture(1, num5, num);
            runtrack[--runtrackpos] = num5;
            runtrack[--runtrackpos] = 3;
            runstack[--runstackpos] = num;
            runtrack[--runtrackpos] = 1;
            runstack[--runstackpos] = -1;
            runtrack[--runtrackpos] = 1;
            goto IL_058f;
IL_0aec:
            num = runstack[runstackpos++];
            runtrack[--runtrackpos] = num5;
            runtrack[--runtrackpos] = 17;
            goto IL_0746;
IL_086a:
            num  = runtrack[runtrackpos++];
            num5 = runtrack[runtrackpos++];
            if (num5 > 0)
            {
                runtrack[--runtrackpos] = num5 - 1;
                runtrack[--runtrackpos] = num - 1;
                runtrack[--runtrackpos] = 2;
            }
            goto IL_0157;
IL_058f:
            int num51 = num5 = runstack[runstackpos++];

            if (num5 != -1)
            {
                runtrack[--runtrackpos] = num5;
            }
            else
            {
                runtrack[--runtrackpos] = num;
            }
            if (num51 != num)
            {
                runtrack[--runtrackpos] = num;
                runtrack[--runtrackpos] = 13;
            }
            else
            {
                runstack[--runstackpos] = num5;
                runtrack[--runtrackpos] = 14;
            }
            num5 = runstack[runstackpos++];
            Capture(2, num5, num);
            runtrack[--runtrackpos] = num5;
            runtrack[--runtrackpos] = 3;
            runstack[--runstackpos] = -1;
            runstack[--runstackpos] = 0;
            runtrack[--runtrackpos] = 6;
            goto IL_06b2;
IL_06b2:
            num5 = runstack[runstackpos++];
            int num55 = num4 = runstack[runstackpos++];

            runtrack[--runtrackpos] = num4;
            if ((num55 != num || num5 < 0) && num5 < 1)
            {
                runstack[--runstackpos] = num;
                runstack[--runstackpos] = num5 + 1;
                runtrack[--runtrackpos] = 15;
                if (runtrackpos > 116 && runstackpos > 87)
                {
                    goto IL_064b;
                }
                runtrack[--runtrackpos] = 16;
                goto IL_07c0;
            }
            runtrack[--runtrackpos] = num5;
            runtrack[--runtrackpos] = 17;
            goto IL_0746;
IL_064b:
            runstack[--runstackpos] = num;
            runtrack[--runtrackpos] = 1;
            if (num < runtextend && runtext[num++] == '/')
            {
                num5 = runstack[runstackpos++];
                Capture(3, num5, num);
                runtrack[--runtrackpos] = num5;
                runtrack[--runtrackpos] = 3;
                goto IL_06b2;
            }
            goto IL_07c0;
IL_084d:
            num = runtrack[runtrackpos++];
            goto IL_07b7;
IL_07b7:
            base.runtextpos = num;
        }
Esempio n. 32
0
        public override void Go()
        {
            int    num4;
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if (((2 <= (runtextend - runtextpos)) && (runtext[runtextpos] == '<')) && (runtext[runtextpos + 1] == '%'))
            {
                runtextpos += 2;
                runstack[--runstackpos] = base.runtrack.Length - runtrackpos;
                runstack[--runstackpos] = this.Crawlpos();
                runtrack[--runtrackpos] = 2;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 3;
                if (runtextpos < runtextend)
                {
                    runtextpos++;
                    if (RegexRunner.CharInClass(runtext[runtextpos], "\0\x0002\0#%"))
                    {
                        runtrackpos = base.runtrack.Length - runstack[runstackpos++];
                        int num1 = runstack[runstackpos++];
                        if (num1 != this.Crawlpos())
                        {
                            do
                            {
                                this.Uncapture();
                            }while (num1 != this.Crawlpos());
                        }
                    }
                }
            }
            goto Label_037E;
Label_0211:
            if (num5 > num4)
            {
                runtrack[--runtrackpos] = (num5 - num4) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 5;
            }
Label_0244:
            num4 = runstack[runstackpos++];
            this.Capture(2, num4, runtextpos);
            runtrack[--runtrackpos] = num4;
            runtrack[--runtrackpos] = 6;
            if (runtextpos >= runtextend)
            {
                goto Label_037E;
            }
            runtextpos++;
            if (runtext[runtextpos] != '%')
            {
                goto Label_037E;
            }
            num4 = runstack[runstackpos++];
            this.Capture(1, num4, runtextpos);
            runtrack[--runtrackpos] = num4;
            runtrack[--runtrackpos] = 6;
Label_02C3:
            if (num4 != -1)
            {
                runtrack[--runtrackpos] = num4;
            }
            else
            {
                runtrack[--runtrackpos] = runtextpos;
            }
            if ((num4 = runstack[runstackpos++]) != runtextpos)
            {
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 7;
            }
            else
            {
                runstack[--runstackpos] = num4;
                runtrack[--runtrackpos] = 8;
            }
            if (runtextpos >= runtextend)
            {
                goto Label_037E;
            }
            runtextpos++;
            if (runtext[runtextpos] != '>')
            {
                goto Label_037E;
            }
            num4 = runstack[runstackpos++];
            this.Capture(0, num4, runtextpos);
            runtrack[--runtrackpos] = num4;
            runtrack[--runtrackpos] = 6;
Label_0375:
            base.runtextpos = runtextpos;
            return;

Label_037E:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_037E;

            case 2:
                runstackpos += 2;
                goto Label_037E;

            case 3:
                runtextpos              = runtrack[runtrackpos++];
                num4                    = runstack[runstackpos++];
                runtrackpos             = base.runtrack.Length - runstack[runstackpos++];
                runtrack[--runtrackpos] = num4;
                runtrack[--runtrackpos] = 4;
                runstack[--runstackpos] = -1;
                runtrack[--runtrackpos] = 1;
                goto Label_02C3;

            case 4:
            {
                int num10 = runtrack[runtrackpos++];
                if (num10 != this.Crawlpos())
                {
                    do
                    {
                        this.Uncapture();
                    }while (num10 != this.Crawlpos());
                }
                goto Label_037E;
            }

            case 5:
                runtextpos = runtrack[runtrackpos++];
                num4       = runtrack[runtrackpos++];
                if (num4 > 0)
                {
                    runtrack[--runtrackpos] = num4 - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 5;
                }
                goto Label_0244;

            case 6:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_037E;

            case 7:
                runtextpos = runtrack[runtrackpos++];
                runstack[--runstackpos] = runtextpos;
                runtrack[--runtrackpos] = 8;
                if ((runtrackpos > 0x38) && (runstackpos > 0x2a))
                {
                    runstack[--runstackpos] = runtextpos;
                    runtrack[--runtrackpos] = 1;
                    runstack[--runstackpos] = runtextpos;
                    runtrack[--runtrackpos] = 1;
                    num4 = (num5 = runtextend - runtextpos) + 1;
                    do
                    {
                        if (--num4 <= 0)
                        {
                            goto Label_0211;
                        }
                        runtextpos++;
                    }while (runtext[runtextpos] != '%');
                    runtextpos--;
                    goto Label_0211;
                }
                runtrack[--runtrackpos] = 9;
                goto Label_037E;

            case 8:
                runstack[runstackpos] = runtrack[runtrackpos++];
                goto Label_037E;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_0375;
        }
Esempio n. 33
0
        protected override void Go()
        {
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    num          = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = num;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = num;
            runtrack[--runtrackpos] = 1;
            int num5;

            if (num == base.runtextstart && num < runtextend && runtext[num++] == '<')
            {
                runstack[--runstackpos] = num;
                runtrack[--runtrackpos] = 1;
                if (num < runtextend && RegexRunner.CharInClass(runtext[num++], "\0\u0004\0#&?@"))
                {
                    num5 = runstack[runstackpos++];
                    Capture(1, num5, num);
                    runtrack[--runtrackpos] = num5;
                    runtrack[--runtrackpos] = 2;
                    runstack[--runstackpos] = num;
                    runtrack[--runtrackpos] = 1;
                    if ((num5 = runtextend - num) > 0)
                    {
                        runtrack[--runtrackpos] = num5 - 1;
                        runtrack[--runtrackpos] = num;
                        runtrack[--runtrackpos] = 3;
                    }
                    goto IL_015e;
                }
            }
            goto IL_0247;
IL_030e:
            int num6;

            if (num6 > 0)
            {
                runtrack[--runtrackpos] = num6 - 1;
                runtrack[--runtrackpos] = num;
                runtrack[--runtrackpos] = 3;
            }
            goto IL_015e;
IL_023e:
            base.runtextpos = num;
            return;

IL_0247:
            while (true)
            {
                base.runtrackpos = runtrackpos;
                base.runstackpos = runstackpos;
                EnsureStorage();
                runtrackpos = base.runtrackpos;
                runstackpos = base.runstackpos;
                runtrack    = base.runtrack;
                runstack    = base.runstack;
                switch (runtrack[runtrackpos++])
                {
                case 1:
                    runstackpos++;
                    continue;

                case 2:
                    runstack[--runstackpos] = runtrack[runtrackpos++];
                    Uncapture();
                    continue;

                case 3:
                    goto IL_02d8;
                }
                break;
IL_02d8:
                num  = runtrack[runtrackpos++];
                num6 = runtrack[runtrackpos++];
                if (!RegexRunner.CharInClass(runtext[num++], "\0\u0001\0\0"))
                {
                    continue;
                }
                goto IL_030e;
            }
            num = runtrack[runtrackpos++];
            goto IL_023e;
IL_015e:
            num5 = runstack[runstackpos++];
            Capture(2, num5, num);
            runtrack[--runtrackpos] = num5;
            runtrack[--runtrackpos] = 2;
            if (IsMatched(1) && (num5 = MatchLength(1)) <= runtextend - num)
            {
                num6 = MatchIndex(1) + num5;
                num += num5;
                while (true)
                {
                    if (num5 <= 0)
                    {
                        break;
                    }
                    if (runtext[num6 - num5] == runtext[num - num5--])
                    {
                        continue;
                    }
                    goto IL_0247;
                }
                if (num < runtextend && runtext[num++] == '>')
                {
                    num5 = runstack[runstackpos++];
                    Capture(0, num5, num);
                    runtrack[--runtrackpos] = num5;
                    runtrack[--runtrackpos] = 2;
                    goto IL_023e;
                }
            }
            goto IL_0247;
        }
        protected override void Go()
        {
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            int num;

            if (runtextpos == base.runtextstart && 2 <= runtextend - runtextpos && runtext[runtextpos] == '<' && runtext[runtextpos + 1] == '!')
            {
                runtextpos += 2;
                if (7 <= runtextend - runtextpos && char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture) == 'd' && char.ToLower(runtext[runtextpos + 1], CultureInfo.InvariantCulture) == 'o' && char.ToLower(runtext[runtextpos + 2], CultureInfo.InvariantCulture) == 'c' && char.ToLower(runtext[runtextpos + 3], CultureInfo.InvariantCulture) == 't' && char.ToLower(runtext[runtextpos + 4], CultureInfo.InvariantCulture) == 'y' && char.ToLower(runtext[runtextpos + 5], CultureInfo.InvariantCulture) == 'p' && char.ToLower(runtext[runtextpos + 6], CultureInfo.InvariantCulture) == 'e')
                {
                    runtextpos += 7;
                    if (1 <= runtextend - runtextpos)
                    {
                        runtextpos++;
                        num = 1;
                        while (true)
                        {
                            if (!RegexRunner.CharInClass(runtext[runtextpos - num--], "\0\0\u0001d"))
                            {
                                break;
                            }
                            if (num > 0)
                            {
                                continue;
                            }
                            goto IL_01d7;
                        }
                    }
                }
            }
            goto IL_0340;
IL_0296:
            num = runstack[runstackpos++];
            Capture(1, num, runtextpos);
            runtrack[--runtrackpos] = num;
            runtrack[--runtrackpos] = 4;
            if (runtextpos < runtextend && runtext[runtextpos++] == '>' && runtextpos >= runtextend - 1 && (runtextpos >= runtextend || runtext[runtextpos] == '\n'))
            {
                num = runstack[runstackpos++];
                Capture(0, num, runtextpos);
                runtrack[--runtrackpos] = num;
                runtrack[--runtrackpos] = 4;
                goto IL_0337;
            }
            goto IL_0340;
IL_01d7:
            int num6;

            num = (num6 = runtextend - runtextpos) + 1;
            while (--num > 0)
            {
                if (RegexRunner.CharInClass(runtext[runtextpos++], "\0\0\u0001d"))
                {
                    continue;
                }
                runtextpos--;
                break;
            }
            if (num6 > num)
            {
                runtrack[--runtrackpos] = num6 - num - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
            goto IL_024b;
IL_0340:
            while (true)
            {
                base.runtrackpos = runtrackpos;
                base.runstackpos = runstackpos;
                EnsureStorage();
                runtrackpos = base.runtrackpos;
                runstackpos = base.runstackpos;
                runtrack    = base.runtrack;
                runstack    = base.runstack;
                switch (runtrack[runtrackpos++])
                {
                case 1:
                    runstackpos++;
                    continue;

                case 2:
                    goto IL_03b6;

                case 3:
                    goto IL_0406;

                case 4:
                    runstack[--runstackpos] = runtrack[runtrackpos++];
                    Uncapture();
                    continue;
                }
                break;
IL_0406:
                runtextpos = runtrack[runtrackpos++];
                num6       = runtrack[runtrackpos++];
                if (!RegexRunner.CharInClass(runtext[runtextpos++], "\0\u0001\0\0"))
                {
                    continue;
                }
                goto IL_043c;
            }
            runtextpos = runtrack[runtrackpos++];
            goto IL_0337;
IL_024b:
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if ((num = runtextend - runtextpos) > 0)
            {
                runtrack[--runtrackpos] = num - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 3;
            }
            goto IL_0296;
IL_03b6:
            runtextpos = runtrack[runtrackpos++];
            num        = runtrack[runtrackpos++];
            if (num > 0)
            {
                runtrack[--runtrackpos] = num - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
            goto IL_024b;
IL_0337:
            base.runtextpos = runtextpos;
            return;

IL_043c:
            if (num6 > 0)
            {
                runtrack[--runtrackpos] = num6 - 1;
                runtrack[--runtrackpos] = runtextpos;
                runtrack[--runtrackpos] = 3;
            }
            goto IL_0296;
        }
Esempio n. 35
0
 public static new bool CharInSet(char ch, string set, string category) => RegexRunner.CharInSet(ch, set, category);
        public override void Go()
        {
            int    num5;
            string runtext      = base.runtext;
            int    runtextstart = base.runtextstart;
            int    runtextbeg   = base.runtextbeg;
            int    runtextend   = base.runtextend;
            int    runtextpos   = base.runtextpos;

            int[] runtrack    = base.runtrack;
            int   runtrackpos = base.runtrackpos;

            int[] runstack    = base.runstack;
            int   runstackpos = base.runstackpos;

            runtrack[--runtrackpos] = runtextpos;
            runtrack[--runtrackpos] = 0;
            runstack[--runstackpos] = runtextpos;
            runtrack[--runtrackpos] = 1;
            if ((((5 > (runtextend - runtextpos)) || (char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture) != 'r')) || ((char.ToLower(runtext[runtextpos + 1], CultureInfo.InvariantCulture) != 'u') || (char.ToLower(runtext[runtextpos + 2], CultureInfo.InvariantCulture) != 'n'))) || ((char.ToLower(runtext[runtextpos + 3], CultureInfo.InvariantCulture) != 'a') || (char.ToLower(runtext[runtextpos + 4], CultureInfo.InvariantCulture) != 't')))
            {
                goto Label_028E;
            }
            runtextpos += 5;
            int start = (num5 = runtextend - runtextpos) + 1;

            do
            {
                if (--start <= 0)
                {
                    goto Label_0164;
                }
                runtextpos++;
            }while (RegexRunner.CharInClass(char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture), "\x0001\0\t\0\x0002\x0004\x0005\x0003\x0001\t\x0013\0"));
            runtextpos--;
Label_0164:
            if (num5 > start)
            {
                runtrack[--runtrackpos] = (num5 - start) - 1;
                runtrack[--runtrackpos] = runtextpos - 1;
                runtrack[--runtrackpos] = 2;
            }
Label_0197:
            if ((((6 > (runtextend - runtextpos)) || (char.ToLower(runtext[runtextpos], CultureInfo.InvariantCulture) != 's')) || ((char.ToLower(runtext[runtextpos + 1], CultureInfo.InvariantCulture) != 'e') || (char.ToLower(runtext[runtextpos + 2], CultureInfo.InvariantCulture) != 'r'))) || (((char.ToLower(runtext[runtextpos + 3], CultureInfo.InvariantCulture) != 'v') || (char.ToLower(runtext[runtextpos + 4], CultureInfo.InvariantCulture) != 'e')) || (char.ToLower(runtext[runtextpos + 5], CultureInfo.InvariantCulture) != 'r')))
            {
                goto Label_028E;
            }
            runtextpos += 6;
            start       = runstack[runstackpos++];
            this.Capture(0, start, runtextpos);
            runtrack[--runtrackpos] = start;
            runtrack[--runtrackpos] = 3;
Label_0285:
            base.runtextpos = runtextpos;
            return;

Label_028E:
            base.runtrackpos = runtrackpos;
            base.runstackpos = runstackpos;
            this.EnsureStorage();
            runtrackpos = base.runtrackpos;
            runstackpos = base.runstackpos;
            runtrack    = base.runtrack;
            runstack    = base.runstack;
            switch (runtrack[runtrackpos++])
            {
            case 1:
                runstackpos++;
                goto Label_028E;

            case 2:
                runtextpos = runtrack[runtrackpos++];
                start      = runtrack[runtrackpos++];
                if (start > 0)
                {
                    runtrack[--runtrackpos] = start - 1;
                    runtrack[--runtrackpos] = runtextpos - 1;
                    runtrack[--runtrackpos] = 2;
                }
                goto Label_0197;

            case 3:
                runstack[--runstackpos] = runtrack[runtrackpos++];
                this.Uncapture();
                goto Label_028E;
            }
            runtextpos = runtrack[runtrackpos++];
            goto Label_0285;
        }