summaryrefslogtreecommitdiff
path: root/main.lisp
diff options
context:
space:
mode:
authoraleksei <aleksei@aj.org>2024-04-13 11:09:45 +1000
committeraleksei <aleksei@aj.org>2024-04-13 11:09:45 +1000
commit3b2b63913b1a550c8469acd3943abafbf22ccd13 (patch)
treed948d603f0eb380c6f171df568dd11e02a84733c /main.lisp
parentfafbeb6051a15232df1858ce64ff0375597b5044 (diff)
macro table gen. , syntax-rule works with *grammar*
Diffstat (limited to 'main.lisp')
-rw-r--r--main.lisp24
1 files changed, 24 insertions, 0 deletions
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))