regexp_parser 1.8.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +70 -0
- data/Gemfile +1 -0
- data/README.md +12 -11
- data/Rakefile +2 -2
- data/lib/regexp_parser/expression.rb +10 -19
- data/lib/regexp_parser/expression/classes/free_space.rb +1 -1
- data/lib/regexp_parser/expression/classes/group.rb +22 -2
- data/lib/regexp_parser/expression/classes/root.rb +4 -16
- data/lib/regexp_parser/expression/methods/match_length.rb +2 -2
- data/lib/regexp_parser/expression/methods/traverse.rb +2 -2
- data/lib/regexp_parser/expression/quantifier.rb +9 -0
- data/lib/regexp_parser/expression/sequence.rb +0 -10
- data/lib/regexp_parser/lexer.rb +2 -2
- data/lib/regexp_parser/parser.rb +27 -2
- data/lib/regexp_parser/scanner.rb +1194 -1272
- data/lib/regexp_parser/scanner/char_type.rl +11 -11
- data/lib/regexp_parser/scanner/property.rl +2 -2
- data/lib/regexp_parser/scanner/scanner.rl +178 -186
- data/lib/regexp_parser/syntax.rb +4 -4
- data/lib/regexp_parser/syntax/any.rb +2 -2
- data/lib/regexp_parser/syntax/base.rb +1 -1
- data/lib/regexp_parser/syntax/version_lookup.rb +4 -4
- data/lib/regexp_parser/version.rb +1 -1
- data/spec/expression/base_spec.rb +10 -0
- data/spec/expression/subexpression_spec.rb +1 -1
- data/spec/expression/to_s_spec.rb +39 -31
- data/spec/lexer/literals_spec.rb +24 -49
- data/spec/parser/errors_spec.rb +1 -1
- data/spec/parser/escapes_spec.rb +1 -1
- data/spec/parser/quantifiers_spec.rb +16 -0
- data/spec/parser/set/ranges_spec.rb +3 -3
- data/spec/scanner/escapes_spec.rb +7 -0
- data/spec/scanner/groups_spec.rb +10 -1
- data/spec/scanner/literals_spec.rb +28 -38
- data/spec/scanner/quantifiers_spec.rb +18 -13
- data/spec/scanner/sets_spec.rb +23 -5
- data/spec/spec_helper.rb +1 -0
- metadata +56 -60
- data/spec/expression/root_spec.rb +0 -9
- data/spec/expression/sequence_spec.rb +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42283562f90dc131bff21d7988b76867d1bd3bfc828373be9dce75c336300e1e
|
|
4
|
+
data.tar.gz: c7d0122495e338d2535ac7569f20257b70bbdce15a50a5ede6677897cfacc736
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd29fd59a5bdad5344d19a86c39680d9d22e961c7478d702643e9b2340a0c0c8d62b61ff7fb44b404096a079267e0126c9fd92797306062a1c66711e29af1a24
|
|
7
|
+
data.tar.gz: 752b4824e5104a29de6b8582b51f39fe72dc40ddd222a58b61612b0b4cc9e5fc0311b31d2523f7e516b36991f49843b682309178934b6306d6ba094856e9d50c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [2.0.3] - 2020-12-28 - [Janosch Müller](mailto:janosch84@gmail.com)
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- fixed error when scanning some unlikely and redundant but valid charset patterns
|
|
8
|
+
- e.g. `/[[.a-b.]]/`, `/[[=e=]]/`,
|
|
9
|
+
- fixed ancestry of some error classes related to syntax version lookup
|
|
10
|
+
- `NotImplementedError`, `InvalidVersionNameError`, `UnknownSyntaxNameError`
|
|
11
|
+
- they now correctly inherit from `Regexp::Syntax::SyntaxError` instead of Rubys `::SyntaxError`
|
|
12
|
+
|
|
13
|
+
## [2.0.2] - 2020-12-25 - [Janosch Müller](mailto:janosch84@gmail.com)
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- fixed `FrozenError` when calling `#to_s` on a frozen `Group::Passive`
|
|
18
|
+
* thanks to [Daniel Gollahon](https://github.com/dgollahon)
|
|
19
|
+
|
|
20
|
+
## [2.0.1] - 2020-12-20 - [Janosch Müller](mailto:janosch84@gmail.com)
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- fixed error when scanning some group names
|
|
25
|
+
* this affected names containing hyphens, digits or multibyte chars, e.g. `/(?<a1>a)/`
|
|
26
|
+
* thanks to [Daniel Gollahon](https://github.com/dgollahon) for the report
|
|
27
|
+
- fixed error when scanning hex escapes with just one hex digit
|
|
28
|
+
* e.g. `/\x0A/` was scanned correctly, but the equivalent `/\xA/` was not
|
|
29
|
+
* thanks to [Daniel Gollahon](https://github.com/dgollahon) for the report
|
|
30
|
+
|
|
31
|
+
## [2.0.0] - 2020-11-25 - [Janosch Müller](mailto:janosch84@gmail.com)
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- some methods that used to return byte-based indices now return char-based indices
|
|
36
|
+
* the returned values have only changed for Regexps that contain multibyte chars
|
|
37
|
+
* this is only a breaking change if you used such methods directly AND relied on them pointing to bytes
|
|
38
|
+
* affected methods:
|
|
39
|
+
* `Regexp::Token` `#length`, `#offset`, `#te`, `#ts`
|
|
40
|
+
* `Regexp::Expression::Base` `#full_length`, `#offset`, `#starts_at`, `#te`, `#ts`
|
|
41
|
+
* thanks to [Akinori MUSHA](https://github.com/knu) for the report
|
|
42
|
+
- removed some deprecated methods/signatures
|
|
43
|
+
* these are rarely used and have been showing deprecation warnings for a long time
|
|
44
|
+
* `Regexp::Expression::Subexpression.new` with 3 arguments
|
|
45
|
+
* `Regexp::Expression::Root.new` without a token argument
|
|
46
|
+
* `Regexp::Expression.parsed`
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- `Regexp::Expression::Base#base_length`
|
|
51
|
+
* returns the character count of an expression body, ignoring any quantifier
|
|
52
|
+
- pragmatic, experimental support for chained quantifiers
|
|
53
|
+
* e.g.: `/^a{10}{4,6}$/` matches exactly 40, 50 or 60 `a`s
|
|
54
|
+
* successive quantifiers used to be silently dropped by the parser
|
|
55
|
+
* they are now wrapped with passive groups as if they were written `(?:a{10}){4,6}`
|
|
56
|
+
* thanks to [calfeld](https://github.com/calfeld) for reporting this a while back
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- incorrect encoding output for non-ascii comments
|
|
61
|
+
* this led to a crash when calling `#to_s` on parse results containing such comments
|
|
62
|
+
* thanks to [Michael Glass](https://github.com/michaelglass) for the report
|
|
63
|
+
- some crashes when scanning contrived patterns such as `'\😋'`
|
|
64
|
+
|
|
65
|
+
### [1.8.2] - 2020-10-11 - [Janosch Müller](mailto:janosch84@gmail.com)
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- fix `FrozenError` in `Expression::Base#repetitions` on Ruby 3.0
|
|
70
|
+
* thanks to [Thomas Walpole](https://github.com/twalpole)
|
|
71
|
+
- removed "unknown future version" warning on Ruby 3.0
|
|
72
|
+
|
|
3
73
|
### [1.8.1] - 2020-09-28 - [Janosch Müller](mailto:janosch84@gmail.com)
|
|
4
74
|
|
|
5
75
|
### Fixed
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Regexp::Parser
|
|
2
2
|
|
|
3
|
-
[](http://badge.fury.io/rb/regexp_parser) [](http://badge.fury.io/rb/regexp_parser) [](https://github.com/ammar/regexp_parser/actions) [](https://codeclimate.com/github/ammar/regexp_parser/badges)
|
|
4
4
|
|
|
5
5
|
A Ruby gem for tokenizing, parsing, and transforming regular expressions.
|
|
6
6
|
|
|
@@ -8,8 +8,8 @@ A Ruby gem for tokenizing, parsing, and transforming regular expressions.
|
|
|
8
8
|
* A scanner/tokenizer based on [Ragel](http://www.colm.net/open-source/ragel/)
|
|
9
9
|
* A lexer that produces a "stream" of token objects.
|
|
10
10
|
* A parser that produces a "tree" of Expression objects (OO API)
|
|
11
|
-
* Runs on Ruby 2.x and JRuby runtimes
|
|
12
|
-
* Recognizes Ruby 1.8, 1.9, and
|
|
11
|
+
* Runs on Ruby 2.x, 3.x and JRuby runtimes
|
|
12
|
+
* Recognizes Ruby 1.8, 1.9, 2.x and 3.x regular expressions [See Supported Syntax](#supported-syntax)
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
_For examples of regexp_parser in use, see [Example Projects](#example-projects)._
|
|
@@ -18,13 +18,10 @@ _For examples of regexp_parser in use, see [Example Projects](#example-projects)
|
|
|
18
18
|
---
|
|
19
19
|
## Requirements
|
|
20
20
|
|
|
21
|
-
* Ruby >=
|
|
21
|
+
* Ruby >= 2.0
|
|
22
22
|
* Ragel >= 6.0, but only if you want to build the gem or work on the scanner.
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
_Note: See the .travis.yml file for covered versions._
|
|
26
|
-
|
|
27
|
-
|
|
28
25
|
---
|
|
29
26
|
## Install
|
|
30
27
|
|
|
@@ -317,7 +314,7 @@ Expression class. See the next section for details._
|
|
|
317
314
|
|
|
318
315
|
## Supported Syntax
|
|
319
316
|
The three modules support all the regular expression syntax features of Ruby 1.8,
|
|
320
|
-
1.9, and
|
|
317
|
+
1.9, 2.x and 3.x:
|
|
321
318
|
|
|
322
319
|
_Note that not all of these are available in all versions of Ruby_
|
|
323
320
|
|
|
@@ -440,13 +437,17 @@ rake install
|
|
|
440
437
|
## Example Projects
|
|
441
438
|
Projects using regexp_parser.
|
|
442
439
|
|
|
440
|
+
- [capybara](https://github.com/teamcapybara/capybara) is an integration testing tool that uses regexp_parser to convert Regexps to css/xpath selectors.
|
|
441
|
+
|
|
442
|
+
- [js_regex](https://github.com/janosch-x/js_regex) converts Ruby regular expressions to JavaScript-compatible regular expressions.
|
|
443
|
+
|
|
443
444
|
- [meta_re](https://github.com/ammar/meta_re) is a regular expression preprocessor with alias support.
|
|
444
445
|
|
|
445
446
|
- [mutant](https://github.com/mbj/mutant) (before v0.9.0) manipulates your regular expressions (amongst others) to see if your tests cover their behavior.
|
|
446
447
|
|
|
447
|
-
- [
|
|
448
|
+
- [rubocop](https://github.com/rubocop-hq/rubocop) is a linter for Ruby that uses regexp_parser to lint Regexps.
|
|
448
449
|
|
|
449
|
-
- [
|
|
450
|
+
- [twitter-cldr-rb](https://github.com/twitter/twitter-cldr-rb) is a localization helper that uses regexp_parser to generate examples of postal codes.
|
|
450
451
|
|
|
451
452
|
|
|
452
453
|
## References
|
|
@@ -475,4 +476,4 @@ Documentation and books used while working on this project.
|
|
|
475
476
|
|
|
476
477
|
---
|
|
477
478
|
##### Copyright
|
|
478
|
-
_Copyright (c) 2010-
|
|
479
|
+
_Copyright (c) 2010-2020 Ammar Ali. See LICENSE file for details._
|
data/Rakefile
CHANGED
|
@@ -25,7 +25,7 @@ end
|
|
|
25
25
|
|
|
26
26
|
namespace :ragel do
|
|
27
27
|
desc "Process the ragel source files and output ruby code"
|
|
28
|
-
task :rb do
|
|
28
|
+
task :rb do
|
|
29
29
|
RAGEL_SOURCE_FILES.each do |file|
|
|
30
30
|
output_file = "#{RAGEL_OUTPUT_DIR}/#{file}.rb"
|
|
31
31
|
# using faster flat table driven FSM, about 25% larger code, but about 30% faster
|
|
@@ -42,7 +42,7 @@ namespace :ragel do
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
desc "Delete the ragel generated source file(s)"
|
|
45
|
-
task :clean do
|
|
45
|
+
task :clean do
|
|
46
46
|
RAGEL_SOURCE_FILES.each do |file|
|
|
47
47
|
sh "rm -f #{RAGEL_OUTPUT_DIR}/#{file}.rb"
|
|
48
48
|
end
|
|
@@ -34,6 +34,10 @@ module Regexp::Expression
|
|
|
34
34
|
|
|
35
35
|
alias :starts_at :ts
|
|
36
36
|
|
|
37
|
+
def base_length
|
|
38
|
+
to_s(:base).length
|
|
39
|
+
end
|
|
40
|
+
|
|
37
41
|
def full_length
|
|
38
42
|
to_s.length
|
|
39
43
|
end
|
|
@@ -80,8 +84,12 @@ module Regexp::Expression
|
|
|
80
84
|
return 1..1 unless quantified?
|
|
81
85
|
min = quantifier.min
|
|
82
86
|
max = quantifier.max < 0 ? Float::INFINITY : quantifier.max
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
range = min..max
|
|
88
|
+
# fix Range#minmax on old Rubies - https://bugs.ruby-lang.org/issues/15807
|
|
89
|
+
if RUBY_VERSION.to_f < 2.7
|
|
90
|
+
range.define_singleton_method(:minmax) { [min, max] }
|
|
91
|
+
end
|
|
92
|
+
range
|
|
85
93
|
end
|
|
86
94
|
|
|
87
95
|
def greedy?
|
|
@@ -114,23 +122,6 @@ module Regexp::Expression
|
|
|
114
122
|
alias :to_h :attributes
|
|
115
123
|
end
|
|
116
124
|
|
|
117
|
-
def self.parsed(exp)
|
|
118
|
-
warn('WARNING: Regexp::Expression::Base.parsed is buggy and '\
|
|
119
|
-
'will be removed in 2.0.0. Use Regexp::Parser.parse instead.')
|
|
120
|
-
case exp
|
|
121
|
-
when String
|
|
122
|
-
Regexp::Parser.parse(exp)
|
|
123
|
-
when Regexp
|
|
124
|
-
Regexp::Parser.parse(exp.source) # <- causes loss of root options
|
|
125
|
-
when Regexp::Expression # <- never triggers
|
|
126
|
-
exp
|
|
127
|
-
else
|
|
128
|
-
raise ArgumentError, 'Expression.parsed accepts a String, Regexp, or '\
|
|
129
|
-
'a Regexp::Expression as a value for exp, but it '\
|
|
130
|
-
"was given #{exp.class.name}."
|
|
131
|
-
end
|
|
132
|
-
end
|
|
133
|
-
|
|
134
125
|
end # module Regexp::Expression
|
|
135
126
|
|
|
136
127
|
require 'regexp_parser/expression/quantifier'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Regexp::Expression
|
|
2
2
|
|
|
3
3
|
class FreeSpace < Regexp::Expression::Base
|
|
4
|
-
def quantify(
|
|
4
|
+
def quantify(_token, _text, _min = nil, _max = nil, _mode = :greedy)
|
|
5
5
|
raise "Can not quantify a free space object"
|
|
6
6
|
end
|
|
7
7
|
end
|
|
@@ -10,9 +10,29 @@ module Regexp::Expression
|
|
|
10
10
|
def comment?; false end
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
class
|
|
14
|
-
|
|
13
|
+
class Passive < Group::Base
|
|
14
|
+
attr_writer :implicit
|
|
15
|
+
|
|
16
|
+
def initialize(*)
|
|
17
|
+
@implicit = false
|
|
18
|
+
super
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def to_s(format = :full)
|
|
22
|
+
if implicit?
|
|
23
|
+
"#{expressions.join}#{quantifier_affix(format)}"
|
|
24
|
+
else
|
|
25
|
+
super
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def implicit?
|
|
30
|
+
@implicit
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
15
34
|
class Absence < Group::Base; end
|
|
35
|
+
class Atomic < Group::Base; end
|
|
16
36
|
class Options < Group::Base
|
|
17
37
|
attr_accessor :option_changes
|
|
18
38
|
end
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
module Regexp::Expression
|
|
2
2
|
|
|
3
3
|
class Root < Regexp::Expression::Subexpression
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
unless args.first.is_a?(Regexp::Token)
|
|
7
|
-
warn('WARNING: Root.new without a Token argument is deprecated and '\
|
|
8
|
-
'will be removed in 2.0.0. Use Root.build for the old behavior.')
|
|
9
|
-
return super(self.class.build_token, *args)
|
|
10
|
-
end
|
|
11
|
-
super
|
|
4
|
+
def self.build(options = {})
|
|
5
|
+
new(build_token, options)
|
|
12
6
|
end
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
new(build_token, options)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def build_token
|
|
20
|
-
Regexp::Token.new(:expression, :root, '', 0)
|
|
21
|
-
end
|
|
8
|
+
def self.build_token
|
|
9
|
+
Regexp::Token.new(:expression, :root, '', 0)
|
|
22
10
|
end
|
|
23
11
|
end
|
|
24
12
|
end
|
|
@@ -10,7 +10,7 @@ class Regexp::MatchLength
|
|
|
10
10
|
self.exp_class = exp.class
|
|
11
11
|
self.min_rep = exp.repetitions.min
|
|
12
12
|
self.max_rep = exp.repetitions.max
|
|
13
|
-
if base = opts[:base]
|
|
13
|
+
if (base = opts[:base])
|
|
14
14
|
self.base_min = base
|
|
15
15
|
self.base_max = base
|
|
16
16
|
self.reify = ->{ '.' * base }
|
|
@@ -32,7 +32,7 @@ class Regexp::MatchLength
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
def endless_each
|
|
35
|
+
def endless_each
|
|
36
36
|
return enum_for(__method__) unless block_given?
|
|
37
37
|
(min..max).each { |num| yield(num) if include?(num) }
|
|
38
38
|
end
|
|
@@ -36,7 +36,7 @@ module Regexp::Expression
|
|
|
36
36
|
|
|
37
37
|
# Iterates over the expressions of this expression as an array, passing
|
|
38
38
|
# the expression and its index within its parent to the given block.
|
|
39
|
-
def each_expression(include_self = false
|
|
39
|
+
def each_expression(include_self = false)
|
|
40
40
|
return enum_for(__method__, include_self) unless block_given?
|
|
41
41
|
|
|
42
42
|
traverse(include_self) do |event, exp, index|
|
|
@@ -47,7 +47,7 @@ module Regexp::Expression
|
|
|
47
47
|
# Returns a new array with the results of calling the given block once
|
|
48
48
|
# for every expression. If a block is not given, returns an array with
|
|
49
49
|
# each expression and its level index as an array.
|
|
50
|
-
def flat_map(include_self = false
|
|
50
|
+
def flat_map(include_self = false)
|
|
51
51
|
result = []
|
|
52
52
|
|
|
53
53
|
each_expression(include_self) do |exp, index|
|
|
@@ -40,5 +40,14 @@ module Regexp::Expression
|
|
|
40
40
|
RUBY
|
|
41
41
|
end
|
|
42
42
|
alias :lazy? :reluctant?
|
|
43
|
+
|
|
44
|
+
def ==(other)
|
|
45
|
+
other.class == self.class &&
|
|
46
|
+
other.token == token &&
|
|
47
|
+
other.mode == mode &&
|
|
48
|
+
other.min == min &&
|
|
49
|
+
other.max == max
|
|
50
|
+
end
|
|
51
|
+
alias :eq :==
|
|
43
52
|
end
|
|
44
53
|
end
|
|
@@ -7,16 +7,6 @@ module Regexp::Expression
|
|
|
7
7
|
# Used as the base class for the Alternation alternatives, Conditional
|
|
8
8
|
# branches, and CharacterSet::Intersection intersected sequences.
|
|
9
9
|
class Sequence < Regexp::Expression::Subexpression
|
|
10
|
-
# TODO: this override is here for backwards compatibility, remove in 2.0.0
|
|
11
|
-
def initialize(*args)
|
|
12
|
-
if args.count == 3
|
|
13
|
-
warn('WARNING: Sequence.new without a Regexp::Token argument is '\
|
|
14
|
-
'deprecated and will be removed in 2.0.0.')
|
|
15
|
-
return self.class.at_levels(*args)
|
|
16
|
-
end
|
|
17
|
-
super
|
|
18
|
-
end
|
|
19
|
-
|
|
20
10
|
class << self
|
|
21
11
|
def add_to(subexpression, params = {}, active_opts = {})
|
|
22
12
|
sequence = at_levels(
|
data/lib/regexp_parser/lexer.rb
CHANGED
|
@@ -96,10 +96,10 @@ class Regexp::Lexer
|
|
|
96
96
|
|
|
97
97
|
tokens.pop
|
|
98
98
|
tokens << Regexp::Token.new(:literal, :literal, lead,
|
|
99
|
-
token.ts, (token.te - last.
|
|
99
|
+
token.ts, (token.te - last.length),
|
|
100
100
|
nesting, set_nesting, conditional_nesting)
|
|
101
101
|
tokens << Regexp::Token.new(:literal, :literal, last,
|
|
102
|
-
(token.ts + lead.
|
|
102
|
+
(token.ts + lead.length), token.te,
|
|
103
103
|
nesting, set_nesting, conditional_nesting)
|
|
104
104
|
end
|
|
105
105
|
|
data/lib/regexp_parser/parser.rb
CHANGED
|
@@ -143,8 +143,6 @@ class Regexp::Parser
|
|
|
143
143
|
range(token)
|
|
144
144
|
when :intersection
|
|
145
145
|
intersection(token)
|
|
146
|
-
when :collation, :equivalent
|
|
147
|
-
node << Literal.new(token, active_opts)
|
|
148
146
|
else
|
|
149
147
|
raise UnknownTokenError.new('CharacterSet', token)
|
|
150
148
|
end
|
|
@@ -438,6 +436,28 @@ class Regexp::Parser
|
|
|
438
436
|
target_node || raise(ArgumentError, 'No valid target found for '\
|
|
439
437
|
"'#{token.text}' ")
|
|
440
438
|
|
|
439
|
+
# in case of chained quantifiers, wrap target in an implicit passive group
|
|
440
|
+
# description of the problem: https://github.com/ammar/regexp_parser/issues/3
|
|
441
|
+
# rationale for this solution: https://github.com/ammar/regexp_parser/pull/69
|
|
442
|
+
if target_node.quantified?
|
|
443
|
+
new_token = Regexp::Token.new(
|
|
444
|
+
:group,
|
|
445
|
+
:passive,
|
|
446
|
+
'', # text
|
|
447
|
+
target_node.ts,
|
|
448
|
+
nil, # te (unused)
|
|
449
|
+
target_node.level,
|
|
450
|
+
target_node.set_level,
|
|
451
|
+
target_node.conditional_level
|
|
452
|
+
)
|
|
453
|
+
new_group = Group::Passive.new(new_token, active_opts)
|
|
454
|
+
new_group.implicit = true
|
|
455
|
+
new_group << target_node
|
|
456
|
+
increase_level(target_node)
|
|
457
|
+
node.expressions[offset] = new_group
|
|
458
|
+
target_node = new_group
|
|
459
|
+
end
|
|
460
|
+
|
|
441
461
|
case token.token
|
|
442
462
|
when :zero_or_one
|
|
443
463
|
target_node.quantify(:zero_or_one, token.text, 0, 1, :greedy)
|
|
@@ -468,6 +488,11 @@ class Regexp::Parser
|
|
|
468
488
|
end
|
|
469
489
|
end
|
|
470
490
|
|
|
491
|
+
def increase_level(exp)
|
|
492
|
+
exp.level += 1
|
|
493
|
+
exp.respond_to?(:each) && exp.each { |subexp| increase_level(subexp) }
|
|
494
|
+
end
|
|
495
|
+
|
|
471
496
|
def interval(target_node, token)
|
|
472
497
|
text = token.text
|
|
473
498
|
mchr = text[text.length-1].chr =~ /[?+]/ ? text[text.length-1].chr : nil
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# line 1 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
4
4
|
|
|
5
|
-
# line
|
|
5
|
+
# line 673 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
# THIS IS A GENERATED FILE, DO NOT EDIT DIRECTLY
|
|
@@ -88,72 +88,72 @@ class Regexp::Scanner
|
|
|
88
88
|
self.set_depth = 0
|
|
89
89
|
self.group_depth = 0
|
|
90
90
|
self.conditional_stack = []
|
|
91
|
+
self.char_pos = 0
|
|
91
92
|
|
|
92
93
|
|
|
93
|
-
# line
|
|
94
|
+
# line 94 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
|
94
95
|
class << self
|
|
95
96
|
attr_accessor :_re_scanner_trans_keys
|
|
96
97
|
private :_re_scanner_trans_keys, :_re_scanner_trans_keys=
|
|
97
98
|
end
|
|
98
99
|
self._re_scanner_trans_keys = [
|
|
99
100
|
0, 0, -128, -65, -128, -65,
|
|
100
|
-
-128, -65,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
39,
|
|
101
|
+
-128, -65, 41, 41, 39,
|
|
102
|
+
57, 39, 39, 33, 62,
|
|
103
|
+
62, 62, 39, 60, 39, 57,
|
|
104
|
+
39, 39, 48, 57, 39,
|
|
104
105
|
57, 39, 57, 48, 57,
|
|
105
|
-
|
|
106
|
-
48,
|
|
107
|
-
57,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
112, 112,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
92, 48, 123, 48, 102,
|
|
135
|
-
48, 102, 48, 102, 48, 102,
|
|
136
|
-
9, 125, 9, 125, 9,
|
|
106
|
+
45, 62, 62, 62, 48, 57,
|
|
107
|
+
48, 62, 43, 62, 48,
|
|
108
|
+
57, 48, 57, 48, 125,
|
|
109
|
+
44, 125, 123, 123, 9, 122,
|
|
110
|
+
9, 125, 9, 122, -128,
|
|
111
|
+
-65, -128, -65, 38, 38,
|
|
112
|
+
94, 120, 97, 120, 108, 115,
|
|
113
|
+
110, 112, 117, 117, 109,
|
|
114
|
+
109, 58, 58, 93, 93,
|
|
115
|
+
104, 104, 97, 97, 99, 99,
|
|
116
|
+
105, 105, 105, 105, 108,
|
|
117
|
+
108, 97, 97, 110, 110,
|
|
118
|
+
107, 107, 110, 110, 116, 116,
|
|
119
|
+
114, 114, 108, 108, 105,
|
|
120
|
+
105, 103, 103, 105, 105,
|
|
121
|
+
116, 116, 114, 114, 97, 97,
|
|
122
|
+
112, 112, 104, 104, 111,
|
|
123
|
+
111, 119, 119, 101, 101,
|
|
124
|
+
114, 114, 114, 117, 105, 105,
|
|
125
|
+
110, 110, 110, 110, 99,
|
|
126
|
+
99, 112, 112, 97, 97,
|
|
127
|
+
99, 99, 101, 101, 112, 112,
|
|
128
|
+
112, 112, 111, 111, 114,
|
|
129
|
+
114, 100, 100, 100, 100,
|
|
130
|
+
-128, -65, -128, -65, 45, 45,
|
|
131
|
+
92, 92, 92, 92, 45,
|
|
132
|
+
45, 92, 92, 92, 92,
|
|
133
|
+
48, 123, 48, 102, 48, 102,
|
|
134
|
+
48, 102, 48, 102, 9,
|
|
137
135
|
125, 9, 125, 9, 125,
|
|
138
|
-
9, 125,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
136
|
+
9, 125, 9, 125, 9, 125,
|
|
137
|
+
48, 123, 39, 39, 41,
|
|
138
|
+
41, 41, 57, 62, 62,
|
|
139
|
+
-128, 127, -62, -12, 1, 127,
|
|
142
140
|
1, 127, 9, 32, 33,
|
|
143
141
|
126, 10, 10, 63, 63,
|
|
144
|
-
33, 126, 33, 126,
|
|
145
|
-
43, 63, 43, 63,
|
|
146
|
-
|
|
147
|
-
68, 119, 80, 112,
|
|
148
|
-
-
|
|
149
|
-
-65,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
142
|
+
33, 126, 33, 126, 62, 62,
|
|
143
|
+
43, 63, 43, 63, 43,
|
|
144
|
+
63, 65, 122, 44, 57,
|
|
145
|
+
43, 63, 68, 119, 80, 112,
|
|
146
|
+
-62, 125, -128, -65, -128,
|
|
147
|
+
-65, -128, -65, 38, 38,
|
|
148
|
+
38, 93, 58, 58, 48, 122,
|
|
149
|
+
-62, 125, -128, -65, -128,
|
|
150
|
+
-65, -128, -65, 48, 55,
|
|
151
|
+
48, 55, 77, 77, 45, 45,
|
|
152
|
+
0, 0, 67, 99, 45,
|
|
153
|
+
45, 0, 0, 92, 92,
|
|
154
|
+
48, 102, 39, 60, 39, 57,
|
|
155
|
+
49, 57, 41, 57, 45,
|
|
156
|
+
62, 0
|
|
157
157
|
]
|
|
158
158
|
|
|
159
159
|
class << self
|
|
@@ -161,26 +161,25 @@ class << self
|
|
|
161
161
|
private :_re_scanner_key_spans, :_re_scanner_key_spans=
|
|
162
162
|
end
|
|
163
163
|
self._re_scanner_key_spans = [
|
|
164
|
-
0, 64, 64, 64,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
164
|
+
0, 64, 64, 64, 1, 19, 1, 30,
|
|
165
|
+
1, 22, 19, 1, 10, 19, 19, 10,
|
|
166
|
+
18, 1, 10, 15, 20, 10, 10, 78,
|
|
167
|
+
82, 1, 114, 117, 114, 64, 64, 1,
|
|
168
|
+
27, 24, 8, 3, 1, 1, 1, 1,
|
|
169
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
170
170
|
1, 1, 1, 1, 1, 1, 1, 1,
|
|
171
171
|
1, 1, 1, 1, 1, 1, 1, 1,
|
|
172
|
-
1,
|
|
172
|
+
1, 4, 1, 1, 1, 1, 1, 1,
|
|
173
173
|
1, 1, 1, 1, 1, 1, 1, 1,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
17, 75
|
|
174
|
+
64, 64, 1, 1, 1, 1, 1, 1,
|
|
175
|
+
76, 55, 55, 55, 55, 117, 117, 117,
|
|
176
|
+
117, 117, 117, 76, 1, 1, 17, 1,
|
|
177
|
+
256, 51, 127, 127, 24, 94, 1, 1,
|
|
178
|
+
94, 94, 1, 21, 21, 21, 58, 14,
|
|
179
|
+
21, 52, 33, 188, 64, 64, 64, 1,
|
|
180
|
+
56, 1, 75, 188, 64, 64, 64, 8,
|
|
181
|
+
8, 1, 1, 0, 33, 1, 0, 1,
|
|
182
|
+
55, 22, 19, 9, 17, 18
|
|
184
183
|
]
|
|
185
184
|
|
|
186
185
|
class << self
|
|
@@ -188,26 +187,25 @@ class << self
|
|
|
188
187
|
private :_re_scanner_index_offsets, :_re_scanner_index_offsets=
|
|
189
188
|
end
|
|
190
189
|
self._re_scanner_index_offsets = [
|
|
191
|
-
0, 0, 65, 130, 195,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
5427, 5445
|
|
190
|
+
0, 0, 65, 130, 195, 197, 217, 219,
|
|
191
|
+
250, 252, 275, 295, 297, 308, 328, 348,
|
|
192
|
+
359, 378, 380, 391, 407, 428, 439, 450,
|
|
193
|
+
529, 612, 614, 729, 847, 962, 1027, 1092,
|
|
194
|
+
1094, 1122, 1147, 1156, 1160, 1162, 1164, 1166,
|
|
195
|
+
1168, 1170, 1172, 1174, 1176, 1178, 1180, 1182,
|
|
196
|
+
1184, 1186, 1188, 1190, 1192, 1194, 1196, 1198,
|
|
197
|
+
1200, 1202, 1204, 1206, 1208, 1210, 1212, 1214,
|
|
198
|
+
1216, 1218, 1223, 1225, 1227, 1229, 1231, 1233,
|
|
199
|
+
1235, 1237, 1239, 1241, 1243, 1245, 1247, 1249,
|
|
200
|
+
1251, 1316, 1381, 1383, 1385, 1387, 1389, 1391,
|
|
201
|
+
1393, 1470, 1526, 1582, 1638, 1694, 1812, 1930,
|
|
202
|
+
2048, 2166, 2284, 2402, 2479, 2481, 2483, 2501,
|
|
203
|
+
2503, 2760, 2812, 2940, 3068, 3093, 3188, 3190,
|
|
204
|
+
3192, 3287, 3382, 3384, 3406, 3428, 3450, 3509,
|
|
205
|
+
3524, 3546, 3599, 3633, 3822, 3887, 3952, 4017,
|
|
206
|
+
4019, 4076, 4078, 4154, 4343, 4408, 4473, 4538,
|
|
207
|
+
4547, 4556, 4558, 4560, 4561, 4595, 4597, 4598,
|
|
208
|
+
4600, 4656, 4679, 4699, 4709, 4727
|
|
211
209
|
]
|
|
212
210
|
|
|
213
211
|
class << self
|
|
@@ -239,673 +237,576 @@ self._re_scanner_indicies = [
|
|
|
239
237
|
3, 3, 3, 3, 3, 3, 3, 3,
|
|
240
238
|
3, 3, 3, 3, 3, 3, 3, 3,
|
|
241
239
|
3, 3, 3, 3, 3, 3, 3, 3,
|
|
242
|
-
3, 3, 0,
|
|
243
|
-
|
|
244
|
-
4, 4, 4, 4, 4, 4, 4, 4,
|
|
245
|
-
4, 4, 4, 4, 4, 4, 4, 4,
|
|
240
|
+
3, 3, 0, 6, 5, 8, 7, 7,
|
|
241
|
+
7, 7, 7, 4, 7, 7, 4, 4,
|
|
246
242
|
4, 4, 4, 4, 4, 4, 4, 4,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
4, 4, 4,
|
|
251
|
-
|
|
252
|
-
5, 5, 5, 5, 5, 5, 5, 5,
|
|
253
|
-
5, 5, 5, 5, 5, 5, 5, 5,
|
|
254
|
-
5, 5, 5, 5, 5, 5, 5, 5,
|
|
255
|
-
5, 5, 5, 5, 5, 5, 5, 5,
|
|
256
|
-
5, 5, 5, 5, 5, 5, 5, 5,
|
|
257
|
-
5, 5, 5, 5, 5, 5, 5, 5,
|
|
258
|
-
5, 5, 5, 5, 0, 6, 6, 6,
|
|
259
|
-
6, 6, 6, 6, 6, 6, 6, 6,
|
|
260
|
-
6, 6, 6, 6, 6, 6, 6, 6,
|
|
261
|
-
6, 6, 6, 6, 6, 6, 6, 6,
|
|
262
|
-
6, 6, 6, 6, 6, 6, 6, 6,
|
|
263
|
-
6, 6, 6, 6, 6, 6, 6, 6,
|
|
264
|
-
6, 6, 6, 6, 6, 6, 6, 6,
|
|
265
|
-
6, 6, 6, 6, 6, 6, 6, 6,
|
|
266
|
-
6, 6, 6, 6, 6, 0, 9, 8,
|
|
267
|
-
10, 7, 7, 7, 7, 7, 7, 7,
|
|
268
|
-
7, 11, 11, 11, 11, 11, 11, 11,
|
|
269
|
-
11, 11, 11, 7, 7, 7, 7, 7,
|
|
270
|
-
7, 7, 11, 11, 11, 11, 11, 11,
|
|
271
|
-
11, 11, 11, 11, 11, 11, 11, 11,
|
|
243
|
+
7, 8, 7, 10, 9, 9, 9, 9,
|
|
244
|
+
9, 9, 9, 9, 9, 9, 9, 4,
|
|
245
|
+
9, 9, 4, 4, 4, 4, 4, 4,
|
|
246
|
+
4, 4, 4, 4, 9, 9, 9, 10,
|
|
247
|
+
8, 9, 8, 9, 12, 11, 11, 11,
|
|
272
248
|
11, 11, 11, 11, 11, 11, 11, 11,
|
|
273
|
-
11, 11, 11, 11, 7, 7, 7, 7,
|
|
274
|
-
11, 7, 11, 11, 11, 11, 11, 11,
|
|
275
249
|
11, 11, 11, 11, 11, 11, 11, 11,
|
|
276
|
-
11,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
14, 14, 14, 14, 14, 14, 14, 14,
|
|
301
|
-
14, 16, 14, 17, 14, 14, 14, 18,
|
|
302
|
-
14, 19, 14, 14, 20, 20, 20, 20,
|
|
303
|
-
20, 20, 20, 20, 20, 20, 14, 14,
|
|
304
|
-
14, 14, 14, 14, 14, 20, 20, 20,
|
|
305
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
306
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
307
|
-
20, 20, 20, 20, 20, 20, 20, 14,
|
|
308
|
-
14, 14, 14, 20, 14, 20, 20, 20,
|
|
309
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
310
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
311
|
-
20, 20, 20, 20, 20, 20, 20, 14,
|
|
312
|
-
21, 21, 21, 21, 21, 21, 21, 21,
|
|
313
|
-
21, 21, 14, 17, 14, 14, 14, 14,
|
|
314
|
-
14, 14, 14, 14, 21, 21, 21, 21,
|
|
315
|
-
21, 21, 21, 21, 21, 21, 14, 21,
|
|
316
|
-
22, 22, 22, 22, 22, 22, 22, 22,
|
|
317
|
-
22, 14, 17, 14, 14, 14, 18, 14,
|
|
318
|
-
18, 14, 14, 22, 22, 22, 22, 22,
|
|
319
|
-
22, 22, 22, 22, 22, 14, 17, 14,
|
|
320
|
-
14, 14, 18, 14, 18, 14, 14, 20,
|
|
321
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
322
|
-
20, 14, 14, 14, 14, 14, 14, 14,
|
|
323
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
324
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
325
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
326
|
-
20, 20, 14, 14, 14, 14, 20, 14,
|
|
327
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
328
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
329
|
-
20, 20, 20, 20, 20, 20, 20, 20,
|
|
330
|
-
20, 20, 14, 23, 14, 24, 14, 14,
|
|
250
|
+
11, 13, 11, 15, 14, 14, 14, 14,
|
|
251
|
+
14, 16, 14, 14, 11, 17, 17, 17,
|
|
252
|
+
17, 17, 17, 17, 17, 17, 14, 15,
|
|
253
|
+
14, 18, 17, 17, 17, 17, 17, 17,
|
|
254
|
+
17, 17, 17, 11, 15, 11, 11, 11,
|
|
255
|
+
11, 11, 11, 11, 11, 18, 18, 18,
|
|
256
|
+
18, 18, 18, 18, 18, 18, 18, 11,
|
|
257
|
+
15, 11, 11, 11, 19, 11, 19, 11,
|
|
258
|
+
11, 17, 17, 17, 17, 17, 17, 17,
|
|
259
|
+
17, 17, 17, 11, 18, 18, 18, 18,
|
|
260
|
+
18, 18, 18, 18, 18, 18, 11, 21,
|
|
261
|
+
20, 20, 11, 22, 22, 22, 22, 22,
|
|
262
|
+
22, 22, 22, 22, 20, 20, 20, 20,
|
|
263
|
+
15, 20, 15, 20, 23, 22, 22, 22,
|
|
264
|
+
22, 22, 22, 22, 22, 22, 11, 23,
|
|
265
|
+
23, 23, 23, 23, 23, 23, 23, 23,
|
|
266
|
+
23, 11, 11, 11, 11, 15, 11, 24,
|
|
267
|
+
11, 24, 11, 11, 22, 22, 22, 22,
|
|
268
|
+
22, 22, 22, 22, 22, 22, 11, 11,
|
|
269
|
+
11, 11, 15, 11, 23, 23, 23, 23,
|
|
270
|
+
23, 23, 23, 23, 23, 23, 11, 26,
|
|
271
|
+
26, 26, 26, 26, 26, 26, 26, 26,
|
|
272
|
+
26, 25, 26, 26, 26, 26, 26, 26,
|
|
273
|
+
26, 26, 26, 26, 25, 25, 25, 25,
|
|
331
274
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
332
|
-
25, 25, 14, 14, 14, 14, 17, 14,
|
|
333
|
-
14, 25, 25, 25, 25, 25, 25, 25,
|
|
334
275
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
335
276
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
336
|
-
25, 25, 25, 14, 14, 14, 14, 25,
|
|
337
|
-
14, 25, 25, 25, 25, 25, 25, 25,
|
|
338
277
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
339
278
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
340
|
-
25, 25, 25, 14, 26, 26, 26, 26,
|
|
341
|
-
26, 26, 26, 26, 26, 26, 14, 26,
|
|
342
|
-
26, 26, 26, 26, 26, 26, 26, 26,
|
|
343
|
-
26, 14, 14, 14, 14, 17, 14, 26,
|
|
344
|
-
27, 27, 27, 27, 27, 27, 27, 27,
|
|
345
|
-
27, 14, 23, 14, 23, 14, 14, 27,
|
|
346
|
-
27, 27, 27, 27, 27, 27, 27, 27,
|
|
347
|
-
27, 14, 14, 14, 14, 17, 14, 23,
|
|
348
|
-
14, 23, 14, 14, 25, 25, 25, 25,
|
|
349
|
-
25, 25, 25, 25, 25, 25, 14, 14,
|
|
350
|
-
14, 14, 17, 14, 14, 25, 25, 25,
|
|
351
279
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
352
280
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
353
|
-
25, 25, 25, 25, 25, 25, 25,
|
|
354
|
-
|
|
281
|
+
25, 25, 25, 25, 25, 25, 25, 27,
|
|
282
|
+
25, 26, 25, 25, 25, 28, 28, 28,
|
|
283
|
+
28, 28, 28, 28, 28, 28, 28, 25,
|
|
284
|
+
25, 25, 25, 25, 25, 25, 25, 25,
|
|
285
|
+
25, 25, 25, 25, 25, 25, 25, 25,
|
|
286
|
+
25, 25, 25, 25, 25, 25, 25, 25,
|
|
287
|
+
25, 25, 25, 25, 25, 25, 25, 25,
|
|
355
288
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
356
289
|
25, 25, 25, 25, 25, 25, 25, 25,
|
|
357
|
-
25, 25, 25, 25, 25, 25, 25,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
28, 28, 28, 28, 28, 28, 28, 28,
|
|
368
|
-
28, 28, 28, 28, 28, 28, 28, 28,
|
|
369
|
-
30, 28, 29, 28, 28, 28, 31, 31,
|
|
290
|
+
25, 25, 25, 25, 25, 25, 25, 25,
|
|
291
|
+
25, 25, 25, 25, 25, 25, 25, 25,
|
|
292
|
+
25, 25, 27, 25, 29, 30, 31, 31,
|
|
293
|
+
31, 31, 31, 30, 30, 30, 30, 30,
|
|
294
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
295
|
+
30, 30, 30, 30, 30, 31, 30, 30,
|
|
296
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
297
|
+
30, 30, 31, 31, 30, 31, 31, 31,
|
|
298
|
+
31, 31, 31, 31, 31, 31, 31, 30,
|
|
299
|
+
30, 30, 31, 30, 30, 30, 31, 31,
|
|
370
300
|
31, 31, 31, 31, 31, 31, 31, 31,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
745
|
-
155, 155, 10, 155, 154, 155, 154, 155,
|
|
746
|
-
155, 155, 154, 154, 154, 155, 155, 155,
|
|
747
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
748
|
-
155, 155, 155, 155, 155, 158, 155, 154,
|
|
749
|
-
154, 154, 155, 155, 155, 155, 155, 155,
|
|
750
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
751
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
752
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
753
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
754
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
755
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
756
|
-
155, 155, 155, 155, 155, 155, 155, 155,
|
|
757
|
-
155, 154, 155, 160, 159, 159, 159, 159,
|
|
758
|
-
159, 159, 159, 159, 159, 159, 159, 159,
|
|
759
|
-
159, 159, 159, 159, 159, 159, 159, 160,
|
|
760
|
-
159, 162, 161, 161, 161, 161, 161, 161,
|
|
761
|
-
161, 161, 161, 161, 161, 161, 161, 161,
|
|
762
|
-
161, 161, 161, 161, 161, 162, 161, 164,
|
|
763
|
-
163, 163, 163, 163, 163, 163, 163, 163,
|
|
764
|
-
163, 163, 163, 163, 163, 163, 163, 163,
|
|
765
|
-
163, 163, 163, 164, 163, 166, 166, 165,
|
|
766
|
-
165, 165, 165, 166, 165, 165, 165, 167,
|
|
767
|
-
165, 165, 165, 165, 165, 165, 165, 165,
|
|
768
|
-
165, 165, 165, 165, 165, 165, 166, 165,
|
|
769
|
-
165, 165, 165, 165, 165, 165, 166, 165,
|
|
770
|
-
165, 165, 165, 168, 165, 165, 165, 168,
|
|
771
|
-
165, 165, 165, 165, 165, 165, 165, 165,
|
|
772
|
-
165, 165, 165, 165, 165, 165, 166, 165,
|
|
773
|
-
170, 169, 169, 169, 31, 31, 31, 31,
|
|
774
|
-
31, 31, 31, 31, 31, 31, 169, 172,
|
|
775
|
-
171, 171, 171, 171, 171, 171, 171, 171,
|
|
301
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
302
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
303
|
+
30, 30, 30, 32, 31, 30, 31, 31,
|
|
304
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
305
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
306
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
307
|
+
30, 31, 31, 31, 31, 31, 30, 30,
|
|
308
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
309
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
310
|
+
31, 30, 30, 30, 30, 30, 30, 30,
|
|
311
|
+
30, 30, 30, 30, 30, 31, 31, 30,
|
|
312
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
313
|
+
31, 31, 30, 30, 30, 31, 30, 30,
|
|
314
|
+
30, 31, 31, 31, 31, 31, 31, 31,
|
|
315
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
316
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
317
|
+
31, 31, 31, 30, 30, 30, 30, 31,
|
|
318
|
+
30, 31, 31, 31, 31, 31, 31, 31,
|
|
319
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
320
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
321
|
+
31, 31, 31, 30, 30, 33, 30, 31,
|
|
322
|
+
31, 31, 31, 31, 30, 30, 30, 30,
|
|
323
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
324
|
+
30, 30, 30, 30, 30, 30, 31, 30,
|
|
325
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
326
|
+
30, 30, 30, 31, 31, 30, 31, 31,
|
|
327
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
328
|
+
30, 30, 30, 31, 30, 30, 30, 31,
|
|
329
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
330
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
331
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
332
|
+
31, 30, 30, 30, 30, 31, 30, 31,
|
|
333
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
334
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
335
|
+
31, 31, 31, 31, 31, 31, 31, 31,
|
|
336
|
+
31, 30, 35, 35, 35, 35, 35, 35,
|
|
337
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
338
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
339
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
340
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
341
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
342
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
343
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
344
|
+
35, 35, 34, 36, 36, 36, 36, 36,
|
|
345
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
346
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
347
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
348
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
349
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
350
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
351
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
352
|
+
36, 36, 36, 34, 38, 37, 41, 40,
|
|
353
|
+
40, 42, 43, 44, 45, 40, 40, 46,
|
|
354
|
+
40, 40, 40, 40, 47, 40, 40, 40,
|
|
355
|
+
48, 40, 40, 49, 40, 50, 40, 51,
|
|
356
|
+
52, 40, 42, 43, 44, 45, 40, 40,
|
|
357
|
+
46, 40, 40, 40, 40, 47, 40, 40,
|
|
358
|
+
40, 48, 40, 40, 49, 40, 50, 40,
|
|
359
|
+
51, 52, 40, 53, 40, 40, 40, 40,
|
|
360
|
+
40, 40, 54, 40, 55, 40, 56, 40,
|
|
361
|
+
57, 40, 58, 40, 59, 40, 60, 40,
|
|
362
|
+
61, 40, 58, 40, 62, 40, 63, 40,
|
|
363
|
+
58, 40, 64, 40, 65, 40, 66, 40,
|
|
364
|
+
58, 40, 67, 40, 68, 40, 69, 40,
|
|
365
|
+
58, 40, 70, 40, 71, 40, 72, 40,
|
|
366
|
+
58, 40, 73, 40, 74, 40, 75, 40,
|
|
367
|
+
58, 40, 76, 40, 77, 40, 78, 40,
|
|
368
|
+
58, 40, 79, 40, 40, 80, 40, 81,
|
|
369
|
+
40, 72, 40, 82, 40, 72, 40, 83,
|
|
370
|
+
40, 84, 40, 85, 40, 58, 40, 86,
|
|
371
|
+
40, 77, 40, 87, 40, 88, 40, 58,
|
|
372
|
+
40, 45, 40, 90, 90, 90, 90, 90,
|
|
373
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
374
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
375
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
376
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
377
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
378
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
379
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
380
|
+
90, 90, 90, 89, 91, 91, 91, 91,
|
|
381
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
382
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
383
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
384
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
385
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
386
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
387
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
388
|
+
91, 91, 91, 91, 89, 92, 30, 94,
|
|
389
|
+
93, 96, 93, 97, 30, 99, 98, 101,
|
|
390
|
+
98, 102, 102, 102, 102, 102, 102, 102,
|
|
391
|
+
102, 102, 102, 30, 30, 30, 30, 30,
|
|
392
|
+
30, 30, 102, 102, 102, 102, 102, 102,
|
|
393
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
394
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
395
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
396
|
+
30, 30, 102, 102, 102, 102, 102, 102,
|
|
397
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
398
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
399
|
+
30, 30, 30, 30, 103, 30, 104, 104,
|
|
400
|
+
104, 104, 104, 104, 104, 104, 104, 104,
|
|
401
|
+
30, 30, 30, 30, 30, 30, 30, 104,
|
|
402
|
+
104, 104, 104, 104, 104, 30, 30, 30,
|
|
403
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
404
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
405
|
+
30, 30, 30, 30, 30, 30, 30, 104,
|
|
406
|
+
104, 104, 104, 104, 104, 30, 105, 105,
|
|
407
|
+
105, 105, 105, 105, 105, 105, 105, 105,
|
|
408
|
+
30, 30, 30, 30, 30, 30, 30, 105,
|
|
409
|
+
105, 105, 105, 105, 105, 30, 30, 30,
|
|
410
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
411
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
412
|
+
30, 30, 30, 30, 30, 30, 30, 105,
|
|
413
|
+
105, 105, 105, 105, 105, 30, 106, 106,
|
|
414
|
+
106, 106, 106, 106, 106, 106, 106, 106,
|
|
415
|
+
30, 30, 30, 30, 30, 30, 30, 106,
|
|
416
|
+
106, 106, 106, 106, 106, 30, 30, 30,
|
|
417
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
418
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
419
|
+
30, 30, 30, 30, 30, 30, 30, 106,
|
|
420
|
+
106, 106, 106, 106, 106, 30, 107, 107,
|
|
421
|
+
107, 107, 107, 107, 107, 107, 107, 107,
|
|
422
|
+
30, 30, 30, 30, 30, 30, 30, 107,
|
|
423
|
+
107, 107, 107, 107, 107, 30, 30, 30,
|
|
424
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
425
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
426
|
+
30, 30, 30, 30, 30, 30, 30, 107,
|
|
427
|
+
107, 107, 107, 107, 107, 30, 103, 103,
|
|
428
|
+
103, 103, 103, 30, 30, 30, 30, 30,
|
|
429
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
430
|
+
30, 30, 30, 30, 30, 103, 30, 30,
|
|
431
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
432
|
+
30, 30, 30, 30, 30, 108, 108, 108,
|
|
433
|
+
108, 108, 108, 108, 108, 108, 108, 30,
|
|
434
|
+
30, 30, 30, 30, 30, 30, 108, 108,
|
|
435
|
+
108, 108, 108, 108, 30, 30, 30, 30,
|
|
436
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
437
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
438
|
+
30, 30, 30, 30, 30, 30, 108, 108,
|
|
439
|
+
108, 108, 108, 108, 30, 30, 30, 30,
|
|
440
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
441
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
442
|
+
30, 30, 106, 30, 103, 103, 103, 103,
|
|
443
|
+
103, 30, 30, 30, 30, 30, 30, 30,
|
|
444
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
445
|
+
30, 30, 30, 103, 30, 30, 30, 30,
|
|
446
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
447
|
+
30, 30, 30, 109, 109, 109, 109, 109,
|
|
448
|
+
109, 109, 109, 109, 109, 30, 30, 30,
|
|
449
|
+
30, 30, 30, 30, 109, 109, 109, 109,
|
|
450
|
+
109, 109, 30, 30, 30, 30, 30, 30,
|
|
451
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
452
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
453
|
+
30, 30, 30, 30, 109, 109, 109, 109,
|
|
454
|
+
109, 109, 30, 30, 30, 30, 30, 30,
|
|
455
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
456
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
457
|
+
106, 30, 103, 103, 103, 103, 103, 30,
|
|
458
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
459
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
460
|
+
30, 103, 30, 30, 30, 30, 30, 30,
|
|
461
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
462
|
+
30, 110, 110, 110, 110, 110, 110, 110,
|
|
463
|
+
110, 110, 110, 30, 30, 30, 30, 30,
|
|
464
|
+
30, 30, 110, 110, 110, 110, 110, 110,
|
|
465
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
466
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
467
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
468
|
+
30, 30, 110, 110, 110, 110, 110, 110,
|
|
469
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
470
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
471
|
+
30, 30, 30, 30, 30, 30, 106, 30,
|
|
472
|
+
103, 103, 103, 103, 103, 30, 30, 30,
|
|
473
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
474
|
+
30, 30, 30, 30, 30, 30, 30, 103,
|
|
475
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
476
|
+
30, 30, 30, 30, 30, 30, 30, 111,
|
|
477
|
+
111, 111, 111, 111, 111, 111, 111, 111,
|
|
478
|
+
111, 30, 30, 30, 30, 30, 30, 30,
|
|
479
|
+
111, 111, 111, 111, 111, 111, 30, 30,
|
|
480
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
481
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
482
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
483
|
+
111, 111, 111, 111, 111, 111, 30, 30,
|
|
484
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
485
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
486
|
+
30, 30, 30, 30, 106, 30, 103, 103,
|
|
487
|
+
103, 103, 103, 30, 30, 30, 30, 30,
|
|
488
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
489
|
+
30, 30, 30, 30, 30, 103, 30, 30,
|
|
490
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
491
|
+
30, 30, 30, 30, 30, 112, 112, 112,
|
|
492
|
+
112, 112, 112, 112, 112, 112, 112, 30,
|
|
493
|
+
30, 30, 30, 30, 30, 30, 112, 112,
|
|
494
|
+
112, 112, 112, 112, 30, 30, 30, 30,
|
|
495
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
496
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
497
|
+
30, 30, 30, 30, 30, 30, 112, 112,
|
|
498
|
+
112, 112, 112, 112, 30, 30, 30, 30,
|
|
499
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
500
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
501
|
+
30, 30, 106, 30, 103, 103, 103, 103,
|
|
502
|
+
103, 30, 30, 30, 30, 30, 30, 30,
|
|
503
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
504
|
+
30, 30, 30, 103, 30, 30, 30, 30,
|
|
505
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
506
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
507
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
508
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
509
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
510
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
511
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
512
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
513
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
514
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
515
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
516
|
+
106, 30, 114, 114, 114, 114, 114, 114,
|
|
517
|
+
114, 114, 114, 114, 113, 113, 113, 113,
|
|
518
|
+
113, 113, 113, 114, 114, 114, 114, 114,
|
|
519
|
+
114, 113, 113, 113, 113, 113, 113, 113,
|
|
520
|
+
113, 113, 113, 113, 113, 113, 113, 113,
|
|
521
|
+
113, 113, 113, 113, 113, 113, 113, 113,
|
|
522
|
+
113, 113, 113, 114, 114, 114, 114, 114,
|
|
523
|
+
114, 113, 113, 113, 113, 113, 113, 113,
|
|
524
|
+
113, 113, 113, 113, 113, 113, 113, 113,
|
|
525
|
+
113, 113, 113, 113, 113, 30, 113, 117,
|
|
526
|
+
116, 118, 115, 118, 115, 115, 115, 115,
|
|
527
|
+
115, 115, 119, 119, 119, 119, 119, 119,
|
|
528
|
+
119, 119, 119, 119, 115, 117, 120, 30,
|
|
529
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
530
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
531
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
532
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
533
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
534
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
535
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
536
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
537
|
+
30, 2, 2, 2, 2, 2, 2, 2,
|
|
538
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
|
539
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
|
540
|
+
2, 2, 2, 2, 2, 2, 2, 3,
|
|
541
|
+
3, 3, 3, 3, 3, 3, 3, 3,
|
|
542
|
+
3, 3, 3, 3, 3, 3, 3, 121,
|
|
543
|
+
121, 121, 121, 121, 30, 30, 30, 30,
|
|
544
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
545
|
+
122, 122, 122, 122, 122, 122, 122, 122,
|
|
546
|
+
123, 123, 123, 123, 123, 122, 122, 122,
|
|
547
|
+
122, 122, 122, 122, 122, 122, 122, 122,
|
|
548
|
+
122, 122, 122, 122, 122, 122, 122, 124,
|
|
549
|
+
125, 125, 126, 127, 125, 125, 125, 128,
|
|
550
|
+
129, 130, 131, 125, 125, 132, 125, 125,
|
|
551
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
552
|
+
125, 125, 125, 125, 125, 125, 133, 125,
|
|
553
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
554
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
555
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
556
|
+
125, 125, 134, 135, 136, 137, 125, 125,
|
|
557
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
558
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
559
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
560
|
+
125, 125, 138, 139, 136, 125, 122, 125,
|
|
561
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
|
562
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
|
563
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
|
564
|
+
2, 2, 2, 2, 2, 2, 3, 3,
|
|
565
|
+
3, 3, 3, 3, 3, 3, 3, 3,
|
|
566
|
+
3, 3, 3, 3, 3, 3, 121, 121,
|
|
567
|
+
121, 121, 121, 140, 122, 122, 122, 122,
|
|
568
|
+
122, 122, 122, 122, 122, 122, 122, 122,
|
|
569
|
+
122, 122, 122, 122, 122, 122, 122, 122,
|
|
570
|
+
122, 122, 122, 122, 122, 122, 122, 122,
|
|
571
|
+
122, 122, 122, 140, 140, 140, 140, 140,
|
|
572
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
573
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
574
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
575
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
576
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
577
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
578
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
579
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
580
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
581
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
582
|
+
140, 140, 140, 140, 140, 140, 140, 140,
|
|
583
|
+
140, 140, 122, 140, 122, 122, 122, 122,
|
|
584
|
+
122, 122, 122, 122, 123, 123, 123, 123,
|
|
585
|
+
123, 122, 122, 122, 122, 122, 122, 122,
|
|
586
|
+
122, 122, 122, 122, 122, 122, 122, 122,
|
|
587
|
+
122, 122, 122, 124, 141, 141, 141, 141,
|
|
588
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
589
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
590
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
591
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
592
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
593
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
594
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
595
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
596
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
597
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
598
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
599
|
+
141, 141, 122, 141, 124, 124, 124, 124,
|
|
600
|
+
124, 141, 141, 141, 141, 141, 141, 141,
|
|
601
|
+
141, 141, 141, 141, 141, 141, 141, 141,
|
|
602
|
+
141, 141, 141, 124, 141, 125, 125, 140,
|
|
603
|
+
140, 125, 125, 125, 140, 140, 140, 140,
|
|
604
|
+
125, 125, 140, 125, 125, 125, 125, 125,
|
|
605
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
606
|
+
125, 125, 125, 140, 125, 125, 125, 125,
|
|
607
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
608
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
609
|
+
125, 125, 125, 125, 125, 125, 125, 140,
|
|
610
|
+
140, 140, 140, 125, 125, 125, 125, 125,
|
|
611
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
612
|
+
125, 125, 125, 125, 125, 125, 125, 125,
|
|
613
|
+
125, 125, 125, 125, 125, 125, 125, 140,
|
|
614
|
+
140, 140, 125, 140, 143, 126, 145, 144,
|
|
615
|
+
148, 147, 5, 147, 147, 147, 149, 150,
|
|
616
|
+
146, 147, 147, 147, 147, 147, 147, 147,
|
|
617
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
618
|
+
147, 8, 147, 151, 148, 8, 147, 147,
|
|
619
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
620
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
621
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
622
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
623
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
624
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
625
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
626
|
+
147, 147, 147, 147, 147, 8, 147, 146,
|
|
627
|
+
147, 146, 147, 147, 147, 146, 146, 146,
|
|
628
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
629
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
630
|
+
152, 147, 146, 146, 146, 147, 147, 147,
|
|
631
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
632
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
633
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
634
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
635
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
636
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
637
|
+
147, 147, 147, 147, 147, 147, 147, 147,
|
|
638
|
+
147, 147, 147, 147, 146, 147, 8, 9,
|
|
639
|
+
155, 154, 154, 154, 154, 154, 154, 154,
|
|
640
|
+
154, 154, 154, 154, 154, 154, 154, 154,
|
|
641
|
+
154, 154, 154, 154, 155, 154, 157, 156,
|
|
642
|
+
156, 156, 156, 156, 156, 156, 156, 156,
|
|
643
|
+
156, 156, 156, 156, 156, 156, 156, 156,
|
|
644
|
+
156, 156, 157, 156, 159, 158, 158, 158,
|
|
645
|
+
158, 158, 158, 158, 158, 158, 158, 158,
|
|
646
|
+
158, 158, 158, 158, 158, 158, 158, 158,
|
|
647
|
+
159, 158, 161, 161, 160, 160, 160, 160,
|
|
648
|
+
161, 160, 160, 160, 162, 160, 160, 160,
|
|
649
|
+
160, 160, 160, 160, 160, 160, 160, 160,
|
|
650
|
+
160, 160, 160, 161, 160, 160, 160, 160,
|
|
651
|
+
160, 160, 160, 161, 160, 160, 160, 160,
|
|
652
|
+
163, 160, 160, 160, 163, 160, 160, 160,
|
|
653
|
+
160, 160, 160, 160, 160, 160, 160, 160,
|
|
654
|
+
160, 160, 160, 161, 160, 165, 164, 164,
|
|
655
|
+
164, 28, 28, 28, 28, 28, 28, 28,
|
|
656
|
+
28, 28, 28, 164, 167, 166, 166, 166,
|
|
657
|
+
166, 166, 166, 166, 166, 166, 166, 166,
|
|
658
|
+
166, 166, 166, 166, 166, 166, 166, 166,
|
|
659
|
+
167, 166, 168, 30, 30, 30, 168, 30,
|
|
660
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
661
|
+
168, 168, 30, 30, 30, 168, 168, 30,
|
|
662
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
663
|
+
30, 30, 168, 30, 30, 30, 168, 30,
|
|
664
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
665
|
+
30, 168, 30, 30, 30, 168, 30, 169,
|
|
666
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
667
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
668
|
+
30, 30, 30, 30, 30, 30, 30, 30,
|
|
669
|
+
30, 30, 30, 30, 30, 30, 30, 169,
|
|
670
|
+
30, 170, 170, 170, 170, 170, 170, 170,
|
|
671
|
+
170, 170, 170, 170, 170, 170, 170, 170,
|
|
672
|
+
170, 170, 170, 170, 170, 170, 170, 170,
|
|
673
|
+
170, 170, 170, 170, 170, 170, 170, 171,
|
|
776
674
|
171, 171, 171, 171, 171, 171, 171, 171,
|
|
777
|
-
171, 171, 171,
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
188, 188, 188, 188, 188, 188, 188, 188,
|
|
842
|
-
188, 188, 188, 188, 188, 188, 188, 188,
|
|
843
|
-
188, 188, 188, 188, 188, 190, 188, 193,
|
|
675
|
+
171, 171, 171, 171, 171, 171, 171, 172,
|
|
676
|
+
172, 172, 172, 172, 35, 35, 35, 35,
|
|
677
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
678
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
679
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
680
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
681
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
682
|
+
35, 35, 35, 173, 35, 174, 35, 173,
|
|
683
|
+
173, 173, 173, 35, 175, 173, 35, 35,
|
|
684
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
685
|
+
35, 35, 35, 35, 35, 35, 173, 35,
|
|
686
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
687
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
688
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
689
|
+
35, 35, 176, 177, 178, 179, 35, 35,
|
|
690
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
691
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
692
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
693
|
+
35, 35, 173, 173, 173, 35, 35, 35,
|
|
694
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
695
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
696
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
697
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
698
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
699
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
700
|
+
35, 35, 35, 35, 35, 35, 35, 35,
|
|
701
|
+
35, 35, 35, 35, 35, 35, 180, 36,
|
|
702
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
703
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
704
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
705
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
706
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
707
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
708
|
+
36, 36, 36, 36, 36, 36, 36, 36,
|
|
709
|
+
36, 36, 36, 36, 36, 36, 36, 180,
|
|
710
|
+
181, 181, 181, 181, 181, 181, 181, 181,
|
|
711
|
+
181, 181, 181, 181, 181, 181, 181, 181,
|
|
712
|
+
181, 181, 181, 181, 181, 181, 181, 181,
|
|
713
|
+
181, 181, 181, 181, 181, 181, 181, 181,
|
|
714
|
+
181, 181, 181, 181, 181, 181, 181, 181,
|
|
715
|
+
181, 181, 181, 181, 181, 181, 181, 181,
|
|
716
|
+
181, 181, 181, 181, 181, 181, 181, 181,
|
|
717
|
+
181, 181, 181, 181, 181, 181, 181, 181,
|
|
718
|
+
180, 182, 180, 184, 183, 183, 183, 183,
|
|
719
|
+
183, 183, 183, 183, 183, 183, 183, 183,
|
|
720
|
+
183, 183, 183, 183, 183, 183, 183, 183,
|
|
721
|
+
183, 183, 183, 183, 183, 183, 183, 183,
|
|
722
|
+
183, 183, 183, 183, 183, 183, 183, 183,
|
|
723
|
+
183, 183, 183, 183, 183, 183, 183, 183,
|
|
724
|
+
183, 183, 183, 183, 183, 183, 183, 183,
|
|
725
|
+
183, 183, 185, 183, 188, 187, 190, 190,
|
|
726
|
+
190, 190, 190, 190, 190, 190, 190, 190,
|
|
727
|
+
189, 189, 189, 189, 189, 189, 189, 190,
|
|
728
|
+
190, 190, 189, 189, 189, 190, 189, 189,
|
|
729
|
+
189, 190, 189, 190, 189, 189, 189, 189,
|
|
730
|
+
190, 189, 189, 189, 189, 189, 190, 189,
|
|
731
|
+
190, 189, 189, 189, 189, 189, 189, 189,
|
|
732
|
+
189, 190, 189, 189, 189, 190, 189, 189,
|
|
733
|
+
189, 190, 189, 189, 189, 189, 189, 189,
|
|
734
|
+
189, 189, 189, 189, 189, 189, 189, 189,
|
|
735
|
+
190, 189, 191, 191, 191, 191, 191, 191,
|
|
736
|
+
191, 191, 191, 191, 191, 191, 191, 191,
|
|
737
|
+
191, 191, 191, 191, 191, 191, 191, 191,
|
|
738
|
+
191, 191, 191, 191, 191, 191, 191, 191,
|
|
844
739
|
192, 192, 192, 192, 192, 192, 192, 192,
|
|
845
|
-
192, 192, 192,
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
740
|
+
192, 192, 192, 192, 192, 192, 192, 192,
|
|
741
|
+
193, 193, 193, 193, 193, 90, 90, 90,
|
|
742
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
743
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
744
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
745
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
746
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
747
|
+
90, 90, 90, 90, 194, 90, 90, 90,
|
|
748
|
+
194, 194, 194, 194, 90, 90, 194, 90,
|
|
749
|
+
195, 196, 196, 196, 196, 196, 196, 196,
|
|
750
|
+
197, 197, 90, 90, 90, 90, 90, 194,
|
|
751
|
+
90, 30, 30, 198, 199, 90, 90, 30,
|
|
752
|
+
199, 90, 90, 30, 90, 200, 90, 90,
|
|
753
|
+
201, 90, 199, 199, 90, 90, 90, 199,
|
|
754
|
+
199, 90, 30, 194, 194, 194, 194, 90,
|
|
755
|
+
90, 202, 202, 92, 199, 202, 202, 90,
|
|
756
|
+
199, 90, 90, 90, 90, 90, 202, 90,
|
|
757
|
+
201, 90, 202, 199, 202, 203, 202, 199,
|
|
758
|
+
204, 90, 30, 194, 194, 194, 90, 90,
|
|
759
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
760
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
761
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
762
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
763
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
764
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
765
|
+
90, 90, 90, 90, 90, 90, 90, 90,
|
|
766
|
+
90, 90, 90, 90, 90, 90, 90, 205,
|
|
767
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
768
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
769
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
770
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
771
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
772
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
773
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
774
|
+
91, 91, 91, 91, 91, 91, 91, 91,
|
|
775
|
+
205, 206, 206, 206, 206, 206, 206, 206,
|
|
776
|
+
206, 206, 206, 206, 206, 206, 206, 206,
|
|
777
|
+
206, 206, 206, 206, 206, 206, 206, 206,
|
|
778
|
+
206, 206, 206, 206, 206, 206, 206, 206,
|
|
779
|
+
206, 206, 206, 206, 206, 206, 206, 206,
|
|
780
|
+
206, 206, 206, 206, 206, 206, 206, 206,
|
|
781
|
+
206, 206, 206, 206, 206, 206, 206, 206,
|
|
782
|
+
206, 206, 206, 206, 206, 206, 206, 206,
|
|
783
|
+
206, 205, 208, 208, 208, 208, 208, 208,
|
|
784
|
+
208, 208, 207, 210, 210, 210, 210, 210,
|
|
785
|
+
210, 210, 210, 209, 212, 93, 214, 213,
|
|
786
|
+
93, 216, 98, 98, 98, 98, 98, 98,
|
|
787
|
+
98, 98, 98, 98, 98, 98, 98, 98,
|
|
788
|
+
98, 98, 98, 98, 98, 98, 98, 98,
|
|
789
|
+
98, 98, 98, 98, 98, 98, 98, 98,
|
|
790
|
+
98, 217, 98, 219, 218, 98, 101, 98,
|
|
791
|
+
221, 221, 221, 221, 221, 221, 221, 221,
|
|
792
|
+
221, 221, 220, 220, 220, 220, 220, 220,
|
|
793
|
+
220, 221, 221, 221, 221, 221, 221, 220,
|
|
794
|
+
220, 220, 220, 220, 220, 220, 220, 220,
|
|
795
|
+
220, 220, 220, 220, 220, 220, 220, 220,
|
|
796
|
+
220, 220, 220, 220, 220, 220, 220, 220,
|
|
797
|
+
220, 221, 221, 221, 221, 221, 221, 220,
|
|
798
|
+
223, 222, 222, 222, 222, 222, 224, 222,
|
|
799
|
+
222, 222, 225, 225, 225, 225, 225, 225,
|
|
800
|
+
225, 225, 225, 222, 222, 226, 222, 117,
|
|
801
|
+
116, 116, 116, 116, 116, 227, 116, 116,
|
|
802
|
+
227, 227, 227, 227, 227, 227, 227, 227,
|
|
803
|
+
227, 227, 116, 119, 119, 119, 119, 119,
|
|
804
|
+
119, 119, 119, 119, 227, 118, 227, 227,
|
|
805
|
+
227, 227, 227, 227, 119, 119, 119, 119,
|
|
806
|
+
119, 119, 119, 119, 119, 119, 227, 227,
|
|
807
|
+
120, 120, 227, 227, 227, 227, 227, 227,
|
|
808
|
+
227, 227, 227, 227, 120, 120, 120, 120,
|
|
809
|
+
117, 120, 0
|
|
909
810
|
]
|
|
910
811
|
|
|
911
812
|
class << self
|
|
@@ -913,35 +814,35 @@ class << self
|
|
|
913
814
|
private :_re_scanner_trans_targs, :_re_scanner_trans_targs=
|
|
914
815
|
end
|
|
915
816
|
self._re_scanner_trans_targs = [
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
21,
|
|
920
|
-
28,
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
817
|
+
104, 105, 1, 2, 104, 4, 104, 6,
|
|
818
|
+
104, 8, 114, 104, 10, 16, 11, 104,
|
|
819
|
+
12, 14, 13, 15, 17, 18, 20, 19,
|
|
820
|
+
21, 104, 23, 120, 24, 26, 0, 27,
|
|
821
|
+
28, 122, 123, 123, 29, 123, 123, 123,
|
|
822
|
+
123, 33, 34, 45, 49, 53, 57, 61,
|
|
823
|
+
65, 70, 74, 76, 79, 35, 42, 36,
|
|
824
|
+
40, 37, 38, 39, 123, 41, 43, 44,
|
|
825
|
+
46, 47, 48, 50, 51, 52, 54, 55,
|
|
826
|
+
56, 58, 59, 60, 62, 63, 64, 66,
|
|
827
|
+
68, 67, 69, 71, 72, 73, 75, 77,
|
|
828
|
+
78, 131, 131, 80, 83, 131, 137, 131,
|
|
829
|
+
139, 86, 131, 140, 131, 142, 89, 92,
|
|
830
|
+
90, 91, 131, 93, 94, 95, 96, 97,
|
|
831
|
+
98, 131, 144, 145, 100, 101, 145, 102,
|
|
832
|
+
103, 3, 106, 107, 108, 109, 110, 104,
|
|
833
|
+
111, 104, 115, 116, 104, 117, 104, 118,
|
|
834
|
+
104, 104, 119, 104, 104, 104, 104, 104,
|
|
835
|
+
104, 112, 104, 113, 104, 5, 104, 7,
|
|
836
|
+
104, 104, 104, 104, 104, 104, 104, 104,
|
|
837
|
+
104, 104, 104, 9, 104, 22, 104, 104,
|
|
838
|
+
121, 25, 124, 125, 126, 123, 127, 128,
|
|
839
|
+
129, 123, 123, 123, 123, 30, 123, 123,
|
|
840
|
+
31, 123, 123, 123, 32, 130, 130, 132,
|
|
841
|
+
133, 134, 131, 135, 135, 131, 82, 131,
|
|
842
|
+
85, 131, 131, 88, 99, 131, 81, 131,
|
|
843
|
+
136, 131, 131, 131, 138, 131, 84, 131,
|
|
844
|
+
141, 143, 131, 87, 131, 131, 145, 146,
|
|
845
|
+
147, 148, 149, 145
|
|
945
846
|
]
|
|
946
847
|
|
|
947
848
|
class << self
|
|
@@ -949,35 +850,35 @@ class << self
|
|
|
949
850
|
private :_re_scanner_trans_actions, :_re_scanner_trans_actions=
|
|
950
851
|
end
|
|
951
852
|
self._re_scanner_trans_actions = [
|
|
952
|
-
1, 2, 0,
|
|
953
|
-
|
|
954
|
-
0, 9, 0, 0, 0, 0, 0, 0,
|
|
955
|
-
0, 0, 0, 0, 10, 0, 0, 0,
|
|
956
|
-
0, 0, 0, 0, 12, 13, 14, 0,
|
|
957
|
-
15, 16, 17, 18, 0, 0, 19, 0,
|
|
853
|
+
1, 2, 0, 0, 3, 4, 5, 0,
|
|
854
|
+
6, 0, 7, 8, 0, 0, 0, 9,
|
|
958
855
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
856
|
+
0, 10, 0, 0, 0, 0, 0, 0,
|
|
857
|
+
0, 12, 13, 14, 0, 15, 16, 17,
|
|
858
|
+
18, 0, 0, 0, 0, 0, 0, 0,
|
|
959
859
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
960
|
-
0, 0,
|
|
860
|
+
0, 0, 0, 0, 19, 0, 0, 0,
|
|
961
861
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
962
862
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
963
863
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
964
|
-
0, 21, 0,
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
0,
|
|
864
|
+
0, 20, 21, 0, 0, 23, 0, 24,
|
|
865
|
+
0, 0, 25, 0, 26, 0, 0, 0,
|
|
866
|
+
0, 0, 27, 0, 0, 0, 0, 0,
|
|
867
|
+
0, 28, 0, 29, 0, 0, 30, 0,
|
|
968
868
|
0, 0, 0, 0, 0, 0, 0, 33,
|
|
969
869
|
34, 35, 0, 0, 36, 0, 37, 38,
|
|
970
870
|
39, 40, 38, 41, 42, 43, 44, 45,
|
|
971
|
-
46, 47, 48, 0, 49, 0, 50,
|
|
972
|
-
52, 53, 54, 55, 56, 57, 58,
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
69, 70,
|
|
976
|
-
|
|
977
|
-
80, 81, 82,
|
|
978
|
-
0,
|
|
979
|
-
|
|
980
|
-
|
|
871
|
+
46, 47, 48, 0, 49, 0, 50, 0,
|
|
872
|
+
51, 52, 53, 54, 55, 56, 57, 58,
|
|
873
|
+
59, 60, 61, 0, 62, 0, 63, 64,
|
|
874
|
+
66, 0, 0, 38, 38, 67, 0, 38,
|
|
875
|
+
68, 69, 70, 71, 72, 0, 73, 74,
|
|
876
|
+
0, 75, 76, 77, 0, 78, 79, 0,
|
|
877
|
+
38, 38, 80, 81, 82, 83, 0, 84,
|
|
878
|
+
0, 85, 86, 0, 0, 87, 0, 88,
|
|
879
|
+
0, 89, 90, 91, 38, 92, 0, 93,
|
|
880
|
+
38, 0, 94, 0, 95, 96, 97, 38,
|
|
881
|
+
38, 38, 38, 98
|
|
981
882
|
]
|
|
982
883
|
|
|
983
884
|
class << self
|
|
@@ -998,13 +899,12 @@ self._re_scanner_to_state_actions = [
|
|
|
998
899
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
999
900
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1000
901
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1001
|
-
|
|
902
|
+
31, 0, 0, 0, 0, 0, 0, 0,
|
|
1002
903
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
904
|
+
0, 65, 65, 65, 0, 0, 0, 0,
|
|
905
|
+
0, 0, 65, 65, 0, 0, 0, 0,
|
|
1003
906
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1004
|
-
|
|
1005
|
-
0, 63, 63, 0, 0, 0, 0, 0,
|
|
1006
|
-
0, 0, 0, 0, 0, 63, 0, 0,
|
|
1007
|
-
0, 0
|
|
907
|
+
0, 65, 0, 0, 0, 0
|
|
1008
908
|
]
|
|
1009
909
|
|
|
1010
910
|
class << self
|
|
@@ -1025,13 +925,12 @@ self._re_scanner_from_state_actions = [
|
|
|
1025
925
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1026
926
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1027
927
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1028
|
-
|
|
928
|
+
32, 0, 0, 0, 0, 0, 0, 0,
|
|
1029
929
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
930
|
+
0, 32, 32, 32, 0, 0, 0, 0,
|
|
931
|
+
0, 0, 32, 32, 0, 0, 0, 0,
|
|
1030
932
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1031
|
-
|
|
1032
|
-
0, 32, 32, 0, 0, 0, 0, 0,
|
|
1033
|
-
0, 0, 0, 0, 0, 32, 0, 0,
|
|
1034
|
-
0, 0
|
|
933
|
+
0, 32, 0, 0, 0, 0
|
|
1035
934
|
]
|
|
1036
935
|
|
|
1037
936
|
class << self
|
|
@@ -1042,23 +941,22 @@ self._re_scanner_eof_actions = [
|
|
|
1042
941
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1043
942
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1044
943
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1045
|
-
0,
|
|
1046
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
|
944
|
+
0, 11, 11, 11, 11, 0, 0, 0,
|
|
1047
945
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1048
946
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1049
947
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1050
948
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1051
949
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1052
950
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1053
|
-
|
|
951
|
+
0, 0, 22, 22, 0, 22, 22, 0,
|
|
1054
952
|
22, 22, 22, 22, 22, 22, 22, 22,
|
|
1055
|
-
22, 22,
|
|
953
|
+
22, 22, 22, 22, 0, 0, 0, 0,
|
|
1056
954
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1057
955
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1058
|
-
0, 0,
|
|
1059
|
-
0, 0,
|
|
956
|
+
0, 0, 0, 22, 0, 0, 0, 0,
|
|
957
|
+
0, 0, 0, 22, 0, 0, 0, 0,
|
|
1060
958
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1061
|
-
0, 0
|
|
959
|
+
0, 0, 0, 0, 0, 0
|
|
1062
960
|
]
|
|
1063
961
|
|
|
1064
962
|
class << self
|
|
@@ -1066,36 +964,35 @@ class << self
|
|
|
1066
964
|
private :_re_scanner_eof_trans, :_re_scanner_eof_trans=
|
|
1067
965
|
end
|
|
1068
966
|
self._re_scanner_eof_trans = [
|
|
1069
|
-
0, 1, 1, 1,
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
0, 0, 102, 0, 0, 107, 0, 0,
|
|
967
|
+
0, 1, 1, 1, 5, 5, 5, 5,
|
|
968
|
+
1, 12, 12, 12, 12, 12, 12, 12,
|
|
969
|
+
12, 12, 12, 12, 12, 12, 26, 26,
|
|
970
|
+
26, 0, 0, 0, 0, 35, 35, 38,
|
|
971
|
+
40, 40, 40, 40, 40, 40, 40, 40,
|
|
972
|
+
40, 40, 40, 40, 40, 40, 40, 40,
|
|
973
|
+
40, 40, 40, 40, 40, 40, 40, 40,
|
|
974
|
+
40, 40, 40, 40, 40, 40, 40, 40,
|
|
975
|
+
40, 40, 40, 40, 40, 40, 40, 40,
|
|
976
|
+
40, 40, 40, 40, 40, 40, 40, 40,
|
|
977
|
+
90, 90, 0, 0, 96, 0, 0, 101,
|
|
1081
978
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
1082
|
-
0, 0,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
979
|
+
0, 0, 0, 0, 116, 116, 116, 116,
|
|
980
|
+
0, 141, 141, 142, 142, 141, 143, 145,
|
|
981
|
+
147, 147, 154, 155, 157, 159, 161, 165,
|
|
982
|
+
167, 0, 0, 0, 181, 181, 181, 181,
|
|
983
|
+
184, 187, 0, 0, 206, 206, 206, 208,
|
|
984
|
+
210, 212, 212, 212, 216, 216, 216, 216,
|
|
985
|
+
221, 0, 228, 228, 228, 228
|
|
1089
986
|
]
|
|
1090
987
|
|
|
1091
988
|
class << self
|
|
1092
989
|
attr_accessor :re_scanner_start
|
|
1093
990
|
end
|
|
1094
|
-
self.re_scanner_start =
|
|
991
|
+
self.re_scanner_start = 104;
|
|
1095
992
|
class << self
|
|
1096
993
|
attr_accessor :re_scanner_first_final
|
|
1097
994
|
end
|
|
1098
|
-
self.re_scanner_first_final =
|
|
995
|
+
self.re_scanner_first_final = 104;
|
|
1099
996
|
class << self
|
|
1100
997
|
attr_accessor :re_scanner_error
|
|
1101
998
|
end
|
|
@@ -1104,36 +1001,36 @@ self.re_scanner_error = 0;
|
|
|
1104
1001
|
class << self
|
|
1105
1002
|
attr_accessor :re_scanner_en_char_type
|
|
1106
1003
|
end
|
|
1107
|
-
self.re_scanner_en_char_type =
|
|
1004
|
+
self.re_scanner_en_char_type = 121;
|
|
1108
1005
|
class << self
|
|
1109
1006
|
attr_accessor :re_scanner_en_unicode_property
|
|
1110
1007
|
end
|
|
1111
|
-
self.re_scanner_en_unicode_property =
|
|
1008
|
+
self.re_scanner_en_unicode_property = 122;
|
|
1112
1009
|
class << self
|
|
1113
1010
|
attr_accessor :re_scanner_en_character_set
|
|
1114
1011
|
end
|
|
1115
|
-
self.re_scanner_en_character_set =
|
|
1012
|
+
self.re_scanner_en_character_set = 123;
|
|
1116
1013
|
class << self
|
|
1117
1014
|
attr_accessor :re_scanner_en_set_escape_sequence
|
|
1118
1015
|
end
|
|
1119
|
-
self.re_scanner_en_set_escape_sequence =
|
|
1016
|
+
self.re_scanner_en_set_escape_sequence = 130;
|
|
1120
1017
|
class << self
|
|
1121
1018
|
attr_accessor :re_scanner_en_escape_sequence
|
|
1122
1019
|
end
|
|
1123
|
-
self.re_scanner_en_escape_sequence =
|
|
1020
|
+
self.re_scanner_en_escape_sequence = 131;
|
|
1124
1021
|
class << self
|
|
1125
1022
|
attr_accessor :re_scanner_en_conditional_expression
|
|
1126
1023
|
end
|
|
1127
|
-
self.re_scanner_en_conditional_expression =
|
|
1024
|
+
self.re_scanner_en_conditional_expression = 145;
|
|
1128
1025
|
class << self
|
|
1129
1026
|
attr_accessor :re_scanner_en_main
|
|
1130
1027
|
end
|
|
1131
|
-
self.re_scanner_en_main =
|
|
1028
|
+
self.re_scanner_en_main = 104;
|
|
1132
1029
|
|
|
1133
1030
|
|
|
1134
|
-
# line
|
|
1031
|
+
# line 761 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1135
1032
|
|
|
1136
|
-
# line
|
|
1033
|
+
# line 1033 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
|
1137
1034
|
begin
|
|
1138
1035
|
p ||= 0
|
|
1139
1036
|
pe ||= data.length
|
|
@@ -1144,9 +1041,9 @@ begin
|
|
|
1144
1041
|
act = 0
|
|
1145
1042
|
end
|
|
1146
1043
|
|
|
1147
|
-
# line
|
|
1044
|
+
# line 762 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1148
1045
|
|
|
1149
|
-
# line
|
|
1046
|
+
# line 1046 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
|
1150
1047
|
begin
|
|
1151
1048
|
testEof = false
|
|
1152
1049
|
_slen, _trans, _keys, _inds, _acts, _nacts = nil
|
|
@@ -1174,7 +1071,7 @@ begin
|
|
|
1174
1071
|
begin
|
|
1175
1072
|
ts = p
|
|
1176
1073
|
end
|
|
1177
|
-
# line
|
|
1074
|
+
# line 1074 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
|
1178
1075
|
end
|
|
1179
1076
|
_keys = cs << 1
|
|
1180
1077
|
_inds = _re_scanner_index_offsets[cs]
|
|
@@ -1194,11 +1091,11 @@ ts = p
|
|
|
1194
1091
|
if _re_scanner_trans_actions[_trans] != 0
|
|
1195
1092
|
case _re_scanner_trans_actions[_trans]
|
|
1196
1093
|
when 34 then
|
|
1197
|
-
# line
|
|
1094
|
+
# line 151 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1198
1095
|
begin
|
|
1199
1096
|
self.group_depth = group_depth + 1 end
|
|
1200
1097
|
when 4 then
|
|
1201
|
-
# line
|
|
1098
|
+
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1202
1099
|
begin
|
|
1203
1100
|
self.group_depth = group_depth - 1 end
|
|
1204
1101
|
when 38 then
|
|
@@ -1206,22 +1103,22 @@ ts = p
|
|
|
1206
1103
|
begin
|
|
1207
1104
|
te = p+1
|
|
1208
1105
|
end
|
|
1209
|
-
when
|
|
1106
|
+
when 66 then
|
|
1210
1107
|
# line 12 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/char_type.rl"
|
|
1211
1108
|
begin
|
|
1212
1109
|
te = p+1
|
|
1213
1110
|
begin
|
|
1214
|
-
case text =
|
|
1215
|
-
when '\d'; emit(:type, :digit, text
|
|
1216
|
-
when '\D'; emit(:type, :nondigit, text
|
|
1217
|
-
when '\h'; emit(:type, :hex, text
|
|
1218
|
-
when '\H'; emit(:type, :nonhex, text
|
|
1219
|
-
when '\s'; emit(:type, :space, text
|
|
1220
|
-
when '\S'; emit(:type, :nonspace, text
|
|
1221
|
-
when '\w'; emit(:type, :word, text
|
|
1222
|
-
when '\W'; emit(:type, :nonword, text
|
|
1223
|
-
when '\R'; emit(:type, :linebreak, text
|
|
1224
|
-
when '\X'; emit(:type, :xgrapheme, text
|
|
1111
|
+
case text = copy(data, ts-1, te)
|
|
1112
|
+
when '\d'; emit(:type, :digit, text)
|
|
1113
|
+
when '\D'; emit(:type, :nondigit, text)
|
|
1114
|
+
when '\h'; emit(:type, :hex, text)
|
|
1115
|
+
when '\H'; emit(:type, :nonhex, text)
|
|
1116
|
+
when '\s'; emit(:type, :space, text)
|
|
1117
|
+
when '\S'; emit(:type, :nonspace, text)
|
|
1118
|
+
when '\w'; emit(:type, :word, text)
|
|
1119
|
+
when '\W'; emit(:type, :nonword, text)
|
|
1120
|
+
when '\R'; emit(:type, :linebreak, text)
|
|
1121
|
+
when '\X'; emit(:type, :xgrapheme, text)
|
|
1225
1122
|
end
|
|
1226
1123
|
begin
|
|
1227
1124
|
top -= 1
|
|
@@ -1237,7 +1134,7 @@ te = p+1
|
|
|
1237
1134
|
begin
|
|
1238
1135
|
te = p+1
|
|
1239
1136
|
begin
|
|
1240
|
-
text =
|
|
1137
|
+
text = copy(data, ts-1, te)
|
|
1241
1138
|
type = (text[1] == 'P') ^ (text[3] == '^') ? :nonproperty : :property
|
|
1242
1139
|
|
|
1243
1140
|
name = data[ts+2..te-2].pack('c*').gsub(/[\^\s_\-]/, '').downcase
|
|
@@ -1245,7 +1142,7 @@ te = p+1
|
|
|
1245
1142
|
token = self.class.short_prop_map[name] || self.class.long_prop_map[name]
|
|
1246
1143
|
raise UnknownUnicodePropertyError.new(name) unless token
|
|
1247
1144
|
|
|
1248
|
-
self.emit(type, token.to_sym, text
|
|
1145
|
+
self.emit(type, token.to_sym, text)
|
|
1249
1146
|
|
|
1250
1147
|
begin
|
|
1251
1148
|
top -= 1
|
|
@@ -1257,132 +1154,130 @@ te = p+1
|
|
|
1257
1154
|
end
|
|
1258
1155
|
end
|
|
1259
1156
|
when 16 then
|
|
1260
|
-
# line
|
|
1157
|
+
# line 179 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1261
1158
|
begin
|
|
1262
1159
|
te = p+1
|
|
1263
1160
|
begin # special case, emits two tokens
|
|
1264
|
-
emit(:literal, :literal, '-'
|
|
1265
|
-
emit(:set, :intersection, '&&'
|
|
1161
|
+
emit(:literal, :literal, '-')
|
|
1162
|
+
emit(:set, :intersection, '&&')
|
|
1266
1163
|
end
|
|
1267
1164
|
end
|
|
1268
|
-
when
|
|
1269
|
-
# line
|
|
1165
|
+
when 71 then
|
|
1166
|
+
# line 184 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1270
1167
|
begin
|
|
1271
1168
|
te = p+1
|
|
1272
1169
|
begin
|
|
1273
|
-
text =
|
|
1170
|
+
text = copy(data, ts, te)
|
|
1274
1171
|
if tokens.last[1] == :open
|
|
1275
|
-
emit(:set, :negate, text
|
|
1172
|
+
emit(:set, :negate, text)
|
|
1276
1173
|
else
|
|
1277
|
-
emit(:literal, :literal, text
|
|
1174
|
+
emit(:literal, :literal, text)
|
|
1278
1175
|
end
|
|
1279
1176
|
end
|
|
1280
1177
|
end
|
|
1281
|
-
when
|
|
1282
|
-
# line
|
|
1178
|
+
when 73 then
|
|
1179
|
+
# line 205 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1283
1180
|
begin
|
|
1284
1181
|
te = p+1
|
|
1285
1182
|
begin
|
|
1286
|
-
emit(:set, :intersection,
|
|
1183
|
+
emit(:set, :intersection, copy(data, ts, te))
|
|
1287
1184
|
end
|
|
1288
1185
|
end
|
|
1289
|
-
when
|
|
1290
|
-
# line
|
|
1186
|
+
when 69 then
|
|
1187
|
+
# line 209 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1291
1188
|
begin
|
|
1292
1189
|
te = p+1
|
|
1293
1190
|
begin
|
|
1294
1191
|
begin
|
|
1295
1192
|
stack[top] = cs
|
|
1296
1193
|
top+= 1
|
|
1297
|
-
cs =
|
|
1194
|
+
cs = 130
|
|
1298
1195
|
_goto_level = _again
|
|
1299
1196
|
next
|
|
1300
1197
|
end
|
|
1301
1198
|
|
|
1302
1199
|
end
|
|
1303
1200
|
end
|
|
1304
|
-
when
|
|
1305
|
-
# line
|
|
1201
|
+
when 67 then
|
|
1202
|
+
# line 239 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1306
1203
|
begin
|
|
1307
1204
|
te = p+1
|
|
1308
1205
|
begin
|
|
1309
|
-
emit(:literal, :literal,
|
|
1206
|
+
emit(:literal, :literal, copy(data, ts, te))
|
|
1310
1207
|
end
|
|
1311
1208
|
end
|
|
1312
1209
|
when 14 then
|
|
1313
|
-
# line
|
|
1210
|
+
# line 243 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1314
1211
|
begin
|
|
1315
1212
|
te = p+1
|
|
1316
1213
|
begin
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
emit(:literal, :literal, char, *rest)
|
|
1214
|
+
text = copy(data, ts, te)
|
|
1215
|
+
emit(:literal, :literal, text)
|
|
1320
1216
|
end
|
|
1321
1217
|
end
|
|
1322
|
-
when
|
|
1323
|
-
# line
|
|
1218
|
+
when 74 then
|
|
1219
|
+
# line 193 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1324
1220
|
begin
|
|
1325
1221
|
te = p
|
|
1326
1222
|
p = p - 1; begin
|
|
1327
|
-
text =
|
|
1223
|
+
text = copy(data, ts, te)
|
|
1328
1224
|
# ranges cant start with a subset or intersection/negation/range operator
|
|
1329
1225
|
if tokens.last[0] == :set
|
|
1330
|
-
emit(:literal, :literal, text
|
|
1226
|
+
emit(:literal, :literal, text)
|
|
1331
1227
|
else
|
|
1332
|
-
emit(:set, :range, text
|
|
1228
|
+
emit(:set, :range, text)
|
|
1333
1229
|
end
|
|
1334
1230
|
end
|
|
1335
1231
|
end
|
|
1336
|
-
when
|
|
1337
|
-
# line
|
|
1232
|
+
when 77 then
|
|
1233
|
+
# line 213 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1338
1234
|
begin
|
|
1339
1235
|
te = p
|
|
1340
1236
|
p = p - 1; begin
|
|
1341
|
-
emit(:set, :open,
|
|
1237
|
+
emit(:set, :open, copy(data, ts, te))
|
|
1342
1238
|
begin
|
|
1343
1239
|
stack[top] = cs
|
|
1344
1240
|
top+= 1
|
|
1345
|
-
cs =
|
|
1241
|
+
cs = 123
|
|
1346
1242
|
_goto_level = _again
|
|
1347
1243
|
next
|
|
1348
1244
|
end
|
|
1349
1245
|
|
|
1350
1246
|
end
|
|
1351
1247
|
end
|
|
1352
|
-
when
|
|
1353
|
-
# line
|
|
1248
|
+
when 72 then
|
|
1249
|
+
# line 243 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1354
1250
|
begin
|
|
1355
1251
|
te = p
|
|
1356
1252
|
p = p - 1; begin
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
emit(:literal, :literal, char, *rest)
|
|
1253
|
+
text = copy(data, ts, te)
|
|
1254
|
+
emit(:literal, :literal, text)
|
|
1360
1255
|
end
|
|
1361
1256
|
end
|
|
1362
1257
|
when 15 then
|
|
1363
|
-
# line
|
|
1258
|
+
# line 193 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1364
1259
|
begin
|
|
1365
1260
|
begin p = ((te))-1; end
|
|
1366
1261
|
begin
|
|
1367
|
-
text =
|
|
1262
|
+
text = copy(data, ts, te)
|
|
1368
1263
|
# ranges cant start with a subset or intersection/negation/range operator
|
|
1369
1264
|
if tokens.last[0] == :set
|
|
1370
|
-
emit(:literal, :literal, text
|
|
1265
|
+
emit(:literal, :literal, text)
|
|
1371
1266
|
else
|
|
1372
|
-
emit(:set, :range, text
|
|
1267
|
+
emit(:set, :range, text)
|
|
1373
1268
|
end
|
|
1374
1269
|
end
|
|
1375
1270
|
end
|
|
1376
1271
|
when 18 then
|
|
1377
|
-
# line
|
|
1272
|
+
# line 213 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1378
1273
|
begin
|
|
1379
1274
|
begin p = ((te))-1; end
|
|
1380
1275
|
begin
|
|
1381
|
-
emit(:set, :open,
|
|
1276
|
+
emit(:set, :open, copy(data, ts, te))
|
|
1382
1277
|
begin
|
|
1383
1278
|
stack[top] = cs
|
|
1384
1279
|
top+= 1
|
|
1385
|
-
cs =
|
|
1280
|
+
cs = 123
|
|
1386
1281
|
_goto_level = _again
|
|
1387
1282
|
next
|
|
1388
1283
|
end
|
|
@@ -1390,21 +1285,20 @@ p = p - 1; begin
|
|
|
1390
1285
|
end
|
|
1391
1286
|
end
|
|
1392
1287
|
when 13 then
|
|
1393
|
-
# line
|
|
1288
|
+
# line 243 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1394
1289
|
begin
|
|
1395
1290
|
begin p = ((te))-1; end
|
|
1396
1291
|
begin
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
emit(:literal, :literal, char, *rest)
|
|
1292
|
+
text = copy(data, ts, te)
|
|
1293
|
+
emit(:literal, :literal, text)
|
|
1400
1294
|
end
|
|
1401
1295
|
end
|
|
1402
|
-
when
|
|
1403
|
-
# line
|
|
1296
|
+
when 79 then
|
|
1297
|
+
# line 252 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1404
1298
|
begin
|
|
1405
1299
|
te = p+1
|
|
1406
1300
|
begin
|
|
1407
|
-
emit(:escape, :literal,
|
|
1301
|
+
emit(:escape, :literal, copy(data, ts-1, te))
|
|
1408
1302
|
begin
|
|
1409
1303
|
top -= 1
|
|
1410
1304
|
cs = stack[top]
|
|
@@ -1414,30 +1308,30 @@ te = p+1
|
|
|
1414
1308
|
|
|
1415
1309
|
end
|
|
1416
1310
|
end
|
|
1417
|
-
when
|
|
1418
|
-
# line
|
|
1311
|
+
when 78 then
|
|
1312
|
+
# line 257 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1419
1313
|
begin
|
|
1420
1314
|
te = p+1
|
|
1421
1315
|
begin
|
|
1422
1316
|
p = p - 1;
|
|
1423
|
-
cs =
|
|
1317
|
+
cs = 123;
|
|
1424
1318
|
begin
|
|
1425
1319
|
stack[top] = cs
|
|
1426
1320
|
top+= 1
|
|
1427
|
-
cs =
|
|
1321
|
+
cs = 131
|
|
1428
1322
|
_goto_level = _again
|
|
1429
1323
|
next
|
|
1430
1324
|
end
|
|
1431
1325
|
|
|
1432
1326
|
end
|
|
1433
1327
|
end
|
|
1434
|
-
when
|
|
1435
|
-
# line
|
|
1328
|
+
when 83 then
|
|
1329
|
+
# line 268 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1436
1330
|
begin
|
|
1437
1331
|
te = p+1
|
|
1438
1332
|
begin
|
|
1439
|
-
text =
|
|
1440
|
-
emit(:backref, :number, text
|
|
1333
|
+
text = copy(data, ts-1, te)
|
|
1334
|
+
emit(:backref, :number, text)
|
|
1441
1335
|
begin
|
|
1442
1336
|
top -= 1
|
|
1443
1337
|
cs = stack[top]
|
|
@@ -1447,12 +1341,12 @@ te = p+1
|
|
|
1447
1341
|
|
|
1448
1342
|
end
|
|
1449
1343
|
end
|
|
1450
|
-
when
|
|
1451
|
-
# line
|
|
1344
|
+
when 90 then
|
|
1345
|
+
# line 274 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1452
1346
|
begin
|
|
1453
1347
|
te = p+1
|
|
1454
1348
|
begin
|
|
1455
|
-
emit(:escape, :octal,
|
|
1349
|
+
emit(:escape, :octal, copy(data, ts-1, te))
|
|
1456
1350
|
begin
|
|
1457
1351
|
top -= 1
|
|
1458
1352
|
cs = stack[top]
|
|
@@ -1462,27 +1356,27 @@ te = p+1
|
|
|
1462
1356
|
|
|
1463
1357
|
end
|
|
1464
1358
|
end
|
|
1465
|
-
when
|
|
1466
|
-
# line
|
|
1359
|
+
when 80 then
|
|
1360
|
+
# line 279 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1467
1361
|
begin
|
|
1468
1362
|
te = p+1
|
|
1469
1363
|
begin
|
|
1470
|
-
case text =
|
|
1471
|
-
when '\.'; emit(:escape, :dot, text
|
|
1472
|
-
when '\|'; emit(:escape, :alternation, text
|
|
1473
|
-
when '\^'; emit(:escape, :bol, text
|
|
1474
|
-
when '\$'; emit(:escape, :eol, text
|
|
1475
|
-
when '\?'; emit(:escape, :zero_or_one, text
|
|
1476
|
-
when '\*'; emit(:escape, :zero_or_more, text
|
|
1477
|
-
when '\+'; emit(:escape, :one_or_more, text
|
|
1478
|
-
when '\('; emit(:escape, :group_open, text
|
|
1479
|
-
when '\)'; emit(:escape, :group_close, text
|
|
1480
|
-
when '\{'; emit(:escape, :interval_open, text
|
|
1481
|
-
when '\}'; emit(:escape, :interval_close, text
|
|
1482
|
-
when '\['; emit(:escape, :set_open, text
|
|
1483
|
-
when '\]'; emit(:escape, :set_close, text
|
|
1364
|
+
case text = copy(data, ts-1, te)
|
|
1365
|
+
when '\.'; emit(:escape, :dot, text)
|
|
1366
|
+
when '\|'; emit(:escape, :alternation, text)
|
|
1367
|
+
when '\^'; emit(:escape, :bol, text)
|
|
1368
|
+
when '\$'; emit(:escape, :eol, text)
|
|
1369
|
+
when '\?'; emit(:escape, :zero_or_one, text)
|
|
1370
|
+
when '\*'; emit(:escape, :zero_or_more, text)
|
|
1371
|
+
when '\+'; emit(:escape, :one_or_more, text)
|
|
1372
|
+
when '\('; emit(:escape, :group_open, text)
|
|
1373
|
+
when '\)'; emit(:escape, :group_close, text)
|
|
1374
|
+
when '\{'; emit(:escape, :interval_open, text)
|
|
1375
|
+
when '\}'; emit(:escape, :interval_close, text)
|
|
1376
|
+
when '\['; emit(:escape, :set_open, text)
|
|
1377
|
+
when '\]'; emit(:escape, :set_close, text)
|
|
1484
1378
|
when "\\\\";
|
|
1485
|
-
emit(:escape, :backslash, text
|
|
1379
|
+
emit(:escape, :backslash, text)
|
|
1486
1380
|
end
|
|
1487
1381
|
begin
|
|
1488
1382
|
top -= 1
|
|
@@ -1493,22 +1387,22 @@ te = p+1
|
|
|
1493
1387
|
|
|
1494
1388
|
end
|
|
1495
1389
|
end
|
|
1496
|
-
when
|
|
1497
|
-
# line
|
|
1390
|
+
when 86 then
|
|
1391
|
+
# line 300 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1498
1392
|
begin
|
|
1499
1393
|
te = p+1
|
|
1500
1394
|
begin
|
|
1501
1395
|
# \b is emitted as backspace only when inside a character set, otherwise
|
|
1502
1396
|
# it is a word boundary anchor. A syntax might "normalize" it if needed.
|
|
1503
|
-
case text =
|
|
1504
|
-
when '\a'; emit(:escape, :bell, text
|
|
1505
|
-
when '\b'; emit(:escape, :backspace, text
|
|
1506
|
-
when '\e'; emit(:escape, :escape, text
|
|
1507
|
-
when '\f'; emit(:escape, :form_feed, text
|
|
1508
|
-
when '\n'; emit(:escape, :newline, text
|
|
1509
|
-
when '\r'; emit(:escape, :carriage, text
|
|
1510
|
-
when '\t'; emit(:escape, :tab, text
|
|
1511
|
-
when '\v'; emit(:escape, :vertical_tab, text
|
|
1397
|
+
case text = copy(data, ts-1, te)
|
|
1398
|
+
when '\a'; emit(:escape, :bell, text)
|
|
1399
|
+
when '\b'; emit(:escape, :backspace, text)
|
|
1400
|
+
when '\e'; emit(:escape, :escape, text)
|
|
1401
|
+
when '\f'; emit(:escape, :form_feed, text)
|
|
1402
|
+
when '\n'; emit(:escape, :newline, text)
|
|
1403
|
+
when '\r'; emit(:escape, :carriage, text)
|
|
1404
|
+
when '\t'; emit(:escape, :tab, text)
|
|
1405
|
+
when '\v'; emit(:escape, :vertical_tab, text)
|
|
1512
1406
|
end
|
|
1513
1407
|
begin
|
|
1514
1408
|
top -= 1
|
|
@@ -1520,15 +1414,15 @@ te = p+1
|
|
|
1520
1414
|
end
|
|
1521
1415
|
end
|
|
1522
1416
|
when 27 then
|
|
1523
|
-
# line
|
|
1417
|
+
# line 316 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1524
1418
|
begin
|
|
1525
1419
|
te = p+1
|
|
1526
1420
|
begin
|
|
1527
|
-
text =
|
|
1421
|
+
text = copy(data, ts-1, te)
|
|
1528
1422
|
if text[2].chr == '{'
|
|
1529
|
-
emit(:escape, :codepoint_list, text
|
|
1423
|
+
emit(:escape, :codepoint_list, text)
|
|
1530
1424
|
else
|
|
1531
|
-
emit(:escape, :codepoint, text
|
|
1425
|
+
emit(:escape, :codepoint, text)
|
|
1532
1426
|
end
|
|
1533
1427
|
begin
|
|
1534
1428
|
top -= 1
|
|
@@ -1539,12 +1433,12 @@ te = p+1
|
|
|
1539
1433
|
|
|
1540
1434
|
end
|
|
1541
1435
|
end
|
|
1542
|
-
when
|
|
1543
|
-
# line
|
|
1436
|
+
when 96 then
|
|
1437
|
+
# line 326 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1544
1438
|
begin
|
|
1545
1439
|
te = p+1
|
|
1546
1440
|
begin
|
|
1547
|
-
emit(:escape, :hex,
|
|
1441
|
+
emit(:escape, :hex, copy(data, ts-1, te))
|
|
1548
1442
|
begin
|
|
1549
1443
|
top -= 1
|
|
1550
1444
|
cs = stack[top]
|
|
@@ -1555,7 +1449,7 @@ te = p+1
|
|
|
1555
1449
|
end
|
|
1556
1450
|
end
|
|
1557
1451
|
when 23 then
|
|
1558
|
-
# line
|
|
1452
|
+
# line 335 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1559
1453
|
begin
|
|
1560
1454
|
te = p+1
|
|
1561
1455
|
begin
|
|
@@ -1570,7 +1464,7 @@ te = p+1
|
|
|
1570
1464
|
end
|
|
1571
1465
|
end
|
|
1572
1466
|
when 25 then
|
|
1573
|
-
# line
|
|
1467
|
+
# line 340 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1574
1468
|
begin
|
|
1575
1469
|
te = p+1
|
|
1576
1470
|
begin
|
|
@@ -1584,46 +1478,46 @@ te = p+1
|
|
|
1584
1478
|
|
|
1585
1479
|
end
|
|
1586
1480
|
end
|
|
1587
|
-
when
|
|
1588
|
-
# line
|
|
1481
|
+
when 84 then
|
|
1482
|
+
# line 345 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1589
1483
|
begin
|
|
1590
1484
|
te = p+1
|
|
1591
1485
|
begin
|
|
1592
1486
|
p = p - 1;
|
|
1593
|
-
cs = ((in_set? ?
|
|
1487
|
+
cs = ((in_set? ? 123 : 104));
|
|
1594
1488
|
begin
|
|
1595
1489
|
stack[top] = cs
|
|
1596
1490
|
top+= 1
|
|
1597
|
-
cs =
|
|
1491
|
+
cs = 121
|
|
1598
1492
|
_goto_level = _again
|
|
1599
1493
|
next
|
|
1600
1494
|
end
|
|
1601
1495
|
|
|
1602
1496
|
end
|
|
1603
1497
|
end
|
|
1604
|
-
when
|
|
1605
|
-
# line
|
|
1498
|
+
when 85 then
|
|
1499
|
+
# line 351 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1606
1500
|
begin
|
|
1607
1501
|
te = p+1
|
|
1608
1502
|
begin
|
|
1609
1503
|
p = p - 1;
|
|
1610
|
-
cs = ((in_set? ?
|
|
1504
|
+
cs = ((in_set? ? 123 : 104));
|
|
1611
1505
|
begin
|
|
1612
1506
|
stack[top] = cs
|
|
1613
1507
|
top+= 1
|
|
1614
|
-
cs =
|
|
1508
|
+
cs = 122
|
|
1615
1509
|
_goto_level = _again
|
|
1616
1510
|
next
|
|
1617
1511
|
end
|
|
1618
1512
|
|
|
1619
1513
|
end
|
|
1620
1514
|
end
|
|
1621
|
-
when
|
|
1622
|
-
# line
|
|
1515
|
+
when 21 then
|
|
1516
|
+
# line 357 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1623
1517
|
begin
|
|
1624
1518
|
te = p+1
|
|
1625
1519
|
begin
|
|
1626
|
-
emit(:escape, :literal,
|
|
1520
|
+
emit(:escape, :literal, copy(data, ts-1, te))
|
|
1627
1521
|
begin
|
|
1628
1522
|
top -= 1
|
|
1629
1523
|
cs = stack[top]
|
|
@@ -1633,12 +1527,12 @@ te = p+1
|
|
|
1633
1527
|
|
|
1634
1528
|
end
|
|
1635
1529
|
end
|
|
1636
|
-
when
|
|
1637
|
-
# line
|
|
1530
|
+
when 89 then
|
|
1531
|
+
# line 274 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1638
1532
|
begin
|
|
1639
1533
|
te = p
|
|
1640
1534
|
p = p - 1; begin
|
|
1641
|
-
emit(:escape, :octal,
|
|
1535
|
+
emit(:escape, :octal, copy(data, ts-1, te))
|
|
1642
1536
|
begin
|
|
1643
1537
|
top -= 1
|
|
1644
1538
|
cs = stack[top]
|
|
@@ -1648,12 +1542,12 @@ p = p - 1; begin
|
|
|
1648
1542
|
|
|
1649
1543
|
end
|
|
1650
1544
|
end
|
|
1651
|
-
when
|
|
1652
|
-
# line
|
|
1545
|
+
when 95 then
|
|
1546
|
+
# line 326 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1653
1547
|
begin
|
|
1654
1548
|
te = p
|
|
1655
1549
|
p = p - 1; begin
|
|
1656
|
-
emit(:escape, :hex,
|
|
1550
|
+
emit(:escape, :hex, copy(data, ts-1, te))
|
|
1657
1551
|
begin
|
|
1658
1552
|
top -= 1
|
|
1659
1553
|
cs = stack[top]
|
|
@@ -1663,8 +1557,8 @@ p = p - 1; begin
|
|
|
1663
1557
|
|
|
1664
1558
|
end
|
|
1665
1559
|
end
|
|
1666
|
-
when
|
|
1667
|
-
# line
|
|
1560
|
+
when 92 then
|
|
1561
|
+
# line 335 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1668
1562
|
begin
|
|
1669
1563
|
te = p
|
|
1670
1564
|
p = p - 1; begin
|
|
@@ -1678,8 +1572,8 @@ p = p - 1; begin
|
|
|
1678
1572
|
|
|
1679
1573
|
end
|
|
1680
1574
|
end
|
|
1681
|
-
when
|
|
1682
|
-
# line
|
|
1575
|
+
when 94 then
|
|
1576
|
+
# line 340 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1683
1577
|
begin
|
|
1684
1578
|
te = p
|
|
1685
1579
|
p = p - 1; begin
|
|
@@ -1693,15 +1587,45 @@ p = p - 1; begin
|
|
|
1693
1587
|
|
|
1694
1588
|
end
|
|
1695
1589
|
end
|
|
1696
|
-
when
|
|
1590
|
+
when 87 then
|
|
1591
|
+
# line 357 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1592
|
+
begin
|
|
1593
|
+
te = p
|
|
1594
|
+
p = p - 1; begin
|
|
1595
|
+
emit(:escape, :literal, copy(data, ts-1, te))
|
|
1596
|
+
begin
|
|
1597
|
+
top -= 1
|
|
1598
|
+
cs = stack[top]
|
|
1599
|
+
_goto_level = _again
|
|
1600
|
+
next
|
|
1601
|
+
end
|
|
1602
|
+
|
|
1603
|
+
end
|
|
1604
|
+
end
|
|
1605
|
+
when 20 then
|
|
1606
|
+
# line 357 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1607
|
+
begin
|
|
1608
|
+
begin p = ((te))-1; end
|
|
1609
|
+
begin
|
|
1610
|
+
emit(:escape, :literal, copy(data, ts-1, te))
|
|
1611
|
+
begin
|
|
1612
|
+
top -= 1
|
|
1613
|
+
cs = stack[top]
|
|
1614
|
+
_goto_level = _again
|
|
1615
|
+
next
|
|
1616
|
+
end
|
|
1617
|
+
|
|
1618
|
+
end
|
|
1619
|
+
end
|
|
1620
|
+
when 88 then
|
|
1697
1621
|
# line 1 "NONE"
|
|
1698
1622
|
begin
|
|
1699
1623
|
case act
|
|
1700
|
-
when
|
|
1624
|
+
when 16 then
|
|
1701
1625
|
begin begin p = ((te))-1; end
|
|
1702
1626
|
|
|
1703
|
-
text =
|
|
1704
|
-
emit(:backref, :number, text
|
|
1627
|
+
text = copy(data, ts-1, te)
|
|
1628
|
+
emit(:backref, :number, text)
|
|
1705
1629
|
begin
|
|
1706
1630
|
top -= 1
|
|
1707
1631
|
cs = stack[top]
|
|
@@ -1710,10 +1634,10 @@ p = p - 1; begin
|
|
|
1710
1634
|
end
|
|
1711
1635
|
|
|
1712
1636
|
end
|
|
1713
|
-
when
|
|
1637
|
+
when 17 then
|
|
1714
1638
|
begin begin p = ((te))-1; end
|
|
1715
1639
|
|
|
1716
|
-
emit(:escape, :octal,
|
|
1640
|
+
emit(:escape, :octal, copy(data, ts-1, te))
|
|
1717
1641
|
begin
|
|
1718
1642
|
top -= 1
|
|
1719
1643
|
cs = stack[top]
|
|
@@ -1725,17 +1649,17 @@ p = p - 1; begin
|
|
|
1725
1649
|
end
|
|
1726
1650
|
end
|
|
1727
1651
|
when 30 then
|
|
1728
|
-
# line
|
|
1652
|
+
# line 367 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1729
1653
|
begin
|
|
1730
1654
|
te = p+1
|
|
1731
1655
|
begin
|
|
1732
|
-
text =
|
|
1733
|
-
emit(:conditional, :condition, text
|
|
1734
|
-
emit(:conditional, :condition_close, ')'
|
|
1656
|
+
text = copy(data, ts, te-1)
|
|
1657
|
+
emit(:conditional, :condition, text)
|
|
1658
|
+
emit(:conditional, :condition_close, ')')
|
|
1735
1659
|
end
|
|
1736
1660
|
end
|
|
1737
|
-
when
|
|
1738
|
-
# line
|
|
1661
|
+
when 97 then
|
|
1662
|
+
# line 373 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1739
1663
|
begin
|
|
1740
1664
|
te = p+1
|
|
1741
1665
|
begin
|
|
@@ -1743,15 +1667,15 @@ te = p+1
|
|
|
1743
1667
|
begin
|
|
1744
1668
|
stack[top] = cs
|
|
1745
1669
|
top+= 1
|
|
1746
|
-
cs =
|
|
1670
|
+
cs = 104
|
|
1747
1671
|
_goto_level = _again
|
|
1748
1672
|
next
|
|
1749
1673
|
end
|
|
1750
1674
|
|
|
1751
1675
|
end
|
|
1752
1676
|
end
|
|
1753
|
-
when
|
|
1754
|
-
# line
|
|
1677
|
+
when 98 then
|
|
1678
|
+
# line 373 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1755
1679
|
begin
|
|
1756
1680
|
te = p
|
|
1757
1681
|
p = p - 1; begin
|
|
@@ -1759,7 +1683,7 @@ p = p - 1; begin
|
|
|
1759
1683
|
begin
|
|
1760
1684
|
stack[top] = cs
|
|
1761
1685
|
top+= 1
|
|
1762
|
-
cs =
|
|
1686
|
+
cs = 104
|
|
1763
1687
|
_goto_level = _again
|
|
1764
1688
|
next
|
|
1765
1689
|
end
|
|
@@ -1767,7 +1691,7 @@ p = p - 1; begin
|
|
|
1767
1691
|
end
|
|
1768
1692
|
end
|
|
1769
1693
|
when 29 then
|
|
1770
|
-
# line
|
|
1694
|
+
# line 373 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1771
1695
|
begin
|
|
1772
1696
|
begin p = ((te))-1; end
|
|
1773
1697
|
begin
|
|
@@ -1775,7 +1699,7 @@ p = p - 1; begin
|
|
|
1775
1699
|
begin
|
|
1776
1700
|
stack[top] = cs
|
|
1777
1701
|
top+= 1
|
|
1778
|
-
cs =
|
|
1702
|
+
cs = 104
|
|
1779
1703
|
_goto_level = _again
|
|
1780
1704
|
next
|
|
1781
1705
|
end
|
|
@@ -1783,257 +1707,259 @@ p = p - 1; begin
|
|
|
1783
1707
|
end
|
|
1784
1708
|
end
|
|
1785
1709
|
when 36 then
|
|
1786
|
-
# line
|
|
1710
|
+
# line 386 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1787
1711
|
begin
|
|
1788
1712
|
te = p+1
|
|
1789
1713
|
begin
|
|
1790
|
-
emit(:meta, :dot,
|
|
1714
|
+
emit(:meta, :dot, copy(data, ts, te))
|
|
1791
1715
|
end
|
|
1792
1716
|
end
|
|
1793
1717
|
when 41 then
|
|
1794
|
-
# line
|
|
1718
|
+
# line 390 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1795
1719
|
begin
|
|
1796
1720
|
te = p+1
|
|
1797
1721
|
begin
|
|
1798
1722
|
if conditional_stack.last == group_depth
|
|
1799
|
-
emit(:conditional, :separator,
|
|
1723
|
+
emit(:conditional, :separator, copy(data, ts, te))
|
|
1800
1724
|
else
|
|
1801
|
-
emit(:meta, :alternation,
|
|
1725
|
+
emit(:meta, :alternation, copy(data, ts, te))
|
|
1802
1726
|
end
|
|
1803
1727
|
end
|
|
1804
1728
|
end
|
|
1805
1729
|
when 40 then
|
|
1806
|
-
# line
|
|
1730
|
+
# line 400 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1807
1731
|
begin
|
|
1808
1732
|
te = p+1
|
|
1809
1733
|
begin
|
|
1810
|
-
emit(:anchor, :bol,
|
|
1734
|
+
emit(:anchor, :bol, copy(data, ts, te))
|
|
1811
1735
|
end
|
|
1812
1736
|
end
|
|
1813
1737
|
when 33 then
|
|
1814
|
-
# line
|
|
1738
|
+
# line 404 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1815
1739
|
begin
|
|
1816
1740
|
te = p+1
|
|
1817
1741
|
begin
|
|
1818
|
-
emit(:anchor, :eol,
|
|
1742
|
+
emit(:anchor, :eol, copy(data, ts, te))
|
|
1819
1743
|
end
|
|
1820
1744
|
end
|
|
1821
|
-
when
|
|
1822
|
-
# line
|
|
1745
|
+
when 61 then
|
|
1746
|
+
# line 408 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1823
1747
|
begin
|
|
1824
1748
|
te = p+1
|
|
1825
1749
|
begin
|
|
1826
|
-
emit(:keep, :mark,
|
|
1750
|
+
emit(:keep, :mark, copy(data, ts, te))
|
|
1827
1751
|
end
|
|
1828
1752
|
end
|
|
1829
|
-
when
|
|
1830
|
-
# line
|
|
1753
|
+
when 60 then
|
|
1754
|
+
# line 412 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1831
1755
|
begin
|
|
1832
1756
|
te = p+1
|
|
1833
1757
|
begin
|
|
1834
|
-
case text =
|
|
1835
|
-
when '\\A'; emit(:anchor, :bos, text
|
|
1836
|
-
when '\\z'; emit(:anchor, :eos, text
|
|
1837
|
-
when '\\Z'; emit(:anchor, :eos_ob_eol, text
|
|
1838
|
-
when '\\b'; emit(:anchor, :word_boundary, text
|
|
1839
|
-
when '\\B'; emit(:anchor, :nonword_boundary, text
|
|
1840
|
-
when '\\G'; emit(:anchor, :match_start, text
|
|
1758
|
+
case text = copy(data, ts, te)
|
|
1759
|
+
when '\\A'; emit(:anchor, :bos, text)
|
|
1760
|
+
when '\\z'; emit(:anchor, :eos, text)
|
|
1761
|
+
when '\\Z'; emit(:anchor, :eos_ob_eol, text)
|
|
1762
|
+
when '\\b'; emit(:anchor, :word_boundary, text)
|
|
1763
|
+
when '\\B'; emit(:anchor, :nonword_boundary, text)
|
|
1764
|
+
when '\\G'; emit(:anchor, :match_start, text)
|
|
1841
1765
|
end
|
|
1842
1766
|
end
|
|
1843
1767
|
end
|
|
1844
1768
|
when 39 then
|
|
1845
|
-
# line
|
|
1769
|
+
# line 423 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1846
1770
|
begin
|
|
1847
1771
|
te = p+1
|
|
1848
1772
|
begin
|
|
1849
1773
|
append_literal(data, ts, te)
|
|
1850
1774
|
end
|
|
1851
1775
|
end
|
|
1852
|
-
when
|
|
1853
|
-
# line
|
|
1776
|
+
when 50 then
|
|
1777
|
+
# line 438 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1854
1778
|
begin
|
|
1855
1779
|
te = p+1
|
|
1856
1780
|
begin
|
|
1857
|
-
text =
|
|
1781
|
+
text = copy(data, ts, te)
|
|
1858
1782
|
|
|
1859
1783
|
conditional_stack << group_depth
|
|
1860
1784
|
|
|
1861
|
-
emit(:conditional, :open, text[0..-2]
|
|
1862
|
-
emit(:conditional, :condition_open, '('
|
|
1785
|
+
emit(:conditional, :open, text[0..-2])
|
|
1786
|
+
emit(:conditional, :condition_open, '(')
|
|
1863
1787
|
begin
|
|
1864
1788
|
stack[top] = cs
|
|
1865
1789
|
top+= 1
|
|
1866
|
-
cs =
|
|
1790
|
+
cs = 145
|
|
1867
1791
|
_goto_level = _again
|
|
1868
1792
|
next
|
|
1869
1793
|
end
|
|
1870
1794
|
|
|
1871
1795
|
end
|
|
1872
1796
|
end
|
|
1873
|
-
when
|
|
1874
|
-
# line
|
|
1797
|
+
when 51 then
|
|
1798
|
+
# line 469 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1875
1799
|
begin
|
|
1876
1800
|
te = p+1
|
|
1877
1801
|
begin
|
|
1878
|
-
text =
|
|
1802
|
+
text = copy(data, ts, te)
|
|
1879
1803
|
if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
|
|
1880
1804
|
raise InvalidGroupOption.new($1 || "-#{$2}", text)
|
|
1881
1805
|
end
|
|
1882
|
-
emit_options(text
|
|
1806
|
+
emit_options(text)
|
|
1883
1807
|
end
|
|
1884
1808
|
end
|
|
1885
|
-
when
|
|
1886
|
-
# line
|
|
1809
|
+
when 49 then
|
|
1810
|
+
# line 483 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1887
1811
|
begin
|
|
1888
1812
|
te = p+1
|
|
1889
1813
|
begin
|
|
1890
|
-
case text =
|
|
1891
|
-
when '(?='; emit(:assertion, :lookahead, text
|
|
1892
|
-
when '(?!'; emit(:assertion, :nlookahead, text
|
|
1893
|
-
when '(?<='; emit(:assertion, :lookbehind, text
|
|
1894
|
-
when '(?<!'; emit(:assertion, :nlookbehind, text
|
|
1814
|
+
case text = copy(data, ts, te)
|
|
1815
|
+
when '(?='; emit(:assertion, :lookahead, text)
|
|
1816
|
+
when '(?!'; emit(:assertion, :nlookahead, text)
|
|
1817
|
+
when '(?<='; emit(:assertion, :lookbehind, text)
|
|
1818
|
+
when '(?<!'; emit(:assertion, :nlookbehind, text)
|
|
1895
1819
|
end
|
|
1896
1820
|
end
|
|
1897
1821
|
end
|
|
1898
1822
|
when 6 then
|
|
1899
|
-
# line
|
|
1823
|
+
# line 500 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1900
1824
|
begin
|
|
1901
1825
|
te = p+1
|
|
1902
1826
|
begin
|
|
1903
|
-
case text =
|
|
1904
|
-
when '(?:'; emit(:group, :passive, text
|
|
1905
|
-
when '(?>'; emit(:group, :atomic, text
|
|
1906
|
-
when '(?~'; emit(:group, :absence, text
|
|
1827
|
+
case text = copy(data, ts, te)
|
|
1828
|
+
when '(?:'; emit(:group, :passive, text)
|
|
1829
|
+
when '(?>'; emit(:group, :atomic, text)
|
|
1830
|
+
when '(?~'; emit(:group, :absence, text)
|
|
1907
1831
|
|
|
1908
1832
|
when /^\(\?(?:<>|'')/
|
|
1909
1833
|
validation_error(:group, 'named group', 'name is empty')
|
|
1910
1834
|
|
|
1911
|
-
when /^\(
|
|
1912
|
-
emit(:group, :named_ab, text
|
|
1835
|
+
when /^\(\?<[^>]+>/
|
|
1836
|
+
emit(:group, :named_ab, text)
|
|
1913
1837
|
|
|
1914
|
-
when /^\(\?'
|
|
1915
|
-
emit(:group, :named_sq, text
|
|
1838
|
+
when /^\(\?'[^']+'/
|
|
1839
|
+
emit(:group, :named_sq, text)
|
|
1916
1840
|
|
|
1917
1841
|
end
|
|
1918
1842
|
end
|
|
1919
1843
|
end
|
|
1920
1844
|
when 9 then
|
|
1921
|
-
# line
|
|
1845
|
+
# line 541 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1922
1846
|
begin
|
|
1923
1847
|
te = p+1
|
|
1924
1848
|
begin
|
|
1925
|
-
case text =
|
|
1849
|
+
case text = copy(data, ts, te)
|
|
1926
1850
|
when /^\\([gk])(<>|'')/ # angle brackets
|
|
1927
1851
|
validation_error(:backref, 'ref/call', 'ref ID is empty')
|
|
1928
1852
|
|
|
1929
|
-
|
|
1853
|
+
# TODO: finer quirks of choosing recursive or non-recursive refs/calls.
|
|
1854
|
+
# e.g.: `a-1` is a valid group id: 'aa'[/(?<a-1>a)\g<a-1>/] # => 'aa'
|
|
1855
|
+
when /^\\([gk])<[^\p{digit}+\->][^>+\-]*>/ # angle-brackets
|
|
1930
1856
|
if $1 == 'k'
|
|
1931
|
-
emit(:backref, :name_ref_ab, text
|
|
1857
|
+
emit(:backref, :name_ref_ab, text)
|
|
1932
1858
|
else
|
|
1933
|
-
emit(:backref, :name_call_ab, text
|
|
1859
|
+
emit(:backref, :name_call_ab, text)
|
|
1934
1860
|
end
|
|
1935
1861
|
|
|
1936
|
-
when /^\\([gk])'[^\
|
|
1862
|
+
when /^\\([gk])'[^\p{digit}+\-'][^'+\-]*'/ # single quotes
|
|
1937
1863
|
if $1 == 'k'
|
|
1938
|
-
emit(:backref, :name_ref_sq, text
|
|
1864
|
+
emit(:backref, :name_ref_sq, text)
|
|
1939
1865
|
else
|
|
1940
|
-
emit(:backref, :name_call_sq, text
|
|
1866
|
+
emit(:backref, :name_call_sq, text)
|
|
1941
1867
|
end
|
|
1942
1868
|
|
|
1943
1869
|
when /^\\([gk])<\d+>/ # angle-brackets
|
|
1944
1870
|
if $1 == 'k'
|
|
1945
|
-
emit(:backref, :number_ref_ab, text
|
|
1871
|
+
emit(:backref, :number_ref_ab, text)
|
|
1946
1872
|
else
|
|
1947
|
-
emit(:backref, :number_call_ab, text
|
|
1873
|
+
emit(:backref, :number_call_ab, text)
|
|
1948
1874
|
end
|
|
1949
1875
|
|
|
1950
1876
|
when /^\\([gk])'\d+'/ # single quotes
|
|
1951
1877
|
if $1 == 'k'
|
|
1952
|
-
emit(:backref, :number_ref_sq, text
|
|
1878
|
+
emit(:backref, :number_ref_sq, text)
|
|
1953
1879
|
else
|
|
1954
|
-
emit(:backref, :number_call_sq, text
|
|
1880
|
+
emit(:backref, :number_call_sq, text)
|
|
1955
1881
|
end
|
|
1956
1882
|
|
|
1957
1883
|
when /^\\(?:g<\+|g<-|(k)<-)\d+>/ # angle-brackets
|
|
1958
1884
|
if $1 == 'k'
|
|
1959
|
-
emit(:backref, :number_rel_ref_ab, text
|
|
1885
|
+
emit(:backref, :number_rel_ref_ab, text)
|
|
1960
1886
|
else
|
|
1961
|
-
emit(:backref, :number_rel_call_ab, text
|
|
1887
|
+
emit(:backref, :number_rel_call_ab, text)
|
|
1962
1888
|
end
|
|
1963
1889
|
|
|
1964
1890
|
when /^\\(?:g'\+|g'-|(k)'-)\d+'/ # single quotes
|
|
1965
1891
|
if $1 == 'k'
|
|
1966
|
-
emit(:backref, :number_rel_ref_sq, text
|
|
1892
|
+
emit(:backref, :number_rel_ref_sq, text)
|
|
1967
1893
|
else
|
|
1968
|
-
emit(:backref, :number_rel_call_sq, text
|
|
1894
|
+
emit(:backref, :number_rel_call_sq, text)
|
|
1969
1895
|
end
|
|
1970
1896
|
|
|
1971
|
-
when /^\\k<[^\
|
|
1972
|
-
emit(:backref, :name_recursion_ref_ab, text
|
|
1897
|
+
when /^\\k<[^\p{digit}+\->][^>]*[+\-]\d+>/ # angle-brackets
|
|
1898
|
+
emit(:backref, :name_recursion_ref_ab, text)
|
|
1973
1899
|
|
|
1974
|
-
when /^\\k'[^\
|
|
1975
|
-
emit(:backref, :name_recursion_ref_sq, text
|
|
1900
|
+
when /^\\k'[^\p{digit}+\-'][^']*[+\-]\d+'/ # single-quotes
|
|
1901
|
+
emit(:backref, :name_recursion_ref_sq, text)
|
|
1976
1902
|
|
|
1977
1903
|
when /^\\([gk])<[+\-]?\d+[+\-]\d+>/ # angle-brackets
|
|
1978
|
-
emit(:backref, :number_recursion_ref_ab, text
|
|
1904
|
+
emit(:backref, :number_recursion_ref_ab, text)
|
|
1979
1905
|
|
|
1980
1906
|
when /^\\([gk])'[+\-]?\d+[+\-]\d+'/ # single-quotes
|
|
1981
|
-
emit(:backref, :number_recursion_ref_sq, text
|
|
1907
|
+
emit(:backref, :number_recursion_ref_sq, text)
|
|
1982
1908
|
|
|
1983
1909
|
end
|
|
1984
1910
|
end
|
|
1985
1911
|
end
|
|
1986
|
-
when
|
|
1987
|
-
# line
|
|
1912
|
+
when 58 then
|
|
1913
|
+
# line 608 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1988
1914
|
begin
|
|
1989
1915
|
te = p+1
|
|
1990
1916
|
begin
|
|
1991
|
-
case text =
|
|
1992
|
-
when '?' ; emit(:quantifier, :zero_or_one, text
|
|
1993
|
-
when '??'; emit(:quantifier, :zero_or_one_reluctant, text
|
|
1994
|
-
when '?+'; emit(:quantifier, :zero_or_one_possessive, text
|
|
1917
|
+
case text = copy(data, ts, te)
|
|
1918
|
+
when '?' ; emit(:quantifier, :zero_or_one, text)
|
|
1919
|
+
when '??'; emit(:quantifier, :zero_or_one_reluctant, text)
|
|
1920
|
+
when '?+'; emit(:quantifier, :zero_or_one_possessive, text)
|
|
1995
1921
|
end
|
|
1996
1922
|
end
|
|
1997
1923
|
end
|
|
1998
|
-
when
|
|
1999
|
-
# line
|
|
1924
|
+
when 54 then
|
|
1925
|
+
# line 616 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2000
1926
|
begin
|
|
2001
1927
|
te = p+1
|
|
2002
1928
|
begin
|
|
2003
|
-
case text =
|
|
2004
|
-
when '*' ; emit(:quantifier, :zero_or_more, text
|
|
2005
|
-
when '*?'; emit(:quantifier, :zero_or_more_reluctant, text
|
|
2006
|
-
when '*+'; emit(:quantifier, :zero_or_more_possessive, text
|
|
1929
|
+
case text = copy(data, ts, te)
|
|
1930
|
+
when '*' ; emit(:quantifier, :zero_or_more, text)
|
|
1931
|
+
when '*?'; emit(:quantifier, :zero_or_more_reluctant, text)
|
|
1932
|
+
when '*+'; emit(:quantifier, :zero_or_more_possessive, text)
|
|
2007
1933
|
end
|
|
2008
1934
|
end
|
|
2009
1935
|
end
|
|
2010
|
-
when
|
|
2011
|
-
# line
|
|
1936
|
+
when 56 then
|
|
1937
|
+
# line 624 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2012
1938
|
begin
|
|
2013
1939
|
te = p+1
|
|
2014
1940
|
begin
|
|
2015
|
-
case text =
|
|
2016
|
-
when '+' ; emit(:quantifier, :one_or_more, text
|
|
2017
|
-
when '+?'; emit(:quantifier, :one_or_more_reluctant, text
|
|
2018
|
-
when '++'; emit(:quantifier, :one_or_more_possessive, text
|
|
1941
|
+
case text = copy(data, ts, te)
|
|
1942
|
+
when '+' ; emit(:quantifier, :one_or_more, text)
|
|
1943
|
+
when '+?'; emit(:quantifier, :one_or_more_reluctant, text)
|
|
1944
|
+
when '++'; emit(:quantifier, :one_or_more_possessive, text)
|
|
2019
1945
|
end
|
|
2020
1946
|
end
|
|
2021
1947
|
end
|
|
2022
|
-
when
|
|
2023
|
-
# line
|
|
1948
|
+
when 64 then
|
|
1949
|
+
# line 632 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2024
1950
|
begin
|
|
2025
1951
|
te = p+1
|
|
2026
1952
|
begin
|
|
2027
|
-
emit(:quantifier, :interval,
|
|
1953
|
+
emit(:quantifier, :interval, copy(data, ts, te))
|
|
2028
1954
|
end
|
|
2029
1955
|
end
|
|
2030
1956
|
when 45 then
|
|
2031
|
-
# line
|
|
1957
|
+
# line 647 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2032
1958
|
begin
|
|
2033
1959
|
te = p+1
|
|
2034
1960
|
begin
|
|
2035
1961
|
if free_spacing
|
|
2036
|
-
emit(:free_space, :comment,
|
|
1962
|
+
emit(:free_space, :comment, copy(data, ts, te))
|
|
2037
1963
|
else
|
|
2038
1964
|
# consume only the pound sign (#) and backtrack to do regular scanning
|
|
2039
1965
|
append_literal(data, ts, ts + 1)
|
|
@@ -2043,87 +1969,100 @@ te = p+1
|
|
|
2043
1969
|
end
|
|
2044
1970
|
end
|
|
2045
1971
|
when 48 then
|
|
2046
|
-
# line
|
|
1972
|
+
# line 469 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2047
1973
|
begin
|
|
2048
1974
|
te = p
|
|
2049
1975
|
p = p - 1; begin
|
|
2050
|
-
text =
|
|
1976
|
+
text = copy(data, ts, te)
|
|
2051
1977
|
if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
|
|
2052
1978
|
raise InvalidGroupOption.new($1 || "-#{$2}", text)
|
|
2053
1979
|
end
|
|
2054
|
-
emit_options(text
|
|
1980
|
+
emit_options(text)
|
|
1981
|
+
end
|
|
1982
|
+
end
|
|
1983
|
+
when 52 then
|
|
1984
|
+
# line 483 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
1985
|
+
begin
|
|
1986
|
+
te = p
|
|
1987
|
+
p = p - 1; begin
|
|
1988
|
+
case text = copy(data, ts, te)
|
|
1989
|
+
when '(?='; emit(:assertion, :lookahead, text)
|
|
1990
|
+
when '(?!'; emit(:assertion, :nlookahead, text)
|
|
1991
|
+
when '(?<='; emit(:assertion, :lookbehind, text)
|
|
1992
|
+
when '(?<!'; emit(:assertion, :nlookbehind, text)
|
|
1993
|
+
end
|
|
2055
1994
|
end
|
|
2056
1995
|
end
|
|
2057
1996
|
when 46 then
|
|
2058
|
-
# line
|
|
1997
|
+
# line 518 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2059
1998
|
begin
|
|
2060
1999
|
te = p
|
|
2061
2000
|
p = p - 1; begin
|
|
2062
|
-
text =
|
|
2063
|
-
emit(:group, :capture, text
|
|
2001
|
+
text = copy(data, ts, te)
|
|
2002
|
+
emit(:group, :capture, text)
|
|
2064
2003
|
end
|
|
2065
2004
|
end
|
|
2066
|
-
when
|
|
2067
|
-
# line
|
|
2005
|
+
when 57 then
|
|
2006
|
+
# line 608 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2068
2007
|
begin
|
|
2069
2008
|
te = p
|
|
2070
2009
|
p = p - 1; begin
|
|
2071
|
-
case text =
|
|
2072
|
-
when '?' ; emit(:quantifier, :zero_or_one, text
|
|
2073
|
-
when '??'; emit(:quantifier, :zero_or_one_reluctant, text
|
|
2074
|
-
when '?+'; emit(:quantifier, :zero_or_one_possessive, text
|
|
2010
|
+
case text = copy(data, ts, te)
|
|
2011
|
+
when '?' ; emit(:quantifier, :zero_or_one, text)
|
|
2012
|
+
when '??'; emit(:quantifier, :zero_or_one_reluctant, text)
|
|
2013
|
+
when '?+'; emit(:quantifier, :zero_or_one_possessive, text)
|
|
2075
2014
|
end
|
|
2076
2015
|
end
|
|
2077
2016
|
end
|
|
2078
|
-
when
|
|
2079
|
-
# line
|
|
2017
|
+
when 53 then
|
|
2018
|
+
# line 616 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2080
2019
|
begin
|
|
2081
2020
|
te = p
|
|
2082
2021
|
p = p - 1; begin
|
|
2083
|
-
case text =
|
|
2084
|
-
when '*' ; emit(:quantifier, :zero_or_more, text
|
|
2085
|
-
when '*?'; emit(:quantifier, :zero_or_more_reluctant, text
|
|
2086
|
-
when '*+'; emit(:quantifier, :zero_or_more_possessive, text
|
|
2022
|
+
case text = copy(data, ts, te)
|
|
2023
|
+
when '*' ; emit(:quantifier, :zero_or_more, text)
|
|
2024
|
+
when '*?'; emit(:quantifier, :zero_or_more_reluctant, text)
|
|
2025
|
+
when '*+'; emit(:quantifier, :zero_or_more_possessive, text)
|
|
2087
2026
|
end
|
|
2088
2027
|
end
|
|
2089
2028
|
end
|
|
2090
|
-
when
|
|
2091
|
-
# line
|
|
2029
|
+
when 55 then
|
|
2030
|
+
# line 624 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2092
2031
|
begin
|
|
2093
2032
|
te = p
|
|
2094
2033
|
p = p - 1; begin
|
|
2095
|
-
case text =
|
|
2096
|
-
when '+' ; emit(:quantifier, :one_or_more, text
|
|
2097
|
-
when '+?'; emit(:quantifier, :one_or_more_reluctant, text
|
|
2098
|
-
when '++'; emit(:quantifier, :one_or_more_possessive, text
|
|
2034
|
+
case text = copy(data, ts, te)
|
|
2035
|
+
when '+' ; emit(:quantifier, :one_or_more, text)
|
|
2036
|
+
when '+?'; emit(:quantifier, :one_or_more_reluctant, text)
|
|
2037
|
+
when '++'; emit(:quantifier, :one_or_more_possessive, text)
|
|
2099
2038
|
end
|
|
2100
2039
|
end
|
|
2101
2040
|
end
|
|
2102
|
-
when
|
|
2103
|
-
# line
|
|
2041
|
+
when 63 then
|
|
2042
|
+
# line 632 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2104
2043
|
begin
|
|
2105
2044
|
te = p
|
|
2106
2045
|
p = p - 1; begin
|
|
2107
|
-
emit(:quantifier, :interval,
|
|
2046
|
+
emit(:quantifier, :interval, copy(data, ts, te))
|
|
2108
2047
|
end
|
|
2109
2048
|
end
|
|
2110
|
-
when
|
|
2111
|
-
# line
|
|
2049
|
+
when 62 then
|
|
2050
|
+
# line 637 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2112
2051
|
begin
|
|
2113
2052
|
te = p
|
|
2114
2053
|
p = p - 1; begin
|
|
2115
2054
|
append_literal(data, ts, te)
|
|
2116
2055
|
end
|
|
2117
2056
|
end
|
|
2118
|
-
when
|
|
2119
|
-
# line
|
|
2057
|
+
when 59 then
|
|
2058
|
+
# line 643 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2120
2059
|
begin
|
|
2121
2060
|
te = p
|
|
2122
2061
|
p = p - 1; begin
|
|
2123
2062
|
begin
|
|
2124
2063
|
stack[top] = cs
|
|
2125
2064
|
top+= 1
|
|
2126
|
-
cs =
|
|
2065
|
+
cs = 131
|
|
2127
2066
|
_goto_level = _again
|
|
2128
2067
|
next
|
|
2129
2068
|
end
|
|
@@ -2131,12 +2070,12 @@ p = p - 1; begin
|
|
|
2131
2070
|
end
|
|
2132
2071
|
end
|
|
2133
2072
|
when 44 then
|
|
2134
|
-
# line
|
|
2073
|
+
# line 647 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2135
2074
|
begin
|
|
2136
2075
|
te = p
|
|
2137
2076
|
p = p - 1; begin
|
|
2138
2077
|
if free_spacing
|
|
2139
|
-
emit(:free_space, :comment,
|
|
2078
|
+
emit(:free_space, :comment, copy(data, ts, te))
|
|
2140
2079
|
else
|
|
2141
2080
|
# consume only the pound sign (#) and backtrack to do regular scanning
|
|
2142
2081
|
append_literal(data, ts, ts + 1)
|
|
@@ -2146,19 +2085,19 @@ p = p - 1; begin
|
|
|
2146
2085
|
end
|
|
2147
2086
|
end
|
|
2148
2087
|
when 43 then
|
|
2149
|
-
# line
|
|
2088
|
+
# line 657 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2150
2089
|
begin
|
|
2151
2090
|
te = p
|
|
2152
2091
|
p = p - 1; begin
|
|
2153
2092
|
if free_spacing
|
|
2154
|
-
emit(:free_space, :whitespace,
|
|
2093
|
+
emit(:free_space, :whitespace, copy(data, ts, te))
|
|
2155
2094
|
else
|
|
2156
2095
|
append_literal(data, ts, te)
|
|
2157
2096
|
end
|
|
2158
2097
|
end
|
|
2159
2098
|
end
|
|
2160
2099
|
when 42 then
|
|
2161
|
-
# line
|
|
2100
|
+
# line 668 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2162
2101
|
begin
|
|
2163
2102
|
te = p
|
|
2164
2103
|
p = p - 1; begin
|
|
@@ -2166,19 +2105,19 @@ p = p - 1; begin
|
|
|
2166
2105
|
end
|
|
2167
2106
|
end
|
|
2168
2107
|
when 3 then
|
|
2169
|
-
# line
|
|
2108
|
+
# line 469 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2170
2109
|
begin
|
|
2171
2110
|
begin p = ((te))-1; end
|
|
2172
2111
|
begin
|
|
2173
|
-
text =
|
|
2112
|
+
text = copy(data, ts, te)
|
|
2174
2113
|
if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
|
|
2175
2114
|
raise InvalidGroupOption.new($1 || "-#{$2}", text)
|
|
2176
2115
|
end
|
|
2177
|
-
emit_options(text
|
|
2116
|
+
emit_options(text)
|
|
2178
2117
|
end
|
|
2179
2118
|
end
|
|
2180
2119
|
when 10 then
|
|
2181
|
-
# line
|
|
2120
|
+
# line 637 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2182
2121
|
begin
|
|
2183
2122
|
begin p = ((te))-1; end
|
|
2184
2123
|
begin
|
|
@@ -2186,14 +2125,14 @@ p = p - 1; begin
|
|
|
2186
2125
|
end
|
|
2187
2126
|
end
|
|
2188
2127
|
when 8 then
|
|
2189
|
-
# line
|
|
2128
|
+
# line 643 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2190
2129
|
begin
|
|
2191
2130
|
begin p = ((te))-1; end
|
|
2192
2131
|
begin
|
|
2193
2132
|
begin
|
|
2194
2133
|
stack[top] = cs
|
|
2195
2134
|
top+= 1
|
|
2196
|
-
cs =
|
|
2135
|
+
cs = 131
|
|
2197
2136
|
_goto_level = _again
|
|
2198
2137
|
next
|
|
2199
2138
|
end
|
|
@@ -2211,29 +2150,48 @@ p = p - 1; begin
|
|
|
2211
2150
|
next
|
|
2212
2151
|
end
|
|
2213
2152
|
end
|
|
2214
|
-
when
|
|
2153
|
+
when 40 then
|
|
2154
|
+
begin begin p = ((te))-1; end
|
|
2155
|
+
|
|
2156
|
+
text = copy(data, ts, te)
|
|
2157
|
+
if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
|
|
2158
|
+
raise InvalidGroupOption.new($1 || "-#{$2}", text)
|
|
2159
|
+
end
|
|
2160
|
+
emit_options(text)
|
|
2161
|
+
end
|
|
2162
|
+
when 41 then
|
|
2163
|
+
begin begin p = ((te))-1; end
|
|
2164
|
+
|
|
2165
|
+
case text = copy(data, ts, te)
|
|
2166
|
+
when '(?='; emit(:assertion, :lookahead, text)
|
|
2167
|
+
when '(?!'; emit(:assertion, :nlookahead, text)
|
|
2168
|
+
when '(?<='; emit(:assertion, :lookbehind, text)
|
|
2169
|
+
when '(?<!'; emit(:assertion, :nlookbehind, text)
|
|
2170
|
+
end
|
|
2171
|
+
end
|
|
2172
|
+
when 54 then
|
|
2215
2173
|
begin begin p = ((te))-1; end
|
|
2216
2174
|
|
|
2217
2175
|
append_literal(data, ts, te)
|
|
2218
2176
|
end
|
|
2219
2177
|
end
|
|
2220
2178
|
end
|
|
2221
|
-
when
|
|
2222
|
-
# line
|
|
2179
|
+
when 76 then
|
|
2180
|
+
# line 139 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2223
2181
|
begin
|
|
2224
2182
|
|
|
2225
|
-
text =
|
|
2183
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2226
2184
|
raise PrematureEndError.new( text )
|
|
2227
2185
|
end
|
|
2228
|
-
# line
|
|
2186
|
+
# line 213 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2229
2187
|
begin
|
|
2230
2188
|
te = p
|
|
2231
2189
|
p = p - 1; begin
|
|
2232
|
-
emit(:set, :open,
|
|
2190
|
+
emit(:set, :open, copy(data, ts, te))
|
|
2233
2191
|
begin
|
|
2234
2192
|
stack[top] = cs
|
|
2235
2193
|
top+= 1
|
|
2236
|
-
cs =
|
|
2194
|
+
cs = 123
|
|
2237
2195
|
_goto_level = _again
|
|
2238
2196
|
next
|
|
2239
2197
|
end
|
|
@@ -2241,56 +2199,35 @@ p = p - 1; begin
|
|
|
2241
2199
|
end
|
|
2242
2200
|
end
|
|
2243
2201
|
when 17 then
|
|
2244
|
-
# line
|
|
2202
|
+
# line 139 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2245
2203
|
begin
|
|
2246
2204
|
|
|
2247
|
-
text =
|
|
2205
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2248
2206
|
raise PrematureEndError.new( text )
|
|
2249
2207
|
end
|
|
2250
|
-
# line
|
|
2208
|
+
# line 213 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2251
2209
|
begin
|
|
2252
2210
|
begin p = ((te))-1; end
|
|
2253
2211
|
begin
|
|
2254
|
-
emit(:set, :open,
|
|
2212
|
+
emit(:set, :open, copy(data, ts, te))
|
|
2255
2213
|
begin
|
|
2256
2214
|
stack[top] = cs
|
|
2257
2215
|
top+= 1
|
|
2258
|
-
cs =
|
|
2259
|
-
_goto_level = _again
|
|
2260
|
-
next
|
|
2261
|
-
end
|
|
2262
|
-
|
|
2263
|
-
end
|
|
2264
|
-
end
|
|
2265
|
-
when 93 then
|
|
2266
|
-
# line 137 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2267
|
-
begin
|
|
2268
|
-
|
|
2269
|
-
text = ts ? copy(data, ts-1..-1) : data.pack('c*')
|
|
2270
|
-
raise PrematureEndError.new( text )
|
|
2271
|
-
end
|
|
2272
|
-
# line 329 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2273
|
-
begin
|
|
2274
|
-
te = p
|
|
2275
|
-
p = p - 1; begin
|
|
2276
|
-
emit(:escape, :hex, *text(data, ts, te, 1))
|
|
2277
|
-
begin
|
|
2278
|
-
top -= 1
|
|
2279
|
-
cs = stack[top]
|
|
2216
|
+
cs = 123
|
|
2280
2217
|
_goto_level = _again
|
|
2281
2218
|
next
|
|
2282
2219
|
end
|
|
2283
2220
|
|
|
2284
2221
|
end
|
|
2285
2222
|
end
|
|
2286
|
-
when
|
|
2287
|
-
# line
|
|
2223
|
+
when 91 then
|
|
2224
|
+
# line 139 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2288
2225
|
begin
|
|
2289
2226
|
|
|
2290
|
-
text =
|
|
2227
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2291
2228
|
raise PrematureEndError.new( text )
|
|
2292
2229
|
end
|
|
2293
|
-
# line
|
|
2230
|
+
# line 335 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2294
2231
|
begin
|
|
2295
2232
|
te = p
|
|
2296
2233
|
p = p - 1; begin
|
|
@@ -2304,14 +2241,14 @@ p = p - 1; begin
|
|
|
2304
2241
|
|
|
2305
2242
|
end
|
|
2306
2243
|
end
|
|
2307
|
-
when
|
|
2308
|
-
# line
|
|
2244
|
+
when 93 then
|
|
2245
|
+
# line 139 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2309
2246
|
begin
|
|
2310
2247
|
|
|
2311
|
-
text =
|
|
2248
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2312
2249
|
raise PrematureEndError.new( text )
|
|
2313
2250
|
end
|
|
2314
|
-
# line
|
|
2251
|
+
# line 340 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2315
2252
|
begin
|
|
2316
2253
|
te = p
|
|
2317
2254
|
p = p - 1; begin
|
|
@@ -2326,13 +2263,13 @@ p = p - 1; begin
|
|
|
2326
2263
|
end
|
|
2327
2264
|
end
|
|
2328
2265
|
when 24 then
|
|
2329
|
-
# line
|
|
2266
|
+
# line 139 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2330
2267
|
begin
|
|
2331
2268
|
|
|
2332
|
-
text =
|
|
2269
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2333
2270
|
raise PrematureEndError.new( text )
|
|
2334
2271
|
end
|
|
2335
|
-
# line
|
|
2272
|
+
# line 335 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2336
2273
|
begin
|
|
2337
2274
|
begin p = ((te))-1; end
|
|
2338
2275
|
begin
|
|
@@ -2347,13 +2284,13 @@ p = p - 1; begin
|
|
|
2347
2284
|
end
|
|
2348
2285
|
end
|
|
2349
2286
|
when 26 then
|
|
2350
|
-
# line
|
|
2287
|
+
# line 139 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2351
2288
|
begin
|
|
2352
2289
|
|
|
2353
|
-
text =
|
|
2290
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2354
2291
|
raise PrematureEndError.new( text )
|
|
2355
2292
|
end
|
|
2356
|
-
# line
|
|
2293
|
+
# line 340 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2357
2294
|
begin
|
|
2358
2295
|
begin p = ((te))-1; end
|
|
2359
2296
|
begin
|
|
@@ -2368,13 +2305,13 @@ p = p - 1; begin
|
|
|
2368
2305
|
end
|
|
2369
2306
|
end
|
|
2370
2307
|
when 28 then
|
|
2371
|
-
# line
|
|
2308
|
+
# line 145 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2372
2309
|
begin
|
|
2373
2310
|
|
|
2374
|
-
text =
|
|
2311
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2375
2312
|
validation_error(:sequence, 'sequence', text)
|
|
2376
2313
|
end
|
|
2377
|
-
# line
|
|
2314
|
+
# line 331 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2378
2315
|
begin
|
|
2379
2316
|
te = p+1
|
|
2380
2317
|
begin
|
|
@@ -2388,27 +2325,27 @@ te = p+1
|
|
|
2388
2325
|
end
|
|
2389
2326
|
end
|
|
2390
2327
|
when 5 then
|
|
2391
|
-
# line
|
|
2328
|
+
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2392
2329
|
begin
|
|
2393
2330
|
self.group_depth = group_depth - 1 end
|
|
2394
|
-
# line
|
|
2331
|
+
# line 454 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2395
2332
|
begin
|
|
2396
2333
|
te = p+1
|
|
2397
2334
|
begin
|
|
2398
|
-
emit(:group, :comment,
|
|
2335
|
+
emit(:group, :comment, copy(data, ts, te))
|
|
2399
2336
|
end
|
|
2400
2337
|
end
|
|
2401
2338
|
when 35 then
|
|
2402
|
-
# line
|
|
2339
|
+
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2403
2340
|
begin
|
|
2404
2341
|
self.group_depth = group_depth - 1 end
|
|
2405
|
-
# line
|
|
2342
|
+
# line 523 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2406
2343
|
begin
|
|
2407
2344
|
te = p+1
|
|
2408
2345
|
begin
|
|
2409
2346
|
if conditional_stack.last == group_depth + 1
|
|
2410
2347
|
conditional_stack.pop
|
|
2411
|
-
emit(:conditional, :close,
|
|
2348
|
+
emit(:conditional, :close, copy(data, ts, te))
|
|
2412
2349
|
else
|
|
2413
2350
|
if spacing_stack.length > 1 &&
|
|
2414
2351
|
spacing_stack.last[:depth] == group_depth + 1
|
|
@@ -2416,38 +2353,38 @@ te = p+1
|
|
|
2416
2353
|
self.free_spacing = spacing_stack.last[:free_spacing]
|
|
2417
2354
|
end
|
|
2418
2355
|
|
|
2419
|
-
emit(:group, :close,
|
|
2356
|
+
emit(:group, :close, copy(data, ts, te))
|
|
2420
2357
|
end
|
|
2421
2358
|
end
|
|
2422
2359
|
end
|
|
2423
2360
|
when 37 then
|
|
2424
|
-
# line
|
|
2361
|
+
# line 153 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2425
2362
|
begin
|
|
2426
2363
|
self.set_depth = set_depth + 1 end
|
|
2427
|
-
# line
|
|
2364
|
+
# line 429 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2428
2365
|
begin
|
|
2429
2366
|
te = p+1
|
|
2430
2367
|
begin
|
|
2431
|
-
emit(:set, :open,
|
|
2368
|
+
emit(:set, :open, copy(data, ts, te))
|
|
2432
2369
|
begin
|
|
2433
2370
|
stack[top] = cs
|
|
2434
2371
|
top+= 1
|
|
2435
|
-
cs =
|
|
2372
|
+
cs = 123
|
|
2436
2373
|
_goto_level = _again
|
|
2437
2374
|
next
|
|
2438
2375
|
end
|
|
2439
2376
|
|
|
2440
2377
|
end
|
|
2441
2378
|
end
|
|
2442
|
-
when
|
|
2443
|
-
# line
|
|
2379
|
+
when 70 then
|
|
2380
|
+
# line 154 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2444
2381
|
begin
|
|
2445
2382
|
self.set_depth = set_depth - 1 end
|
|
2446
|
-
# line
|
|
2383
|
+
# line 160 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2447
2384
|
begin
|
|
2448
2385
|
te = p+1
|
|
2449
2386
|
begin
|
|
2450
|
-
emit(:set, :close,
|
|
2387
|
+
emit(:set, :close, copy(data, ts, te))
|
|
2451
2388
|
if in_set?
|
|
2452
2389
|
begin
|
|
2453
2390
|
top -= 1
|
|
@@ -2458,7 +2395,7 @@ te = p+1
|
|
|
2458
2395
|
|
|
2459
2396
|
else
|
|
2460
2397
|
begin
|
|
2461
|
-
cs =
|
|
2398
|
+
cs = 104
|
|
2462
2399
|
_goto_level = _again
|
|
2463
2400
|
next
|
|
2464
2401
|
end
|
|
@@ -2466,16 +2403,16 @@ te = p+1
|
|
|
2466
2403
|
end
|
|
2467
2404
|
end
|
|
2468
2405
|
end
|
|
2469
|
-
when
|
|
2470
|
-
# line
|
|
2406
|
+
when 75 then
|
|
2407
|
+
# line 154 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2471
2408
|
begin
|
|
2472
2409
|
self.set_depth = set_depth - 1 end
|
|
2473
|
-
# line
|
|
2410
|
+
# line 169 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2474
2411
|
begin
|
|
2475
2412
|
te = p+1
|
|
2476
2413
|
begin # special case, emits two tokens
|
|
2477
|
-
emit(:literal, :literal, copy(data, ts
|
|
2478
|
-
emit(:set, :close, copy(data, ts+1
|
|
2414
|
+
emit(:literal, :literal, copy(data, ts, te-1))
|
|
2415
|
+
emit(:set, :close, copy(data, ts+1, te))
|
|
2479
2416
|
if in_set?
|
|
2480
2417
|
begin
|
|
2481
2418
|
top -= 1
|
|
@@ -2486,7 +2423,7 @@ te = p+1
|
|
|
2486
2423
|
|
|
2487
2424
|
else
|
|
2488
2425
|
begin
|
|
2489
|
-
cs =
|
|
2426
|
+
cs = 104
|
|
2490
2427
|
_goto_level = _again
|
|
2491
2428
|
next
|
|
2492
2429
|
end
|
|
@@ -2494,15 +2431,15 @@ te = p+1
|
|
|
2494
2431
|
end
|
|
2495
2432
|
end
|
|
2496
2433
|
end
|
|
2497
|
-
when
|
|
2498
|
-
# line
|
|
2434
|
+
when 19 then
|
|
2435
|
+
# line 154 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2499
2436
|
begin
|
|
2500
2437
|
self.set_depth = set_depth - 1 end
|
|
2501
|
-
# line
|
|
2438
|
+
# line 218 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2502
2439
|
begin
|
|
2503
2440
|
te = p+1
|
|
2504
2441
|
begin
|
|
2505
|
-
text =
|
|
2442
|
+
text = copy(data, ts, te)
|
|
2506
2443
|
|
|
2507
2444
|
type = :posixclass
|
|
2508
2445
|
class_name = text[2..-3]
|
|
@@ -2511,81 +2448,70 @@ te = p+1
|
|
|
2511
2448
|
type = :nonposixclass
|
|
2512
2449
|
end
|
|
2513
2450
|
|
|
2514
|
-
emit(type, class_name.to_sym, text
|
|
2451
|
+
emit(type, class_name.to_sym, text)
|
|
2515
2452
|
end
|
|
2516
2453
|
end
|
|
2517
|
-
when
|
|
2518
|
-
# line
|
|
2519
|
-
begin
|
|
2520
|
-
self.set_depth = set_depth - 1 end
|
|
2521
|
-
# line 229 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2454
|
+
when 68 then
|
|
2455
|
+
# line 1 "NONE"
|
|
2522
2456
|
begin
|
|
2523
2457
|
te = p+1
|
|
2524
|
-
begin
|
|
2525
|
-
emit(:set, :collation, *text(data, ts, te))
|
|
2526
|
-
end
|
|
2527
2458
|
end
|
|
2528
|
-
|
|
2529
|
-
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2530
|
-
begin
|
|
2531
|
-
self.set_depth = set_depth - 1 end
|
|
2532
|
-
# line 233 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2459
|
+
# line 153 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2533
2460
|
begin
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
emit(:set, :equivalent, *text(data, ts, te))
|
|
2537
|
-
end
|
|
2538
|
-
end
|
|
2539
|
-
when 66 then
|
|
2461
|
+
self.set_depth = set_depth + 1 end
|
|
2462
|
+
when 82 then
|
|
2540
2463
|
# line 1 "NONE"
|
|
2541
2464
|
begin
|
|
2542
2465
|
te = p+1
|
|
2543
2466
|
end
|
|
2544
|
-
# line
|
|
2467
|
+
# line 268 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2545
2468
|
begin
|
|
2546
|
-
|
|
2469
|
+
act = 16; end
|
|
2547
2470
|
when 81 then
|
|
2548
2471
|
# line 1 "NONE"
|
|
2549
2472
|
begin
|
|
2550
2473
|
te = p+1
|
|
2551
2474
|
end
|
|
2552
|
-
# line
|
|
2475
|
+
# line 274 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2553
2476
|
begin
|
|
2554
|
-
act =
|
|
2555
|
-
when
|
|
2477
|
+
act = 17; end
|
|
2478
|
+
when 7 then
|
|
2556
2479
|
# line 1 "NONE"
|
|
2557
2480
|
begin
|
|
2558
2481
|
te = p+1
|
|
2559
2482
|
end
|
|
2560
|
-
# line
|
|
2483
|
+
# line 483 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2561
2484
|
begin
|
|
2562
|
-
act =
|
|
2485
|
+
act = 41; end
|
|
2563
2486
|
when 2 then
|
|
2564
2487
|
# line 1 "NONE"
|
|
2565
2488
|
begin
|
|
2566
2489
|
te = p+1
|
|
2567
2490
|
end
|
|
2568
|
-
# line
|
|
2491
|
+
# line 668 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2569
2492
|
begin
|
|
2570
|
-
act =
|
|
2493
|
+
act = 54; end
|
|
2571
2494
|
when 47 then
|
|
2572
2495
|
# line 1 "NONE"
|
|
2573
2496
|
begin
|
|
2574
2497
|
te = p+1
|
|
2575
2498
|
end
|
|
2576
|
-
# line
|
|
2499
|
+
# line 152 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2577
2500
|
begin
|
|
2578
2501
|
self.group_depth = group_depth - 1 end
|
|
2579
|
-
# line
|
|
2502
|
+
# line 151 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2580
2503
|
begin
|
|
2581
2504
|
self.group_depth = group_depth + 1 end
|
|
2582
|
-
# line
|
|
2505
|
+
# line 469 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2506
|
+
begin
|
|
2507
|
+
act = 40; end
|
|
2508
|
+
# line 2508 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
|
2583
2509
|
end
|
|
2584
2510
|
end
|
|
2585
2511
|
end
|
|
2586
2512
|
if _goto_level <= _again
|
|
2587
2513
|
case _re_scanner_to_state_actions[cs]
|
|
2588
|
-
when
|
|
2514
|
+
when 65 then
|
|
2589
2515
|
# line 1 "NONE"
|
|
2590
2516
|
begin
|
|
2591
2517
|
ts = nil; end
|
|
@@ -2597,7 +2523,7 @@ ts = nil; end
|
|
|
2597
2523
|
begin
|
|
2598
2524
|
act = 0
|
|
2599
2525
|
end
|
|
2600
|
-
# line
|
|
2526
|
+
# line 2526 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
|
2601
2527
|
end
|
|
2602
2528
|
|
|
2603
2529
|
if cs == 0
|
|
@@ -2625,13 +2551,13 @@ act = 0
|
|
|
2625
2551
|
raise PrematureEndError.new('unicode property')
|
|
2626
2552
|
end
|
|
2627
2553
|
when 22 then
|
|
2628
|
-
# line
|
|
2554
|
+
# line 139 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2629
2555
|
begin
|
|
2630
2556
|
|
|
2631
|
-
text =
|
|
2557
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2632
2558
|
raise PrematureEndError.new( text )
|
|
2633
2559
|
end
|
|
2634
|
-
# line
|
|
2560
|
+
# line 2560 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
|
2635
2561
|
end
|
|
2636
2562
|
end
|
|
2637
2563
|
|
|
@@ -2642,13 +2568,13 @@ act = 0
|
|
|
2642
2568
|
end
|
|
2643
2569
|
end
|
|
2644
2570
|
|
|
2645
|
-
# line
|
|
2571
|
+
# line 763 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
|
2646
2572
|
|
|
2647
2573
|
# to avoid "warning: assigned but unused variable - testEof"
|
|
2648
2574
|
testEof = testEof
|
|
2649
2575
|
|
|
2650
2576
|
if cs == re_scanner_error
|
|
2651
|
-
text =
|
|
2577
|
+
text = copy(data, ts ? ts-1 : 0, -1)
|
|
2652
2578
|
raise ScannerError.new("Scan error at '#{text}'")
|
|
2653
2579
|
end
|
|
2654
2580
|
|
|
@@ -2676,22 +2602,29 @@ end
|
|
|
2676
2602
|
end
|
|
2677
2603
|
|
|
2678
2604
|
# Emits an array with the details of the scanned pattern
|
|
2679
|
-
def emit(type, token, text
|
|
2605
|
+
def emit(type, token, text)
|
|
2680
2606
|
#puts "EMIT: type: #{type}, token: #{token}, text: #{text}, ts: #{ts}, te: #{te}"
|
|
2681
2607
|
|
|
2682
2608
|
emit_literal if literal
|
|
2683
2609
|
|
|
2610
|
+
# Ragel runs with byte-based indices (ts, te). These are of little value to
|
|
2611
|
+
# end-users, so we keep track of char-based indices and emit those instead.
|
|
2612
|
+
ts_char_pos = char_pos
|
|
2613
|
+
te_char_pos = char_pos + text.length
|
|
2614
|
+
|
|
2684
2615
|
if block
|
|
2685
|
-
block.call type, token, text,
|
|
2616
|
+
block.call type, token, text, ts_char_pos, te_char_pos
|
|
2686
2617
|
end
|
|
2687
2618
|
|
|
2688
|
-
tokens << [type, token, text,
|
|
2619
|
+
tokens << [type, token, text, ts_char_pos, te_char_pos]
|
|
2620
|
+
|
|
2621
|
+
self.char_pos = te_char_pos
|
|
2689
2622
|
end
|
|
2690
2623
|
|
|
2691
2624
|
private
|
|
2692
2625
|
|
|
2693
2626
|
attr_accessor :tokens, :literal, :block, :free_spacing, :spacing_stack,
|
|
2694
|
-
:group_depth, :set_depth, :conditional_stack
|
|
2627
|
+
:group_depth, :set_depth, :conditional_stack, :char_pos
|
|
2695
2628
|
|
|
2696
2629
|
def free_spacing?(input_object, options)
|
|
2697
2630
|
if options && !input_object.is_a?(String)
|
|
@@ -2714,36 +2647,25 @@ end
|
|
|
2714
2647
|
end
|
|
2715
2648
|
|
|
2716
2649
|
# Copy from ts to te from data as text
|
|
2717
|
-
def copy(data,
|
|
2718
|
-
data[
|
|
2719
|
-
end
|
|
2720
|
-
|
|
2721
|
-
# Copy from ts to te from data as text, returning an array with the text
|
|
2722
|
-
# and the offsets used to copy it.
|
|
2723
|
-
def text(data, ts, te, soff = 0)
|
|
2724
|
-
[copy(data, ts-soff..te-1), ts-soff, te]
|
|
2650
|
+
def copy(data, ts, te)
|
|
2651
|
+
data[ts...te].pack('c*').force_encoding('utf-8')
|
|
2725
2652
|
end
|
|
2726
2653
|
|
|
2727
2654
|
# Appends one or more characters to the literal buffer, to be emitted later
|
|
2728
|
-
# by a call to emit_literal.
|
|
2655
|
+
# by a call to emit_literal.
|
|
2729
2656
|
def append_literal(data, ts, te)
|
|
2730
2657
|
self.literal = literal || []
|
|
2731
|
-
literal <<
|
|
2658
|
+
literal << copy(data, ts, te)
|
|
2732
2659
|
end
|
|
2733
2660
|
|
|
2734
|
-
# Emits the literal run collected by calls to the append_literal method
|
|
2735
|
-
# using the total start (ts) and end (te) offsets of the run.
|
|
2661
|
+
# Emits the literal run collected by calls to the append_literal method.
|
|
2736
2662
|
def emit_literal
|
|
2737
|
-
|
|
2738
|
-
text = literal.map {|t| t[0]}.join
|
|
2739
|
-
|
|
2740
|
-
text.force_encoding('utf-8') if text.respond_to?(:force_encoding)
|
|
2741
|
-
|
|
2663
|
+
text = literal.join
|
|
2742
2664
|
self.literal = nil
|
|
2743
|
-
emit(:literal, :literal, text
|
|
2665
|
+
emit(:literal, :literal, text)
|
|
2744
2666
|
end
|
|
2745
2667
|
|
|
2746
|
-
def emit_options(text
|
|
2668
|
+
def emit_options(text)
|
|
2747
2669
|
token = nil
|
|
2748
2670
|
|
|
2749
2671
|
# Ruby allows things like '(?-xxxx)' or '(?xx-xx--xx-:abc)'.
|
|
@@ -2769,14 +2691,14 @@ end
|
|
|
2769
2691
|
token = :options_switch
|
|
2770
2692
|
end
|
|
2771
2693
|
|
|
2772
|
-
emit(:group, token, text
|
|
2694
|
+
emit(:group, token, text)
|
|
2773
2695
|
end
|
|
2774
2696
|
|
|
2775
2697
|
def emit_meta_control_sequence(data, ts, te, token)
|
|
2776
2698
|
if data.last < 0x00 || data.last > 0x7F
|
|
2777
2699
|
validation_error(:sequence, 'escape', token.to_s)
|
|
2778
2700
|
end
|
|
2779
|
-
emit(:escape, token,
|
|
2701
|
+
emit(:escape, token, copy(data, ts-1, te))
|
|
2780
2702
|
end
|
|
2781
2703
|
|
|
2782
2704
|
# Centralizes and unifies the handling of validation related
|