From d443d4d082a5b52e70726fe88fe2e9851ad5965e Mon Sep 17 00:00:00 2001 From: yui-knk Date: Thu, 28 Aug 2025 09:56:31 +0900 Subject: [PATCH] Add `%define lr.type ielr` to IELR test case grammar files --- spec/lrama/states_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/lrama/states_spec.rb b/spec/lrama/states_spec.rb index 58502d008..4375c2d59 100644 --- a/spec/lrama/states_spec.rb +++ b/spec/lrama/states_spec.rb @@ -2051,6 +2051,8 @@ class go to state 5 // Prologue %} + %define lr.type ielr + %token NUM %token tEQ "==" %type expr @@ -2151,6 +2153,8 @@ class go to state 5 // Prologue %} + %define lr.type ielr + %token NUM %nonassoc tCMP @@ -2299,6 +2303,8 @@ class go to state 5 // Prologue %} + %define lr.type ielr + %token a %token b %token c @@ -2346,6 +2352,12 @@ class go to state 5 Lrama::Reporter.new(states: true).report(io, states) expect(io.string).to eq(<<~STR) + Split States + + State 20 is split from state 5 + State 21 is split from state 10 + State 22 is split from state 15 + State 0 0 $accept: • S "end of file" @@ -2548,6 +2560,8 @@ class go to state 5 // Prologue %} + %define lr.type ielr + %token a %token b %token c @@ -2582,6 +2596,10 @@ class go to state 5 Lrama::Reporter.new(states: true).report(io, states) expect(io.string).to eq(<<~STR) + Split States + + State 15 is split from state 5 + State 0 0 $accept: • S "end of file"