blob: 53560c8b3a3b5e4f1c387df1e1c3ec3344883498 (
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
41
42
43
|
# 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
readerLineComments (?:#.*\R)*
readerLineBlock (\s*)\S.+\R(?:\1\s+\S.*\R)*
|