Skip to main content

A simple, modern, statically-typed programming language implemented in Python.

Project description

NOVA

A simple, modern, statically-typed programming language implemented in Python.

Version Python License Status Interpreter

FeaturesImplementationDocumentationInstallationTry NOVAWebsite

NOVA is a statically-typed programming language built entirely from scratch using a handwritten lexer, recursive-descent parser, abstract syntax tree (AST), module system, and tree-walk interpreter.

The project demonstrates the complete implementation of a programming language—from lexical analysis to runtime execution—while remaining approachable enough to study, extend, and experiment with.


✨ Features

  • Modern statically-typed language
  • Clean and readable syntax
  • Rich primitive and collection types
  • Runtime type checking
  • Schema-based structured data
  • User-defined functions
  • Recursion
  • Module system
  • Import / Export support
  • Standard Library
  • Built-in functions
  • Command-line interface
  • Comprehensive documentation
  • Hundreds of runnable examples

⚙️ Implemented Components

  • Handwritten Lexer
  • Recursive-Descent Parser
  • Abstract Syntax Tree (AST)
  • Runtime Type System
  • Tree-Walk Interpreter
  • Module Loader
  • Module Resolver
  • Circular Import Detection
  • Standard Library
  • Built-in Function System
  • CLI
  • Source-aware Diagnostic System

🚀 Example

import math
import stats
import random

User: M = {
    name: S,
    scores: [N]
}

student: User = {
    name = "Varun",
    scores = [
        92,
        87,
        95
    ]
}

print(student.name)

print(
    "Average:",
    stats.mean(student.scores)
)

print(
    "Square:",
    math.pow(5, 2)
)

print(
    "Lucky Number:",
    random.randint(
        1,
        10
    )
)

Output

Varun
Average: 91.33333333333333
Square: 25
Lucky Number: 7

🏗 Architecture

             Source Code
                  │
                  ▼
          Handwritten Lexer
                  │
                  ▼
     Recursive-Descent Parser
                  │
                  ▼
      Abstract Syntax Tree
                  │
                  ▼
        Module Resolution
                  │
                  ▼
      Tree-Walk Interpreter
                  │
                  ▼
         Runtime Values

📚 Documentation

The repository contains complete language documentation covering every released version.

Language

Documentation Description
Language Specification Complete language reference
Release Notes Detailed release history
Changelog Version overview

Standard Library

Module Documentation
Math math.md
Array array.md
Random random.md
Statistics stats.md
Time time.md

Complete Reference


Built-in Functions

Documentation

Available Categories

  • Arrays
  • Strings
  • Input
  • Type Conversion

Examples

Every language release includes runnable demonstrations and error cases.

examples/

├── v0.1
├── v0.2
├── v0.3
├── v0.4
├── v0.5
├── v0.6
├── v0.7
├── v0.8
├── v0.9
└── v1.0

📦 Installation

Requirements

  • Python >= 3.13

Install from PyPI

Install the latest stable release.

pip install nova-lang

Verify the installation.

nova --version

Run a NOVA program.

nova hello.nova

Build from Source

Clone the repository.

git clone https://github.com/varundubey-dev/nova.git

cd nova

Install the development version.

pip install .

Or install in editable mode while contributing to NOVA.

pip install -e .

🏛 Repository Layout

nova/
│
├── lexer/
├── parser/
├── ast/
├── interpreter/
├── modules/
├── stdlibs/
├── api.py
└── cli.py

docs/
├── syntax/
├── stdlib/
├── builtins/
└── releases/

examples/
├── v0.1
├── ...
└── v1.0

📈 Evolution

v0.1 ── Core Language
          │
          ▼
v0.2 ── Primitive Type System
          │
          ▼
v0.3 ── Arrays
          │
          ▼
v0.4 ── Schema Maps
          │
          ▼
v0.5 ── Control Flow
          │
          ├── v0.5.1  Multi-expression print()
          ▼
v0.6 ── Iteration & Loops
          │
          ├── v0.6.1  break / continue
          ▼
v0.7 ── User-defined Functions
          │
          ▼
v0.8 ── Built-in Functions
          │
          ▼
v0.9 ── Module System
          │
          ▼
v1.0 ── Standard Library

🌐 Official Website

The NOVA website provides everything needed to learn, explore, and experiment with the language directly in your browser.

Resource Link Description
🏠 Home https://nova.varundubey.dev Project homepage
🚀 Playground https://nova.varundubey.dev/playground Run NOVA programs online
📖 Documentation https://nova.varundubey.dev/docs Complete language documentation
📚 Standard Library https://nova.varundubey.dev/docs/stdlib Standard Library reference
🔧 Built-in Functions https://nova.varundubey.dev/docs/builtins Built-in function reference
💡 Examples https://nova.varundubey.dev/examples Interactive examples
📰 Release Notes https://nova.varundubey.dev/releases Complete release history

💻 Try NOVA

Run Locally

git clone https://github.com/varundubey-dev/nova.git

cd nova

pip install .

nova hello.nova

Run in Your Browser

Visit the NOVA Playground.

https://nova.varundubey.dev/playground

No installation required.


⭐ If you found NOVA interesting, consider starring the repository!

Built from scratch in Python.

Made by Varun Dubey

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nova_pl-1.0.0.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nova_pl-1.0.0-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file nova_pl-1.0.0.tar.gz.

File metadata

  • Download URL: nova_pl-1.0.0.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for nova_pl-1.0.0.tar.gz
Algorithm Hash digest
SHA256 eda1e13196072762908079f221fa7d6b014287582efe8a348bc961e084de35c9
MD5 2c56f251a543d16c8eff2966649f21ca
BLAKE2b-256 6868a39e156d7a1da1046a97a49d2aeac5576a4f9c9f732b9f0f250c6e1ec73e

See more details on using hashes here.

File details

Details for the file nova_pl-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nova_pl-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for nova_pl-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 810709e89697db5b7b69d34c5dc4399dc5b309a2c9b3beb8d9a0c87cd28cde2b
MD5 ae657125970561260729f14aff3ecb16
BLAKE2b-256 85b517acd044687f0685b29c02d80660952c5361fe26530a664da468fa976640

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page