Skip to content

Instantly share code, notes, and snippets.

View arathnim's full-sized avatar
:octocat:
In the wired

Dylan Ball arathnim

:octocat:
In the wired
View GitHub Profile
@arathnim
arathnim / sexpr.cl
Last active February 29, 2016 20:52
(load "parmesan-test.cl")
(in-package parmesan)
(defparser symbol (intern (string-upcase (many+ letters))))
(defparser integer (parse-integer (many+ digits)))
(defparser quoted (between "'" (many (except "'")) "'"))
(defparser term (car ((choice quoted symbol integer sexp) (skip (many " ")))))
(defparser sexp (between "(" (manyc term)) ")"))