Skip to content

Commit

Permalink
Deps: Updated regex tooling (#2923)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored May 31, 2021
1 parent 01cc18e commit ad9878a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 40 deletions.
56 changes: 21 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"jsdom": "^13.0.0",
"mocha": "^6.2.0",
"pump": "^3.0.0",
"refa": "^0.7.0",
"regexpp": "^2.0.1",
"scslre": "^0.1.1",
"refa": "^0.8.0",
"regexpp": "^3.1.0",
"scslre": "^0.1.3",
"simple-git": "^1.107.0",
"webfont": "^9.0.0",
"yargs": "^13.2.2"
Expand Down
4 changes: 2 additions & 2 deletions tests/pattern-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const TestCase = require('./helper/test-case');
const { BFS, parseRegex } = require('./helper/util');
const { languages } = require('../components.json');
const { visitRegExpAST } = require('regexpp');
const { transform, combineTransformers, JS, Words, NFA, Transformers } = require('refa');
const { transform, combineTransformers, getIntersectionWordSets, JS, Words, NFA, Transformers } = require('refa');
const scslre = require('scslre');
const path = require('path');

Expand Down Expand Up @@ -613,7 +613,7 @@ function checkExponentialBacktracking(path, pattern, ast) {
twoStar.quantify(2, Infinity);

if (!nfa.isDisjointWith(twoStar)) {
const word = Words.pickMostReadableWord(firstOf(nfa.intersectionWordSets(twoStar)));
const word = Words.pickMostReadableWord(firstOf(getIntersectionWordSets(nfa, twoStar)));
const example = Words.fromUnicodeToString(word);
assert.fail(`${path}: The quantifier \`${node.raw}\` ambiguous for all words ${JSON.stringify(example)}.repeat(n) for any n>1.`
+ ` This will cause exponential backtracking.`
Expand Down

0 comments on commit ad9878a

Please sign in to comment.