Skip to content

hpi23/while-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages