File tree Expand file tree Collapse file tree
javascript/ql/src/Performance Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ private predicate sharesRoot(TInputSymbol a, TInputSymbol b) {
169169}
170170
171171/**
172- * Holds if the `a` is an inputsymbol from a regexp that has root `root`.
172+ * Holds if the `a` is an input symbol from a regexp that has root `root`.
173173 */
174174private predicate belongsTo ( TInputSymbol a , RegExpRoot root ) {
175175 exists ( RegExpTerm term | getRoot ( term ) = root |
@@ -201,9 +201,15 @@ class InputSymbol extends TInputSymbol {
201201 */
202202abstract class CharacterClass extends InputSymbol {
203203 /**
204- * Gets a char that is likely relevant for the ReDoS analysis of this character class.
205- * That is: One of the endpoints to the character class,
206- * or a char that is off-by-one to one of the endpoints of the character class (if this is an inversed character class).
204+ * Gets a character that is relevant for intersection-tests involving this
205+ * character class.
206+ *
207+ * Specifically, this is any of the characters mentioned explicitly in the
208+ * character class, offset by one if it is inverted. For character class escapes,
209+ * the result is as if the class had been written out as a series of intervals.
210+ *
211+ * This set is large enough to ensure that for any two intersecting character
212+ * classes, one contains a relevant character from the other.
207213 */
208214 abstract string getARelevantChar ( ) ;
209215
You can’t perform that action at this time.
0 commit comments