The Panini Programming Guide

Downloading the Compiler

The Panini compiler can be obtained in the following forms:

For starting out, we would recommend the pre-built binaries that account for all dependencies. The following instructions assume the use of the pre-built package.

Structure of Panini Distribution

The archive file contains the following:

  • bin: Executable versions of the Panini compiler for both *nix and WIN environments.
  • lib: Jars files for panini.
  • examples: Some small examples of new Panini features.
  • license: License agreements under with the Panini Compiler and associated tools are available.
  • README: A textual version of this page.

Requirements for Running Panini Compiler

  • Java Runtime Environment(JRE) 1.6 or greater.
  • Apache Ant is also recommended.

Running the Panini Compiler

The Panini compiler can be used in two ways:

  • like javac from the command-line
  • as a replacement builder for javac in the javac ant task.

The following sections describe usage.

Running the Panini Compiler from the command-line

The bin folder in this distribution contains scripts that can be used to run the Panini compiler and to start compiled Panini programs.

  • bin/panc and bin/panini : the command-line interfaces for *nix systems.
  • bin/panc.bat and bin/panini.bat : the command-line interface for WIN systems.

The panc and panc.bat scripts have an interface like javac. The panini and panini.bat have an interface like regular java program.

Compiling Examples from Command-Line

Examples of some small Panini programs are located in the examples folder. To compile an example, navigate to its directory and use Panini compiler just like javac.

For example, to manually compile the Dining Philosophers example, navigate to the examples directory and type ../bin/panc Philosophers.java.

Running compiled Panini programs requires the panini runtime be on the jvm classpath. The required runtime classes are in PANC_HOME/lib/panini_rt.jar. The panini script, packaged in the bin directory, automatically starts a jvm with the correct library on the classpath.

Use $PANC_HOME/bin/panini AppEntry to run these programs.

Running the Panini Compiler from Within Ant

The panini compiler can be used in an ant build script by replacing the jar file used by the javac task. See the OpenJDK notes in the Ant manual for more information.






    
        
    



    
    

Acknowledgments and Licensing

The Panini compiler builds on the OpenJDK java compiler.

All necessary licenses are included in the license directory.

The Panini compiler is licensed under the Mozilla Public License version 1.1 (MPL 1.1) license. You may obtain a copy of the license at http://www.mozilla.org/MPL/.

Page last modified on $Date: 2013/08/03 14:04:23 $