stdio-c (v2.0.0)
A custom Python library that allows you to run compiler design lab programs directly from your terminal using:
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:
python -m pip install -e .
# or on Windows:
py -m pip install -e .
To build a wheel package for PyPI distribution:
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:
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:
py -m stdio
Run original C source code (if GCC/Clang installed):
py -m stdio 6 --c
Release files for stdio-c 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stdio_c-2.0.0.tar.gz | 10.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stdio_c-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:26.5 kB
Release files / stdio_c-2.0.0.tar.gz
| Download URL | stdio_c-2.0.0.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ad2c558e8c009f21f75dbf7ad69bea4b66e908701d344e9059351d898c1a431
|
|
BLAKE2b-256 checksum How to use checksums |
67fb17d5f859a0c3916e7f72bc15bd9d2ffefa37713529ad468256363a55e312
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / stdio_c-2.0.0-py3-none-any.whl
| Download URL | stdio_c-2.0.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5be4cbfdfcec5057aaa6b01a6eb0f1727310852afb509e89da5b8e3583412ba0
|
|
BLAKE2b-256 checksum How to use checksums |
771a09c6b69c931d026e7b75b3ef63208652f3b756d4ecfeb4fe53ab7f46bcdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|