Skip to content

Instantly share code, notes, and snippets.

@ADCDS
Created December 1, 2018 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ADCDS/8ab14c9ea77f075a87e9df8dc8af9011 to your computer and use it in GitHub Desktop.
Save ADCDS/8ab14c9ea77f075a87e9df8dc8af9011 to your computer and use it in GitHub Desktop.
input: '<()()('
blank: ' '
start state: start
table:
start:
<: {write: <, R: A}
A:
X: {write: X, R: A}
(: {write: (, R: A}
): {write: X, L: B}
' ': {write: ' ', L: C}
B:
X: {write: X, L: B}
(: {write: X, R: A}
C:
X: {write: X, L: C}
<: {write: <, R: accept}
accept:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment