1 ;; Copyright (c) 2006-2007 Carlos Ungil
3 ;; Permission is hereby granted, free of charge, to any person obtaining
4 ;; a copy of this software and associated documentation files (the
5 ;; "Software"), to deal in the Software without restriction, including
6 ;; without limitation the rights to use, copy, modify, merge, publish,
7 ;; distribute, sublicense, and/or sell copies of the Software, and to
8 ;; permit persons to whom the Software is furnished to do so, subject to
9 ;; the following conditions:
11 ;; The above copyright notice and this permission notice shall be
12 ;; included in all copies or substantial portions of the Software.
14 ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 ;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 ;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 ;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 ;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 ;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 ;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 (defvar NILSXP
0 "nil = NULL")
25 (defvar SYMSXP
1 "symbols")
26 (defvar LISTSXP
2 "lists of dotted pairs")
27 (defvar CLOSXP
3 "closures")
28 (defvar ENVSXP
4 "environments")
29 (defvar PROMSXP
5 "promises: [un]evaluated closure arguments")
30 (defvar LANGSXP
6 "language constructs (special lists)")
31 (defvar SPECIALSXP
7 "special forms")
32 (defvar BUILTINSXP
8 "builtin non-special forms")
33 (defvar CHARSXP
9 "\"scalar\" string type (internal only)")
34 (defvar LGLSXP
10 "logical vectors")
35 (defvar INTSXP
13 "integer vectors")
36 (defvar REALSXP
14 "real variables")
37 (defvar CPLXSXP
15 "complex variables")
38 (defvar STRSXP
16 "string vectors")
39 (defvar DOTSXP
17 "dot-dot-dot object")
40 (defvar ANYSXP
18 "make \"any\" args work. Used in s)pecifying types for symbol registration to m)ean anything is okay")
41 (defvar VECSXP
19 "generic vectors")
42 (defvar EXPRSXP
20 "expressions vectors")
43 (defvar BCODESXP
21 "byte code")
44 (defvar EXTPTRSXP
22 "external pointer")
45 (defvar WEAKREFSXP
23 "weak reference")
46 (defvar RAWSXP
24 "raw bytes")
48 (defvar FUNSXP
99 "Closure or Builtin")
50 (defvar *r-vector-types
* '(:real-vector
:integer-vector
:complex-vector
:string-vector
51 :logical-vector
:generic-vector
:expressions-vector
))
53 (defvar *r-types
* `((,NILSXP .
:null
)
55 (,LISTSXP .
:list-of-dotted-pairs
)
57 (,ENVSXP .
:environments
)
59 (,LANGSXP .
:language-construct
)
60 (,SPECIALSXP .
:special-form
)
61 (,BUILTINSXP .
:builtin-non-special-forms
)
62 (,CHARSXP .
:scalar-string-type
)
63 (,LGLSXP .
:logical-vector
)
64 (,INTSXP .
:integer-vector
)
65 (,REALSXP .
:real-vector
)
66 (,CPLXSXP .
:complex-vector
)
67 (,STRSXP .
:string-vector
)
68 (,DOTSXP .
:dot-dot-dot
)
70 (,VECSXP .
:generic-vector
)
71 (,EXPRSXP .
:expressions-vector
)
72 (,BCODESXP .
:byte-code
)
73 (,EXTPTRSXP .
:external-pointer
)
74 (,WEAKREFSXP .
:weak-reference
)
75 (,RAWSXP .
:raw-bytes
)
76 (,FUNSXP .
:closure-or-builtin
)))