anchor.diff:                         )
                          ( qs=QSTRING
                            { expr = regex_transform.apply(expr, $qs.text); }
  -                       | re=regex
  -                         { expr = regex_transform.apply(expr, $re.s); }
  +                       | re=REGEX
  +                         { expr = regex_transform.apply(expr, $re.text); }
                          )
                        )
                      )?
  
positive.code:                    s_rdi=name
                     { $s = new LiteralGroupExpression($s_rdi.s); }
                   ;
  
  /*
   * String logic.
   *
   * Strings are enclosed in double quotes and may contain escape sequences.
   * Strings are sensitive to white space.
   */
  
  quoted_identifier returns [ String s = "" ]
                   : s1=SQSTRING
                     { $s = $s1.getText(); }
                   ;
  regex            returns [ String s = "" ]
                   : s1=REGEX
                     { $s = $s1.getText(); }
                   ;
  
  
  /*
   * Arithmatic expressions.
  
negative.code:                  : ( s_lit=identifier{ fragments.add(new PathMatcher.LiteralNameMatch($s_lit.s)); }
                     | STAR{ fragments.add(new PathMatcher.WildcardMatch()); }
                     | STAR_STAR{ fragments.add(new PathMatcher.DoubleWildcardMatch()); }
                     | s_regex=REGEX{ fragments.add(new PathMatcher.RegexMatch($s_regex.text)); }
                     )
                     ( DOT_LIT
                       ( s_lit=identifier{ fragments.add(new PathMatcher.LiteralNameMatch($s_lit.s)); }
                       | STAR{ fragments.add(new PathMatcher.WildcardMatch()); }
                       | STAR_STAR{ fragments.add(new PathMatcher.DoubleWildcardMatch()); }
                       | s_regex=REGEX{ fragments.add(new PathMatcher.RegexMatch($s_regex.text)); }
                       )
                     )*
                     { $s = new PathMatcher(fragments); }
  