-
Notifications
You must be signed in to change notification settings - Fork 1
/
context.lisp
30 lines (26 loc) · 1.44 KB
/
context.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(in-package :cl-meld)
(defparameter *file* nil "Compiled file path.")
(defparameter *ast* nil "Abstract Syntax Tree.")
(defparameter *code* nil "Virtual Machine instructions.")
(defparameter *code-rules* nil "Virtual Machine instructions for each rule.")
(defparameter *has-exists-p* nil "If any exists construct exists in the program.")
(defparameter *data-input* nil)
(defparameter *node-types* nil "Available node subtypes.")
(define-symbol-macro *definitions* (definitions *ast*))
(define-symbol-macro *node-definitions* *definitions*)
(define-symbol-macro *clauses* (clauses *ast*))
(define-symbol-macro *node-var-axioms* (node-var-axioms *ast*))
(define-symbol-macro *thread-var-axioms* (thread-var-axioms *ast*))
(define-symbol-macro *node-const-axioms* (node-const-axioms *ast*))
(define-symbol-macro *thread-const-axioms* (thread-const-axioms *ast*))
(define-symbol-macro *nodes* (nodes *ast*))
(define-symbol-macro *externs* (externs *ast*))
(define-symbol-macro *functions* (functions *ast*))
(define-symbol-macro *directives* (directives *ast*))
(define-symbol-macro *consts* (consts *ast*))
(define-symbol-macro *processes* (processes *code*))
(define-symbol-macro *consts-code* (consts *code*))
(define-symbol-macro *function-code* (functions *code*))
(define-symbol-macro *exported-predicates* (exported-predicates *ast*))
(define-symbol-macro *imported-predicates* (imported-predicates *ast*))
(defun set-abstract-syntax-tree (ast) (setf *ast* ast))