Created
December 12, 2015 02:32
-
-
Save jeremiahbiard/e9c1aed9efc8a5c1edb1 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
start = | |
expression | |
validchar | |
= [0-9a-zA-Z_?!+\-=@#$%^&*/.] | |
_ = | |
" "* | |
list | |
= "(" _ expr: expression* _ ")" { return expr; } | |
// Expression is either an atom or a list of expressions surrounded by parens | |
expression | |
= _ e:(atom / list) _ { return e; } | |
atom = | |
chars:validchar+ | |
{ return chars.join(""); } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment