A simple interpreter for the ‘ΓΛΩΣΣΑ’ programming language.
Java GAP Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
readme
src
.gitignore
Makefile
README.mkdn
build-common.properties
build-linux.properties
build.properties
build.xml
glossa-interpreter
test.gls

README.mkdn

#Glossa-Interpreter

An interpreter for the 'ΓΛΩΣΣΑ' programming language developed using Antlr 3.2 and Java.

##License

Copyright (c) Georgios Migdos

Source code is available under the terms of the MIT license.

Antlr 3 is copyright of Terence Parr and it is available under the terms of the BSD license.

jOpt Simple is copyright of Paul R. Holser and it is available under the terms of the MIT license.

TxtMark is copyright of René Jeschke rene_jeschke@yahoo.de

##Status

The interpreter can now execute all valid ΓΛΩΣΣΑ programs.

  • Lexer/Parser: Errors/warnings in Greek ✔
  • Static type analysis: Errors/warnings in Greek ✔
  • Runtime errors/warnings in Greek ✔
  • Lexer/Parser: Main program structure ✔
  • Static type analysis: Main program structure ✔
  • Statement execution: Main program structure ✔
  • Built-in functions ✔
  • Lexer/Parser: Functions ✔
  • Static type analysis: Functions ✔
  • Statement execution: Functions ✔
  • Lexer/Parser: Procedures ✔
  • Static type analysis: Procedures ✔
  • Statement execution: Procedures ✔
  • Command-line interface ✔
  • Step-by-step execution ✔

(The GUI Swing components have been moved to a separate project.)

✔ = completed, ⟳ = in progress, ✘ = not implemented yet

##Build instructions

To build the project’s code you will need :

  • JDK (6.x+). You can install it on Ubuntu with:

    sudo apt-get install openjdk-6-jdk

  • Apache Ant (built-in in Netbeans). You can install it on Ubuntu with:

    sudo apt-get install ant

  • Antlr 3.2 (*)

    sudo apt-get install antlr3

  • JOpt Simple (*)

    sudo apt-get install libjoptsimple-java

(*) If you have an active internet connection antlr and jopt-simple will be downloaded automatically to the correct directory during the first build, otherwise you have to copy antlr-3.2.jar and jopt-simple-3.2.jar to glossa-interpreter/lib/ (on Linux systems you can use the make file and use the installed libraries instead).

Open a terminal and give: ant clean dist

On Linux systems you should use the included makefile: make

and to install the application: sudo make install

In order to build a tarball for version x.y.z, after building give: ant create-tarball -Dversion=x.y.z

##How to run the interpreter

To run the interpreter you must have a JRE (6.x+) installed. Then you can give:

./glossa-interpreter <input_file>

e.g.:

./glossa-interpreter src/glossa/samples/PrintTest.gls

If you are on a Linux system and have installed the application as per the instructions above, you can use the command:

glossa-interpreter <input_file>

from any directory.

![Screenshot][screenshot] [screenshot]: http://img338.imageshack.us/img338/3604/screenshotme.png "Screenshot of the interpreter running a sample input file in Ubuntu 10.10"

For more information give:

./glossa-interpreter glossa.Main -h

##Samples

There are some example input files in:

src/glossa/samples/