Skip to content

tniessen/loop-while-goto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

loop-while-goto

This is a web-based interpreter for the LOOP, WHILE, and GOTO programming languages. The parser and compiler understand each language by itself, but also arbitrary combinations of language elements of all three languages.

The parser can be configured to allow any subset of the three languages.

LOOP

LOOP was originally specified in The complexity of loop programs (1967) by Albert R. Meyer and Dennis M. Richie.

Unlike most modern programming languages (and unlike WHILE and GOTO), this programming language is not Turing-complete. The set of functions that can be computed by LOOP programs is the set of primitive recursive functions, which is a subset of the set of Turing-computable functions.

WHILE

WHILE is very similar to LOOP but allows WHILE statements in addition to the basic LOOP construct. This programming language is Turing-complete.

GOTO

GOTO (German Wikipedia page) does not require LOOP or WHILE statements, but is just as expressive as WHILE.

Syntactically, GOTO is mostly compatible with LOOP and WHILE. However, the synax of IF statements is slightly different. The interpreter allows using either syntax in all three languages.