/[defeditor]/DefEditor/src/lisp-structure.lisp
ViewVC logotype

Contents of /DefEditor/src/lisp-structure.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Mon Feb 16 02:23:09 2004 UTC (10 years, 2 months ago) by rjain
Branch: MAIN
CVS Tags: HEAD
move code into src/ dir
1 rjain 1.1 ;;;; ***
2     ;;;; ABSTRACT SYNTAX ELEMENTS
3     ;;;; ***
4    
5     (defclass macro-character-mixin ()
6     ((macro-character :allocation :class
7     :reader macro-character)))
8    
9     (defclass dispatching-macro-character-mixin (macro-character-mixin)
10     ((dispatching-macro-character :allocation :class
11     :reader dispatching-macro-character)
12     (dispatching-macro-argument :initarg dispatching-macro-argument
13     :initform nil
14     :type (or null (integer 0)))))
15    
16     (defclass terminated-macro (macro-character-mixin structure-branch-list)
17     (macro-terminating-character :allocation :class
18     :reader macro-terminating-character))
19    
20     ;;;; ***
21     ;;;; CONCRETE SYNTAX ELEMENTS
22     ;;;; ***
23    
24     ;;;
25     ;;; Basic Leaves
26     ;;;
27    
28     (defclass symbol-element (structure-leaf)
29     ((symbol-element-package :initarg symbol-element-package
30     :reader symbol-element-package
31     :initform nil
32     :type (or null string))
33     (symbol-element-name :initarg symbol-element-name
34     :reader symbol-element-name
35     :initform (make-string)
36     :type string)
37     (symbol-internal-p :initarg symbol-internal-p
38     :reader symbol-internal-p
39     :initform nil
40     :type boolean)))
41    
42     (defclass symbol-macro-element (symbol-element)
43     ())
44    
45     ;;;
46     ;;; Basic Branches (parenthesized forms)
47     ;;;
48    
49     (defclass unknown-branch (structure-branch)
50     ())
51    
52     (defclass application (structure-branch)
53     ((application-operator :initarg application-operator
54     :accessor application-operator
55     :initform (error "Application's operator must be defined."))))
56    
57     (defclass lambda-list (structure-branch)
58     ())
59    
60     (defclass binding-list (structure-branch)
61     ())
62    
63     ;;;
64     ;;; Macro Characters
65     ;;;
66    
67     (defclass double-quote (terminated-macro)
68     ((macro-character :initform #\")
69     (macro-terminating-character :initform #\")))
70    
71     (defclass single-quote (macro-character-mixin structure-branch-item)
72     ((macro-character :initform #\')))
73    
74     (defclass comma (macro-character-mixin structure-branch-item)
75     ((macro-character :initform #\,)))
76    
77     (defclass semicolon (terminated-macro)
78     ((macro-character :initform #\;)
79     (macro-terminating-character :initform #\newline)))
80    
81     (defclass backquote (macro-character-mixin structure-branch-item)
82     ((macro-character :initform #\`)))
83    
84     ;;;
85     ;;; Dispatching Macro Characters
86     ;;;
87    
88     (defclass sharpsign-backslash (dispatching-macro-character-mixin structure-branch-item)
89     ((dispatching-macro-character :initform #\#)
90     (macro-character :initform #\\)
91     (structure-content :type character)))
92    
93     (defclass sharpsign-single-quote (dispatching-macro-character-mixin structure-branch-item)
94     ((dispatching-macro-character :initform #\#)
95     (macro-character :initform #\')))
96    
97     (defclass sharpsign-left-parenthesis (dispatching-macro-character-mixin structure-branch-list)
98     ((dispatching-macro-character :initform #\#)
99     (macro-character :initform #\()))
100    
101     (defclass sharpsign-asterisk (dispatching-macro-character-mixin structure-branch-list)
102     ((dispatching-macro-character :initform #\#)
103     (macro-character :initform #\*)))
104    
105     (defclass sharpsign-colon (dispatching-macro-character-mixin structure-branch-item)
106     ((dispatching-macro-character :initform #\#)
107     (macro-character :initform #\:)))
108    
109     (defclass sharpsign-dot (dispatching-macro-character-mixin structure-branch-item)
110     ((dispatching-macro-character :initform #\#)
111     (macro-character :initform #\.)))

  ViewVC Help
Powered by ViewVC 1.1.5