Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
angelocguerra authored Aug 8, 2023
1 parent 70d59cf commit db1d6c8
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,29 @@ A python implementation of a Deterministic Pushdown Automata.
To run, simply open up the **DPDA_GUI.py** file and run said file.

The program requires a text file that contains a machine definition. The machine definition should have the following format:
{states}\
{input symbols}\
{stack symbols}\
{start state}\
{initial stack symbol}\
{final state}\
```
{states}
{input symbols}
{stack symbols}
{start state}
{initial stack symbol}
{final state}
{transitions}
```

Everything with multiple values should be comma separated. Moreover, each transition must be written in the format of *\<current state\>,\<input symbol\>,\<pop symbol\>,\<next state\>,\<push symbol\>*. For any lambda transitions or values, simply do not type anything after the comma. An example has been provided below.

q0,q1,q2\
0,1\
Z,X\
q0\
Z\
q2\
```
q0,q1,q2
0,1
Z,X
q0
Z
q2
q0,0,,q0,X
q0,1,X,q1,\
q1,1,X,q1,\
q0,1,X,q1,
q1,1,X,q1,
q1,,Z,q2,

...
```

After selecting which machine definition to use, enter an input string to be tested on the machine. Once done, click on the "Check" button to obtain the results of whether or not the machine accepts or rejects the string, and the step-by-step tracing of the machine.

Expand Down

0 comments on commit db1d6c8

Please sign in to comment.