blob: f1e6787b3b1ed27570ede78ec964e50101466037 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File storage for static regular expressions.
########################################################
# Regular expressions for handling double-quoted strings
########################################################
## Match a possible single character escape
possibleStringEscape \\.
## Match valid string escapes
shortFormStringEscape [btnfr"'\\]
octalStringEscape [0-3]?[0-7]{1,2}
unicodeStringEscape u[0-9a-fA-F]{4}
## Match an unescaped quote in a string.
unescapedQuote (?<!\\)\"
## Match one or more characters that aren't part of an escape or a quote.
nonStringEscape [^\\\"]+
########################################
# Double validation regular expressions.
########################################
## Unit pieces for doubles
fpDigits (?:\p{Digit}+)
fpHexDigits (?:\p{XDigit}+)
## An exponent is e or E followed by a (optionally signed) decimal integer.
fpExponent [eE][+-]?
## A double leader
##
## NOTE: The incomplete parts are finished by where it is inserted.
fpLeader [\x00-\x20]*[+-]?(?:NaN|Infinity|
##############################################
# Miscellaneous validation regular expressions
##############################################
intLiteral \A[+\-]\d+\Z
|