@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
7
7
8
8
Written by Philip Hazel
9
9
Original API code Copyright (c) 1997-2012 University of Cambridge
10
- New API code Copyright (c) 2016-2021 University of Cambridge
10
+ New API code Copyright (c) 2016-2022 University of Cambridge
11
11
12
12
-----------------------------------------------------------------------------
13
13
Redistribution and use in source and binary forms, with or without
@@ -123,18 +123,21 @@ opcode is used to select the column. The values are as follows:
123
123
*/
124
124
125
125
static const uint8_t propposstab [PT_TABSIZE ][PT_TABSIZE ] = {
126
- /* ANY LAMP GC PC SC ALNUM SPACE PXSPACE WORD CLIST UCNC */
127
- { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, /* PT_ANY */
128
- { 0 , 3 , 0 , 0 , 0 , 3 , 1 , 1 , 0 , 0 , 0 }, /* PT_LAMP */
129
- { 0 , 0 , 2 , 4 , 0 , 9 , 10 , 10 , 11 , 0 , 0 }, /* PT_GC */
130
- { 0 , 0 , 5 , 2 , 0 , 15 , 16 , 16 , 17 , 0 , 0 }, /* PT_PC */
131
- { 0 , 0 , 0 , 0 , 2 , 0 , 0 , 0 , 0 , 0 , 0 }, /* PT_SC */
132
- { 0 , 3 , 6 , 12 , 0 , 3 , 1 , 1 , 0 , 0 , 0 }, /* PT_ALNUM */
133
- { 0 , 1 , 7 , 13 , 0 , 1 , 3 , 3 , 1 , 0 , 0 }, /* PT_SPACE */
134
- { 0 , 1 , 7 , 13 , 0 , 1 , 3 , 3 , 1 , 0 , 0 }, /* PT_PXSPACE */
135
- { 0 , 0 , 8 , 14 , 0 , 0 , 1 , 1 , 3 , 0 , 0 }, /* PT_WORD */
136
- { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, /* PT_CLIST */
137
- { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 3 } /* PT_UCNC */
126
+ /* ANY LAMP GC PC SC SCX ALNUM SPACE PXSPACE WORD CLIST UCNC BIDICL BOOL */
127
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, /* PT_ANY */
128
+ { 0 , 3 , 0 , 0 , 0 , 0 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0 }, /* PT_LAMP */
129
+ { 0 , 0 , 2 , 4 , 0 , 0 , 9 , 10 , 10 , 11 , 0 , 0 , 0 , 0 }, /* PT_GC */
130
+ { 0 , 0 , 5 , 2 , 0 , 0 , 15 , 16 , 16 , 17 , 0 , 0 , 0 , 0 }, /* PT_PC */
131
+ { 0 , 0 , 0 , 0 , 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, /* PT_SC */
132
+ { 0 , 0 , 0 , 0 , 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, /* PT_SCX */
133
+ { 0 , 3 , 6 , 12 , 0 , 0 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0 }, /* PT_ALNUM */
134
+ { 0 , 1 , 7 , 13 , 0 , 0 , 1 , 3 , 3 , 1 , 0 , 0 , 0 , 0 }, /* PT_SPACE */
135
+ { 0 , 1 , 7 , 13 , 0 , 0 , 1 , 3 , 3 , 1 , 0 , 0 , 0 , 0 }, /* PT_PXSPACE */
136
+ { 0 , 0 , 8 , 14 , 0 , 0 , 0 , 1 , 1 , 3 , 0 , 0 , 0 , 0 }, /* PT_WORD */
137
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, /* PT_CLIST */
138
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 3 , 0 , 0 }, /* PT_UCNC */
139
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, /* PT_BIDICL */
140
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } /* PT_BOOL */
138
141
};
139
142
140
143
/* This table is used to check whether auto-possessification is possible
@@ -196,6 +199,7 @@ static BOOL
196
199
check_char_prop (uint32_t c , unsigned int ptype , unsigned int pdata ,
197
200
BOOL negated )
198
201
{
202
+ BOOL ok ;
199
203
const uint32_t * p ;
200
204
const ucd_record * prop = GET_UCD (c );
201
205
@@ -215,6 +219,11 @@ switch(ptype)
215
219
case PT_SC :
216
220
return (pdata == prop -> script ) == negated ;
217
221
222
+ case PT_SCX :
223
+ ok = (pdata == prop -> script
224
+ || MAPBIT (PRIV (ucd_script_sets ) + UCD_SCRIPTX_PROP (prop ), pdata ) != 0 );
225
+ return ok == negated ;
226
+
218
227
/* These are specials */
219
228
220
229
case PT_ALNUM :
@@ -251,6 +260,14 @@ switch(ptype)
251
260
if (c == * p ++ ) return negated ;
252
261
}
253
262
break ; /* Control never reaches here */
263
+
264
+ /* Haven't yet thought these through. */
265
+
266
+ case PT_BIDICL :
267
+ return FALSE;
268
+
269
+ case PT_BOOL :
270
+ return FALSE;
254
271
}
255
272
256
273
return FALSE;
0 commit comments