Islington - A curly bracket precompiler fro PB4+

Developed or developing a new product in PureBasic? Tell the world about it.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Islington - A curly bracket precompiler fro PB4+

Post by Killswitch »

Islington is a precompiler I've written for PB4+ that's designing to turn boring old PB (:P) into a curly bracket language more like C/Java/etc.

Take an 'If' statement, for example in PB4 it looks like this (as if you guys don't know :P):

Code: Select all

;PB4
If a=b
  Debug 1
Elseif a>b
  Debug 2
Else
  Debug 3
Endif
With Islington this becomes:

Code: Select all

;PB4 w/Islington
If a=b
{
  Debug 1
}
Elseif a>b
{
  Debug 2
}
Else{ ;This format is also valid
  Debug 3}
It's pretty much the same for all other conditions/statements. The opening statement stays the same, except a '{' is expected at the end of the line, or on the line directly after and the closing statement becomes a '}' (which can be the final character on another line).

Islington also introduces a slightly different syntax for procedures as well:

Code: Select all

long Main(Arg.l)
{
}
...is the same as:

Code: Select all

Procedure.l Main(Arg.l)
EndProcedure
All procedure types are supported in this fashion (using "float", "string", "double" ,"quad", "character","byte", "word" - I'm sure you can figure out how they work!).

I'm not sure of any automatic way to set up tools, but just download Islington.exe, fire up PB then:

Tools > Configure Tools > New
Commandline = Full Islington.exe path
Arguments = "%COMPILEFILE"
Event to trigger tool = Before Compile/Run
Wait untill tool quits = Ticked

Download!
Last edited by Killswitch on Wed Nov 08, 2006 11:05 am, edited 1 time in total.
~I see one problem with your reasoning: the fact is thats not a chicken~
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Thats kind of neat. Lets us use our favorite syntax style. Though I'd really like a library with C equivalents of purebasic's libs.
Post Reply