fbfrog header translator

User projects written in or related to FreeBASIC.
speedfixer
Posts: 358
Joined: Nov 28, 2012 1:27
Location: California

Re: fbfrog header translator

Postby speedfixer » Apr 07, 2019 7:04

Did the second branch get far enough along to be useful? (60 commits ahead/4 commits behind master - philosophical shift?)
Were there features that would/should be rolled into the master?

An immediate project of mine is using the Raspberry PI for several modest tasks in a much larger network and I want to write more directly to the core of the system in places. FB so far has been excellent for this, but there are so many base libraries to address.

I'm still learning fbfrog (so I can avoid learning more C). Zero interest in Python.

david
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: fbfrog header translator

Postby dkl » Apr 09, 2019 18:37

No, it's unfinished, so not really useful. It's a mix of two ideas -
1) using libclang in fbfrog instead of a custom parser. Good, except it can't parse #define bodies, so it still needs some custom parsing for that.
2) making a "just-in-time bindgen" (for 1 target only instead of all targets). There is some better code at https://github.com/dkl/fbc/compare/master...dkl:bindgen for this approach. See also viewtopic.php?f=8&t=26175
paul doe
Posts: 916
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: fbfrog header translator

Postby paul doe » Apr 09, 2019 20:14

dkl wrote:No, it's unfinished, so not really useful. It's a mix of two ideas - ...

Mmm? I beg to differ. The amount of work it can save me is substantial and, very frequently, it only leaves me with trivial stuff to deal with. Makes porting some stuff a breeze. Thank you so much for this little 'useless' tool ;)
speedfixer
Posts: 358
Joined: Nov 28, 2012 1:27
Location: California

Re: fbfrog header translator

Postby speedfixer » Apr 17, 2019 8:00

Is there a provision to comment a line in the '*.fbfrog' or '*.options' file?

This would be helpful.
One favorite option file can be copied across many translates with 'touchups' for specific files without having to search down that one single file that had the exception you need again.

david
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: fbfrog header translator

Postby dkl » Apr 18, 2019 18:56

Yea it allows # comments. The *.fbfrog files can also include others recursively, which can be useful to extract and reuse common parts.
speedfixer
Posts: 358
Joined: Nov 28, 2012 1:27
Location: California

Re: fbfrog header translator

Postby speedfixer » Apr 18, 2019 19:08

Thanks.

Are you pretty much done with this?

I'm working on rPI stuff right now.
Translates aren't too hard; I get them to work without that much difficulty.

I would have sets of questions and more if you were to be active on this.

If not, it certainly works well enough to save so much time. (With fbc so fast, trial and error makes everything so simple.)
Thank you for this program!


One question:
How should one deal with an FB reserved keyword defined in another library?

At the moment, the word is shell.


david
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: fbfrog header translator

Postby dkl » Apr 18, 2019 19:49

Yea go ahead, if I can help out a bit that's fine for me. I got no plans to make any big improvements though.

For symbol naming conflicts usually the solution is to do something like declare function shell_ alias "shell" .... There is an fbfrog option for that, -rename_ shell, or -renameproc shell foo if you prefer another name than shell_.
speedfixer
Posts: 358
Joined: Nov 28, 2012 1:27
Location: California

Re: fbfrog header translator

Postby speedfixer » Apr 18, 2019 22:02

Thank you.

No more for now.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 47 guests