- or download this
#!/usr/bin/perl --
use strict; use warnings; use Data::Dump;
my $jp = do {
...
}
print "#>>@{[time-$^T]}#\n";
}
- or download this
#<<1# [false,true,null]
{
"" => "[false,true,null]",
...
},
}
#>>1#
- or download this
--- reg
+++ reg
@@ -49,3 +49,3 @@
...
- (?: <quotation_mark> (?: <char> )* <quotation_mark> )
+ (?: <.quotation_mark> (?: <char> )* <.quotation_mark> )
- or download this
#<<0# [false,true,null]
{
"" => "[false,true,null]",
...
},
}
#>>0#
- or download this
--- reg
+++ reg
@@ -55,3 +55,3 @@
...
- (?: <.begin_array> (?: (?: <value> (?: (?: <.value_separator><value
+> ) )* ) )? <.end_array> )
+ (?: <.begin_array> (?: (?: <[value]> (?: (?: <.value_separator><[va
+lue]> ) )* ) )? <.end_array> )
- or download this
#<<0# [false,true,null]
{
"" => "[false,true,null]",
...
},
}
#>>0#
- or download this
--- reg
+++ reg
@@ -7,2 +7,3 @@
#~ <debug:on>
+<nocontext: > # Switch off context substring retention
- or download this
#<<0# [false,true,null]
{
array => {
...
},
}
#>>0#
- or download this
--- reg
+++ reg
@@ -40,12 +40,15 @@
...
+sub TRUE { bless \(my$s=!!1), 'TRUE' }
+sub FALSE { bless \(my$s=!!0), 'FALSE' }
+
- or download this
#<<1# [false,true,null]
{
array => {
...
},
}
#>>1#
- or download this
--- reg
+++ reg
@@ -38,3 +38,3 @@
...
- <false> | <null> | <true> | <object> | <array> | <number> | <string
+>
+ <MATCH=false> | <MATCH=null> | <MATCH=true> | <MATCH=object> | <MAT
+CH=array> | <MATCH=number> | <MATCH=string>
- or download this
#<<0# [false,true,null]
{
array => {
...
},
}
#>>0#
- or download this
--- reg
+++ reg
@@ -58,6 +58,9 @@
...
<token: number>
(?: (?: <minus> )? <int> (?: <frac> )? (?: <exp> )? )
- or download this
#<<1# [false,true,null]
{
array => [
...
],
}
#>>1#
- or download this
--- reg
+++ reg
@@ -8 +8 @@
...
@@ -117 +117 @@
-for my $str( q/[false,true,null]/ , ){
+for my $str( q/[ -2.0, 4.333e333, 600 ]/ , ){
- or download this
#<<0# [ -2.0, 4.333e333, 600 ]
{
"" => "[ -2.0, 4.333e333, 600 ]",
...
],
}
#>>0#
- or download this
--- reg
+++ reg
@@ -7,3 +7,3 @@
...
- <zero> | (?: <digit1_9> (?: <DIGIT> )* )
+ <zero> | (?: <digit1_9> (?: <[DIGIT]> )* )
- or download this
#<<1# [ -2.0, 4.333e333, 600 ]
{
array => [
...
],
}
#>>1#
- or download this
--- reg
+++ reg
@@ -76,12 +76,21 @@
...
print "#<<@{[time-$^T]}# $str \n";
if( $str =~ $jp ){
dd(\%/) ; #/
- or download this
#<<0# [ -2.0, 4.333e333, 600, 0, 9 ]
{
array => [
...
],
}
#>>0#
- or download this
--- reg
+++ reg
@@ -65,4 +65,7 @@
...
+ })
<token: decimal_point>
- or download this
#<<1# [ -2.0, 4.333e333, 600, 0, 9 ]
{ array => ["-2.0", "4.333e333", 600, 0, 9] }
#>>1#
- or download this
--- reg
+++ reg
@@ -8 +8 @@
...
@@ -129 +129 @@
-for my $str( q/[ -2.0, 4.333e333, 600, 0, 9 ]/ , ){
+for my $str( q{[ "\\" quote \\t tab" ]} , ){
- or download this
#<<0# [ "\" quote \t tab" ]
{
"" => "[ \"\\\" quote \\t tab\" ]",
...
],
}
#>>0#
- or download this
--- reg
+++ reg
@@ -7,3 +7,3 @@
...
- (?: <.quotation_mark> (?: <char> )* <.quotation_mark> )
+ (?: <.quotation_mark> (?: <[char]> )* <.quotation_mark> )
- or download this
#<<0# [ "\" quote \t tab" ]
{
array => [
...
],
}
#>>0#
- or download this
--- reg
+++ reg
@@ -108,0 +109,3 @@
...
+ } @_;
+ }
+}
- or download this
#<<0# [ "\" quote \t tab \uD83D\uDC2A U+1F42A DROMEDARY CAMEL" ]
{
array => ["\" quote \t tab \x{D83D}\x{DC2A} U+1F42A DROMEDARY CAMEL"
+],
}
#>>0#
- or download this
--- reg
+++ reg
@@ -135 +135 @@
-for my $str( q{[ "\\" quote \\t tab \\uD83D\\uDC2A U+1F42A DROMEDARY
+CAMEL" ]}, ){
+for my $str( q{[ -90.0, [" \\t tab",[7,11]],3e9,"\\r return", null ]}
+, ){
- or download this
#<<1# [ -90.0, [" \t tab",[7,11]],3e9,"\r return", null ]
{
array => ["-90.0", [" \t tab", [7, 11]], "3e9", "\r return", undef],
}
#>>1#
- or download this
--- reg
+++ reg
@@ -8 +8 @@
...
@@ -135 +135 @@
-for my $str( q{[ -90.0, [" \\t tab",[7,11]],3e9,"\\r return", null ]}
+, ){
+for my $str( q{{ "key" : "lime", "blue": "berry" }}, ){
- or download this
#<<0# { "key" : "lime", "blue": "berry" }
{
"" => "{ \"key\" : \"lime\", \"blue\": \"berry\" }",
...
},
}
#>>0#
- or download this
--- reg
+++ reg
@@ -7,3 +7,3 @@
...
+ $MATCH = [ $MATCH{string}, $MATCH{value} ];
+ })
- or download this
#<<0# { "key" : "lime", "blue": "berry" }
{ object => { member => [["key", "lime"], ["blue", "berry"]] } }
#>>0#
- or download this
--- reg
+++ reg
@@ -53,4 +53,7 @@
...
+ })
<token: member>
- or download this
#<<1# { "key" : "lime", "blue": "berry" }
{ object => { blue => "berry", key => "lime" } }
#>>1#
- or download this
--- reg
+++ reg
@@ -141 +141 @@
-for my $str( q{{ "key" : "lime", "blue": "berry" }}, ){
+for my $str( q{[{"k":"v"},{"v":"k"}] }, q{{"ro":["sham","bo"],"t":{"i
+":{"c":{"t":{"o":"c"}}}}}}){
- or download this
#<<1# [{"k":"v"},{"v":"k"}]
{ array => [{ k => "v" }, { v => "k" }] }
#>>1#
...
object => { ro => ["sham", "bo"], t => { i => { c => { t => { o => "
+c" } } } } },
}
#>>1#
- or download this
--- reg
+++ reg
@@ -141 +141 @@
-for my $str( q{[{"k":"v"},{"v":"k"}] }, q{{"ro":["sham","bo"],"t":{"i
+":{"c":{"t":{"o":"c"}}}}}}){
+for my $str( q{[1,[2,[3],[]]]}, q{["double extra comma",,]} , ){
- or download this
#<<0# [1,[2,[3],[]]]
{ array => [1, [2, [3], undef]] }
#>>0#
#<<0# ["double extra comma",,]
## fail to match
#>>43#