4
ERROR Falsche Parameteranzahl: Syntax aisc xxx.pa xxx.aisc outfile
2
ERROR Wrong number of parameters[$(argc)]. Usage: aisc aisc_com.pa xxx.aisc outfile
7
5
DATA AISC { $(#FILE $(argv[2])) };
6
DUMPDATA DUMP/aisc_com.pa__$(argv[2]).dump
9
9
MOVETO $(AISC/PROJECT)
30
P /*********************************************************************
31
P * Created automagically from $(argv[2])
32
P * using aisc-script 'aisc_com.pa'
14
P /* -----------------------------------------------------------------
15
P * Created automagically from ../$(argv[2])
16
P * using aisc-script '../AISC/aisc_com.pa'
33
17
P * DO NOT EDIT THIS FILE!!!
34
P *********************************************************************/$n
18
P * ----------------------------------------------------------------- */$n
23
P #ifndef AISC_GLOBAL_H
24
P #include <aisc_global.h>
36
27
P #ifndef AISC_MAX_OBJECT
37
P #define AISC_MAX_OBJECT $(MAX_OBJECT)
38
P #define AISC_MAX_ATTR $(MAX_KEY)
39
P #define MAX_AISC_SET_GET $(MAX_PAR_CNT)
40
P #define AISC_MAX_STRING_LEN $(MAX_STRING_LEN)
41
P #define AISC_MESSAGE_BUFFER_LEN ((AISC_MAX_STRING_LEN/4+3)*($(MAX_PAR_CNT)+2))
42
P #define AISC_MAGIC_NUMBER $(MAGIC_NUMBER)00
44
P $ntypedef struct struct_aisc_com {
46
P $1int$2message_type;
48
P $1int$2*message_queue;
50
P $1char$2*error;$n} aisc_com;
52
P #ifndef _AISC_BYTESTRING
53
P #define _AISC_BYTESTRING
54
P $ntypedef struct struct_bytestring {
56
P $1int$2size;$n} bytestring;
61
P const int $1AISC_GET$3= (int)AISC_MAGIC_NUMBER$6+ 0;
62
P const int $1AISC_SET$3= (int)AISC_MAGIC_NUMBER$6+ 1;
63
P const int $1AISC_NSET$3= (int)AISC_MAGIC_NUMBER$6+ 2;
64
P const int $1AISC_CREATE$3= (int)AISC_MAGIC_NUMBER$6+ 3;
65
P const int $1AISC_FIND$3= (int)AISC_MAGIC_NUMBER$6+ 4;
66
P const int $1AISC_COPY$3= (int)AISC_MAGIC_NUMBER$6+ 5;
67
P const int $1AISC_DELETE$3= (int)AISC_MAGIC_NUMBER$6+ 6;
68
P const int $1AISC_INIT$3= (int)AISC_MAGIC_NUMBER$6+ 7;
69
P const int $1AISC_DEBUG_INFO$3= (int)AISC_MAGIC_NUMBER$6+ 8;
71
P $nenum aisc_command_list {
72
P $1AISC_GET$3= AISC_MAGIC_NUMBER$6+ 0,
73
P $1AISC_SET$3= AISC_MAGIC_NUMBER$6+ 1,
74
P $1AISC_NSET$3= AISC_MAGIC_NUMBER$6+ 2,
75
P $1AISC_CREATE$3= AISC_MAGIC_NUMBER$6+ 3,
76
P $1AISC_FIND$3= AISC_MAGIC_NUMBER$6+ 4,
77
P $1AISC_COPY$3= AISC_MAGIC_NUMBER$6+ 5,
78
P $1AISC_DELETE$3= AISC_MAGIC_NUMBER$6+ 6,
79
P $1AISC_INIT$3= AISC_MAGIC_NUMBER$6+ 7,
80
P $1AISC_DEBUG_INFO$3= AISC_MAGIC_NUMBER$6+ 8,
85
P const int $1AISC_CCOM_OK$3= AISC_MAGIC_NUMBER$6+ 0;
86
P const int $1AISC_CCOM_ERROR$3= AISC_MAGIC_NUMBER$6+ 1;
87
P const int $1AISC_CCOM_MESSAGE$3= AISC_MAGIC_NUMBER$6+ 2;
89
P $nenum aisc_client_command_list {
90
P AISC_CCOM_OK$3= AISC_MAGIC_NUMBER$6+ 0,
91
P AISC_CCOM_ERROR$3= AISC_MAGIC_NUMBER$6+ 1,
92
P AISC_CCOM_MESSAGE$3= AISC_MAGIC_NUMBER$6+ 2,
99
CREATE $(my_attribute[$(ENUM)]) $(OBJECT_KEY)_ATTR_$(SKEY)
101
# P typedef enum enum_$(ENUM) {
104
# P $2$(VAR)$3=$4 $(VAL),$\
118
P typedef long T_$(OBJECT_KEY)_$(SKEY);
122
P #define $(OBJECT_KEY)_ATTR_INT(a,b)$6( (a+b) | 0x1000000 )
125
P #define $(OBJECT_KEY)_ATTR_$(SKEY)(a,b)$6( (a+b) | 0x1000000 )
129
P #define $(OBJECT_KEY)_ATTR_DOUBLE(a,b)$6( (a+b) | 0x2000000 )
130
P #define $(OBJECT_KEY)_ATTR_STRING(a,b)$6( (a+b) | 0x3000000 )
28
P # define AISC_MAX_OBJECT $(MAX_OBJECT)
29
P # define AISC_MAX_ATTR $(MAX_KEY)
30
P # define MAX_AISC_SET_GET $(MAX_PAR_CNT)
31
P # define AISC_MAX_STRING_LEN $(MAX_STRING_LEN)
32
P # define AISC_MESSAGE_BUFFER_LEN ((AISC_MAX_STRING_LEN/4+3)*($(MAX_PAR_CNT)+2))
33
P # define AISC_MAGIC_NUMBER $(MAGIC_NUMBER)00
37
P const int AISC_GET $|= AISC_MAGIC_NUMBER+0;
38
P const int AISC_SET $|= AISC_MAGIC_NUMBER+1;
39
P const int AISC_NSET $|= AISC_MAGIC_NUMBER+2;
40
P const int AISC_CREATE $|= AISC_MAGIC_NUMBER+3;
41
P const int AISC_FIND $|= AISC_MAGIC_NUMBER+4;
42
P const int AISC_COPY $|= AISC_MAGIC_NUMBER+5;
43
P const int AISC_DELETE $|= AISC_MAGIC_NUMBER+6;
44
P const int AISC_INIT $|= AISC_MAGIC_NUMBER+7;
45
P const int AISC_DEBUG_INFO $|= AISC_MAGIC_NUMBER+8;
47
P const int AISC_CCOM_OK $|= AISC_MAGIC_NUMBER+0;
48
P const int AISC_CCOM_ERROR $|= AISC_MAGIC_NUMBER+1;
49
P const int AISC_CCOM_MESSAGE $|= AISC_MAGIC_NUMBER+2;
55
CREATE $(my_attribute[$(ENUM)]) $(OBJECT_KEY)_ATTR_$(SKEY)
59
P #define $(OBJECT_KEY)_ATTR_INT(a,b) $|(((a)+(b))|0x1000000)
62
P #define $(OBJECT_KEY)_ATTR_$(SKEY)(a,b) $|(((a)+(b))|0x1000000)
65
P #define $(OBJECT_KEY)_ATTR_DOUBLE(a,b) $|(((a)+(b))|0x2000000)
66
P #define $(OBJECT_KEY)_ATTR_STRING(a,b) $|(((a)+(b))|0x3000000)
131
67
CREATE $(my_attribute[char]) $(OBJECT_KEY)_ATTR_INT
132
68
CREATE $(my_attribute[int]) $(OBJECT_KEY)_ATTR_INT
133
69
CREATE $(my_attribute[func]) $(OBJECT_KEY)_ATTR_INT
137
73
CREATE $(my_attribute[aisc_string]) $(OBJECT_KEY)_ATTR_STRING
138
74
CREATE $(my_attribute[bytestring]) $(OBJECT_KEY)_ATTR_BYTES
78
P #define $(OBJECT_KEY)_ATTR_$(SKEY)(a,b) $|(((a)+(b))|0x4000000)
79
CREATE $(my_attribute[$(STRUCT)]) $(OBJECT_KEY)_ATTR_$(SKEY)
82
P #define $(OBJECT_KEY)_ATTR_BYTES(a,b) $|(((a)+(b))|0x5000000)
84
P enum Aisc_Object_Type {
142
P #define $(OBJECT_KEY)_ATTR_$(SKEY)(a,b)$6( (a+b) | 0x4000000 )
143
CREATE $(my_attribute[$(STRUCT)]) $(OBJECT_KEY)_ATTR_$(SKEY)
89
P $(OBJECT_KEY)_$(SKEY) $|= 0x10000*$(SKEYC),
146
P #define $(OBJECT_KEY)_ATTR_BYTES(a,b)$6( (a+b) | 0x5000000 )
148
P $n$ntypedef enum Attributes_Header_List {
92
P $(OBJECT_KEY)_MAX $|= 0x10000*$(MAX_OBJECT),
93
P $(OBJECT_KEY)_INDEX $|= 0x10000*0x1ff
152
P $1$(OBJECT_KEY)_$(SKEY)$5=$6$(SKEYC)*0x10000,
100
P struct T_$(OBJECT_KEY)_$(SKEY) : public AISC_Object {
102
P T_$(OBJECT_KEY)_$(SKEY)() : AISC_Object($(OBJECT_KEY)_$(SKEY)) {}
103
P void assign(const T_$(OBJECT_KEY)_$(SKEY)& o) { set(o.type(), o.get()); }
155
P $1$(OBJECT_KEY)_MAX$5=$6$(MAX_OBJECT)*0x10000,
156
P $1$(OBJECT_KEY)_INDEX$5=$60x1ff0000
157
P } Aisc_Objekt_Type;$n$n
163
114
CREATE $(struct) 0
170
P /************$2$(SKEY)$4*************/
174
SET $(struct) $(STRUCT)
175
CALL struct_attr,0,$1$(SKEY)_,/*
178
P $1$(SKEY)_LASTATTR$4= 0
179
P } $(OBJECT_KEY)_$(SKEY)_Attribute;$n
122
P enum $(OBJECT_KEY)_$(SKEY)_Attribute { // $(SKEY)
126
SET $(struct) $(STRUCT)
127
CALL insert_struct_attributes,0,$(SKEY)_,//
130
P $(SKEY)_FORCELONG $|= LONG_MAX
188
FUNCTION struct_attr,a,s,c
193
P $(my_attribute[$(struct)])$\
194
P $6($(OBJECT_KEY)_$(skey),$8$(+ $(a)+$(KEYC))),$9/* DO */
196
P $(my_attribute[$(struct)])$\
197
P $6($(OBJECT_KEY)_$(skey),$8$(+ 1+$(+ $(a)+$(KEYC)))),$9$(c) */
199
SET $(add) $(+ $(a)+$(KEYC))
200
SET $(add) $(+ 2+$(add))
201
SET $(str) $(s)$(KEY)
203
MOVETO $(/AISC/DATA/STRUCT.dll_header)
204
CALL struct_attr,$(add),$(str),$(c) H
208
SET $(add) $(+ $(a),$(KEYC))
209
SET $(str) $(s)$(KEY)
212
MOVETO $(/AISC/DATA/STRUCT.$(TYPE))
213
CALL struct_attr,$(add),$(str),$(com)
219
SET $(com) $(c) [$(SIZE)]
222
ELSEIF $(TYPE) = func
227
IF $(my_attribute[$(TYPE)])
229
P $(my_attribute[$(TYPE)])$\
230
P $6($(OBJECT_KEY)_$(skey),$8$(+ $(a)+$(KEYC))),$9$(com) */
232
ERROR TYPE $(TYPE) unknown, no key build
235
P $(s)$(KEY)_CNT$4= $\
236
P $(my_attribute[int])$\
237
P $6($(OBJECT_KEY)_$(skey),$8$(+ 1,$(+ $(a)+$(KEYC)))),$9$(com) */
142
FUNCTION insert_struct_attributes,a,s,c
147
P $(my_attribute[$(struct)])$\
148
P $|($(OBJECT_KEY)_$(skey), $(+ $(a)+$(KEYC))), $|// DO
151
P $(my_attribute[$(struct)])$\
152
P $|($(OBJECT_KEY)_$(skey), $(+ 1+$(+ $(a)+$(KEYC)))), $|$(c)
154
SET $(add) $(+ $(a)+$(KEYC))
155
SET $(add) $(+ 2+$(add))
156
SET $(str) $(s)$(KEY)
158
MOVETO $(/AISC/DATA/STRUCT.dll_header)
159
CALL insert_struct_attributes,$(add),$(str),$(c) H
162
SET $(add) $(+ $(a),$(KEYC))
163
SET $(str) $(s)$(KEY)
166
MOVETO $(/AISC/DATA/STRUCT.$(TYPE))
167
CALL insert_struct_attributes,$(add),$(str),$(com)
173
SET $(com) $(c) [$(SIZE)]
176
ELSEIF $(TYPE) = func
181
IF $(my_attribute[$(TYPE)])
183
P $(my_attribute[$(TYPE)])$\
184
P $|($(OBJECT_KEY)_$(skey), $(+ $(a)+$(KEYC))), $|$(com)
186
ERROR TYPE $(TYPE) unknown, no key build
189
P $(s)$(KEY)_CNT $|= $\
190
P $(my_attribute[int])$\
191
P $|($(OBJECT_KEY)_$(skey), $(+ 1,$(+ $(a)+$(KEYC)))), $|$(com)