Created
June 27, 2015 09:26
-
-
Save anonymous/bcb011dc022b76857855 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
my $s1 = "a b c"; | |
grammar G1 { | |
rule TOP { \w+ % \s }; | |
}; | |
grammar G2 { | |
rule TOP { <parts>+ % \s }; | |
rule parts { \w }; | |
}; | |
say G1.parse( $s1 ); | |
say ""; | |
say G2.parse( $s1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment