Skip to content

About

A toy interpreter for the `while` language

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

While-Lang

Statements

Syntax should be like the one discussed in class. The only addition is the print-statement in the last line. You can use ?VAR to print a variable, where VAR is the variable in question.

x0 := x1 + 0;

x2 := x2 + 1;
x2 := x2 + 1;

WHILE x2 != 0 DO
    x0 := x0 + 1;
    x2 := x2 - 1;
END;

?x0;

Execution

  • Clone the project
  • Execute: cargo r <filename>

About

A toy interpreter for the `while` language

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages