Skip to content

Commit 6a67044

Browse files
committed
Merge branch 'main' into develop
2 parents 2156c80 + cd4d1b8 commit 6a67044

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/pda/class-dpda.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ dpda = DPDA(
3838
stack_symbols={'0', '1'},
3939
transitions={
4040
'q0': {
41-
'a': {'0': ('q1', ('1', '0'))} # transition pushes '1' to stack
41+
'a': {'0': ('q1', ('1', '0'))} # push '1' to stack
4242
},
4343
'q1': {
44-
'a': {'1': ('q1', ('1', '1'))},
45-
'b': {'1': ('q2', '')} # transition pops from stack
44+
'a': {'1': ('q1', ('1', '1'))}, # push '1' to stack
45+
'b': {'1': ('q2', '')} # pop from stack
4646
},
4747
'q2': {
48-
'b': {'1': ('q2', '')},
49-
'': {'0': ('q3', ('0',))} # transition does not change stack
48+
'b': {'1': ('q2', '')}, # pop from stack
49+
'': {'0': ('q3', ('0',))} # no change to stack
5050
}
5151
},
5252
initial_state='q0',

docs/pda/class-npda.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ npda = NPDA(
3939
'#': {('q2', '#')}, # no change to stack
4040
},
4141
'a': {
42-
'#': {('q0', ('A', '#'))}, # replace top of stack with 'A#'
42+
'#': {('q0', ('A', '#'))}, # push 'A' to stack
4343
'A': {
4444
('q0', ('A', 'A')), # push 'A' to stack
4545
('q1', ''), # pop from stack
4646
},
47-
'B': {('q0', ('A', 'B'))}, # push 'B' to stack
47+
'B': {('q0', ('A', 'B'))}, # push 'A' to stack
4848
},
4949
'b': {
50-
'#': {('q0', ('B', '#'))}, # replace top of stack with 'B#'
51-
'A': {('q0', ('B', 'A'))}, # replace top of stack with 'BA'
50+
'#': {('q0', ('B', '#'))}, # push 'B' to stack
51+
'A': {('q0', ('B', 'A'))}, # push 'B' to stack
5252
'B': {
5353
('q0', ('B', 'B')), # push 'B' to stack
5454
('q1', ''), # pop from stack

0 commit comments

Comments
 (0)