~ubuntu-branches/ubuntu/precise/rakudo/precise

« back to all changes in this revision

Viewing changes to build/gen_uprop_pir.pl

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-10-04 14:31:57 UTC
  • Revision ID: james.westby@ubuntu.com-20091004143157-ubq3wu0grk0f1e6a
Tags: upstream-0.1~2009.09
ImportĀ upstreamĀ versionĀ 0.1~2009.09

Show diffs side-by-side

added added

removed removed

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