Skip to content
tinyinterpretersPublic

About

The first Tiny Interpreters interpreter. It takes a non-negative integer literal from source text to value.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

CONST

CONST is the first interpreter.

A complete program is a non-negative integer literal:

123

We get to follow a complete program from source text to an evaluated value:

flowchart TD
    A["123"] -->|parse| B["Program (Const 123)"]
    B -->|evaluate| C["VNumber 123"]
Loading

For a closer look at each step, read CONST: From Source Text to Value.

Try it

You'll need Nix with flakes enabled.

nix develop
elm repl

Then:

import CONST.Interpreter as I

I.run "123"
-- Ok (VNumber 123)

About

The first Tiny Interpreters interpreter. It takes a non-negative integer literal from source text to value.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages