Mercurial > projects > ldc
annotate dmd2/idgen.c @ 1553:f55ca8a1598c
Value::getNameStart and Value::getNameLength were removed
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Thu, 23 Jul 2009 20:34:35 +0200 |
parents | 638d16625da2 |
children | e4f7b5d9c68a |
rev | line source |
---|---|
1452
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
1 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
2 // Compiler implementation of the D programming language |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
3 // Copyright (c) 1999-2008 by Digital Mars |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
4 // All Rights Reserved |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
5 // written by Walter Bright |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
6 // http://www.digitalmars.com |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
7 // License for redistribution is by either the Artistic License |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
8 // in artistic.txt, or the GNU General Public License in gnu.txt. |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
9 // See the included readme.txt for details. |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
10 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
11 // Program to generate string files in d data structures. |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
12 // Saves much tedious typing, and eliminates typo problems. |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
13 // Generates: |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
14 // id.h |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
15 // id.c |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
16 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
17 #include <stdio.h> |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
18 #include <stdlib.h> |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
19 #include <string.h> |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
20 #include <stdarg.h> |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
21 #include <assert.h> |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
22 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
23 struct Msgtable |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
24 { |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
25 const char *ident; // name to use in DMD source |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
26 const char *name; // name in D executable |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
27 }; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
28 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
29 Msgtable msgtable[] = |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
30 { |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
31 { "IUnknown" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
32 { "Object" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
33 { "object" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
34 { "max" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
35 { "min" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
36 { "This", "this" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
37 { "ctor", "__ctor" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
38 { "dtor", "__dtor" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
39 { "cpctor", "__cpctor" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
40 { "_postblit", "__postblit" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
41 { "classInvariant", "__invariant" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
42 { "unitTest", "__unitTest" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
43 { "init" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
44 { "size" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
45 { "__sizeof", "sizeof" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
46 { "alignof" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
47 { "mangleof" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
48 { "stringof" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
49 { "tupleof" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
50 { "length" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
51 { "remove" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
52 { "ptr" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
53 { "funcptr" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
54 { "dollar", "__dollar" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
55 { "offset" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
56 { "offsetof" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
57 { "ModuleInfo" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
58 { "ClassInfo" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
59 { "classinfo" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
60 { "typeinfo" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
61 { "outer" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
62 { "Exception" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
63 { "Throwable" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
64 { "withSym", "__withSym" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
65 { "result", "__result" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
66 { "returnLabel", "__returnLabel" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
67 { "delegate" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
68 { "line" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
69 { "empty", "" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
70 { "p" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
71 { "coverage", "__coverage" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
72 { "__vptr" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
73 { "__monitor" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
74 { "system" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
75 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
76 { "TypeInfo" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
77 { "TypeInfo_Class" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
78 { "TypeInfo_Interface" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
79 { "TypeInfo_Struct" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
80 { "TypeInfo_Enum" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
81 { "TypeInfo_Typedef" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
82 { "TypeInfo_Pointer" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
83 { "TypeInfo_Array" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
84 { "TypeInfo_StaticArray" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
85 { "TypeInfo_AssociativeArray" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
86 { "TypeInfo_Function" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
87 { "TypeInfo_Delegate" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
88 { "TypeInfo_Tuple" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
89 { "TypeInfo_Const" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
90 { "TypeInfo_Invariant" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
91 { "TypeInfo_Shared" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
92 { "elements" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
93 { "_arguments_typeinfo" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
94 { "_arguments" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
95 { "_argptr" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
96 { "_match" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
97 { "destroy" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
98 { "postblit" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
99 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
100 { "LINE", "__LINE__" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
101 { "FILE", "__FILE__" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
102 { "DATE", "__DATE__" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
103 { "TIME", "__TIME__" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
104 { "TIMESTAMP", "__TIMESTAMP__" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
105 { "VENDOR", "__VENDOR__" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
106 { "VERSIONX", "__VERSION__" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
107 { "EOFX", "__EOF__" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
108 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
109 { "nan" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
110 { "infinity" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
111 { "dig" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
112 { "epsilon" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
113 { "mant_dig" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
114 { "max_10_exp" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
115 { "max_exp" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
116 { "min_10_exp" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
117 { "min_exp" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
118 { "re" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
119 { "im" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
120 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
121 { "C" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
122 { "D" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
123 { "Windows" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
124 { "Pascal" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
125 { "System" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
126 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
127 { "exit" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
128 { "success" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
129 { "failure" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
130 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
131 { "keys" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
132 { "values" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
133 { "rehash" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
134 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
135 { "sort" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
136 { "reverse" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
137 { "dup" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
138 { "idup" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
139 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
140 // For inline assembler |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
141 { "___out", "out" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
142 { "___in", "in" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
143 { "__int", "int" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
144 { "__dollar", "$" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
145 { "__LOCAL_SIZE" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
146 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
147 // For operator overloads |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
148 { "uadd", "opPos" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
149 { "neg", "opNeg" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
150 { "com", "opCom" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
151 { "add", "opAdd" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
152 { "add_r", "opAdd_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
153 { "sub", "opSub" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
154 { "sub_r", "opSub_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
155 { "mul", "opMul" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
156 { "mul_r", "opMul_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
157 { "div", "opDiv" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
158 { "div_r", "opDiv_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
159 { "mod", "opMod" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
160 { "mod_r", "opMod_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
161 { "eq", "opEquals" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
162 { "cmp", "opCmp" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
163 { "iand", "opAnd" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
164 { "iand_r", "opAnd_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
165 { "ior", "opOr" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
166 { "ior_r", "opOr_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
167 { "ixor", "opXor" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
168 { "ixor_r", "opXor_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
169 { "shl", "opShl" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
170 { "shl_r", "opShl_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
171 { "shr", "opShr" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
172 { "shr_r", "opShr_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
173 { "ushr", "opUShr" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
174 { "ushr_r", "opUShr_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
175 { "cat", "opCat" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
176 { "cat_r", "opCat_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
177 { "assign", "opAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
178 { "addass", "opAddAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
179 { "subass", "opSubAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
180 { "mulass", "opMulAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
181 { "divass", "opDivAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
182 { "modass", "opModAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
183 { "andass", "opAndAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
184 { "orass", "opOrAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
185 { "xorass", "opXorAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
186 { "shlass", "opShlAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
187 { "shrass", "opShrAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
188 { "ushrass", "opUShrAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
189 { "catass", "opCatAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
190 { "postinc", "opPostInc" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
191 { "postdec", "opPostDec" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
192 { "index", "opIndex" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
193 { "indexass", "opIndexAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
194 { "slice", "opSlice" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
195 { "sliceass", "opSliceAssign" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
196 { "call", "opCall" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
197 { "cast", "opCast" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
198 { "match", "opMatch" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
199 { "next", "opNext" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
200 { "opIn" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
201 { "opIn_r" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
202 { "opStar" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
203 { "opDot" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
204 { "opImplicitCast" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
205 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
206 { "classNew", "new" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
207 { "classDelete", "delete" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
208 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
209 // For foreach |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
210 { "apply", "opApply" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
211 { "applyReverse", "opApplyReverse" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
212 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
213 #if 1 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
214 { "Fempty", "empty" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
215 { "Fhead", "front" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
216 { "Ftoe", "back" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
217 { "Fnext", "popFront" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
218 { "Fretreat", "popBack" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
219 #else |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
220 { "Fempty", "empty" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
221 { "Fhead", "head" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
222 { "Ftoe", "toe" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
223 { "Fnext", "next" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
224 { "Fretreat", "retreat" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
225 #endif |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
226 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
227 { "adDup", "_adDupT" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
228 { "adReverse", "_adReverse" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
229 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
230 // For internal functions |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
231 { "aaLen", "_aaLen" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
232 { "aaKeys", "_aaKeys" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
233 { "aaValues", "_aaValues" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
234 { "aaRehash", "_aaRehash" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
235 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
236 // For pragma's |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
237 { "GNU_asm" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
238 { "lib" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
239 { "msg" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
240 { "startaddress" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
241 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
242 #if IN_LLVM |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
243 // LDC pragma's |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
244 { "intrinsic" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
245 { "va_intrinsic" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
246 { "no_typeinfo" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
247 { "no_moduleinfo" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
248 { "Alloca", "alloca" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
249 { "vastart", "va_start" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
250 { "vacopy", "va_copy" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
251 { "vaend", "va_end" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
252 { "vaarg", "va_arg" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
253 { "ldc" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
254 { "allow_inline" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
255 { "llvm_inline_asm" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
256 #endif |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
257 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
258 // For special functions |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
259 { "tohash", "toHash" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
260 { "tostring", "toString" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
261 { "getmembers", "getMembers" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
262 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
263 // Special functions |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
264 #if IN_DMD |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
265 { "alloca" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
266 #endif |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
267 { "main" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
268 { "WinMain" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
269 { "DllMain" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
270 { "tls_get_addr", "___tls_get_addr" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
271 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
272 // Builtin functions |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
273 { "std" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
274 { "math" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
275 { "sin" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
276 { "cos" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
277 { "tan" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
278 { "_sqrt", "sqrt" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
279 { "fabs" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
280 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
281 // Traits |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
282 { "isAbstractClass" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
283 { "isArithmetic" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
284 { "isAssociativeArray" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
285 { "isFinalClass" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
286 { "isFloating" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
287 { "isIntegral" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
288 { "isScalar" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
289 { "isStaticArray" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
290 { "isUnsigned" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
291 { "isVirtualFunction" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
292 { "isAbstractFunction" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
293 { "isFinalFunction" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
294 { "hasMember" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
295 { "getMember" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
296 { "getVirtualFunctions" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
297 { "classInstanceSize" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
298 { "allMembers" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
299 { "derivedMembers" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
300 { "isSame" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
301 { "compiles" }, |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
302 }; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
303 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
304 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
305 int main() |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
306 { |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
307 FILE *fp; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
308 unsigned i; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
309 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
310 { |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
311 fp = fopen("id.h","w"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
312 if (!fp) |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
313 { printf("can't open id.h\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
314 exit(EXIT_FAILURE); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
315 } |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
316 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
317 fprintf(fp, "// File generated by idgen.c\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
318 #if __DMC__ |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
319 fprintf(fp, "#pragma once\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
320 #endif |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
321 fprintf(fp, "#ifndef DMD_ID_H\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
322 fprintf(fp, "#define DMD_ID_H 1\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
323 fprintf(fp, "struct Identifier;\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
324 fprintf(fp, "struct Id\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
325 fprintf(fp, "{\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
326 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
327 for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
328 { const char *id = msgtable[i].ident; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
329 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
330 fprintf(fp," static Identifier *%s;\n", id); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
331 } |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
332 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
333 fprintf(fp, " static void initialize();\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
334 fprintf(fp, "};\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
335 fprintf(fp, "#endif\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
336 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
337 fclose(fp); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
338 } |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
339 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
340 { |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
341 fp = fopen("id.c","w"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
342 if (!fp) |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
343 { printf("can't open id.c\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
344 exit(EXIT_FAILURE); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
345 } |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
346 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
347 fprintf(fp, "// File generated by idgen.c\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
348 fprintf(fp, "#include \"id.h\"\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
349 fprintf(fp, "#include \"identifier.h\"\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
350 fprintf(fp, "#include \"lexer.h\"\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
351 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
352 for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
353 { const char *id = msgtable[i].ident; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
354 const char *p = msgtable[i].name; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
355 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
356 if (!p) |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
357 p = id; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
358 fprintf(fp,"Identifier *Id::%s;\n", id); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
359 } |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
360 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
361 fprintf(fp, "void Id::initialize()\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
362 fprintf(fp, "{\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
363 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
364 for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
365 { const char *id = msgtable[i].ident; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
366 const char *p = msgtable[i].name; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
367 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
368 if (!p) |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
369 p = id; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
370 fprintf(fp," %s = Lexer::idPool(\"%s\");\n", id, p); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
371 } |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
372 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
373 fprintf(fp, "}\n"); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
374 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
375 fclose(fp); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
376 } |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
377 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
378 return EXIT_SUCCESS; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
945
diff
changeset
|
379 } |