- or download this
grammar My-Grammar {
token TOP { \s* <object> \s* }
...
| true | false | null
}
}
- or download this
my $source-string = q/{
"firstName": "John",
...
my $match = My-Grammar.parse($source-string);
say ~$match if $match;
# say $match.made if $match;
- or download this
{
"firstName": "John",
...
},
"spouse": null
}
- or download this
class My-actions {
method TOP($/) {
...
}
}
}
- or download this
{"address" => {
"streetAddress": "21 2nd Street",
...
"state": "NY",
"postalCode": "10021-3100"
}, "age" => 25, "firstName" => "John", "isAlive" => True, "lastName"
+ => "Smith", "spouse" => (Any)}
- or download this
default { make ~$/;}