ibex 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +247 -104
- data/docs/architecture.md +322 -28
- data/docs/cst-migration.md +107 -0
- data/docs/cst.md +213 -0
- data/docs/development.md +129 -0
- data/docs/editor-setup.md +25 -0
- data/docs/error-ux.md +60 -0
- data/docs/grammar-reference.md +458 -18
- data/docs/lexer-migration.md +51 -0
- data/docs/racc-migration.md +34 -6
- data/docs/release-readiness.md +163 -0
- data/docs/stability.md +124 -0
- data/examples/README.md +60 -0
- data/examples/calculator.y +44 -0
- data/examples/csv.y +32 -0
- data/examples/ini.y +70 -0
- data/examples/json.y +48 -0
- data/examples/tiny_language.y +75 -0
- data/lib/ibex/analysis/sets.rb +5 -4
- data/lib/ibex/artifact_set.rb +63 -0
- data/lib/ibex/cli/ambiguity.rb +66 -0
- data/lib/ibex/cli/counterexample_options.rb +6 -2
- data/lib/ibex/cli/coverage.rb +173 -0
- data/lib/ibex/cli/debug.rb +106 -0
- data/lib/ibex/cli/diagnostics.rb +116 -0
- data/lib/ibex/cli/documentation.rb +67 -0
- data/lib/ibex/cli/error_messages.rb +177 -0
- data/lib/ibex/cli/explain.rb +76 -0
- data/lib/ibex/cli/formatting.rb +386 -0
- data/lib/ibex/cli/generation_artifacts.rb +138 -0
- data/lib/ibex/cli/generation_error_messages.rb +39 -0
- data/lib/ibex/cli/grammar_tests.rb +122 -0
- data/lib/ibex/cli/ir_tools.rb +184 -0
- data/lib/ibex/cli/lsp.rb +33 -0
- data/lib/ibex/cli/outputs.rb +91 -8
- data/lib/ibex/cli/racc_migration.rb +87 -0
- data/lib/ibex/cli/samples.rb +92 -0
- data/lib/ibex/cli/watch.rb +103 -0
- data/lib/ibex/cli.rb +506 -37
- data/lib/ibex/codegen/action_locations.rb +103 -0
- data/lib/ibex/codegen/action_method_source.rb +210 -0
- data/lib/ibex/codegen/action_source.rb +118 -0
- data/lib/ibex/codegen/ambiguity.rb +173 -0
- data/lib/ibex/codegen/cst_metadata.rb +171 -0
- data/lib/ibex/codegen/documentation.rb +170 -0
- data/lib/ibex/codegen/explain.rb +312 -0
- data/lib/ibex/codegen/generated_action_abi.rb +288 -0
- data/lib/ibex/codegen/html.rb +94 -10
- data/lib/ibex/codegen/mermaid.rb +43 -0
- data/lib/ibex/codegen/railroad.rb +197 -0
- data/lib/ibex/codegen/railroad_documentation.rb +59 -0
- data/lib/ibex/codegen/rbs.rb +323 -2
- data/lib/ibex/codegen/report.rb +46 -6
- data/lib/ibex/codegen/ruby.rb +334 -59
- data/lib/ibex/codegen/ruby_actions.rb +143 -0
- data/lib/ibex/codegen/ruby_ast.rb +121 -0
- data/lib/ibex/codegen/ruby_error_messages.rb +28 -0
- data/lib/ibex/codegen/ruby_lexer.rb +83 -0
- data/lib/ibex/codegen/ruby_syntax.rb +90 -0
- data/lib/ibex/codegen/ruby_table_metadata.rb +57 -0
- data/lib/ibex/codegen/ruby_value_printers.rb +56 -0
- data/lib/ibex/codegen/symbol_labels.rb +1 -1
- data/lib/ibex/coverage/collector.rb +188 -0
- data/lib/ibex/coverage/event_stream.rb +97 -0
- data/lib/ibex/coverage/report.rb +259 -0
- data/lib/ibex/coverage/runtime_event_validator.rb +160 -0
- data/lib/ibex/coverage.rb +13 -0
- data/lib/ibex/error_messages/parser.rb +159 -0
- data/lib/ibex/error_messages/parser_v2.rb +198 -0
- data/lib/ibex/error_messages/renderer.rb +65 -0
- data/lib/ibex/error_messages/sentence_search.rb +196 -0
- data/lib/ibex/error_messages/update.rb +169 -0
- data/lib/ibex/error_messages.rb +165 -0
- data/lib/ibex/frontend/ast.rb +145 -6
- data/lib/ibex/frontend/bootstrap_parser.rb +47 -4
- data/lib/ibex/frontend/diagnostic.rb +81 -0
- data/lib/ibex/frontend/diagnostic_recovery.rb +268 -0
- data/lib/ibex/frontend/dsl.rb +66 -7
- data/lib/ibex/frontend/formatter.rb +407 -0
- data/lib/ibex/frontend/generated_parser.rb +614 -190
- data/lib/ibex/frontend/generated_parser_base.rb +164 -30
- data/lib/ibex/frontend/generated_parser_includes.rb +61 -0
- data/lib/ibex/frontend/generated_parser_metadata.rb +61 -0
- data/lib/ibex/frontend/generated_parser_parameters.rb +60 -0
- data/lib/ibex/frontend/generation.rb +33 -0
- data/lib/ibex/frontend/lexer.rb +162 -10
- data/lib/ibex/frontend/lexer_recovery.rb +84 -0
- data/lib/ibex/frontend/parser/declarations.rb +247 -11
- data/lib/ibex/frontend/parser/parameters.rb +82 -0
- data/lib/ibex/frontend/parser/rules.rb +43 -6
- data/lib/ibex/frontend/parser.rb +182 -4
- data/lib/ibex/frontend/regenerator.rb +26 -1
- data/lib/ibex/frontend/resolution.rb +69 -0
- data/lib/ibex/frontend/resolver.rb +217 -0
- data/lib/ibex/frontend/rule_documentation.rb +103 -0
- data/lib/ibex/frontend/source_cursor.rb +132 -8
- data/lib/ibex/frontend/source_document.rb +229 -0
- data/lib/ibex/frontend/source_loader.rb +150 -0
- data/lib/ibex/frontend/source_span.rb +81 -0
- data/lib/ibex/frontend/token_adapter/declaration_document_state.rb +47 -0
- data/lib/ibex/frontend/token_adapter/declaration_lexer_state.rb +83 -0
- data/lib/ibex/frontend/token_adapter/declaration_state.rb +216 -26
- data/lib/ibex/frontend/token_adapter/delimiter_tracker.rb +8 -2
- data/lib/ibex/frontend/token_adapter/rule_state.rb +60 -2
- data/lib/ibex/frontend/token_adapter.rb +8 -3
- data/lib/ibex/frontend.rb +13 -2
- data/lib/ibex/generation_input.rb +57 -0
- data/lib/ibex/generation_manifest.rb +200 -0
- data/lib/ibex/generation_transaction.rb +261 -0
- data/lib/ibex/generation_transaction_recovery.rb +109 -0
- data/lib/ibex/generation_transaction_validation.rb +196 -0
- data/lib/ibex/grammar_tests.rb +206 -0
- data/lib/ibex/ir/automaton_ir.rb +38 -5
- data/lib/ibex/ir/grammar_ir.rb +137 -24
- data/lib/ibex/ir/lexer_ir.rb +76 -0
- data/lib/ibex/ir/migration.rb +120 -0
- data/lib/ibex/ir/serialize.rb +110 -19
- data/lib/ibex/ir/validator/automaton.rb +345 -0
- data/lib/ibex/ir/validator/base.rb +129 -0
- data/lib/ibex/ir/validator/grammar.rb +604 -0
- data/lib/ibex/ir/validator/lexer.rb +113 -0
- data/lib/ibex/ir/validator.rb +62 -0
- data/lib/ibex/ir.rb +57 -4
- data/lib/ibex/lalr/build_metrics.rb +23 -0
- data/lib/ibex/lalr/builder.rb +379 -52
- data/lib/ibex/lalr/conflict.rb +1 -0
- data/lib/ibex/lalr/conflict_search.rb +11 -5
- data/lib/ibex/lalr/counterexample.rb +20 -5
- data/lib/ibex/lalr/direct_lookaheads.rb +236 -0
- data/lib/ibex/lalr/ielr_partition.rb +152 -0
- data/lib/ibex/lalr/on_error_reductions.rb +74 -0
- data/lib/ibex/lalr.rb +7 -0
- data/lib/ibex/location.rb +129 -0
- data/lib/ibex/lsp/document_handlers.rb +66 -0
- data/lib/ibex/lsp/document_store.rb +264 -0
- data/lib/ibex/lsp/document_store_diagnostics.rb +44 -0
- data/lib/ibex/lsp/document_store_validation.rb +61 -0
- data/lib/ibex/lsp/initialization_handlers.rb +78 -0
- data/lib/ibex/lsp/navigation_handlers.rb +56 -0
- data/lib/ibex/lsp/position_codec.rb +109 -0
- data/lib/ibex/lsp/protocol_error.rb +33 -0
- data/lib/ibex/lsp/request_handlers.rb +45 -0
- data/lib/ibex/lsp/request_support.rb +87 -0
- data/lib/ibex/lsp/server.rb +146 -0
- data/lib/ibex/lsp/symbol_index.rb +241 -0
- data/lib/ibex/lsp/symbol_index_builder.rb +267 -0
- data/lib/ibex/lsp/symbol_index_precedence_references.rb +44 -0
- data/lib/ibex/lsp/symbol_index_source_queries.rb +61 -0
- data/lib/ibex/lsp/symbol_occurrence.rb +17 -0
- data/lib/ibex/lsp/transport.rb +118 -0
- data/lib/ibex/lsp/workspace.rb +127 -0
- data/lib/ibex/lsp/workspace_analyzer.rb +199 -0
- data/lib/ibex/lsp.rb +32 -0
- data/lib/ibex/normalize/declarations.rb +140 -7
- data/lib/ibex/normalize/diagnostics.rb +50 -5
- data/lib/ibex/normalize/expander.rb +59 -55
- data/lib/ibex/normalize/expression.rb +60 -39
- data/lib/ibex/normalize/inline_expansion.rb +414 -0
- data/lib/ibex/normalize/inline_validation.rb +174 -0
- data/lib/ibex/normalize/lexer.rb +131 -0
- data/lib/ibex/normalize/named_references.rb +60 -0
- data/lib/ibex/normalize/nodes.rb +46 -0
- data/lib/ibex/normalize/parameter_ebnf_lowering.rb +69 -0
- data/lib/ibex/normalize/parameter_lowering.rb +126 -0
- data/lib/ibex/normalize/parameter_substitution.rb +125 -0
- data/lib/ibex/normalize/parameter_validation.rb +140 -0
- data/lib/ibex/normalize/parameters.rb +199 -0
- data/lib/ibex/normalize/recovery_declarations.rb +84 -0
- data/lib/ibex/normalize.rb +179 -14
- data/lib/ibex/racc_migration/checker.rb +122 -0
- data/lib/ibex/racc_migration/harness.rb +177 -0
- data/lib/ibex/racc_migration/report.rb +94 -0
- data/lib/ibex/racc_migration.rb +12 -0
- data/lib/ibex/rake_task.rb +116 -0
- data/lib/ibex/samples.rb +186 -0
- data/lib/ibex/table_simulation/result.rb +51 -0
- data/lib/ibex/table_simulation/simulator.rb +253 -0
- data/lib/ibex/table_simulation/step.rb +60 -0
- data/lib/ibex/table_simulation/text.rb +31 -0
- data/lib/ibex/table_simulation.rb +13 -0
- data/lib/ibex/tables.rb +9 -70
- data/lib/ibex/version.rb +1 -1
- data/lib/ibex/watch/runner.rb +172 -0
- data/lib/ibex/watch/source_snapshot.rb +93 -0
- data/lib/ibex/watch.rb +11 -0
- data/lib/ibex.rb +25 -1
- data/schema/automaton-ir-v1.schema.json +401 -0
- data/schema/automaton-ir-v2.schema.json +58 -0
- data/schema/benchmark-v1.schema.json +212 -0
- data/schema/benchmark-v2.schema.json +61 -0
- data/schema/cst-v1.json +170 -0
- data/schema/error-ux-v1.schema.json +258 -0
- data/schema/explain-v1.schema.json +433 -0
- data/schema/frontend-diagnostics-v1.schema.json +154 -0
- data/schema/generation-manifest-v1.schema.json +115 -0
- data/schema/grammar-ir-v1.schema.json +426 -0
- data/schema/grammar-ir-v2.schema.json +779 -0
- data/schema/lexer-ir-v1.schema.json +215 -0
- data/schema/migration-check-v1.schema.json +60 -0
- data/schema/performance-comparison-v1.schema.json +395 -0
- data/schema/public-performance-comparison-v1.schema.json +506 -0
- data/schema/public-performance-profile-v1.schema.json +360 -0
- data/schema/runtime-coverage-v1.schema.json +86 -0
- data/schema/runtime-event-v1.schema.json +308 -0
- data/schema/table-simulation-v1.schema.json +70 -0
- data/sig/ibex/artifact_set.rbs +37 -0
- data/sig/ibex/cli/ambiguity.rbs +22 -0
- data/sig/ibex/cli/counterexample_options.rbs +2 -0
- data/sig/ibex/cli/coverage.rbs +53 -0
- data/sig/ibex/cli/debug.rbs +28 -0
- data/sig/ibex/cli/diagnostics.rbs +38 -0
- data/sig/ibex/cli/documentation.rbs +25 -0
- data/sig/ibex/cli/error_messages.rbs +57 -0
- data/sig/ibex/cli/explain.rbs +25 -0
- data/sig/ibex/cli/formatting.rbs +103 -0
- data/sig/ibex/cli/generation_artifacts.rbs +50 -0
- data/sig/ibex/cli/generation_error_messages.rbs +19 -0
- data/sig/ibex/cli/grammar_tests.rbs +36 -0
- data/sig/ibex/cli/ir_tools.rbs +51 -0
- data/sig/ibex/cli/lsp.rbs +14 -0
- data/sig/ibex/cli/outputs.rbs +17 -0
- data/sig/ibex/cli/racc_migration.rbs +30 -0
- data/sig/ibex/cli/samples.rbs +30 -0
- data/sig/ibex/cli/watch.rbs +43 -0
- data/sig/ibex/cli.rbs +104 -5
- data/sig/ibex/codegen/action_locations.rbs +45 -0
- data/sig/ibex/codegen/action_method_source.rbs +65 -0
- data/sig/ibex/codegen/action_source.rbs +50 -0
- data/sig/ibex/codegen/ambiguity.rbs +60 -0
- data/sig/ibex/codegen/cst_metadata.rbs +59 -0
- data/sig/ibex/codegen/documentation.rbs +50 -0
- data/sig/ibex/codegen/explain.rbs +85 -0
- data/sig/ibex/codegen/generated_action_abi.rbs +101 -0
- data/sig/ibex/codegen/html.rbs +18 -2
- data/sig/ibex/codegen/mermaid.rbs +16 -0
- data/sig/ibex/codegen/railroad.rbs +82 -0
- data/sig/ibex/codegen/railroad_documentation.rbs +31 -0
- data/sig/ibex/codegen/rbs.rbs +84 -4
- data/sig/ibex/codegen/report.rbs +8 -0
- data/sig/ibex/codegen/ruby.rbs +97 -23
- data/sig/ibex/codegen/ruby_actions.rbs +54 -0
- data/sig/ibex/codegen/ruby_ast.rbs +34 -0
- data/sig/ibex/codegen/ruby_error_messages.rbs +16 -0
- data/sig/ibex/codegen/ruby_lexer.rbs +25 -0
- data/sig/ibex/codegen/ruby_syntax.rbs +25 -0
- data/sig/ibex/codegen/ruby_table_metadata.rbs +26 -0
- data/sig/ibex/codegen/ruby_value_printers.rbs +28 -0
- data/sig/ibex/coverage/collector.rbs +76 -0
- data/sig/ibex/coverage/event_stream.rbs +42 -0
- data/sig/ibex/coverage/report.rbs +100 -0
- data/sig/ibex/coverage/runtime_event_validator.rbs +68 -0
- data/sig/ibex/coverage.rbs +7 -0
- data/sig/ibex/error_messages/parser.rbs +58 -0
- data/sig/ibex/error_messages/parser_v2.rbs +67 -0
- data/sig/ibex/error_messages/renderer.rbs +23 -0
- data/sig/ibex/error_messages/sentence_search.rbs +80 -0
- data/sig/ibex/error_messages/update.rbs +43 -0
- data/sig/ibex/error_messages.rbs +85 -0
- data/sig/ibex/frontend/ast.rbs +208 -19
- data/sig/ibex/frontend/bootstrap_parser.rbs +11 -0
- data/sig/ibex/frontend/diagnostic.rbs +53 -0
- data/sig/ibex/frontend/diagnostic_recovery.rbs +98 -0
- data/sig/ibex/frontend/dsl.rbs +33 -4
- data/sig/ibex/frontend/formatter.rbs +135 -0
- data/sig/ibex/frontend/generated_parser.rbs +218 -68
- data/sig/ibex/frontend/generated_parser_base.rbs +61 -10
- data/sig/ibex/frontend/generated_parser_includes.rbs +23 -0
- data/sig/ibex/frontend/generated_parser_metadata.rbs +23 -0
- data/sig/ibex/frontend/generated_parser_parameters.rbs +24 -0
- data/sig/ibex/frontend/generation.rbs +6 -0
- data/sig/ibex/frontend/lexer.rbs +49 -2
- data/sig/ibex/frontend/lexer_recovery.rbs +25 -0
- data/sig/ibex/frontend/parser/declarations.rbs +54 -0
- data/sig/ibex/frontend/parser/parameters.rbs +28 -0
- data/sig/ibex/frontend/parser/rules.rbs +3 -0
- data/sig/ibex/frontend/parser.rbs +66 -0
- data/sig/ibex/frontend/regenerator.rbs +11 -0
- data/sig/ibex/frontend/resolution.rbs +33 -0
- data/sig/ibex/frontend/resolver.rbs +91 -0
- data/sig/ibex/frontend/rule_documentation.rbs +42 -0
- data/sig/ibex/frontend/source_cursor.rbs +36 -3
- data/sig/ibex/frontend/source_document.rbs +119 -0
- data/sig/ibex/frontend/source_loader.rbs +66 -0
- data/sig/ibex/frontend/source_span.rbs +53 -0
- data/sig/ibex/frontend/token_adapter/declaration_document_state.rbs +21 -0
- data/sig/ibex/frontend/token_adapter/declaration_lexer_state.rbs +27 -0
- data/sig/ibex/frontend/token_adapter/declaration_state.rbs +73 -5
- data/sig/ibex/frontend/token_adapter/rule_state.rbs +20 -0
- data/sig/ibex/frontend/token_adapter.rbs +5 -2
- data/sig/ibex/frontend.rbs +1 -1
- data/sig/ibex/generation_input.rbs +37 -0
- data/sig/ibex/generation_manifest.rbs +67 -0
- data/sig/ibex/generation_transaction.rbs +82 -0
- data/sig/ibex/generation_transaction_recovery.rbs +36 -0
- data/sig/ibex/generation_transaction_validation.rbs +65 -0
- data/sig/ibex/grammar_tests.rbs +93 -0
- data/sig/ibex/ir/automaton_ir.rbs +8 -2
- data/sig/ibex/ir/grammar_ir.rbs +75 -15
- data/sig/ibex/ir/lexer_ir.rbs +57 -0
- data/sig/ibex/ir/migration.rbs +34 -0
- data/sig/ibex/ir/serialize.rbs +23 -6
- data/sig/ibex/ir/validator/automaton.rbs +109 -0
- data/sig/ibex/ir/validator/base.rbs +65 -0
- data/sig/ibex/ir/validator/grammar.rbs +184 -0
- data/sig/ibex/ir/validator/lexer.rbs +37 -0
- data/sig/ibex/ir/validator.rbs +16 -0
- data/sig/ibex/ir.rbs +38 -4
- data/sig/ibex/lalr/build_metrics.rbs +20 -0
- data/sig/ibex/lalr/builder.rbs +95 -15
- data/sig/ibex/lalr/conflict_search.rbs +7 -3
- data/sig/ibex/lalr/counterexample.rbs +5 -2
- data/sig/ibex/lalr/direct_lookaheads.rbs +86 -0
- data/sig/ibex/lalr/ielr_partition.rbs +59 -0
- data/sig/ibex/lalr/on_error_reductions.rbs +22 -0
- data/sig/ibex/lalr.rbs +6 -0
- data/sig/ibex/location.rbs +67 -0
- data/sig/ibex/lsp/document_handlers.rbs +24 -0
- data/sig/ibex/lsp/document_store.rbs +94 -0
- data/sig/ibex/lsp/document_store_diagnostics.rbs +20 -0
- data/sig/ibex/lsp/document_store_validation.rbs +26 -0
- data/sig/ibex/lsp/initialization_handlers.rbs +30 -0
- data/sig/ibex/lsp/navigation_handlers.rbs +30 -0
- data/sig/ibex/lsp/position_codec.rbs +40 -0
- data/sig/ibex/lsp/protocol_error.rbs +32 -0
- data/sig/ibex/lsp/request_handlers.rbs +26 -0
- data/sig/ibex/lsp/request_support.rbs +40 -0
- data/sig/ibex/lsp/server.rbs +55 -0
- data/sig/ibex/lsp/symbol_index.rbs +78 -0
- data/sig/ibex/lsp/symbol_index_builder.rbs +87 -0
- data/sig/ibex/lsp/symbol_index_precedence_references.rbs +18 -0
- data/sig/ibex/lsp/symbol_index_source_queries.rbs +26 -0
- data/sig/ibex/lsp/symbol_occurrence.rbs +25 -0
- data/sig/ibex/lsp/transport.rbs +35 -0
- data/sig/ibex/lsp/workspace.rbs +41 -0
- data/sig/ibex/lsp/workspace_analyzer.rbs +69 -0
- data/sig/ibex/lsp.rbs +7 -0
- data/sig/ibex/normalize/declarations.rbs +31 -0
- data/sig/ibex/normalize/diagnostics.rbs +9 -0
- data/sig/ibex/normalize/expander.rbs +20 -14
- data/sig/ibex/normalize/expression.rbs +10 -10
- data/sig/ibex/normalize/inline_expansion.rbs +120 -0
- data/sig/ibex/normalize/inline_validation.rbs +40 -0
- data/sig/ibex/normalize/lexer.rbs +37 -0
- data/sig/ibex/normalize/named_references.rbs +20 -0
- data/sig/ibex/normalize/nodes.rbs +14 -0
- data/sig/ibex/normalize/parameter_ebnf_lowering.rbs +32 -0
- data/sig/ibex/normalize/parameter_lowering.rbs +35 -0
- data/sig/ibex/normalize/parameter_substitution.rbs +42 -0
- data/sig/ibex/normalize/parameter_validation.rbs +44 -0
- data/sig/ibex/normalize/parameters.rbs +46 -0
- data/sig/ibex/normalize/recovery_declarations.rbs +24 -0
- data/sig/ibex/normalize.rbs +123 -18
- data/sig/ibex/racc_migration/checker.rbs +36 -0
- data/sig/ibex/racc_migration/harness.rbs +16 -0
- data/sig/ibex/racc_migration/report.rbs +53 -0
- data/sig/ibex/racc_migration.rbs +8 -0
- data/sig/ibex/rake_task.rbs +51 -0
- data/sig/ibex/samples.rbs +51 -0
- data/sig/ibex/table_simulation/result.rbs +32 -0
- data/sig/ibex/table_simulation/simulator.rbs +98 -0
- data/sig/ibex/table_simulation/step.rbs +40 -0
- data/sig/ibex/table_simulation/text.rbs +14 -0
- data/sig/ibex/table_simulation.rbs +7 -0
- data/sig/ibex/tables.rbs +0 -26
- data/sig/ibex/watch/runner.rbs +48 -0
- data/sig/ibex/watch/source_snapshot.rbs +42 -0
- data/sig/ibex/watch.rbs +7 -0
- data/sig/ibex.rbs +2 -0
- metadata +301 -16
- data/.rubocop.yml +0 -43
- data/CHANGELOG.md +0 -30
- data/Rakefile +0 -25
- data/Steepfile +0 -10
- data/docs/compat-notes.md +0 -37
- data/docs/lexer-coverage.md +0 -14
- data/docs/phase10-extensions.md +0 -27
- data/gemfiles/Gemfile +0 -7
- data/gemfiles/Gemfile.lock +0 -98
- data/lib/ibex/frontend/grammar.y +0 -156
- data/lib/ibex/runtime/parser.rb +0 -360
- data/lib/ibex/runtime.rb +0 -8
- data/sig/ibex/runtime/parser.rbs +0 -167
- data/sig/ibex/runtime.rbs +0 -6
metadata
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ibex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yudai Takada
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
-
dependencies:
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: ibex-runtime
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 0.2.0
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 0.2.0
|
|
12
26
|
description: Ibex generates LR parsers from racc-compatible grammars without native
|
|
13
27
|
extensions.
|
|
14
28
|
email:
|
|
@@ -18,122 +32,393 @@ executables:
|
|
|
18
32
|
extensions: []
|
|
19
33
|
extra_rdoc_files: []
|
|
20
34
|
files:
|
|
21
|
-
- ".rubocop.yml"
|
|
22
|
-
- CHANGELOG.md
|
|
23
35
|
- LICENSE.txt
|
|
24
36
|
- README.md
|
|
25
|
-
- Rakefile
|
|
26
|
-
- Steepfile
|
|
27
37
|
- docs/architecture.md
|
|
28
|
-
- docs/
|
|
38
|
+
- docs/cst-migration.md
|
|
39
|
+
- docs/cst.md
|
|
40
|
+
- docs/development.md
|
|
41
|
+
- docs/editor-setup.md
|
|
42
|
+
- docs/error-ux.md
|
|
29
43
|
- docs/grammar-reference.md
|
|
30
|
-
- docs/lexer-
|
|
31
|
-
- docs/phase10-extensions.md
|
|
44
|
+
- docs/lexer-migration.md
|
|
32
45
|
- docs/racc-migration.md
|
|
46
|
+
- docs/release-readiness.md
|
|
47
|
+
- docs/stability.md
|
|
48
|
+
- examples/README.md
|
|
49
|
+
- examples/calculator.y
|
|
50
|
+
- examples/csv.y
|
|
51
|
+
- examples/ini.y
|
|
52
|
+
- examples/json.y
|
|
53
|
+
- examples/tiny_language.y
|
|
33
54
|
- exe/ibex
|
|
34
|
-
- gemfiles/Gemfile
|
|
35
|
-
- gemfiles/Gemfile.lock
|
|
36
55
|
- lib/ibex.rb
|
|
37
56
|
- lib/ibex/analysis.rb
|
|
38
57
|
- lib/ibex/analysis/sets.rb
|
|
58
|
+
- lib/ibex/artifact_set.rb
|
|
39
59
|
- lib/ibex/cli.rb
|
|
60
|
+
- lib/ibex/cli/ambiguity.rb
|
|
40
61
|
- lib/ibex/cli/counterexample_options.rb
|
|
62
|
+
- lib/ibex/cli/coverage.rb
|
|
63
|
+
- lib/ibex/cli/debug.rb
|
|
64
|
+
- lib/ibex/cli/diagnostics.rb
|
|
65
|
+
- lib/ibex/cli/documentation.rb
|
|
66
|
+
- lib/ibex/cli/error_messages.rb
|
|
67
|
+
- lib/ibex/cli/explain.rb
|
|
68
|
+
- lib/ibex/cli/formatting.rb
|
|
69
|
+
- lib/ibex/cli/generation_artifacts.rb
|
|
70
|
+
- lib/ibex/cli/generation_error_messages.rb
|
|
71
|
+
- lib/ibex/cli/grammar_tests.rb
|
|
72
|
+
- lib/ibex/cli/ir_tools.rb
|
|
73
|
+
- lib/ibex/cli/lsp.rb
|
|
41
74
|
- lib/ibex/cli/outputs.rb
|
|
75
|
+
- lib/ibex/cli/racc_migration.rb
|
|
76
|
+
- lib/ibex/cli/samples.rb
|
|
77
|
+
- lib/ibex/cli/watch.rb
|
|
78
|
+
- lib/ibex/codegen/action_locations.rb
|
|
79
|
+
- lib/ibex/codegen/action_method_source.rb
|
|
80
|
+
- lib/ibex/codegen/action_source.rb
|
|
81
|
+
- lib/ibex/codegen/ambiguity.rb
|
|
82
|
+
- lib/ibex/codegen/cst_metadata.rb
|
|
83
|
+
- lib/ibex/codegen/documentation.rb
|
|
42
84
|
- lib/ibex/codegen/dot.rb
|
|
85
|
+
- lib/ibex/codegen/explain.rb
|
|
86
|
+
- lib/ibex/codegen/generated_action_abi.rb
|
|
43
87
|
- lib/ibex/codegen/html.rb
|
|
88
|
+
- lib/ibex/codegen/mermaid.rb
|
|
89
|
+
- lib/ibex/codegen/railroad.rb
|
|
90
|
+
- lib/ibex/codegen/railroad_documentation.rb
|
|
44
91
|
- lib/ibex/codegen/rbs.rb
|
|
45
92
|
- lib/ibex/codegen/report.rb
|
|
46
93
|
- lib/ibex/codegen/ruby.rb
|
|
94
|
+
- lib/ibex/codegen/ruby_actions.rb
|
|
95
|
+
- lib/ibex/codegen/ruby_ast.rb
|
|
96
|
+
- lib/ibex/codegen/ruby_error_messages.rb
|
|
97
|
+
- lib/ibex/codegen/ruby_lexer.rb
|
|
98
|
+
- lib/ibex/codegen/ruby_syntax.rb
|
|
99
|
+
- lib/ibex/codegen/ruby_table_metadata.rb
|
|
100
|
+
- lib/ibex/codegen/ruby_value_printers.rb
|
|
47
101
|
- lib/ibex/codegen/symbol_labels.rb
|
|
102
|
+
- lib/ibex/coverage.rb
|
|
103
|
+
- lib/ibex/coverage/collector.rb
|
|
104
|
+
- lib/ibex/coverage/event_stream.rb
|
|
105
|
+
- lib/ibex/coverage/report.rb
|
|
106
|
+
- lib/ibex/coverage/runtime_event_validator.rb
|
|
48
107
|
- lib/ibex/error.rb
|
|
108
|
+
- lib/ibex/error_messages.rb
|
|
109
|
+
- lib/ibex/error_messages/parser.rb
|
|
110
|
+
- lib/ibex/error_messages/parser_v2.rb
|
|
111
|
+
- lib/ibex/error_messages/renderer.rb
|
|
112
|
+
- lib/ibex/error_messages/sentence_search.rb
|
|
113
|
+
- lib/ibex/error_messages/update.rb
|
|
49
114
|
- lib/ibex/frontend.rb
|
|
50
115
|
- lib/ibex/frontend/action_scanner.rb
|
|
51
116
|
- lib/ibex/frontend/ast.rb
|
|
52
117
|
- lib/ibex/frontend/bootstrap_parser.rb
|
|
118
|
+
- lib/ibex/frontend/diagnostic.rb
|
|
119
|
+
- lib/ibex/frontend/diagnostic_recovery.rb
|
|
53
120
|
- lib/ibex/frontend/dsl.rb
|
|
121
|
+
- lib/ibex/frontend/formatter.rb
|
|
54
122
|
- lib/ibex/frontend/generated_parser.rb
|
|
55
123
|
- lib/ibex/frontend/generated_parser_base.rb
|
|
56
|
-
- lib/ibex/frontend/
|
|
124
|
+
- lib/ibex/frontend/generated_parser_includes.rb
|
|
125
|
+
- lib/ibex/frontend/generated_parser_metadata.rb
|
|
126
|
+
- lib/ibex/frontend/generated_parser_parameters.rb
|
|
127
|
+
- lib/ibex/frontend/generation.rb
|
|
57
128
|
- lib/ibex/frontend/lexer.rb
|
|
129
|
+
- lib/ibex/frontend/lexer_recovery.rb
|
|
58
130
|
- lib/ibex/frontend/parser.rb
|
|
59
131
|
- lib/ibex/frontend/parser/declarations.rb
|
|
132
|
+
- lib/ibex/frontend/parser/parameters.rb
|
|
60
133
|
- lib/ibex/frontend/parser/rules.rb
|
|
61
134
|
- lib/ibex/frontend/regenerator.rb
|
|
135
|
+
- lib/ibex/frontend/resolution.rb
|
|
136
|
+
- lib/ibex/frontend/resolver.rb
|
|
137
|
+
- lib/ibex/frontend/rule_documentation.rb
|
|
62
138
|
- lib/ibex/frontend/source_cursor.rb
|
|
139
|
+
- lib/ibex/frontend/source_document.rb
|
|
140
|
+
- lib/ibex/frontend/source_loader.rb
|
|
141
|
+
- lib/ibex/frontend/source_span.rb
|
|
63
142
|
- lib/ibex/frontend/token_adapter.rb
|
|
143
|
+
- lib/ibex/frontend/token_adapter/declaration_document_state.rb
|
|
144
|
+
- lib/ibex/frontend/token_adapter/declaration_lexer_state.rb
|
|
64
145
|
- lib/ibex/frontend/token_adapter/declaration_state.rb
|
|
65
146
|
- lib/ibex/frontend/token_adapter/delimiter_tracker.rb
|
|
66
147
|
- lib/ibex/frontend/token_adapter/rule_state.rb
|
|
148
|
+
- lib/ibex/generation_input.rb
|
|
149
|
+
- lib/ibex/generation_manifest.rb
|
|
150
|
+
- lib/ibex/generation_transaction.rb
|
|
151
|
+
- lib/ibex/generation_transaction_recovery.rb
|
|
152
|
+
- lib/ibex/generation_transaction_validation.rb
|
|
153
|
+
- lib/ibex/grammar_tests.rb
|
|
67
154
|
- lib/ibex/ir.rb
|
|
68
155
|
- lib/ibex/ir/automaton_ir.rb
|
|
69
156
|
- lib/ibex/ir/grammar_ir.rb
|
|
157
|
+
- lib/ibex/ir/lexer_ir.rb
|
|
158
|
+
- lib/ibex/ir/migration.rb
|
|
70
159
|
- lib/ibex/ir/serialize.rb
|
|
160
|
+
- lib/ibex/ir/validator.rb
|
|
161
|
+
- lib/ibex/ir/validator/automaton.rb
|
|
162
|
+
- lib/ibex/ir/validator/base.rb
|
|
163
|
+
- lib/ibex/ir/validator/grammar.rb
|
|
164
|
+
- lib/ibex/ir/validator/lexer.rb
|
|
71
165
|
- lib/ibex/lalr.rb
|
|
166
|
+
- lib/ibex/lalr/build_metrics.rb
|
|
72
167
|
- lib/ibex/lalr/builder.rb
|
|
73
168
|
- lib/ibex/lalr/conflict.rb
|
|
74
169
|
- lib/ibex/lalr/conflict_search.rb
|
|
75
170
|
- lib/ibex/lalr/conflict_search_limits.rb
|
|
76
171
|
- lib/ibex/lalr/counterexample.rb
|
|
77
172
|
- lib/ibex/lalr/default_reductions.rb
|
|
173
|
+
- lib/ibex/lalr/direct_lookaheads.rb
|
|
174
|
+
- lib/ibex/lalr/ielr_partition.rb
|
|
175
|
+
- lib/ibex/lalr/on_error_reductions.rb
|
|
176
|
+
- lib/ibex/location.rb
|
|
177
|
+
- lib/ibex/lsp.rb
|
|
178
|
+
- lib/ibex/lsp/document_handlers.rb
|
|
179
|
+
- lib/ibex/lsp/document_store.rb
|
|
180
|
+
- lib/ibex/lsp/document_store_diagnostics.rb
|
|
181
|
+
- lib/ibex/lsp/document_store_validation.rb
|
|
182
|
+
- lib/ibex/lsp/initialization_handlers.rb
|
|
183
|
+
- lib/ibex/lsp/navigation_handlers.rb
|
|
184
|
+
- lib/ibex/lsp/position_codec.rb
|
|
185
|
+
- lib/ibex/lsp/protocol_error.rb
|
|
186
|
+
- lib/ibex/lsp/request_handlers.rb
|
|
187
|
+
- lib/ibex/lsp/request_support.rb
|
|
188
|
+
- lib/ibex/lsp/server.rb
|
|
189
|
+
- lib/ibex/lsp/symbol_index.rb
|
|
190
|
+
- lib/ibex/lsp/symbol_index_builder.rb
|
|
191
|
+
- lib/ibex/lsp/symbol_index_precedence_references.rb
|
|
192
|
+
- lib/ibex/lsp/symbol_index_source_queries.rb
|
|
193
|
+
- lib/ibex/lsp/symbol_occurrence.rb
|
|
194
|
+
- lib/ibex/lsp/transport.rb
|
|
195
|
+
- lib/ibex/lsp/workspace.rb
|
|
196
|
+
- lib/ibex/lsp/workspace_analyzer.rb
|
|
78
197
|
- lib/ibex/normalize.rb
|
|
79
198
|
- lib/ibex/normalize/declarations.rb
|
|
80
199
|
- lib/ibex/normalize/diagnostics.rb
|
|
81
200
|
- lib/ibex/normalize/expander.rb
|
|
82
201
|
- lib/ibex/normalize/expression.rb
|
|
83
|
-
- lib/ibex/
|
|
84
|
-
- lib/ibex/
|
|
202
|
+
- lib/ibex/normalize/inline_expansion.rb
|
|
203
|
+
- lib/ibex/normalize/inline_validation.rb
|
|
204
|
+
- lib/ibex/normalize/lexer.rb
|
|
205
|
+
- lib/ibex/normalize/named_references.rb
|
|
206
|
+
- lib/ibex/normalize/nodes.rb
|
|
207
|
+
- lib/ibex/normalize/parameter_ebnf_lowering.rb
|
|
208
|
+
- lib/ibex/normalize/parameter_lowering.rb
|
|
209
|
+
- lib/ibex/normalize/parameter_substitution.rb
|
|
210
|
+
- lib/ibex/normalize/parameter_validation.rb
|
|
211
|
+
- lib/ibex/normalize/parameters.rb
|
|
212
|
+
- lib/ibex/normalize/recovery_declarations.rb
|
|
213
|
+
- lib/ibex/racc_migration.rb
|
|
214
|
+
- lib/ibex/racc_migration/checker.rb
|
|
215
|
+
- lib/ibex/racc_migration/harness.rb
|
|
216
|
+
- lib/ibex/racc_migration/report.rb
|
|
217
|
+
- lib/ibex/rake_task.rb
|
|
218
|
+
- lib/ibex/samples.rb
|
|
219
|
+
- lib/ibex/table_simulation.rb
|
|
220
|
+
- lib/ibex/table_simulation/result.rb
|
|
221
|
+
- lib/ibex/table_simulation/simulator.rb
|
|
222
|
+
- lib/ibex/table_simulation/step.rb
|
|
223
|
+
- lib/ibex/table_simulation/text.rb
|
|
85
224
|
- lib/ibex/tables.rb
|
|
86
225
|
- lib/ibex/version.rb
|
|
226
|
+
- lib/ibex/watch.rb
|
|
227
|
+
- lib/ibex/watch/runner.rb
|
|
228
|
+
- lib/ibex/watch/source_snapshot.rb
|
|
229
|
+
- schema/automaton-ir-v1.schema.json
|
|
230
|
+
- schema/automaton-ir-v2.schema.json
|
|
231
|
+
- schema/benchmark-v1.schema.json
|
|
232
|
+
- schema/benchmark-v2.schema.json
|
|
233
|
+
- schema/cst-v1.json
|
|
234
|
+
- schema/error-ux-v1.schema.json
|
|
235
|
+
- schema/explain-v1.schema.json
|
|
236
|
+
- schema/frontend-diagnostics-v1.schema.json
|
|
237
|
+
- schema/generation-manifest-v1.schema.json
|
|
238
|
+
- schema/grammar-ir-v1.schema.json
|
|
239
|
+
- schema/grammar-ir-v2.schema.json
|
|
240
|
+
- schema/lexer-ir-v1.schema.json
|
|
241
|
+
- schema/migration-check-v1.schema.json
|
|
242
|
+
- schema/performance-comparison-v1.schema.json
|
|
243
|
+
- schema/public-performance-comparison-v1.schema.json
|
|
244
|
+
- schema/public-performance-profile-v1.schema.json
|
|
245
|
+
- schema/runtime-coverage-v1.schema.json
|
|
246
|
+
- schema/runtime-event-v1.schema.json
|
|
247
|
+
- schema/table-simulation-v1.schema.json
|
|
87
248
|
- sig/ibex.rbs
|
|
88
249
|
- sig/ibex/analysis.rbs
|
|
89
250
|
- sig/ibex/analysis/sets.rbs
|
|
251
|
+
- sig/ibex/artifact_set.rbs
|
|
90
252
|
- sig/ibex/cli.rbs
|
|
253
|
+
- sig/ibex/cli/ambiguity.rbs
|
|
91
254
|
- sig/ibex/cli/counterexample_options.rbs
|
|
255
|
+
- sig/ibex/cli/coverage.rbs
|
|
256
|
+
- sig/ibex/cli/debug.rbs
|
|
257
|
+
- sig/ibex/cli/diagnostics.rbs
|
|
258
|
+
- sig/ibex/cli/documentation.rbs
|
|
259
|
+
- sig/ibex/cli/error_messages.rbs
|
|
260
|
+
- sig/ibex/cli/explain.rbs
|
|
261
|
+
- sig/ibex/cli/formatting.rbs
|
|
262
|
+
- sig/ibex/cli/generation_artifacts.rbs
|
|
263
|
+
- sig/ibex/cli/generation_error_messages.rbs
|
|
264
|
+
- sig/ibex/cli/grammar_tests.rbs
|
|
265
|
+
- sig/ibex/cli/ir_tools.rbs
|
|
266
|
+
- sig/ibex/cli/lsp.rbs
|
|
92
267
|
- sig/ibex/cli/outputs.rbs
|
|
268
|
+
- sig/ibex/cli/racc_migration.rbs
|
|
269
|
+
- sig/ibex/cli/samples.rbs
|
|
270
|
+
- sig/ibex/cli/watch.rbs
|
|
271
|
+
- sig/ibex/codegen/action_locations.rbs
|
|
272
|
+
- sig/ibex/codegen/action_method_source.rbs
|
|
273
|
+
- sig/ibex/codegen/action_source.rbs
|
|
274
|
+
- sig/ibex/codegen/ambiguity.rbs
|
|
275
|
+
- sig/ibex/codegen/cst_metadata.rbs
|
|
276
|
+
- sig/ibex/codegen/documentation.rbs
|
|
93
277
|
- sig/ibex/codegen/dot.rbs
|
|
278
|
+
- sig/ibex/codegen/explain.rbs
|
|
279
|
+
- sig/ibex/codegen/generated_action_abi.rbs
|
|
94
280
|
- sig/ibex/codegen/html.rbs
|
|
281
|
+
- sig/ibex/codegen/mermaid.rbs
|
|
282
|
+
- sig/ibex/codegen/railroad.rbs
|
|
283
|
+
- sig/ibex/codegen/railroad_documentation.rbs
|
|
95
284
|
- sig/ibex/codegen/rbs.rbs
|
|
96
285
|
- sig/ibex/codegen/report.rbs
|
|
97
286
|
- sig/ibex/codegen/ruby.rbs
|
|
287
|
+
- sig/ibex/codegen/ruby_actions.rbs
|
|
288
|
+
- sig/ibex/codegen/ruby_ast.rbs
|
|
289
|
+
- sig/ibex/codegen/ruby_error_messages.rbs
|
|
290
|
+
- sig/ibex/codegen/ruby_lexer.rbs
|
|
291
|
+
- sig/ibex/codegen/ruby_syntax.rbs
|
|
292
|
+
- sig/ibex/codegen/ruby_table_metadata.rbs
|
|
293
|
+
- sig/ibex/codegen/ruby_value_printers.rbs
|
|
98
294
|
- sig/ibex/codegen/symbol_labels.rbs
|
|
295
|
+
- sig/ibex/coverage.rbs
|
|
296
|
+
- sig/ibex/coverage/collector.rbs
|
|
297
|
+
- sig/ibex/coverage/event_stream.rbs
|
|
298
|
+
- sig/ibex/coverage/report.rbs
|
|
299
|
+
- sig/ibex/coverage/runtime_event_validator.rbs
|
|
99
300
|
- sig/ibex/error.rbs
|
|
301
|
+
- sig/ibex/error_messages.rbs
|
|
302
|
+
- sig/ibex/error_messages/parser.rbs
|
|
303
|
+
- sig/ibex/error_messages/parser_v2.rbs
|
|
304
|
+
- sig/ibex/error_messages/renderer.rbs
|
|
305
|
+
- sig/ibex/error_messages/sentence_search.rbs
|
|
306
|
+
- sig/ibex/error_messages/update.rbs
|
|
100
307
|
- sig/ibex/frontend.rbs
|
|
101
308
|
- sig/ibex/frontend/action_scanner.rbs
|
|
102
309
|
- sig/ibex/frontend/ast.rbs
|
|
103
310
|
- sig/ibex/frontend/bootstrap_parser.rbs
|
|
311
|
+
- sig/ibex/frontend/diagnostic.rbs
|
|
312
|
+
- sig/ibex/frontend/diagnostic_recovery.rbs
|
|
104
313
|
- sig/ibex/frontend/dsl.rbs
|
|
314
|
+
- sig/ibex/frontend/formatter.rbs
|
|
105
315
|
- sig/ibex/frontend/generated_parser.rbs
|
|
106
316
|
- sig/ibex/frontend/generated_parser_base.rbs
|
|
317
|
+
- sig/ibex/frontend/generated_parser_includes.rbs
|
|
318
|
+
- sig/ibex/frontend/generated_parser_metadata.rbs
|
|
319
|
+
- sig/ibex/frontend/generated_parser_parameters.rbs
|
|
320
|
+
- sig/ibex/frontend/generation.rbs
|
|
107
321
|
- sig/ibex/frontend/lexer.rbs
|
|
322
|
+
- sig/ibex/frontend/lexer_recovery.rbs
|
|
108
323
|
- sig/ibex/frontend/parser.rbs
|
|
109
324
|
- sig/ibex/frontend/parser/declarations.rbs
|
|
325
|
+
- sig/ibex/frontend/parser/parameters.rbs
|
|
110
326
|
- sig/ibex/frontend/parser/rules.rbs
|
|
111
327
|
- sig/ibex/frontend/regenerator.rbs
|
|
328
|
+
- sig/ibex/frontend/resolution.rbs
|
|
329
|
+
- sig/ibex/frontend/resolver.rbs
|
|
330
|
+
- sig/ibex/frontend/rule_documentation.rbs
|
|
112
331
|
- sig/ibex/frontend/source_cursor.rbs
|
|
332
|
+
- sig/ibex/frontend/source_document.rbs
|
|
333
|
+
- sig/ibex/frontend/source_loader.rbs
|
|
334
|
+
- sig/ibex/frontend/source_span.rbs
|
|
113
335
|
- sig/ibex/frontend/token_adapter.rbs
|
|
336
|
+
- sig/ibex/frontend/token_adapter/declaration_document_state.rbs
|
|
337
|
+
- sig/ibex/frontend/token_adapter/declaration_lexer_state.rbs
|
|
114
338
|
- sig/ibex/frontend/token_adapter/declaration_state.rbs
|
|
115
339
|
- sig/ibex/frontend/token_adapter/delimiter_tracker.rbs
|
|
116
340
|
- sig/ibex/frontend/token_adapter/rule_state.rbs
|
|
341
|
+
- sig/ibex/generation_input.rbs
|
|
342
|
+
- sig/ibex/generation_manifest.rbs
|
|
343
|
+
- sig/ibex/generation_transaction.rbs
|
|
344
|
+
- sig/ibex/generation_transaction_recovery.rbs
|
|
345
|
+
- sig/ibex/generation_transaction_validation.rbs
|
|
346
|
+
- sig/ibex/grammar_tests.rbs
|
|
117
347
|
- sig/ibex/ir.rbs
|
|
118
348
|
- sig/ibex/ir/automaton_ir.rbs
|
|
119
349
|
- sig/ibex/ir/grammar_ir.rbs
|
|
350
|
+
- sig/ibex/ir/lexer_ir.rbs
|
|
351
|
+
- sig/ibex/ir/migration.rbs
|
|
120
352
|
- sig/ibex/ir/serialize.rbs
|
|
353
|
+
- sig/ibex/ir/validator.rbs
|
|
354
|
+
- sig/ibex/ir/validator/automaton.rbs
|
|
355
|
+
- sig/ibex/ir/validator/base.rbs
|
|
356
|
+
- sig/ibex/ir/validator/grammar.rbs
|
|
357
|
+
- sig/ibex/ir/validator/lexer.rbs
|
|
121
358
|
- sig/ibex/lalr.rbs
|
|
359
|
+
- sig/ibex/lalr/build_metrics.rbs
|
|
122
360
|
- sig/ibex/lalr/builder.rbs
|
|
123
361
|
- sig/ibex/lalr/conflict.rbs
|
|
124
362
|
- sig/ibex/lalr/conflict_search.rbs
|
|
125
363
|
- sig/ibex/lalr/conflict_search_limits.rbs
|
|
126
364
|
- sig/ibex/lalr/counterexample.rbs
|
|
127
365
|
- sig/ibex/lalr/default_reductions.rbs
|
|
366
|
+
- sig/ibex/lalr/direct_lookaheads.rbs
|
|
367
|
+
- sig/ibex/lalr/ielr_partition.rbs
|
|
368
|
+
- sig/ibex/lalr/on_error_reductions.rbs
|
|
369
|
+
- sig/ibex/location.rbs
|
|
370
|
+
- sig/ibex/lsp.rbs
|
|
371
|
+
- sig/ibex/lsp/document_handlers.rbs
|
|
372
|
+
- sig/ibex/lsp/document_store.rbs
|
|
373
|
+
- sig/ibex/lsp/document_store_diagnostics.rbs
|
|
374
|
+
- sig/ibex/lsp/document_store_validation.rbs
|
|
375
|
+
- sig/ibex/lsp/initialization_handlers.rbs
|
|
376
|
+
- sig/ibex/lsp/navigation_handlers.rbs
|
|
377
|
+
- sig/ibex/lsp/position_codec.rbs
|
|
378
|
+
- sig/ibex/lsp/protocol_error.rbs
|
|
379
|
+
- sig/ibex/lsp/request_handlers.rbs
|
|
380
|
+
- sig/ibex/lsp/request_support.rbs
|
|
381
|
+
- sig/ibex/lsp/server.rbs
|
|
382
|
+
- sig/ibex/lsp/symbol_index.rbs
|
|
383
|
+
- sig/ibex/lsp/symbol_index_builder.rbs
|
|
384
|
+
- sig/ibex/lsp/symbol_index_precedence_references.rbs
|
|
385
|
+
- sig/ibex/lsp/symbol_index_source_queries.rbs
|
|
386
|
+
- sig/ibex/lsp/symbol_occurrence.rbs
|
|
387
|
+
- sig/ibex/lsp/transport.rbs
|
|
388
|
+
- sig/ibex/lsp/workspace.rbs
|
|
389
|
+
- sig/ibex/lsp/workspace_analyzer.rbs
|
|
128
390
|
- sig/ibex/normalize.rbs
|
|
129
391
|
- sig/ibex/normalize/declarations.rbs
|
|
130
392
|
- sig/ibex/normalize/diagnostics.rbs
|
|
131
393
|
- sig/ibex/normalize/expander.rbs
|
|
132
394
|
- sig/ibex/normalize/expression.rbs
|
|
133
|
-
- sig/ibex/
|
|
134
|
-
- sig/ibex/
|
|
395
|
+
- sig/ibex/normalize/inline_expansion.rbs
|
|
396
|
+
- sig/ibex/normalize/inline_validation.rbs
|
|
397
|
+
- sig/ibex/normalize/lexer.rbs
|
|
398
|
+
- sig/ibex/normalize/named_references.rbs
|
|
399
|
+
- sig/ibex/normalize/nodes.rbs
|
|
400
|
+
- sig/ibex/normalize/parameter_ebnf_lowering.rbs
|
|
401
|
+
- sig/ibex/normalize/parameter_lowering.rbs
|
|
402
|
+
- sig/ibex/normalize/parameter_substitution.rbs
|
|
403
|
+
- sig/ibex/normalize/parameter_validation.rbs
|
|
404
|
+
- sig/ibex/normalize/parameters.rbs
|
|
405
|
+
- sig/ibex/normalize/recovery_declarations.rbs
|
|
406
|
+
- sig/ibex/racc_migration.rbs
|
|
407
|
+
- sig/ibex/racc_migration/checker.rbs
|
|
408
|
+
- sig/ibex/racc_migration/harness.rbs
|
|
409
|
+
- sig/ibex/racc_migration/report.rbs
|
|
410
|
+
- sig/ibex/rake_task.rbs
|
|
411
|
+
- sig/ibex/samples.rbs
|
|
412
|
+
- sig/ibex/table_simulation.rbs
|
|
413
|
+
- sig/ibex/table_simulation/result.rbs
|
|
414
|
+
- sig/ibex/table_simulation/simulator.rbs
|
|
415
|
+
- sig/ibex/table_simulation/step.rbs
|
|
416
|
+
- sig/ibex/table_simulation/text.rbs
|
|
135
417
|
- sig/ibex/tables.rbs
|
|
136
418
|
- sig/ibex/version.rbs
|
|
419
|
+
- sig/ibex/watch.rbs
|
|
420
|
+
- sig/ibex/watch/runner.rbs
|
|
421
|
+
- sig/ibex/watch/source_snapshot.rbs
|
|
137
422
|
homepage: https://github.com/ydah/ibex
|
|
138
423
|
licenses:
|
|
139
424
|
- MIT
|
data/.rubocop.yml
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
AllCops:
|
|
2
|
-
CacheRootDirectory: tmp/rubocop_cache
|
|
3
|
-
NewCops: enable
|
|
4
|
-
TargetRubyVersion: 3.0
|
|
5
|
-
SuggestExtensions: false
|
|
6
|
-
Exclude:
|
|
7
|
-
- "pkg/**/*"
|
|
8
|
-
- "tmp/**/*"
|
|
9
|
-
- "vendor/**/*"
|
|
10
|
-
- "lib/ibex/frontend/generated_parser.rb"
|
|
11
|
-
|
|
12
|
-
Layout/LineLength:
|
|
13
|
-
Max: 120
|
|
14
|
-
|
|
15
|
-
Layout/LeadingCommentSpace:
|
|
16
|
-
AllowRBSInlineAnnotation: true
|
|
17
|
-
|
|
18
|
-
Style/StringLiterals:
|
|
19
|
-
EnforcedStyle: double_quotes
|
|
20
|
-
|
|
21
|
-
Metrics/AbcSize:
|
|
22
|
-
Max: 36
|
|
23
|
-
|
|
24
|
-
Metrics/ClassLength:
|
|
25
|
-
Max: 200
|
|
26
|
-
|
|
27
|
-
Metrics/CyclomaticComplexity:
|
|
28
|
-
Max: 10
|
|
29
|
-
|
|
30
|
-
Metrics/MethodLength:
|
|
31
|
-
Max: 30
|
|
32
|
-
|
|
33
|
-
Metrics/ModuleLength:
|
|
34
|
-
Max: 150
|
|
35
|
-
|
|
36
|
-
Metrics/ParameterLists:
|
|
37
|
-
Max: 12
|
|
38
|
-
|
|
39
|
-
Metrics/PerceivedComplexity:
|
|
40
|
-
Max: 10
|
|
41
|
-
|
|
42
|
-
Style/Documentation:
|
|
43
|
-
Enabled: false
|
data/CHANGELOG.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Unreleased
|
|
4
|
-
|
|
5
|
-
- Establish the Pure Ruby gem, Minitest, lint, CI, and CLI foundations.
|
|
6
|
-
- Add a table-driven Pure Ruby LR runtime with pull/push APIs, recovery, and tracing.
|
|
7
|
-
- Tokenize grammar files with positions, opaque Ruby actions, comments, and user-code blocks.
|
|
8
|
-
- Parse compatible and extended grammar syntax into a serializable, location-preserving AST.
|
|
9
|
-
- Normalize grammars into immutable, versioned JSON IR with EBNF expansion and diagnostics.
|
|
10
|
-
- Compute nullable, FIRST, and FOLLOW sets with deterministic integer bitsets.
|
|
11
|
-
- Build deterministic LALR(1) automata, resolve and retain conflicts, and render state reports.
|
|
12
|
-
- Generate plain or compact Ruby parsers with embedded runtime and source-line mapping support.
|
|
13
|
-
- Preserve per-block user-code source maps through IR and implement compatible default, all-code, and disabled line conversion.
|
|
14
|
-
- Complete the compatible CLI surface and add optional racc black-box result comparisons.
|
|
15
|
-
- Add extended EBNF/named-reference integration, source-facing EBNF labels in text/DOT/HTML reports, and resumable IR pipelines.
|
|
16
|
-
- Add selectable SLR, LALR(1), and canonical LR(1) construction strategies.
|
|
17
|
-
- Add a Ruby DSL frontend that converges on the existing Grammar AST and IR pipeline.
|
|
18
|
-
- Add unifying conflict counterexamples with complete competing derivation trees and bounded nonunifying fallback.
|
|
19
|
-
- Add generated parser RBS output, shipped runtime signatures, and strict structured grammar diagnostics.
|
|
20
|
-
- Expand generated signatures and Steep checking to every library source, including concrete frontend/IR/LALR/codegen/CLI domain
|
|
21
|
-
types and the self-hosted parser.
|
|
22
|
-
- Support quoted, interpolated, and multiple Ruby heredocs plus recursively nested grouped EBNF.
|
|
23
|
-
- Define unknown external tokens to invoke `on_error` before yacc-style recovery.
|
|
24
|
-
- Add post-commit shift, reduction, and successful-recovery observation hooks to the runtime.
|
|
25
|
-
- Add complete quickstart, grammar, migration, architecture, and extension documentation with an executable README test.
|
|
26
|
-
- Self-host the grammar frontend from a committed Ibex grammar with deterministic regeneration and bootstrap parity checks.
|
|
27
|
-
- Version generated parser tables and reject missing or unsupported formats before consuming input.
|
|
28
|
-
- Add grammar-local `pragma extended` selection and document the action and named-reference boundary inside EBNF groups.
|
|
29
|
-
- Add fixed-seed pipeline properties, versioned Grammar/Automaton IR fixtures, and a reproducible whole-builder benchmark.
|
|
30
|
-
- Keep the whole-library Steep statistics in the README synchronized and enforce them in CI.
|
data/Rakefile
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "bundler/gem_tasks"
|
|
4
|
-
require "rake/testtask"
|
|
5
|
-
require "rubocop/rake_task"
|
|
6
|
-
|
|
7
|
-
Rake::TestTask.new(:test) do |task|
|
|
8
|
-
task.libs << "test"
|
|
9
|
-
task.pattern = "test/**/*_test.rb"
|
|
10
|
-
task.warning = true
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
RuboCop::RakeTask.new(:lint)
|
|
14
|
-
|
|
15
|
-
namespace :frontend do
|
|
16
|
-
desc "Regenerate the self-hosted grammar parser"
|
|
17
|
-
task :generate do
|
|
18
|
-
require_relative "lib/ibex/frontend/regenerator"
|
|
19
|
-
|
|
20
|
-
output = File.expand_path("lib/ibex/frontend/generated_parser.rb", __dir__)
|
|
21
|
-
File.write(output, Ibex::Frontend::Regenerator.generate)
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
task default: %i[test lint]
|
data/Steepfile
DELETED
data/docs/compat-notes.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Compatibility notes
|
|
2
|
-
|
|
3
|
-
Compatibility observations are recorded here without consulting racc implementation sources or generated source text.
|
|
4
|
-
|
|
5
|
-
## Observed CLI (2026-07-22)
|
|
6
|
-
|
|
7
|
-
Black-box command: `racc --help`, version 1.8.1.
|
|
8
|
-
|
|
9
|
-
Observed options are `-o/--output-file`, `-t/--debug`, obsolete `-g`, `-v/--verbose`, `-O/--log-file`,
|
|
10
|
-
`-e/--executable`, `-E/--embedded`, `-F/--frozen`, `--line-convert-all`, `-l/--no-line-convert`,
|
|
11
|
-
`-a/--no-omit-actions`, `--superclass`, `-C/--check-only`, `-S/--output-status`, profiling `-P`, internal `-D`,
|
|
12
|
-
`--version`, `--runtime-version`, `--copyright`, and `--help`.
|
|
13
|
-
|
|
14
|
-
Ibex accepts that option set. `-P` and `-D` are accepted compatibility no-ops because they expose generator internals rather
|
|
15
|
-
than parser behavior. Frozen string literals are always emitted, so `-F` is also a no-op. Ibex's default output is `<input>.rb`
|
|
16
|
-
rather than racc's observed `<input>.tab.rb`; `-o` is portable between both tools.
|
|
17
|
-
|
|
18
|
-
## Behavioral probes
|
|
19
|
-
|
|
20
|
-
Self-authored grammars are compiled independently and the generated files are executed without inspecting them. Current probes
|
|
21
|
-
cover arithmetic precedence, empty rules, string tokens, `convert`, `no_result_var`, inline actions, dangling-else `expect`, and
|
|
22
|
-
a generated 500-production grammar. Precedence-resolved conflicts remain in Automaton IR diagnostics but are not counted in CLI
|
|
23
|
-
warnings or `expect`, matching the observed calculator behavior.
|
|
24
|
-
|
|
25
|
-
An inline action's own `val[0]` was observed as `nil`; its result occupies one value position visible to the final action. The
|
|
26
|
-
grammar reference confirms that `convert` takes a quoted string containing Ruby source: for example `NUM ':number'` emits the
|
|
27
|
-
symbol expression, while `NUM '"number"'` emits a Ruby string token.
|
|
28
|
-
|
|
29
|
-
Source-line probes with raises in self-authored `header`, `inner`, and `footer` blocks show three distinct modes. The default maps
|
|
30
|
-
semantic actions and `inner` code to the grammar file but leaves `header` and `footer` on generated-file lines.
|
|
31
|
-
`--line-convert-all` maps all three user-code sections, while `-l` leaves all of them on generated-file lines.
|
|
32
|
-
|
|
33
|
-
With an explicitly declared but syntactically invalid `BAD` token, error recovery results and `on_error` observations (token
|
|
34
|
-
string, value, and value-stack length) match. An undeclared `:BAD` was observed to enter racc's `error` production without an
|
|
35
|
-
`on_error` callback. Ibex intentionally treats it as an unknown lookahead and calls `on_error` before attempting the same error
|
|
36
|
-
recovery flow. This preserves the unexpected token object and value for logging and application policy instead of silently
|
|
37
|
-
entering recovery.
|
data/docs/lexer-coverage.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Lexer coverage
|
|
2
|
-
|
|
3
|
-
| Construct | Status | Notes |
|
|
4
|
-
|---|---|---|
|
|
5
|
-
| Nested action braces | Supported | Balanced recursively |
|
|
6
|
-
| Single, double, and backtick strings | Supported | Escapes and `#{...}` interpolation are skipped |
|
|
7
|
-
| `%q`, `%Q`, `%w`, `%W`, `%i`, `%I`, `%x`, `%r`, `%s` | Supported | Paired and single-character delimiters |
|
|
8
|
-
| Regular expressions | Supported | Conservative expression-prefix heuristic; character classes and flags supported |
|
|
9
|
-
| `#` comments and `?x` characters | Supported | Ignored for brace balancing |
|
|
10
|
-
| `<<ID`, `<<-ID`, `<<~ID` heredocs | Supported | Terminators obey indentation mode |
|
|
11
|
-
| Single/double/backtick quoted heredocs | Supported | Quoted identifiers may contain any non-quote, non-newline text |
|
|
12
|
-
| Interpolated and multiple heredocs | Supported | Bodies are opaque; multiple openers on one line are consumed in order |
|
|
13
|
-
| Grammar `#` and `/* ... */` comments | Supported | Removed before tokenization |
|
|
14
|
-
| `---- header`, `inner`, `footer` | Supported | Must begin in column one; order and duplicates retained |
|
data/docs/phase10-extensions.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Phase 10 extensions
|
|
2
|
-
|
|
3
|
-
## E3: conflict witnesses
|
|
4
|
-
|
|
5
|
-
`Ibex::LALR::Counterexample` accepts only Automaton IR. It explores parser-stack configurations, forces each pair of competing
|
|
6
|
-
actions at the requested conflict, and then searches for a common suffix that lets both branches accept the same terminal
|
|
7
|
-
sentence. A successful result contains `unifying: true`, the conflict lookahead position, and both complete derivation trees.
|
|
8
|
-
|
|
9
|
-
Because unifying-counterexample search is not guaranteed to terminate for every context-free grammar, the search has explicit
|
|
10
|
-
token and configuration budgets. The defaults are 32 tokens and 50,000 explored configurations. Pass `max_tokens:` and
|
|
11
|
-
`max_configurations:` to `Ibex::LALR::Counterexample.new` or `Ibex::Codegen::Report.render` to adjust them through the Ruby API.
|
|
12
|
-
For generated reports, use the positive-integer CLI options `--counterexample-max-tokens=N` and
|
|
13
|
-
`--counterexample-max-configurations=N`; either option also requests a report. The token budget covers each unifying-search
|
|
14
|
-
candidate and any returned unifying counterexample, including a non-EOF conflict lookahead; the EOF marker does not consume a
|
|
15
|
-
token. If no common sentence is found within those budgets, the result is marked `unifying: false` and contains the deterministic
|
|
16
|
-
shortest reachability witness, which may exceed the unifying-search token budget. This distinction prevents a nonunifying
|
|
17
|
-
diagnostic from being presented as proof of ambiguity.
|
|
18
|
-
|
|
19
|
-
## E7: Ruby DSL
|
|
20
|
-
|
|
21
|
-
`Ibex::Frontend::DSL.grammar` constructs the existing AST with synthetic locations and joins the normal pipeline at Normalizer.
|
|
22
|
-
Text and DSL inputs therefore share symbol classification, EBNF expansion, validation, algorithms, and outputs.
|
|
23
|
-
|
|
24
|
-
## E9: construction algorithms
|
|
25
|
-
|
|
26
|
-
The builder first constructs canonical LR(1). `lr1` retains the states, `lalr` merges equal LR(0) cores, and `slr` applies FOLLOW
|
|
27
|
-
sets to completed items in the LR(0) states. All strategies use the same conflict resolver and Automaton IR.
|