diff --git a/lib/lrama/reporter/states.rb b/lib/lrama/reporter/states.rb index e6e091857..f32bd5df2 100644 --- a/lib/lrama/reporter/states.rb +++ b/lib/lrama/reporter/states.rb @@ -122,6 +122,8 @@ def report_conflicts(io, state) else raise "Unknown conflict type #{conflict.type}" end + + io << "\n" end io << "\n" diff --git a/spec/lrama/reporter/states_spec.rb b/spec/lrama/reporter/states_spec.rb index c940861b4..df7e48b24 100644 --- a/spec/lrama/reporter/states_spec.rb +++ b/spec/lrama/reporter/states_spec.rb @@ -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) diff --git a/spec/lrama/states_spec.rb b/spec/lrama/states_spec.rb index c27c4d508..28c217e2a 100644 --- a/spec/lrama/states_spec.rb +++ b/spec/lrama/states_spec.rb @@ -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) @@ -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) @@ -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) @@ -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 @@ -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)