source: git/MP/MP/h/MP_ProtoDict.h @ 678cfd

spielwiese
Last change on this file since 678cfd was 678cfd, checked in by Olaf Bachmann <obachman@…>, 27 years ago
This commit was generated by cvs2svn to compensate for changes in r337, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///usr/local/Singular/svn/trunk@338 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.7 KB
Line 
1/***************************************************************************
2 *
3 *   HEADER FILE:  MP_ProtoDict.h                                         
4 *                                                               
5 *      The prototype dictionary (definitions and declarations)
6 *     
7 *       
8 *   Change Log:
9 *
10 *
11 ***************************************************************************/
12#ifndef _MP_ProtoDict_h
13#define _MP_ProtoDict_h
14
15#define MP_ProtoDict 6
16
17/***************************************************************************
18 *
19 * Meta type definitions
20 *
21 ***************************************************************************/
22#define MP_CmtProtoIMP_Sint8                        65
23#define MP_CmtProtoIMP_Uint8                        67
24#define MP_CmtProtoIMP_Boolean                      68
25#define MP_CmtProtoIMP_LatinIdentifier              72
26#define MP_CmtProtoIMP_GreekIdentifier              76
27#define MP_CmtProtoIMP_CommonConstant               80
28
29#define MP_CmtProtoIMP_String                       36
30#define MP_CmtProtoIMP_Constant                     40
31#define MP_CmtProtoIMP_Identifier                   44
32
33#define MP_CmtProtoIMP_Sint32                       17
34#define MP_CmtProtoIMP_Uint32                       19
35#define MP_CmtProtoIMP_Real32                       18
36
37#define MP_CmtProtoIMP_ApInt                        9
38#define MP_CmtProtoIMP_ApReal                       10
39
40#define MP_CmtProtoIMP_Real64                       6
41
42#define MP_CmtProtoRecStruct   128
43#define MP_CmtProtoRecUnion    129
44
45/* Basic types, i.e. those which appear as a leaf of a data tree
46   have numerical values between 0 and 127 ,i.e. bit 8 is zero */
47#define IMP_IsBasicMetaType(type)    (!((type) & 128))
48
49/* native 8-bit types have numeric values between 64 and 127
50   i.e. bit 8 is zero and bit 7 is one */
51#define IMP_Is8BitNumericMetaType(type)    (!((type) & 128) && ((type) & 64))
52
53/* native String-based types have numeric values between 32 an 63,
54   i.e. bit 8,7 are zero, bit 6 is one */
55#define IMP_IsStringBasedMetaType(type)  (!((type) & 192) && ((type) & 32))
56
57/* native 32 bit types have numeric values beween 16 and 31, i.e. bits
58   8,7,6, are zero, bit 5 is one. Furthermore, integers have bit 1 set
59   to 1 and Reals have bit 1 set to 0 */
60#define IMP_Is32BitNumericMetaType(type)    (!((type) & 224) && ((type) & 16))
61#define IMP_Is16BitNumericMetaType(type) 0
62/* Ap Numbers have bit 5-8 set to zero, bit 4 set to one */
63#define IMP_IsApNumberMetaType(type) (!((type) & 240) && ((type) & 8))
64
65/* Native 64-bit numbers have bit 4-8 set to zero, bit 3 set to one */
66#define IMP_Is64BitNumericMetaType(type)    (type == MP_CmtProtoIMP_Real64)
67
68/* Predicates for real and integers
69   Integers are odd numbers, reals are even numbers, not divisble by 4*/
70#define IMP_IsRealMetaType(type)   (IMP_IsBasicMetaType(type) &&    \
71                                 !((type) & 1) &&           \
72                                 ((type) >> 1) & 1)
73#define IMP_IsIntegerMetaType(type)(IMP_IsBasicMetaType(type) && ((type) & 1))
74
75/***************************************************************************
76 *
77 * Common Operator Definitions
78 *
79 ***************************************************************************/
80#define MP_CopProtoStruct                1
81#define MP_CopProtoUnion                 2
82#define MP_CopProtoArray                 3
83#define MP_CopProtoPointer               4
84#define MP_CopProtoRecStruct             5
85#define MP_CopProtoRecUnion              6
86
87/***************************************************************************
88 *
89 * Definition of Annots
90 *
91 ***************************************************************************/
92#define MP_AnnotProtoPrototype           1
93
94#endif /* _MP_ProtoDict_h */
Note: See TracBrowser for help on using the repository browser.