GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cedricfauth/The-LOOP-LANG: Interpreter for an educational pseudo language.

BranchesTags
Open more actions menu

Latest commit

 

History

48 Commits
48 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
INSTALL.md
INSTALL.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
lib.loop
lib.loop
 
 
makefile
makefile
 
 
mult.loop
mult.loop
 
 
test.loop
test.loop
 
 
test2.loop
test2.loop
 
 
test3.loop
test3.loop
 
 

Repository files navigation

The-LOOP-LANG

https://en.wikipedia.org/wiki/LOOP_(programming_language)

Installing and usage: CLICK HERE

An attempt to build an interpreter for the theoretical LOOP language.

Default grammar of loop:

P := Xi := Xj + c
   | Xi := Xj - c
   | P;P
   | "LOOP" Xi "DO" P "END"

(where i,j are natural numbers)

Features of the interpreter:

The interpreter has some additional features which may simplify writing programs:

  • Arbitrary long expressions when assigning variables like: X4 := X3 - 2 + A42 + 123 + 314159
  • The interpreter supports variable names starting with a capital letter followed by 1 to 2 digits, e.g.: X12, A2, G34, ...
    • Not allowed are names like: X, R342, HE, %§&, ...
  • As in the original language, programs need to be separated by a semicolon
  • Variables are initialized to 0 by default
  • Output variable is always X0
  • Values of input variables (starting with X1, X2, ...) need to be specified by the input parameter: -in=VALUE1,VALUE2,...
  • LOOP statements can handle expressions as condition like: LOOP 4 + X1 DO ...

Upcoming features:

! CURRENTLY THE PROJECT IS DISCONTINUED !

  • Custom definition of new keywords and reuse of programs
  • Library support
  • Debugging mode where a program is interpreted step-by-step

Internal grammar of this interpreter:

program   -> statement ( ";" statement )* ;

statement -> loop
             | assign ;

loop    -> "LOOP" var "DO" program "END" ;
assign  -> var ":=" expr ;

expr    -> add ;
add     -> primary ( ("+"|"-") primary )* ;
primary -> var | number ;

var     -> {A,...,Z} x {0,...,99} ;
number -> {0,...} ;

About

Interpreter for an educational pseudo language.

en.wikipedia.org/wiki/LOOP_(programming_language)

Topics

interpreterlanguageloopprogrammingprogramminglanguage

Resources

Readme
License
Activity

Stars

4 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.