graphql 2.0.17.2 → 2.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/graphql/analysis/ast.rb +2 -2
  3. data/lib/graphql/backtrace/tracer.rb +1 -1
  4. data/lib/graphql/execution/interpreter/resolve.rb +19 -0
  5. data/lib/graphql/execution/interpreter/runtime.rb +96 -88
  6. data/lib/graphql/execution/interpreter.rb +8 -13
  7. data/lib/graphql/execution/lazy.rb +2 -4
  8. data/lib/graphql/execution/multiplex.rb +2 -1
  9. data/lib/graphql/graphql_ext.bundle +0 -0
  10. data/lib/graphql/language/lexer.rb +216 -1505
  11. data/lib/graphql/language/lexer.ri +744 -0
  12. data/lib/graphql/language/parser.rb +9 -9
  13. data/lib/graphql/language/parser.y +9 -9
  14. data/lib/graphql/pagination/active_record_relation_connection.rb +0 -8
  15. data/lib/graphql/query/context.rb +45 -11
  16. data/lib/graphql/query.rb +15 -2
  17. data/lib/graphql/schema/field.rb +31 -21
  18. data/lib/graphql/schema/member/has_deprecation_reason.rb +3 -4
  19. data/lib/graphql/schema/member/has_fields.rb +6 -1
  20. data/lib/graphql/schema/object.rb +2 -4
  21. data/lib/graphql/schema/resolver/has_payload_type.rb +9 -9
  22. data/lib/graphql/schema/timeout.rb +23 -27
  23. data/lib/graphql/schema/warden.rb +8 -1
  24. data/lib/graphql/schema.rb +39 -1
  25. data/lib/graphql/static_validation/validator.rb +1 -1
  26. data/lib/graphql/tracing/active_support_notifications_trace.rb +16 -0
  27. data/lib/graphql/tracing/appoptics_trace.rb +231 -0
  28. data/lib/graphql/tracing/appsignal_trace.rb +66 -0
  29. data/lib/graphql/tracing/data_dog_trace.rb +148 -0
  30. data/lib/graphql/tracing/new_relic_trace.rb +75 -0
  31. data/lib/graphql/tracing/notifications_trace.rb +41 -0
  32. data/lib/graphql/tracing/platform_trace.rb +107 -0
  33. data/lib/graphql/tracing/platform_tracing.rb +15 -3
  34. data/lib/graphql/tracing/prometheus_trace.rb +89 -0
  35. data/lib/graphql/tracing/prometheus_tracing.rb +3 -3
  36. data/lib/graphql/tracing/scout_trace.rb +72 -0
  37. data/lib/graphql/tracing/statsd_trace.rb +56 -0
  38. data/lib/graphql/tracing.rb +136 -39
  39. data/lib/graphql/type_kinds.rb +6 -3
  40. data/lib/graphql/version.rb +1 -1
  41. data/lib/graphql.rb +7 -8
  42. metadata +14 -3
  43. data/lib/graphql/language/lexer.rl +0 -280
@@ -1,1509 +1,220 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module GraphQL
4
- module Language
5
- module Lexer
6
- def self.tokenize(query_string)
7
- run_lexer(query_string)
8
- end
9
-
10
- # Replace any escaped unicode or whitespace with the _actual_ characters
11
- # To avoid allocating more strings, this modifies the string passed into it
12
- def self.replace_escaped_characters_in_place(raw_string)
13
- raw_string.gsub!(ESCAPES, ESCAPES_REPLACE)
14
- raw_string.gsub!(UTF_8) do |_matched_str|
15
- codepoint_1 = ($1 || $2).to_i(16)
16
- codepoint_2 = $3
17
-
18
- if codepoint_2
19
- codepoint_2 = codepoint_2.to_i(16)
20
- if (codepoint_1 >= 0xD800 && codepoint_1 <= 0xDBFF) && # leading surrogate
21
- (codepoint_2 >= 0xDC00 && codepoint_2 <= 0xDFFF) # trailing surrogate
22
- # A surrogate pair
23
- combined = ((codepoint_1 - 0xD800) * 0x400) + (codepoint_2 - 0xDC00) + 0x10000
24
- [combined].pack('U'.freeze)
25
- else
26
- # Two separate code points
27
- [codepoint_1].pack('U'.freeze) + [codepoint_2].pack('U'.freeze)
28
- end
29
- else
30
- [codepoint_1].pack('U'.freeze)
31
- end
32
- end
33
- nil
34
- end
35
-
36
- private
37
-
38
- class << self
39
- attr_accessor :_graphql_lexer_trans_keys
40
- private :_graphql_lexer_trans_keys, :_graphql_lexer_trans_keys=
41
- end
42
- self._graphql_lexer_trans_keys = [
43
- 1, 0, 4, 22, 4, 43, 14, 47, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 49, 4, 22, 4, 4, 4, 4, 4, 22, 4, 4, 4, 4, 14, 15, 14, 15, 10, 15, 12, 12, 4, 22, 4, 43, 14, 47, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 49, 0, 49, 0, 0, 4, 22, 4, 4, 4, 4, 4, 4, 4, 22, 4, 4, 4, 4, 1, 1, 14, 15, 10, 29, 14, 15, 10, 29, 10, 29, 12, 12, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 14, 46, 4, 4, 0 ,
44
- ]
45
-
46
- class << self
47
- attr_accessor :_graphql_lexer_char_class
48
- private :_graphql_lexer_char_class, :_graphql_lexer_char_class=
49
- end
50
- self._graphql_lexer_char_class = [
51
- 0, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 3, 4, 5, 6, 2, 7, 2, 8, 9, 2, 10, 0, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 2, 2, 17, 2, 2, 18, 19, 19, 19, 19, 20, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 21, 22, 23, 2, 24, 2, 25, 26, 27, 28, 29, 30, 31, 32, 33, 19, 19, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 19, 45, 46, 19, 47, 48, 49, 0 ,
52
- ]
53
-
54
- class << self
55
- attr_accessor :_graphql_lexer_index_offsets
56
- private :_graphql_lexer_index_offsets, :_graphql_lexer_index_offsets=
57
- end
58
- self._graphql_lexer_index_offsets = [
59
- 0, 0, 19, 59, 93, 126, 159, 192, 225, 258, 291, 324, 360, 379, 380, 381, 400, 401, 402, 404, 406, 412, 413, 432, 472, 506, 539, 572, 605, 638, 671, 704, 737, 773, 823, 824, 843, 844, 845, 846, 865, 866, 867, 868, 870, 890, 892, 912, 932, 933, 966, 999, 1032, 1065, 1098, 1131, 1164, 1197, 1230, 1263, 1296, 1329, 1362, 1395, 1428, 1461, 1494, 1527, 1560, 1593, 1626, 1659, 1692, 1725, 1758, 1791, 1824, 1857, 1890, 1923, 1956, 1989, 2022, 2055, 2088, 2121, 2154, 2187, 2220, 2253, 2286, 2319, 2352, 2385, 2418, 2451, 2484, 2517, 2550, 2583, 2616, 2649, 2682, 2715, 2748, 2781, 2814, 2847, 2880, 2913, 2946, 2979, 3012, 3045, 3078, 3111, 3144, 3177, 3210, 3243, 3276, 3309, 3342, 3375, 3408, 3441, 3474, 3507, 3540, 3573, 3606, 3639, 3672, 3705, 3738, 3771, 3804, 3837, 3870, 3903, 3936, 3969, 4002, 4035, 4068, 0 ,
60
- ]
3
+ require "strscan"
61
4
 
