quantifier-integer-limit.js (1179B)
1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-quantifier 6 description: > 7 MV of DecimalDigits evaluates to 2 ** 53 - 1. 8 (although DecimalDigits could be arbitrary large integer) 9 info: | 10 Quantifier 11 12 The production QuantifierPrefix :: { DecimalDigits } evaluates as follows: 13 14 1. Let i be the MV of DecimalDigits (see 11.8.3). 15 2. Return the two results i and i. 16 17 The production QuantifierPrefix :: { DecimalDigits, } evaluates as follows: 18 19 1. Let i be the MV of DecimalDigits. 20 2. Return the two results i and ∞. 21 22 The production QuantifierPrefix :: { DecimalDigits, DecimalDigits } evaluates as follows: 23 24 1. Let i be the MV of the first DecimalDigits. 25 2. Let j be the MV of the second DecimalDigits. 26 3. Return the two results i and j. 27 ---*/ 28 29 var re1 = new RegExp("b{" + Number.MAX_SAFE_INTEGER + "}", "u"); 30 assert(!re1.test("")); 31 32 var re2 = new RegExp("b{" + Number.MAX_SAFE_INTEGER + ",}?"); 33 assert(!re2.test("a")); 34 35 var re3 = new RegExp("b{" + Number.MAX_SAFE_INTEGER + "," + Number.MAX_SAFE_INTEGER + "}"); 36 assert(!re3.test("b")); 37 38 reportCompare(0, 0);