Skip to content

Nutri-lang is an educational programming language designed to showcase the inner workings and concepts behind interpretive languages. It serves as a simple and straightforward example to demonstrate how source code is parsed, interpreted, and executed in a step-by-step manner.

Notifications You must be signed in to change notification settings

0xa48rx394r83e9/Nutri-lang

Repository files navigation

Nutri-lang

example

  1. 📚 Language Specification

    • Syntax and Grammar:
      • Variables: var x = 10;
      • Arithmetic operations: +, -, *, /
      • Comparison operators: ==, !=, <, >, <=, >=
      • Control flow: if, else, while, for
      • Functions: func add(a, b) { return a + b; }
    • Data Types: int, float, bool, string
  2. 🧩 Lexical structure — (recursive descent parser for simplicity)

    • Lexical structure:
      • Keywords: var, if, else, while, for, func, return
      • Identifiers: Alphanumeric characters and underscores, starting with a letter or underscore.
      • Literals: Integers, floating-point numbers, booleans (true, false), strings (enclosed in double quotes).
      • Operators: +, -, *, /, ==, !=, <, >, <=, >=, =
      • Delimiters: (, ), {, }, ;

About

Nutri-lang is an educational programming language designed to showcase the inner workings and concepts behind interpretive languages. It serves as a simple and straightforward example to demonstrate how source code is parsed, interpreted, and executed in a step-by-step manner.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages