You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way Sipser's textbook defines PDAs, they can have epsilon stack moves. So for example "a, eps -> x" says "read a, push x" and "a, eps -> eps" says just "read a". These are compatible with the Hopcroft and Ullman definition which is used here. (Just a slight extension!) Could support for them please be added? Sipser's textbook is very popular and I just had to post this workaround to my class:
deffill_in_epsilon_stack_moves(stack_alphabet, table):
"""Convert a Sipser-style transition table to a Hopcroft-Ullman-style transition table. Table is modified in-place, and returned from this function."""forfintable.values():
forginf.values():
if''noting:
continueforbinstack_alphabet:
new_transitions=set()
for (q, s) ing['']:
ifs=='':
new_transitions.add((q, b))
else:
new_transitions.add((q, (s, b)))
ifbing:
g[b] |=new_transitionselse:
g[b] =new_transitionsdelg['']
returntable
The text was updated successfully, but these errors were encountered:
@eliotwrobson Do you have any thoughts on this? I can't say I'm too familiar with the specific algorithms, but adding support for this seems like a reasonable idea to me.
This seems like a reasonable thing to add! I think this just generalizes the definition of PDAs. There aren't too many algorithms implemented for those, so should be a straightforward change to add. I'm swamped with other projects now, but @Muon if you or someone else were to implement this change, I could definitely review.
The way Sipser's textbook defines PDAs, they can have epsilon stack moves. So for example "a, eps -> x" says "read a, push x" and "a, eps -> eps" says just "read a". These are compatible with the Hopcroft and Ullman definition which is used here. (Just a slight extension!) Could support for them please be added? Sipser's textbook is very popular and I just had to post this workaround to my class:
The text was updated successfully, but these errors were encountered: