diff --git a/.github/workflows/modgc.yml b/.github/workflows/modgc.yml index 6ad4e84ccbf467..fcde133c802a89 100644 --- a/.github/workflows/modgc.yml +++ b/.github/workflows/modgc.yml @@ -105,7 +105,7 @@ jobs: ${SETARCH} ../src/configure -C --disable-install-doc --with-modular-gc="${MODULAR_GC_DIR}" \ ${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE} - - uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2 + - uses: actions-rust-lang/setup-rust-toolchain@a0b538fa0b742a6aa35d6e2c169b4bd06d225a98 # v1.15.3 - name: Set MMTk environment variables run: | echo 'EXCLUDES=../src/test/.excludes-mmtk' >> $GITHUB_ENV diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml index 232d26ed2bd752..6ff1f977e85e9b 100644 --- a/.github/workflows/zjit-macos.yml +++ b/.github/workflows/zjit-macos.yml @@ -92,7 +92,7 @@ jobs: rustup install ${{ matrix.rust_version }} --profile minimal rustup default ${{ matrix.rust_version }} - - uses: taiki-e/install-action@a3324fb0eb94b8230ec968c3389c1b7929fc2f3b # v2.68.13 + - uses: taiki-e/install-action@d6e286fa45544157a02d45a43742857ebbc25d12 # v2.68.16 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml index 9045555555b651..4bc959d6d66144 100644 --- a/.github/workflows/zjit-ubuntu.yml +++ b/.github/workflows/zjit-ubuntu.yml @@ -119,7 +119,7 @@ jobs: ruby-version: '3.1' bundler: none - - uses: taiki-e/install-action@a3324fb0eb94b8230ec968c3389c1b7929fc2f3b # v2.68.13 + - uses: taiki-e/install-action@d6e286fa45544157a02d45a43742857ebbc25d12 # v2.68.16 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} diff --git a/lib/bundler/templates/newgem/github/workflows/build-gems.yml.tt b/lib/bundler/templates/newgem/github/workflows/build-gems.yml.tt index c3fca937f6124e..d49954d2cd2c89 100644 --- a/lib/bundler/templates/newgem/github/workflows/build-gems.yml.tt +++ b/lib/bundler/templates/newgem/github/workflows/build-gems.yml.tt @@ -8,6 +8,10 @@ on: - "cross-gem/*" workflow_dispatch: +permissions: + contents: read + packages: write + jobs: ci-data: runs-on: ubuntu-latest @@ -25,7 +29,7 @@ jobs: source-gem: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: ruby/setup-ruby@v1 with: @@ -34,7 +38,7 @@ jobs: - name: Build gem run: bundle exec rake build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v7 with: name: source-gem path: pkg/*.gem @@ -47,7 +51,7 @@ jobs: matrix: platform: ${{ fromJSON(needs.ci-data.outputs.result).supported-ruby-platforms }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: ruby/setup-ruby@v1 with: @@ -59,7 +63,7 @@ jobs: platform: ${{ matrix.platform }} ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v7 with: name: cross-gem path: ${{ steps.cross-gem.outputs.gem-path }} diff --git a/lib/bundler/templates/newgem/github/workflows/main.yml.tt b/lib/bundler/templates/newgem/github/workflows/main.yml.tt index 7f3e3a5b66f94f..cc8f04dd332ae3 100644 --- a/lib/bundler/templates/newgem/github/workflows/main.yml.tt +++ b/lib/bundler/templates/newgem/github/workflows/main.yml.tt @@ -7,6 +7,9 @@ on: pull_request: +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest @@ -17,7 +20,7 @@ jobs: - '<%= RUBY_VERSION %>' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: persist-credentials: false <%- if config[:ext] == 'rust' -%> diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb index 7b8ab64f252daf..9af06dd1814c61 100644 --- a/spec/bundled_gems_spec.rb +++ b/spec/bundled_gems_spec.rb @@ -24,11 +24,6 @@ def self.ruby=(ruby) require_relative "bundler/support/rubygems_ext" Spec::Helpers.install_dev_bundler FileUtils.mkdir_p Spec::Path.gem_path - - %w[sinatra rack tilt rack-protection rack-session rack-test mustermann base64 logger compact_index].each do |gem| - path, = Dir[File.expand_path("../.bundle/gems/#{gem}-*/lib", __dir__)] - $LOAD_PATH.unshift(path) if path - end end config.around(:each) do |example| diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb index 679f54152b29d7..a06dd307a342fa 100644 --- a/spec/bundler/support/path.rb +++ b/spec/bundler/support/path.rb @@ -319,8 +319,15 @@ def sinatra_dependency_paths base64 logger cgi + compact_index ] - Dir[scoped_base_system_gem_path.join("gems/{#{deps.join(",")}}-*/lib")].map(&:to_s) + path = if ruby_core? && deps.all? {|dep| !Dir[source_root.join(".bundle/gems/#{dep}-*")].empty? } + source_root.join(".bundle") + else + scoped_base_system_gem_path + end + + Dir[path.join("gems/{#{deps.join(",")}}-*/lib")].map(&:to_s) end private diff --git a/tool/lrama/NEWS.md b/tool/lrama/NEWS.md index 5a82880506beb9..693b46f018ef1e 100644 --- a/tool/lrama/NEWS.md +++ b/tool/lrama/NEWS.md @@ -1,6 +1,44 @@ # NEWS for Lrama -## Lrama 0.8.0 (2026-xx-xx) +## Lrama 0.8.0 (2026-03-01) + +### Support parser generation without %union directive (Bison compatibility) + +When writing simple parsers or prototypes, defining `%union` can be cumbersome and unnecessary. +Lrama now supports generating parsers without the `%union` directive, defaulting `YYSTYPE` to `int`, the same behavior as Bison. + +When `%union` is not defined: + +- `YYSTYPE` defaults to `int` +- Semantic value references are generated without union member access +- The generated parser behaves identically to Bison-generated parsers + +https://github.com/ruby/lrama/pull/765 + +### Allow named references on parameterized rule calls inside %rule + +Named references (e.g. `[opt]`) can now be used with parameterized rule calls inside a `%rule` body. +Previously, writing `f_opt_arg(value)[opt]` inside a `%rule` resulted in a parse error. + +```yacc +%rule example(X): f_opt_arg(X)[opt] { $$ = $opt; } + ; +``` + +https://github.com/ruby/lrama/pull/778 + +### Fix nested parameterized rule calls in subsequent argument positions + +Nested parameterized rule calls (e.g. `f_opt(number)`) can now appear in any argument position, not only the first one. +Previously, using a nested call as the second or later argument caused a parse error. + +```yacc +%% +program: args_list(f_opt(number), opt_tail(string), number) + ; +``` + +https://github.com/ruby/lrama/pull/779 ## Lrama 0.7.1 (2025-12-24) diff --git a/tool/lrama/lib/lrama/parser.rb b/tool/lrama/lib/lrama/parser.rb index 66111de8ab2340..04632cbae03a18 100644 --- a/tool/lrama/lib/lrama/parser.rb +++ b/tool/lrama/lib/lrama/parser.rb @@ -655,7 +655,7 @@ def token_to_str(t) module Lrama class Parser < Racc::Parser -module_eval(<<'...end parser.y/module_eval...', 'parser.y', 504) +module_eval(<<'...end parser.y/module_eval...', 'parser.y', 505) include Lrama::Tracer::Duration @@ -765,16 +765,17 @@ def raise_parse_error(error_message, location) 52, 110, 105, 53, 53, 52, 52, 110, 105, 53, 53, 52, 52, 110, 105, 53, 53, 52, 52, 110, 105, 53, 53, 52, 52, 110, 110, 53, 53, 52, - 209, 110, 110, 53, 53, 209, 52, 110, 110, 53, - 53, 209, 52, 110, 193, 194, 195, 137, 216, 222, - 230, 217, 217, 217, 53, 53, 52, 52, 193, 194, - 195, 57, 57, 57, 57, 66, 67, 68, 69, 70, - 72, 72, 72, 86, 89, 47, 57, 57, 113, 117, - 117, 79, 123, 124, 131, 47, 133, 137, 139, 143, - 149, 150, 151, 152, 133, 155, 156, 157, 110, 166, - 149, 169, 172, 173, 72, 175, 176, 183, 189, 166, - 196, 137, 200, 202, 137, 166, 211, 166, 137, 72, - 176, 218, 176, 72, 137, 227, 137, 72, 72 ] + 209, 110, 110, 53, 53, 209, 225, 110, 110, 53, + 53, 209, 209, 110, 110, 193, 194, 195, 137, 216, + 222, 232, 217, 217, 217, 235, 57, 53, 217, 52, + 53, 53, 52, 52, 193, 194, 195, 57, 57, 57, + 66, 67, 68, 69, 70, 72, 72, 72, 86, 89, + 47, 57, 57, 113, 117, 117, 79, 123, 124, 131, + 47, 133, 137, 139, 143, 149, 150, 151, 152, 133, + 155, 156, 157, 110, 166, 149, 169, 172, 173, 72, + 175, 176, 183, 189, 166, 196, 137, 200, 202, 137, + 166, 211, 166, 137, 72, 176, 218, 176, 72, 137, + 228, 137, 72, 231, 72 ] racc_action_check = [ 51, 97, 51, 97, 41, 75, 165, 75, 165, 75, @@ -798,119 +799,120 @@ def raise_parse_error(error_message, location) 78, 65, 78, 65, 65, 106, 79, 106, 79, 106, 106, 118, 180, 118, 180, 118, 180, 188, 196, 188, 196, 188, 196, 202, 217, 202, 217, 202, 217, 218, - 113, 218, 113, 218, 186, 186, 186, 186, 208, 213, - 226, 208, 213, 226, 114, 123, 114, 123, 210, 210, - 210, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 40, 42, 47, 55, 60, 71, 74, - 76, 80, 81, 87, 91, 92, 93, 94, 102, 116, - 124, 125, 126, 127, 133, 136, 137, 138, 144, 150, - 151, 153, 156, 158, 162, 163, 164, 170, 174, 176, - 178, 179, 182, 184, 187, 189, 199, 200, 204, 205, - 207, 209, 212, 214, 216, 221, 222, 224, 228 ] + 231, 218, 231, 218, 231, 186, 186, 186, 186, 208, + 213, 227, 208, 213, 227, 234, 24, 113, 234, 113, + 114, 123, 114, 123, 210, 210, 210, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 40, 42, + 47, 55, 60, 71, 74, 76, 80, 81, 87, 91, + 92, 93, 94, 102, 116, 124, 125, 126, 127, 133, + 136, 137, 138, 144, 150, 151, 153, 156, 158, 162, + 163, 164, 170, 174, 176, 178, 179, 182, 184, 187, + 189, 199, 200, 204, 205, 207, 209, 212, 214, 216, + 221, 222, 224, 225, 229 ] racc_action_pointer = [ 32, 23, 52, 93, nil, 31, 63, nil, 123, 68, 74, 84, 103, 165, 94, 111, 123, 135, 141, nil, - nil, nil, nil, nil, 215, 216, 217, 218, 230, 231, - 232, 233, 234, 232, 233, 234, 24, 25, 31, 32, - 238, -1, 242, nil, nil, nil, 43, 232, nil, nil, - nil, -5, nil, nil, nil, 230, nil, nil, nil, nil, - 231, nil, nil, 164, 170, 176, nil, nil, nil, nil, - nil, 240, nil, 171, 241, 2, 242, nil, 177, 183, - 243, 244, nil, nil, nil, nil, nil, 209, 45, nil, - 63, 245, 242, 243, 202, nil, nil, -4, nil, nil, - nil, nil, 256, nil, nil, nil, 182, nil, nil, nil, - nil, nil, nil, 207, 221, nil, 253, 38, 188, nil, - nil, nil, nil, 222, 255, 215, 218, 252, nil, nil, - nil, nil, nil, 251, nil, nil, 219, 261, 250, nil, - nil, nil, nil, nil, 261, nil, nil, nil, -24, nil, - 219, 265, nil, 269, nil, nil, 216, nil, 256, nil, - nil, nil, 266, 270, 227, 3, nil, nil, 3, nil, - 228, 9, nil, nil, 232, nil, 229, 3, 236, 226, - 189, nil, 236, nil, 239, nil, 162, 229, 194, 235, - 10, nil, nil, nil, nil, nil, 195, nil, nil, 284, - 237, 15, 200, nil, 233, 281, nil, 241, 173, 247, - 176, nil, 243, 174, 285, nil, 239, 201, 206, nil, - nil, 278, 241, nil, 289, nil, 175, nil, 290, nil, - nil, nil ] + nil, nil, nil, nil, 210, 221, 222, 223, 235, 236, + 237, 238, 239, 237, 238, 239, 24, 25, 31, 32, + 243, -1, 247, nil, nil, nil, 43, 237, nil, nil, + nil, -5, nil, nil, nil, 235, nil, nil, nil, nil, + 236, nil, nil, 164, 170, 176, nil, nil, nil, nil, + nil, 245, nil, 171, 246, 2, 247, nil, 177, 183, + 248, 249, nil, nil, nil, nil, nil, 214, 45, nil, + 63, 250, 247, 248, 207, nil, nil, -4, nil, nil, + nil, nil, 261, nil, nil, nil, 182, nil, nil, nil, + nil, nil, nil, 224, 227, nil, 258, 38, 188, nil, + nil, nil, nil, 228, 260, 220, 223, 257, nil, nil, + nil, nil, nil, 256, nil, nil, 224, 266, 255, nil, + nil, nil, nil, nil, 266, nil, nil, nil, -24, nil, + 224, 270, nil, 274, nil, nil, 221, nil, 261, nil, + nil, nil, 271, 275, 232, 3, nil, nil, 3, nil, + 233, 9, nil, nil, 237, nil, 234, 3, 241, 231, + 189, nil, 241, nil, 244, nil, 163, 234, 194, 240, + 10, nil, nil, nil, nil, nil, 195, nil, nil, 289, + 242, 15, 200, nil, 238, 286, nil, 246, 174, 252, + 182, nil, 248, 175, 290, nil, 244, 201, 206, nil, + nil, 283, 246, nil, 294, 259, nil, 176, nil, 296, + nil, 207, nil, nil, 180, nil ] racc_action_default = [ - -1, -136, -1, -3, -10, -136, -136, -2, -3, -136, - -14, -14, -136, -136, -136, -136, -136, -136, -136, -28, - -29, -34, -35, -36, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -54, -54, -54, -136, -136, -136, -136, - -136, -136, -136, -13, 232, -4, -136, -14, -16, -17, - -20, -131, -100, -101, -130, -18, -23, -89, -24, -25, - -136, -27, -37, -136, -136, -136, -41, -42, -43, -44, - -45, -46, -55, -136, -47, -136, -48, -49, -92, -136, - -95, -97, -98, -50, -51, -52, -53, -136, -136, -11, - -5, -7, -14, -136, -72, -15, -21, -131, -132, -133, - -134, -19, -136, -26, -30, -31, -32, -38, -87, -88, - -135, -39, -40, -136, -56, -58, -60, -136, -83, -85, - -93, -94, -96, -136, -136, -136, -136, -136, -6, -8, - -9, -128, -104, -102, -105, -73, -136, -136, -136, -90, - -33, -59, -57, -61, -80, -86, -84, -99, -136, -66, - -70, -136, -12, -136, -103, -109, -136, -22, -136, -62, - -81, -82, -54, -136, -64, -68, -71, -74, -136, -129, - -106, -107, -127, -91, -136, -67, -70, -72, -100, -72, - -136, -124, -136, -109, -100, -110, -72, -72, -136, -70, - -69, -75, -76, -116, -117, -118, -136, -78, -79, -136, - -70, -108, -136, -111, -72, -54, -115, -63, -136, -100, - -119, -125, -65, -136, -54, -114, -72, -136, -136, -120, - -121, -136, -72, -112, -54, -122, -136, -126, -54, -77, - -123, -113 ] + -1, -137, -1, -3, -10, -137, -137, -2, -3, -137, + -14, -14, -137, -137, -137, -137, -137, -137, -137, -28, + -29, -34, -35, -36, -137, -137, -137, -137, -137, -137, + -137, -137, -137, -54, -54, -54, -137, -137, -137, -137, + -137, -137, -137, -13, 236, -4, -137, -14, -16, -17, + -20, -132, -100, -101, -131, -18, -23, -89, -24, -25, + -137, -27, -37, -137, -137, -137, -41, -42, -43, -44, + -45, -46, -55, -137, -47, -137, -48, -49, -92, -137, + -95, -97, -98, -50, -51, -52, -53, -137, -137, -11, + -5, -7, -14, -137, -72, -15, -21, -132, -133, -134, + -135, -19, -137, -26, -30, -31, -32, -38, -87, -88, + -136, -39, -40, -137, -56, -58, -60, -137, -83, -85, + -93, -94, -96, -137, -137, -137, -137, -137, -6, -8, + -9, -129, -104, -102, -105, -73, -137, -137, -137, -90, + -33, -59, -57, -61, -80, -86, -84, -99, -137, -66, + -70, -137, -12, -137, -103, -109, -137, -22, -137, -62, + -81, -82, -54, -137, -64, -68, -71, -74, -137, -130, + -106, -107, -128, -91, -137, -67, -70, -72, -100, -72, + -137, -125, -137, -109, -100, -110, -72, -72, -137, -70, + -69, -75, -76, -116, -117, -118, -137, -78, -79, -137, + -70, -108, -137, -111, -72, -54, -115, -63, -137, -100, + -119, -126, -65, -137, -54, -114, -72, -137, -137, -120, + -121, -137, -72, -112, -54, -100, -122, -137, -127, -54, + -77, -137, -124, -113, -137, -123 ] racc_goto_table = [ 73, 118, 136, 54, 48, 49, 164, 96, 91, 120, - 121, 93, 187, 148, 107, 111, 112, 119, 134, 171, - 56, 58, 59, 3, 61, 7, 78, 78, 78, 78, - 62, 63, 64, 65, 115, 74, 76, 192, 1, 129, - 168, 95, 187, 118, 118, 207, 204, 201, 77, 83, - 84, 85, 128, 138, 147, 93, 212, 140, 154, 145, - 146, 101, 130, 116, 42, 127, 103, 208, 78, 78, - 219, 9, 51, 213, 141, 142, 45, 71, 159, 144, - 190, 160, 161, 102, 158, 191, 132, 197, 122, 226, - 170, 177, 220, 199, 203, 205, 221, 186, 153, nil, + 121, 93, 187, 208, 107, 111, 112, 119, 134, 213, + 56, 58, 59, 171, 61, 1, 78, 78, 78, 78, + 62, 63, 64, 65, 115, 227, 129, 192, 148, 74, + 76, 95, 187, 118, 118, 207, 204, 3, 234, 7, + 130, 201, 128, 138, 147, 93, 212, 140, 154, 145, + 146, 101, 9, 116, 42, 168, 103, 45, 78, 78, + 219, 127, 51, 71, 141, 142, 77, 83, 84, 85, + 159, 144, 190, 160, 161, 191, 132, 197, 102, 158, + 122, 177, 170, 220, 203, 205, 199, 186, 221, 153, nil, nil, nil, 116, 116, nil, 198, nil, nil, nil, nil, nil, 214, 78, 206, nil, 177, nil, nil, nil, nil, nil, 210, nil, 224, nil, nil, 186, 210, 174, - 228, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, 225, 210, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + 229, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, 226, 210, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 215, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, nil, nil, nil, nil, nil, nil, - nil, 229, nil, nil, nil, 231 ] + nil, 230, nil, nil, nil, nil, 233 ] racc_goto_check = [ 29, 22, 42, 31, 14, 14, 35, 16, 8, 48, - 48, 13, 40, 34, 24, 24, 24, 45, 52, 54, - 18, 18, 18, 6, 17, 6, 31, 31, 31, 31, - 17, 17, 17, 17, 30, 26, 26, 38, 1, 5, - 34, 14, 40, 22, 22, 35, 38, 54, 27, 27, - 27, 27, 8, 16, 48, 13, 35, 24, 52, 45, - 45, 18, 9, 31, 10, 11, 17, 39, 31, 31, - 38, 7, 15, 39, 30, 30, 7, 25, 32, 33, - 36, 43, 44, 46, 47, 42, 14, 42, 50, 39, - 53, 22, 55, 56, 42, 42, 57, 22, 58, nil, + 48, 13, 40, 39, 24, 24, 24, 45, 52, 39, + 18, 18, 18, 54, 17, 1, 31, 31, 31, 31, + 17, 17, 17, 17, 30, 39, 5, 38, 34, 26, + 26, 14, 40, 22, 22, 35, 38, 6, 39, 6, + 9, 54, 8, 16, 48, 13, 35, 24, 52, 45, + 45, 18, 7, 31, 10, 34, 17, 7, 31, 31, + 38, 11, 15, 25, 30, 30, 27, 27, 27, 27, + 32, 33, 36, 43, 44, 42, 14, 42, 46, 47, + 50, 22, 53, 55, 42, 42, 56, 22, 57, 58, nil, nil, nil, 31, 31, nil, 22, nil, nil, nil, nil, nil, 42, 31, 22, nil, 22, nil, nil, nil, nil, nil, 22, nil, 42, nil, nil, 22, 22, 29, 42, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 22, 22, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 29, nil, nil, nil, nil, nil, nil, nil, nil, 29, nil, nil, nil, nil, nil, nil, nil, nil, - nil, 29, nil, nil, nil, 29 ] + nil, 29, nil, nil, nil, nil, 29 ] racc_goto_pointer = [ - nil, 38, nil, nil, nil, -52, 23, 68, -38, -29, - 60, -24, nil, -35, -6, 59, -44, 6, 6, nil, - nil, nil, -74, nil, -49, 44, 1, 12, nil, -33, - -39, -10, -66, -37, -111, -144, -96, nil, -140, -129, - -159, nil, -92, -63, -62, -58, 26, -55, -69, nil, - 8, nil, -75, -65, -136, -118, -88, -115, -33 ] + nil, 25, nil, nil, nil, -55, 47, 59, -38, -41, + 60, -18, nil, -35, -6, 59, -44, 6, 6, nil, + nil, nil, -74, nil, -49, 40, 5, 40, nil, -33, + -39, -10, -64, -35, -86, -144, -94, nil, -140, -183, + -159, nil, -92, -61, -60, -58, 31, -50, -69, nil, + 10, nil, -75, -63, -132, -117, -85, -113, -32 ] racc_goto_default = [ nil, nil, 2, 8, 90, nil, nil, nil, nil, nil, @@ -1044,23 +1046,24 @@ def raise_parse_error(error_message, location) 1, 113, :_reduce_none, 2, 97, :_reduce_121, 3, 97, :_reduce_122, - 4, 97, :_reduce_123, - 0, 114, :_reduce_124, - 0, 115, :_reduce_125, - 5, 98, :_reduce_126, - 3, 95, :_reduce_127, - 0, 116, :_reduce_128, - 3, 63, :_reduce_129, + 6, 97, :_reduce_123, + 4, 97, :_reduce_124, + 0, 114, :_reduce_125, + 0, 115, :_reduce_126, + 5, 98, :_reduce_127, + 3, 95, :_reduce_128, + 0, 116, :_reduce_129, + 3, 63, :_reduce_130, 1, 73, :_reduce_none, 0, 74, :_reduce_none, 1, 74, :_reduce_none, 1, 74, :_reduce_none, 1, 74, :_reduce_none, - 1, 101, :_reduce_135 ] + 1, 101, :_reduce_136 ] -racc_reduce_n = 136 +racc_reduce_n = 137 -racc_shift_n = 232 +racc_shift_n = 236 racc_token_table = { false => 0, @@ -2192,13 +2195,20 @@ def _reduce_122(val, _values, result) module_eval(<<'.,.,', 'parser.y', 458) def _reduce_123(val, _values, result) - result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[0].s_value, location: @lexer.location, args: val[2])] + result = val[0].append(Lrama::Lexer::Token::InstantiateRule.new(s_value: val[2].s_value, location: @lexer.location, args: val[4])) result end .,., -module_eval(<<'.,.,', 'parser.y', 463) +module_eval(<<'.,.,', 'parser.y', 459) def _reduce_124(val, _values, result) + result = [Lrama::Lexer::Token::InstantiateRule.new(s_value: val[0].s_value, location: @lexer.location, args: val[2])] + result + end +.,., + +module_eval(<<'.,.,', 'parser.y', 464) + def _reduce_125(val, _values, result) if prec_seen? on_action_error("multiple User_code after %prec", val[0]) if @code_after_prec @code_after_prec = true @@ -2209,39 +2219,39 @@ def _reduce_124(val, _values, result) end .,., -module_eval(<<'.,.,', 'parser.y', 471) - def _reduce_125(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 472) + def _reduce_126(val, _values, result) end_c_declaration result end .,., -module_eval(<<'.,.,', 'parser.y', 475) - def _reduce_126(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 476) + def _reduce_127(val, _values, result) result = val[2] result end .,., -module_eval(<<'.,.,', 'parser.y', 478) - def _reduce_127(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 479) + def _reduce_128(val, _values, result) result = val[1].s_value result end .,., -module_eval(<<'.,.,', 'parser.y', 483) - def _reduce_128(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 484) + def _reduce_129(val, _values, result) begin_c_declaration('\Z') result end .,., -module_eval(<<'.,.,', 'parser.y', 487) - def _reduce_129(val, _values, result) +module_eval(<<'.,.,', 'parser.y', 488) + def _reduce_130(val, _values, result) end_c_declaration @grammar.epilogue_first_lineno = val[0].first_line + 1 @grammar.epilogue = val[2].s_value @@ -2250,8 +2260,6 @@ def _reduce_129(val, _values, result) end .,., -# reduce 130 omitted - # reduce 131 omitted # reduce 132 omitted @@ -2260,8 +2268,10 @@ def _reduce_129(val, _values, result) # reduce 134 omitted -module_eval(<<'.,.,', 'parser.y', 499) - def _reduce_135(val, _values, result) +# reduce 135 omitted + +module_eval(<<'.,.,', 'parser.y', 500) + def _reduce_136(val, _values, result) result = Lrama::Lexer::Token::Ident.new(s_value: val[0].s_value) result end diff --git a/tool/lrama/lib/lrama/version.rb b/tool/lrama/lib/lrama/version.rb index d649b749391910..eb1d1b46c7bcff 100644 --- a/tool/lrama/lib/lrama/version.rb +++ b/tool/lrama/lib/lrama/version.rb @@ -2,5 +2,5 @@ # frozen_string_literal: true module Lrama - VERSION = "0.7.1".freeze #: String + VERSION = "0.8.0".freeze #: String end