Downloads

First of all, the Cyan compiler works in Windows. A jar file used to work in Linux too but probably this is not true anymore. Anyway, it may work, although there is no guarantee about that.

The available downloads are:

After clicking on the download link, go to the end of the page, after a window with error. There should be another download link there (I do not know how to correct this error!).

Suppose you downloaded and uncompressed the files above to directory

    C:DropboxCyan

resulting in

    C:DropboxCyanlib

    C:DropboxCyancyanTests

    C:DropboxCyanlibsrc

The last directory, src, is only necessary if you intend to compile the Cyan compiler or to look at the code. Create an environment variable called CYAN_HOME whose contents is

C:DropboxCyanlib

Create an environment variable called JAVA_HOME_FOR_CYAN whose contents is the  directory of JDK 1.8. Something as:

C:Program FilesJavajdk1.8.0_241

The Cyan compiler has been tested only with Java 1.8 (use the most recent version of JDK 1.8). A newer version of JDK, like 1.9, may not work. Remember that, if an environment variable is set using the Windows 10 menus, it is only visible in command prompts and PowerShell windows opened after the variable was set. If variable JAVA_HOME_FOR_CYAN is not set, the Cyan compiler will use a Java subdirectory of

C:Program FilesJava

that corresponds to a newer JDK version.

To compile and execute the project of the directory ‘helloWorld’ type the following in the Windows command prompt:

C:> cd DropboxCyanlib
C:DropboxCyanlib> .saci "C:DropboxCyancyanTestshelloWorld"

To run the program again, type

C:DropboxCyanlib> C:DropboxCyancyanTestshelloWorldhelloWorld.cmd

The compiler will create a .cmd file with the name of the last directory of the path. You can compile without executing by using option -noexec:

C:DropboxCyanlib> .saci -noexec "C:DropboxCyancyanTestshelloWorld"

In general,  type

C:DropboxCyanlib> .saci "C:DropboxCyancyanTestsmyFirstProgram"

in which myFirstProgram  is the directory with the Cyan packages. There should be at least one directory ‘main’ with a file ‘Program.cyan’ in it. In Linux, if you want to try, use

$ cd DropboxCyanlib
$ java -jar saci.jar "DropboxCyancyanTestshelloWorld"

There is no equivalent of a .cmd file for Linux.

The Cyan compiler produces Java code that is then compiled and run. The Java code produced is put in a directory C:DropboxCyancyanTestsjava-for-master for a project that is in directory  C:DropboxCyancyanTestsmaster.

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;
  • -java if Java code is used in the Cyan code;
  • -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 these 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 on 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.