Skip to content

Instantly share code, notes, and snippets.

@bmaland
Created November 18, 2010 18:10
Show Gist options
  • Select an option

  • Save bmaland/705361 to your computer and use it in GitHub Desktop.

Select an option

Save bmaland/705361 to your computer and use it in GitHub Desktop.
@anbn = Automaton.setup(:pda) do
initial_state :q0 do
transition ['a', EMPTY], [:q0, 'A']
transition ['b', 'A'], [:q1, EMPTY]
end
state :q1 do
transition ['b', 'A'], [:q1, EMPTY]
end
final_states :q0, :q1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment