Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions spec/lrama/states_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,8 @@ class go to state 5
// Prologue
%}

%define lr.type ielr

%token <val> NUM
%token tEQ "=="
%type <val> expr
Expand Down Expand Up @@ -2151,6 +2153,8 @@ class go to state 5
// Prologue
%}

%define lr.type ielr

%token NUM

%nonassoc tCMP
Expand Down Expand Up @@ -2299,6 +2303,8 @@ class go to state 5
// Prologue
%}

%define lr.type ielr

%token a
%token b
%token c
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -2548,6 +2560,8 @@ class go to state 5
// Prologue
%}

%define lr.type ielr

%token a
%token b
%token c
Expand Down Expand Up @@ -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"
Expand Down