Metadata-Version: 2.4
Name: stdio-c
Version: 2.0.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.0.0)

A custom Python library that allows you to run 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 |

## Installation

To install locally in editable mode:

```bash
python -m pip install -e .
# or on Windows:
py -m pip install -e .
```

To build a wheel package for PyPI distribution:

```bash
python -m pip install build
python -m build
# Produces dist/stdio_c-2.0.0-py3-none-any.whl
```

## Usage Examples

Run any program between 1 and 10:

```bash
py -m stdio 1
py -m stdio 6
py -m stdio 10
```

### 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
```
