STATIC bool
S_grok_bslash_o(pTHX_ char **s, UV *uv, const char** error_msg,
const bool output_warning, const bool strict,
+ const bool silence_non_portable,
const bool UTF)
{
* them
* strict is true if this should fail instead of warn if there are
* non-octal digits within the braces
+ * silence_non_portable is true if to suppress warnings about the code
+ * point returned being too large to fit on all platforms.
* UTF is true iff the string *s is encoded in UTF-8.
*/
char* e;
return FALSE;
}
+ if (silence_non_portable) {
+ flags |= PERL_SCAN_SILENT_NON_PORTABLE;
+ }
+
*uv = grok_oct(*s, &numbers_len, &flags, NULL);
/* Note that if has non-octal, will ignore everything starting with that up
* to the '}' */
PERL_STATIC_INLINE bool
S_grok_bslash_x(pTHX_ char **s, UV *uv, const char** error_msg,
const bool output_warning, const bool strict,
+ const bool silence_non_portable,
const bool UTF)
{
}
flags |= PERL_SCAN_ALLOW_UNDERSCORES;
+ if (silence_non_portable) {
+ flags |= PERL_SCAN_SILENT_NON_PORTABLE;
+ }
*uv = grok_hex(*s, &numbers_len, &flags, NULL);
/* Note that if has non-hex, will ignore everything starting with that up
Apd |UV |grok_bin |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
EMsR |char |grok_bslash_c |const char source|const bool utf8|const bool output_warning
-EMsR |bool |grok_bslash_o |NN char** s|NN UV* uv \
- |NN const char** error_msg \
- |const bool output_warning \
- |const bool strict|const bool utf8
-EMiR |bool |grok_bslash_x |NN char** s|NN UV* uv \
- |NN const char** error_msg \
- |const bool output_warning \
- |const bool strict|const bool utf8
+EMsR |bool |grok_bslash_o |NN char** s|NN UV* uv \
+ |NN const char** error_msg \
+ |const bool output_warning \
+ |const bool strict \
+ |const bool silence_non_portable \
+ |const bool utf8
+EMiR |bool |grok_bslash_x |NN char** s|NN UV* uv \
+ |NN const char** error_msg \
+ |const bool output_warning \
+ |const bool strict \
+ |const bool silence_non_portable \
+ |const bool utf8
#endif
Apd |UV |grok_hex |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
Apd |int |grok_number |NN const char *pv|STRLEN len|NULLOK UV *valuep
# endif
# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
#define grok_bslash_c(a,b,c) S_grok_bslash_c(aTHX_ a,b,c)
-#define grok_bslash_o(a,b,c,d,e,f) S_grok_bslash_o(aTHX_ a,b,c,d,e,f)
-#define grok_bslash_x(a,b,c,d,e,f) S_grok_bslash_x(aTHX_ a,b,c,d,e,f)
+#define grok_bslash_o(a,b,c,d,e,f,g) S_grok_bslash_o(aTHX_ a,b,c,d,e,f,g)
+#define grok_bslash_x(a,b,c,d,e,f,g) S_grok_bslash_x(aTHX_ a,b,c,d,e,f,g)
#define regcurly(a) S_regcurly(aTHX_ a)
# endif
# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
STATIC char S_grok_bslash_c(pTHX_ const char source, const bool utf8, const bool output_warning)
__attribute__warn_unused_result__;
-STATIC bool S_grok_bslash_o(pTHX_ char** s, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool utf8)
+STATIC bool S_grok_bslash_o(pTHX_ char** s, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
#define PERL_ARGS_ASSERT_GROK_BSLASH_O \
assert(s); assert(uv); assert(error_msg)
-PERL_STATIC_INLINE bool S_grok_bslash_x(pTHX_ char** s, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool utf8)
+PERL_STATIC_INLINE bool S_grok_bslash_x(pTHX_ char** s, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
&error_msg,
TRUE, /* out warnings */
FALSE, /* not strict */
+ TRUE, /* Output warnings
+ for non-
+ portables */
UTF);
if (! valid) {
RExC_parse = p; /* going to die anyway; point
&error_msg,
TRUE, /* out warnings */
FALSE, /* not strict */
+ TRUE, /* Output warnings
+ for non-
+ portables */
UTF);
if (! valid) {
RExC_parse = p; /* going to die anyway; point
&error_msg,
SIZE_ONLY,
FALSE, /* Not strict */
+ TRUE, /* Output warnings for
+ non-portables */
UTF);
if (! valid) {
vFAIL(error_msg);
&error_msg,
TRUE, /* Output warnings */
FALSE, /* Not strict */
+ TRUE, /* Output warnings for
+ non-portables */
UTF);
if (! valid) {
vFAIL(error_msg);
bool valid = grok_bslash_o(&s, &uv, &error,
TRUE, /* Output warning */
FALSE, /* Not strict */
+ TRUE, /* Output warnings for
+ non-portables */
UTF);
if (! valid) {
yyerror(error);
bool valid = grok_bslash_x(&s, &uv, &error,
TRUE, /* Output warning */
FALSE, /* Not strict */
+ TRUE, /* Output warnings for
+ non-portables */
UTF);
if (! valid) {
yyerror(error);