Welcome to The Billboard on the Nullarbor. This site is for developers with existing code written in the xbase family of languages, specifically Xbase++, Clipper and (x)Harbour, who might wish to translate that code to other languages and platforms.
OxIDE is a tool to assist developers to easily and incrementally migrate their Xbase++ and/or Clipper applications into the .NET v2 environment, by translating Xbase++/Clipper code into IronPython, C# or JavaScript. OxIDE is free and open-source software.
OxIDE contains a preprocessor and parser for the Xbase++/Clipper language which converts input (.prg) files to XML representations of the parse result. It also contains an integrated XSLT processor (a wrapper around the excellent NXSLT2 product, for transforming the XML parse result to other languages, documentation extraction etc. Included are XSLT scripts for converting to IronPython, JavaScript, Csharp and Gsharp.
The product is also provided as a library so that translated scripts are able to interpret (parse and translate) Xbase++ codeblocks at runtime (they may be stored inside data tables, or XML files for example).
The main goals of the project, in order of priority, are.
It should be apparent to the attentive reader that the above goals are somewhat antithetical to each other - particularly the first two. How successful I have been in meeting and reconciling the above goals I leave for others to judge.
Full source code can be downloaded from here. It has been developed using Visual C# Express 2005, and the project files are included. Compiled executables are included, as are all the XSLT scripts and the runtime support IronPython scripts.
Alternatively, you can download just the executables, the XSLT scripts and the runtime support from here.
Please visit the IronPython website to download your copy of IronPython.
In order to run any of the above you will need to have the .NET v2.0 Runtime installed.
The OxIDE product is free and open-source software. No registration is required for download.
All files, including C#, XSLT and runtime support programs/scripts, are released under by a standard BSD style license. Note that this license will have absolutely no effect on any generated (translated) code produced by the tool.
Ad-hoc support is available for the price of $AU 120.00 per incident.
One year's pre-paid support, is available for the price of $AU 500.00, with no limit on the number of incidents.
Support services can be paid-for here.
In order to be able to generate valid useful IronPython code, the input language the Transpiler accepts has some differences to Xbase++/Clipper. "OxIDE" is the name I give to the actual language that the Transpiler accepts.
The following differences arise from the need to only accept constructs directly supportable in .NET, or at least those which could be effectively rendered into the .NET world without production of unreadable gobbledygook that mortal programmers could not understand.
OxIDE:
At the moment, XSLT transforms are provided for four different target languages:
Some of the above also come with runtime support libraries. The specifics of each output target are addressed below
The IronPython Translator is fully functional in the sense that it always generates valid IronPython source code, but the runtime support to run said code is still incomplete. At the moment, the general runtime library is well advanced, but the database layer stuff, which attempts to map ADO.NET to the Xbase++/Clipper runtime database interface is somewhat rudimentary, and the user-interface layer is virtually non-existent. Hopefully, both these situations will be remedied in the near future.
The translator generates generic stubs for routines it is unable to resolve, and issues warnings that it is doing so. In order to make a working system, the user will have to resolve all missing symbols in one way or another. (See below for facilities OxIDE supports to achieve this aim.)
For anyone interested in just perusing the results of the translation process, all the Xbase++ source code archives available on this site also now include their equivalent IronPython translations, and the (incomplete!) re-implementation of the Xbase++ runtime in IronPython can be obtained from here.
At the moment, the IronPython support code is incomplete and covers only fairly basic functionality. Rudimentary database layer functions ( dbUseArea(), dbAppend(), eof(), etc. ) are included, but there remains much to be done before these could be used for anything much more than exposition and experimentation. Same goes for the user-interface functionality - either console or gui mode (other than the ubiquitous alert boxes). These database and gui assemblies are still very much under development, but whether, and how soon, I am able to get round to implementing them properly only time will tell. It may well be that I am soon forced into getting a job, which will at the very least slow things down enormously, if not completely stop them. If you would like to assist me in developing the project further, please consider taking out a support contract, or even making a donation.
Following are the salient differences requiring explicit support from the Translator. Simple syntactic differences or features of IronPython not supported by OxIDE or Xbase++ are not mentioned.
IronPython:
I find JavaScript extremely interesting, and have high hopes of eventually being able to make this target at least as good as the IronPython one. At the moment only the barest beginning has been made on the runtime support, and the translation script is also fairly rudimentary.
The C# translation is still very rudimentary with much work remaining to be done. Whilst the translation script works reasonably well, I am yet to make any inroads in implementing the runtime library support. I also remain unclear on some of the thornier technical details e.g. around runtime compilation of codeblocks. Development on this has stalled somewhat due to me having to make a living.
Gsharp is the name is use for the language that the OxIDE parser actually recognises. (and I readily admit the fact that arranging for the extension for G# files to be "gs" was an act of the purest hubris). G# is very nearly a superset of Xbase++, with only exception being that G# provides no support for dynamically scoped variables (aka PRIVATE variables). So any Xbase++ module containing no PRIVATE variables is also a valid G# module.
Unlike Xbase++ however, G# is designed to be (at least partially) an interpreted language, strongly influenced by Python. Just as with Python, G# requires that external references be made explicit using using syntax inspirted by Python import statements. For example:
FROM arraytools REQUEST abinscan,adrop,aminus
would be used to make the four routines "abinscan", "adrop" and "aminus" defined in the arraytools module available throughout the remainder of the current module.
G# also contains syntactic support for the static declaration of types. The only manifestation in the real world of G# is that the OxIDE transpiler can generate Gsharp code using the included xst2gs.xslt script. Conversely, G# programs can be compiled by Xbase++ compilers by inclusion of the supplied "gsharp.ch" header file.
It is planned to convervatively extend the language to include support for Generic Lists and Dictionaries (as provided by the .NET runtime) and TupleTypes which are a bit of a research topic of mine for implementing advanced database binding into the language.
So, the OxIDE tool can be used to process Xbase++/Clipper programs, and output G# programs containing import statements for runtime linking to external modules, and all preprocessing already performed. If the "/infertypes" command line option has been used, then the G# programs will also contain a whole lot of type information not present in the original.
It is my intention to continue developing Gsharp to the point of it being a fully fledged .NET language, with the technical details of how the code is generated, in what language etc. being implementation details not needing to be known or understood by average users. I am still a long way from making this a reality however, and the need to generate some income may well derail me from ever achieving this goal at all. In the meantime, I am hopeful that it might still be useful to people in it's current form.