Metadata-Version: 2.4
Name: stdio-c
Version: 1.0.0
Summary: A Python library to quickly fetch and output standard lab C programs (TOC / Compiler Design)
Author: stdio-developer
Keywords: c,programs,lab,compiler-design,toc,stdio
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Dynamic: requires-python

# `stdio-c` - Python Library for C Lab Programs

A lightweight Python library to fetch and output standard C programs (TOC / Compiler Design) using just two lines of code!

---

## 🚀 Installation

Install directly from PyPI:
```bash
pip install stdio-c
```

Or install locally:
```bash
pip install -e .
```

---

## 💻 Usage (Two-Line Code)

### Method 1 (Shortest & Recommended)
```python
import stdio
stdio.p1()   # Outputs Program 1
```

Replace `p1` with `p2`, `p3`, `p4`, or `p5`:
```python
import stdio
stdio.p2()   # Outputs Program 2 (NFA to DFA)
```

---

### Method 2 (Direct Import)
```python
from stdio import p1
p1()
```

Or:
```python
from stdio import prog3
prog3()
```

---

### Method 3 (By Number)
```python
import stdio
stdio.get(4)   # Outputs Program 4
```
Or using index bracket notation:
```python
import stdio
stdio[5]       # Outputs Program 5
```

---

### Method 4 (Submodule Import)
```python
import stdio.p1
stdio.p1.show()
```

---

### Method 5 (Terminal CLI)
You can also run directly from your terminal:
```bash
stdio 1
# or
stdio-c 1
# or
python3 -m stdio 1
```

---

## 📋 List of Included Programs

| Number | Name / Topic | Description |
|---|---|---|
| **1** | `stdio.p1()` | Pattern recognition for `a`, `abb`, and `a*b+` |
| **2** | `stdio.p2()` | NFA to DFA conversion using Subset Construction |
| **3** | `stdio.p3()` | Regular Expression to NFA using Thompson's Construction |
| **4** | `stdio.p4()` | Remove whitespaces and newlines from a file (`input.txt`) |
| **5** | `stdio.p5()` | LL(1) Predictive Parser (Stack-based parsing) |
