f.write("digraph g \{\n")
f.write("rankdir=LR;\n")
f.write("node[shape=Mrecord,height=0];\n")
f.write("digraph g \{\n")
f.write("rankdir=LR;\n")
f.write("node[shape=Mrecord,height=0];\n")
if not s.need_guard then continue
if s.reduces.length <= 1 then continue
add "\tredef fun action_s{s.cname}(parser) do"
if not s.need_guard then continue
if s.reduces.length <= 1 then continue
add "\tredef fun action_s{s.cname}(parser) do"
for t, a in guarded_reduce do
if a.length > 1 then
print "REDUCE/REDUCE Conflict on state {self.number} {self.name} for token {t}:"
for i in a do print "\treduce: {i}"
for t, a in guarded_reduce do
if a.length > 1 then
print "REDUCE/REDUCE Conflict on state {self.number} {self.name} for token {t}:"
for i in a do print "\treduce: {i}"
else
print "SHIFT/REDUCE Conflict on state {self.number} {self.name} for token {t}:"
print "\treduce: {ri}"
for i in guarded_shift[t] do print "\tshift: {i}"
else
print "SHIFT/REDUCE Conflict on state {self.number} {self.name} for token {t}:"
print "\treduce: {ri}"
for i in guarded_shift[t] do print "\tshift: {i}"
# Return `i` and all other items of the state that expands, directly or indirectly, to `i`
fun back_expand(i: Item): Set[Item]
do
# Return `i` and all other items of the state that expands, directly or indirectly, to `i`
fun back_expand(i: Item): Set[Item]
do