@@ -59,8 +59,8 @@ predicate matchesEpsilon(RegExpTerm t) {
5959/**
6060 * A lookahead/lookbehind that matches the empty string.
6161 */
62- class EmptyPositiveSubPatttern extends RegExpSubPattern {
63- EmptyPositiveSubPatttern ( ) {
62+ class EmptyPositiveSubPattern extends RegExpSubPattern {
63+ EmptyPositiveSubPattern ( ) {
6464 (
6565 this instanceof RegExpPositiveLookahead
6666 or
@@ -70,6 +70,9 @@ class EmptyPositiveSubPatttern extends RegExpSubPattern {
7070 }
7171}
7272
73+ /** DEPRECATED: Use `EmptyPositiveSubPattern` instead. */
74+ deprecated class EmptyPositiveSubPatttern = EmptyPositiveSubPattern ;
75+
7376/**
7477 * A branch in a disjunction that is the root node in a literal, or a literal
7578 * whose root node is not a disjunction.
@@ -133,7 +136,7 @@ private predicate isCanonicalTerm(RelevantRegExpTerm term, string str) {
133136}
134137
135138/**
136- * Gets a string reperesentation of the flags used with the regular expression.
139+ * Gets a string representation of the flags used with the regular expression.
137140 * Only the flags that are relevant for the canonicalization are included.
138141 */
139142string getCanonicalizationFlags ( RegExpTerm root ) {
@@ -334,7 +337,7 @@ private module CharacterClasses {
334337 )
335338 }
336339
337- private string lowercaseLetter ( ) { result = "abdcefghijklmnopqrstuvwxyz " .charAt ( _) }
340+ private string lowercaseLetter ( ) { result = "abcdefghijklmnopqrstuvwxyz " .charAt ( _) }
338341
339342 private string upperCaseLetter ( ) { result = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" .charAt ( _) }
340343
@@ -697,9 +700,7 @@ predicate delta(State q1, EdgeLabel lbl, State q2) {
697700 lbl = Epsilon ( ) and q2 = Accept ( getRoot ( dollar ) )
698701 )
699702 or
700- exists ( EmptyPositiveSubPatttern empty | q1 = before ( empty ) |
701- lbl = Epsilon ( ) and q2 = after ( empty )
702- )
703+ exists ( EmptyPositiveSubPattern empty | q1 = before ( empty ) | lbl = Epsilon ( ) and q2 = after ( empty ) )
703704}
704705
705706/**
@@ -1028,7 +1029,7 @@ module ReDoSPruning<isCandidateSig/2 isCandidate> {
10281029 * as the suffix "X" will cause both the regular expressions to be rejected.
10291030 *
10301031 * The string `w` is repeated any number of times because it needs to be
1031- * infinitely repeatedable for the attack to work.
1032+ * infinitely repeatable for the attack to work.
10321033 * For the regular expression `/((ab)+)*abab/` the accepting state is not reachable from the fork
10331034 * using epsilon transitions. But any attempt at repeating `w` will end in a state that accepts all suffixes.
10341035 */
0 commit comments