Page 1 of 1
adding a precompiler
Posted: Mon Nov 03, 2003 9:23 pm
by blueznl
just another crazy idea, and i don't know how feasible this is, but...
how could one implement a pre-compiler?
so, currently:
editor saves --> compiler compiles (simplified

)
but, if there was something like...
editor saves --> precompiler replaces keywords by complete procedures / purebasic statements whatever --> compiler
then... any other basic command could be implemented by a user... it would need some sort of descripitive language to accomplish this, but i haven't seen this in any other language yet (logo, anyone?

)
it's NOT just a procedure / function replacement, it could go way beyound that...
ofcourse, errors would have to be reported THROUGH the precompiler as well, otherwise the line numbers would be off
any takers / comments?
Posted: Mon Nov 03, 2003 9:41 pm
by freedimension
I heard rumours that macros are to be implemented in PB soon.
Re: adding a precompiler
Posted: Mon Nov 03, 2003 9:56 pm
by tinman
blueznl wrote:any takers / comments?
I think the idea was mentioned a long time ago, and it seemed like a good idea back then. I considered writing one myself, but wouldn't have the time (or inclination or skills) and someone else was considering doing the same.
Things that were mentioned were:
* More usable include commands
* Macros (already planned for PB v4)
* Uncalled function stripping (does PB do this now? I know Fred was considering it)
* Enhanced compiler conditionals (CompilerIfDef, etc as discussed recently)
Don't know what happened in that area. But the lack of these things makes certain things a right pain.
Re: adding a precompiler
Posted: Mon Nov 03, 2003 10:09 pm
by GPI
Code: Select all
* Uncalled function stripping (does PB do this now? I know Fred was considering it)
Nope. But japbe-Plugin-Cutter can do this...
Posted: Tue Nov 04, 2003 12:16 am
by blueznl
hmmm... what the world really

needs is a dual window editor, where in the left window you see your own code, while real time in the right window the same code in another language is presented...
type c++ left, and purebasic shows up on the right side
type gfbabasic on the left, and purebasic shows up on the right side...
interesting project...
Posted: Tue Nov 04, 2003 12:53 am
by Shannara
Well, definately. Now that Im a proud owner of PB

, Im working on a personalized VB to PB converter. Personalized, as in, for one project Im working on. That way I can write my code in VB, run it through the converter, and compile it in PB. Donno how far I can get on this..
Brings up another thing. It would be interesting creating a compiler in PB, or even a os kernal...
Posted: Tue Nov 04, 2003 4:28 pm
by blueznl
man, way too many projects that i'm working on, but it just might be interesting, a 'filthy' editor that translates on the fly commands into pure... damn, it would even turn purebasic into puregfa

Posted: Wed Nov 05, 2003 1:28 pm
by TronDoc
blueznl wrote:hmmm... what the world really

needs is a dual window editor, where...
in the left I type the idea for my program and in the right the code is generated 8O

Joe
Posted: Thu Nov 06, 2003 12:04 am
by blueznl
don't tempt me!
