Created
November 6, 2011 12:03
-
-
Save tadzik/1342787 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar foo { | |
token TOP { | |
<tok> ** ',' | |
} | |
token tok { | |
\d+ | |
} | |
} | |
class foo::actions { | |
method TOP($/) { | |
say $/.keys.perl; | |
} | |
} | |
my $a = "1,2,33,4"; | |
my $b = foo.parse($a, :actions(foo::actions.new)); | |
# outputs: ().list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment