- or download this
my $DSL = <<'DSL';
:default ::= action => ::first
...
WS ~ [\s]+
DSL
- or download this
karl@pazuzu:~/src/perl/debug/sexp-tiny$ bin/sexp.pl examples/fossil.da
+t
{ fields => {
...
},
type => "fossil",
}
- or download this
karl@pazuzu:~/src/perl/debug/sexp-tiny$ echo '(acme (x 1))' | bin/sexp
+.pl
bin/sexp.pl expected (key value...)
- or download this
karl@pazuzu:~/src/perl/debug/sexp-tiny$ echo '(acme (x "1"))' | bin/se
+xp.pl
{ fields => { x => 1 }, type => "acme" }
- or download this
#!/usr/bin/env perl
...
my $norm = normalize( $$ast_ref, '$ast' );
dd $norm;
- or download this
karl@pazuzu:~/src/perl/sexp-tiny$ leftovers/ex02.pl
"(acme (pi \"3.14\")(nose \"cuke\"))"
...
[numify] $ast[1][1]: "3.14" -> 3.14
[unwrap] $ast[2][1]: Sexp::Tiny::String -> plain perl string "cuke"
["acme", ["pi", 3.14], ["nose", "cuke"]]