@@ -501,8 +501,6 @@ abstract class RegExp extends StringLiteral {
501501 this .negativeAssertionGroup ( start , end )
502502 or
503503 this .positiveLookaheadAssertionGroup ( start , end )
504- or
505- this .positiveLookbehindAssertionGroup ( start , end )
506504 }
507505
508506 /** Holds if an empty group is found between `start` and `end`. */
@@ -525,16 +523,10 @@ abstract class RegExp extends StringLiteral {
525523 this .emptyGroup ( start , end )
526524 or
527525 this .negativeAssertionGroup ( start , end )
528- or
529- this .positiveLookbehindAssertionGroup ( start , end )
530526 }
531527
532528 private predicate negativeAssertionGroup ( int start , int end ) {
533- exists ( int inStart |
534- this .negativeLookaheadAssertionStart ( start , inStart )
535- or
536- this .negativeLookbehindAssertionStart ( start , inStart )
537- |
529+ exists ( int inStart | this .negativeLookaheadAssertionStart ( start , inStart ) |
538530 this .groupContents ( start , end , inStart , _)
539531 )
540532 }
@@ -546,38 +538,20 @@ abstract class RegExp extends StringLiteral {
546538 )
547539 }
548540
549- /** Holds if a negative lookbehind is found between `start` and `end` */
550- predicate negativeLookbehindAssertionGroup ( int start , int end ) {
551- exists ( int inStart | this .negativeLookbehindAssertionStart ( start , inStart ) |
552- this .groupContents ( start , end , inStart , _)
553- )
554- }
555-
556541 /** Holds if a positive lookahead is found between `start` and `end` */
557542 predicate positiveLookaheadAssertionGroup ( int start , int end ) {
558543 exists ( int inStart | this .lookaheadAssertionStart ( start , inStart ) |
559544 this .groupContents ( start , end , inStart , _)
560545 )
561546 }
562547
563- /** Holds if a positive lookbehind is found between `start` and `end` */
564- predicate positiveLookbehindAssertionGroup ( int start , int end ) {
565- exists ( int inStart | this .lookbehindAssertionStart ( start , inStart ) |
566- this .groupContents ( start , end , inStart , _)
567- )
568- }
569-
570548 private predicate groupStart ( int start , int end ) {
571549 this .nonCapturingGroupStart ( start , end )
572550 or
573551 this .lookaheadAssertionStart ( start , end )
574552 or
575553 this .negativeLookaheadAssertionStart ( start , end )
576554 or
577- this .lookbehindAssertionStart ( start , end )
578- or
579- this .negativeLookbehindAssertionStart ( start , end )
580- or
581555 this .simpleGroupStart ( start , end )
582556 }
583557
@@ -612,24 +586,6 @@ abstract class RegExp extends StringLiteral {
612586 end = start + 3
613587 }
614588
615- /** Matches the start of a positive lookbehind assertion, i.e. `(?<=`. */
616- private predicate lookbehindAssertionStart ( int start , int end ) {
617- this .isGroupStart ( start ) and
618- this .getChar ( start + 1 ) = "?" and
619- this .getChar ( start + 2 ) = "<" and
620- this .getChar ( start + 3 ) = "=" and
621- end = start + 4
622- }
623-
624- /** Matches the start of a negative lookbehind assertion, i.e. `(?<!`. */
625- private predicate negativeLookbehindAssertionStart ( int start , int end ) {
626- this .isGroupStart ( start ) and
627- this .getChar ( start + 1 ) = "?" and
628- this .getChar ( start + 2 ) = "<" and
629- this .getChar ( start + 3 ) = "!" and
630- end = start + 4
631- }
632-
633589 /** Matches the contents of a group. */
634590 predicate groupContents ( int start , int end , int inStart , int inEnd ) {
635591 this .groupStart ( start , inStart ) and
0 commit comments