void data_parameter(bool isStatic) { Expect(3); string name = t.val; TypeDescr type = new Runtime.BuildinType(); if (la.kind == 26) { data_type(out type); } Context.DefineField(name, type, isStatic); }
void buildintype(out Runtime.BuildinType type) { type = null; if (la.kind == 34 || la.kind == 35 || la.kind == 36) { fixlentype(out type); } else if (la.kind == 37 || la.kind == 38) { varlentype(out type); } else if (la.kind == 39) { packedtype(out type); } else { SynErr(51); } }
void packedtype(out Runtime.BuildinType aType) { aType = null; Expect(39); aType = new Runtime.BuildinType(Runtime.InternalType.p); if (la.kind == 27) { Get(); Expect(1); aType.setLength(Convert.ToInt32(t.val)); } if (la.kind == 28) { Get(); Expect(1); } if (la.kind == 29) { Get(); } }
void fixlentype(out Runtime.BuildinType aType) { aType = null; if (la.kind == 34) { Get(); aType = new Runtime.BuildinType(Runtime.InternalType.i); } else if (la.kind == 35) { Get(); aType = new Runtime.BuildinType(Runtime.InternalType.d); } else if (la.kind == 36) { Get(); aType = new Runtime.BuildinType(Runtime.InternalType.t); } else { SynErr(54); } }
void varlentype(out Runtime.BuildinType aType) { aType = null; if (la.kind == 37) { Get(); aType = new Runtime.BuildinType(Runtime.InternalType.c); } else if (la.kind == 38) { Get(); aType = new Runtime.BuildinType(Runtime.InternalType.n); } else { SynErr(55); } if (la.kind == 27) { Get(); Expect(1); aType.setLength(Convert.ToInt32(t.val)); } }
void varlentype(out Runtime.BuildinType aType) { aType = null; if (la.kind == 37) { Get(); aType = new Runtime.BuildinType( Runtime.InternalType.c ); } else if (la.kind == 38) { Get(); aType = new Runtime.BuildinType( Runtime.InternalType.n ); } else SynErr(55); if (la.kind == 27) { Get(); Expect(1); aType.setLength ( Convert.ToInt32(t.val) ); } }
void packedtype(out Runtime.BuildinType aType) { aType = null; Expect(39); aType = new Runtime.BuildinType( Runtime.InternalType.p ); if (la.kind == 27) { Get(); Expect(1); aType.setLength( Convert.ToInt32(t.val) ); } if (la.kind == 28) { Get(); Expect(1); } if (la.kind == 29) { Get(); } }
void fixlentype(out Runtime.BuildinType aType) { aType = null; if (la.kind == 34) { Get(); aType = new Runtime.BuildinType( Runtime.InternalType.i ); } else if (la.kind == 35) { Get(); aType = new Runtime.BuildinType( Runtime.InternalType.d ); } else if (la.kind == 36) { Get(); aType = new Runtime.BuildinType( Runtime.InternalType.t ); } else SynErr(54); }