Metadata-Version: 2.4
Name: stdio-c
Version: 2.1.0
Summary: A collection of C compiler design programs (1-10) runnable via 'py -m stdio <num>'
Author: Antigravity
License-Expression: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Dynamic: requires-python

# stdio-c (v2.1.0)

A custom Python library that allows you to run or view compiler design lab programs directly from your terminal using:

```bash
py -m pip install stdio-c
py -m stdio <program_number>
```

## Available Programs (1 to 10)

| Program Number | Program Name | Description |
|---|---|---|
| **1** | Basic Lexical Analyzer | Tokenizer classifying keywords, identifiers, constants, operators |
| **2** | Symbol Table Lookup | Symbol table lookup for variables with data type & address |
| **3** | Lexical Counter & Comment Stripper | Counts length and strips C single-line comments (`//`) |
| **4** | Identifier Validator | Validates C identifier naming rules |
| **5** | FIRST & FOLLOW Computation | Demo of FIRST and FOLLOW set computations |
| **6** | Lexical Analyzer (Operator Validator) | Validates C operators (arithmetic, relational, bitwise, compound, etc.) |
| **7** | Shift Reduce Parser | Bottom-up shift-reduce syntax parser simulator |
| **8** | LALR Parser | LALR bottom-up parser simulator |
| **9** | SLR Parser | SLR state-table parser simulator |
| **10** | Three Address Code Generator | TAC intermediate code generator for expressions |

## Usage Examples

Run any program interactively:
```bash
py -m stdio 1
py -m stdio 6
py -m stdio 10
```

### Display Program Source Code:
To print/display the C source code of a program directly in the terminal:
```bash
py -m stdio 1 --code
# or
py -m stdio 1 --cat
```

To view the Python implementation code:
```bash
py -m stdio 1 --pycode
```

### Interactive Menu:
If you run without arguments, an interactive menu listing programs 1-10 will pop up:
```bash
py -m stdio
```

### Run original C source code (if GCC/Clang installed):
```bash
py -m stdio 6 --c
```

