Page 1 of 1

Islington - A curly bracket precompiler fro PB4+

Posted: Mon Nov 06, 2006 7:32 pm
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!

Posted: Mon Nov 06, 2006 7:36 pm
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.