diff options
author | Karl Williamson <khw@cpan.org> | 2018-12-20 02:09:09 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-12-26 12:50:37 -0700 |
commit | 95fb0a6ee328d82cedece3632319bbf5e2578e25 (patch) | |
tree | f3dee08fd82f7014cb07057a4755d77d29ea1674 /regcomp.sym | |
parent | 0fbec7cfee07bcb4184ad6f26fffb15af3fdc048 (diff) | |
download | perl-95fb0a6ee328d82cedece3632319bbf5e2578e25.tar.gz |
regcomp.c: Simplify handling of EXACTFish nodes with 's' at edge
Commit 8a100c918ec81926c0536594df8ee1fcccb171da created node types for
handling an 's' at the leading edge, at the trailing edge, and at both
edges for nodes under /di that there is nothing else in that would
prevent them from being EXACTFU nodes. If two of these get joined, it
could create an 'ss' sequence which can't be an EXACTFU node, for U+DF
would match them unconditionally. Instead, under /di it should match
if and only if the target string is UTF-8 encoded.
I realized later that having three types becomes harder to deal with
when adding yet more node types, so this commit turns the three into
just one node type, indicating that at least one edge of the node is an
's'.
It also simplifies the parsing of the pattern and determining which node
to use.
Diffstat (limited to 'regcomp.sym')
-rw-r--r-- | regcomp.sym | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/regcomp.sym b/regcomp.sym index 8033a138d2..f9187c0a10 100644 --- a/regcomp.sym +++ b/regcomp.sym @@ -123,11 +123,7 @@ EXACTFU_ONLY8 EXACT, str ; Like EXACTFU, but only UTF-8 encoded targets # One could add EXACTFAA8 and and something that has the same effect for /l, # but these would be extremely uncommon -# If we ran out of node types, these could be replaced by some other method, -# such as instead examining the first and final characters of nodes. -EXACTFS_B_U EXACT, str ; EXACTFU but begins with [Ss]; (string not UTF-8; compile-time only). -EXACTFS_E_U EXACT, str ; EXACTFU but ends with [Ss]; (string not UTF-8; compile-time only). -EXACTFS_BE_U EXACT, str ; EXACTFU but begins and ends with [Ss]; (string not UTF-8; compile-time only). +EXACTFU_S_EDGE EXACT, str ; /di rules, but nothing in it precludes /ui, except begins and/or ends with [Ss]; (string not UTF-8; compile-time only). #*Do nothing types |