Skip to content

Commit

Permalink
Updated docs for the new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipul-Cariappa committed Oct 13, 2023
1 parent 587500d commit e6b97c7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/pda/class-pda.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
The `PDA` class is an abstract base class from which all pushdown automata
inherit. It can be found under `automata/pda/pda.py`.

The `PDA` class has the following abstract methods:

## PDA.show_diagram(self, input_str = None, path = None):

Constructs and returns a pygraphviz `AGraph` corresponding to this PAD. If `input_str` is
set, then shows execution of the PDA on `input_str`. If `path` is
set, then an image of the diagram is written to the corresponding file. Other
customization options are available, see function signature for more
details.

```python
pda.show_diagram(path='./pda.png')
```

## Subclasses

### [DPDA (Deterministic Pushdown Automaton)](class-dpda.md)
Expand Down

0 comments on commit e6b97c7

Please sign in to comment.