Created
November 28, 2020 12:24
-
-
Save samebchase/e988e1ed9609daffaf1849c2527af51d to your computer and use it in GitHub Desktop.
trivial.raku
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 raku | |
use v6.d; | |
use Grammar::Tracer; | |
grammar EmptyLispForm { | |
token TOP { <lparen> <rparen> } | |
token lparen { '(' } | |
token rparen { ')' } | |
} | |
sub MAIN() { | |
say EmptyLispForm.parse(""); | |
say EmptyLispForm.parse("("); | |
say EmptyLispForm.parse(")"); | |
say EmptyLispForm.parse(")("); | |
say EmptyLispForm.parse("()"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment