Fun with Symbolic Derivatives in Lisp
Note that &#x27;not requiring a parser&#x27; is only true iff you limit the expression language you transform to one that has no syntactical constructs (i.e. can&#x27;t introduce new bindings). If you want to allow those then you need a &quot;parser&quot; on top of s-expressions which maintains a bindings context (usually called a code walker in the context of Lisp).<p>So not requiring a &#x27;parser&#x27; in that sense is not really a feature of full (modern) Lisp. (Early Lisps didn&#x27;t use lexical scoping, and used f-expressions or similar i.e. less of a compile- vs. run-time separation, so it may have worked better back then for what seems to have been the original purpose of Lisp, but they may also have squinted and limited themselves via convention, not sure.)<p>This doesn&#x27;t mean that there&#x27;s no usefulness for the &#x27;first-level parsing step&#x27; that gives you s-expressions: in some cases you might be handling a context insensitive language like yours. Also, it makes extending the language much more painless (macros easily compose, or more to the point, you can easily invent ad-hoc new languages on top of s-expressions used as inputs for macros, and won&#x27;t (ever, I think) have problems with their boundaries becoming ambiguous).