diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-08 22:39:59 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-08 22:39:59 -0300 |
| commit | c82e3b3b2de0633317ec8fc85925e91422820597 (patch) | |
| tree | 96567416ce23c5ce85601f9cedc3a94bb1c55cba /base/data/regexes.sprop | |
| parent | b3ac1c8690c3e14c879913e5dcc03a5f5e14876e (diff) | |
Start splitting into maven modules
Diffstat (limited to 'base/data/regexes.sprop')
| -rw-r--r-- | base/data/regexes.sprop | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/base/data/regexes.sprop b/base/data/regexes.sprop new file mode 100644 index 0000000..89c5b4f --- /dev/null +++ b/base/data/regexes.sprop @@ -0,0 +1,61 @@ +# 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| + +###################################### +# CL format string regular expressions +###################################### + +## Matches a format string prefix parameter +## A prefix parameter is one of +## * A signed decimal number +## * A single character preceded by a single quote +## * The letter V (or v) +## * The character # +clFormatPrefix (?:[-+]?\d+|'\S|[Vv]|#) + +## Match a format string modifier +## A modifier is either : or @, or both in either order +clFormatModifier (?:@|:|@:|:@) + +## Matches a directive name. +## A directive name is either +## 1) A single, non-whitespace, non-/ character +## 2) A name enclosed in /'s +clFormatName (?:(?<name>[\S&&[^/]])|(?:/(?<funcname>[\S&&[^/]]+)/)) +############################################## +# Miscellaneous validation regular expressions +############################################## +intLiteral \A[+\-]\d+\Z
\ No newline at end of file |
