VastNova is a lightweight, easily embeddable scripting language designed for quick integration and interactive use. It features a minimalistic syntax, dynamic typing, arithmetic operations, conditionals, and I/O, making it ideal for game scripting, configuration files, or educational examples.
- Minimal syntax: intuitive keywords like
print/read(backward compatible without/in) - Dynamic typing: automatically distinguishes numbers and strings
- Arithmetic:
+-*/with operator precedence - Conditionals:
><==!=and&&||, with string comparison support - Interactive input: via
inputorread - Comments: single-line
//or#, multi-line!# ... #! - Header-only, depends only on C++ standard library
Copy vastnova.h into your project directory and include it:
#include "vastnova.h"
int main() {
vast(R"(
print "Hello, VastNova!"
var name = input "What's your name? "
print "Nice to meet you, " name
)");
return 0;
}Compile with C++11 or later.
The provided main.cpp offers a simple interactive interpreter:
$ ./vastnova
Vastnova 0 beta6
Welcome!
>>> print "Hello"
Hello
>>> var a = 10
>>> a = a * 2
>>> print a
20
>>> exit
goodbye!$ ./vastnova script.vnFor detailed syntax examples, please refer to the examples/ directory. Each example file is commented to illustrate specific language features.
Full documentation: vastnova.pages.dev
If you use the supplied main.cpp, compile with:
g++ -std=c++11 main.cpp -o vastnova- 0 beta6: Added
print/readkeywords (backward compatible without/in); error messages and comments now in English
MIT License