First of all, the Cyan compiler works in Windows. The jar file should work in Linux too.
The available downloads are: The Cyan compiler, the libraries, the Cyan tests, the source code of the compiler, the Cyan compiler as a Jar file, and some external libraries needed to compile the Cyan compiler.
Rename the file ‘saci-change-to-exe.txt’ to “saci.exe”.
Suppose you downloaded and uncompressed the files above to directory C:\Dropbox resulting in the following hierarchy.
To compile the project of the directory ‘master’ type the following in the DOS command prompt:
C:\> cd Dropbox
C:\Dropbox> saci "C:\Dropbox\cyanTests\simple" -cyanlang "C:\Dropbox\lib" -javalib "C:\Dropbox\lib\javalib"
Make sure that programs ‘javac.exe’ and ‘java.exe’ of the JDK are in the PATH environment variable. Type
If javac.exe or java.exe was not found, you will need to correct the ‘Path’ environment variable. Usually javac.exe and java.exe are in a directory like
Go to Control Panel/System properties/edit environment variables and insert something as
to ‘Path’. Make sure this path is the first of the list. If it is not and you are using Windows 10, move this path to the first position using the menu on the right.
After some updates from Oracle, it may be that this address ends in second place. This causes errors in the Cyan compiler because it will not find java.exe or javac.exe. Then if the Cyan compiler stops working suddenly, change the Path environment variable by moving the above path to the first position.
The Cyan compiler produces Java code that is then compiled and run. The Java code produced is put in a directory
C:\Dropbox\cyanTests\java-for-master for a project that is in directory
The compiler has some options:
- -nojavac to compile to Java only. The Java compiler is not called;
- -noexec to compile the Cyan code to Java but without running it;
- -args argList
arguments to the Cyan program. The arguments that follow ‘-args’, argList, will be passed to the Cyan program if it is to be executed. It is not an error to have both options -noexec and -args. Of course, this should be the last option in the command line;
- -sourcePath aPath
for supplying ‘aPath’ for the Java compiler. This option can appear any number of times. Each time can be composed by multiple paths, separated by ‘;’;
- -cp aPath
for supplying ‘aPath’ for the Java interpreter. This option can appear any number of times. Each time can be composed by multiple paths, separated by ‘;’.
Read this instructions to compile the Cyan compiler.
There is a feature of the Cyan language called “Codeg” (code + egg). It needs a plugin to the IDE to work. See the instructions of how to install and use it here.
The license of the compiler source code is GNU Public License version 3. There is not much documentation on the compiler because it is constantly been changed.
The compiler construction received funding from FAPESP, a research financial agency of the State of São Paulo, Brazil. The process number is 2014/01817-3.