Gungy2 / pseudocod

Simple interpreter for the pseudocode langauge used to teach programming in Romanian high schools, made in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pseudocod Rust

Simple interpreter for the pseudocode langauge used to teach programming in Romanian high schools. It is made entirely in Rust, using the Nom parser.

Usage

In order to run the interpreter with a file, execute the command:

cargo run -- filename

Example of pseudocode

scrie 'Introduceti n:'
citeste n
daca n = 0 atunci
  scrie 'fib(', n, ') = ', 0
altfel
  daca n = 1 atunci
    scrie 'fib(', n, ') = ', 1
  altfel
    x <- 0
    y <- 1
    pentru i <- 0, n - 2 executa
      tmp <- x
      x <- y
      y <- tmp + x
    scrie 'fib(', n, ') = ', y

Using it for teaching

If you are a teacher that wants to use the tool, feel free to contact me and I will do my best to add any features that you feel are missing!

About

Simple interpreter for the pseudocode langauge used to teach programming in Romanian high schools, made in Rust.

License:MIT License


Languages

Language:Rust 96.7%Language:SCSS 1.9%Language:HTML 1.0%Language:Dockerfile 0.4%