Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions lib/lrama/reporter/states.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def report_conflicts(io, state)
else
raise "Unknown conflict type #{conflict.type}"
end

io << "\n"
end

io << "\n"
Expand Down
1 change: 1 addition & 0 deletions spec/lrama/reporter/states_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
"plus" comes from state 0 goto by expr
"plus" comes from state 5 goto by expr


"plus" shift, and go to state 5

"end of file" reduce using rule 2 (expr)
Expand Down
7 changes: 7 additions & 0 deletions spec/lrama/states_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,15 @@ class go to state 5

Conflict on tSTRING. shift/reduce($@1)
tSTRING comes from state 1 goto by $@1

Conflict on tSTRING. shift/reduce($@3)
tSTRING comes from state 1 goto by $@3

Conflict on tSTRING. reduce($@1)/reduce($@3)
tSTRING comes from state 1 goto by $@1
tSTRING comes from state 1 goto by $@3


tSTRING shift, and go to state 6

tSTRING reduce using rule 5 ($@1)
Expand Down Expand Up @@ -423,6 +426,7 @@ class go to state 5
Conflict on a. shift/reduce(B)
a comes from state 6 goto by D


a shift, and go to state 1

a reduce using rule 4 (B)
Expand Down Expand Up @@ -612,6 +616,7 @@ class go to state 5
Conflict on a. shift/reduce(B)
a comes from state 6 goto by D


a shift, and go to state 1

a reduce using rule 4 (B)
Expand Down Expand Up @@ -1474,6 +1479,7 @@ class go to state 5
'+' comes from state 5 goto by expr
'+' comes from state 6 goto by expr


'+' shift, and go to state 5
'*' shift, and go to state 6

Expand All @@ -1495,6 +1501,7 @@ class go to state 5
'*' comes from state 5 goto by expr
'*' comes from state 6 goto by expr


'*' shift, and go to state 6

"end of file" reduce using rule 3 (expr)
Expand Down