/raku-lisp.p6 Secret
Created
September 10, 2019 01:13
Star
You must be signed in to star a gist
Lisp Grammar WIP
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
| use v6; | |
| grammar RakuLisp { | |
| token TOP { ^^ <statement> $$ } | |
| token statement { [ <sexp> | <atom> ] } | |
| rule sexp { '(' <statement> ')' } | |
| proto token atom { * } | |
| token atom:sym<int> { \d+ } | |
| } | |
| sub MAIN() { | |
| say RakuLisp.parse('(1213 (12323 12323 (123123 12323)))'); | |
| } | |
| # Local Variables: | |
| # compile-command: "perl6 raku-lisp.p6" | |
| # End: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment