|NN const char *s
rs |void |re_croak2 |NN const char* pat1|NN const char* pat2|...
Es |I32 |regpposixcc |NN struct RExC_state_t *pRExC_state|I32 value
-Es |void |checkposixcc |NN struct RExC_state_t *pRExC_state
Es |I32 |make_trie |NN struct RExC_state_t *pRExC_state \
|NN regnode *startbranch|NN regnode *first \
|NN regnode *last|NN regnode *tail \
#define add_cp_to_invlist(a,b) S_add_cp_to_invlist(aTHX_ a,b)
#define add_data S_add_data
#define alloc_maybe_populate_EXACT(a,b,c,d,e) S_alloc_maybe_populate_EXACT(aTHX_ a,b,c,d,e)
-#define checkposixcc(a) S_checkposixcc(aTHX_ a)
#define cl_and S_cl_and
#define cl_anything S_cl_anything
#define cl_init S_cl_init
#define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT \
assert(pRExC_state); assert(node); assert(flagp)
-STATIC void S_checkposixcc(pTHX_ struct RExC_state_t *pRExC_state)
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_CHECKPOSIXCC \
- assert(pRExC_state)
-
STATIC void S_cl_and(struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
return namedclass;
}
-STATIC void
-S_checkposixcc(pTHX_ RExC_state_t *pRExC_state)
-{
- dVAR;
-
- PERL_ARGS_ASSERT_CHECKPOSIXCC;
-
- if (POSIXCC(UCHARAT(RExC_parse))) {
- const char *s = RExC_parse;
- const char c = *s++;
-
- while (isALNUM(*s))
- s++;
- if (*s && c == *s && s[1] == ']') {
- ckWARN3reg(s+2,
- "POSIX syntax [%c %c] belongs inside character classes",
- c, c);
-
- /* [[=foo=]] and [[.foo.]] are still future. */
- if (POSIXCC_NOTYET(c)) {
- /* adjust RExC_parse so the error shows after
- the class closes */
- while (UCHARAT(RExC_parse) && UCHARAT(RExC_parse++) != ']')
- NOOP;
- Simple_vFAIL3("POSIX syntax [%c %c] is reserved for future extensions", c, c);
- }
- }
- }
-}
-
/* Generate the code to add a full posix character <class> to the bracketed
* character class given by <node>. (<node> is needed only under locale rules)
* destlist is the inversion list for non-locale rules that this class is
nextvalue = RExC_parse < RExC_end ? UCHARAT(RExC_parse) : 0;
if (!SIZE_ONLY && POSIXCC(nextvalue))
- checkposixcc(pRExC_state);
+ {
+ const char *s = RExC_parse;
+ const char c = *s++;
+
+ while (isALNUM(*s))
+ s++;
+ if (*s && c == *s && s[1] == ']') {
+ ckWARN3reg(s+2,
+ "POSIX syntax [%c %c] belongs inside character classes",
+ c, c);
+
+ /* [[=foo=]] and [[.foo.]] are still future. */
+ if (POSIXCC_NOTYET(c)) {
+ /* adjust RExC_parse so the error shows after
+ the class closes */
+ while (UCHARAT(RExC_parse) && UCHARAT(RExC_parse++) != ']')
+ NOOP;
+ Simple_vFAIL3("POSIX syntax [%c %c] is reserved for future extensions", c, c);
+ }
+ }
+ }
/* allow 1st char to be ] (allowing it to be - is dealt with later) */
if (UCHARAT(RExC_parse) == ']')
/%.127s/: Unrecognized escape \\%c passed through [S_regatom]
$x = '\m' ; /$x/
- POSIX syntax [%c %c] belongs inside character classes [S_checkposixcc]
+ POSIX syntax [%c %c] belongs inside character classes [S_regclass]
Character class [:%.*s:] unknown [S_regpposixcc]
- Character class syntax [%c %c] belongs inside character classes [S_checkposixcc]
+ Character class syntax [%c %c] belongs inside character classes [S_regclass]
/%.127s/: false [] range \"%*.*s\" in regexp [S_regclass]
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/a\b{ <-- HERE cde/ at - line 7.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/a\B{ <-- HERE cde/ at - line 8.
########
-# regcomp.c [S_regpposixcc S_checkposixcc]
+# regcomp.c [S_regpposixcc S_regclass]
#
use warnings 'regexp' ;
$_ = "" ;
POSIX syntax [: :] belongs inside character classes in regex; marked by <-- HERE in m/[:alpha:] <-- HERE / at - line 5.
POSIX syntax [: :] belongs inside character classes in regex; marked by <-- HERE in m/[:zog:] <-- HERE / at - line 6.
########
-# regcomp.c [S_checkposixcc]
+# regcomp.c [S_regclass]
#
use warnings 'regexp' ;
$_ = "" ;