📄 bld.c
字号:
#endif#if FFETARGET_okCHARACTER1 case FFEBLD_constCHARACTER1: return ffetarget_iszero_character1 (ffebld_constant_character1 (c));#endif#if FFETARGET_okCHARACTER2 || FFETARGET_okCHARACTER3 /* ... */#error "no support for these!!"#endif case FFEBLD_constHOLLERITH: return ffetarget_iszero_hollerith (ffebld_constant_hollerith (c)); case FFEBLD_constBINARY_MIL: case FFEBLD_constBINARY_VXT: case FFEBLD_constOCTAL_MIL: case FFEBLD_constOCTAL_VXT: case FFEBLD_constHEX_X_MIL: case FFEBLD_constHEX_X_VXT: case FFEBLD_constHEX_Z_MIL: case FFEBLD_constHEX_Z_VXT: return ffetarget_iszero_typeless (ffebld_constant_typeless (c)); default: return FALSE; }}/* ffebld_constant_new_character1 -- Return character1 constant object from token See prototype. */#if FFETARGET_okCHARACTER1ffebldConstantffebld_constant_new_character1 (ffelexToken t){ ffetargetCharacter1 val; ffetarget_character1 (&val, t, ffebld_constant_pool()); return ffebld_constant_new_character1_val (val);}#endif/* ffebld_constant_new_character1_val -- Return an character1 constant object See prototype. */#if FFETARGET_okCHARACTER1ffebldConstantffebld_constant_new_character1_val (ffetargetCharacter1 val){ ffebldConstant c; ffebldConstant nc; int cmp; ffetarget_verify_character1 (ffebld_constant_pool(), val); for (c = (ffebldConstant) &ffebld_constant_character1_; c->next != NULL; c = c->next) { malloc_verify_kp (ffebld_constant_pool(), c->next, sizeof (*(c->next))); ffetarget_verify_character1 (ffebld_constant_pool(), ffebld_constant_character1 (c->next)); cmp = ffetarget_cmp_character1 (val, ffebld_constant_character1 (c->next)); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constCHARACTER1", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constCHARACTER1; nc->u.character1 = val;#ifdef FFECOM_constantHOOK nc->hook = FFECOM_constantNULL;#endif c->next = nc; return nc;}#endif/* ffebld_constant_new_complex1 -- Return complex1 constant object from token See prototype. */#if FFETARGET_okCOMPLEX1ffebldConstantffebld_constant_new_complex1 (ffebldConstant real, ffebldConstant imaginary){ ffetargetComplex1 val; val.real = ffebld_constant_real1 (real); val.imaginary = ffebld_constant_real1 (imaginary); return ffebld_constant_new_complex1_val (val);}#endif/* ffebld_constant_new_complex1_val -- Return a complex1 constant object See prototype. */#if FFETARGET_okCOMPLEX1ffebldConstantffebld_constant_new_complex1_val (ffetargetComplex1 val){ ffebldConstant c; ffebldConstant nc; int cmp; for (c = (ffebldConstant) &ffebld_constant_complex1_; c->next != NULL; c = c->next) { cmp = ffetarget_cmp_real1 (val.real, ffebld_constant_complex1 (c->next).real); if (cmp == 0) cmp = ffetarget_cmp_real1 (val.imaginary, ffebld_constant_complex1 (c->next).imaginary); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constCOMPLEX1", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constCOMPLEX1; nc->u.complex1 = val;#ifdef FFECOM_constantHOOK nc->hook = FFECOM_constantNULL;#endif c->next = nc; return nc;}#endif/* ffebld_constant_new_complex2 -- Return complex2 constant object from token See prototype. */#if FFETARGET_okCOMPLEX2ffebldConstantffebld_constant_new_complex2 (ffebldConstant real, ffebldConstant imaginary){ ffetargetComplex2 val; val.real = ffebld_constant_real2 (real); val.imaginary = ffebld_constant_real2 (imaginary); return ffebld_constant_new_complex2_val (val);}#endif/* ffebld_constant_new_complex2_val -- Return a complex2 constant object See prototype. */#if FFETARGET_okCOMPLEX2ffebldConstantffebld_constant_new_complex2_val (ffetargetComplex2 val){ ffebldConstant c; ffebldConstant nc; int cmp; for (c = (ffebldConstant) &ffebld_constant_complex2_; c->next != NULL; c = c->next) { cmp = ffetarget_cmp_real2 (val.real, ffebld_constant_complex2 (c->next).real); if (cmp == 0) cmp = ffetarget_cmp_real2 (val.imaginary, ffebld_constant_complex2 (c->next).imaginary); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constCOMPLEX2", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constCOMPLEX2; nc->u.complex2 = val;#ifdef FFECOM_constantHOOK nc->hook = FFECOM_constantNULL;#endif c->next = nc; return nc;}#endif/* ffebld_constant_new_hollerith -- Return hollerith constant object from token See prototype. */ffebldConstantffebld_constant_new_hollerith (ffelexToken t){ ffetargetHollerith val; ffetarget_hollerith (&val, t, ffebld_constant_pool()); return ffebld_constant_new_hollerith_val (val);}/* ffebld_constant_new_hollerith_val -- Return an hollerith constant object See prototype. */ffebldConstantffebld_constant_new_hollerith_val (ffetargetHollerith val){ ffebldConstant c; ffebldConstant nc; int cmp; for (c = (ffebldConstant) &ffebld_constant_hollerith_; c->next != NULL; c = c->next) { cmp = ffetarget_cmp_hollerith (val, ffebld_constant_hollerith (c->next)); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constHOLLERITH", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constHOLLERITH; nc->u.hollerith = val;#ifdef FFECOM_constantHOOK nc->hook = FFECOM_constantNULL;#endif c->next = nc; return nc;}/* ffebld_constant_new_integer1 -- Return integer1 constant object from token See prototype. Parses the token as a decimal integer constant, thus it must be an FFELEX_typeNUMBER. */#if FFETARGET_okINTEGER1ffebldConstantffebld_constant_new_integer1 (ffelexToken t){ ffetargetInteger1 val; assert (ffelex_token_type (t) == FFELEX_typeNUMBER); ffetarget_integer1 (&val, t); return ffebld_constant_new_integer1_val (val);}#endif/* ffebld_constant_new_integer1_val -- Return an integer1 constant object See prototype. */#if FFETARGET_okINTEGER1ffebldConstantffebld_constant_new_integer1_val (ffetargetInteger1 val){ ffebldConstant c; ffebldConstant nc; int cmp; for (c = (ffebldConstant) &ffebld_constant_integer1_; c->next != NULL; c = c->next) { cmp = ffetarget_cmp_integer1 (val, ffebld_constant_integer1 (c->next)); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constINTEGER1", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constINTEGER1; nc->u.integer1 = val;#ifdef FFECOM_constantHOOK nc->hook = FFECOM_constantNULL;#endif c->next = nc; return nc;}#endif/* ffebld_constant_new_integer2_val -- Return an integer2 constant object See prototype. */#if FFETARGET_okINTEGER2ffebldConstantffebld_constant_new_integer2_val (ffetargetInteger2 val){ ffebldConstant c; ffebldConstant nc; int cmp; for (c = (ffebldConstant) &ffebld_constant_integer2_; c->next != NULL; c = c->next) { cmp = ffetarget_cmp_integer2 (val, ffebld_constant_integer2 (c->next)); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constINTEGER2", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constINTEGER2; nc->u.integer2 = val;#ifdef FFECOM_constantHOOK nc->hook = FFECOM_constantNULL;#endif c->next = nc; return nc;}#endif/* ffebld_constant_new_integer3_val -- Return an integer3 constant object See prototype. */#if FFETARGET_okINTEGER3ffebldConstantffebld_constant_new_integer3_val (ffetargetInteger3 val){ ffebldConstant c; ffebldConstant nc; int cmp; for (c = (ffebldConstant) &ffebld_constant_integer3_; c->next != NULL; c = c->next) { cmp = ffetarget_cmp_integer3 (val, ffebld_constant_integer3 (c->next)); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constINTEGER3", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constINTEGER3; nc->u.integer3 = val;#ifdef FFECOM_constantHOOK nc->hook = FFECOM_constantNULL;#endif c->next = nc; return nc;}#endif/* ffebld_constant_new_integer4_val -- Return an integer4 constant object See prototype. */#if FFETARGET_okINTEGER4ffebldConstantffebld_constant_new_integer4_val (ffetargetInteger4 val){ ffebldConstant c; ffebldConstant nc; int cmp; for (c = (ffebldConstant) &ffebld_constant_integer4_; c->next != NULL; c = c->next) { cmp = ffetarget_cmp_integer4 (val, ffebld_constant_integer4 (c->next)); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constINTEGER4", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constINTEGER4; nc->u.integer4 = val;#ifdef FFECOM_constantHOOK nc->hook = FFECOM_constantNULL;#endif c->next = nc; return nc;}#endif/* ffebld_constant_new_integerbinary -- Return binary constant object from token See prototype. Parses the token as a binary integer constant, thus it must be an FFELEX_typeNUMBER. */ffebldConstantffebld_constant_new_integerbinary (ffelexToken t){ ffetargetIntegerDefault val; assert ((ffelex_token_type (t) == FFELEX_typeNAME) || (ffelex_token_type (t) == FFELEX_typeNUMBER)); ffetarget_integerbinary (&val, t); return ffebld_constant_new_integerdefault_val (val);}/* ffebld_constant_new_integerhex -- Return hex constant object from token See prototype. Parses the token as a hex integer constant, thus it must be an FFELEX_typeNUMBER. */ffebldConstantffebld_constant_new_integerhex (ffelexToken t){ ffetargetIntegerDefault val; assert ((ffelex_token_type (t) == FFELEX_typeNAME) || (ffelex_token_type (t) == FFELEX_typeNUMBER)); ffetarget_integerhex (&val, t); return ffebld_constant_new_integerdefault_val (val);}/* ffebld_constant_new_integeroctal -- Return octal constant object from token See prototype. Parses the token as a octal integer constant, thus it must be an FFELEX_typeNUMBER. */ffebldConstantffebld_constant_new_integeroctal (ffelexToken t){ ffetargetIntegerDefault val; assert ((ffelex_token_type (t) == FFELEX_typeNAME) || (ffelex_token_type (t) == FFELEX_typeNUMBER)); ffetarget_integeroctal (&val, t); return ffebld_constant_new_integerdefault_val (val);}/* ffebld_constant_new_logical1 -- Return logical1 constant object from token See prototype. Parses the token as a decimal logical constant, thus it must be an FFELEX_typeNUMBER. */#if FFETARGET_okLOGICAL1ffebldConstantffebld_constant_new_logical1 (bool truth){ ffetargetLogical1 val; ffetarget_logical1 (&val, truth); return ffebld_constant_new_logical1_val (val);}#endif/* ffebld_constant_new_logical1_val -- Return a logical1 constant object See prototype. */#if FFETARGET_okLOGICAL1ffebldConstantffebld_constant_new_logical1_val (ffetargetLogical1 val){ ffebldConstant c; ffebldConstant nc; int cmp; for (c = (ffebldConstant) &ffebld_constant_logical1_; c->next != NULL; c = c->next) { cmp = ffetarget_cmp_logical1 (val, ffebld_constant_logical1 (c->next)); if (cmp == 0) return c->next; if (cmp > 0) break; } nc = malloc_new_kp (ffebld_constant_pool(), "FFEBLD_constLOGICAL1", sizeof (*nc)); nc->next = c->next; nc->consttype = FFEBLD_constLOGICAL1; nc->u.logical1 = val;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -