Print accepting token in FA#to_s
This commit is contained in:
parent
ed3f599e25
commit
e4370cac62
@ -28,7 +28,7 @@ module Imbecile
|
|||||||
states[state]
|
states[state]
|
||||||
end
|
end
|
||||||
visit = lambda do |state|
|
visit = lambda do |state|
|
||||||
accepts_s = state.accepts ? " *" : ""
|
accepts_s = state.accepts ? " #{state.accepts}" : ""
|
||||||
rv += "#{state_id[state]}#{accepts_s}:\n"
|
rv += "#{state_id[state]}#{accepts_s}:\n"
|
||||||
state.transitions.each do |transition|
|
state.transitions.each do |transition|
|
||||||
if transition.nil?
|
if transition.nil?
|
||||||
@ -39,7 +39,7 @@ module Imbecile
|
|||||||
range_s += "-" + chr[transition.code_point_range.last]
|
range_s += "-" + chr[transition.code_point_range.last]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
accepts_s = transition.destination.accepts ? " *" : ""
|
accepts_s = transition.destination.accepts ? " #{transition.destination.accepts}" : ""
|
||||||
rv += " #{range_s} => #{state_id[transition.destination]}#{accepts_s}\n"
|
rv += " #{range_s} => #{state_id[transition.destination]}#{accepts_s}\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user