|
61 | 61 | include_examples 'scan', /[[:digit:][:space:]]/, 2 => [:posixclass, :space, '[:space:]', 10, 19] |
62 | 62 | include_examples 'scan', /[[:^digit:]]/, 1 => [:nonposixclass, :digit, '[:^digit:]', 1, 11] |
63 | 63 |
|
64 | | - include_examples 'scan', /[a[.a-b.]c]/, 2 => [:set, :collation, '[.a-b.]', 2, 9] |
65 | | - include_examples 'scan', /[a[=e=]c]/, 2 => [:set, :equivalent, '[=e=]', 2, 7] |
66 | | - |
67 | 64 | include_examples 'scan', /[a-d&&g-h]/, 4 => [:set, :intersection, '&&', 4, 6] |
68 | 65 | include_examples 'scan', /[a&&]/, 2 => [:set, :intersection, '&&', 2, 4] |
69 | 66 | include_examples 'scan', /[&&z]/, 1 => [:set, :intersection, '&&', 1, 3] |
|
88 | 85 | 8 => [:set, :range, '-', 9, 10], |
89 | 86 | 10=> [:set, :close, ']', 11, 12] |
90 | 87 |
|
| 88 | + # Collations/collating sequences and character equivalents are not enabled |
| 89 | + # in Ruby at the moment. If they ever are, enable them in the scanner, |
| 90 | + # add them to a new syntax version, and handle them in the parser. Until then, |
| 91 | + # expect them to be scanned as regular subsets containing literals. |
| 92 | + # include_examples 'scan', /[a[.a-b.]c]/, 2 => [:set, :collation, '[.a-b.]', 2, 9] |
| 93 | + # include_examples 'scan', /[a[=e=]c]/, 2 => [:set, :equivalent, '[=e=]', 2, 7] |
| 94 | + include_examples 'scan', '[a[.a-b.]c]', 2 => [:set, :open, '[', 2, 3] |
| 95 | + include_examples 'scan', '[a[.a-b.]c]', 3 => [:literal, :literal, '.', 3, 4] |
| 96 | + include_examples 'scan', '[a[=e=]c]', 2 => [:set, :open, '[', 2, 3] |
| 97 | + include_examples 'scan', '[a[=e=]c]', 3 => [:literal, :literal, '=', 3, 4] |
| 98 | + |
91 | 99 | # multi-byte characters should not affect indices |
92 | 100 | include_examples 'scan', /[れます]/, |
93 | 101 | 0 => [:set, :open, '[', 0, 1], |
|
0 commit comments