62
- class << self
63
- attr_accessor :_graphql_lexer_indicies
64
- private :_graphql_lexer_indicies, :_graphql_lexer_indicies=
65
- end
66
- self._graphql_lexer_indicies = [
67
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 4, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 0, 0, 0, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 0, 0, 0, 11, 11, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 0, 0, 0, 12, 12, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 12, 12, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 1, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 17, 18, 19, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 20, 21, 22, 22, 24, 24, 25, 25, 13, 13, 22, 22, 26, 28, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 29, 27, 30, 30, 30, 30, 30, 30, 30, 30, 27, 30, 30, 30, 30, 30, 30, 30, 30, 27, 30, 30, 30, 27, 30, 30, 30, 27, 30, 30, 30, 30, 30, 27, 30, 30, 30, 27, 30, 27, 31, 32, 32, 30, 30, 30, 32, 32, 30, 30, 30, 30, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 34, 34, 30, 30, 30, 34, 34, 30, 30, 30, 30, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, 30, 30, 30, 35, 35, 30, 30, 30, 30, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 27, 27, 30, 30, 30, 27, 27, 30, 30, 30, 30, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 36, 36, 30, 30, 30, 36, 36, 30, 30, 30, 30, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 30, 30, 30, 37, 37, 30, 30, 30, 30, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 30, 30, 30, 38, 38, 30, 30, 30, 30, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 30, 30, 30, 39, 39, 30, 30, 30, 30, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 30, 30, 30, 39, 39, 30, 30, 30, 30, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 30, 30, 27, 41, 42, 40, 43, 44, 45, 46, 47, 48, 49, 40, 50, 51, 40, 52, 53, 54, 55, 56, 57, 57, 58, 40, 59, 57, 57, 57, 57, 60, 61, 62, 57, 57, 63, 57, 64, 65, 66, 57, 67, 68, 69, 70, 71, 57, 57, 57, 72, 73, 74, 41, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 14, 80, 81, 82, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 83, 18, 84, 52, 53, 25, 25, 86, 85, 22, 22, 85, 85, 85, 85, 87, 85, 85, 85, 85, 85, 85, 85, 85, 87, 22, 22, 25, 25, 88, 88, 24, 24, 88, 88, 88, 88, 87, 88, 88, 88, 88, 88, 88, 88, 88, 87, 25, 25, 86, 85, 53, 53, 85, 85, 85, 85, 87, 85, 85, 85, 85, 85, 85, 85, 85, 87, 89, 57, 57, 13, 13, 13, 57, 57, 13, 13, 13, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 91, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 92, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 93, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 94, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 95, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 96, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 97, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 98, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 99, 57, 57, 57, 57, 57, 57, 57, 57, 100, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 101, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 102, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 103, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 104, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 105, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 106, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 107, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 108, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 109, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 110, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 111, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 112, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 113, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 114, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 115, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 116, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 117, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 118, 119, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 120, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 121, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 122, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 123, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 124, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 125, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 126, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 127, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 128, 57, 57, 57, 129, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 130, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 131, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 132, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 133, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 134, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 135, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 136, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 137, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 138, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 139, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 140, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 141, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 142, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 143, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 144, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 145, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 146, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 147, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 148, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 149, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 150, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 151, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 152, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 153, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 154, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 155, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 156, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 157, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 158, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 159, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 160, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 161, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 162, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 163, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 164, 57, 57, 57, 57, 57, 57, 165, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 166, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 167, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 168, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 169, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 170, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 171, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 172, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 173, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 174, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 175, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 176, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 177, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 178, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 179, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 180, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 181, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 182, 57, 57, 57, 57, 57, 183, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 184, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 185, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 186, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 187, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 188, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 189, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 190, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 90, 90, 90, 57, 57, 90, 90, 90, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 191, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 27, 0 ,
68
- ]
69
-
70
- class << self
71
- attr_accessor :_graphql_lexer_index_defaults
72
- private :_graphql_lexer_index_defaults, :_graphql_lexer_index_defaults=
73
- end
74
- self._graphql_lexer_index_defaults = [
75
- 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 13, 23, 13, 0, 27, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 40, 75, 1, 78, 79, 79, 14, 14, 14, 45, 76, 85, 88, 88, 85, 76, 13, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 30, 0 ,
76
- ]
77
-
78
- class << self
79
- attr_accessor :_graphql_lexer_trans_cond_spaces
80
- private :_graphql_lexer_trans_cond_spaces, :_graphql_lexer_trans_cond_spaces=
81
- end
82
- self._graphql_lexer_trans_cond_spaces = [
83
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 ,
84
- ]
85
-
86
- class << self
87
- attr_accessor :_graphql_lexer_cond_targs
88
- private :_graphql_lexer_cond_targs, :_graphql_lexer_cond_targs=
89
- end
90
- self._graphql_lexer_cond_targs = [
91
- 33, 1, 33, 2, 3, 4, 7, 5, 6, 8, 9, 10, 11, 33, 12, 13, 15, 14, 37, 16, 17, 39, 45, 33, 46, 18, 33, 22, 144, 23, 0, 24, 25, 28, 26, 27, 29, 30, 31, 32, 33, 34, 33, 33, 35, 42, 33, 33, 33, 33, 43, 48, 44, 47, 33, 33, 33, 49, 33, 33, 50, 58, 65, 75, 93, 100, 103, 104, 108, 117, 135, 140, 33, 33, 33, 33, 33, 36, 33, 33, 38, 33, 40, 41, 33, 33, 19, 20, 33, 21, 33, 51, 52, 53, 54, 55, 56, 57, 49, 59, 61, 60, 49, 62, 63, 64, 49, 66, 69, 67, 68, 49, 70, 71, 72, 73, 74, 49, 76, 84, 77, 78, 79, 80, 81, 82, 83, 49, 85, 87, 86, 49, 88, 89, 90, 91, 92, 49, 94, 95, 96, 97, 98, 99, 49, 101, 102, 49, 49, 105, 106, 107, 49, 109, 110, 111, 112, 113, 114, 115, 116, 49, 118, 125, 119, 122, 120, 121, 49, 123, 124, 49, 126, 127, 128, 129, 130, 131, 132, 133, 134, 49, 136, 138, 137, 49, 139, 49, 141, 142, 143, 49, 0 ,
92
- ]
93
-
94
- class << self
95
- attr_accessor :_graphql_lexer_cond_actions
96
- private :_graphql_lexer_cond_actions, :_graphql_lexer_cond_actions=
97
- end
98
- self._graphql_lexer_cond_actions = [
99
- 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 6, 0, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 12, 13, 14, 0, 15, 16, 17, 18, 0, 14, 19, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32, 33, 0, 34, 4, 4, 35, 36, 0, 0, 37, 0, 38, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 47, 0, 0, 48, 49, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 52, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 55, 0, 56, 0, 0, 0, 57, 0 ,
100
- ]
101
-
102
- class << self
103
- attr_accessor :_graphql_lexer_to_state_actions
104
- private :_graphql_lexer_to_state_actions, :_graphql_lexer_to_state_actions=
105
- end
106
- self._graphql_lexer_to_state_actions = [
107
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0 ,
108
- ]
109
-
110
- class << self
111
- attr_accessor :_graphql_lexer_from_state_actions
112
- private :_graphql_lexer_from_state_actions, :_graphql_lexer_from_state_actions=
113
- end
114
- self._graphql_lexer_from_state_actions = [
115
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 ,
116
- ]
117
-
118
- class << self
119
- attr_accessor :_graphql_lexer_eof_trans
120
- private :_graphql_lexer_eof_trans, :_graphql_lexer_eof_trans=
121
- end
122
- self._graphql_lexer_eof_trans = [
123
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 14, 14, 14, 14, 14, 14, 24, 14, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 77, 79, 80, 80, 80, 80, 80, 85, 77, 86, 89, 89, 86, 77, 14, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 0, 0 ,
124
- ]
125
-
126
- class << self
127
- attr_accessor :_graphql_lexer_nfa_targs
128
- private :_graphql_lexer_nfa_targs, :_graphql_lexer_nfa_targs=
129
- end
130
- self._graphql_lexer_nfa_targs = [
131
- 0, 0 ,
132
- ]
133
-
134
- class << self
135
- attr_accessor :_graphql_lexer_nfa_offsets
136
- private :_graphql_lexer_nfa_offsets, :_graphql_lexer_nfa_offsets=
137
- end
138
- self._graphql_lexer_nfa_offsets = [
139
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,
140
- ]
141
-
142
- class << self
143
- attr_accessor :_graphql_lexer_nfa_push_actions
144
- private :_graphql_lexer_nfa_push_actions, :_graphql_lexer_nfa_push_actions=
145
- end
146
- self._graphql_lexer_nfa_push_actions = [
147
- 0, 0 ,
148
- ]
149
-
150
- class << self
151
- attr_accessor :_graphql_lexer_nfa_pop_trans
152
- private :_graphql_lexer_nfa_pop_trans, :_graphql_lexer_nfa_pop_trans=
153
- end
154
- self._graphql_lexer_nfa_pop_trans = [
155
- 0, 0 ,
156
- ]
157
-
158
- class << self
159
- attr_accessor :graphql_lexer_start
160
- end
161
- self.graphql_lexer_start = 33;
162
-
163
- class << self
164
- attr_accessor :graphql_lexer_first_final
165
- end
166
- self.graphql_lexer_first_final = 33;
167
-
168
- class << self
169
- attr_accessor :graphql_lexer_error
170
- end
171
- self.graphql_lexer_error = 0;
172
-
173
- class << self
174
- attr_accessor :graphql_lexer_en_str
175
- end
176
- self.graphql_lexer_en_str = 144;
177
-
178
- class << self
179
- attr_accessor :graphql_lexer_en_main
180
- end
181
- self.graphql_lexer_en_main = 33;
182
-
183
- def self.run_lexer(query_string)
184
- data = query_string.unpack(PACK_DIRECTIVE)
185
- eof = data.length
186
-
187
- # Since `Lexer` is a module, store all lexer state
188
- # in this local variable:
189
- meta = {
190
- line: 1,
191
- col: 1,
192
- data: data,
193
- tokens: [],
194
- previous_token: nil,
195
- }
196
-
197
- p ||= 0
198
- pe ||= data.length
199
-
200
- begin
201
- cs = graphql_lexer_start;
202
- ts = 0;
203
- te = 0;
204
- act = 0;
205
-
206
- end
207
- begin
208
- _trans = 0;
209
- _have = 0;
210
- _cont = 1;
211
- _keys = 0;
212
- _inds = 0;
213
- while ( _cont == 1 )
214
- begin
215
- if ( cs == 0 )
216
- _cont = 0;
217
-
218
- end
219
- _have = 0;
220
- if ( p == pe )
221
- begin
222
- if ( p == eof )
223
- begin
224
- if ( _graphql_lexer_eof_trans[cs] > 0 )
225
- begin
226
- _trans = _graphql_lexer_eof_trans[cs] - 1;
227
- _have = 1;
228
-
229
- end
230
-
231
- end
232
- if ( _have == 0 )
233
- begin
234
-
235
- end
236
-
237
- end
238
-
239
- end
240
-
241
- end
242
- if ( _have == 0 )
243
- _cont = 0;
244
-
245
- end
246
-
247
- end
248
-
249
- end
250
- if ( _cont == 1 )
251
- begin
252
- if ( _have == 0 )
253
- begin
254
- case _graphql_lexer_from_state_actions[cs]
255
- when -2 then
256
- begin
257
- end
258
- when 10 then
259
- begin
260
- begin
261
- begin
262
- ts = p;
263
-
264
- end
265
-
266
- end
267
-
268
-
269
- end
270
- end
271
- _keys = (cs<<1) ;
272
- _inds = _graphql_lexer_index_offsets[cs] ;
273
- if ( ( data[p ].ord) <= 125 && ( data[p ].ord) >= 9 )
274
- begin
275
- _ic = _graphql_lexer_char_class[( data[p ].ord) - 9];
276
- if ( _ic <= _graphql_lexer_trans_keys[_keys+1 ]&& _ic >= _graphql_lexer_trans_keys[_keys ] )
277
- _trans = _graphql_lexer_indicies[_inds + ( _ic - _graphql_lexer_trans_keys[_keys ]) ];
278
-
279
- else
280
- _trans = _graphql_lexer_index_defaults[cs];
281
-
282
- end
283
-
284
- end
285
-
286
- else
287
- begin
288
- _trans = _graphql_lexer_index_defaults[cs];
289
-
290
- end
291
-
292
- end
293
-
294
- end
295
-
296
- end
297
- if ( _cont == 1 )
298
- begin
299
- cs = _graphql_lexer_cond_targs[_trans];
300
- case _graphql_lexer_cond_actions[_trans]
301
- when -2 then
302
- begin
303
- end
304
- when 14 then
305
- begin
306
- begin
307
- begin
308
- te = p+1;
309
-
310
- end
311
-
312
- end
313
-
314
- end
315
- when 8 then
316
- begin
317
- begin
318
- begin
319
- te = p+1;
320
- begin
321
- emit_string(ts, te, meta, block: false)
322
- end
323
-
324
- end
325
-
326
- end
327
-
328
- end
329
- when 28 then
330
- begin
331
- begin
332
- begin
333
- te = p+1;
334
- begin
335
- emit(:RCURLY, ts, te, meta, "}")
336
- end
337
-
338
- end
339
-
340
- end
341
-
342
- end
343
- when 26 then
344
- begin
345
- begin
346
- begin
347
- te = p+1;
348
- begin
349
- emit(:LCURLY, ts, te, meta, "{")
350
- end
351
-
352
- end
353
-
354
- end
355
-
356
- end
357
- when 18 then
358
- begin
359
- begin
360
- begin
361
- te = p+1;
362
- begin
363
- emit(:RPAREN, ts, te, meta, ")")
364
- end
365
-
366
- end
367
-
368
- end
369
-
370
- end
371
- when 17 then
372
- begin
373
- begin
374
- begin
375
- te = p+1;
376
- begin
377
- emit(:LPAREN, ts, te, meta, "(")
378
- end
379
-
380
- end
381
-
382
- end
383
-
384
- end
385
- when 25 then
386
- begin
387
- begin
388
- begin
389
- te = p+1;
390
- begin
391
- emit(:RBRACKET, ts, te, meta, "]")
392
- end
393
-
394
- end
395
-
396
- end
397
-
398
- end
399
- when 24 then
400
- begin
401
- begin
402
- begin
403
- te = p+1;
404
- begin
405
- emit(:LBRACKET, ts, te, meta, "[")
406
- end
407
-
408
- end
409
-
410
- end
411
-
412
- end
413
- when 20 then
414
- begin
415
- begin
416
- begin
417
- te = p+1;
418
- begin
419
- emit(:COLON, ts, te, meta, ":")
420
- end
421
-
422
- end
423
-
424
- end
425
-
426
- end
427
- when 2 then
428
- begin
429
- begin
430
- begin
431
- te = p+1;
432
- begin
433
- emit_string(ts, te, meta, block: false)
434
- end
435
-
436
- end
437
-
438
- end
439
-
440
- end
441
- when 34 then
442
- begin
443
- begin
444
- begin
445
- te = p+1;
446
- begin
447
- emit_string(ts, te, meta, block: true)
448
- end
449
-
450
- end
451
-
452
- end
453
-
454
- end
455
- when 15 then
456
- begin
457
- begin
458
- begin
459
- te = p+1;
460
- begin
461
- emit(:VAR_SIGN, ts, te, meta, "$")
462
- end
463
-
464
- end
465
-
466
- end
467
-
468
- end
469
- when 22 then
470
- begin
471
- begin
472
- begin
473
- te = p+1;
474
- begin
475
- emit(:DIR_SIGN, ts, te, meta, "@")
476
- end
477
-
478
- end
479
-
480
- end
481
-
482
- end
483
- when 7 then
484
- begin
485
- begin
486
- begin
487
- te = p+1;
488
- begin
489
- emit(:ELLIPSIS, ts, te, meta, "...")
490
- end
491
-
492
- end
493
-
494
- end
495
-
496
- end
497
- when 21 then
498
- begin
499
- begin
500
- begin
501
- te = p+1;
502
- begin
503
- emit(:EQUALS, ts, te, meta, "=")
504
- end
505
-
506
- end
507
-
508
- end
509
-
510
- end
511
- when 13 then
512
- begin
513
- begin
514
- begin
515
- te = p+1;
516
- begin
517
- emit(:BANG, ts, te, meta, "!")
518
- end
519
-
520
- end
521
-
522
- end
523
-
524
- end
525
- when 27 then
526
- begin
527
- begin
528
- begin
529
- te = p+1;
530
- begin
531
- emit(:PIPE, ts, te, meta, "|")
532
- end
533
-
534
- end
535
-
536
- end
537
-
538
- end
539
- when 16 then
540
- begin
541
- begin
542
- begin
543
- te = p+1;
544
- begin
545
- emit(:AMP, ts, te, meta, "&")
546
- end
547
-
548
- end
549
-
550
- end
551
-
552
- end
553
- when 12 then
554
- begin
555
- begin
556
- begin
557
- te = p+1;
558
- begin
559
- meta[:line] += 1
560
- meta[:col] = 1
561
-
562
- end
563
-
564
- end
565
-
566
- end
567
-
568
- end
569
- when 11 then
570
- begin
571
- begin
572
- begin
573
- te = p+1;
574
- begin
575
- emit(:UNKNOWN_CHAR, ts, te, meta)
576
- end
577
-
578
- end
579
-
580
- end
581
-
582
- end
583
- when 36 then
584
- begin
585
- begin
586
- begin
587
- te = p;
588
- p = p - 1;
589
- begin
590
- emit(:INT, ts, te, meta)
591
- end
592
-
593
- end
594
-
595
- end
596
-
597
- end
598
- when 37 then
599
- begin
600
- begin
601
- begin
602
- te = p;
603
- p = p - 1;
604
- begin
605
- emit(:FLOAT, ts, te, meta)
606
- end
607
-
608
- end
609
-
610
- end
611
-
612
- end
613
- when 32 then
614
- begin
615
- begin
616
- begin
617
- te = p;
618
- p = p - 1;
619
- begin
620
- emit_string(ts, te, meta, block: false)
621
- end
622
-
623
- end
624
-
625
- end
626
-
627
- end
628
- when 33 then
629
- begin
630
- begin
631
- begin
632
- te = p;
633
- p = p - 1;
634
- begin
635
- emit_string(ts, te, meta, block: true)
636
- end
637
-
638
- end
639
-
640
- end
641
-
642
- end
643
- when 38 then
644
- begin
645
- begin
646
- begin
647
- te = p;
648
- p = p - 1;
649
- begin
650
- emit(:IDENTIFIER, ts, te, meta)
651
- end
652
-
653
- end
654
-
655
- end
656
-
657
- end
658
- when 35 then
659
- begin
660
- begin
661
- begin
662
- te = p;
663
- p = p - 1;
664
- begin
665
- record_comment(ts, te, meta)
666
- end
667
-
668
- end
669
-
670
- end
671
-
672
- end
673
- when 29 then
674
- begin
675
- begin
676
- begin
677
- te = p;
678
- p = p - 1;
679
- begin
680
- meta[:col] += te - ts
681
- end
682
-
683
- end
684
-
685
- end
686
-
687
- end
688
- when 30 then
689
- begin
690
- begin
691
- begin
692
- te = p;
693
- p = p - 1;
694
- begin
695
- emit(:UNKNOWN_CHAR, ts, te, meta)
696
- end
697
-
698
- end
699
-
700
- end
701
-
702
- end
703
- when 5 then
704
- begin
705
- begin
706
- begin
707
- p = ((te))-1;
708
- begin
709
- emit(:INT, ts, te, meta)
710
- end
711
-
712
- end
713
-
714
- end
715
-
716
- end
717
- when 1 then
718
- begin
719
- begin
720
- begin
721
- p = ((te))-1;
722
- begin
723
- emit(:UNKNOWN_CHAR, ts, te, meta)
724
- end
725
-
726
- end
727
-
728
- end
729
-
730
- end
731
- when 3 then
732
- begin
733
- begin
734
- begin
735
- case act
736
- when -2 then
737
- begin
738
- end
739
- when 2 then
740
- begin
741
- p = ((te))-1;
742
- begin
743
- emit(:INT, ts, te, meta)
744
- end
745
-
746
- end
747
- when 3 then
748
- begin
749
- p = ((te))-1;
750
- begin
751
- emit(:FLOAT, ts, te, meta)
752
- end
753
-
754
- end
755
- when 4 then
756
- begin
757
- p = ((te))-1;
758
- begin
759
- emit(:ON, ts, te, meta, "on")
760
- end
761
-
762
- end
763
- when 5 then
764
- begin
765
- p = ((te))-1;
766
- begin
767
- emit(:FRAGMENT, ts, te, meta, "fragment")
768
- end
769
-
770
- end
771
- when 6 then
772
- begin
773
- p = ((te))-1;
774
- begin
775
- emit(:TRUE, ts, te, meta, "true")
776
- end
777
-
778
- end
779
- when 7 then
780
- begin
781
- p = ((te))-1;
782
- begin
783
- emit(:FALSE, ts, te, meta, "false")
784
- end
785
-
786
- end
787
- when 8 then
788
- begin
789
- p = ((te))-1;
790
- begin
791
- emit(:NULL, ts, te, meta, "null")
792
- end
793
-
794
- end
795
- when 9 then
796
- begin
797
- p = ((te))-1;
798
- begin
799
- emit(:QUERY, ts, te, meta, "query")
800
- end
801
-
802
- end
803
- when 10 then
804
- begin
805
- p = ((te))-1;
806
- begin
807
- emit(:MUTATION, ts, te, meta, "mutation")
808
- end
809
-
810
- end
811
- when 11 then
812
- begin
813
- p = ((te))-1;
814
- begin
815
- emit(:SUBSCRIPTION, ts, te, meta, "subscription")
816
- end
817
-
818
- end
819
- when 12 then
820
- begin
821
- p = ((te))-1;
822
- begin
823
- emit(:SCHEMA, ts, te, meta)
824
- end
825
-
826
- end
827
- when 13 then
828
- begin
829
- p = ((te))-1;
830
- begin
831
- emit(:SCALAR, ts, te, meta)
832
- end
833
-
834
- end
835
- when 14 then
836
- begin
837
- p = ((te))-1;
838
- begin
839
- emit(:TYPE, ts, te, meta)
840
- end
841
-
842
- end
843
- when 15 then
844
- begin
845
- p = ((te))-1;
846
- begin
847
- emit(:EXTEND, ts, te, meta)
848
- end
849
-
850
- end
851
- when 16 then
852
- begin
853
- p = ((te))-1;
854
- begin
855
- emit(:IMPLEMENTS, ts, te, meta)
856
- end
857
-
858
- end
859
- when 17 then
860
- begin
861
- p = ((te))-1;
862
- begin
863
- emit(:INTERFACE, ts, te, meta)
864
- end
865
-
866
- end
867
- when 18 then
868
- begin
869
- p = ((te))-1;
870
- begin
871
- emit(:UNION, ts, te, meta)
872
- end
873
-
874
- end
875
- when 19 then
876
- begin
877
- p = ((te))-1;
878
- begin
879
- emit(:ENUM, ts, te, meta)
880
- end
881
-
882
- end
883
- when 20 then
884
- begin
885
- p = ((te))-1;
886
- begin
887
- emit(:INPUT, ts, te, meta)
888
- end
889
-
890
- end
891
- when 21 then
892
- begin
893
- p = ((te))-1;
894
- begin
895
- emit(:DIRECTIVE, ts, te, meta)
896
- end
897
-
898
- end
899
- when 22 then
900
- begin
901
- p = ((te))-1;
902
- begin
903
- emit(:REPEATABLE, ts, te, meta, "repeatable")
904
- end
905
-
906
- end
907
- when 30 then
908
- begin
909
- p = ((te))-1;
910
- begin
911
- emit_string(ts, te, meta, block: false)
912
- end
913
-
914
- end
915
- when 31 then
916
- begin
917
- p = ((te))-1;
918
- begin
919
- emit_string(ts, te, meta, block: true)
920
- end
921
-
922
- end
923
- when 39 then
924
- begin
925
- p = ((te))-1;
926
- begin
927
- emit(:IDENTIFIER, ts, te, meta)
928
- end
929
-
930
-
931
- end
932
- end
933
-
934
- end
935
-
936
-
937
- end
938
-
939
- end
940
- when 19 then
941
- begin
942
- begin
943
- begin
944
- te = p+1;
945
-
946
- end
947
-
948
- end
949
- begin
950
- begin
951
- act = 2;
952
-
953
- end
954
-
955
- end
956
-
957
- end
958
- when 6 then
959
- begin
960
- begin
961
- begin
962
- te = p+1;
963
-
964
- end
965
-
966
- end
967
- begin
968
- begin
969
- act = 3;
970
-
971
- end
972
-
973
- end
974
-
975
- end
976
- when 49 then
977
- begin
978
- begin
979
- begin
980
- te = p+1;
981
-
982
- end
983
-
984
- end
985
- begin
986
- begin
987
- act = 4;
988
-
989
- end
990
-
991
- end
992
-
993
- end
994
- when 43 then
995
- begin
996
- begin
997
- begin
998
- te = p+1;
999
-
1000
- end
1001
-
1002
- end
1003
- begin
1004
- begin
1005
- act = 5;
1006
-
1007
- end
1008
-
1009
- end
1010
-
1011
- end
1012
- when 55 then
1013
- begin
1014
- begin
1015
- begin
1016
- te = p+1;
1017
-
1018
- end
1019
-
1020
- end
1021
- begin
1022
- begin
1023
- act = 6;
1024
-
1025
- end
1026
-
1027
- end
1028
-
1029
- end
1030
- when 42 then
1031
- begin
1032
- begin
1033
- begin
1034
- te = p+1;
1035
-
1036
- end
1037
-
1038
- end
1039
- begin
1040
- begin
1041
- act = 7;
1042
-
1043
- end
1044
-
1045
- end
1046
-
1047
- end
1048
- when 48 then
1049
- begin
1050
- begin
1051
- begin
1052
- te = p+1;
1053
-
1054
- end
1055
-
1056
- end
1057
- begin
1058
- begin
1059
- act = 8;
1060
-
1061
- end
1062
-
1063
- end
1064
-
1065
- end
1066
- when 50 then
1067
- begin
1068
- begin
1069
- begin
1070
- te = p+1;
1071
-
1072
- end
1073
-
1074
- end
1075
- begin
1076
- begin
1077
- act = 9;
1078
-
1079
- end
1080
-
1081
- end
1082
-
1083
- end
1084
- when 47 then
1085
- begin
1086
- begin
1087
- begin
1088
- te = p+1;
1089
-
1090
- end
1091
-
1092
- end
1093
- begin
1094
- begin
1095
- act = 10;
1096
-
1097
- end
1098
-
1099
- end
1100
-
1101
- end
1102
- when 54 then
1103
- begin
1104
- begin
1105
- begin
1106
- te = p+1;
1107
-
1108
- end
1109
-
1110
- end
1111
- begin
1112
- begin
1113
- act = 11;
1114
-
1115
- end
1116
-
1117
- end
1118
-
1119
- end
1120
- when 53 then
1121
- begin
1122
- begin
1123
- begin
1124
- te = p+1;
1125
-
1126
- end
1127
-
1128
- end
1129
- begin
1130
- begin
1131
- act = 12;
1132
-
1133
- end
1134
-
1135
- end
1136
-
1137
- end
1138
- when 52 then
1139
- begin
1140
- begin
1141
- begin
1142
- te = p+1;
1143
-
1144
- end
1145
-
1146
- end
1147
- begin
1148
- begin
1149
- act = 13;
1150
-
1151
- end
1152
-
1153
- end
1154
-
1155
- end
1156
- when 56 then
1157
- begin
1158
- begin
1159
- begin
1160
- te = p+1;
1161
-
1162
- end
1163
-
1164
- end
1165
- begin
1166
- begin
1167
- act = 14;
1168
-
1169
- end
1170
-
1171
- end
1172
-
1173
- end
1174
- when 41 then
1175
- begin
1176
- begin
1177
- begin
1178
- te = p+1;
1179
-
1180
- end
1181
-
1182
- end
1183
- begin
1184
- begin
1185
- act = 15;
1186
-
1187
- end
1188
-
1189
- end
1190
-
1191
- end
1192
- when 44 then
1193
- begin
1194
- begin
1195
- begin
1196
- te = p+1;
1197
-
1198
- end
1199
-
1200
- end
1201
- begin
1202
- begin
1203
- act = 16;
1204
-
1205
- end
1206
-
1207
- end
1208
-
1209
- end
1210
- when 46 then
1211
- begin
1212
- begin
1213
- begin
1214
- te = p+1;
1215
-
1216
- end
1217
-
1218
- end
1219
- begin
1220
- begin
1221
- act = 17;
1222
-
1223
- end
1224
-
1225
- end
1226
-
1227
- end
1228
- when 57 then
1229
- begin
1230
- begin
1231
- begin
1232
- te = p+1;
1233
-
1234
- end
1235
-
1236
- end
1237
- begin
1238
- begin
1239
- act = 18;
1240
-
1241
- end
1242
-
1243
- end
1244
-
1245
- end
1246
- when 40 then
1247
- begin
1248
- begin
1249
- begin
1250
- te = p+1;
1251
-
1252
- end
1253
-
1254
- end
1255
- begin
1256
- begin
1257
- act = 19;
1258
-
1259
- end
1260
-
1261
- end
1262
-
1263
- end
1264
- when 45 then
1265
- begin
1266
- begin
1267
- begin
1268
- te = p+1;
1269
-
1270
- end
1271
-
1272
- end
1273
- begin
1274
- begin
1275
- act = 20;
1276
-
1277
- end
1278
-
1279
- end
1280
-
1281
- end
1282
- when 39 then
1283
- begin
1284
- begin
1285
- begin
1286
- te = p+1;
1287
-
1288
- end
1289
-
1290
- end
1291
- begin
1292
- begin
1293
- act = 21;
1294
-
1295
- end
1296
-
1297
- end
1298
-
1299
- end
1300
- when 51 then
1301
- begin
1302
- begin
1303
- begin
1304
- te = p+1;
1305
-
1306
- end
1307
-
1308
- end
1309
- begin
1310
- begin
1311
- act = 22;
1312
-
1313
- end
1314
-
1315
- end
1316
-
1317
- end
1318
- when 31 then
1319
- begin
1320
- begin
1321
- begin
1322
- te = p+1;
1323
-
1324
- end
1325
-
1326
- end
1327
- begin
1328
- begin
1329
- act = 30;
1330
-
1331
- end
1332
-
1333
- end
1334
-
1335
- end
1336
- when 4 then
1337
- begin
1338
- begin
1339
- begin
1340
- te = p+1;
1341
-
1342
- end
1343
-
1344
- end
1345
- begin
1346
- begin
1347
- act = 31;
1348
-
1349
- end
1350
-
1351
- end
1352
-
1353
- end
1354
- when 23 then
1355
- begin
1356
- begin
1357
- begin
1358
- te = p+1;
1359
-
1360
- end
1361
-
1362
- end
1363
- begin
1364
- begin
1365
- act = 39;
1366
-
1367
- end
1368
-
1369
- end
1370
-
1371
-
1372
- end
1373
- end
1374
- case _graphql_lexer_to_state_actions[cs]
1375
- when -2 then
1376
- begin
1377
- end
1378
- when 9 then
1379
- begin
1380
- begin
1381
- begin
1382
- ts = 0;
1383
-
1384
- end
1385
-
1386
- end
1387
-
1388
-
1389
- end
1390
- end
1391
- if ( cs == 0 )
1392
- _cont = 0;
1393
-
1394
- end
1395
- if ( _cont == 1 )
1396
- p += 1;
1397
-
1398
- end
1399
-
1400
- end
1401
-
1402
- end
1403
-
1404
- end
1405
-
1406
- end
1407
-
1408
- end
1409
-
1410
- end
1411
-
1412
- end
1413
- meta[:tokens]
1414
- end
1415
-
1416
- def self.record_comment(ts, te, meta)
1417
- token = GraphQL::Language::Token.new(
1418
- :COMMENT,
1419
- meta[:data][ts, te - ts].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING),
1420
- meta[:line],
1421
- meta[:col],
1422
- meta[:previous_token],
1423
- )
1424
-
1425
- meta[:previous_token] = token
1426
-
1427
- meta[:col] += te - ts
1428
- end
1429
-
1430
- def self.emit(token_name, ts, te, meta, token_value = nil)
1431
- token_value ||= meta[:data][ts, te - ts].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING)
1432
- meta[:tokens] << token = GraphQL::Language::Token.new(
1433
- token_name,
1434
- token_value,
1435
- meta[:line],
1436
- meta[:col],
1437
- meta[:previous_token],
1438
- )
1439
- meta[:previous_token] = token
1440
- # Bump the column counter for the next token
1441
- meta[:col] += te - ts
1442
- end
1443
-
1444
- ESCAPES = /\\["\\\/bfnrt]/
1445
- ESCAPES_REPLACE = {
1446
- '\\"' => '"',
1447
- "\\\\" => "\\",
1448
- "\\/" => '/',
1449
- "\\b" => "\b",
1450
- "\\f" => "\f",
1451
- "\\n" => "\n",
1452
- "\\r" => "\r",
1453
- "\\t" => "\t",
1454
- }
1455
-
1456
- UTF_8 = /\\u(?:([\dAa-f]{4})|\{([\da-f]{4,})\})(?:\\u([\dAa-f]{4}))?/i
1457
-
1458
-
1459
- VALID_STRING = /\A(?:[^\\]|#{ESCAPES}|#{UTF_8})*\z/o
1460
-
1461
- PACK_DIRECTIVE = "c*"
1462
- UTF_8_ENCODING = "UTF-8"
1463
-
1464
- def self.emit_string(ts, te, meta, block:)
1465
- quotes_length = block ? 3 : 1
1466
- value = meta[:data][ts + quotes_length, te - ts - 2 * quotes_length].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING) || ''
1467
- line_incr = 0
1468
- if block && !value.empty?
1469
- line_incr = value.count("\n")
1470
- value = GraphQL::Language::BlockString.trim_whitespace(value)
1471
- end
1472
-
1473
- if !value.valid_encoding? || !value.match?(VALID_STRING)
1474
- meta[:tokens] << token = GraphQL::Language::Token.new(
1475
- :BAD_UNICODE_ESCAPE,
1476
- value,
1477
- meta[:line],
1478
- meta[:col],
1479
- meta[:previous_token],
1480
- )
1481
- else
1482
- replace_escaped_characters_in_place(value)
1483
-
1484
- if !value.valid_encoding?
1485
- meta[:tokens] << token = GraphQL::Language::Token.new(
1486
- :BAD_UNICODE_ESCAPE,
1487
- value,
1488
- meta[:line],
1489
- meta[:col],
1490
- meta[:previous_token],
1491
- )
1492
- else
1493
- meta[:tokens] << token = GraphQL::Language::Token.new(
1494
- :STRING,
1495
- value,
1496
- meta[:line],
1497
- meta[:col],
1498
- meta[:previous_token],
1499
- )
1500
- end
1501
- end
1502
-
1503
- meta[:previous_token] = token
1504
- meta[:col] += te - ts
1505
- meta[:line] += line_incr
1506
- end
1507
- end
1508
- end
5
+ module GraphQL
6
+ module Language
7
+ module Lexer
8
+ IDENTIFIER = /[_A-Za-z][_0-9A-Za-z]*/
9
+ NEWLINE = /[\c\r\n]/
10
+ BLANK = /[, \t]+/
11
+ COMMENT = /#[^\n\r]*/
12
+ INT = /[-]?(?:[0]|[1-9][0-9]*)/
13
+ FLOAT_DECIMAL = /[.][0-9]+/
14
+ FLOAT_EXP = /[eE][+-]?[0-9]+/
15
+ FLOAT = /#{INT}(#{FLOAT_DECIMAL}#{FLOAT_EXP}|#{FLOAT_DECIMAL}|#{FLOAT_EXP})/
16
+
17
+ module Literals
18
+ ON = /on\b/
19
+ FRAGMENT = /fragment\b/
20
+ TRUE = /true\b/
21
+ FALSE = /false\b/
22
+ NULL = /null\b/
23
+ QUERY = /query\b/
24
+ MUTATION = /mutation\b/
25
+ SUBSCRIPTION = /subscription\b/
26
+ SCHEMA = /schema\b/
27
+ SCALAR = /scalar\b/
28
+ TYPE = /type\b/
29
+ EXTEND = /extend\b/
30
+ IMPLEMENTS = /implements\b/
31
+ INTERFACE = /interface\b/
32
+ UNION = /union\b/
33
+ ENUM = /enum\b/
34
+ INPUT = /input\b/
35
+ DIRECTIVE = /directive\b/
36
+ REPEATABLE = /repeatable\b/
37
+ LCURLY = '{'
38
+ RCURLY = '}'
39
+ LPAREN = '('
40
+ RPAREN = ')'
41
+ LBRACKET = '['
42
+ RBRACKET = ']'
43
+ COLON = ':'
44
+ VAR_SIGN = '$'
45
+ DIR_SIGN = '@'
46
+ ELLIPSIS = '...'
47
+ EQUALS = '='
48
+ BANG = '!'
49
+ PIPE = '|'
50
+ AMP = '&'
51
+ end
52
+
53
+ include Literals
54
+
55
+ QUOTE = '"'
56
+ UNICODE_DIGIT = /[0-9A-Za-z]/
57
+ FOUR_DIGIT_UNICODE = /#{UNICODE_DIGIT}{4}/
58
+ N_DIGIT_UNICODE = %r{#{LCURLY}#{UNICODE_DIGIT}{4,}#{RCURLY}}x
59
+ UNICODE_ESCAPE = %r{\\u(?:#{FOUR_DIGIT_UNICODE}|#{N_DIGIT_UNICODE})}
60
+ # # https://graphql.github.io/graphql-spec/June2018/#sec-String-Value
61
+ STRING_ESCAPE = %r{[\\][\\/bfnrt]}
62
+ BLOCK_QUOTE = '"""'
63
+ ESCAPED_QUOTE = /\\"/;
64
+ STRING_CHAR = /#{ESCAPED_QUOTE}|[^"\\]|#{UNICODE_ESCAPE}|#{STRING_ESCAPE}/
65
+
66
+ LIT_NAME_LUT = Literals.constants.each_with_object({}) { |n, o|
67
+ key = Literals.const_get(n)
68
+ key = key.is_a?(Regexp) ? key.source.gsub(/(\\b|\\)/, '') : key
69
+ o[key] = n
70
+ }
71
+
72
+ LIT = Regexp.union(Literals.constants.map { |n| Literals.const_get(n) })
73
+
74
+ QUOTED_STRING = %r{#{QUOTE} (?:#{STRING_CHAR})* #{QUOTE}}x
75
+ BLOCK_STRING = %r{
76
+ #{BLOCK_QUOTE}
77
+ (?: [^"\\] | # Any characters that aren't a quote or slash
78
+ (?<!") ["]{1,2} (?!") | # Any quotes that don't have quotes next to them
79
+ \\"{0,3}(?!") | # A slash followed by <= 3 quotes that aren't followed by a quote
80
+ \\ | # A slash
81
+ "{1,2}(?!") # 1 or 2 " followed by something that isn't a quote
82
+ )*
83
+ (?:"")?
84
+ #{BLOCK_QUOTE}
85
+ }xm
86
+
87
+ # # catch-all for anything else. must be at the bottom for precedence.
88
+ UNKNOWN_CHAR = /./
89
+
90
+ def self.tokenize string
91
+ meta = {
92
+ line: 1,
93
+ col: 1,
94
+ tokens: [],
95
+ previous_token: nil,
96
+ }
97
+
98
+ unless string.valid_encoding?
99
+ emit(:BAD_UNICODE_ESCAPE, 0, 0, meta, string)
100
+ return meta[:tokens]
101
+ end
102
+
103
+ scan = StringScanner.new string
104
+
105
+ while !scan.eos?
106
+ pos = scan.pos
107
+
108
+ case
109
+ when str = scan.scan(FLOAT) then emit(:FLOAT, pos, scan.pos, meta, str)
110
+ when str = scan.scan(INT) then emit(:INT, pos, scan.pos, meta, str)
111
+ when str = scan.scan(LIT) then emit(LIT_NAME_LUT[str], pos, scan.pos, meta, -str)
112
+ when str = scan.scan(IDENTIFIER) then emit(:IDENTIFIER, pos, scan.pos, meta, str)
113
+ when str = scan.scan(BLOCK_STRING) then emit_block(pos, scan.pos, meta, str.gsub(/^#{BLOCK_QUOTE}|#{BLOCK_QUOTE}$/, ''))
114
+ when str = scan.scan(QUOTED_STRING) then emit_string(pos, scan.pos, meta, str.gsub(/^"|"$/, ''))
115
+ when str = scan.scan(COMMENT) then record_comment(pos, scan.pos, meta, str)
116
+ when str = scan.scan(NEWLINE)
117
+ meta[:line] += 1
118
+ meta[:col] = 1
119
+ when scan.scan(BLANK)
120
+ meta[:col] += scan.pos - pos
121
+ when str = scan.scan(UNKNOWN_CHAR) then emit(:UNKNOWN_CHAR, pos, scan.pos, meta, str)
122
+ else
123
+ # This should never happen since `UNKNOWN_CHAR` ensures we make progress
124
+ raise "Unknown string?"
125
+ end
126
+ end
127
+
128
+ meta[:tokens]
129
+ end
130
+
131
+ def self.emit(token_name, ts, te, meta, token_value)
132
+ meta[:tokens] << token = GraphQL::Language::Token.new(
133
+ token_name,
134
+ token_value,
135
+ meta[:line],
136
+ meta[:col],
137
+ meta[:previous_token],
138
+ )
139
+ meta[:previous_token] = token
140
+ # Bump the column counter for the next token
141
+ meta[:col] += te - ts
142
+ end
143
+
144
+ # Replace any escaped unicode or whitespace with the _actual_ characters
145
+ # To avoid allocating more strings, this modifies the string passed into it
146
+ def self.replace_escaped_characters_in_place(raw_string)
147
+ raw_string.gsub!(ESCAPES, ESCAPES_REPLACE)
148
+ raw_string.gsub!(UTF_8) do |_matched_str|
149
+ codepoint_1 = ($1 || $2).to_i(16)
150
+ codepoint_2 = $3
151
+
152
+ if codepoint_2
153
+ codepoint_2 = codepoint_2.to_i(16)
154
+ if (codepoint_1 >= 0xD800 && codepoint_1 <= 0xDBFF) && # leading surrogate
155
+ (codepoint_2 >= 0xDC00 && codepoint_2 <= 0xDFFF) # trailing surrogate
156
+ # A surrogate pair
157
+ combined = ((codepoint_1 - 0xD800) * 0x400) + (codepoint_2 - 0xDC00) + 0x10000
158
+ [combined].pack('U'.freeze)
159
+ else
160
+ # Two separate code points
161
+ [codepoint_1].pack('U'.freeze) + [codepoint_2].pack('U'.freeze)
162
+ end
163
+ else
164
+ [codepoint_1].pack('U'.freeze)
165
+ end
166
+ end
167
+ nil
168
+ end
169
+
170
+ def self.record_comment(ts, te, meta, str)
171
+ token = GraphQL::Language::Token.new(
172
+ :COMMENT,
173
+ str,
174
+ meta[:line],
175
+ meta[:col],
176
+ meta[:previous_token],
177
+ )
178
+
179
+ meta[:previous_token] = token
180
+
181
+ meta[:col] += te - ts
182
+ end
183
+
184
+ ESCAPES = /\\["\\\/bfnrt]/
185
+ ESCAPES_REPLACE = {
186
+ '\\"' => '"',
187
+ "\\\\" => "\\",
188
+ "\\/" => '/',
189
+ "\\b" => "\b",
190
+ "\\f" => "\f",
191
+ "\\n" => "\n",
192
+ "\\r" => "\r",
193
+ "\\t" => "\t",
194
+ }
195
+ UTF_8 = /\\u(?:([\dAa-f]{4})|\{([\da-f]{4,})\})(?:\\u([\dAa-f]{4}))?/i
196
+ VALID_STRING = /\A(?:[^\\]|#{ESCAPES}|#{UTF_8})*\z/o
197
+
198
+ def self.emit_block(ts, te, meta, value)
199
+ line_incr = value.count("\n")
200
+ value = GraphQL::Language::BlockString.trim_whitespace(value)
201
+ emit_string(ts, te, meta, value)
202
+ meta[:line] += line_incr
203
+ end
204
+
205
+ def self.emit_string(ts, te, meta, value)
206
+ if !value.valid_encoding? || !value.match?(VALID_STRING)
207
+ emit(:BAD_UNICODE_ESCAPE, ts, te, meta, value)
208
+ else
209
+ replace_escaped_characters_in_place(value)
210
+
211
+ if !value.valid_encoding?
212
+ emit(:BAD_UNICODE_ESCAPE, ts, te, meta, value)
213
+ else
214
+ emit(:STRING, ts, te, meta, value)
215
+ end
216
+ end
217
+ end
218
+ end
219
+ end
1509
220
  end