Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmacro defrule (name param-list &rest body)
- `(defun ,(intern (format "parse-%s" name)) param-list
- (if (equal (length ,(car param-list) 0)
- nil
- ,@body))))
- (defrule ordinary (input)
- (list (substring input 1 nil) (list 'literal (aref input 0))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement