Skip to content

jabluko/nLang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

117 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nLang

nLang is an interpreted, procedural language with static type checking.

Getting started

To compile the project:

make

Afterwards interpreter binary should be created in the current directory. To run it pass the path to the source code.

./interpreter code.n

Language features

  • Functions: First-class functions with recursion, passing as arguments, and function literals
  • Operations: Arithmetic, comparisons, and compound assignments (+=, -=, etc.)
  • Arrays: Integer-indexed arrays and dictionaries
  • Scoping: Static binding with nested function definitions and variable shadowing
  • I/O: Built-in print function for output

Example


int printAfterChange (int a, int(int) f) {
    printInt(f(a));
};

main() {
    int x(int a) {return a + 1;};
    printAfterChange(2,x);
}

Motivation

Program Semantics and Verification course at the Faculty of Mathematics, Informatics, and Mechanics, University of Warsaw

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •