Created
July 15, 2014 10:14
-
-
Save shelling/8524c504f373b86acf24 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
#!/usr/bin/env perl6 | |
use v6; | |
grammar Simple { | |
rule TOP { | |
^ <integer> $ | |
}; | |
token integer { | |
"-"? <[1..9]> <[0..9]>* | |
}; | |
} | |
say Simple.parse("10") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment