@@ -20,30 +20,54 @@ Val = "(Value)" (|"whitespace") ( ("(Comment)" ( ( "/" "/" { "character not \n
20
20
( " (reference)" " r" " e" " f" " [" ( (| " whitespace" )( " ident" | " int" ) (| " whitespace" ) { (" ," (| " whitespace" )( " ident" | " int" )(| " whitespace" )) }) " ]" ) |
21
21
( " (typed-array)" " ident" " [" ( Value ) { " ," Value } " ]" ) |
22
22
( " (typed-string)" " ident" String ) |
23
- (" (Number/Date/BigInt)"
24
- ( | " -" ) ( " NaN" | " Infinity" |
25
- ( ( " -" | " +" ) { " -" | " +" } | (" 0-9" ) ) " (Number) /*Begin Number Collection*/"
23
+ ( | " -" ) ( " NaN" | " Infinity" |
24
+ ( ( " -" | " +" ) { " -" | " +" } | (" 0-9" ) ) " /*Number Parser Bgin*/"
26
25
( " /* underscore '_' between any following sequence's symbols */" | ( " (BigInt)" { " 0-9" } " n" ) |
27
- ( " (int)" ( " 0" (
26
+ " (Number) " ( " (int)" ( " 0" (
28
27
( ( " x" | " X" ) (" 0-9" | " A-F" | " a-f" ) { " 0-9" | " A-F" | " a-f" } ) |
29
28
( ( " o" | " O" ) " 0-7" { " 0-7" } ) |
30
29
( ( " b" | " B" ) " 0-1" { " 0-1" ) |
31
30
( " 0-7" {" 0-7" })
32
31
)
33
32
)
34
- | " (float)" ( " 0-9" | " . only one decimal allowed" ) { " 0-9" | " . only one decimal allowed" } ( " (int) if no . " | ( ( " e" | " E" ) ( " 0-9" | " +" " 0-9" | " -" " 0-9" ) { " 0-9" } ) )
35
- ) ( | " NOT THESE:" ( " 0-9" | " -" | " :" | " +" | " A-F" | " a-f" ) ) ( " ," | " }" | " ]" | " whitespace /* outside of array or object */" )
36
- | " (Date)" ( ((" 0-9" | " :" | " T" | " -" | " +" ){ " 0-9" | " :" | " T" | " -" | " +" }) ( (" +" | " -" ) " 0-9" " 0-9" " :" " 0-9" " 0-9" | " Z" ) )
37
-
38
- ))) |
33
+ | " (float)" ( " 0-9" | " ." ) { " 0-9" | " ." } ( " (int) if no . "
34
+ | ( ( " e" | " E" ) ( " 0-9" | " +" " 0-9" | " -" " 0-9" ) { " 0-9" } ) )
35
+ ) ( | " NOT THESE:" ( " 0-9" | " -" | " :" | " +" | " A-F" | " a-f" ) ) " /*number terminator*/" ( " ," | " }" | " ]" | " whitespace /* outside of array or object */" )
36
+ | " (Date)" ( ( (" 0-9" | " :" | " T" | " -" | " +" )
37
+ { " 0-9" | " :" | " T" | " -" | " +" })
38
+ ( ( | " NOT THESE:" ( " 0-9" | " -" | " :" | " +" | " Z" | " T" ) ) " /*date terminator*/" ( " ," | " }" | " ]" | " whitespace /* outside of array or object */" )
39
+ | ( | " +" | " -" ) " 0-9" " 0-9" " :" " 0-9" " 0-9"
40
+ | " Z" ) )
41
+ )) |
39
42
(" (String)" ( ( " (Legal Escapes)" ( " b" | " n" | " r" | " f" | " t" | (" '" | ' "' | " `" )
40
43
| ( " u" ( " {" {" 0-9" | " A-F" | " a-f" } " }" | " 4 hex digits" ) )
41
44
| ( " x" (" 0-9" | " A-F" | " a-f" ) (" 0-9" | " A-F" | " a-f" ) )
42
45
| ( " 0-2" " 0-7" " 0-7" )
43
46
)
44
47
)|
45
- ( ' "' (( ' character not " or \ ' ) | ( ' \' ' "' ) | (" \" " \" ) | ( " \" " Legal Escapes" ) ) { ( ' character not " or \ ' ) | ( ' \' ' "' ) | (" \" " \" ) | ( " \" " Legal Escapes" ) } ' "' ) |
48
+ ( ' "' (( ' character not " or \ ' ) | ( ' \' ' "' ) | (" \" " \" ) | ( " \" " Legal Escapes" ) ) { ( ' character not " or \ ' ) | ( ' \' ' "' ) | (" \" " \" ) | ( " \" " Legal Escapes" ) } ' "' ) |
46
49
( " '" ( " character not ' or \" | ( " \" " '" ) | (" \" " \" ) | ( " \" " Legal Escapes" ) ) { " character not ' or \" | ( " \" " '" ) | (" \" " \" ) | ( " \" " Legal Escapes" ) } " '" ) |
47
- ( " `" ( " character not ` or \" | ( " \" ' `' ) | (" \" " \" ) | ( " \" " Legal Escapes" ) ) { " character not ` or \" | ( " \" ' `' ) | (" \" " \" ) | ( " \" " Legal Escapes" ) } " `" ) )
50
+ ( " `" ( " character not ` or \" | ( " \" ' `' ) | (" \" " \" ) | ( " \" " Legal Escapes" ) ) { " character not ` or \" | ( " \" ' `' ) | (" \" " \" ) | ( " \" " Legal Escapes" ) } " `" ) )
48
51
)|
49
- true | false | null | undefined )) (| " whitespace" ).
52
+ true | false | null | undefined ) (| " whitespace" ).
53
+
54
+ NumberRule = (" (Number/Date/BigInt)"
55
+ ( | " -" ) ( " NaN" | " Infinity" |
56
+ ( ( " -" | " +" ) { " -" | " +" } | (" 0-9" ) ) " /*Number Parser Bgin*/"
57
+ ( " /* underscore '_' between any following sequence's symbols */" | ( " (BigInt)" { " 0-9" } " n" ) |
58
+ " (Number)" ( " (int)" ( " 0" (
59
+ ( ( " x" | " X" ) (" 0-9" | " A-F" | " a-f" ) { " 0-9" | " A-F" | " a-f" } ) |
60
+ ( ( " o" | " O" ) " 0-7" { " 0-7" } ) |
61
+ ( ( " b" | " B" ) " 0-1" { " 0-1" ) |
62
+ ( " 0-7" {" 0-7" })
63
+ )
64
+ )
65
+ | " (float)" ( " 0-9" | " ." ) { " 0-9" | " ." } ( " (int) if no . "
66
+ | ( ( " e" | " E" ) ( " 0-9" | " +" " 0-9" | " -" " 0-9" ) { " 0-9" } ) )
67
+ ) ( | " NOT THESE:" ( " 0-9" | " -" | " :" | " +" | " A-F" | " a-f" ) ) " /*number terminator*/" ( " ," | " }" | " ]" | " whitespace /* outside of array or object */" )
68
+ | " (Date)" ( ( (" 0-9" | " :" | " T" | " -" | " +" )
69
+ { " 0-9" | " :" | " T" | " -" | " +" })
70
+ ( ( | " NOT THESE:" ( " 0-9" | " -" | " :" | " +" | " Z" | " T" ) ) " /*date terminator*/" ( " ," | " }" | " ]" | " whitespace /* outside of array or object */" )
71
+ | ( | " +" | " -" ) " 0-9" " 0-9" " :" " 0-9" " 0-9"
72
+ | " Z" ) )
73
+ ))).
0 commit comments