@@ -271,9 +271,6 @@ class RegExpTerm extends RegExpParent {
271271
272272 /** Holds if this regular expression term can match the empty string. */
273273 predicate isNullable ( ) { none ( ) }
274-
275- /** Gets a string matched by this regular expression. */
276- string getAMatch ( ) { none ( ) }
277274}
278275
279276/**
@@ -458,20 +455,6 @@ class RegExpSequence extends RegExpTerm, TRegExpSequence {
458455 override predicate isNullable ( ) {
459456 forall ( RegExpTerm child | child = this .getAChild ( ) | child .isNullable ( ) )
460457 }
461-
462- // Why can't we use concat(...) with language[monotonicAggregates] here instead?
463- override string getAMatch ( ) { result = this .getAMatchFromChildAtIndex ( 0 ) }
464-
465- private string getAMatchFromChildAtIndex ( int i ) {
466- i = this .getNumChild ( ) and result = ""
467- or
468- exists ( string substring , string rest |
469- substring = this .getChild ( i ) .getAMatch ( ) and
470- rest = this .getAMatchFromChildAtIndex ( i + 1 )
471- |
472- result = substring + rest
473- )
474- }
475458}
476459
477460pragma [ nomagic]
@@ -703,8 +686,6 @@ class RegExpCharacterClass extends RegExpTerm, TRegExpCharacterClass {
703686 override string getAPrimaryQlClass ( ) { result = "RegExpCharacterClass" }
704687
705688 override predicate isNullable ( ) { none ( ) }
706-
707- override string getAMatch ( ) { not this .isInverted ( ) and result = this .getAChild ( ) .getAMatch ( ) }
708689}
709690
710691/**
@@ -819,8 +800,6 @@ class RegExpConstant extends RegExpTerm {
819800 override string getAPrimaryQlClass ( ) { result = "RegExpConstant" }
820801
821802 override predicate isNullable ( ) { none ( ) }
822-
823- override string getAMatch ( ) { result = this .getValue ( ) }
824803}
825804
826805/**
@@ -870,8 +849,6 @@ class RegExpGroup extends RegExpTerm, TRegExpGroup {
870849 override string getAPrimaryQlClass ( ) { result = "RegExpGroup" }
871850
872851 override predicate isNullable ( ) { this .getAChild ( ) .isNullable ( ) }
873-
874- override string getAMatch ( ) { result = this .getAChild ( ) .getAMatch ( ) }
875852}
876853
877854/**
0 commit comments