Skip to content

frigtear/Iowa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iowa

Build Status License

Iowa is a simple, high‑level interpreted language designed for readability. Inspired by modern scripting languages, Iowa offers a clean syntax, dynamic typing


Table of Contents

  1. Features
  2. Prerequisites
  3. Building from Source
  4. Running Tests
  5. Usage
  6. Examples

Features

  • Interpreted: No compilation step—run scripts directly.
  • High-Level Syntax: Clean, human-readable code.
  • Dynamic Typing
  • Platform: Anything Unix

Prerequisites

Before you begin, ensure you have the following installed on your system:

  • clang
  • GNU Make
  • Git

Building from Source

Use make to compile the interpreter:

make

The executable will be placed in the bin folder.


Running Tests

Build and run tests

make run 
# or
./run.sh

Usage

Invoke the interpreter with a script path:

./bin/Iowa path/to/script.ia

Run it:

./bin/iowa hello.ia

Examples

Example 1

set number = 0;

console_out(number);

loop (number <= 5){
    console_out(number);
    set number = number + 1;
}

Output:

0
0
1
2
3
4
5
6

Example 2

set number = 3;

console_out (number == 5);

if (number == 5) {
    console_out ("number is 5");
}
else {
    console_out ("number is not 5");
}

Output:

false
number is not 5

Example 3

console_out ((((2 + (5 * (3 - 1))) + 1) + (4 - 3) + 3) + (3 + 3) + (4 / 2) / (9 * 2));
console_out (false && (false || true) || (false && false));

Output:

23
false

Example 4

set x = 5;
set y = 2;

console_out(x*y);

{
    set x = 2;
    console_out(x*y);
    
    if (x*y == 4){
        console_out("Hello World!");
    }
    else {
        console_out("Goodbye World!");
    }
}

Output:

10
4
Hello World!

About

Iowa is a high‑level interpreted language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors