Lisp is a prefix language (the operator goes first), but one could easily imagine a special form that introduces a "little language" which is parsed with infix:
(infix parameters-describing-the-little-language 1 + 2 * 3 + (4 + 5 * 6))
The parameters enumerate the infix operators, and specify their precedence and associativity. We probably also want some way of escaping infix parsing within the special form.
No comments :
Post a Comment