Skip to content

Instantly share code, notes, and snippets.

@samebchase
Created November 28, 2020 12:24
Show Gist options
  • Save samebchase/e988e1ed9609daffaf1849c2527af51d to your computer and use it in GitHub Desktop.
Save samebchase/e988e1ed9609daffaf1849c2527af51d to your computer and use it in GitHub Desktop.
trivial.raku
#!/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