Howdy y'all!
Many of us would like an easy way to convert 'c' headers
to PowerBasic. I, for one, would love to use ISource
from Smaller Animals that I just registered, but don't
want to have to deal with conversion issues on each update,
I decided to jump in both feet first and write a converter.
At this point, the program is not complete, yet does quite
a bit. My purpose of posting here is four-fold:[list=1][*]To document what I'm attempting to establish interest.
[*]To document that I do not intend on profiting personally
on this and at some point, will release this to the PB
community in exchange for all of the help y'all provided over
the years. (However, my Oreo and Dr Pepper reserves are
getting kinda low...)
[*]To enlist the help of those who are knowledgeable in this
area. For one, I'd really like some header files that people
have converted manually to help refine the conversion. Also,
I'd hope that someone would be willing to work with me via
direct email or on the phone to help resolve specific
conversion issues.
[*]Finally, how do I say this... I <U>want</U> a 100% conversion, and
with some headers, it just might happen. My goal is to make it
convert the ISource headers as best as possible.
Then I'll take other headers and see where it goes. I figure for
something headers, the conversion will be 100%.[/list=a]
Current Status and notes, in no particular order:
Now, maybe I'm doing something wrong. I suppose I'll find
out soon enough as I'm sure there is much to learn.
Like I said, the basic structure seems to be in place. I've got
some nice parsing routines written, and while it's probably not
Mr Z would do, it seems to work and pretty quickly. At this
point, the ISource files (~9600 lines) processes in about six
seconds on my laptop.
So, are there any takers to assist me when I get to a problem
line or those with c headers they've already converted? There
may even be a few dumb questions through in there for good
measure.
I love these kinds of programs. In fact, I wrote a CBASIC
to PowerBasic converter many moons ago after using MDM7 to
transfer files from a Cromemco CP/M machine to a DOS machine.
Well, I hope to hear from y'all and let's see where this
puppy wants to roam.
Dan
[email protected]
(REMOVE THE CAP LETTERS)
------------------
[This message has been edited by Dan Ginzel (edited May 19, 2003).]
Many of us would like an easy way to convert 'c' headers
to PowerBasic. I, for one, would love to use ISource
from Smaller Animals that I just registered, but don't
want to have to deal with conversion issues on each update,
I decided to jump in both feet first and write a converter.
At this point, the program is not complete, yet does quite
a bit. My purpose of posting here is four-fold:[list=1][*]To document what I'm attempting to establish interest.
[*]To document that I do not intend on profiting personally
on this and at some point, will release this to the PB
community in exchange for all of the help y'all provided over
the years. (However, my Oreo and Dr Pepper reserves are
getting kinda low...)
[*]To enlist the help of those who are knowledgeable in this
area. For one, I'd really like some header files that people
have converted manually to help refine the conversion. Also,
I'd hope that someone would be willing to work with me via
direct email or on the phone to help resolve specific
conversion issues.
[*]Finally, how do I say this... I <U>want</U> a 100% conversion, and
with some headers, it just might happen. My goal is to make it
convert the ISource headers as best as possible.
Then I'll take other headers and see where it goes. I figure for
something headers, the conversion will be 100%.[/list=a]
Current Status and notes, in no particular order:
- #includes are processed and combined into one file without
comments. I removed the comments to make life easier. Maybe
one day in the future, I'll put them back in, but right now I'm
concerned mostly with the function code itself. - #define directives are processed and substituted
- typedef <type> <stuff>; instructions are processed and subtituted (I think that's what I'm supposed to do)
- declare and external (adding LIB) statements are well parsed
- builds a FUNCTION (non-VOID) or SUB (VOID)
- builds the parameter list with common c types that I know about (mostly from the PB docs)
Now, maybe I'm doing something wrong. I suppose I'll find
out soon enough as I'm sure there is much to learn.
Like I said, the basic structure seems to be in place. I've got
some nice parsing routines written, and while it's probably not
Mr Z would do, it seems to work and pretty quickly. At this
point, the ISource files (~9600 lines) processes in about six
seconds on my laptop.
So, are there any takers to assist me when I get to a problem
line or those with c headers they've already converted? There
may even be a few dumb questions through in there for good
measure.
I love these kinds of programs. In fact, I wrote a CBASIC
to PowerBasic converter many moons ago after using MDM7 to
transfer files from a Cromemco CP/M machine to a DOS machine.
Well, I hope to hear from y'all and let's see where this
puppy wants to roam.
Dan
[email protected]
(REMOVE THE CAP LETTERS)
------------------
[This message has been edited by Dan Ginzel (edited May 19, 2003).]
Comment