From 3b2b63913b1a550c8469acd3943abafbf22ccd13 Mon Sep 17 00:00:00 2001 From: aleksei Date: Sat, 13 Apr 2024 11:09:45 +1000 Subject: macro table gen. , syntax-rule works with *grammar* --- main.lisp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'main.lisp') diff --git a/main.lisp b/main.lisp index 1c16b31..e6280d5 100644 --- a/main.lisp +++ b/main.lisp @@ -24,3 +24,27 @@ We can test only the addressin modes we know the opcode to have This not only solves this problem, it just makes more sense. |# + +(setf *the-program* + (program "~/clasm-6502/wozmon.s")) + +(defun macro-list (program-list) + "Create an associative list of program-list macros." + (let ((return-alist nil)) + (dolist (i program-list) + (if (equal (syntax-rule (cadr i) *grammar*) 'macro) + (setf return-alist + (cons (list (first (cadr i)) (car (last (cadr i)))) + return-alist)) + nil)) + return-alist)) + +*the-program* + +(macro-list *the-program*) + + +(last (cadr '(100 ("Hey" "There")))) + + +(defun pass-attributes (program-list)) -- cgit v1.2.3