ory-client 1.1.33 → 1.1.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (615) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -3
  3. data/README.md +8 -5
  4. data/docs/CreateSubscriptionBody.md +2 -0
  5. data/docs/FrontendApi.md +3 -1
  6. data/docs/GetProjectMetricsResponse.md +18 -0
  7. data/docs/IdentityApi.md +2 -2
  8. data/docs/InternalProvisionMockSubscription.md +2 -0
  9. data/docs/MetricsDatapoint.md +20 -0
  10. data/docs/NormalizedProjectRevisionThirdPartyProvider.md +2 -0
  11. data/docs/ProjectApi.md +78 -0
  12. data/docs/QuotaUsage.md +1 -1
  13. data/docs/SessionAuthenticationMethod.md +3 -1
  14. data/docs/Subscription.md +2 -0
  15. data/docs/UpdateLoginFlowWithOidcMethod.md +1 -1
  16. data/docs/UpdateRegistrationFlowWithOidcMethod.md +1 -1
  17. data/docs/UpdateSettingsFlowWithOidcMethod.md +1 -1
  18. data/docs/UpdateVerificationFlowWithLinkMethod.md +1 -1
  19. data/lib/ory-client/api/courier_api.rb +1 -1
  20. data/lib/ory-client/api/frontend_api.rb +4 -1
  21. data/lib/ory-client/api/identity_api.rb +7 -3
  22. data/lib/ory-client/api/jwk_api.rb +1 -1
  23. data/lib/ory-client/api/metadata_api.rb +1 -1
  24. data/lib/ory-client/api/o_auth2_api.rb +1 -1
  25. data/lib/ory-client/api/oidc_api.rb +1 -1
  26. data/lib/ory-client/api/permission_api.rb +1 -1
  27. data/lib/ory-client/api/project_api.rb +95 -1
  28. data/lib/ory-client/api/relationship_api.rb +1 -1
  29. data/lib/ory-client/api/wellknown_api.rb +1 -1
  30. data/lib/ory-client/api_client.rb +1 -1
  31. data/lib/ory-client/api_error.rb +1 -1
  32. data/lib/ory-client/configuration.rb +1 -1
  33. data/lib/ory-client/models/accept_o_auth2_consent_request.rb +1 -1
  34. data/lib/ory-client/models/accept_o_auth2_consent_request_session.rb +1 -1
  35. data/lib/ory-client/models/accept_o_auth2_login_request.rb +1 -1
  36. data/lib/ory-client/models/active_project_in_console.rb +1 -1
  37. data/lib/ory-client/models/authenticator_assurance_level.rb +1 -1
  38. data/lib/ory-client/models/batch_patch_identities_response.rb +1 -1
  39. data/lib/ory-client/models/check_opl_syntax_result.rb +1 -1
  40. data/lib/ory-client/models/check_permission_result.rb +1 -1
  41. data/lib/ory-client/models/cloud_account.rb +1 -1
  42. data/lib/ory-client/models/continue_with.rb +1 -1
  43. data/lib/ory-client/models/continue_with_set_ory_session_token.rb +1 -1
  44. data/lib/ory-client/models/continue_with_verification_ui.rb +1 -1
  45. data/lib/ory-client/models/continue_with_verification_ui_flow.rb +1 -1
  46. data/lib/ory-client/models/courier_message_status.rb +1 -1
  47. data/lib/ory-client/models/courier_message_type.rb +1 -1
  48. data/lib/ory-client/models/create_custom_domain_body.rb +1 -1
  49. data/lib/ory-client/models/create_identity_body.rb +1 -1
  50. data/lib/ory-client/models/create_json_web_key_set.rb +1 -1
  51. data/lib/ory-client/models/create_project_api_key_request.rb +1 -1
  52. data/lib/ory-client/models/create_project_body.rb +1 -1
  53. data/lib/ory-client/models/create_project_branding.rb +1 -1
  54. data/lib/ory-client/models/create_project_invite.rb +1 -1
  55. data/lib/ory-client/models/create_project_invites_response.rb +1 -1
  56. data/lib/ory-client/models/create_recovery_code_for_identity_body.rb +1 -1
  57. data/lib/ory-client/models/create_recovery_link_for_identity_body.rb +1 -1
  58. data/lib/ory-client/models/create_relationship_body.rb +1 -1
  59. data/lib/ory-client/models/create_subscription_body.rb +24 -2
  60. data/lib/ory-client/models/custom_domain.rb +1 -1
  61. data/lib/ory-client/models/delete_my_sessions_count.rb +1 -1
  62. data/lib/ory-client/models/error_authenticator_assurance_level_not_satisfied.rb +1 -1
  63. data/lib/ory-client/models/error_browser_location_change_required.rb +1 -1
  64. data/lib/ory-client/models/error_flow_replaced.rb +1 -1
  65. data/lib/ory-client/models/error_generic.rb +1 -1
  66. data/lib/ory-client/models/error_o_auth2.rb +1 -1
  67. data/lib/ory-client/models/expanded_permission_tree.rb +1 -1
  68. data/lib/ory-client/models/flow_error.rb +1 -1
  69. data/lib/ory-client/models/generic_error.rb +1 -1
  70. data/lib/ory-client/models/generic_error_content.rb +1 -1
  71. data/lib/ory-client/models/generic_usage.rb +1 -1
  72. data/lib/ory-client/models/get_managed_identity_schema_location.rb +1 -1
  73. data/lib/ory-client/models/get_project_metrics_response.rb +228 -0
  74. data/lib/ory-client/models/get_version200_response.rb +1 -1
  75. data/lib/ory-client/models/health_not_ready_status.rb +1 -1
  76. data/lib/ory-client/models/health_status.rb +1 -1
  77. data/lib/ory-client/models/identity.rb +1 -1
  78. data/lib/ory-client/models/identity_credentials.rb +1 -1
  79. data/lib/ory-client/models/identity_credentials_oidc.rb +1 -1
  80. data/lib/ory-client/models/identity_credentials_oidc_provider.rb +1 -1
  81. data/lib/ory-client/models/identity_credentials_password.rb +1 -1
  82. data/lib/ory-client/models/identity_credentials_type.rb +1 -1
  83. data/lib/ory-client/models/identity_patch.rb +1 -1
  84. data/lib/ory-client/models/identity_patch_response.rb +1 -1
  85. data/lib/ory-client/models/identity_schema_container.rb +1 -1
  86. data/lib/ory-client/models/identity_schema_preset.rb +1 -1
  87. data/lib/ory-client/models/identity_state.rb +1 -1
  88. data/lib/ory-client/models/identity_with_credentials.rb +1 -1
  89. data/lib/ory-client/models/identity_with_credentials_oidc.rb +1 -1
  90. data/lib/ory-client/models/identity_with_credentials_oidc_config.rb +1 -1
  91. data/lib/ory-client/models/identity_with_credentials_oidc_config_provider.rb +1 -1
  92. data/lib/ory-client/models/identity_with_credentials_password.rb +1 -1
  93. data/lib/ory-client/models/identity_with_credentials_password_config.rb +1 -1
  94. data/lib/ory-client/models/internal_get_project_branding_body.rb +1 -1
  95. data/lib/ory-client/models/internal_is_owner_for_project_by_slug_body.rb +1 -1
  96. data/lib/ory-client/models/internal_is_owner_for_project_by_slug_response.rb +1 -1
  97. data/lib/ory-client/models/internal_provision_mock_subscription.rb +29 -2
  98. data/lib/ory-client/models/introspected_o_auth2_token.rb +1 -1
  99. data/lib/ory-client/models/is_owner_for_project_by_slug.rb +1 -1
  100. data/lib/ory-client/models/is_ready200_response.rb +1 -1
  101. data/lib/ory-client/models/is_ready503_response.rb +1 -1
  102. data/lib/ory-client/models/json_patch.rb +1 -1
  103. data/lib/ory-client/models/json_web_key.rb +1 -1
  104. data/lib/ory-client/models/json_web_key_set.rb +1 -1
  105. data/lib/ory-client/models/keto_namespace.rb +1 -1
  106. data/lib/ory-client/models/login_flow.rb +1 -1
  107. data/lib/ory-client/models/logout_flow.rb +1 -1
  108. data/lib/ory-client/models/managed_identity_schema.rb +1 -1
  109. data/lib/ory-client/models/managed_identity_schema_validation_result.rb +1 -1
  110. data/lib/ory-client/models/message.rb +1 -1
  111. data/lib/ory-client/models/message_dispatch.rb +1 -1
  112. data/lib/ory-client/models/metrics_datapoint.rb +241 -0
  113. data/lib/ory-client/models/namespace.rb +1 -1
  114. data/lib/ory-client/models/needs_privileged_session_error.rb +1 -1
  115. data/lib/ory-client/models/normalized_project.rb +1 -1
  116. data/lib/ory-client/models/normalized_project_revision.rb +1 -1
  117. data/lib/ory-client/models/normalized_project_revision_hook.rb +1 -1
  118. data/lib/ory-client/models/normalized_project_revision_identity_schema.rb +1 -1
  119. data/lib/ory-client/models/normalized_project_revision_third_party_provider.rb +46 -2
  120. data/lib/ory-client/models/o_auth2_client.rb +1 -1
  121. data/lib/ory-client/models/o_auth2_client_token_lifespans.rb +1 -1
  122. data/lib/ory-client/models/o_auth2_consent_request.rb +1 -1
  123. data/lib/ory-client/models/o_auth2_consent_request_open_id_connect_context.rb +1 -1
  124. data/lib/ory-client/models/o_auth2_consent_session.rb +1 -1
  125. data/lib/ory-client/models/o_auth2_consent_session_expires_at.rb +1 -1
  126. data/lib/ory-client/models/o_auth2_login_request.rb +1 -1
  127. data/lib/ory-client/models/o_auth2_logout_request.rb +1 -1
  128. data/lib/ory-client/models/o_auth2_redirect_to.rb +1 -1
  129. data/lib/ory-client/models/o_auth2_token_exchange.rb +1 -1
  130. data/lib/ory-client/models/oidc_configuration.rb +1 -1
  131. data/lib/ory-client/models/oidc_user_info.rb +1 -1
  132. data/lib/ory-client/models/pagination.rb +1 -1
  133. data/lib/ory-client/models/pagination_headers.rb +1 -1
  134. data/lib/ory-client/models/parse_error.rb +1 -1
  135. data/lib/ory-client/models/patch_identities_body.rb +1 -1
  136. data/lib/ory-client/models/perform_native_logout_body.rb +1 -1
  137. data/lib/ory-client/models/plan.rb +1 -1
  138. data/lib/ory-client/models/plan_details.rb +1 -1
  139. data/lib/ory-client/models/post_check_permission_body.rb +1 -1
  140. data/lib/ory-client/models/post_check_permission_or_error_body.rb +1 -1
  141. data/lib/ory-client/models/project.rb +1 -1
  142. data/lib/ory-client/models/project_api_key.rb +1 -1
  143. data/lib/ory-client/models/project_branding.rb +1 -1
  144. data/lib/ory-client/models/project_branding_colors.rb +1 -1
  145. data/lib/ory-client/models/project_branding_theme.rb +1 -1
  146. data/lib/ory-client/models/project_host.rb +1 -1
  147. data/lib/ory-client/models/project_invite.rb +1 -1
  148. data/lib/ory-client/models/project_metadata.rb +1 -1
  149. data/lib/ory-client/models/project_service_identity.rb +1 -1
  150. data/lib/ory-client/models/project_service_o_auth2.rb +1 -1
  151. data/lib/ory-client/models/project_service_permission.rb +1 -1
  152. data/lib/ory-client/models/project_services.rb +1 -1
  153. data/lib/ory-client/models/quota_usage.rb +4 -4
  154. data/lib/ory-client/models/recovery_code_for_identity.rb +1 -1
  155. data/lib/ory-client/models/recovery_flow.rb +1 -1
  156. data/lib/ory-client/models/recovery_flow_state.rb +1 -1
  157. data/lib/ory-client/models/recovery_identity_address.rb +1 -1
  158. data/lib/ory-client/models/recovery_link_for_identity.rb +1 -1
  159. data/lib/ory-client/models/registration_flow.rb +1 -1
  160. data/lib/ory-client/models/reject_o_auth2_request.rb +1 -1
  161. data/lib/ory-client/models/relation_query.rb +1 -1
  162. data/lib/ory-client/models/relationship.rb +1 -1
  163. data/lib/ory-client/models/relationship_namespaces.rb +1 -1
  164. data/lib/ory-client/models/relationship_patch.rb +1 -1
  165. data/lib/ory-client/models/relationships.rb +1 -1
  166. data/lib/ory-client/models/schema_patch.rb +1 -1
  167. data/lib/ory-client/models/self_service_flow_expired_error.rb +1 -1
  168. data/lib/ory-client/models/session.rb +1 -1
  169. data/lib/ory-client/models/session_authentication_method.rb +15 -5
  170. data/lib/ory-client/models/session_device.rb +1 -1
  171. data/lib/ory-client/models/set_active_project_in_console_body.rb +1 -1
  172. data/lib/ory-client/models/set_custom_domain_body.rb +1 -1
  173. data/lib/ory-client/models/set_project.rb +1 -1
  174. data/lib/ory-client/models/set_project_branding_theme_body.rb +1 -1
  175. data/lib/ory-client/models/settings_flow.rb +1 -1
  176. data/lib/ory-client/models/settings_flow_state.rb +1 -1
  177. data/lib/ory-client/models/source_position.rb +1 -1
  178. data/lib/ory-client/models/stripe_customer.rb +1 -1
  179. data/lib/ory-client/models/subject_set.rb +1 -1
  180. data/lib/ory-client/models/subscription.rb +29 -2
  181. data/lib/ory-client/models/successful_code_exchange_response.rb +1 -1
  182. data/lib/ory-client/models/successful_native_login.rb +1 -1
  183. data/lib/ory-client/models/successful_native_registration.rb +1 -1
  184. data/lib/ory-client/models/successful_project_update.rb +1 -1
  185. data/lib/ory-client/models/token_pagination.rb +1 -1
  186. data/lib/ory-client/models/token_pagination_headers.rb +1 -1
  187. data/lib/ory-client/models/token_pagination_request_parameters.rb +1 -1
  188. data/lib/ory-client/models/token_pagination_response_headers.rb +1 -1
  189. data/lib/ory-client/models/trust_o_auth2_jwt_grant_issuer.rb +1 -1
  190. data/lib/ory-client/models/trusted_o_auth2_jwt_grant_issuer.rb +1 -1
  191. data/lib/ory-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb +1 -1
  192. data/lib/ory-client/models/ui_container.rb +1 -1
  193. data/lib/ory-client/models/ui_node.rb +1 -1
  194. data/lib/ory-client/models/ui_node_anchor_attributes.rb +1 -1
  195. data/lib/ory-client/models/ui_node_attributes.rb +1 -1
  196. data/lib/ory-client/models/ui_node_image_attributes.rb +1 -1
  197. data/lib/ory-client/models/ui_node_input_attributes.rb +1 -1
  198. data/lib/ory-client/models/ui_node_meta.rb +1 -1
  199. data/lib/ory-client/models/ui_node_script_attributes.rb +1 -1
  200. data/lib/ory-client/models/ui_node_text_attributes.rb +1 -1
  201. data/lib/ory-client/models/ui_text.rb +1 -1
  202. data/lib/ory-client/models/update_identity_body.rb +1 -1
  203. data/lib/ory-client/models/update_login_flow_body.rb +1 -1
  204. data/lib/ory-client/models/update_login_flow_with_lookup_secret_method.rb +1 -1
  205. data/lib/ory-client/models/update_login_flow_with_oidc_method.rb +2 -2
  206. data/lib/ory-client/models/update_login_flow_with_password_method.rb +1 -1
  207. data/lib/ory-client/models/update_login_flow_with_totp_method.rb +1 -1
  208. data/lib/ory-client/models/update_login_flow_with_web_authn_method.rb +1 -1
  209. data/lib/ory-client/models/update_recovery_flow_body.rb +1 -1
  210. data/lib/ory-client/models/update_recovery_flow_with_code_method.rb +1 -1
  211. data/lib/ory-client/models/update_recovery_flow_with_link_method.rb +1 -1
  212. data/lib/ory-client/models/update_registration_flow_body.rb +1 -1
  213. data/lib/ory-client/models/update_registration_flow_with_oidc_method.rb +2 -2
  214. data/lib/ory-client/models/update_registration_flow_with_password_method.rb +1 -1
  215. data/lib/ory-client/models/update_registration_flow_with_web_authn_method.rb +1 -1
  216. data/lib/ory-client/models/update_settings_flow_body.rb +1 -1
  217. data/lib/ory-client/models/update_settings_flow_with_lookup_method.rb +1 -1
  218. data/lib/ory-client/models/update_settings_flow_with_oidc_method.rb +2 -2
  219. data/lib/ory-client/models/update_settings_flow_with_password_method.rb +1 -1
  220. data/lib/ory-client/models/update_settings_flow_with_profile_method.rb +1 -1
  221. data/lib/ory-client/models/update_settings_flow_with_totp_method.rb +1 -1
  222. data/lib/ory-client/models/update_settings_flow_with_web_authn_method.rb +1 -1
  223. data/lib/ory-client/models/update_subscription_body.rb +1 -1
  224. data/lib/ory-client/models/update_verification_flow_body.rb +1 -1
  225. data/lib/ory-client/models/update_verification_flow_with_code_method.rb +1 -1
  226. data/lib/ory-client/models/update_verification_flow_with_link_method.rb +36 -2
  227. data/lib/ory-client/models/usage.rb +1 -1
  228. data/lib/ory-client/models/verifiable_identity_address.rb +1 -1
  229. data/lib/ory-client/models/verification_flow.rb +1 -1
  230. data/lib/ory-client/models/verification_flow_state.rb +1 -1
  231. data/lib/ory-client/models/version.rb +1 -1
  232. data/lib/ory-client/models/warning.rb +1 -1
  233. data/lib/ory-client/version.rb +2 -2
  234. data/lib/ory-client.rb +3 -1
  235. data/ory-client.gemspec +1 -1
  236. data/spec/api/courier_api_spec.rb +1 -1
  237. data/spec/api/frontend_api_spec.rb +2 -1
  238. data/spec/api/identity_api_spec.rb +2 -2
  239. data/spec/api/jwk_api_spec.rb +1 -1
  240. data/spec/api/metadata_api_spec.rb +1 -1
  241. data/spec/api/o_auth2_api_spec.rb +1 -1
  242. data/spec/api/oidc_api_spec.rb +1 -1
  243. data/spec/api/permission_api_spec.rb +1 -1
  244. data/spec/api/project_api_spec.rb +16 -1
  245. data/spec/api/relationship_api_spec.rb +1 -1
  246. data/spec/api/wellknown_api_spec.rb +1 -1
  247. data/spec/api_client_spec.rb +1 -1
  248. data/spec/configuration_spec.rb +1 -1
  249. data/spec/models/accept_o_auth2_consent_request_session_spec.rb +1 -1
  250. data/spec/models/accept_o_auth2_consent_request_spec.rb +1 -1
  251. data/spec/models/accept_o_auth2_login_request_spec.rb +1 -1
  252. data/spec/models/active_project_in_console_spec.rb +1 -1
  253. data/spec/models/authenticator_assurance_level_spec.rb +1 -1
  254. data/spec/models/batch_patch_identities_response_spec.rb +1 -1
  255. data/spec/models/check_opl_syntax_result_spec.rb +1 -1
  256. data/spec/models/check_permission_result_spec.rb +1 -1
  257. data/spec/models/cloud_account_spec.rb +1 -1
  258. data/spec/models/continue_with_set_ory_session_token_spec.rb +1 -1
  259. data/spec/models/continue_with_spec.rb +1 -1
  260. data/spec/models/continue_with_verification_ui_flow_spec.rb +1 -1
  261. data/spec/models/continue_with_verification_ui_spec.rb +1 -1
  262. data/spec/models/courier_message_status_spec.rb +1 -1
  263. data/spec/models/courier_message_type_spec.rb +1 -1
  264. data/spec/models/create_custom_domain_body_spec.rb +1 -1
  265. data/spec/models/create_identity_body_spec.rb +1 -1
  266. data/spec/models/create_json_web_key_set_spec.rb +1 -1
  267. data/spec/models/create_project_api_key_request_spec.rb +1 -1
  268. data/spec/models/create_project_body_spec.rb +1 -1
  269. data/spec/models/create_project_branding_spec.rb +1 -1
  270. data/spec/models/create_project_invite_spec.rb +1 -1
  271. data/spec/models/create_project_invites_response_spec.rb +1 -1
  272. data/spec/models/create_recovery_code_for_identity_body_spec.rb +1 -1
  273. data/spec/models/create_recovery_link_for_identity_body_spec.rb +1 -1
  274. data/spec/models/create_relationship_body_spec.rb +1 -1
  275. data/spec/models/create_subscription_body_spec.rb +11 -1
  276. data/spec/models/custom_domain_spec.rb +1 -1
  277. data/spec/models/delete_my_sessions_count_spec.rb +1 -1
  278. data/spec/models/error_authenticator_assurance_level_not_satisfied_spec.rb +1 -1
  279. data/spec/models/error_browser_location_change_required_spec.rb +1 -1
  280. data/spec/models/error_flow_replaced_spec.rb +1 -1
  281. data/spec/models/error_generic_spec.rb +1 -1
  282. data/spec/models/error_o_auth2_spec.rb +1 -1
  283. data/spec/models/expanded_permission_tree_spec.rb +1 -1
  284. data/spec/models/flow_error_spec.rb +1 -1
  285. data/spec/models/generic_error_content_spec.rb +1 -1
  286. data/spec/models/generic_error_spec.rb +1 -1
  287. data/spec/models/generic_usage_spec.rb +1 -1
  288. data/spec/models/get_managed_identity_schema_location_spec.rb +1 -1
  289. data/spec/models/get_project_metrics_response_spec.rb +34 -0
  290. data/spec/models/get_version200_response_spec.rb +1 -1
  291. data/spec/models/health_not_ready_status_spec.rb +1 -1
  292. data/spec/models/health_status_spec.rb +1 -1
  293. data/spec/models/identity_credentials_oidc_provider_spec.rb +1 -1
  294. data/spec/models/identity_credentials_oidc_spec.rb +1 -1
  295. data/spec/models/identity_credentials_password_spec.rb +1 -1
  296. data/spec/models/identity_credentials_spec.rb +1 -1
  297. data/spec/models/identity_credentials_type_spec.rb +1 -1
  298. data/spec/models/identity_patch_response_spec.rb +1 -1
  299. data/spec/models/identity_patch_spec.rb +1 -1
  300. data/spec/models/identity_schema_container_spec.rb +1 -1
  301. data/spec/models/identity_schema_preset_spec.rb +1 -1
  302. data/spec/models/identity_spec.rb +1 -1
  303. data/spec/models/identity_state_spec.rb +1 -1
  304. data/spec/models/identity_with_credentials_oidc_config_provider_spec.rb +1 -1
  305. data/spec/models/identity_with_credentials_oidc_config_spec.rb +1 -1
  306. data/spec/models/identity_with_credentials_oidc_spec.rb +1 -1
  307. data/spec/models/identity_with_credentials_password_config_spec.rb +1 -1
  308. data/spec/models/identity_with_credentials_password_spec.rb +1 -1
  309. data/spec/models/identity_with_credentials_spec.rb +1 -1
  310. data/spec/models/internal_get_project_branding_body_spec.rb +1 -1
  311. data/spec/models/internal_is_owner_for_project_by_slug_body_spec.rb +1 -1
  312. data/spec/models/internal_is_owner_for_project_by_slug_response_spec.rb +1 -1
  313. data/spec/models/internal_provision_mock_subscription_spec.rb +11 -1
  314. data/spec/models/introspected_o_auth2_token_spec.rb +1 -1
  315. data/spec/models/is_owner_for_project_by_slug_spec.rb +1 -1
  316. data/spec/models/is_ready200_response_spec.rb +1 -1
  317. data/spec/models/is_ready503_response_spec.rb +1 -1
  318. data/spec/models/json_patch_spec.rb +1 -1
  319. data/spec/models/json_web_key_set_spec.rb +1 -1
  320. data/spec/models/json_web_key_spec.rb +1 -1
  321. data/spec/models/keto_namespace_spec.rb +1 -1
  322. data/spec/models/login_flow_spec.rb +1 -1
  323. data/spec/models/logout_flow_spec.rb +1 -1
  324. data/spec/models/managed_identity_schema_spec.rb +1 -1
  325. data/spec/models/managed_identity_schema_validation_result_spec.rb +1 -1
  326. data/spec/models/message_dispatch_spec.rb +1 -1
  327. data/spec/models/message_spec.rb +1 -1
  328. data/spec/models/metrics_datapoint_spec.rb +40 -0
  329. data/spec/models/namespace_spec.rb +1 -1
  330. data/spec/models/needs_privileged_session_error_spec.rb +1 -1
  331. data/spec/models/normalized_project_revision_hook_spec.rb +1 -1
  332. data/spec/models/normalized_project_revision_identity_schema_spec.rb +1 -1
  333. data/spec/models/normalized_project_revision_spec.rb +1 -1
  334. data/spec/models/normalized_project_revision_third_party_provider_spec.rb +11 -1
  335. data/spec/models/normalized_project_spec.rb +1 -1
  336. data/spec/models/o_auth2_client_spec.rb +1 -1
  337. data/spec/models/o_auth2_client_token_lifespans_spec.rb +1 -1
  338. data/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb +1 -1
  339. data/spec/models/o_auth2_consent_request_spec.rb +1 -1
  340. data/spec/models/o_auth2_consent_session_expires_at_spec.rb +1 -1
  341. data/spec/models/o_auth2_consent_session_spec.rb +1 -1
  342. data/spec/models/o_auth2_login_request_spec.rb +1 -1
  343. data/spec/models/o_auth2_logout_request_spec.rb +1 -1
  344. data/spec/models/o_auth2_redirect_to_spec.rb +1 -1
  345. data/spec/models/o_auth2_token_exchange_spec.rb +1 -1
  346. data/spec/models/oidc_configuration_spec.rb +1 -1
  347. data/spec/models/oidc_user_info_spec.rb +1 -1
  348. data/spec/models/pagination_headers_spec.rb +1 -1
  349. data/spec/models/pagination_spec.rb +1 -1
  350. data/spec/models/parse_error_spec.rb +1 -1
  351. data/spec/models/patch_identities_body_spec.rb +1 -1
  352. data/spec/models/perform_native_logout_body_spec.rb +1 -1
  353. data/spec/models/plan_details_spec.rb +1 -1
  354. data/spec/models/plan_spec.rb +1 -1
  355. data/spec/models/post_check_permission_body_spec.rb +1 -1
  356. data/spec/models/post_check_permission_or_error_body_spec.rb +1 -1
  357. data/spec/models/project_api_key_spec.rb +1 -1
  358. data/spec/models/project_branding_colors_spec.rb +1 -1
  359. data/spec/models/project_branding_spec.rb +1 -1
  360. data/spec/models/project_branding_theme_spec.rb +1 -1
  361. data/spec/models/project_host_spec.rb +1 -1
  362. data/spec/models/project_invite_spec.rb +1 -1
  363. data/spec/models/project_metadata_spec.rb +1 -1
  364. data/spec/models/project_service_identity_spec.rb +1 -1
  365. data/spec/models/project_service_o_auth2_spec.rb +1 -1
  366. data/spec/models/project_service_permission_spec.rb +1 -1
  367. data/spec/models/project_services_spec.rb +1 -1
  368. data/spec/models/project_spec.rb +1 -1
  369. data/spec/models/quota_usage_spec.rb +2 -2
  370. data/spec/models/recovery_code_for_identity_spec.rb +1 -1
  371. data/spec/models/recovery_flow_spec.rb +1 -1
  372. data/spec/models/recovery_flow_state_spec.rb +1 -1
  373. data/spec/models/recovery_identity_address_spec.rb +1 -1
  374. data/spec/models/recovery_link_for_identity_spec.rb +1 -1
  375. data/spec/models/registration_flow_spec.rb +1 -1
  376. data/spec/models/reject_o_auth2_request_spec.rb +1 -1
  377. data/spec/models/relation_query_spec.rb +1 -1
  378. data/spec/models/relationship_namespaces_spec.rb +1 -1
  379. data/spec/models/relationship_patch_spec.rb +1 -1
  380. data/spec/models/relationship_spec.rb +1 -1
  381. data/spec/models/relationships_spec.rb +1 -1
  382. data/spec/models/schema_patch_spec.rb +1 -1
  383. data/spec/models/self_service_flow_expired_error_spec.rb +1 -1
  384. data/spec/models/session_authentication_method_spec.rb +7 -1
  385. data/spec/models/session_device_spec.rb +1 -1
  386. data/spec/models/session_spec.rb +1 -1
  387. data/spec/models/set_active_project_in_console_body_spec.rb +1 -1
  388. data/spec/models/set_custom_domain_body_spec.rb +1 -1
  389. data/spec/models/set_project_branding_theme_body_spec.rb +1 -1
  390. data/spec/models/set_project_spec.rb +1 -1
  391. data/spec/models/settings_flow_spec.rb +1 -1
  392. data/spec/models/settings_flow_state_spec.rb +1 -1
  393. data/spec/models/source_position_spec.rb +1 -1
  394. data/spec/models/stripe_customer_spec.rb +1 -1
  395. data/spec/models/subject_set_spec.rb +1 -1
  396. data/spec/models/subscription_spec.rb +11 -1
  397. data/spec/models/successful_code_exchange_response_spec.rb +1 -1
  398. data/spec/models/successful_native_login_spec.rb +1 -1
  399. data/spec/models/successful_native_registration_spec.rb +1 -1
  400. data/spec/models/successful_project_update_spec.rb +1 -1
  401. data/spec/models/token_pagination_headers_spec.rb +1 -1
  402. data/spec/models/token_pagination_request_parameters_spec.rb +1 -1
  403. data/spec/models/token_pagination_response_headers_spec.rb +1 -1
  404. data/spec/models/token_pagination_spec.rb +1 -1
  405. data/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb +1 -1
  406. data/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb +1 -1
  407. data/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb +1 -1
  408. data/spec/models/ui_container_spec.rb +1 -1
  409. data/spec/models/ui_node_anchor_attributes_spec.rb +1 -1
  410. data/spec/models/ui_node_attributes_spec.rb +1 -1
  411. data/spec/models/ui_node_image_attributes_spec.rb +1 -1
  412. data/spec/models/ui_node_input_attributes_spec.rb +1 -1
  413. data/spec/models/ui_node_meta_spec.rb +1 -1
  414. data/spec/models/ui_node_script_attributes_spec.rb +1 -1
  415. data/spec/models/ui_node_spec.rb +1 -1
  416. data/spec/models/ui_node_text_attributes_spec.rb +1 -1
  417. data/spec/models/ui_text_spec.rb +1 -1
  418. data/spec/models/update_identity_body_spec.rb +1 -1
  419. data/spec/models/update_login_flow_body_spec.rb +1 -1
  420. data/spec/models/update_login_flow_with_lookup_secret_method_spec.rb +1 -1
  421. data/spec/models/update_login_flow_with_oidc_method_spec.rb +1 -1
  422. data/spec/models/update_login_flow_with_password_method_spec.rb +1 -1
  423. data/spec/models/update_login_flow_with_totp_method_spec.rb +1 -1
  424. data/spec/models/update_login_flow_with_web_authn_method_spec.rb +1 -1
  425. data/spec/models/update_recovery_flow_body_spec.rb +1 -1
  426. data/spec/models/update_recovery_flow_with_code_method_spec.rb +1 -1
  427. data/spec/models/update_recovery_flow_with_link_method_spec.rb +1 -1
  428. data/spec/models/update_registration_flow_body_spec.rb +1 -1
  429. data/spec/models/update_registration_flow_with_oidc_method_spec.rb +1 -1
  430. data/spec/models/update_registration_flow_with_password_method_spec.rb +1 -1
  431. data/spec/models/update_registration_flow_with_web_authn_method_spec.rb +1 -1
  432. data/spec/models/update_settings_flow_body_spec.rb +1 -1
  433. data/spec/models/update_settings_flow_with_lookup_method_spec.rb +1 -1
  434. data/spec/models/update_settings_flow_with_oidc_method_spec.rb +1 -1
  435. data/spec/models/update_settings_flow_with_password_method_spec.rb +1 -1
  436. data/spec/models/update_settings_flow_with_profile_method_spec.rb +1 -1
  437. data/spec/models/update_settings_flow_with_totp_method_spec.rb +1 -1
  438. data/spec/models/update_settings_flow_with_web_authn_method_spec.rb +1 -1
  439. data/spec/models/update_subscription_body_spec.rb +1 -1
  440. data/spec/models/update_verification_flow_body_spec.rb +1 -1
  441. data/spec/models/update_verification_flow_with_code_method_spec.rb +1 -1
  442. data/spec/models/update_verification_flow_with_link_method_spec.rb +5 -1
  443. data/spec/models/usage_spec.rb +1 -1
  444. data/spec/models/verifiable_identity_address_spec.rb +1 -1
  445. data/spec/models/verification_flow_spec.rb +1 -1
  446. data/spec/models/verification_flow_state_spec.rb +1 -1
  447. data/spec/models/version_spec.rb +1 -1
  448. data/spec/models/warning_spec.rb +1 -1
  449. data/spec/spec_helper.rb +1 -1
  450. data/vendor/bundle/ruby/2.5.0/bin/racc +27 -0
  451. data/vendor/bundle/ruby/2.5.0/cache/jaro_winkler-1.5.6.gem +0 -0
  452. data/vendor/bundle/ruby/2.5.0/cache/parser-3.2.2.3.gem +0 -0
  453. data/vendor/bundle/ruby/2.5.0/cache/racc-1.7.0.gem +0 -0
  454. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/byebug-11.1.3/gem_make.out +2 -2
  455. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/ffi-1.15.5/gem_make.out +2 -2
  456. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/gem_make.out +6 -6
  457. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/jaro_winkler/jaro_winkler_ext.so +0 -0
  458. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/psych-4.0.6/gem_make.out +2 -2
  459. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/racc-1.7.0/gem_make.out +17 -0
  460. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/racc-1.7.0/mkmf.log +56 -0
  461. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/racc-1.7.0/racc/cparse.so +0 -0
  462. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/stringio-3.0.6/gem_make.out +2 -2
  463. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/stringio-3.0.6/mkmf.log +1 -1
  464. data/vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/ext/byebug/Makefile +2 -2
  465. data/vendor/bundle/ruby/2.5.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +2 -2
  466. data/vendor/bundle/ruby/2.5.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler/.sitearchdir.-.jaro_winkler.time +0 -0
  467. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/Makefile +2 -2
  468. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/adj_matrix.o +0 -0
  469. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/codepoints.o +0 -0
  470. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/jaro.o +0 -0
  471. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/jaro_winkler.c +5 -0
  472. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/jaro_winkler.o +0 -0
  473. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/jaro_winkler_ext.so +0 -0
  474. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
  475. data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/lib/jaro_winkler/version.rb +1 -1
  476. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/macruby.rb +3 -1
  477. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby18.rb +3 -1
  478. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby19.rb +3 -1
  479. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby20.rb +3 -1
  480. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby21.rb +3 -1
  481. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby22.rb +3 -1
  482. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby23.rb +3 -1
  483. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby24.rb +3 -1
  484. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby25.rb +3 -1
  485. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby26.rb +3 -1
  486. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby27.rb +3 -1
  487. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby30.rb +3 -1
  488. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby31.rb +3 -1
  489. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby32.rb +3 -1
  490. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby33.rb +3 -1
  491. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/rubymotion.rb +3 -1
  492. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/version.rb +1 -1
  493. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/parser.gemspec +1 -1
  494. data/vendor/bundle/ruby/2.5.0/gems/psych-4.0.6/ext/psych/Makefile +2 -2
  495. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/COPYING +22 -0
  496. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/ChangeLog +846 -0
  497. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/README.ja.rdoc +94 -0
  498. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/README.rdoc +79 -0
  499. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/TODO +5 -0
  500. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/bin/racc +320 -0
  501. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/en/NEWS.en.rdoc +282 -0
  502. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/en/grammar.en.rdoc +226 -0
  503. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/en/grammar2.en.rdoc +219 -0
  504. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/ja/NEWS.ja.rdoc +307 -0
  505. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/ja/command.ja.html +94 -0
  506. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/ja/debug.ja.rdoc +36 -0
  507. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/ja/grammar.ja.rdoc +348 -0
  508. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/ja/index.ja.html +10 -0
  509. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/ja/parser.ja.rdoc +125 -0
  510. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/doc/ja/usage.ja.html +414 -0
  511. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/ext/racc/MANIFEST +4 -0
  512. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/ext/racc/cparse/.sitearchdir.-.racc.time +0 -0
  513. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/ext/racc/cparse/Makefile +264 -0
  514. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/ext/racc/cparse/cparse.c +861 -0
  515. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/ext/racc/cparse/cparse.o +0 -0
  516. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/ext/racc/cparse/cparse.so +0 -0
  517. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/ext/racc/cparse/extconf.rb +9 -0
  518. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/compat.rb +33 -0
  519. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/cparse.so +0 -0
  520. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/debugflags.rb +60 -0
  521. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/exception.rb +16 -0
  522. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/grammar.rb +1114 -0
  523. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/grammarfileparser.rb +561 -0
  524. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/info.rb +17 -0
  525. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/iset.rb +92 -0
  526. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/logfilegenerator.rb +212 -0
  527. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/parser-text.rb +658 -0
  528. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/parser.rb +632 -0
  529. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/parserfilegenerator.rb +470 -0
  530. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/sourcetext.rb +35 -0
  531. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/state.rb +972 -0
  532. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/statetransitiontable.rb +311 -0
  533. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc/static.rb +5 -0
  534. data/vendor/bundle/ruby/2.5.0/gems/racc-1.7.0/lib/racc.rb +6 -0
  535. data/vendor/bundle/ruby/2.5.0/gems/stringio-3.0.6/ext/stringio/Makefile +2 -2
  536. data/vendor/bundle/ruby/2.5.0/specifications/{jaro_winkler-1.5.5.gemspec → jaro_winkler-1.5.6.gemspec} +4 -4
  537. data/vendor/bundle/ruby/2.5.0/specifications/{parser-3.2.2.1.gemspec → parser-3.2.2.3.gemspec} +7 -7
  538. data/vendor/bundle/ruby/2.5.0/specifications/racc-1.7.0.gemspec +27 -0
  539. metadata +166 -111
  540. data/vendor/bundle/ruby/2.5.0/cache/jaro_winkler-1.5.5.gem +0 -0
  541. data/vendor/bundle/ruby/2.5.0/cache/parser-3.2.2.1.gem +0 -0
  542. /data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/gem.build_complete +0 -0
  543. /data/vendor/bundle/ruby/2.5.0/{gems/jaro_winkler-1.5.5/ext/jaro_winkler/.sitearchdir.-.jaro_winkler.time → extensions/x86_64-linux/2.5.0/racc-1.7.0/gem.build_complete} +0 -0
  544. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/LICENSE.txt +0 -0
  545. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/adj_matrix.c +0 -0
  546. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/adj_matrix.h +0 -0
  547. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/codepoints.c +0 -0
  548. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/codepoints.h +0 -0
  549. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/extconf.rb +0 -0
  550. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/jaro.c +0 -0
  551. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/ext/jaro_winkler/jaro.h +0 -0
  552. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/lib/jaro_winkler/adjusting_table.rb +0 -0
  553. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/lib/jaro_winkler/jaro_winkler_pure.rb +0 -0
  554. /data/vendor/bundle/ruby/2.5.0/gems/{jaro_winkler-1.5.5 → jaro_winkler-1.5.6}/lib/jaro_winkler.rb +0 -0
  555. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/LICENSE.txt +0 -0
  556. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/bin/ruby-parse +0 -0
  557. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/bin/ruby-rewrite +0 -0
  558. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/gauntlet_parser.rb +0 -0
  559. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/all.rb +0 -0
  560. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ast/node.rb +0 -0
  561. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ast/processor.rb +0 -0
  562. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/base.rb +0 -0
  563. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/builders/default.rb +0 -0
  564. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/clobbering_error.rb +0 -0
  565. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/color.rb +0 -0
  566. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/context.rb +0 -0
  567. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/current.rb +0 -0
  568. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/current_arg_stack.rb +0 -0
  569. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/deprecation.rb +0 -0
  570. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/diagnostic/engine.rb +0 -0
  571. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/diagnostic.rb +0 -0
  572. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer/dedenter.rb +0 -0
  573. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer/explanation.rb +0 -0
  574. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer/literal.rb +0 -0
  575. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer/stack_state.rb +0 -0
  576. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer-F0.rb +0 -0
  577. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer-F1.rb +0 -0
  578. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer-strings.rb +0 -0
  579. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/max_numparam_stack.rb +0 -0
  580. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/messages.rb +0 -0
  581. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/meta.rb +0 -0
  582. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/rewriter.rb +0 -0
  583. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby28.rb +0 -0
  584. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/runner/ruby_parse.rb +0 -0
  585. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/runner/ruby_rewrite.rb +0 -0
  586. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/runner.rb +0 -0
  587. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/buffer.rb +0 -0
  588. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/comment/associator.rb +0 -0
  589. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/comment.rb +0 -0
  590. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/collection.rb +0 -0
  591. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/condition.rb +0 -0
  592. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/constant.rb +0 -0
  593. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/definition.rb +0 -0
  594. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/for.rb +0 -0
  595. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/heredoc.rb +0 -0
  596. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/index.rb +0 -0
  597. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/keyword.rb +0 -0
  598. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/method_definition.rb +0 -0
  599. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/objc_kwarg.rb +0 -0
  600. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/operator.rb +0 -0
  601. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/rescue_body.rb +0 -0
  602. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/send.rb +0 -0
  603. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/ternary.rb +0 -0
  604. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/variable.rb +0 -0
  605. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map.rb +0 -0
  606. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/range.rb +0 -0
  607. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/rewriter/action.rb +0 -0
  608. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/rewriter.rb +0 -0
  609. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/tree_rewriter/action.rb +0 -0
  610. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/tree_rewriter.rb +0 -0
  611. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/static_environment.rb +0 -0
  612. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/syntax_error.rb +0 -0
  613. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/tree_rewriter.rb +0 -0
  614. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/variables_stack.rb +0 -0
  615. /data/vendor/bundle/ruby/2.5.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser.rb +0 -0
@@ -0,0 +1,1114 @@
1
+ #--
2
+ #
3
+ #
4
+ #
5
+ # Copyright (c) 1999-2006 Minero Aoki
6
+ #
7
+ # This program is free software.
8
+ # You can distribute/modify this program under the same terms of ruby.
9
+ # see the file "COPYING".
10
+ #
11
+ #++
12
+
13
+ require 'racc/compat'
14
+ require 'racc/iset'
15
+ require 'racc/sourcetext'
16
+ require 'racc/logfilegenerator'
17
+ require 'racc/exception'
18
+ require 'forwardable'
19
+
20
+ module Racc
21
+
22
+ class Grammar
23
+
24
+ def initialize(debug_flags = DebugFlags.new)
25
+ @symboltable = SymbolTable.new
26
+ @debug_symbol = debug_flags.token
27
+ @rules = [] # :: [Rule]
28
+ @start = nil
29
+ @n_expected_srconflicts = nil
30
+ @prec_table = []
31
+ @prec_table_closed = false
32
+ @closed = false
33
+ @states = nil
34
+ end
35
+
36
+ attr_reader :start
37
+ attr_reader :symboltable
38
+ attr_accessor :n_expected_srconflicts
39
+
40
+ def [](x)
41
+ @rules[x]
42
+ end
43
+
44
+ def each_rule(&block)
45
+ @rules.each(&block)
46
+ end
47
+
48
+ alias each each_rule
49
+
50
+ def each_index(&block)
51
+ @rules.each_index(&block)
52
+ end
53
+
54
+ def each_with_index(&block)
55
+ @rules.each_with_index(&block)
56
+ end
57
+
58
+ def size
59
+ @rules.size
60
+ end
61
+
62
+ def to_s
63
+ "<Racc::Grammar>"
64
+ end
65
+
66
+ extend Forwardable
67
+
68
+ def_delegator "@symboltable", :each, :each_symbol
69
+ def_delegator "@symboltable", :each_terminal
70
+ def_delegator "@symboltable", :each_nonterminal
71
+
72
+ def intern(value, dummy = false)
73
+ @symboltable.intern(value, dummy)
74
+ end
75
+
76
+ def symbols
77
+ @symboltable.symbols
78
+ end
79
+
80
+ def nonterminal_base
81
+ @symboltable.nt_base
82
+ end
83
+
84
+ def useless_nonterminal_exist?
85
+ n_useless_nonterminals() != 0
86
+ end
87
+
88
+ def n_useless_nonterminals
89
+ @n_useless_nonterminals ||= each_useless_nonterminal.count
90
+ end
91
+
92
+ def each_useless_nonterminal
93
+ return to_enum __method__ unless block_given?
94
+
95
+ @symboltable.each_nonterminal do |sym|
96
+ yield sym if sym.useless?
97
+ end
98
+ end
99
+
100
+ def useless_rule_exist?
101
+ n_useless_rules() != 0
102
+ end
103
+
104
+ def n_useless_rules
105
+ @n_useless_rules ||= each_useless_rule.count
106
+ end
107
+
108
+ def each_useless_rule
109
+ return to_enum __method__ unless block_given?
110
+
111
+ each do |r|
112
+ yield r if r.useless?
113
+ end
114
+ end
115
+
116
+ def nfa
117
+ (@states ||= States.new(self)).nfa
118
+ end
119
+
120
+ def dfa
121
+ (@states ||= States.new(self)).dfa
122
+ end
123
+
124
+ alias states dfa
125
+
126
+ def state_transition_table
127
+ states().state_transition_table
128
+ end
129
+
130
+ def parser_class
131
+ states = states() # cache
132
+ if $DEBUG
133
+ srcfilename = caller(1).first.slice(/\A(.*?):/, 1)
134
+ begin
135
+ write_log srcfilename + ".output"
136
+ rescue SystemCallError
137
+ end
138
+ report = lambda {|s| $stderr.puts "racc: #{srcfilename}: #{s}" }
139
+ if states.should_report_srconflict?
140
+ report["#{states.n_srconflicts} shift/reduce conflicts"]
141
+ end
142
+ if states.rrconflict_exist?
143
+ report["#{states.n_rrconflicts} reduce/reduce conflicts"]
144
+ end
145
+ g = states.grammar
146
+ if g.useless_nonterminal_exist?
147
+ report["#{g.n_useless_nonterminals} useless nonterminals"]
148
+ end
149
+ if g.useless_rule_exist?
150
+ report["#{g.n_useless_rules} useless rules"]
151
+ end
152
+ end
153
+ states.state_transition_table.parser_class
154
+ end
155
+
156
+ def write_log(path)
157
+ File.open(path, 'w') {|f|
158
+ LogFileGenerator.new(states()).output f
159
+ }
160
+ end
161
+
162
+ #
163
+ # Grammar Definition Interface
164
+ #
165
+
166
+ def add(rule)
167
+ raise ArgumentError, "rule added after the Grammar closed" if @closed
168
+ @rules.push rule
169
+ end
170
+
171
+ def added?(sym)
172
+ @rules.detect {|r| r.target == sym }
173
+ end
174
+
175
+ def start_symbol=(s)
176
+ raise CompileError, "start symbol set twice'" if @start
177
+ @start = s
178
+ end
179
+
180
+ def declare_precedence(assoc, syms)
181
+ raise CompileError, "precedence table defined twice" if @prec_table_closed
182
+ @prec_table.push [assoc, syms]
183
+ end
184
+
185
+ def end_precedence_declaration(reverse)
186
+ @prec_table_closed = true
187
+ return if @prec_table.empty?
188
+ table = reverse ? @prec_table.reverse : @prec_table
189
+ table.each_with_index do |(assoc, syms), idx|
190
+ syms.each do |sym|
191
+ sym.assoc = assoc
192
+ sym.precedence = idx
193
+ end
194
+ end
195
+ end
196
+
197
+ #
198
+ # Dynamic Generation Interface
199
+ #
200
+
201
+ def Grammar.define(&block)
202
+ env = DefinitionEnv.new
203
+ env.instance_eval(&block)
204
+ env.grammar
205
+ end
206
+
207
+ class DefinitionEnv
208
+ def initialize
209
+ @grammar = Grammar.new
210
+ @seqs = Hash.new(0)
211
+ @delayed = []
212
+ end
213
+
214
+ def grammar
215
+ flush_delayed
216
+ @grammar.each do |rule|
217
+ if rule.specified_prec
218
+ rule.specified_prec = @grammar.intern(rule.specified_prec)
219
+ end
220
+ end
221
+ @grammar.init
222
+ @grammar
223
+ end
224
+
225
+ def precedence_table(&block)
226
+ env = PrecedenceDefinitionEnv.new(@grammar)
227
+ env.instance_eval(&block)
228
+ @grammar.end_precedence_declaration env.reverse
229
+ end
230
+
231
+ def method_missing(mid, *args, &block)
232
+ unless mid.to_s[-1,1] == '='
233
+ super # raises NoMethodError
234
+ end
235
+ target = @grammar.intern(mid.to_s.chop.intern)
236
+ unless args.size == 1
237
+ raise ArgumentError, "too many arguments for #{mid} (#{args.size} for 1)"
238
+ end
239
+ _add target, args.first
240
+ end
241
+
242
+ def _add(target, x)
243
+ case x
244
+ when Sym
245
+ @delayed.each do |rule|
246
+ rule.replace x, target if rule.target == x
247
+ end
248
+ @grammar.symboltable.delete x
249
+ else
250
+ x.each_rule do |r|
251
+ r.target = target
252
+ @grammar.add r
253
+ end
254
+ end
255
+ flush_delayed
256
+ end
257
+
258
+ def _delayed_add(rule)
259
+ @delayed.push rule
260
+ end
261
+
262
+ def _added?(sym)
263
+ @grammar.added?(sym) or @delayed.detect {|r| r.target == sym }
264
+ end
265
+
266
+ def flush_delayed
267
+ return if @delayed.empty?
268
+ @delayed.each do |rule|
269
+ @grammar.add rule
270
+ end
271
+ @delayed.clear
272
+ end
273
+
274
+ def seq(*list, &block)
275
+ Rule.new(nil, list.map {|x| _intern(x) }, UserAction.proc(block))
276
+ end
277
+
278
+ def null(&block)
279
+ seq(&block)
280
+ end
281
+
282
+ def action(&block)
283
+ id = "@#{@seqs["action"] += 1}".intern
284
+ _delayed_add Rule.new(@grammar.intern(id), [], UserAction.proc(block))
285
+ id
286
+ end
287
+
288
+ alias _ action
289
+
290
+ def option(sym, default = nil, &block)
291
+ _defmetasyntax("option", _intern(sym), block) {|target|
292
+ seq() { default } | seq(sym)
293
+ }
294
+ end
295
+
296
+ def many(sym, &block)
297
+ _defmetasyntax("many", _intern(sym), block) {|target|
298
+ seq() { [] }\
299
+ | seq(target, sym) {|list, x| list.push x; list }
300
+ }
301
+ end
302
+
303
+ def many1(sym, &block)
304
+ _defmetasyntax("many1", _intern(sym), block) {|target|
305
+ seq(sym) {|x| [x] }\
306
+ | seq(target, sym) {|list, x| list.push x; list }
307
+ }
308
+ end
309
+
310
+ def separated_by(sep, sym, &block)
311
+ option(separated_by1(sep, sym), [], &block)
312
+ end
313
+
314
+ def separated_by1(sep, sym, &block)
315
+ _defmetasyntax("separated_by1", _intern(sym), block) {|target|
316
+ seq(sym) {|x| [x] }\
317
+ | seq(target, sep, sym) {|list, _, x| list.push x; list }
318
+ }
319
+ end
320
+
321
+ def _intern(x)
322
+ case x
323
+ when Symbol, String
324
+ @grammar.intern(x)
325
+ when Racc::Sym
326
+ x
327
+ else
328
+ raise TypeError, "wrong type #{x.class} (expected Symbol/String/Racc::Sym)"
329
+ end
330
+ end
331
+
332
+ private
333
+
334
+ def _defmetasyntax(type, id, action, &block)
335
+ if action
336
+ idbase = "#{type}@#{id}-#{@seqs[type] += 1}"
337
+ target = _wrap(idbase, "#{idbase}-core", action)
338
+ _register("#{idbase}-core", &block)
339
+ else
340
+ target = _register("#{type}@#{id}", &block)
341
+ end
342
+ @grammar.intern(target)
343
+ end
344
+
345
+ def _register(target_name)
346
+ target = target_name.intern
347
+ unless _added?(@grammar.intern(target))
348
+ yield(target).each_rule do |rule|
349
+ rule.target = @grammar.intern(target)
350
+ _delayed_add rule
351
+ end
352
+ end
353
+ target
354
+ end
355
+
356
+ def _wrap(target_name, sym, block)
357
+ target = target_name.intern
358
+ _delayed_add Rule.new(@grammar.intern(target),
359
+ [@grammar.intern(sym.intern)],
360
+ UserAction.proc(block))
361
+ target
362
+ end
363
+ end
364
+
365
+ class PrecedenceDefinitionEnv
366
+ def initialize(g)
367
+ @grammar = g
368
+ @prechigh_seen = false
369
+ @preclow_seen = false
370
+ @reverse = false
371
+ end
372
+
373
+ attr_reader :reverse
374
+
375
+ def higher
376
+ if @prechigh_seen
377
+ raise CompileError, "prechigh used twice"
378
+ end
379
+ @prechigh_seen = true
380
+ end
381
+
382
+ def lower
383
+ if @preclow_seen
384
+ raise CompileError, "preclow used twice"
385
+ end
386
+ if @prechigh_seen
387
+ @reverse = true
388
+ end
389
+ @preclow_seen = true
390
+ end
391
+
392
+ def left(*syms)
393
+ @grammar.declare_precedence :Left, syms.map {|s| @grammar.intern(s) }
394
+ end
395
+
396
+ def right(*syms)
397
+ @grammar.declare_precedence :Right, syms.map {|s| @grammar.intern(s) }
398
+ end
399
+
400
+ def nonassoc(*syms)
401
+ @grammar.declare_precedence :Nonassoc, syms.map {|s| @grammar.intern(s)}
402
+ end
403
+ end
404
+
405
+ #
406
+ # Computation
407
+ #
408
+
409
+ def init
410
+ return if @closed
411
+ @closed = true
412
+ @start ||= @rules.map {|r| r.target }.detect {|sym| not sym.dummy? }
413
+ raise CompileError, 'no rule in input' if @rules.empty?
414
+ add_start_rule
415
+ @rules.freeze
416
+ fix_ident
417
+ compute_hash
418
+ compute_heads
419
+ determine_terminals
420
+ compute_nullable_0
421
+ @symboltable.fix
422
+ compute_locate
423
+ @symboltable.each_nonterminal {|t| compute_expand t }
424
+ compute_nullable
425
+ compute_useless
426
+ end
427
+
428
+ private
429
+
430
+ def add_start_rule
431
+ r = Rule.new(@symboltable.dummy,
432
+ [@start, @symboltable.anchor, @symboltable.anchor],
433
+ UserAction.empty)
434
+ r.ident = 0
435
+ r.hash = 0
436
+ r.precedence = nil
437
+ @rules.unshift r
438
+ end
439
+
440
+ # Rule#ident
441
+ # LocationPointer#ident
442
+ def fix_ident
443
+ @rules.each_with_index do |rule, idx|
444
+ rule.ident = idx
445
+ end
446
+ end
447
+
448
+ # Rule#hash
449
+ def compute_hash
450
+ hash = 4 # size of dummy rule
451
+ @rules.each do |rule|
452
+ rule.hash = hash
453
+ hash += (rule.size + 1)
454
+ end
455
+ end
456
+
457
+ # Sym#heads
458
+ def compute_heads
459
+ @rules.each do |rule|
460
+ rule.target.heads.push rule.ptrs[0]
461
+ end
462
+ end
463
+
464
+ # Sym#terminal?
465
+ def determine_terminals
466
+ @symboltable.each do |s|
467
+ s.term = s.heads.empty?
468
+ end
469
+ end
470
+
471
+ # Sym#self_null?
472
+ def compute_nullable_0
473
+ @symboltable.each do |s|
474
+ if s.terminal?
475
+ s.snull = false
476
+ else
477
+ s.snull = s.heads.any? {|loc| loc.reduce? }
478
+ end
479
+ end
480
+ end
481
+
482
+ # Sym#locate
483
+ def compute_locate
484
+ @rules.each do |rule|
485
+ t = nil
486
+ rule.ptrs.each do |ptr|
487
+ unless ptr.reduce?
488
+ tok = ptr.dereference
489
+ tok.locate.push ptr
490
+ t = tok if tok.terminal?
491
+ end
492
+ end
493
+ rule.precedence = t
494
+ end
495
+ end
496
+
497
+ # Sym#expand
498
+ def compute_expand(t)
499
+ puts "expand> #{t.to_s}" if @debug_symbol
500
+ t.expand = _compute_expand(t, ISet.new, [])
501
+ puts "expand< #{t.to_s}: #{t.expand.to_s}" if @debug_symbol
502
+ end
503
+
504
+ def _compute_expand(t, set, lock)
505
+ if tmp = t.expand
506
+ set.update tmp
507
+ return set
508
+ end
509
+ tok = nil
510
+ set.update_a t.heads
511
+ t.heads.each do |ptr|
512
+ tok = ptr.dereference
513
+ if tok and tok.nonterminal?
514
+ unless lock[tok.ident]
515
+ lock[tok.ident] = true
516
+ _compute_expand tok, set, lock
517
+ end
518
+ end
519
+ end
520
+ set
521
+ end
522
+
523
+ # Sym#nullable?, Rule#nullable?
524
+ def compute_nullable
525
+ @rules.each {|r| r.null = false }
526
+ @symboltable.each {|t| t.null = false }
527
+ r = @rules.dup
528
+ s = @symboltable.nonterminals
529
+ begin
530
+ rs = r.size
531
+ ss = s.size
532
+ check_rules_nullable r
533
+ check_symbols_nullable s
534
+ end until rs == r.size and ss == s.size
535
+ end
536
+
537
+ def check_rules_nullable(rules)
538
+ rules.delete_if do |rule|
539
+ rule.null = true
540
+ rule.symbols.each do |t|
541
+ unless t.nullable?
542
+ rule.null = false
543
+ break
544
+ end
545
+ end
546
+ rule.nullable?
547
+ end
548
+ end
549
+
550
+ def check_symbols_nullable(symbols)
551
+ symbols.delete_if do |sym|
552
+ sym.heads.each do |ptr|
553
+ if ptr.rule.nullable?
554
+ sym.null = true
555
+ break
556
+ end
557
+ end
558
+ sym.nullable?
559
+ end
560
+ end
561
+
562
+ # Sym#useless?, Rule#useless?
563
+ # FIXME: what means "useless"?
564
+ def compute_useless
565
+ @symboltable.each_terminal {|sym| sym.useless = false }
566
+ @symboltable.each_nonterminal {|sym| sym.useless = true }
567
+ @rules.each {|rule| rule.useless = true }
568
+ r = @rules.dup
569
+ s = @symboltable.nonterminals
570
+ begin
571
+ rs = r.size
572
+ ss = s.size
573
+ check_rules_useless r
574
+ check_symbols_useless s
575
+ end until r.size == rs and s.size == ss
576
+ end
577
+
578
+ def check_rules_useless(rules)
579
+ rules.delete_if do |rule|
580
+ rule.useless = false
581
+ rule.symbols.each do |sym|
582
+ if sym.useless?
583
+ rule.useless = true
584
+ break
585
+ end
586
+ end
587
+ not rule.useless?
588
+ end
589
+ end
590
+
591
+ def check_symbols_useless(s)
592
+ s.delete_if do |t|
593
+ t.heads.each do |ptr|
594
+ unless ptr.rule.useless?
595
+ t.useless = false
596
+ break
597
+ end
598
+ end
599
+ not t.useless?
600
+ end
601
+ end
602
+
603
+ end # class Grammar
604
+
605
+
606
+ class Rule
607
+
608
+ def initialize(target, syms, act)
609
+ @target = target
610
+ @symbols = syms
611
+ @action = act
612
+ @alternatives = []
613
+
614
+ @ident = nil
615
+ @hash = nil
616
+ @ptrs = nil
617
+ @precedence = nil
618
+ @specified_prec = nil
619
+ @null = nil
620
+ @useless = nil
621
+ end
622
+
623
+ attr_accessor :target
624
+ attr_reader :symbols
625
+ attr_reader :action
626
+
627
+ def |(x)
628
+ @alternatives.push x.rule
629
+ self
630
+ end
631
+
632
+ def rule
633
+ self
634
+ end
635
+
636
+ def each_rule(&block)
637
+ yield self
638
+ @alternatives.each(&block)
639
+ end
640
+
641
+ attr_accessor :ident
642
+
643
+ attr_reader :hash
644
+ attr_reader :ptrs
645
+
646
+ def hash=(n)
647
+ @hash = n
648
+ ptrs = []
649
+ @symbols.each_with_index do |sym, idx|
650
+ ptrs.push LocationPointer.new(self, idx, sym)
651
+ end
652
+ ptrs.push LocationPointer.new(self, @symbols.size, nil)
653
+ @ptrs = ptrs
654
+ end
655
+
656
+ def precedence
657
+ @specified_prec || @precedence
658
+ end
659
+
660
+ def precedence=(sym)
661
+ @precedence ||= sym
662
+ end
663
+
664
+ def prec(sym, &block)
665
+ @specified_prec = sym
666
+ if block
667
+ unless @action.empty?
668
+ raise CompileError, 'both of rule action block and prec block given'
669
+ end
670
+ @action = UserAction.proc(block)
671
+ end
672
+ self
673
+ end
674
+
675
+ attr_accessor :specified_prec
676
+
677
+ def nullable?() @null end
678
+ def null=(n) @null = n end
679
+
680
+ def useless?() @useless end
681
+ def useless=(u) @useless = u end
682
+
683
+ def inspect
684
+ "#<Racc::Rule id=#{@ident} (#{@target})>"
685
+ end
686
+
687
+ def ==(other)
688
+ other.kind_of?(Rule) and @ident == other.ident
689
+ end
690
+
691
+ def [](idx)
692
+ @symbols[idx]
693
+ end
694
+
695
+ def size
696
+ @symbols.size
697
+ end
698
+
699
+ def empty?
700
+ @symbols.empty?
701
+ end
702
+
703
+ def to_s
704
+ "#<rule#{@ident}>"
705
+ end
706
+
707
+ def accept?
708
+ if tok = @symbols[-1]
709
+ tok.anchor?
710
+ else
711
+ false
712
+ end
713
+ end
714
+
715
+ def each(&block)
716
+ @symbols.each(&block)
717
+ end
718
+
719
+ def replace(src, dest)
720
+ @target = dest
721
+ @symbols = @symbols.map {|s| s == src ? dest : s }
722
+ end
723
+
724
+ end # class Rule
725
+
726
+
727
+ class UserAction
728
+
729
+ def UserAction.source_text(src)
730
+ new(src, nil)
731
+ end
732
+
733
+ def UserAction.proc(pr = nil, &block)
734
+ if pr and block
735
+ raise ArgumentError, "both of argument and block given"
736
+ end
737
+ new(nil, pr || block)
738
+ end
739
+
740
+ def UserAction.empty
741
+ new(nil, nil)
742
+ end
743
+
744
+ private_class_method :new
745
+
746
+ def initialize(src, proc)
747
+ @source = src
748
+ @proc = proc
749
+ end
750
+
751
+ attr_reader :source
752
+ attr_reader :proc
753
+
754
+ def source?
755
+ not @proc
756
+ end
757
+
758
+ def proc?
759
+ not @source
760
+ end
761
+
762
+ def empty?
763
+ not @proc and not @source
764
+ end
765
+
766
+ def name
767
+ "{action type=#{@source || @proc || 'nil'}}"
768
+ end
769
+
770
+ alias inspect name
771
+
772
+ end
773
+
774
+
775
+ class OrMark
776
+ def initialize(lineno)
777
+ @lineno = lineno
778
+ end
779
+
780
+ def name
781
+ '|'
782
+ end
783
+
784
+ alias inspect name
785
+
786
+ attr_reader :lineno
787
+ end
788
+
789
+
790
+ class Prec
791
+ def initialize(symbol, lineno)
792
+ @symbol = symbol
793
+ @lineno = lineno
794
+ end
795
+
796
+ def name
797
+ "=#{@symbol}"
798
+ end
799
+
800
+ alias inspect name
801
+
802
+ attr_reader :symbol
803
+ attr_reader :lineno
804
+ end
805
+
806
+
807
+ #
808
+ # A set of rule and position in it's RHS.
809
+ # Note that the number of pointers is more than rule's RHS array,
810
+ # because pointer points right edge of the final symbol when reducing.
811
+ #
812
+ class LocationPointer
813
+
814
+ def initialize(rule, i, sym)
815
+ @rule = rule
816
+ @index = i
817
+ @symbol = sym
818
+ @ident = @rule.hash + i
819
+ @reduce = sym.nil?
820
+ end
821
+
822
+ attr_reader :rule
823
+ attr_reader :index
824
+ attr_reader :symbol
825
+
826
+ alias dereference symbol
827
+
828
+ attr_reader :ident
829
+ alias hash ident
830
+ attr_reader :reduce
831
+ alias reduce? reduce
832
+
833
+ def to_s
834
+ sprintf('(%d,%d %s)',
835
+ @rule.ident, @index, (reduce?() ? '#' : @symbol.to_s))
836
+ end
837
+
838
+ alias inspect to_s
839
+
840
+ def eql?(ot)
841
+ @hash == ot.hash
842
+ end
843
+
844
+ alias == eql?
845
+
846
+ def head?
847
+ @index == 0
848
+ end
849
+
850
+ def next
851
+ @rule.ptrs[@index + 1] or ptr_bug!
852
+ end
853
+
854
+ alias increment next
855
+
856
+ def before(len)
857
+ @rule.ptrs[@index - len] or ptr_bug!
858
+ end
859
+
860
+ private
861
+
862
+ def ptr_bug!
863
+ raise "racc: fatal: pointer not exist: self: #{to_s}"
864
+ end
865
+
866
+ end # class LocationPointer
867
+
868
+
869
+ class SymbolTable
870
+
871
+ include Enumerable
872
+
873
+ def initialize
874
+ @symbols = [] # :: [Racc::Sym]
875
+ @cache = {} # :: {(String|Symbol) => Racc::Sym}
876
+ @dummy = intern(:$start, true)
877
+ @anchor = intern(false, true) # Symbol ID = 0
878
+ @error = intern(:error, false) # Symbol ID = 1
879
+ end
880
+
881
+ attr_reader :dummy
882
+ attr_reader :anchor
883
+ attr_reader :error
884
+
885
+ def [](id)
886
+ @symbols[id]
887
+ end
888
+
889
+ def intern(val, dummy = false)
890
+ @cache[val] ||=
891
+ begin
892
+ sym = Sym.new(val, dummy)
893
+ @symbols.push sym
894
+ sym
895
+ end
896
+ end
897
+
898
+ attr_reader :symbols
899
+ alias to_a symbols
900
+
901
+ def delete(sym)
902
+ @symbols.delete sym
903
+ @cache.delete sym.value
904
+ end
905
+
906
+ attr_reader :nt_base
907
+
908
+ def nt_max
909
+ @symbols.size
910
+ end
911
+
912
+ def each(&block)
913
+ @symbols.each(&block)
914
+ end
915
+
916
+ def terminals(&block)
917
+ @symbols[0, @nt_base]
918
+ end
919
+
920
+ def each_terminal(&block)
921
+ @terms.each(&block)
922
+ end
923
+
924
+ def nonterminals
925
+ @symbols[@nt_base, @symbols.size - @nt_base]
926
+ end
927
+
928
+ def each_nonterminal(&block)
929
+ @nterms.each(&block)
930
+ end
931
+
932
+ def fix
933
+ terms, nterms = @symbols.partition {|s| s.terminal? }
934
+ @symbols = terms + nterms
935
+ @terms = terms
936
+ @nterms = nterms
937
+ @nt_base = terms.size
938
+ fix_ident
939
+ check_terminals
940
+ end
941
+
942
+ private
943
+
944
+ def fix_ident
945
+ @symbols.each_with_index do |t, i|
946
+ t.ident = i
947
+ end
948
+ end
949
+
950
+ def check_terminals
951
+ return unless @symbols.any? {|s| s.should_terminal? }
952
+ @anchor.should_terminal
953
+ @error.should_terminal
954
+ each_terminal do |t|
955
+ t.should_terminal if t.string_symbol?
956
+ end
957
+ each do |s|
958
+ s.should_terminal if s.assoc
959
+ end
960
+ terminals().reject {|t| t.should_terminal? }.each do |t|
961
+ raise CompileError, "terminal #{t} not declared as terminal"
962
+ end
963
+ nonterminals().select {|n| n.should_terminal? }.each do |n|
964
+ raise CompileError, "symbol #{n} declared as terminal but is not terminal"
965
+ end
966
+ end
967
+
968
+ end # class SymbolTable
969
+
970
+
971
+ # Stands terminal and nonterminal symbols.
972
+ class Sym
973
+
974
+ def initialize(value, dummyp)
975
+ @ident = nil
976
+ @value = value
977
+ @dummyp = dummyp
978
+
979
+ @term = nil
980
+ @nterm = nil
981
+ @should_terminal = false
982
+ @precedence = nil
983
+ case value
984
+ when Symbol
985
+ @to_s = value.to_s
986
+ @serialized = value.inspect
987
+ @string = false
988
+ when String
989
+ @to_s = value.inspect
990
+ @serialized = value.dump
991
+ @string = true
992
+ when false
993
+ @to_s = '$end'
994
+ @serialized = 'false'
995
+ @string = false
996
+ else
997
+ raise ArgumentError, "unknown symbol value: #{value.class}"
998
+ end
999
+
1000
+ @heads = []
1001
+ @locate = []
1002
+ @snull = nil
1003
+ @null = nil
1004
+ @expand = nil
1005
+ @useless = nil
1006
+ end
1007
+
1008
+ class << self
1009
+ def once_writer(nm)
1010
+ nm = nm.id2name
1011
+ module_eval(<<-EOS)
1012
+ def #{nm}=(v)
1013
+ raise 'racc: fatal: @#{nm} != nil' unless @#{nm}.nil?
1014
+ @#{nm} = v
1015
+ end
1016
+ EOS
1017
+ end
1018
+ end
1019
+
1020
+ once_writer :ident
1021
+ attr_reader :ident
1022
+
1023
+ alias hash ident
1024
+
1025
+ attr_reader :value
1026
+
1027
+ def dummy?
1028
+ @dummyp
1029
+ end
1030
+
1031
+ def terminal?
1032
+ @term
1033
+ end
1034
+
1035
+ def nonterminal?
1036
+ @nterm
1037
+ end
1038
+
1039
+ def term=(t)
1040
+ raise 'racc: fatal: term= called twice' unless @term.nil?
1041
+ @term = t
1042
+ @nterm = !t
1043
+ end
1044
+
1045
+ def should_terminal
1046
+ @should_terminal = true
1047
+ end
1048
+
1049
+ def should_terminal?
1050
+ @should_terminal
1051
+ end
1052
+
1053
+ def string_symbol?
1054
+ @string
1055
+ end
1056
+
1057
+ def serialize
1058
+ @serialized
1059
+ end
1060
+
1061
+ attr_writer :serialized
1062
+
1063
+ attr_accessor :precedence
1064
+ attr_accessor :assoc
1065
+
1066
+ def to_s
1067
+ @to_s.dup
1068
+ end
1069
+
1070
+ alias inspect to_s
1071
+
1072
+ def |(x)
1073
+ rule() | x.rule
1074
+ end
1075
+
1076
+ def rule
1077
+ Rule.new(nil, [self], UserAction.empty)
1078
+ end
1079
+
1080
+ #
1081
+ # cache
1082
+ #
1083
+
1084
+ attr_reader :heads
1085
+ attr_reader :locate
1086
+
1087
+ def self_null?
1088
+ @snull
1089
+ end
1090
+
1091
+ once_writer :snull
1092
+
1093
+ def nullable?
1094
+ @null
1095
+ end
1096
+
1097
+ def null=(n)
1098
+ @null = n
1099
+ end
1100
+
1101
+ attr_reader :expand
1102
+ once_writer :expand
1103
+
1104
+ def useless?
1105
+ @useless
1106
+ end
1107
+
1108
+ def useless=(f)
1109
+ @useless = f
1110
+ end
1111
+
1112
+ end # class Sym
1113
+
1114
+ end # module Racc