forked from rakudo/rakudo
/
gen_uprop_pir.pl
300 lines (296 loc) · 5.03 KB
/
gen_uprop_pir.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
#!/usr/bin/perl
# Copyright (C) 2008-2009, The Perl Foundation.
# $Id$
use strict;
use warnings;
my @prop = qw(
Alphabetic
Any
Arabic
Armenian
ASCIIHexDigit
Assigned
Bengali
BidiEN
BidiES
BidiET
BidiL
BidiWS
Bopomofo
Buhid
C
CanadianAboriginal
Cc
Cf
Cherokee
ClosePunctuation
Common
ConnectorPunctuation
Control
CurrencySymbol
Cyrillic
Dash
DashPunctuation
DecimalNumber
Deseret
Devanagari
Diacritic
EnclosingMark
Ethiopic
Extender
FinalPunctuation
Format
Georgian
Gothic
GraphemeLink
Greek
Gujarati
Gurmukhi
Han
Hangul
Hanunoo
Hebrew
HexDigit
Hiragana
Hyphen
ID_Continue
Ideographic
IDSBinaryOperator
ID_Start
IDSTrinaryOperator
InAlphabeticPresentationForms
InArabic
InArabicPresentationFormsA
InArabicPresentationFormsB
InArmenian
InArrows
InBasicLatin
InBengali
InBlockElements
InBopomofo
InBopomofoExtended
InBoxDrawing
InBraillePatterns
InBuhid
InByzantineMusicalSymbols
InCherokee
InCJKCompatibility
InCJKCompatibilityForms
InCJKCompatibilityIdeographs
InCJKCompatibilityIdeographsSupplement
InCJKRadicalsSupplement
InCJKSymbolsAndPunctuation
InCJKUnifiedIdeographs
InCJKUnifiedIdeographsExtensionA
InCJKUnifiedIdeographsExtensionB
InCombiningDiacriticalMarks
InCombiningDiacriticalMarksforSymbols
InCombiningHalfMarks
InControlPictures
InCurrencySymbols
InCyrillic
InCyrillicSupplementary
InDeseret
InDevanagari
InDingbats
InEnclosedAlphanumerics
InEnclosedCJKLettersAndMonths
InEthiopic
InGeneralPunctuation
InGeometricShapes
InGeorgian
InGothic
InGreekAndCoptic
InGreekExtended
InGujarati
InGurmukhi
InHalfwidthAndFullwidthForms
InHangulCompatibilityJamo
InHangulJamo
InHangulSyllables
InHanunoo
InHebrew
Inherited
InHighPrivateUseSurrogates
InHighSurrogates
InHiragana
InIdeographicDescriptionCharacters
InIPAExtensions
InitialPunctuation
InKanbun
InKangxiRadicals
InKannada
InKatakana
InKatakanaPhoneticExtensions
InKhmer
InLao
InLatin1Supplement
InLatinExtendedA
InLatinExtendedAdditional
InLatinExtendedB
InLetterlikeSymbols
InLowSurrogates
InMalayalam
InMathematicalAlphanumericSymbols
InMathematicalOperators
InMiscellaneousMathematicalSymbolsA
InMiscellaneousMathematicalSymbolsB
InMiscellaneousSymbols
InMiscellaneousTechnical
InMongolian
InMusicalSymbols
InMyanmar
InNumberForms
InOgham
InOldItalic
InOpticalCharacterRecognition
InOriya
InPrivateUseArea
InRunic
InSinhala
InSmallFormVariants
InSpacingModifierLetters
InSpecials
InSuperscriptsAndSubscripts
InSupplementalArrowsA
InSupplementalArrowsB
InSupplementalMathematicalOperators
InSupplementaryPrivateUseAreaA
InSupplementaryPrivateUseAreaB
InSyriac
InTagalog
InTagbanwa
InTags
InTamil
InTelugu
InThaana
InThai
InTibetan
InUnifiedCanadianAboriginalSyllabics
InVariationSelectors
InYiRadicals
InYiSyllables
JoinControl
Kannada
Katakana
Khmer
L
Lao
Latin
Letter
LetterNumber
LineSeparator
Ll
Lm
Lo
LogicalOrderException
Lowercase
LowercaseLetter
Lr
Lt
Lu
M
Malayalam
Mark
Math
MathSymbol
Mc
Me
Mn
ModifierLetter
ModifierSymbol
Mongolian
Myanmar
N
Nd
Nl
No
NoncharacterCodePoint
NonspacingMark
Number
Ogham
OldItalic
OpenPunctuation
Oriya
Other
OtherAlphabetic
OtherDefaultIgnorableCodePoint
OtherGraphemeExtend
OtherLetter
OtherLowercase
OtherMath
OtherNumber
OtherPunctuation
OtherSymbol
OtherUppercase
P
ParagraphSeparator
Pc
Pd
Pe
Pf
Pi
Po
Ps
Punctuation
QuotationMark
Radical
Runic
S
Sc
Separator
Sinhala
Sk
Sm
So
SoftDotted
SpaceSeparator
SpacingMark
Symbol
Syriac
Tagalog
Tagbanwa
Tamil
Telugu
TerminalPunctuation
Thaana
Thai
Tibetan
TitlecaseLetter
Unassigned
UnifiedIdeograph
Uppercase
UppercaseLetter
WhiteSpace
Yi
Z
Zl
Zp
Zs
);
print qq{
.namespace ['Regex';'Cursor']
.sub '!uprop' :anon
.param pmc self
.param string uprop
.local pmc cur
.local int pos
.local string tgt
(cur, pos, tgt) = self.'!cursor_start'()
\$I0 = x_is_uprop uprop, tgt, pos
unless \$I0 goto fail
pass:
inc pos
\$S0 = concat 'is', uprop
cur.'!cursor_pass'(pos, \$S0)
fail:
.return (cur)
.end
};
for (@prop) {
print qq(
.sub 'is$_' :method
.tailcall '!uprop'(self, '$_')
.end
);
}