graphql 1.13.14 → 2.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/graphql/install_generator.rb +1 -1
  3. data/lib/generators/graphql/relay.rb +3 -17
  4. data/lib/generators/graphql/templates/schema.erb +3 -0
  5. data/lib/graphql/analysis/ast/field_usage.rb +3 -1
  6. data/lib/graphql/analysis/ast/max_query_complexity.rb +0 -1
  7. data/lib/graphql/analysis/ast/query_complexity.rb +1 -1
  8. data/lib/graphql/analysis/ast/query_depth.rb +0 -1
  9. data/lib/graphql/analysis/ast/visitor.rb +43 -36
  10. data/lib/graphql/analysis/ast.rb +2 -12
  11. data/lib/graphql/analysis.rb +0 -7
  12. data/lib/graphql/backtrace/table.rb +2 -20
  13. data/lib/graphql/backtrace/tracer.rb +2 -3
  14. data/lib/graphql/backtrace.rb +2 -8
  15. data/lib/graphql/dataloader/null_dataloader.rb +3 -1
  16. data/lib/graphql/dataloader/source.rb +9 -0
  17. data/lib/graphql/dataloader.rb +4 -1
  18. data/lib/graphql/dig.rb +1 -1
  19. data/lib/graphql/execution/errors.rb +12 -82
  20. data/lib/graphql/execution/interpreter/resolve.rb +26 -0
  21. data/lib/graphql/execution/interpreter/runtime.rb +163 -120
  22. data/lib/graphql/execution/interpreter.rb +187 -78
  23. data/lib/graphql/execution/lazy.rb +7 -21
  24. data/lib/graphql/execution/lookahead.rb +44 -40
  25. data/lib/graphql/execution/multiplex.rb +3 -174
  26. data/lib/graphql/execution.rb +11 -4
  27. data/lib/graphql/introspection/directive_type.rb +2 -2
  28. data/lib/graphql/introspection/dynamic_fields.rb +3 -8
  29. data/lib/graphql/introspection/entry_points.rb +2 -15
  30. data/lib/graphql/introspection/field_type.rb +1 -1
  31. data/lib/graphql/introspection/schema_type.rb +2 -2
  32. data/lib/graphql/introspection/type_type.rb +13 -6
  33. data/lib/graphql/introspection.rb +4 -3
  34. data/lib/graphql/language/document_from_schema_definition.rb +18 -35
  35. data/lib/graphql/language/lexer.rb +216 -1488
  36. data/lib/graphql/language/lexer.ri +744 -0
  37. data/lib/graphql/language/nodes.rb +41 -33
  38. data/lib/graphql/language/parser.rb +375 -363
  39. data/lib/graphql/language/parser.y +48 -43
  40. data/lib/graphql/language/printer.rb +37 -21
  41. data/lib/graphql/language/visitor.rb +191 -83
  42. data/lib/graphql/pagination/active_record_relation_connection.rb +0 -8
  43. data/lib/graphql/pagination/array_connection.rb +4 -2
  44. data/lib/graphql/pagination/connection.rb +31 -4
  45. data/lib/graphql/pagination/connections.rb +3 -28
  46. data/lib/graphql/pagination/relation_connection.rb +2 -0
  47. data/lib/graphql/query/context.rb +155 -196
  48. data/lib/graphql/query/input_validation_result.rb +10 -1
  49. data/lib/graphql/query/null_context.rb +0 -3
  50. data/lib/graphql/query/validation_pipeline.rb +12 -37
  51. data/lib/graphql/query/variable_validation_error.rb +2 -2
  52. data/lib/graphql/query/variables.rb +35 -21
  53. data/lib/graphql/query.rb +32 -43
  54. data/lib/graphql/railtie.rb +0 -104
  55. data/lib/graphql/rake_task/validate.rb +1 -1
  56. data/lib/graphql/rake_task.rb +29 -1
  57. data/lib/graphql/relay/range_add.rb +9 -20
  58. data/lib/graphql/relay.rb +0 -15
  59. data/lib/graphql/schema/addition.rb +7 -9
  60. data/lib/graphql/schema/argument.rb +36 -43
  61. data/lib/graphql/schema/build_from_definition.rb +32 -18
  62. data/lib/graphql/schema/directive/one_of.rb +12 -0
  63. data/lib/graphql/schema/directive/transform.rb +1 -1
  64. data/lib/graphql/schema/directive.rb +12 -23
  65. data/lib/graphql/schema/enum.rb +29 -41
  66. data/lib/graphql/schema/enum_value.rb +5 -25
  67. data/lib/graphql/schema/field/connection_extension.rb +4 -0
  68. data/lib/graphql/schema/field.rb +245 -343
  69. data/lib/graphql/schema/input_object.rb +57 -69
  70. data/lib/graphql/schema/interface.rb +0 -35
  71. data/lib/graphql/schema/introspection_system.rb +3 -8
  72. data/lib/graphql/schema/late_bound_type.rb +8 -2
  73. data/lib/graphql/schema/list.rb +18 -9
  74. data/lib/graphql/schema/loader.rb +1 -2
  75. data/lib/graphql/schema/member/base_dsl_methods.rb +15 -19
  76. data/lib/graphql/schema/member/build_type.rb +5 -7
  77. data/lib/graphql/schema/member/has_arguments.rb +146 -55
  78. data/lib/graphql/schema/member/has_deprecation_reason.rb +3 -4
  79. data/lib/graphql/schema/member/has_directives.rb +71 -56
  80. data/lib/graphql/schema/member/has_fields.rb +16 -4
  81. data/lib/graphql/schema/member/has_interfaces.rb +49 -10
  82. data/lib/graphql/schema/member/has_validators.rb +31 -5
  83. data/lib/graphql/schema/member/relay_shortcuts.rb +28 -2
  84. data/lib/graphql/schema/member/type_system_helpers.rb +17 -0
  85. data/lib/graphql/schema/member/validates_input.rb +3 -3
  86. data/lib/graphql/schema/member.rb +0 -6
  87. data/lib/graphql/schema/mutation.rb +0 -9
  88. data/lib/graphql/schema/non_null.rb +3 -9
  89. data/lib/graphql/schema/object.rb +15 -52
  90. data/lib/graphql/schema/relay_classic_mutation.rb +53 -42
  91. data/lib/graphql/schema/resolver/has_payload_type.rb +20 -10
  92. data/lib/graphql/schema/resolver.rb +41 -42
  93. data/lib/graphql/schema/scalar.rb +8 -23
  94. data/lib/graphql/schema/subscription.rb +0 -7
  95. data/lib/graphql/schema/timeout.rb +24 -28
  96. data/lib/graphql/schema/type_membership.rb +3 -0
  97. data/lib/graphql/schema/union.rb +10 -17
  98. data/lib/graphql/schema/warden.rb +34 -8
  99. data/lib/graphql/schema/wrapper.rb +0 -5
  100. data/lib/graphql/schema.rb +240 -968
  101. data/lib/graphql/static_validation/all_rules.rb +1 -0
  102. data/lib/graphql/static_validation/base_visitor.rb +4 -21
  103. data/lib/graphql/static_validation/definition_dependencies.rb +7 -1
  104. data/lib/graphql/static_validation/error.rb +2 -2
  105. data/lib/graphql/static_validation/literal_validator.rb +19 -1
  106. data/lib/graphql/static_validation/rules/directives_are_defined.rb +11 -5
  107. data/lib/graphql/static_validation/rules/directives_are_in_valid_locations.rb +12 -12
  108. data/lib/graphql/static_validation/rules/one_of_input_objects_are_valid.rb +66 -0
  109. data/lib/graphql/static_validation/rules/one_of_input_objects_are_valid_error.rb +29 -0
  110. data/lib/graphql/static_validation/rules/unique_directives_per_location.rb +12 -6
  111. data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed.rb +1 -1
  112. data/lib/graphql/static_validation/validator.rb +3 -25
  113. data/lib/graphql/static_validation.rb +0 -2
  114. data/lib/graphql/subscriptions/action_cable_subscriptions.rb +7 -1
  115. data/lib/graphql/subscriptions/default_subscription_resolve_extension.rb +38 -1
  116. data/lib/graphql/subscriptions/event.rb +3 -8
  117. data/lib/graphql/subscriptions/instrumentation.rb +0 -51
  118. data/lib/graphql/subscriptions.rb +32 -20
  119. data/lib/graphql/tracing/active_support_notifications_trace.rb +16 -0
  120. data/lib/graphql/tracing/appoptics_trace.rb +231 -0
  121. data/lib/graphql/tracing/appsignal_trace.rb +66 -0
  122. data/lib/graphql/tracing/data_dog_trace.rb +148 -0
  123. data/lib/graphql/tracing/data_dog_tracing.rb +2 -0
  124. data/lib/graphql/tracing/new_relic_trace.rb +75 -0
  125. data/lib/graphql/tracing/notifications_trace.rb +41 -0
  126. data/lib/graphql/tracing/platform_trace.rb +107 -0
  127. data/lib/graphql/tracing/platform_tracing.rb +26 -40
  128. data/lib/graphql/tracing/prometheus_trace.rb +89 -0
  129. data/lib/graphql/tracing/prometheus_tracing.rb +3 -3
  130. data/lib/graphql/tracing/scout_trace.rb +72 -0
  131. data/lib/graphql/tracing/statsd_trace.rb +56 -0
  132. data/lib/graphql/tracing.rb +136 -41
  133. data/lib/graphql/type_kinds.rb +6 -3
  134. data/lib/graphql/types/iso_8601_date.rb +4 -1
  135. data/lib/graphql/types/iso_8601_date_time.rb +4 -0
  136. data/lib/graphql/types/relay/base_connection.rb +16 -6
  137. data/lib/graphql/types/relay/connection_behaviors.rb +5 -25
  138. data/lib/graphql/types/relay/default_relay.rb +5 -9
  139. data/lib/graphql/types/relay/edge_behaviors.rb +1 -4
  140. data/lib/graphql/types/relay/node_behaviors.rb +5 -1
  141. data/lib/graphql/types/relay.rb +0 -2
  142. data/lib/graphql/types/string.rb +1 -1
  143. data/lib/graphql/version.rb +1 -1
  144. data/lib/graphql.rb +11 -72
  145. metadata +31 -133
  146. data/lib/graphql/analysis/analyze_query.rb +0 -98
  147. data/lib/graphql/analysis/field_usage.rb +0 -45
  148. data/lib/graphql/analysis/max_query_complexity.rb +0 -26
  149. data/lib/graphql/analysis/max_query_depth.rb +0 -26
  150. data/lib/graphql/analysis/query_complexity.rb +0 -88
  151. data/lib/graphql/analysis/query_depth.rb +0 -43
  152. data/lib/graphql/analysis/reducer_state.rb +0 -48
  153. data/lib/graphql/argument.rb +0 -131
  154. data/lib/graphql/authorization.rb +0 -82
  155. data/lib/graphql/backtrace/legacy_tracer.rb +0 -56
  156. data/lib/graphql/backwards_compatibility.rb +0 -61
  157. data/lib/graphql/base_type.rb +0 -232
  158. data/lib/graphql/boolean_type.rb +0 -2
  159. data/lib/graphql/compatibility/execution_specification/counter_schema.rb +0 -53
  160. data/lib/graphql/compatibility/execution_specification/specification_schema.rb +0 -200
  161. data/lib/graphql/compatibility/execution_specification.rb +0 -436
  162. data/lib/graphql/compatibility/lazy_execution_specification/lazy_schema.rb +0 -111
  163. data/lib/graphql/compatibility/lazy_execution_specification.rb +0 -215
  164. data/lib/graphql/compatibility/query_parser_specification/parse_error_specification.rb +0 -87
  165. data/lib/graphql/compatibility/query_parser_specification/query_assertions.rb +0 -79
  166. data/lib/graphql/compatibility/query_parser_specification.rb +0 -266
  167. data/lib/graphql/compatibility/schema_parser_specification.rb +0 -682
  168. data/lib/graphql/compatibility.rb +0 -5
  169. data/lib/graphql/define/assign_argument.rb +0 -12
  170. data/lib/graphql/define/assign_connection.rb +0 -13
  171. data/lib/graphql/define/assign_enum_value.rb +0 -18
  172. data/lib/graphql/define/assign_global_id_field.rb +0 -11
  173. data/lib/graphql/define/assign_mutation_function.rb +0 -34
  174. data/lib/graphql/define/assign_object_field.rb +0 -42
  175. data/lib/graphql/define/defined_object_proxy.rb +0 -53
  176. data/lib/graphql/define/instance_definable.rb +0 -255
  177. data/lib/graphql/define/no_definition_error.rb +0 -7
  178. data/lib/graphql/define/non_null_with_bang.rb +0 -16
  179. data/lib/graphql/define/type_definer.rb +0 -31
  180. data/lib/graphql/define.rb +0 -31
  181. data/lib/graphql/deprecated_dsl.rb +0 -55
  182. data/lib/graphql/directive/deprecated_directive.rb +0 -2
  183. data/lib/graphql/directive/include_directive.rb +0 -2
  184. data/lib/graphql/directive/skip_directive.rb +0 -2
  185. data/lib/graphql/directive.rb +0 -107
  186. data/lib/graphql/enum_type.rb +0 -133
  187. data/lib/graphql/execution/execute.rb +0 -333
  188. data/lib/graphql/execution/flatten.rb +0 -40
  189. data/lib/graphql/execution/instrumentation.rb +0 -92
  190. data/lib/graphql/execution/lazy/resolve.rb +0 -91
  191. data/lib/graphql/execution/typecast.rb +0 -50
  192. data/lib/graphql/field/resolve.rb +0 -59
  193. data/lib/graphql/field.rb +0 -226
  194. data/lib/graphql/float_type.rb +0 -2
  195. data/lib/graphql/function.rb +0 -128
  196. data/lib/graphql/id_type.rb +0 -2
  197. data/lib/graphql/input_object_type.rb +0 -138
  198. data/lib/graphql/int_type.rb +0 -2
  199. data/lib/graphql/interface_type.rb +0 -72
  200. data/lib/graphql/internal_representation/document.rb +0 -27
  201. data/lib/graphql/internal_representation/node.rb +0 -206
  202. data/lib/graphql/internal_representation/print.rb +0 -51
  203. data/lib/graphql/internal_representation/rewrite.rb +0 -184
  204. data/lib/graphql/internal_representation/scope.rb +0 -88
  205. data/lib/graphql/internal_representation/visit.rb +0 -36
  206. data/lib/graphql/internal_representation.rb +0 -7
  207. data/lib/graphql/language/lexer.rl +0 -260
  208. data/lib/graphql/list_type.rb +0 -80
  209. data/lib/graphql/non_null_type.rb +0 -71
  210. data/lib/graphql/object_type.rb +0 -130
  211. data/lib/graphql/query/arguments.rb +0 -189
  212. data/lib/graphql/query/arguments_cache.rb +0 -24
  213. data/lib/graphql/query/executor.rb +0 -52
  214. data/lib/graphql/query/literal_input.rb +0 -136
  215. data/lib/graphql/query/serial_execution/field_resolution.rb +0 -92
  216. data/lib/graphql/query/serial_execution/operation_resolution.rb +0 -19
  217. data/lib/graphql/query/serial_execution/selection_resolution.rb +0 -23
  218. data/lib/graphql/query/serial_execution/value_resolution.rb +0 -87
  219. data/lib/graphql/query/serial_execution.rb +0 -40
  220. data/lib/graphql/relay/array_connection.rb +0 -83
  221. data/lib/graphql/relay/base_connection.rb +0 -189
  222. data/lib/graphql/relay/connection_instrumentation.rb +0 -54
  223. data/lib/graphql/relay/connection_resolve.rb +0 -43
  224. data/lib/graphql/relay/connection_type.rb +0 -54
  225. data/lib/graphql/relay/edge.rb +0 -27
  226. data/lib/graphql/relay/edge_type.rb +0 -19
  227. data/lib/graphql/relay/edges_instrumentation.rb +0 -39
  228. data/lib/graphql/relay/global_id_resolve.rb +0 -17
  229. data/lib/graphql/relay/mongo_relation_connection.rb +0 -50
  230. data/lib/graphql/relay/mutation/instrumentation.rb +0 -23
  231. data/lib/graphql/relay/mutation/resolve.rb +0 -56
  232. data/lib/graphql/relay/mutation/result.rb +0 -38
  233. data/lib/graphql/relay/mutation.rb +0 -106
  234. data/lib/graphql/relay/node.rb +0 -39
  235. data/lib/graphql/relay/page_info.rb +0 -7
  236. data/lib/graphql/relay/relation_connection.rb +0 -188
  237. data/lib/graphql/relay/type_extensions.rb +0 -32
  238. data/lib/graphql/scalar_type.rb +0 -91
  239. data/lib/graphql/schema/catchall_middleware.rb +0 -35
  240. data/lib/graphql/schema/default_parse_error.rb +0 -10
  241. data/lib/graphql/schema/default_type_error.rb +0 -17
  242. data/lib/graphql/schema/member/accepts_definition.rb +0 -164
  243. data/lib/graphql/schema/member/cached_graphql_definition.rb +0 -58
  244. data/lib/graphql/schema/member/instrumentation.rb +0 -131
  245. data/lib/graphql/schema/middleware_chain.rb +0 -82
  246. data/lib/graphql/schema/possible_types.rb +0 -44
  247. data/lib/graphql/schema/rescue_middleware.rb +0 -60
  248. data/lib/graphql/schema/timeout_middleware.rb +0 -88
  249. data/lib/graphql/schema/traversal.rb +0 -228
  250. data/lib/graphql/schema/validation.rb +0 -313
  251. data/lib/graphql/static_validation/default_visitor.rb +0 -15
  252. data/lib/graphql/static_validation/no_validate_visitor.rb +0 -10
  253. data/lib/graphql/string_type.rb +0 -2
  254. data/lib/graphql/subscriptions/subscription_root.rb +0 -76
  255. data/lib/graphql/tracing/opentelemetry_tracing.rb +0 -101
  256. data/lib/graphql/tracing/skylight_tracing.rb +0 -70
  257. data/lib/graphql/types/relay/node_field.rb +0 -24
  258. data/lib/graphql/types/relay/nodes_field.rb +0 -43
  259. data/lib/graphql/union_type.rb +0 -115
  260. data/lib/graphql/upgrader/member.rb +0 -937
  261. data/lib/graphql/upgrader/schema.rb +0 -38
@@ -0,0 +1,744 @@
1
+ host( "lib/graphql/language/lexer.rl", 1 ) @{}@host( "lib/graphql/language/lexer.rl", 122 ) @{
2
+
3
+ # frozen_string_literal: true
4
+
5
+ module GraphQL
6
+ module Language
7
+ module Lexer
8
+ def self.tokenize(query_string)
9
+ run_lexer(query_string)
10
+ end
11
+
12
+ # Replace any escaped unicode or whitespace with the _actual_ characters
13
+ # To avoid allocating more strings, this modifies the string passed into it
14
+ def self.replace_escaped_characters_in_place(raw_string)
15
+ raw_string.gsub!(ESCAPES, ESCAPES_REPLACE)
16
+ raw_string.gsub!(UTF_8) do |_matched_str|
17
+ codepoint_1 = ($1 || $2).to_i(16)
18
+ codepoint_2 = $3
19
+
20
+ if codepoint_2
21
+ codepoint_2 = codepoint_2.to_i(16)
22
+ if (codepoint_1 >= 0xD800 && codepoint_1 <= 0xDBFF) && # leading surrogate
23
+ (codepoint_2 >= 0xDC00 && codepoint_2 <= 0xDFFF) # trailing surrogate
24
+ # A surrogate pair
25
+ combined = ((codepoint_1 - 0xD800) * 0x400) + (codepoint_2 - 0xDC00) + 0x10000
26
+ [combined].pack('U'.freeze)
27
+ else
28
+ # Two separate code points
29
+ [codepoint_1].pack('U'.freeze) + [codepoint_2].pack('U'.freeze)
30
+ end
31
+ else
32
+ [codepoint_1].pack('U'.freeze)
33
+ end
34
+ end
35
+ nil
36
+ end
37
+
38
+ private
39
+
40
+ }@
41
+ array char _graphql_lexer_trans_keys( 0, 49 ) = { 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 };
42
+
43
+ array s8 _graphql_lexer_char_class( 0, 49 ) = { 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 };
44
+
45
+ array s16 _graphql_lexer_index_offsets( 0, 4068 ) = { 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 };
46
+
47
+ array s16 _graphql_lexer_indices( 0, 192 ) = { 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 5, 6, 6, 1, 1, 1, 6, 6, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 1, 1, 1, 8, 8, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 1, 1, 1, 9, 9, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 1, 1, 1, 10, 10, 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 1, 1, 1, 11, 11, 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 1, 1, 1, 12, 12, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 1, 1, 1, 13, 13, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 13, 13, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 2, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 18, 19, 20, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 21, 22, 23, 23, 25, 25, 26, 26, 14, 14, 23, 23, 27, 29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 30, 28, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 0, 0, 28, 0, 0, 0, 28, 0, 28, 31, 32, 32, 0, 0, 0, 32, 32, 0, 0, 0, 0, 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, 0, 0, 0, 34, 34, 0, 0, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, 0, 0, 0, 35, 35, 0, 0, 0, 0, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 28, 28, 0, 0, 0, 28, 28, 0, 0, 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 36, 36, 0, 0, 0, 36, 36, 0, 0, 0, 0, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 0, 0, 0, 37, 37, 0, 0, 0, 0, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 0, 0, 0, 38, 38, 0, 0, 0, 0, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 0, 0, 0, 39, 39, 0, 0, 0, 0, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 0, 0, 39, 39, 0, 0, 0, 0, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 0, 28, 42, 43, 41, 44, 45, 46, 47, 48, 49, 50, 41, 51, 52, 41, 53, 54, 55, 56, 57, 58, 58, 59, 41, 60, 58, 58, 58, 58, 61, 62, 63, 58, 58, 64, 58, 65, 66, 67, 58, 68, 69, 70, 71, 72, 58, 58, 58, 73, 74, 75, 42, 78, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 15, 81, 82, 83, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 84, 19, 85, 53, 54, 26, 26, 87, 86, 23, 23, 86, 86, 86, 86, 88, 86, 86, 86, 86, 86, 86, 86, 86, 88, 23, 23, 26, 26, 89, 89, 25, 25, 89, 89, 89, 89, 88, 89, 89, 89, 89, 89, 89, 89, 89, 88, 26, 26, 87, 86, 54, 54, 86, 86, 86, 86, 88, 86, 86, 86, 86, 86, 86, 86, 86, 88, 90, 58, 58, 14, 14, 14, 58, 58, 14, 14, 14, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 92, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 93, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 94, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 95, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 96, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 97, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 98, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 99, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 100, 58, 58, 58, 58, 58, 58, 58, 58, 101, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 102, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 103, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 104, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 105, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 106, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 107, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 108, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 109, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 110, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 111, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 112, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 113, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 114, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 115, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 116, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 117, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 118, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 119, 120, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 121, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 122, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 123, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 124, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 125, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 126, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 127, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 128, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 129, 58, 58, 58, 130, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 131, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 132, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 133, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 134, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 135, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 136, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 137, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 138, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 139, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 140, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 141, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 142, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 143, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 144, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 145, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 146, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 147, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 148, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 149, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 150, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 151, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 152, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 153, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 154, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 155, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 156, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 157, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 158, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 159, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 160, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 161, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 162, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 163, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 164, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 165, 58, 58, 58, 58, 58, 58, 166, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 167, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 168, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 169, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 170, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 171, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 172, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 173, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 174, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 175, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 176, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 177, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 178, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 179, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 180, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 181, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 182, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 183, 58, 58, 58, 58, 58, 184, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 185, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 186, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 187, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 188, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 189, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 190, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 191, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 91, 91, 91, 58, 58, 91, 91, 91, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 192, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 28, 0 };
48
+
49
+ array s8 _graphql_lexer_index_defaults( 0, 91 ) = { 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 15, 15, 15, 15, 15, 14, 24, 14, 1, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 76, 2, 79, 80, 80, 15, 15, 15, 46, 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 };
50
+
51
+ array s16 _graphql_lexer_cond_targs( 0, 144 ) = { 0, 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, 24, 25, 28, 26, 27, 29, 30, 31, 32, 33, 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, 144, 0 };
52
+
53
+ array s8 _graphql_lexer_cond_actions( 0, 57 ) = { 0, 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, 0 };
54
+
55
+ array s8 _graphql_lexer_to_state_actions( 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, 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 };
56
+
57
+ array s8 _graphql_lexer_from_state_actions( 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, 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 };
58
+
59
+ array s16 _graphql_lexer_eof_trans( 0, 194 ) = { 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 15, 15, 15, 15, 15, 15, 25, 15, 2, 29, 31, 32, 33, 35, 36, 34, 37, 38, 39, 40, 41, 77, 78, 80, 81, 81, 81, 81, 81, 86, 78, 87, 90, 90, 87, 78, 15, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 194, 0 };
60
+
61
+ value int graphql_lexer_start = 33;
62
+ value int graphql_lexer_first_final = 33;
63
+ value int graphql_lexer_error = 0;
64
+
65
+ value int graphql_lexer_en_str = 144;
66
+ value int graphql_lexer_en_main = 33;
67
+
68
+ host( "lib/graphql/language/lexer.rl", 161 ) @{
69
+
70
+ def self.run_lexer(query_string)
71
+ data = query_string.unpack(PACK_DIRECTIVE)
72
+ eof = data.length
73
+
74
+ # Since `Lexer` is a module, store all lexer state
75
+ # in this local variable:
76
+ meta = {
77
+ line: 1,
78
+ col: 1,
79
+ data: data,
80
+ tokens: [],
81
+ previous_token: nil,
82
+ }
83
+
84
+ p ||= 0
85
+ pe ||= data.length
86
+
87
+ }@
88
+ {
89
+ cs = cast(int)graphql_lexer_start;
90
+ ts = nil;
91
+ te = nil;
92
+ act = 0;
93
+ }
94
+ host( "lib/graphql/language/lexer.rl", 180 ) @{
95
+
96
+ }@
97
+ {
98
+ uint _trans = 0;
99
+ index char _keys;
100
+ index s16 _inds;
101
+ int _ic;
102
+ while ( p != pe || p == eof ) {
103
+ switch ( _graphql_lexer_from_state_actions[cs] ) {
104
+ case 10 {
105
+ host( "NONE", 1 ) ${${ts = p;}$}$
106
+
107
+
108
+
109
+ }
110
+ }
111
+
112
+ if ( p == eof ) {
113
+ if ( _graphql_lexer_eof_trans[cs] > 0 ) {
114
+ _trans = cast(uint)_graphql_lexer_eof_trans[cs] - 1;
115
+ }
116
+ }
117
+ else {
118
+ _keys = offset( _graphql_lexer_trans_keys, (cs<<1) );
119
+ _inds = offset( _graphql_lexer_indices, _graphql_lexer_index_offsets[cs] );
120
+
121
+ if ( ( deref( data, p )) <= 125 && ( deref( data, p )) >= 9 ) {
122
+ _ic = cast(int)_graphql_lexer_char_class[cast(int)( deref( data, p )) - 9];
123
+ if ( _ic <= cast(int)deref( _graphql_lexer_trans_keys, _keys+1 ) && _ic >= cast(int)deref( _graphql_lexer_trans_keys, _keys ) )
124
+ _trans = cast(uint)deref( _graphql_lexer_indices, _inds + cast(int)( _ic - cast(int)deref( _graphql_lexer_trans_keys, _keys ) ) );
125
+ else
126
+ _trans = cast(uint)_graphql_lexer_index_defaults[cs];
127
+ }
128
+ else {
129
+ _trans = cast(uint)_graphql_lexer_index_defaults[cs];
130
+ }
131
+
132
+ }
133
+ cs = cast(int)_graphql_lexer_cond_targs[_trans];
134
+
135
+ if ( _graphql_lexer_cond_actions[_trans] != 0 ) {
136
+
137
+ switch ( _graphql_lexer_cond_actions[_trans] ) {
138
+ case 14 {
139
+ host( "NONE", 1 ) ${${te = p+1;}$}$
140
+
141
+
142
+
143
+ }
144
+ case 8 {
145
+ host( "lib/graphql/language/lexer.rl", 68 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 68 ) ${ emit_string(ts, te, meta, block: false) }$}$}$
146
+
147
+
148
+
149
+ }
150
+ case 28 {
151
+ host( "lib/graphql/language/lexer.rl", 93 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 93 ) ${ emit(:RCURLY, ts, te, meta, "}") }$}$}$
152
+
153
+
154
+
155
+ }
156
+ case 26 {
157
+ host( "lib/graphql/language/lexer.rl", 94 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 94 ) ${ emit(:LCURLY, ts, te, meta, "{") }$}$}$
158
+
159
+
160
+
161
+ }
162
+ case 18 {
163
+ host( "lib/graphql/language/lexer.rl", 95 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 95 ) ${ emit(:RPAREN, ts, te, meta, ")") }$}$}$
164
+
165
+
166
+
167
+ }
168
+ case 17 {
169
+ host( "lib/graphql/language/lexer.rl", 96 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 96 ) ${ emit(:LPAREN, ts, te, meta, "(")}$}$}$
170
+
171
+
172
+
173
+ }
174
+ case 25 {
175
+ host( "lib/graphql/language/lexer.rl", 97 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 97 ) ${ emit(:RBRACKET, ts, te, meta, "]") }$}$}$
176
+
177
+
178
+
179
+ }
180
+ case 24 {
181
+ host( "lib/graphql/language/lexer.rl", 98 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 98 ) ${ emit(:LBRACKET, ts, te, meta, "[") }$}$}$
182
+
183
+
184
+
185
+ }
186
+ case 20 {
187
+ host( "lib/graphql/language/lexer.rl", 99 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 99 ) ${ emit(:COLON, ts, te, meta, ":") }$}$}$
188
+
189
+
190
+
191
+ }
192
+ case 2 {
193
+ host( "lib/graphql/language/lexer.rl", 100 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 100 ) ${ emit_string(ts, te, meta, block: false) }$}$}$
194
+
195
+
196
+
197
+ }
198
+ case 34 {
199
+ host( "lib/graphql/language/lexer.rl", 101 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 101 ) ${ emit_string(ts, te, meta, block: true) }$}$}$
200
+
201
+
202
+
203
+ }
204
+ case 15 {
205
+ host( "lib/graphql/language/lexer.rl", 102 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 102 ) ${ emit(:VAR_SIGN, ts, te, meta, "$") }$}$}$
206
+
207
+
208
+
209
+ }
210
+ case 22 {
211
+ host( "lib/graphql/language/lexer.rl", 103 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 103 ) ${ emit(:DIR_SIGN, ts, te, meta, "@@") }$}$}$
212
+
213
+
214
+
215
+ }
216
+ case 7 {
217
+ host( "lib/graphql/language/lexer.rl", 104 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 104 ) ${ emit(:ELLIPSIS, ts, te, meta, "...") }$}$}$
218
+
219
+
220
+
221
+ }
222
+ case 21 {
223
+ host( "lib/graphql/language/lexer.rl", 105 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 105 ) ${ emit(:EQUALS, ts, te, meta, "=") }$}$}$
224
+
225
+
226
+
227
+ }
228
+ case 13 {
229
+ host( "lib/graphql/language/lexer.rl", 106 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 106 ) ${ emit(:BANG, ts, te, meta, "!") }$}$}$
230
+
231
+
232
+
233
+ }
234
+ case 27 {
235
+ host( "lib/graphql/language/lexer.rl", 107 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 107 ) ${ emit(:PIPE, ts, te, meta, "|") }$}$}$
236
+
237
+
238
+
239
+ }
240
+ case 16 {
241
+ host( "lib/graphql/language/lexer.rl", 108 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 108 ) ${ emit(:AMP, ts, te, meta, "&") }$}$}$
242
+
243
+
244
+
245
+ }
246
+ case 12 {
247
+ host( "lib/graphql/language/lexer.rl", 112 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 112 ) ${
248
+ meta[:line] += 1
249
+ meta[:col] = 1
250
+ }$}$}$
251
+
252
+
253
+
254
+ }
255
+ case 11 {
256
+ host( "lib/graphql/language/lexer.rl", 119 ) ${${te = p+1;host( "lib/graphql/language/lexer.rl", 119 ) ${ emit(:UNKNOWN_CHAR, ts, te, meta) }$}$}$
257
+
258
+
259
+
260
+ }
261
+ case 36 {
262
+ host( "lib/graphql/language/lexer.rl", 72 ) ${${te = p;p = p - 1;host( "lib/graphql/language/lexer.rl", 72 ) ${ emit(:INT, ts, te, meta) }$}$}$
263
+
264
+
265
+
266
+ }
267
+ case 37 {
268
+ host( "lib/graphql/language/lexer.rl", 73 ) ${${te = p;p = p - 1;host( "lib/graphql/language/lexer.rl", 73 ) ${ emit(:FLOAT, ts, te, meta) }$}$}$
269
+
270
+
271
+
272
+ }
273
+ case 32 {
274
+ host( "lib/graphql/language/lexer.rl", 100 ) ${${te = p;p = p - 1;host( "lib/graphql/language/lexer.rl", 100 ) ${ emit_string(ts, te, meta, block: false) }$}$}$
275
+
276
+
277
+
278
+ }
279
+ case 33 {
280
+ host( "lib/graphql/language/lexer.rl", 101 ) ${${te = p;p = p - 1;host( "lib/graphql/language/lexer.rl", 101 ) ${ emit_string(ts, te, meta, block: true) }$}$}$
281
+
282
+
283
+
284
+ }
285
+ case 38 {
286
+ host( "lib/graphql/language/lexer.rl", 109 ) ${${te = p;p = p - 1;host( "lib/graphql/language/lexer.rl", 109 ) ${ emit(:IDENTIFIER, ts, te, meta) }$}$}$
287
+
288
+
289
+
290
+ }
291
+ case 35 {
292
+ host( "lib/graphql/language/lexer.rl", 110 ) ${${te = p;p = p - 1;host( "lib/graphql/language/lexer.rl", 110 ) ${ record_comment(ts, te, meta) }$}$}$
293
+
294
+
295
+
296
+ }
297
+ case 29 {
298
+ host( "lib/graphql/language/lexer.rl", 117 ) ${${te = p;p = p - 1;host( "lib/graphql/language/lexer.rl", 117 ) ${ meta[:col] += te - ts }$}$}$
299
+
300
+
301
+
302
+ }
303
+ case 30 {
304
+ host( "lib/graphql/language/lexer.rl", 119 ) ${${te = p;p = p - 1;host( "lib/graphql/language/lexer.rl", 119 ) ${ emit(:UNKNOWN_CHAR, ts, te, meta) }$}$}$
305
+
306
+
307
+
308
+ }
309
+ case 5 {
310
+ host( "lib/graphql/language/lexer.rl", 72 ) ${${p = ((te))-1;
311
+ host( "lib/graphql/language/lexer.rl", 72 ) ${ emit(:INT, ts, te, meta) }$}$}$
312
+
313
+
314
+
315
+ }
316
+ case 1 {
317
+ host( "lib/graphql/language/lexer.rl", 119 ) ${${p = ((te))-1;
318
+ host( "lib/graphql/language/lexer.rl", 119 ) ${ emit(:UNKNOWN_CHAR, ts, te, meta) }$}$}$
319
+
320
+
321
+
322
+ }
323
+ case 3 {
324
+ host( "NONE", 1 ) ${${switch( act ) {
325
+ case 2 {
326
+ p = ((te))-1;
327
+ host( "lib/graphql/language/lexer.rl", 72 ) ${ emit(:INT, ts, te, meta) }$
328
+ }
329
+ case 3 {
330
+ p = ((te))-1;
331
+ host( "lib/graphql/language/lexer.rl", 73 ) ${ emit(:FLOAT, ts, te, meta) }$
332
+ }
333
+ case 4 {
334
+ p = ((te))-1;
335
+ host( "lib/graphql/language/lexer.rl", 74 ) ${ emit(:ON, ts, te, meta, "on") }$
336
+ }
337
+ case 5 {
338
+ p = ((te))-1;
339
+ host( "lib/graphql/language/lexer.rl", 75 ) ${ emit(:FRAGMENT, ts, te, meta, "fragment") }$
340
+ }
341
+ case 6 {
342
+ p = ((te))-1;
343
+ host( "lib/graphql/language/lexer.rl", 76 ) ${ emit(:TRUE, ts, te, meta, "true") }$
344
+ }
345
+ case 7 {
346
+ p = ((te))-1;
347
+ host( "lib/graphql/language/lexer.rl", 77 ) ${ emit(:FALSE, ts, te, meta, "false") }$
348
+ }
349
+ case 8 {
350
+ p = ((te))-1;
351
+ host( "lib/graphql/language/lexer.rl", 78 ) ${ emit(:NULL, ts, te, meta, "null") }$
352
+ }
353
+ case 9 {
354
+ p = ((te))-1;
355
+ host( "lib/graphql/language/lexer.rl", 79 ) ${ emit(:QUERY, ts, te, meta, "query") }$
356
+ }
357
+ case 10 {
358
+ p = ((te))-1;
359
+ host( "lib/graphql/language/lexer.rl", 80 ) ${ emit(:MUTATION, ts, te, meta, "mutation") }$
360
+ }
361
+ case 11 {
362
+ p = ((te))-1;
363
+ host( "lib/graphql/language/lexer.rl", 81 ) ${ emit(:SUBSCRIPTION, ts, te, meta, "subscription") }$
364
+ }
365
+ case 12 {
366
+ p = ((te))-1;
367
+ host( "lib/graphql/language/lexer.rl", 82 ) ${ emit(:SCHEMA, ts, te, meta) }$
368
+ }
369
+ case 13 {
370
+ p = ((te))-1;
371
+ host( "lib/graphql/language/lexer.rl", 83 ) ${ emit(:SCALAR, ts, te, meta) }$
372
+ }
373
+ case 14 {
374
+ p = ((te))-1;
375
+ host( "lib/graphql/language/lexer.rl", 84 ) ${ emit(:TYPE, ts, te, meta) }$
376
+ }
377
+ case 15 {
378
+ p = ((te))-1;
379
+ host( "lib/graphql/language/lexer.rl", 85 ) ${ emit(:EXTEND, ts, te, meta) }$
380
+ }
381
+ case 16 {
382
+ p = ((te))-1;
383
+ host( "lib/graphql/language/lexer.rl", 86 ) ${ emit(:IMPLEMENTS, ts, te, meta) }$
384
+ }
385
+ case 17 {
386
+ p = ((te))-1;
387
+ host( "lib/graphql/language/lexer.rl", 87 ) ${ emit(:INTERFACE, ts, te, meta) }$
388
+ }
389
+ case 18 {
390
+ p = ((te))-1;
391
+ host( "lib/graphql/language/lexer.rl", 88 ) ${ emit(:UNION, ts, te, meta) }$
392
+ }
393
+ case 19 {
394
+ p = ((te))-1;
395
+ host( "lib/graphql/language/lexer.rl", 89 ) ${ emit(:ENUM, ts, te, meta) }$
396
+ }
397
+ case 20 {
398
+ p = ((te))-1;
399
+ host( "lib/graphql/language/lexer.rl", 90 ) ${ emit(:INPUT, ts, te, meta) }$
400
+ }
401
+ case 21 {
402
+ p = ((te))-1;
403
+ host( "lib/graphql/language/lexer.rl", 91 ) ${ emit(:DIRECTIVE, ts, te, meta) }$
404
+ }
405
+ case 22 {
406
+ p = ((te))-1;
407
+ host( "lib/graphql/language/lexer.rl", 92 ) ${ emit(:REPEATABLE, ts, te, meta, "repeatable") }$
408
+ }
409
+ case 30 {
410
+ p = ((te))-1;
411
+ host( "lib/graphql/language/lexer.rl", 100 ) ${ emit_string(ts, te, meta, block: false) }$
412
+ }
413
+ case 31 {
414
+ p = ((te))-1;
415
+ host( "lib/graphql/language/lexer.rl", 101 ) ${ emit_string(ts, te, meta, block: true) }$
416
+ }
417
+ case 39 {
418
+ p = ((te))-1;
419
+ host( "lib/graphql/language/lexer.rl", 109 ) ${ emit(:IDENTIFIER, ts, te, meta) }$
420
+ }
421
+ }}$
422
+ }$
423
+
424
+
425
+
426
+ }
427
+ case 19 {
428
+ host( "NONE", 1 ) ${${te = p+1;}$}$
429
+
430
+ host( "lib/graphql/language/lexer.rl", 72 ) ${${act = 2;}$}$
431
+
432
+
433
+
434
+ }
435
+ case 6 {
436
+ host( "NONE", 1 ) ${${te = p+1;}$}$
437
+
438
+ host( "lib/graphql/language/lexer.rl", 73 ) ${${act = 3;}$}$
439
+
440
+
441
+
442
+ }
443
+ case 49 {
444
+ host( "NONE", 1 ) ${${te = p+1;}$}$
445
+
446
+ host( "lib/graphql/language/lexer.rl", 74 ) ${${act = 4;}$}$
447
+
448
+
449
+
450
+ }
451
+ case 43 {
452
+ host( "NONE", 1 ) ${${te = p+1;}$}$
453
+
454
+ host( "lib/graphql/language/lexer.rl", 75 ) ${${act = 5;}$}$
455
+
456
+
457
+
458
+ }
459
+ case 55 {
460
+ host( "NONE", 1 ) ${${te = p+1;}$}$
461
+
462
+ host( "lib/graphql/language/lexer.rl", 76 ) ${${act = 6;}$}$
463
+
464
+
465
+
466
+ }
467
+ case 42 {
468
+ host( "NONE", 1 ) ${${te = p+1;}$}$
469
+
470
+ host( "lib/graphql/language/lexer.rl", 77 ) ${${act = 7;}$}$
471
+
472
+
473
+
474
+ }
475
+ case 48 {
476
+ host( "NONE", 1 ) ${${te = p+1;}$}$
477
+
478
+ host( "lib/graphql/language/lexer.rl", 78 ) ${${act = 8;}$}$
479
+
480
+
481
+
482
+ }
483
+ case 50 {
484
+ host( "NONE", 1 ) ${${te = p+1;}$}$
485
+
486
+ host( "lib/graphql/language/lexer.rl", 79 ) ${${act = 9;}$}$
487
+
488
+
489
+
490
+ }
491
+ case 47 {
492
+ host( "NONE", 1 ) ${${te = p+1;}$}$
493
+
494
+ host( "lib/graphql/language/lexer.rl", 80 ) ${${act = 10;}$}$
495
+
496
+
497
+
498
+ }
499
+ case 54 {
500
+ host( "NONE", 1 ) ${${te = p+1;}$}$
501
+
502
+ host( "lib/graphql/language/lexer.rl", 81 ) ${${act = 11;}$}$
503
+
504
+
505
+
506
+ }
507
+ case 53 {
508
+ host( "NONE", 1 ) ${${te = p+1;}$}$
509
+
510
+ host( "lib/graphql/language/lexer.rl", 82 ) ${${act = 12;}$}$
511
+
512
+
513
+
514
+ }
515
+ case 52 {
516
+ host( "NONE", 1 ) ${${te = p+1;}$}$
517
+
518
+ host( "lib/graphql/language/lexer.rl", 83 ) ${${act = 13;}$}$
519
+
520
+
521
+
522
+ }
523
+ case 56 {
524
+ host( "NONE", 1 ) ${${te = p+1;}$}$
525
+
526
+ host( "lib/graphql/language/lexer.rl", 84 ) ${${act = 14;}$}$
527
+
528
+
529
+
530
+ }
531
+ case 41 {
532
+ host( "NONE", 1 ) ${${te = p+1;}$}$
533
+
534
+ host( "lib/graphql/language/lexer.rl", 85 ) ${${act = 15;}$}$
535
+
536
+
537
+
538
+ }
539
+ case 44 {
540
+ host( "NONE", 1 ) ${${te = p+1;}$}$
541
+
542
+ host( "lib/graphql/language/lexer.rl", 86 ) ${${act = 16;}$}$
543
+
544
+
545
+
546
+ }
547
+ case 46 {
548
+ host( "NONE", 1 ) ${${te = p+1;}$}$
549
+
550
+ host( "lib/graphql/language/lexer.rl", 87 ) ${${act = 17;}$}$
551
+
552
+
553
+
554
+ }
555
+ case 57 {
556
+ host( "NONE", 1 ) ${${te = p+1;}$}$
557
+
558
+ host( "lib/graphql/language/lexer.rl", 88 ) ${${act = 18;}$}$
559
+
560
+
561
+
562
+ }
563
+ case 40 {
564
+ host( "NONE", 1 ) ${${te = p+1;}$}$
565
+
566
+ host( "lib/graphql/language/lexer.rl", 89 ) ${${act = 19;}$}$
567
+
568
+
569
+
570
+ }
571
+ case 45 {
572
+ host( "NONE", 1 ) ${${te = p+1;}$}$
573
+
574
+ host( "lib/graphql/language/lexer.rl", 90 ) ${${act = 20;}$}$
575
+
576
+
577
+
578
+ }
579
+ case 39 {
580
+ host( "NONE", 1 ) ${${te = p+1;}$}$
581
+
582
+ host( "lib/graphql/language/lexer.rl", 91 ) ${${act = 21;}$}$
583
+
584
+
585
+
586
+ }
587
+ case 51 {
588
+ host( "NONE", 1 ) ${${te = p+1;}$}$
589
+
590
+ host( "lib/graphql/language/lexer.rl", 92 ) ${${act = 22;}$}$
591
+
592
+
593
+
594
+ }
595
+ case 31 {
596
+ host( "NONE", 1 ) ${${te = p+1;}$}$
597
+
598
+ host( "lib/graphql/language/lexer.rl", 100 ) ${${act = 30;}$}$
599
+
600
+
601
+
602
+ }
603
+ case 4 {
604
+ host( "NONE", 1 ) ${${te = p+1;}$}$
605
+
606
+ host( "lib/graphql/language/lexer.rl", 101 ) ${${act = 31;}$}$
607
+
608
+
609
+
610
+ }
611
+ case 23 {
612
+ host( "NONE", 1 ) ${${te = p+1;}$}$
613
+
614
+ host( "lib/graphql/language/lexer.rl", 109 ) ${${act = 39;}$}$
615
+
616
+
617
+
618
+ }
619
+ }
620
+
621
+ }
622
+
623
+ if ( p == eof ) {
624
+ if ( cs >= 33 )
625
+ break;
626
+ }
627
+ else {
628
+ switch ( _graphql_lexer_to_state_actions[cs] ) {
629
+ case 9 {
630
+ host( "NONE", 1 ) ${${ts = nil;}$}$
631
+
632
+
633
+
634
+ }
635
+ }
636
+
637
+ if ( cs != 0 ) {
638
+ p += 1;
639
+ continue;
640
+ }
641
+ }
642
+ break;
643
+ }
644
+ }
645
+ host( "lib/graphql/language/lexer.rl", 182 ) @{
646
+
647
+ meta[:tokens]
648
+ end
649
+
650
+ def self.record_comment(ts, te, meta)
651
+ token = [
652
+ :COMMENT,
653
+ meta[:line],
654
+ meta[:col],
655
+ meta[:data][ts, te - ts].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING),
656
+ meta[:previous_token],
657
+ ]
658
+
659
+ meta[:previous_token] = token
660
+
661
+ meta[:col] += te - ts
662
+ end
663
+
664
+ def self.emit(token_name, ts, te, meta, token_value = nil)
665
+ token_value ||= meta[:data][ts, te - ts].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING)
666
+ meta[:tokens] << token = [
667
+ token_name,
668
+ meta[:line],
669
+ meta[:col],
670
+ token_value,
671
+ meta[:previous_token],
672
+ ]
673
+ meta[:previous_token] = token
674
+ # Bump the column counter for the next token
675
+ meta[:col] += te - ts
676
+ end
677
+
678
+ ESCAPES = /\\["\\\/bfnrt]/
679
+ ESCAPES_REPLACE = {
680
+ '\\"' => '"',
681
+ "\\\\" => "\\",
682
+ "\\/" => '/',
683
+ "\\b" => "\b",
684
+ "\\f" => "\f",
685
+ "\\n" => "\n",
686
+ "\\r" => "\r",
687
+ "\\t" => "\t",
688
+ }
689
+
690
+ UTF_8 = /\\u(?:([\dAa-f]{4})|\{([\da-f]{4,})\})(?:\\u([\dAa-f]{4}))?/i
691
+
692
+
693
+ VALID_STRING = /\A(?:[^\\]|#{ESCAPES}|#{UTF_8})*\z/o
694
+
695
+ PACK_DIRECTIVE = "c*"
696
+ UTF_8_ENCODING = "UTF-8"
697
+
698
+ def self.emit_string(ts, te, meta, block:)
699
+ quotes_length = block ? 3 : 1
700
+ value = meta[:data][ts + quotes_length, te - ts - 2 * quotes_length].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING) || ''
701
+ line_incr = 0
702
+ if block && !value.empty?
703
+ line_incr = value.count("\n")
704
+ value = GraphQL::Language::BlockString.trim_whitespace(value)
705
+ end
706
+
707
+ if !value.valid_encoding? || !value.match?(VALID_STRING)
708
+ meta[:tokens] << token = [
709
+ :BAD_UNICODE_ESCAPE,
710
+ meta[:line],
711
+ meta[:col],
712
+ value,
713
+ meta[:previous_token],
714
+ ]
715
+ else
716
+ replace_escaped_characters_in_place(value)
717
+
718
+ if !value.valid_encoding?
719
+ meta[:tokens] << token = [
720
+ :BAD_UNICODE_ESCAPE,
721
+ meta[:line],
722
+ meta[:col],
723
+ value,
724
+ meta[:previous_token],
725
+ ]
726
+ else
727
+ meta[:tokens] << token = [
728
+ :STRING,
729
+ meta[:line],
730
+ meta[:col],
731
+ value,
732
+ meta[:previous_token],
733
+ ]
734
+ end
735
+ end
736
+
737
+ meta[:previous_token] = token
738
+ meta[:col] += te - ts
739
+ meta[:line] += line_incr
740
+ end
741
+ end
742
+ end
743
+ end
744
+ }@