The O language is an Object-Oriented toy language.
A compiler for the O language is made for educational purposes.
The target platform of the project is .NET 6
. It is required to have it installed.
- Open the
.sln
file in Visual Studio or Rider. - Click
Build Solution
orBuild Project
.
You can do either of the following:
- Create a new launch setting based on existing ones.
- Edit any program in
Examples
folder.
After that, select the desired launch configuration and press Launch
. Your IDE should automagically build a compiler for you, and then run the program.
Also, be sure to read through the next section.
Note: currently The O language programs can only be interpreted because .NET 6
does not allow to save binary files. We will be working on this issue soon.
To get familiar with the language, read more about the language documentation (see Additional information).
To run the O language program, you should save it to a file with .ol
format.
Then, run the compiler with the following command:
dotnet OCompiler <module_name> <class_name> [parameters]
module_name
is a path to your.ol
file.class_name
is a name of class whose constructor will be an entry point of the program.parameters
is a space-separated list of parameters for the class constructor (they can only be of a primitive built-in type).
Refer to some other sections in the repository if needed: