# define _HIGHEST_REGCOMP_DOT_H_SYNC _CC_VERTSPACE
/* The members of the third group below do not need to be coordinated with data
- * structures in regcomp.[ch] and regexec.c. But they should be added to
- * bootstrap_ctype() */
+ * structures in regcomp.[ch] and regexec.c. */
# define _CC_IDFIRST 17
# define _CC_CHARNAME_CONT 18
# define _CC_NONLATIN1_FOLD 19
# else /* ! DOINIT */
EXTCONST U32 PL_charclass[];
# endif
-#endif /* Has perl.h */
-
-#if defined(H_PERL) && ! defined(BOOTSTRAP_CHARSET)
/* The 1U keeps Solaris from griping when shifting sets the uppermost bit */
# define _CC_mask(classnum) (1U << (classnum))
_generic_isCC(c, _CC_NON_FINAL_FOLD)
# define _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) \
_generic_isCC(c, _CC_IS_IN_SOME_FOLD)
-#else /* Either don't have perl.h or don't want to use char_class_tab.h */
+#else /* else we don't have perl.h */
/* If we don't have perl.h, we are compiling a utility program. Below we
* hard-code various macro definitions that wouldn't otherwise be available
- * to it. We can also get here if we are configured to bootstrap up Perl
- * on a non-ASCII platform that doesn't have a working Perl (currently only
- * EBCDIC). For these we currently use the native definitions to get
- * things going. (It should also be possible to use the translation
- * function NATIVE_TO_LATIN1(), but that is an extra layer of dependence on
- * Perl, so it is currently avoided for the macros where it's possible to
- * do so.) */
+ * to it. */
# ifdef EBCDIC
/* Use the native functions. They likely will return false for all
* non-ASCII values, but this makes sure */
|| ((c) >= 'a' && (c) <= 'f') \
|| ((c) <= 'F' && (c) >= 'A'))
- /* The _L1 macros may be unnecessary for both the utilities and for
- * bootstrapping; I (khw) added them during debugging of bootstrapping, and
- * it seems best to keep them. */
+ /* The _L1 macros may be unnecessary for the utilities; I (khw) added them
+ * during debugging, and it seems best to keep them. */
# define isPSXSPC_A(c) isSPACE_A(c) /* XXX Assumes SPACE matches '\v' */
# define isALPHA_L1(c) (isUPPER_L1(c) || isLOWER_L1(c))
# define isALPHANUMERIC_L1(c) (isALPHA_L1(c) || isDIGIT_A(c))
(FITS_IN_8_BITS(c) && S_bootstrap_ctype((U8) (c), (classnum), TRUE))
# define _generic_isCC_A(c, classnum) \
(FITS_IN_8_BITS(c) && S_bootstrap_ctype((U8) (c), (classnum), FALSE))
-#endif /* End of no perl.h or have BOOTSTRAP_CHARSET */
+#endif /* End of no perl.h */
#define isALPHANUMERIC(c) isALPHANUMERIC_A(c)
#define isALPHA(c) isALPHA_A(c)
#pragma clang diagnostic pop
#endif
-#ifdef BOOTSTRAP_CHARSET
-static bool
-S_bootstrap_ctype(U8 character, UV classnum, bool full_Latin1)
-{
- /* See comments in handy.h. This is placed in this file primarily to avoid
- * having to have an entry for it in embed.fnc */
-
- dTHX;
-
- if (! full_Latin1 && ! isASCII(character)) {
- return FALSE;
- }
-
- switch (classnum) {
- case _CC_ALPHANUMERIC: return isALPHANUMERIC_L1(character);
- case _CC_ALPHA: return isALPHA_L1(character);
- case _CC_ASCII: return isASCII_L1(character);
- case _CC_BLANK: return isBLANK_L1(character);
- case _CC_CASED: return isLOWER_L1(character)
- || isUPPER_L1(character);
- case _CC_CNTRL: return isCNTRL_L1(character);
- case _CC_DIGIT: return isDIGIT_L1(character);
- case _CC_GRAPH: return isGRAPH_L1(character);
- case _CC_LOWER: return isLOWER_L1(character);
- case _CC_PRINT: return isPRINT_L1(character);
- case _CC_PSXSPC: return isPSXSPC_L1(character);
- case _CC_PUNCT: return isPUNCT_L1(character);
- case _CC_SPACE: return isSPACE_L1(character);
- case _CC_UPPER: return isUPPER_L1(character);
- case _CC_WORDCHAR: return isWORDCHAR_L1(character);
- case _CC_XDIGIT: return isXDIGIT_L1(character);
- case _CC_VERTSPACE: return isSPACE_L1(character) && ! isBLANK_L1(character);
- case _CC_IDFIRST: return isIDFIRST_L1(character);
- case _CC_QUOTEMETA: return _isQUOTEMETA(character);
- case _CC_CHARNAME_CONT: return isCHARNAME_CONT(character);
- case _CC_NONLATIN1_FOLD: return _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(character);
- case _CC_NON_FINAL_FOLD: return _IS_NON_FINAL_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(character);
- case _CC_IS_IN_SOME_FOLD: return _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(character);
- case _CC_BACKSLASH_FOO_LBRACE_IS_META: return 0;
-
-
- default: break;
- }
- Perl_croak(aTHX_ "panic: bootstrap_ctype() has an unexpected character class '%" UVxf "'", classnum);
-}
-#endif
-
/* ------------------------------- utf8.h ------------------------------- */
PERL_STATIC_INLINE void