Skip to content

yukatan1701/Julia-plus-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Julia++

This is my simple programming language created for the semester work. It has no dependence with the already existing language Julia and is named only in honor of the author.

Features:

  • comment support;
  • label and goto support;
  • several operators for output;
  • increment and decrement support;
  • double (and more) assignment;
  • function support and automatic type detection (void or int);
  • recursion support;
  • detailed error messages;
  • local and global scopes.

How to use it?

  1. Use this command to build the library:
make lib
  1. Put the julia.a archive in the project directory and include it:
#include "julia.a"
  1. Library supports two modes.
  • File mode (the text of your code):
Julia julia;
std::ifstream file("code.jul");
julia.run(file, debug_mode);
  • String mode:
Julia julia;
// some function to get a string with the code
// (use ';' as a sepatator for lines)
std::string code = read_code();
julia.run(code, debug_mode);

debug_mode is a boolean value. Set true if you want to print debug information and false otherwise. 3. Put the include folder in the project directory and compile:

g++ main.cpp julia.a -I include -o main
  1. Run with parameters:
./main -f examples/07-scopes.jul -d

After-f, enter the file name (your code). Set -d if you want to see the debug information.

How to learn it?

Use the examples directory as a tutorial. Every file contains all necessary language information and features description.

About

My simple programming language "Julia++".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors