Created
May 26, 2016 02:37
-
-
Save niconii/92ea4f6dd7df5a39292642bf690259e0 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
ident: | |
/[A-Za-z_.][A-Za-z0-9_.]*/ | |
expr: | |
ident | | |
expr '+' expr | | |
etc. | |
nl: | |
'\' | '\r' | '\n' | EOF | |
label: | |
ident ':' | |
let: | |
'.let' ident '=' expr nl | |
assign: | |
ident '=' expr nl | |
db: | |
'.db' (expr ',')* expr nl | |
macro: | |
ident token* nl | |
scope: | |
'{' line* '}' | |
line: | |
label* (let | assign | macro | scope | nl) | |
program: | |
line* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment