From c2c5772cbaef593f1f3b0957de26a1a309b308de Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 15 Jul 2003 19:49:26 +0000 Subject: [PATCH] r5311: *** empty log message *** --- 2/ifstar.lisp | 61 --------------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 2/ifstar.lisp diff --git a/2/ifstar.lisp b/2/ifstar.lisp deleted file mode 100644 index 389451b..0000000 --- a/2/ifstar.lisp +++ /dev/null @@ -1,61 +0,0 @@ -;;; -*- mode: common-lisp; package: lml2 -*- -;;; -;;; $Id: ifstar.lisp,v 1.1 2003/06/20 04:12:29 kevin Exp $ -;;; -;;; Public domain code by Franz - -(in-package #:lml2) - -(eval-when (:compile-toplevel :load-toplevel :execute) - (defvar if*-keyword-list '("then" "thenret" "else" "elseif"))) - -(defmacro if* (&rest args) - (do ((xx (reverse args) (cdr xx)) - (state :init) - (elseseen nil) - (totalcol nil) - (lookat nil nil) - (col nil)) - ((null xx) - (cond ((eq state :compl) - `(cond ,@totalcol)) - (t (error "if*: illegal form ~s" args)))) - (cond ((and (symbolp (car xx)) - (member (symbol-name (car xx)) - if*-keyword-list - :test #'string-equal)) - (setq lookat (symbol-name (car xx))))) - - (cond ((eq state :init) - (cond (lookat (cond ((string-equal lookat "thenret") - (setq col nil - state :then)) - (t (error - "if*: bad keyword ~a" lookat)))) - (t (setq state :col - col nil) - (push (car xx) col)))) - ((eq state :col) - (cond (lookat - (cond ((string-equal lookat "else") - (cond (elseseen - (error - "if*: multiples elses"))) - (setq elseseen t) - (setq state :init) - (push `(t ,@col) totalcol)) - ((string-equal lookat "then") - (setq state :then)) - (t (error "if*: bad keyword ~s" - lookat)))) - (t (push (car xx) col)))) - ((eq state :then) - (cond (lookat - (error - "if*: keyword ~s at the wrong place " (car xx))) - (t (setq state :compl) - (push `(,(car xx) ,@col) totalcol)))) - ((eq state :compl) - (cond ((not (string-equal lookat "elseif")) - (error "if*: missing elseif clause "))) - (setq state :init))))) -- 2.34.1