Created
June 21, 2023 07:05
-
-
Save twolodzko/b2d26a006ac1fdd80e02d28bbc77d114 to your computer and use it in GitHub Desktop.
Formal syntax for a minimal Scheme
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
/* Play with it: https://bnfplayground.pauliankline.com/ */ | |
<sexpr> ::= <atom> | <list> | <quote> | <unquote> | |
<atom> ::= <any>+ | |
<list> ::= "(" " "* (<sexpr> " "+)* <sexpr>? ")" | |
<quote> ::= "'" <sexpr> | |
<unquote> ::= "," <sexpr> | |
<any> ::= <alpha> | <special> | |
<alpha> ::= [0-9] | [a-z] | [A-Z] | |
<special> ::= | |
"!" | "$" | "%" | "&" | "*" | "+" | "-" | "." | "/" | | |
":" | "<" | "=" | ">" | "?" | "@" | "^" | "_" | "~" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment