flexr 1.1.0 → 1.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.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/CHANGELOG.md +116 -0
  4. data/CONTRIBUTING.md +13 -1
  5. data/README.md +6 -2
  6. data/Rakefile +41 -5
  7. data/Steepfile +7 -0
  8. data/benchmark/golden/calculator_lexer.rb +276 -0
  9. data/benchmark/golden/graphql_lexer.rb +310 -0
  10. data/benchmark/golden/json_lexer.rb +292 -0
  11. data/benchmark/golden/regexp_tokenizer.rb +293 -0
  12. data/benchmark/golden/ruby_subset_lexer.rb +280 -0
  13. data/benchmark/golden/sql_lexer.rb +293 -0
  14. data/benchmark/golden/toml_lexer.rb +292 -0
  15. data/benchmark/golden/toy_lang_lexer.rb +273 -0
  16. data/benchmark/golden/with_lrama_lexer.rb +264 -0
  17. data/benchmark/golden/with_racc_lexer.rb +264 -0
  18. data/benchmark/lrama_lexer.rb +165 -0
  19. data/benchmark/matrix.rb +79 -0
  20. data/benchmark/profile.rb +109 -0
  21. data/benchmark/run.rb +4 -1
  22. data/benchmark/state_dispatch.rb +78 -0
  23. data/docs/README.md +1 -2
  24. data/docs/RELEASING.md +9 -2
  25. data/docs/migration-v2.md +73 -0
  26. data/docs/perf-log.md +108 -0
  27. data/docs/reference/README.md +2 -0
  28. data/docs/reference/cli.md +71 -5
  29. data/docs/reference/compatibility.md +9 -2
  30. data/docs/reference/diagnostics.md +338 -0
  31. data/docs/reference/dsl.md +8 -5
  32. data/docs/reference/errors.md +28 -0
  33. data/docs/reference/generated-artifacts.md +11 -0
  34. data/docs/reference/public-api.md +32 -8
  35. data/docs/reference/regexp.md +19 -7
  36. data/docs/reference/ruby-lsp.md +34 -0
  37. data/docs/reference/testing.md +57 -0
  38. data/examples/graphql/README.md +14 -0
  39. data/examples/graphql/lexer.flexr.rb +29 -0
  40. data/examples/sql/README.md +16 -0
  41. data/examples/sql/lexer.flexr.rb +23 -0
  42. data/examples/toml/README.md +14 -0
  43. data/examples/toml/lexer.flexr.rb +23 -0
  44. data/gemfiles/ruby_lsp.gemfile +4 -0
  45. data/gemfiles/types.gemfile +7 -0
  46. data/lib/flexr/automaton/accel.rb +11 -1
  47. data/lib/flexr/automaton/analysis.rb +161 -7
  48. data/lib/flexr/automaton/compiler.rb +175 -24
  49. data/lib/flexr/cli.rb +117 -17
  50. data/lib/flexr/codegen/firstmatch.rb +1 -7
  51. data/lib/flexr/codegen/table.rb +2 -2
  52. data/lib/flexr/configuration.rb +8 -0
  53. data/lib/flexr/deprecations.rb +26 -0
  54. data/lib/flexr/diagnostics.rb +39 -3
  55. data/lib/flexr/dsl.rb +11 -9
  56. data/lib/flexr/errors.rb +6 -6
  57. data/lib/flexr/generated.rb +27 -15
  58. data/lib/flexr/generator.rb +44 -29
  59. data/lib/flexr/grammar.rb +41 -0
  60. data/lib/flexr/ir.rb +2 -2
  61. data/lib/flexr/migration.rb +31 -0
  62. data/lib/flexr/minitest.rb +24 -0
  63. data/lib/flexr/options.rb +4 -2
  64. data/lib/flexr/regexp/matcher.rb +26 -0
  65. data/lib/flexr/regexp/normalizer.rb +4 -8
  66. data/lib/flexr/regexp/parser.rb +127 -21
  67. data/lib/flexr/regexp/tokenizer.rb +4 -4
  68. data/lib/flexr/rspec.rb +51 -0
  69. data/lib/flexr/runtime/core.rb +21 -15
  70. data/lib/flexr/runtime/errors.rb +6 -4
  71. data/lib/flexr/runtime/interpreter.rb +47 -45
  72. data/lib/flexr/runtime/location.rb +5 -4
  73. data/lib/flexr/runtime/token.rb +1 -0
  74. data/lib/flexr/runtime.rb +6 -2
  75. data/lib/flexr/source/passthrough.rb +14 -11
  76. data/lib/flexr/source/prism_reader.rb +45 -14
  77. data/lib/flexr/testing.rb +47 -0
  78. data/lib/flexr/trace.rb +197 -0
  79. data/lib/flexr/unicode/property.rb +1 -2
  80. data/lib/flexr/unicode/reference_regexp.rb +8 -9
  81. data/lib/flexr/version.rb +1 -1
  82. data/lib/flexr.rb +1 -0
  83. data/lib/ruby_lsp/flexr/addon.rb +114 -0
  84. data/sig/flexr.rbs +185 -0
  85. data/site/src/layouts/SiteLayout.astro +8 -2
  86. data/site/src/pages/index.astro +69 -155
  87. data/site/src/styles/custom.css +4 -287
  88. data/site/src/styles/landing.css +239 -0
  89. data/test/ruby_lsp_addon_spec.rb +135 -0
  90. data/tools/docs_verify.rb +1 -0
  91. data/tools/golden.rb +54 -0
  92. data/tools/release_notes.rb +16 -0
  93. metadata +44 -11
  94. data/benchmark/golden/calculator_lexer.sha256 +0 -1
  95. data/benchmark/golden/json_lexer.sha256 +0 -1
  96. data/benchmark/golden/regexp_tokenizer.sha256 +0 -1
  97. data/benchmark/golden/ruby_subset_lexer.sha256 +0 -1
  98. data/benchmark/golden/toy_lang_lexer.sha256 +0 -1
  99. data/benchmark/golden/with_lrama_lexer.sha256 +0 -1
  100. data/benchmark/golden/with_racc_lexer.sha256 +0 -1
  101. data/docs/releases/v1.1.0.md +0 -44
@@ -1,44 +0,0 @@
1
- # flexr v1.1.0
2
-
3
- Release date: 2026-08-13
4
-
5
- v1.1.0 strengthens the runtime, generated, and standalone lexer contract while
6
- keeping the stable public API focused on deterministic, byte-oriented lexing.
7
-
8
- ## Highlights
9
-
10
- - Runtime, generated, and standalone modes now share action precedence,
11
- nested-state behavior, static-evaluation rules, immutable compiled
12
- specifications, and structured error outcomes.
13
- - Runtime resource usage is bounded with token, lookahead, buffer, step, state
14
- stack, cancellation, and non-progress guards. Streaming input supports
15
- sliding-buffer retention and incremental location tracking.
16
- - Unicode properties and POSIX classes use the vendored Unicode 15.1.0 data
17
- through the DFA path, including property-aware longest-match behavior and
18
- Unicode-safe empty-match progress.
19
- - Regexp parsing and normalization now fail closed for unsupported syntax and
20
- cover empty-language AST nodes, symbolic repetition, class intersections,
21
- trailing hyphens, shorthand classes, and exact first-match counterexamples.
22
- - Compiler and generated-runtime paths use indexed construction, Hopcroft
23
- minimization, lazy transition representations, backend cost selection, and
24
- state-specific scanner fast paths.
25
- - Generated artifact writes are collision-safe, atomic, no-op aware, and carry
26
- schema, runtime ABI, compiler, and Unicode metadata.
27
-
28
- ## Compatibility notes
29
-
30
- - Stable backends remain `table`, `direct`, and `auto`.
31
- - `firstmatch` remains experimental and intentionally does not provide the
32
- longest-match guarantee.
33
- - Generated files should be regenerated with flexr v1.1.0 when upgrading from
34
- v1.0.x. Older generated artifacts remain loadable when their artifact
35
- metadata is compatible.
36
- - Unicode behavior is pinned to the vendored Unicode 15.1.0 snapshot rather
37
- than the host Ruby version.
38
-
39
- ## Verification
40
-
41
- The release candidate passed the repository's RSpec, RuboCop, documentation,
42
- generation, parity, differential, fuzz, Unicode, coverage, benchmark, and gem
43
- build gates on the release environment. See [the release procedure](../RELEASING.md)
44
- for the commands to repeat before tagging and publishing.