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.10

Install from PyPI

Install the latest stable release.

pip install nova-pl

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
          │
          ▼
v1.1 ── LTS Release, Semantic Highlighting & Tooling

🌐 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/stdlib Standard Library reference
🔧 Built-in Functions https://nova.varundubey.dev/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.1.0.tar.gz (38.4 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.1.0-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nova_pl-1.1.0.tar.gz
  • Upload date:
  • Size: 38.4 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.1.0.tar.gz
Algorithm Hash digest
SHA256 e15336581e1302b97c4998ccb5d5f7ee5c491bcbb56a9e166547d3bee013a4b0
MD5 30cd78222b7d9961092bb38ff94ef2cd
BLAKE2b-256 26111cbacd44358d3bd4891d73c87cdda04a08fb2f401aa6385d777116c0100d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nova_pl-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 48.5 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a63d98e8f3150d7ebb7062ed460a1676b059b354cc527d86d5021d5b6f9e4ff
MD5 7fd29620cf1af004cbcb121506c61f70
BLAKE2b-256 b2ec3d6039efb89172a6240b094235236c51ba3d854fcd67e0bd23b2ff4bec17

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