* syntax.cs (BackslashNumber): New class.
* parser.cs (ParseSpecial): Create it instead of 'Reference' if a
numeric backreference is seen.
svn path=/trunk/mcs/; revision=139656
+2009-08-10 Raja R Harinath <harinath@hurrynot.org>
+
+ * syntax.cs (BackslashNumber): New class.
+ * parser.cs (ParseSpecial): Create it instead of 'Reference' if a
+ numeric backreference is seen.
+
2009-08-10 Raja R Harinath <harinath@hurrynot.org>
* parser.cs (ResolveReferences): Allow named groups to be
// FIXME test if number is within number of assigned groups
// this may present a problem for right-to-left matching
- Reference reference = new Reference (IsIgnoreCase (options));
+ Reference reference = new BackslashNumber (IsIgnoreCase (options), ecma);
refs.Add (reference, n.ToString ());
expr = reference;
break;
private bool ignore;
}
+ class BackslashNumber : Reference {
+ string literal;
+ bool ecma;
+
+ public BackslashNumber (bool ignore, bool ecma)
+ : base (ignore)
+ {
+ this.ecma = ecma;
+ }
+ }
+
class CharacterClass : Expression {
public CharacterClass (bool negate, bool ignore) {
this.negate = negate;