Merge pull request #439 from mono-soc-2012/garyb/iconfix
[mono.git] / mcs / class / System / System.Text.RegularExpressions / RxCompiler.cs
index ece04d40478707040cc5bcc3a5223ea8012f8031..19b257bf131a05265f5d0b432c63c528af09a41b 100644 (file)
@@ -598,12 +598,7 @@ namespace System.Text.RegularExpressions {
                {
                        if (gid > ushort.MaxValue)
                                throw new NotSupportedException ();
-                       int offset = 0;
-                       if (ignore)
-                               offset += 1;
-                       if (reverse)
-                               offset += 2;
-                       Emit ((RxOp)((int)RxOp.Reference + offset));
+                       EmitOpIgnoreReverse (RxOp.Reference, ignore, reverse);
                        Emit ((ushort)gid);
                }
 
@@ -640,6 +635,13 @@ namespace System.Text.RegularExpressions {
                        EmitLink (next);
                }
 
+               public void EmitJumpTest (LinkRef target,LinkRef ElseTarget)
+               {
+                       //for evaluating ALTERNATIVES ("or" or "|")
+                       EmitJump (target);//not implemented for RxCompiler
+                       // see compiler.cs for implementation guideline
+               }
+
                public void EmitJump (LinkRef target)
                {
                        BeginLink (target);
@@ -747,6 +749,11 @@ namespace System.Text.RegularExpressions {
                        }
                }
 
+               public int Gap {
+                       get { return gap; }
+                       set { gap = value; }
+               }
+
                public IDictionary Mapping {
                        get { return mapping; }
                        set { mapping = value; }
@@ -761,6 +768,7 @@ namespace System.Text.RegularExpressions {
                private byte[] program;
                private EvalDelegate eval_del;
                private string[] namesMapping;
+               private int gap;
        }
 
 }