Created
November 24, 2010 03:48
-
-
Save edenc/713076 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 MyApp { | |
rule TOP { <cd> } | |
rule cd { <cd_object> { say "View" } } | |
rule cd_collection { '/cd' { say "CD Collection" } } | |
rule cd_object { <cd_collection> '/' $<id>=(\d+) { say "CD Object: $id" } } | |
} | |
MyApp.parse('/cd/1'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment