Pseudo
😯 Pseudocode interpreter prototype
Install / Use
/learn @pniedzwiedzinski/PseudoREADME
A prototype of pseudocode interpreter.
Goal
Goal of this project is to enable property and other kinds of testing in pseudocode exercises.
Install
If you're on macOs or Linux you probably have python3 installed. Then it will be easier to install it with pip
Install from source
1. pip
python3.6 or greater. On windows you might need to have pypiwin32 installed
python3 -m pip install git+https://github.com/pniedzwiedzinski/pseudo.git
2. Docker
Download docker and follow instructions:
docker pull pniedzwiedzinski/pseudo
# Create alias
alias pdc='docker run -it --rm -v $(pwd):/home pseudo'
Usage
Create sample file file.pdc
pisz "test"
To run it type:
pdc file.pdc
Sample pseudocode
test.pdc
czytaj n
pisz "Start"
# Pętla wypisuje liczby parzyste od 1 do `n`
i:=1
dopóki i<=n wykonuj
jeżeli i mod 2 = 0 to
pisz i
T[i] := 1
wpp
pisz "nie"
pisz "\n"
i:=i+1
dla a:=1,...,5 wykonuj
pisz a
Features
- [x] printing
- [x] math operations
- [x] math operations order
- [x] type errors
- [x] input variable
- [x] variables
- [x]
koniec - [x] conditional statement
- [x] while loop
- [x] for loop
- [x] arrays
- [x] functions
How it works
W.I.P.
http://pseudo.readthedocs.io
