regexp_parser 1.7.0 → 2.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +8 -2
  3. data/LICENSE +1 -1
  4. data/Rakefile +6 -70
  5. data/lib/regexp_parser/error.rb +4 -0
  6. data/lib/regexp_parser/expression/base.rb +76 -0
  7. data/lib/regexp_parser/expression/classes/alternation.rb +1 -1
  8. data/lib/regexp_parser/expression/classes/anchor.rb +0 -2
  9. data/lib/regexp_parser/expression/classes/{backref.rb → backreference.rb} +22 -2
  10. data/lib/regexp_parser/expression/classes/{set → character_set}/range.rb +4 -8
  11. data/lib/regexp_parser/expression/classes/{set.rb → character_set.rb} +3 -4
  12. data/lib/regexp_parser/expression/classes/{type.rb → character_type.rb} +0 -2
  13. data/lib/regexp_parser/expression/classes/conditional.rb +11 -5
  14. data/lib/regexp_parser/expression/classes/{escape.rb → escape_sequence.rb} +15 -7
  15. data/lib/regexp_parser/expression/classes/free_space.rb +5 -5
  16. data/lib/regexp_parser/expression/classes/group.rb +28 -15
  17. data/lib/regexp_parser/expression/classes/keep.rb +2 -0
  18. data/lib/regexp_parser/expression/classes/literal.rb +1 -5
  19. data/lib/regexp_parser/expression/classes/posix_class.rb +5 -1
  20. data/lib/regexp_parser/expression/classes/root.rb +4 -19
  21. data/lib/regexp_parser/expression/classes/{property.rb → unicode_property.rb} +5 -3
  22. data/lib/regexp_parser/expression/methods/construct.rb +41 -0
  23. data/lib/regexp_parser/expression/methods/human_name.rb +43 -0
  24. data/lib/regexp_parser/expression/methods/match_length.rb +11 -7
  25. data/lib/regexp_parser/expression/methods/parts.rb +23 -0
  26. data/lib/regexp_parser/expression/methods/printing.rb +26 -0
  27. data/lib/regexp_parser/expression/methods/strfregexp.rb +1 -1
  28. data/lib/regexp_parser/expression/methods/tests.rb +47 -1
  29. data/lib/regexp_parser/expression/methods/traverse.rb +34 -18
  30. data/lib/regexp_parser/expression/quantifier.rb +57 -17
  31. data/lib/regexp_parser/expression/sequence.rb +11 -47
  32. data/lib/regexp_parser/expression/sequence_operation.rb +4 -9
  33. data/lib/regexp_parser/expression/shared.rb +111 -0
  34. data/lib/regexp_parser/expression/subexpression.rb +27 -19
  35. data/lib/regexp_parser/expression.rb +14 -141
  36. data/lib/regexp_parser/lexer.rb +83 -41
  37. data/lib/regexp_parser/parser.rb +371 -429
  38. data/lib/regexp_parser/scanner/char_type.rl +11 -11
  39. data/lib/regexp_parser/scanner/errors/premature_end_error.rb +8 -0
  40. data/lib/regexp_parser/scanner/errors/scanner_error.rb +6 -0
  41. data/lib/regexp_parser/scanner/errors/validation_error.rb +63 -0
  42. data/lib/regexp_parser/scanner/properties/long.csv +633 -0
  43. data/lib/regexp_parser/scanner/properties/short.csv +248 -0
  44. data/lib/regexp_parser/scanner/property.rl +4 -4
  45. data/lib/regexp_parser/scanner/scanner.rl +303 -368
  46. data/lib/regexp_parser/scanner.rb +1423 -1674
  47. data/lib/regexp_parser/syntax/any.rb +2 -7
  48. data/lib/regexp_parser/syntax/base.rb +92 -67
  49. data/lib/regexp_parser/syntax/token/anchor.rb +15 -0
  50. data/lib/regexp_parser/syntax/{tokens → token}/assertion.rb +2 -2
  51. data/lib/regexp_parser/syntax/token/backreference.rb +33 -0
  52. data/lib/regexp_parser/syntax/token/character_set.rb +16 -0
  53. data/lib/regexp_parser/syntax/{tokens → token}/character_type.rb +3 -3
  54. data/lib/regexp_parser/syntax/{tokens → token}/conditional.rb +3 -3
  55. data/lib/regexp_parser/syntax/token/escape.rb +33 -0
  56. data/lib/regexp_parser/syntax/{tokens → token}/group.rb +7 -7
  57. data/lib/regexp_parser/syntax/{tokens → token}/keep.rb +1 -1
  58. data/lib/regexp_parser/syntax/token/meta.rb +20 -0
  59. data/lib/regexp_parser/syntax/{tokens → token}/posix_class.rb +3 -3
  60. data/lib/regexp_parser/syntax/token/quantifier.rb +35 -0
  61. data/lib/regexp_parser/syntax/token/unicode_property.rb +733 -0
  62. data/lib/regexp_parser/syntax/token/virtual.rb +11 -0
  63. data/lib/regexp_parser/syntax/token.rb +45 -0
  64. data/lib/regexp_parser/syntax/version_lookup.rb +19 -36
  65. data/lib/regexp_parser/syntax/versions/1.8.6.rb +13 -20
  66. data/lib/regexp_parser/syntax/versions/1.9.1.rb +10 -17
  67. data/lib/regexp_parser/syntax/versions/1.9.3.rb +3 -10
  68. data/lib/regexp_parser/syntax/versions/2.0.0.rb +8 -15
  69. data/lib/regexp_parser/syntax/versions/2.2.0.rb +3 -9
  70. data/lib/regexp_parser/syntax/versions/2.3.0.rb +3 -9
  71. data/lib/regexp_parser/syntax/versions/2.4.0.rb +3 -9
  72. data/lib/regexp_parser/syntax/versions/2.4.1.rb +2 -8
  73. data/lib/regexp_parser/syntax/versions/2.5.0.rb +3 -9
  74. data/lib/regexp_parser/syntax/versions/2.6.0.rb +3 -9
  75. data/lib/regexp_parser/syntax/versions/2.6.2.rb +3 -9
  76. data/lib/regexp_parser/syntax/versions/2.6.3.rb +3 -9
  77. data/lib/regexp_parser/syntax/versions/3.1.0.rb +4 -0
  78. data/lib/regexp_parser/syntax/versions/3.2.0.rb +4 -0
  79. data/lib/regexp_parser/syntax/versions.rb +3 -1
  80. data/lib/regexp_parser/syntax.rb +8 -6
  81. data/lib/regexp_parser/token.rb +9 -20
  82. data/lib/regexp_parser/version.rb +1 -1
  83. data/lib/regexp_parser.rb +0 -2
  84. data/regexp_parser.gemspec +19 -23
  85. metadata +52 -171
  86. data/CHANGELOG.md +0 -349
  87. data/README.md +0 -470
  88. data/lib/regexp_parser/scanner/properties/long.yml +0 -594
  89. data/lib/regexp_parser/scanner/properties/short.yml +0 -237
  90. data/lib/regexp_parser/syntax/tokens/anchor.rb +0 -15
  91. data/lib/regexp_parser/syntax/tokens/backref.rb +0 -24
  92. data/lib/regexp_parser/syntax/tokens/character_set.rb +0 -13
  93. data/lib/regexp_parser/syntax/tokens/escape.rb +0 -30
  94. data/lib/regexp_parser/syntax/tokens/meta.rb +0 -13
  95. data/lib/regexp_parser/syntax/tokens/quantifier.rb +0 -35
  96. data/lib/regexp_parser/syntax/tokens/unicode_property.rb +0 -675
  97. data/lib/regexp_parser/syntax/tokens.rb +0 -45
  98. data/spec/expression/base_spec.rb +0 -94
  99. data/spec/expression/clone_spec.rb +0 -120
  100. data/spec/expression/conditional_spec.rb +0 -89
  101. data/spec/expression/free_space_spec.rb +0 -27
  102. data/spec/expression/methods/match_length_spec.rb +0 -161
  103. data/spec/expression/methods/match_spec.rb +0 -25
  104. data/spec/expression/methods/strfregexp_spec.rb +0 -224
  105. data/spec/expression/methods/tests_spec.rb +0 -99
  106. data/spec/expression/methods/traverse_spec.rb +0 -161
  107. data/spec/expression/options_spec.rb +0 -128
  108. data/spec/expression/root_spec.rb +0 -9
  109. data/spec/expression/sequence_spec.rb +0 -9
  110. data/spec/expression/subexpression_spec.rb +0 -50
  111. data/spec/expression/to_h_spec.rb +0 -26
  112. data/spec/expression/to_s_spec.rb +0 -100
  113. data/spec/lexer/all_spec.rb +0 -22
  114. data/spec/lexer/conditionals_spec.rb +0 -53
  115. data/spec/lexer/escapes_spec.rb +0 -14
  116. data/spec/lexer/keep_spec.rb +0 -10
  117. data/spec/lexer/literals_spec.rb +0 -89
  118. data/spec/lexer/nesting_spec.rb +0 -99
  119. data/spec/lexer/refcalls_spec.rb +0 -55
  120. data/spec/parser/all_spec.rb +0 -43
  121. data/spec/parser/alternation_spec.rb +0 -88
  122. data/spec/parser/anchors_spec.rb +0 -17
  123. data/spec/parser/conditionals_spec.rb +0 -179
  124. data/spec/parser/errors_spec.rb +0 -30
  125. data/spec/parser/escapes_spec.rb +0 -121
  126. data/spec/parser/free_space_spec.rb +0 -130
  127. data/spec/parser/groups_spec.rb +0 -108
  128. data/spec/parser/keep_spec.rb +0 -6
  129. data/spec/parser/posix_classes_spec.rb +0 -8
  130. data/spec/parser/properties_spec.rb +0 -115
  131. data/spec/parser/quantifiers_spec.rb +0 -51
  132. data/spec/parser/refcalls_spec.rb +0 -112
  133. data/spec/parser/set/intersections_spec.rb +0 -127
  134. data/spec/parser/set/ranges_spec.rb +0 -111
  135. data/spec/parser/sets_spec.rb +0 -178
  136. data/spec/parser/types_spec.rb +0 -18
  137. data/spec/scanner/all_spec.rb +0 -18
  138. data/spec/scanner/anchors_spec.rb +0 -21
  139. data/spec/scanner/conditionals_spec.rb +0 -128
  140. data/spec/scanner/errors_spec.rb +0 -68
  141. data/spec/scanner/escapes_spec.rb +0 -53
  142. data/spec/scanner/free_space_spec.rb +0 -133
  143. data/spec/scanner/groups_spec.rb +0 -52
  144. data/spec/scanner/keep_spec.rb +0 -10
  145. data/spec/scanner/literals_spec.rb +0 -49
  146. data/spec/scanner/meta_spec.rb +0 -18
  147. data/spec/scanner/properties_spec.rb +0 -64
  148. data/spec/scanner/quantifiers_spec.rb +0 -20
  149. data/spec/scanner/refcalls_spec.rb +0 -36
  150. data/spec/scanner/sets_spec.rb +0 -102
  151. data/spec/scanner/types_spec.rb +0 -14
  152. data/spec/spec_helper.rb +0 -15
  153. data/spec/support/runner.rb +0 -42
  154. data/spec/support/shared_examples.rb +0 -77
  155. data/spec/support/warning_extractor.rb +0 -60
  156. data/spec/syntax/syntax_spec.rb +0 -48
  157. data/spec/syntax/syntax_token_map_spec.rb +0 -23
  158. data/spec/syntax/versions/1.8.6_spec.rb +0 -17
  159. data/spec/syntax/versions/1.9.1_spec.rb +0 -10
  160. data/spec/syntax/versions/1.9.3_spec.rb +0 -9
  161. data/spec/syntax/versions/2.0.0_spec.rb +0 -13
  162. data/spec/syntax/versions/2.2.0_spec.rb +0 -9
  163. data/spec/syntax/versions/aliases_spec.rb +0 -37
  164. data/spec/token/token_spec.rb +0 -85
  165. /data/lib/regexp_parser/expression/classes/{set → character_set}/intersection.rb +0 -0
