@@ -271,9 +271,6 @@ class RegExpTerm extends RegExpParent {
271
271
272
272
/** Holds if this regular expression term can match the empty string. */
273
273
predicate isNullable ( ) { none ( ) }
274
-
275
- /** Gets a string matched by this regular expression. */
276
- string getAMatch ( ) { none ( ) }
277
274
}
278
275
279
276
/**
@@ -458,20 +455,6 @@ class RegExpSequence extends RegExpTerm, TRegExpSequence {
458
455
override predicate isNullable ( ) {
459
456
forall ( RegExpTerm child | child = this .getAChild ( ) | child .isNullable ( ) )
460
457
}
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
- }
475
458
}
476
459
477
460
pragma [ nomagic]
@@ -703,8 +686,6 @@ class RegExpCharacterClass extends RegExpTerm, TRegExpCharacterClass {
703
686
override string getAPrimaryQlClass ( ) { result = "RegExpCharacterClass" }
704
687
705
688
override predicate isNullable ( ) { none ( ) }
706
-
707
- override string getAMatch ( ) { not this .isInverted ( ) and result = this .getAChild ( ) .getAMatch ( ) }
708
689
}
709
690
710
691
/**
@@ -819,8 +800,6 @@ class RegExpConstant extends RegExpTerm {
819
800
override string getAPrimaryQlClass ( ) { result = "RegExpConstant" }
820
801
821
802
override predicate isNullable ( ) { none ( ) }
822
-
823
- override string getAMatch ( ) { result = this .getValue ( ) }
824
803
}
825
804
826
805
/**
@@ -870,8 +849,6 @@ class RegExpGroup extends RegExpTerm, TRegExpGroup {
870
849
override string getAPrimaryQlClass ( ) { result = "RegExpGroup" }
871
850
872
851
override predicate isNullable ( ) { this .getAChild ( ) .isNullable ( ) }
873
-
874
- override string getAMatch ( ) { result = this .getAChild ( ) .getAMatch ( ) }
875
852
}
876
853
877
854
/**
0 commit comments