Skip to content

rebryk/spbau-compilers

 
 

Repository files navigation

Types

Just Int

stdin/stdout

Read variable read(x)
Write variable write(x)

Operations

  • !!, &&
  • <, <=, ==, !=, >=, >
  • +, -, *, /, %

Loops

If expression

if a == b then
  print(1)
else
  print(0)
fi;
if b != 0 then
  a := a / b
fi;

While Loops

read(n);

while n > 0 do
  print(n);
  n := n - 1
od;

For Loops

for read(n), n > 0, n := n - 1 do
  print(n)
od;

Repeat until

read(n);

repeat
  print(n);
  n := n - 1
until n > 0;

About

SPbAU Compilers course, Fall 16'

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 38.8%
  • Shell 24.6%
  • OCaml 20.4%
  • M4 15.4%
  • Other 0.8%