Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.
/ pseudo Public archive

😯 Pseudocode interpreter prototype

License

Notifications You must be signed in to change notification settings

pniedzwiedzinski/pseudo

Repository files navigation

pseudo

A prototype of pseudocode interpreter.

  • Linux: CircleCI
  • MacOs: TravisCI
  • Windows: Appveyor

Maintainability Test Coverage

Goal

Goal of this project is to enable property and other kinds of testing in pseudocode exercises.

Install

  1. Download executable from here: download.
  2. Extract archive
  3. Add folder with extracted files to PATH

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

  • printing
  • math operations
  • math operations order
  • type errors
  • input variable
  • variables
  • koniec
  • conditional statement
  • while loop
  • for loop
  • arrays
  • functions

How it works

W.I.P.

http://pseudo.readthedocs.io