From 938090acbdbd9475a044786f75bbbcf4e64d3b49 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 3 Apr 2020 10:22:19 -0600 Subject: regnodes.h: Add two convenience bit masks These categorize the many types of EXACT nodes, so that code can refer to a particular subset of such nodes without having to list all of them out. This simplifies some 'if' statements, and makes updating things easier. --- regcomp.sym | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'regcomp.sym') diff --git a/regcomp.sym b/regcomp.sym index 1105173ced..510a6162be 100644 --- a/regcomp.sym +++ b/regcomp.sym @@ -129,6 +129,9 @@ BRANCH BRANCH, node 0 V ; Match this alternative, or the next... #*Literals # NOTE: the relative ordering of these types is important do not change it +# By convention, folding nodes begin with EXACTF; A digit 8 is in the name if +# and only if it it requires a UTF-8 target string in order to successfully +# match. EXACT EXACT, str ; Match this string (flags field is the length). @@ -158,8 +161,6 @@ EXACTFUP EXACT, str ; Like EXACT, but match using /iu rules; (string n # representable in the UTF-8 target string. EXACTFLU8 EXACT, str ; Like EXACTFU, but use /il, UTF-8, (string is folded, and everything in it is above 255 - - EXACT_REQ8 EXACT, str ; Like EXACT, but only UTF-8 encoded targets can match LEXACT_REQ8 EXACT, len:str 1 ; Like LEXACT, but only UTF-8 encoded targets can match EXACTFU_REQ8 EXACT, str ; Like EXACTFU, but only UTF-8 encoded targets can match -- cgit v1.2.1