A compiler for Pseudocode written in python
Project description
Python Pseudocode Compiler
Introduction
PsPse is a interpreted compiler for teaching purposes.
Features:
- Compile codes in AS-Level Computer Science Syllabus
- Portable with no environemt requirements
- Available in Windows and Linux
- Continuously developing
I am a senior high student learning A2 Computer Science currently, and I am new to compilers. Feel free to raise issues or contribute.
Why?
Pseudocode is used to express ideas without truly writing code. However,
- AS-Level has specific grammar for this language
- AS-Level International Test marks based on the grammar
- There is no compiler for it, and there is no way to test it or execute it.
As a result, there is a clear need to write such compiler, also as a project of mine for interest. :smirk:
Get Started
First, Clone the repo in terminal:
git clone https://github.com/HankelBao/PyPse
Now, you will have the PyPse folder in your current path. CD to PyPse/bin/ and you will have pypse.bin
and pypse.exe
under the folder.
If you are using Windows,
.\pypse.exe ..\test\test.5.pse
If you are using Linux,
.\pypse.bin ..\test\test.5.pse
If you see the Hello World! message showing up just like the demo, you are ready to go!
Usage
Remember, you should always use pypse.bin
for linux and pypse.exe
for windows.
Pseudocode File ends in .pse, so you should create a file with such extension for execution.
Write your own pseudocode and execute it!
Progress
- Warnings and Errors
- Full types support
- INT
- REAL
- STRING
- BOOL
- More...
- Declaration
- Arrays
- Dicts
- Custom Types
- Debug Block
- Assign
- Output
- Input
- IF...
- WHILE...
- REPEAT...
- FOR...
- Procedure...
- CALL...
- FUNCTION...
- RETURN...
- CASE...
- More Features...
Contributing
If you want to see the debug info for the compiler, call the command with --debug
For example
.\pypse.exe ..\test\test.5.pse --debug
Feel free to report issues and make contributions
Promote
Spread it around your classes if you also find the need for such a compiler!
Thanks for your support.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pypse-0.0.1.tar.gz
.
File metadata
- Download URL: pypse-0.0.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e701a6d5ade5d22f5054ec29dee856c38c63e2bf21f68f11ae9a99d4eb4b881 |
|
MD5 | ce696511237bbedd8a24d3b9013e810f |
|
BLAKE2b-256 | 05fe9b1712f776fb1756866542ef0d8afc8b85c39fe19c8f2ff5107f5a794ff5 |
File details
Details for the file pypse-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pypse-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa81f5135a36d8b560080ded0f3a19bb6088f1c106281b950c214898c61da22b |
|
MD5 | 73cea5d35d7c24ea918f6bd286a588b5 |
|
BLAKE2b-256 | d31b8e4a440250219ce3342bcad35d697f911cf6855f2d6508a04156ffb4a62b |