my $s = Struct("foo",
UBInt8("a"),
UBInt16("b"),
Struct("bar",
UBInt8("a"),
UBInt16("b"),
)
);
my $data = $s->parse("ABBabb");
# $data is { a => 65, b => 16962, bar => { a => 97, b => 25186 } }
Yeah.. that got me thinking too. I would not have called it "new".
As of version 5.10, Perl regex engine implements a complete recursive-descent parsing. Allowing things like Regexp::Grammars[0] to exist. Perl also has a nice PEG parser framework called Pegex[1]
Is this guy nuts? I'm on iOS 4.3 and I only need to hit the home button twice in a row to get from Safari to the home screen. One hit to send Safari background, and another hit to scroll from the current screen to home screen.