27
27
CorTypeAttr exptAttr;
28
28
CorManifestResourceFlags manresAttr;
29
29
double * float64;
30
- __int64 * int64;
31
- __int32 int32;
30
+ int64_t * int64;
31
+ int32_t int32;
32
32
char * string;
33
33
BinStr* binstr;
34
34
Labels* labels;
@@ -263,11 +263,11 @@ int32 : INT32_V { $$ = $1; }
263
263
;
264
264
265
265
int64 : INT64_V { $$ = $1 ; }
266
- | INT32_V { $$ = neg ? new __int64 ($1 ) : new __int64 ((unsigned )$1 ); }
266
+ | INT32_V { $$ = neg ? new int64_t ($1 ) : new int64_t ((unsigned )$1 ); }
267
267
;
268
268
269
269
float64 : FLOAT64 { $$ = $1 ; }
270
- | FLOAT32_ ' (' int32 ' )' { float f; *((__int32 *) (&f)) = $3 ; $$ = new double (f); }
270
+ | FLOAT32_ ' (' int32 ' )' { float f; *((int32_t *) (&f)) = $3 ; $$ = new double (f); }
271
271
| FLOAT64_ ' (' int64 ' )' { $$ = (double *) $3 ; }
272
272
;
273
273
@@ -1068,71 +1068,71 @@ ddItem : CHAR_ '*' '(' compQstring ')' { PASM->EmitDataStr
1068
1068
} else PASM->report ->error (" Out of memory emitting data block %d bytes\n " ,
1069
1069
sizeof (double )*$5 ); }
1070
1070
| INT64_ ' (' int64 ' )' ddItemCount
1071
- { __int64 * p = new (nothrow) __int64 [$5 ];
1071
+ { int64_t * p = new (nothrow) int64_t [$5 ];
1072
1072
if (p != NULL ) {
1073
1073
for (int i=0 ; i<$5 ; i++) p[i] = *($3 );
1074
- PASM->EmitData (p, sizeof (__int64 )*$5 ); delete $3 ; delete [] p;
1074
+ PASM->EmitData (p, sizeof (int64_t )*$5 ); delete $3 ; delete [] p;
1075
1075
} else PASM->report ->error (" Out of memory emitting data block %d bytes\n " ,
1076
- sizeof (__int64 )*$5 ); }
1076
+ sizeof (int64_t )*$5 ); }
1077
1077
| INT32_ ' (' int32 ' )' ddItemCount
1078
- { __int32 * p = new (nothrow) __int32 [$5 ];
1078
+ { int32_t * p = new (nothrow) int32_t [$5 ];
1079
1079
if (p != NULL ) {
1080
1080
for (int i=0 ; i<$5 ; i++) p[i] = $3 ;
1081
- PASM->EmitData (p, sizeof (__int32 )*$5 ); delete [] p;
1081
+ PASM->EmitData (p, sizeof (int32_t )*$5 ); delete [] p;
1082
1082
} else PASM->report ->error (" Out of memory emitting data block %d bytes\n " ,
1083
- sizeof (__int32 )*$5 ); }
1083
+ sizeof (int32_t )*$5 ); }
1084
1084
| INT16_ ' (' int32 ' )' ddItemCount
1085
- { __int16 i = (__int16 ) $3 ; FAIL_UNLESS (i == $3 , (" Value %d too big\n " , $3 ));
1086
- __int16 * p = new (nothrow) __int16 [$5 ];
1085
+ { int16_t i = (int16_t ) $3 ; FAIL_UNLESS (i == $3 , (" Value %d too big\n " , $3 ));
1086
+ int16_t * p = new (nothrow) int16_t [$5 ];
1087
1087
if (p != NULL ) {
1088
1088
for (int j=0 ; j<$5 ; j++) p[j] = i;
1089
- PASM->EmitData (p, sizeof (__int16 )*$5 ); delete [] p;
1089
+ PASM->EmitData (p, sizeof (int16_t )*$5 ); delete [] p;
1090
1090
} else PASM->report ->error (" Out of memory emitting data block %d bytes\n " ,
1091
- sizeof (__int16 )*$5 ); }
1091
+ sizeof (int16_t )*$5 ); }
1092
1092
| INT8_ ' (' int32 ' )' ddItemCount
1093
- { __int8 i = (__int8 ) $3 ; FAIL_UNLESS (i == $3 , (" Value %d too big\n " , $3 ));
1094
- __int8 * p = new (nothrow) __int8 [$5 ];
1093
+ { int8_t i = (int8_t ) $3 ; FAIL_UNLESS (i == $3 , (" Value %d too big\n " , $3 ));
1094
+ int8_t * p = new (nothrow) int8_t [$5 ];
1095
1095
if (p != NULL ) {
1096
1096
for (int j=0 ; j<$5 ; j++) p[j] = i;
1097
- PASM->EmitData (p, sizeof (__int8 )*$5 ); delete [] p;
1097
+ PASM->EmitData (p, sizeof (int8_t )*$5 ); delete [] p;
1098
1098
} else PASM->report ->error (" Out of memory emitting data block %d bytes\n " ,
1099
- sizeof (__int8 )*$5 ); }
1099
+ sizeof (int8_t )*$5 ); }
1100
1100
| FLOAT32_ ddItemCount { PASM->EmitData (NULL , sizeof (float )*$2 ); }
1101
1101
| FLOAT64_ ddItemCount { PASM->EmitData (NULL , sizeof (double )*$2 ); }
1102
- | INT64_ ddItemCount { PASM->EmitData (NULL , sizeof (__int64 )*$2 ); }
1103
- | INT32_ ddItemCount { PASM->EmitData (NULL , sizeof (__int32 )*$2 ); }
1104
- | INT16_ ddItemCount { PASM->EmitData (NULL , sizeof (__int16 )*$2 ); }
1105
- | INT8_ ddItemCount { PASM->EmitData (NULL , sizeof (__int8 )*$2 ); }
1102
+ | INT64_ ddItemCount { PASM->EmitData (NULL , sizeof (int64_t )*$2 ); }
1103
+ | INT32_ ddItemCount { PASM->EmitData (NULL , sizeof (int32_t )*$2 ); }
1104
+ | INT16_ ddItemCount { PASM->EmitData (NULL , sizeof (int16_t )*$2 ); }
1105
+ | INT8_ ddItemCount { PASM->EmitData (NULL , sizeof (int8_t )*$2 ); }
1106
1106
;
1107
1107
1108
1108
/* Default values declaration for fields, parameters and verbal form of CA blob description */
1109
1109
fieldSerInit : FLOAT32_ ' (' float64 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_R4);
1110
1110
float f = (float )(*$3 );
1111
- $$->appendInt32 (*((__int32 *)&f)); delete $3 ; }
1111
+ $$->appendInt32 (*((int32_t *)&f)); delete $3 ; }
1112
1112
| FLOAT64_ ' (' float64 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_R8);
1113
- $$->appendInt64 ((__int64 *)$3 ); delete $3 ; }
1113
+ $$->appendInt64 ((int64_t *)$3 ); delete $3 ; }
1114
1114
| FLOAT32_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_R4);
1115
1115
$$->appendInt32 ($3 ); }
1116
1116
| FLOAT64_ ' (' int64 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_R8);
1117
- $$->appendInt64 ((__int64 *)$3 ); delete $3 ; }
1117
+ $$->appendInt64 ((int64_t *)$3 ); delete $3 ; }
1118
1118
| INT64_ ' (' int64 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_I8);
1119
- $$->appendInt64 ((__int64 *)$3 ); delete $3 ; }
1119
+ $$->appendInt64 ((int64_t *)$3 ); delete $3 ; }
1120
1120
| INT32_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_I4);
1121
1121
$$->appendInt32 ($3 ); }
1122
1122
| INT16_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_I2);
1123
1123
$$->appendInt16 ($3 ); }
1124
1124
| INT8_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_I1);
1125
1125
$$->appendInt8 ($3 ); }
1126
1126
| UNSIGNED_ INT64_ ' (' int64 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_U8);
1127
- $$->appendInt64 ((__int64 *)$4 ); delete $4 ; }
1127
+ $$->appendInt64 ((int64_t *)$4 ); delete $4 ; }
1128
1128
| UNSIGNED_ INT32_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_U4);
1129
1129
$$->appendInt32 ($4 ); }
1130
1130
| UNSIGNED_ INT16_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_U2);
1131
1131
$$->appendInt16 ($4 ); }
1132
1132
| UNSIGNED_ INT8_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_U1);
1133
1133
$$->appendInt8 ($4 ); }
1134
1134
| UINT64_ ' (' int64 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_U8);
1135
- $$->appendInt64 ((__int64 *)$3 ); delete $3 ; }
1135
+ $$->appendInt64 ((int64_t *)$3 ); delete $3 ; }
1136
1136
| UINT32_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_U4);
1137
1137
$$->appendInt32 ($3 ); }
1138
1138
| UINT16_ ' (' int32 ' )' { $$ = new BinStr (); $$->appendInt8 (ELEMENT_TYPE_U2);
@@ -1154,8 +1154,8 @@ bytes : /* EMPTY */ { $$ = new BinStr()
1154
1154
| hexbytes { $$ = $1 ; }
1155
1155
;
1156
1156
1157
- hexbytes : HEXBYTE { __int8 i = (__int8 ) $1 ; $$ = new BinStr (); $$->appendInt8 (i); }
1158
- | hexbytes HEXBYTE { __int8 i = (__int8 ) $2 ; $$ = $1 ; $$->appendInt8 (i); }
1157
+ hexbytes : HEXBYTE { int8_t i = (int8_t ) $1 ; $$ = new BinStr (); $$->appendInt8 (i); }
1158
+ | hexbytes HEXBYTE { int8_t i = (int8_t ) $2 ; $$ = $1 ; $$->appendInt8 (i); }
1159
1159
;
1160
1160
1161
1161
/* Field/parameter initialization */
@@ -1257,21 +1257,21 @@ serInit : fieldSerInit { $$ = $1; }
1257
1257
1258
1258
f32seq : /* EMPTY */ { $$ = new BinStr (); }
1259
1259
| f32seq float64 { $$ = $1 ;
1260
- float f = (float ) (*$2 ); $$->appendInt32 (*((__int32 *)&f)); delete $2 ; }
1260
+ float f = (float ) (*$2 ); $$->appendInt32 (*((int32_t *)&f)); delete $2 ; }
1261
1261
| f32seq int32 { $$ = $1 ;
1262
1262
$$->appendInt32 ($2 ); }
1263
1263
;
1264
1264
1265
1265
f64seq : /* EMPTY */ { $$ = new BinStr (); }
1266
1266
| f64seq float64 { $$ = $1 ;
1267
- $$->appendInt64 ((__int64 *)$2 ); delete $2 ; }
1267
+ $$->appendInt64 ((int64_t *)$2 ); delete $2 ; }
1268
1268
| f64seq int64 { $$ = $1 ;
1269
- $$->appendInt64 ((__int64 *)$2 ); delete $2 ; }
1269
+ $$->appendInt64 ((int64_t *)$2 ); delete $2 ; }
1270
1270
;
1271
1271
1272
1272
i64seq : /* EMPTY */ { $$ = new BinStr (); }
1273
1273
| i64seq int64 { $$ = $1 ;
1274
- $$->appendInt64 ((__int64 *)$2 ); delete $2 ; }
1274
+ $$->appendInt64 ((int64_t *)$2 ); delete $2 ; }
1275
1275
;
1276
1276
1277
1277
i32seq : /* EMPTY */ { $$ = new BinStr (); }
0 commit comments