CXXR (C++ R)
SEXPTYPE.h
Go to the documentation of this file.
1 /*CXXR $Id: SEXPTYPE.h 1348 2013-02-25 17:49:03Z arr $
2  *CXXR
3  *CXXR This file is part of CXXR, a project to refactor the R interpreter
4  *CXXR into C++. It may consist in whole or in part of program code and
5  *CXXR documentation taken from the R project itself, incorporated into
6  *CXXR CXXR (and possibly MODIFIED) under the terms of the GNU General Public
7  *CXXR Licence.
8  *CXXR
9  *CXXR CXXR is Copyright (C) 2008-13 Andrew R. Runnalls, subject to such other
10  *CXXR copyrights and copyright restrictions as may be stated below.
11  *CXXR
12  *CXXR CXXR is not part of the R project, and bugs and other issues should
13  *CXXR not be reported via r-bugs or other R project channels; instead refer
14  *CXXR to the CXXR website.
15  *CXXR */
16 
17 /*
18  * R : A Computer Language for Statistical Data Analysis
19  * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka
20  * Copyright (C) 1999-2007 The R Development Core Team.
21  *
22  * This program is free software; you can redistribute it and/or modify
23  * it under the terms of the GNU General Public License as published by
24  * the Free Software Foundation; either version 2.1 of the License, or
25  * (at your option) any later version.
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU Lesser General Public License for more details.
31  *
32  * You should have received a copy of the GNU General Public License
33  * along with this program; if not, a copy is available at
34  * http://www.r-project.org/Licenses/
35  */
36 
42 #ifndef SEXPTYPE_H
43 #define SEXPTYPE_H
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49  /* Comment from CR code:
50  * Fundamental Data Types: These are largely Lisp
51  * influenced structures, with the exception of LGLSXP,
52  * INTSXP, REALSXP, CPLXSXP and STRSXP which are the
53  * element types for S-like data objects.
54 
55  * Note that the gap of 11 and 12 below is because of
56  * the withdrawal of native "factor" and "ordered" types.
57  *
58  * --> TypeTable[] in ../main/util.c for typeof()
59  */
60 
61  /* These exact numeric values are seldom used, but they are, e.g., in
62  * ../main/subassign.c
63  */
64 
76  typedef enum {
77  NILSXP = 0,
82  SYMSXP = 1,
84  LISTSXP = 2,
86  CLOSXP = 3,
88  ENVSXP = 4,
90  PROMSXP = 5,
93  LANGSXP = 6,
95  SPECIALSXP = 7,
97  BUILTINSXP = 8,
100  CHARSXP = 9,
102  LGLSXP = 10,
104  INTSXP = 13,
106  REALSXP = 14,
108  CPLXSXP = 15,
110  STRSXP = 16,
112  DOTSXP = 17,
114  ANYSXP = 18,
116  VECSXP = 19,
118  EXPRSXP = 20,
120  BCODESXP = 21,
122  EXTPTRSXP = 22,
124  WEAKREFSXP = 23,
126  RAWSXP = 24,
128  S4SXP = 25,
133  CXXSXP = 43,
134  /* (43 = ASCII +) */
135 
136  BAILSXP = 44,
140  FUNSXP = 99
142  } SEXPTYPE;
143 
144 #ifdef __cplusplus
145 } // extern "C"
146 #endif
147 
148 #endif /* SEXPTYPE_H */