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.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +116 -0
- data/CONTRIBUTING.md +13 -1
- data/README.md +6 -2
- data/Rakefile +41 -5
- data/Steepfile +7 -0
- data/benchmark/golden/calculator_lexer.rb +276 -0
- data/benchmark/golden/graphql_lexer.rb +310 -0
- data/benchmark/golden/json_lexer.rb +292 -0
- data/benchmark/golden/regexp_tokenizer.rb +293 -0
- data/benchmark/golden/ruby_subset_lexer.rb +280 -0
- data/benchmark/golden/sql_lexer.rb +293 -0
- data/benchmark/golden/toml_lexer.rb +292 -0
- data/benchmark/golden/toy_lang_lexer.rb +273 -0
- data/benchmark/golden/with_lrama_lexer.rb +264 -0
- data/benchmark/golden/with_racc_lexer.rb +264 -0
- data/benchmark/lrama_lexer.rb +165 -0
- data/benchmark/matrix.rb +79 -0
- data/benchmark/profile.rb +109 -0
- data/benchmark/run.rb +4 -1
- data/benchmark/state_dispatch.rb +78 -0
- data/docs/README.md +1 -2
- data/docs/RELEASING.md +9 -2
- data/docs/migration-v2.md +73 -0
- data/docs/perf-log.md +108 -0
- data/docs/reference/README.md +2 -0
- data/docs/reference/cli.md +71 -5
- data/docs/reference/compatibility.md +9 -2
- data/docs/reference/diagnostics.md +338 -0
- data/docs/reference/dsl.md +8 -5
- data/docs/reference/errors.md +28 -0
- data/docs/reference/generated-artifacts.md +11 -0
- data/docs/reference/public-api.md +32 -8
- data/docs/reference/regexp.md +19 -7
- data/docs/reference/ruby-lsp.md +34 -0
- data/docs/reference/testing.md +57 -0
- data/examples/graphql/README.md +14 -0
- data/examples/graphql/lexer.flexr.rb +29 -0
- data/examples/sql/README.md +16 -0
- data/examples/sql/lexer.flexr.rb +23 -0
- data/examples/toml/README.md +14 -0
- data/examples/toml/lexer.flexr.rb +23 -0
- data/gemfiles/ruby_lsp.gemfile +4 -0
- data/gemfiles/types.gemfile +7 -0
- data/lib/flexr/automaton/accel.rb +11 -1
- data/lib/flexr/automaton/analysis.rb +161 -7
- data/lib/flexr/automaton/compiler.rb +175 -24
- data/lib/flexr/cli.rb +117 -17
- data/lib/flexr/codegen/firstmatch.rb +1 -7
- data/lib/flexr/codegen/table.rb +2 -2
- data/lib/flexr/configuration.rb +8 -0
- data/lib/flexr/deprecations.rb +26 -0
- data/lib/flexr/diagnostics.rb +39 -3
- data/lib/flexr/dsl.rb +11 -9
- data/lib/flexr/errors.rb +6 -6
- data/lib/flexr/generated.rb +27 -15
- data/lib/flexr/generator.rb +44 -29
- data/lib/flexr/grammar.rb +41 -0
- data/lib/flexr/ir.rb +2 -2
- data/lib/flexr/migration.rb +31 -0
- data/lib/flexr/minitest.rb +24 -0
- data/lib/flexr/options.rb +4 -2
- data/lib/flexr/regexp/matcher.rb +26 -0
- data/lib/flexr/regexp/normalizer.rb +4 -8
- data/lib/flexr/regexp/parser.rb +127 -21
- data/lib/flexr/regexp/tokenizer.rb +4 -4
- data/lib/flexr/rspec.rb +51 -0
- data/lib/flexr/runtime/core.rb +21 -15
- data/lib/flexr/runtime/errors.rb +6 -4
- data/lib/flexr/runtime/interpreter.rb +47 -45
- data/lib/flexr/runtime/location.rb +5 -4
- data/lib/flexr/runtime/token.rb +1 -0
- data/lib/flexr/runtime.rb +6 -2
- data/lib/flexr/source/passthrough.rb +14 -11
- data/lib/flexr/source/prism_reader.rb +45 -14
- data/lib/flexr/testing.rb +47 -0
- data/lib/flexr/trace.rb +197 -0
- data/lib/flexr/unicode/property.rb +1 -2
- data/lib/flexr/unicode/reference_regexp.rb +8 -9
- data/lib/flexr/version.rb +1 -1
- data/lib/flexr.rb +1 -0
- data/lib/ruby_lsp/flexr/addon.rb +114 -0
- data/sig/flexr.rbs +185 -0
- data/site/src/layouts/SiteLayout.astro +8 -2
- data/site/src/pages/index.astro +69 -155
- data/site/src/styles/custom.css +4 -287
- data/site/src/styles/landing.css +239 -0
- data/test/ruby_lsp_addon_spec.rb +135 -0
- data/tools/docs_verify.rb +1 -0
- data/tools/golden.rb +54 -0
- data/tools/release_notes.rb +16 -0
- metadata +44 -11
- data/benchmark/golden/calculator_lexer.sha256 +0 -1
- data/benchmark/golden/json_lexer.sha256 +0 -1
- data/benchmark/golden/regexp_tokenizer.sha256 +0 -1
- data/benchmark/golden/ruby_subset_lexer.sha256 +0 -1
- data/benchmark/golden/toy_lang_lexer.sha256 +0 -1
- data/benchmark/golden/with_lrama_lexer.sha256 +0 -1
- data/benchmark/golden/with_racc_lexer.sha256 +0 -1
- data/docs/releases/v1.1.0.md +0 -44
data/docs/releases/v1.1.0.md
DELETED
|
@@ -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.
|