@@ -1,675 +0,0 @@
1
- module Regexp::Syntax
2
- module Token
3
- module UnicodeProperty
4
- all = proc { |name| constants.grep(/#{name}/).flat_map(&method(:const_get)) }
5
-
6
- CharType_V1_9_0 = [:alnum, :alpha, :ascii, :blank, :cntrl, :digit, :graph,
7
- :lower, :print, :punct, :space, :upper, :word, :xdigit]
8
-
9
- CharType_V2_5_0 = [:xposixpunct]
10
-
11
- POSIX = [:any, :assigned, :newline]
12
-
13
- module Category
14
- Letter = [:letter, :uppercase_letter, :lowercase_letter,
15
- :titlecase_letter, :modifier_letter, :other_letter]
16
-
17
- Mark = [:mark, :nonspacing_mark, :spacing_mark,
18
- :enclosing_mark]
19
-
20
- Number = [:number, :decimal_number, :letter_number,
21
- :other_number]
22
-
23
- Punctuation = [:punctuation, :connector_punctuation, :dash_punctuation,
24
- :open_punctuation, :close_punctuation, :initial_punctuation,
25
- :final_punctuation, :other_punctuation]
26
-
27
- Symbol = [:symbol, :math_symbol, :currency_symbol,
28
- :modifier_symbol, :other_symbol]
29
-
30
- Separator = [:separator, :space_separator, :line_separator,
31
- :paragraph_separator]
32
-
33
- Codepoint = [:other, :control, :format,
34
- :surrogate, :private_use, :unassigned]
35
-
36
- All = Letter + Mark + Number + Punctuation +
37
- Symbol + Separator + Codepoint
38
- end
39
-
40
- Age_V1_9_3 = [:'age=1.1', :'age=2.0', :'age=2.1', :'age=3.0', :'age=3.1',
41
- :'age=3.2', :'age=4.0', :'age=4.1', :'age=5.0', :'age=5.1',
42
- :'age=5.2', :'age=6.0']
43
-
44
- Age_V2_0_0 = [:'age=6.1']
45
-
46
- Age_V2_2_0 = [:'age=6.2', :'age=6.3', :'age=7.0']
47
-
48
- Age_V2_3_0 = [:'age=8.0']
49
-
50
- Age_V2_4_0 = [:'age=9.0']
51
-
52
- Age_V2_5_0 = [:'age=10.0']
53
-
54
- Age_V2_6_0 = [:'age=11.0']
55
-
56
- Age_V2_6_2 = [:'age=12.0']
57
-
58
- Age_V2_6_3 = [:'age=12.1']
59
-
60
- Age = all[:Age_V]
61
-
62
- Derived_V1_9_0 = [
63
- :ascii_hex_digit,
64
- :alphabetic,
65
- :cased,
66
- :changes_when_casefolded,
67
- :changes_when_casemapped,
68
- :changes_when_lowercased,
69
- :changes_when_titlecased,
70
- :changes_when_uppercased,
71
- :case_ignorable,
72
- :bidi_control,
73
- :dash,
74
- :deprecated,
75
- :default_ignorable_code_point,
76
- :diacritic,
77
- :extender,
78
- :grapheme_base,
79
- :grapheme_extend,
80
- :grapheme_link,
81
- :hex_digit,
82
- :hyphen,
83
- :id_continue,
84
- :ideographic,
85
- :id_start,
86
- :ids_binary_operator,
87
- :ids_trinary_operator,
88
- :join_control,
89
- :logical_order_exception,
90
- :lowercase,
91
- :math,
92
- :noncharacter_code_point,
93
- :other_alphabetic,
94
- :other_default_ignorable_code_point,
95
- :other_grapheme_extend,
96
- :other_id_continue,
97
- :other_id_start,
98
- :other_lowercase,
99
- :other_math,
100
- :other_uppercase,
101
- :pattern_syntax,
102
- :pattern_white_space,
103
- :quotation_mark,
104
- :radical,
105
- :sentence_terminal,
106
- :soft_dotted,
107
- :terminal_punctuation,
108
- :unified_ideograph,
109
- :uppercase,
110
- :variation_selector,
111
- :white_space,
112
- :xid_start,
113
- :xid_continue,
114
- ]
115
-
116
- Derived_V2_0_0 = [
117
- :cased_letter,
118
- :combining_mark,
119
- ]
120
-
121
- Derived_V2_4_0 = [
122
- :prepended_concatenation_mark,
123
- ]
124
-
125
- Derived_V2_5_0 = [
126
- :regional_indicator
127
- ]
128
-
129
- Derived = all[:Derived_V]
130
-
131
- Script_V1_9_0 = [
132
- :arabic,
133
- :imperial_aramaic,
134
- :armenian,
135
- :avestan,
136
- :balinese,
137
- :bamum,
138
- :bengali,
139
- :bopomofo,
140
- :braille,
141
- :buginese,
142
- :buhid,
143
- :canadian_aboriginal,
144
- :carian,
145
- :cham,
146
- :cherokee,
147
- :coptic,
148
- :cypriot,
149
- :cyrillic,
150
- :devanagari,
151
- :deseret,
152
- :egyptian_hieroglyphs,
153
- :ethiopic,
154
- :georgian,
155
- :glagolitic,
156
- :gothic,
157
- :greek,
158
- :gujarati,
159
- :gurmukhi,
160
- :hangul,
161
- :han,
162
- :hanunoo,
163
- :hebrew,
164
- :hiragana,
165
- :old_italic,
166
- :javanese,
167
- :kayah_li,
168
- :katakana,
169
- :kharoshthi,
170
- :khmer,
171
- :kannada,
172
- :kaithi,
173
- :tai_tham,
174
- :lao,
175
- :latin,
176
- :lepcha,
177
- :limbu,
178
- :linear_b,
179
- :lisu,
180
- :lycian,
181
- :lydian,
182
- :malayalam,
183
- :mongolian,
184
- :meetei_mayek,
185
- :myanmar,
186
- :nko,
187
- :ogham,
188
- :ol_chiki,
189
- :old_turkic,
190
- :oriya,
191
- :osmanya,
192
- :phags_pa,
193
- :inscriptional_pahlavi,
194
- :phoenician,
195
- :inscriptional_parthian,
196
- :rejang,
197
- :runic,
198
- :samaritan,
199
- :old_south_arabian,
200
- :saurashtra,
201
- :shavian,
202
- :sinhala,
203
- :sundanese,
204
- :syloti_nagri,
205
- :syriac,
206
- :tagbanwa,
207
- :tai_le,
208
- :new_tai_lue,
209
- :tamil,
210
- :tai_viet,
211
- :telugu,
212
- :tifinagh,
213
- :tagalog,
214
- :thaana,
215
- :thai,
216
- :tibetan,
217
- :ugaritic,
218
- :vai,
219
- :old_persian,
220
- :cuneiform,
221
- :yi,
222
- :inherited,
223
- :common,
224
- :unknown
225
- ]
226
-
227
- Script_V1_9_3 = [
228
- :brahmi,
229
- :batak,
230
- :mandaic
231
- ]
232
-
233
- Script_V2_0_0 = [
234
- :chakma,
235
- :meroitic_cursive,
236
- :meroitic_hieroglyphs,
237
- :miao,
238
- :sharada,
239
- :sora_sompeng,
240
- :takri,
241
- ]
242
-
243
- Script_V2_2_0 = [
244
- :caucasian_albanian,
245
- :bassa_vah,
246
- :duployan,
247
- :elbasan,
248
- :grantha,
249
- :pahawh_hmong,
250
- :khojki,
251
- :linear_a,
252
- :mahajani,
253
- :manichaean,
254
- :mende_kikakui,
255
- :modi,
256
- :mro,
257
- :old_north_arabian,
258
- :nabataean,
259
- :palmyrene,
260
- :pau_cin_hau,
261
- :old_permic,
262
- :psalter_pahlavi,
263
- :siddham,
264
- :khudawadi,
265
- :tirhuta,
266
- :warang_citi
267
- ]
268
-
269
- Script_V2_3_0 = [
270
- :ahom,
271
- :anatolian_hieroglyphs,
272
- :hatran,
273
- :multani,
274
- :old_hungarian,
275
- :signwriting,
276
- ]
277
-
278
- Script_V2_4_0 = [
279
- :adlam,
280
- :bhaiksuki,
281
- :marchen,
282
- :newa,
283
- :osage,
284
- :tangut,
285
- ]
286
-
287
- Script_V2_5_0 = [
288
- :masaram_gondi,
289
- :nushu,
290
- :soyombo,
291
- :zanabazar_square,
292
- ]
293
-
294
- Script_V2_6_0 = [
295
- :dogra,
296
- :gunjala_gondi,
297
- :hanifi_rohingya,
298
- :makasar,
299
- :medefaidrin,
300
- :old_sogdian,
301
- :sogdian,
302
- ]
303
-
304
- Script_V2_6_2 = [
305
- :egyptian_hieroglyph_format_controls,
306
- :elymaic,
307
- :nandinagari,
308
- :nyiakeng_puachue_hmong,
309
- :ottoman_siyaq_numbers,
310
- :small_kana_extension,
311
- :symbols_and_pictographs_extended_a,
312
- :tamil_supplement,
313
- :wancho,
314
- ]
315
-
316
- Script = all[:Script_V]
317
-
318
- UnicodeBlock_V1_9_0 = [
319
- :in_alphabetic_presentation_forms,
320
- :in_arabic,
321
- :in_armenian,
322
- :in_arrows,
323
- :in_basic_latin,
324
- :in_bengali,
325
- :in_block_elements,
326
- :in_bopomofo_extended,
327
- :in_bopomofo,
328
- :in_box_drawing,
329
- :in_braille_patterns,
330
- :in_buhid,
331
- :in_cjk_compatibility_forms,
332
- :in_cjk_compatibility_ideographs,
333
- :in_cjk_compatibility,
334
- :in_cjk_radicals_supplement,
335
- :in_cjk_symbols_and_punctuation,
336
- :in_cjk_unified_ideographs_extension_a,
337
- :in_cjk_unified_ideographs,
338
- :in_cherokee,
339
- :in_combining_diacritical_marks_for_symbols,
340
- :in_combining_diacritical_marks,
341
- :in_combining_half_marks,
342
- :in_control_pictures,
343
- :in_currency_symbols,
344
- :in_cyrillic_supplement,
345
- :in_cyrillic,
346
- :in_devanagari,
347
- :in_dingbats,
348
- :in_enclosed_alphanumerics,
349
- :in_enclosed_cjk_letters_and_months,
350
- :in_ethiopic,
351
- :in_general_punctuation,
352
- :in_geometric_shapes,
353
- :in_georgian,
354
- :in_greek_extended,
355
- :in_greek_and_coptic,
356
- :in_gujarati,
357
- :in_gurmukhi,
358
- :in_halfwidth_and_fullwidth_forms,
359
- :in_hangul_compatibility_jamo,
360
- :in_hangul_jamo,
361
- :in_hangul_syllables,
362
- :in_hanunoo,
363
- :in_hebrew,
364
- :in_high_private_use_surrogates,
365
- :in_high_surrogates,
366
- :in_hiragana,
367
- :in_ipa_extensions,
368
- :in_ideographic_description_characters,
369
- :in_kanbun,
370
- :in_kangxi_radicals,
371
- :in_kannada,
372
- :in_katakana_phonetic_extensions,
373
- :in_katakana,
374
- :in_khmer_symbols,
375
- :in_khmer,
376
- :in_lao,
377
- :in_latin_extended_additional,
378
- :in_letterlike_symbols,
379
- :in_limbu,
380
- :in_low_surrogates,
381
- :in_malayalam,
382
- :in_mathematical_operators,
383
- :in_miscellaneous_symbols_and_arrows,
384
- :in_miscellaneous_symbols,
385
- :in_miscellaneous_technical,
386
- :in_mongolian,
387
- :in_myanmar,
388
- :in_number_forms,
389
- :in_ogham,
390
- :in_optical_character_recognition,
391
- :in_oriya,
392
- :in_phonetic_extensions,
393
- :in_private_use_area,
394
- :in_runic,
395
- :in_sinhala,
396
- :in_small_form_variants,
397
- :in_spacing_modifier_letters,
398
- :in_specials,
399
- :in_superscripts_and_subscripts,
400
- :in_supplemental_mathematical_operators,
401
- :in_syriac,
402
- :in_tagalog,
403
- :in_tagbanwa,
404
- :in_tai_le,
405
- :in_tamil,
406
- :in_telugu,
407
- :in_thaana,
408
- :in_thai,
409
- :in_tibetan,
410
- :in_unified_canadian_aboriginal_syllabics,
411
- :in_variation_selectors,
412
- :in_yi_radicals,
413
- :in_yi_syllables,
414
- :in_yijing_hexagram_symbols,
415
- ]
416
-
417
- UnicodeBlock_V2_0_0 = [
418
- :in_aegean_numbers,
419
- :in_alchemical_symbols,
420
- :in_ancient_greek_musical_notation,
421
- :in_ancient_greek_numbers,
422
- :in_ancient_symbols,
423
- :in_arabic_extended_a,
424
- :in_arabic_mathematical_alphabetic_symbols,
425
- :in_arabic_presentation_forms_a,
426
- :in_arabic_presentation_forms_b,
427
- :in_arabic_supplement,
428
- :in_avestan,
429
- :in_balinese,
430
- :in_bamum,
431
- :in_bamum_supplement,
432
- :in_batak,
433
- :in_brahmi,
434
- :in_buginese,
435
- :in_byzantine_musical_symbols,
436
- :in_cjk_compatibility_ideographs_supplement,
437
- :in_cjk_strokes,
438
- :in_cjk_unified_ideographs_extension_b,
439
- :in_cjk_unified_ideographs_extension_c,
440
- :in_cjk_unified_ideographs_extension_d,
441
- :in_carian,
442
- :in_chakma,
443
- :in_cham,
444
- :in_combining_diacritical_marks_supplement,
445
- :in_common_indic_number_forms,
446
- :in_coptic,
447
- :in_counting_rod_numerals,
448
- :in_cuneiform,
449
- :in_cuneiform_numbers_and_punctuation,
450
- :in_cypriot_syllabary,
451
- :in_cyrillic_extended_a,
452
- :in_cyrillic_extended_b,
453
- :in_deseret,
454
- :in_devanagari_extended,
455
- :in_domino_tiles,
456
- :in_egyptian_hieroglyphs,
457
- :in_emoticons,
458
- :in_enclosed_alphanumeric_supplement,
459
- :in_enclosed_ideographic_supplement,
460
- :in_ethiopic_extended,
461
- :in_ethiopic_extended_a,
462
- :in_ethiopic_supplement,
463
- :in_georgian_supplement,
464
- :in_glagolitic,
465
- :in_gothic,
466
- :in_hangul_jamo_extended_a,
467
- :in_hangul_jamo_extended_b,
468
- :in_imperial_aramaic,
469
- :in_inscriptional_pahlavi,
470
- :in_inscriptional_parthian,
471
- :in_javanese,
472
- :in_kaithi,
473
- :in_kana_supplement,
474
- :in_kayah_li,
475
- :in_kharoshthi,
476
- :in_latin_1_supplement,
477
- :in_latin_extended_a,
478
- :in_latin_extended_b,
479
- :in_latin_extended_c,
480
- :in_latin_extended_d,
481
- :in_lepcha,
482
- :in_linear_b_ideograms,
483
- :in_linear_b_syllabary,
484
- :in_lisu,
485
- :in_lycian,
486
- :in_lydian,
487
- :in_mahjong_tiles,
488
- :in_mandaic,
489
- :in_mathematical_alphanumeric_symbols,
490
- :in_meetei_mayek,
491
- :in_meetei_mayek_extensions,
492
- :in_meroitic_cursive,
493
- :in_meroitic_hieroglyphs,
494
- :in_miao,
495
- :in_miscellaneous_mathematical_symbols_a,
496
- :in_miscellaneous_mathematical_symbols_b,
497
- :in_miscellaneous_symbols_and_pictographs,
498
- :in_modifier_tone_letters,
499
- :in_musical_symbols,
500
- :in_myanmar_extended_a,
501
- :in_nko,
502
- :in_new_tai_lue,
503
- :in_no_block,
504
- :in_ol_chiki,
505
- :in_old_italic,
506
- :in_old_persian,
507
- :in_old_south_arabian,
508
- :in_old_turkic,
509
- :in_osmanya,
510
- :in_phags_pa,
511
- :in_phaistos_disc,
512
- :in_phoenician,
513
- :in_phonetic_extensions_supplement,
514
- :in_playing_cards,
515
- :in_rejang,
516
- :in_rumi_numeral_symbols,
517
- :in_samaritan,
518
- :in_saurashtra,
519
- :in_sharada,
520
- :in_shavian,
521
- :in_sora_sompeng,
522
- :in_sundanese,
523
- :in_sundanese_supplement,
524
- :in_supplemental_arrows_a,
525
- :in_supplemental_arrows_b,
526
- :in_supplemental_punctuation,
527
- :in_supplementary_private_use_area_a,
528
- :in_supplementary_private_use_area_b,
529
- :in_syloti_nagri,
530
- :in_tags,
531
- :in_tai_tham,
532
- :in_tai_viet,
533
- :in_tai_xuan_jing_symbols,
534
- :in_takri,
535
- :in_tifinagh,
536
- :in_transport_and_map_symbols,
537
- :in_ugaritic,
538
- :in_unified_canadian_aboriginal_syllabics_extended,
539
- :in_vai,
540
- :in_variation_selectors_supplement,
541
- :in_vedic_extensions,
542
- :in_vertical_forms,
543
- ]
544
-
545
- UnicodeBlock_V2_2_0 = [
546
- :in_bassa_vah,
547
- :in_caucasian_albanian,
548
- :in_combining_diacritical_marks_extended,
549
- :in_coptic_epact_numbers,
550
- :in_duployan,
551
- :in_elbasan,
552
- :in_geometric_shapes_extended,
553
- :in_grantha,
554
- :in_khojki,
555
- :in_khudawadi,
556
- :in_latin_extended_e,
557
- :in_linear_a,
558
- :in_mahajani,
559
- :in_manichaean,
560
- :in_mende_kikakui,
561
- :in_modi,
562
- :in_mro,
563
- :in_myanmar_extended_b,
564
- :in_nabataean,
565
- :in_old_north_arabian,
566
- :in_old_permic,
567
- :in_ornamental_dingbats,
568
- :in_pahawh_hmong,
569
- :in_palmyrene,
570
- :in_pau_cin_hau,
571
- :in_psalter_pahlavi,
572
- :in_shorthand_format_controls,
573
- :in_siddham,
574
- :in_sinhala_archaic_numbers,
575
- :in_supplemental_arrows_c,
576
- :in_tirhuta,
577
- :in_warang_citi,
578
- ]
579
-
580
- UnicodeBlock_V2_3_0 = [
581
- :in_ahom,
582
- :in_anatolian_hieroglyphs,
583
- :in_cjk_unified_ideographs_extension_e,
584
- :in_cherokee_supplement,
585
- :in_early_dynastic_cuneiform,
586
- :in_hatran,
587
- :in_multani,
588
- :in_old_hungarian,
589
- :in_supplemental_symbols_and_pictographs,
590
- :in_sutton_signwriting,
591
- ]
592
-
593
- UnicodeBlock_V2_4_0 = [
594
- :in_adlam,
595
- :in_bhaiksuki,
596
- :in_cyrillic_extended_c,
597
- :in_glagolitic_supplement,
598
- :in_ideographic_symbols_and_punctuation,
599
- :in_marchen,
600
- :in_mongolian_supplement,
601
- :in_newa,
602
- :in_osage,
603
- :in_tangut,
604
- :in_tangut_components,
605
- ]
606
-
607
- UnicodeBlock_V2_5_0 = [
608
- :in_cjk_unified_ideographs_extension_f,
609
- :in_kana_extended_a,
610
- :in_masaram_gondi,
611
- :in_nushu,
612
- :in_soyombo,
613
- :in_syriac_supplement,
614
- :in_zanabazar_square,
615
- ]
616
-
617
- UnicodeBlock_V2_6_0 = [
618
- :in_chess_symbols,
619
- :in_dogra,
620
- :in_georgian_extended,
621
- :in_gunjala_gondi,
622
- :in_hanifi_rohingya,
623
- :in_indic_siyaq_numbers,
624
- :in_makasar,
625
- :in_mayan_numerals,
626
- :in_medefaidrin,
627
- :in_old_sogdian,
628
- :in_sogdian,
629
- ]
630
-
631
- UnicodeBlock_V2_6_2 = [
632
- :in_egyptian_hieroglyph_format_controls,
633
- :in_elymaic,
634
- :in_nandinagari,
635
- :in_nyiakeng_puachue_hmong,
636
- :in_ottoman_siyaq_numbers,
637
- :in_small_kana_extension,
638
- :in_symbols_and_pictographs_extended_a,
639
- :in_tamil_supplement,
640
- :in_wancho,
641
- ]
642
-
643
- UnicodeBlock = all[:UnicodeBlock_V]
644
-
645
- Emoji_V2_5_0 = [
646
- :emoji,
647
- :emoji_component,
648
- :emoji_modifier,
649
- :emoji_modifier_base,
650
- :emoji_presentation,
651
- ]
652
-
653
- Emoji = all[:Emoji_V]
654
-
655
- V1_9_0 = Category::All + POSIX + all[:V1_9_0]
656
- V1_9_3 = all[:V1_9_3]
657
- V2_0_0 = all[:V2_0_0]
658
- V2_2_0 = all[:V2_2_0]
659
- V2_3_0 = all[:V2_3_0]
660
- V2_4_0 = all[:V2_4_0]
661
- V2_5_0 = all[:V2_5_0]
662
- V2_6_0 = all[:V2_6_0]
663
- V2_6_2 = all[:V2_6_2]
664
- V2_6_3 = all[:V2_6_3]
665
-
666
- All = all[/^V\d+_\d+_\d+$/]
667
-
668
- Type = :property
669
- NonType = :nonproperty
670
- end
671
-
672
- Map[UnicodeProperty::Type] = UnicodeProperty::All
673
- Map[UnicodeProperty::NonType] = UnicodeProperty::All
674
- end
675
- end
@@ -1,45 +0,0 @@
1
- # Define the base module and the simplest of tokens.
2
- module Regexp::Syntax
3
- module Token
4
- Map = {}
5
-
6
- module Literal
7
- All = [:literal]
8
- Type = :literal
9
- end
10
-
11
- module FreeSpace
12
- All = [:comment, :whitespace]
13
- Type = :free_space
14
- end
15
-
16
- Map[FreeSpace::Type] = FreeSpace::All
17
- Map[Literal::Type] = Literal::All
18
- end
19
- end
20
-
21
-
22
- # Load all the token files, they will populate the Map constant.
23
- require 'regexp_parser/syntax/tokens/anchor'
24
- require 'regexp_parser/syntax/tokens/assertion'
25
- require 'regexp_parser/syntax/tokens/backref'
26
- require 'regexp_parser/syntax/tokens/posix_class'
27
- require 'regexp_parser/syntax/tokens/character_set'
28
- require 'regexp_parser/syntax/tokens/character_type'
29
- require 'regexp_parser/syntax/tokens/conditional'
30
- require 'regexp_parser/syntax/tokens/escape'
31
- require 'regexp_parser/syntax/tokens/group'
32
- require 'regexp_parser/syntax/tokens/keep'
33
- require 'regexp_parser/syntax/tokens/meta'
34
- require 'regexp_parser/syntax/tokens/quantifier'
35
- require 'regexp_parser/syntax/tokens/unicode_property'
36
-
37
-
38
- # After loading all the tokens the map is full. Extract all tokens and types
39
- # into the All and Types constants.
40
- module Regexp::Syntax
41
- module Token
42
- All = Map.values.flatten.uniq.sort.freeze
43
- Types = Map.keys.freeze
44
- end
45
- end