THE   GOO   TRANSLATOR

The Goo translator is a Euphoria program whose aim is to take a source file written in Euphoria with some extensions and translate it into a 'normal' Euphoria file which can be executed bt the Euphoria interpreter. The added Goo syntax is in three areas:   Namespace extensions implement a simple approach to dis-ambiguating include files with identically-named globals;   Shorthands add some 'improvements' to the Euphoria syntax, mainly aimed at reducing the need to enter identifiers multiple times;   Finally, a substantial Class system is added, featuring multiple inheritance, virtual functions, dot notation, and a somewhat restricted polymorphism.

Running Goo
The translator is run from a Dos Box with a line like:
exw goo mysrc.ext
or:
goo mysrc.ext
for the bound version.
The extension .ext defaults to .goo if not given. Goo reads in mysrc.ext, translates it into mysrc.gxw, and gives you the option of running the new mysrc.gxw with Euphoria. If the source file include's any .GOO files, they are also translated into their .gxw equivalents. If the source file contains any .GCL files (Goo classes) they are translated into .G files. Once mysrc.goo has been translated, it may be run like any other Euphoria file:
exw mysrc.gxw

Other command line examples
There is currently on implemented command-line flag.
exw goo mysrc -Bbin
The -B flag causes Goo to place some generated files in a subdirectory named bin. These are the .G files generated from .GCL (class) files and the mysrc.grt run-time support file needed by objects. This cal help reduce the clutter of having both Goo and Euphoria versions of everything.
goo demo\mysrc
Goo changes to the directory 'demo' , then translates mysrc.goo there.


Demos

The Demo subdirectory contins several simple demo/test programs which exercise the capabilities of Goo, and which may be an easier explanation of those capabilities than these html files.
shands.goo A test/demo program for the shorthands of Goo
nmsp.goo A simple demo of namespaces
nmsp1.e,  nmsp2.e Two nearly identical (Euphoria) files which nmsp.goo separates with namespaces.
poly.goo A contrived example of Goo's version of polymorphism.
classes.goo Some basic examples of classes.
clsinit.goo An example of Goo objext initializers.
passref.goo Use of classes to do pass-by-reference
virtual.goo Use of virtual methods.
virt2.gcl A class used by virtual.goo.
multiple.goo Demo of multiple inheritance.
locals.goo Illustrates instances used as locals.
clsinit.goo Class initializers.


Files

goo.exe The main translator (bound by Euphoria)
goo.exw The 'main' module
goo-nms.e Code to handle namespaces.
goo-cls.e Class implementation.
goo-util.e Assorted utilities - push & pop src to handle includes.
regex.e Regular Expressions - The interface to pcre.dll.
pcre.dll Perl Compatible Regular Expressions
demo\* Assorted Goo demo\test programs.
doc\* Documentation files.


Caveats:

This is a alpha release. The basics have been tested in various combinations, but Goo has not been used for anything substantial. There are sure to be some very embarassing errors. In addition, to the extent that capabilities of Goo are desireable, they clearly should be part of the language, rather than added on.