Home > Delphi, JavaScript, Object Pascal, OP4JS, QTX, Quartex Pascal, Smart Mobile Studio > Converting QTX Pascal to FreePascal/Lazarus

Converting QTX Pascal to FreePascal/Lazarus

September 23, 2014 Leave a comment Go to comments

As you may remember, I run a second website for Quartex Pascal, a research IDE for custom compiler technology. Aiming first and foremost to be the object-pascal equivalent of Eclipse. In many ways QTX continues where Smart Mobile Studio ends. Smart Mobile Studio targets HTML5 exclusively – aiming to be the best Object Pascal to JavaScript compiler on the marked — but Quartex Pascal is a very different beast all together.

The QTX IDE has so far been written in vanilla Delphi XE2 and XE3. It uses plain generics and is otherwise without external dependencies. The editor functionality is provided by a forked version of SynEdit, and as of writing the DWScript engine is the primary code generator framework. But depending on how portable DWScript is (a port of DWScript is reported to be in circulation, but if it supports the code-generator framework added by Eric Grange is unknown at this point) that will probably change.

There is also a secondary code generator framework being written for it, which uses Castalia for parsing and building the AST (abstract symbol tree). It is also capable of parsing visual basic .net (OOP, rule based parsers are very easy to write using my framework). The parser/tokenizer constructs an AST using an intermediate language format, which in turn can be stored as plain XML. This is quite revolutionary because it means – that turning the intermediate code into “real” code is now a matter of XML transformation, which is an off-the-shelf technology tried and tested by time. Ultimately, QTX may use the freepascal universal compiler itself to build “real” applications, or custom code generators – targeting mono C#, GCC or any other native compiler available on a target system.

Porting to freepascal

In order to support more platforms I have decided to port my work wholeheartedly to freepascal. This does not mean that Windows wont be supported anymore, or that I’m abandoning ship – far from it; it means that QTX will eventually be available for Windows, OS X, Linux, Amiga OS and MorphOS to name a few.

I will no doubt continue to work with Delphi for a long time, but I must admit that I am beginning to phase out Embarcadero from my toolkit, in favour of FreePascal, JavaScript and C#. Delphi’s pricing has become ridicules, the generated code is not what it used to be – and since FreePascal and Lazarus have reached a point of quality that is hard to rival — I see no reason continuing to pay top dollar to a company so clearly hostile to Smart Mobile Studio. In fact, they threatened to poll their funding for a “famous Delphi event” if Smart Mobile Studio was allowed to be presented — which is just plain unacceptable behavior for a company like Embarcadero.

If you have never tried Freepascal + Lazarus under Ubuntu, I sincerely urge you to install it. It truly is a fantastic experience!

My desktop right now

My desktop right now

 

Advertisements
  1. September 19, 2015 at 8:25 am

    That is great news that you are porting DWScript to FPC. I think someone was trying this but failed…
    Will you share your ported version of DWScript with the developer community of FPC?

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: