}\r
}\r
| OPEN_BRACKET D_MODULE slashed_name CLOSE_BRACKET slashed_name\r
+ {\r
+ if (codegen.IsThisModule ((string) $3)) {\r
+ $$ = new TypeRef ((string) $5, false, null);\r
+ } else {\r
+ $$ = codegen.ExternTable.GetModuleTypeRef ((string) $3, (string) $5, false);\r
+ }\r
+ }\r
| slashed_name\r
{\r
PrimitiveTypeRef prim = PrimitiveTypeRef.GetPrimitiveType ((string) $1);\r
;\r
\r
bound : /* EMPTY */\r
+ {\r
+ // This is shortref for no lowerbound or size\r
+ $$ = new DictionaryEntry (TypeRef.Ellipsis, TypeRef.Ellipsis);\r
+ }\r
| ELLIPSIS\r
{\r
// No lower bound or size\r
if ($2 != null) {\r
field_def.SetOffset ((uint) $2);\r
}\r
- \r
+\r
if ($6 != null) {\r
field_def.AddDataValue ((string) $6);\r
}\r
- \r
+\r
if ($7 != null) {\r
field_def.SetValue ((Constant) $7);\r
}\r
}\r
| K_FLOAT32 OPEN_PARENS float64 CLOSE_PARENS repeat_opt\r
{\r
- FloatConst float_const = new FloatConst ((float) $3);\r
+ double d = (double) $3;\r
+ FloatConst float_const = new FloatConst ((float) d);\r
\r
if ($5 != null)\r
$$ = new RepeatedConstant (float_const, (int) $5);\r
}\r
| K_INT16 OPEN_PARENS int32 CLOSE_PARENS repeat_opt\r
{\r
- IntConst int_const = new IntConst ((short) $3);\r
+ int i = (int) $3;\r
+ IntConst int_const = new IntConst ((short) i);\r
\r
if ($5 != null)\r
$$ = new RepeatedConstant (int_const, (int) $5);\r
}\r
| K_INT8 OPEN_PARENS int32 CLOSE_PARENS repeat_opt\r
{\r
- IntConst int_const = new IntConst ((sbyte) $3);\r
+ int i = (int) $3;\r
+ IntConst int_const = new IntConst ((sbyte) i);\r
\r
if ($5 != null)\r
$$ = new RepeatedConstant (int_const, (int) $5);\r
// assembly. This is not supported in the MS version of ilasm\r
}\r
| OPEN_BRACKET D_MODULE slashed_name CLOSE_BRACKET\r
+ {\r
+\r
+ }\r
| type\r
;\r
\r
;\r
\r
module_head : D_MODULE\r
+ {\r
+ }\r
| D_MODULE comp_name\r
+ {\r
+ codegen.SetModuleName ((string) $2);\r
+ }\r
| D_MODULE K_EXTERN comp_name\r
+ {\r
+ codegen.ExternTable.AddModule ((string) $3); \r
+ }\r
;\r
\r
file_decl : D_FILE file_attr comp_name file_entry D_HASH ASSIGN\r