PBHGEN - PureBasic Header Generator
Re: PBHGEN - PureBasic Header Generator
Very cool. This looks like something I did independently a few years ago as well but only recently released:
http://www.purebasic.fr/english/viewtop ... 40&t=56697
Yours looks more advanced, mine is pretty simple at only 20+ lines of code it only handles simple 1-line declarations. (Source code is provided)
http://www.purebasic.fr/english/viewtop ... 40&t=56697
Yours looks more advanced, mine is pretty simple at only 20+ lines of code it only handles simple 1-line declarations. (Source code is provided)
Re: PBHGEN - PureBasic Header Generator
Version 0.9:
Fixed issue with multiline arguments. Thanks majikeyric for pointing this out.
@majikeyric:
Thanks for the report, I appreciate the feedback and am glad to know others found / use this tool, fixed the issue!
@USCode:
Yes that's exactly the problem I was experiencing, I love building huge projects like game engines and you cannot expect that all the game object routines come first and the actual object manager at the bottom etc. Great to see more interest towards this sort of thing.
Fixed issue with multiline arguments. Thanks majikeyric for pointing this out.
@majikeyric:
Thanks for the report, I appreciate the feedback and am glad to know others found / use this tool, fixed the issue!
@USCode:
Yes that's exactly the problem I was experiencing, I love building huge projects like game engines and you cannot expect that all the game object routines come first and the actual object manager at the bottom etc. Great to see more interest towards this sort of thing.
Re: PBHGEN - PureBasic Header Generator
Version 5.31
Now naming version after PureBasic's version when possible.
Added support for Runtime procedure statements.
Added support for case independent keyword detection.
Improved ProcedureDLL and ProcedureCDLL with appropriate DeclareDLL and DeclareCDLL.
Now naming version after PureBasic's version when possible.
Added support for Runtime procedure statements.
Added support for case independent keyword detection.
Improved ProcedureDLL and ProcedureCDLL with appropriate DeclareDLL and DeclareCDLL.
Re: PBHGEN - PureBasic Header Generator
Version 5.31b
Improved parsing engine to comply with latest PureBasic syntax.
Optimized header file content and size.
Now supports any amount of spaces in front of a procedure.
Treats a colon seperator as a new line to allow multiple declarations on a single line.
Added support for module header generation (Edit: The Following Does No Longer Apply: requires additional files and include lines in source code).
Improved parsing engine to comply with latest PureBasic syntax.
Optimized header file content and size.
Now supports any amount of spaces in front of a procedure.
Treats a colon seperator as a new line to allow multiple declarations on a single line.
Added support for module header generation (Edit: The Following Does No Longer Apply: requires additional files and include lines in source code).
Last edited by Henry00 on Thu Mar 19, 2015 9:42 pm, edited 3 times in total.
Re: PBHGEN - PureBasic Header Generator
Version 5.31c
Using compiler directives to remove the need of multiple files for modules.
Using compiler directives to remove the need of multiple files for modules.
- Module MyModule
- IncludeFile #PB_Compiler_File + "i" ;- PBHGEN
- EndModule
Re: PBHGEN - PureBasic Header Generator
Version 5.31d
Fixed case where the compiler directives failed when a module is declared above global procedures.
Fixed case where the compiler directives failed when a module is declared above global procedures.
Re: PBHGEN - PureBasic Header Generator
Does this tool follow IncludeFiles, to create headers of procedures found in included files?
Re: PBHGEN - PureBasic Header Generator
No that's not how it works. As mentioned in the instructions when you save say Vector3.pb it will create Vector3.pbi and it's Vector3.pb's responsibility to have the following line at the top of the source code:Dude wrote:Does this tool follow IncludeFiles, to create headers of procedures found in included files?
- IncludeFile #PB_Compiler_File + "i" ;- PBHGEN
That makes it a matter of copy pasting a single line of code to make use of the header file. The header is always up-to-date as it generates whenever you save the source code so there is no need to generate headers for Vector3.pb each time you save test.pb just because it was included.
I hope that clarifies it, you should give it a try and you will see how seamless it is.
Re: PBHGEN - PureBasic Header Generator
Version 5.31e
Fixed a comment after EndProcedure / EndModule / EndMacro skipping the next procedure declaration.
Now ignoring content between Macro / EndMacro statements.
Fixed a comment after EndProcedure / EndModule / EndMacro skipping the next procedure declaration.
Now ignoring content between Macro / EndMacro statements.
Re: PBHGEN - PureBasic Header Generator
Very nice indeed... thanks!
Does it work with PB 5.41?
Any chances you will release the source of PBHGEN?
Does it work with PB 5.41?
Any chances you will release the source of PBHGEN?
The PureBASIC Archives:
- GitHub Repo + Wiki + Website
- https://tajmone.github.io/purebasic-archives
- PB Sourcecode Highlighters for Websites and Documents
- Dräc OOP Tutorial reprint
- Pandoc2BBCode: Post on PB Forums from Markdown, ReST, Docx, and other formats…
Re: PBHGEN - PureBasic Header Generator
Hello! I wasn't aware PureBasic 5.41 came out but after reading up and doing some quick tests it doesn't seem like any syntax was changed that would break the parser. Please correct me if I am wrong.
Also I have released the source code here as requested: https://bitbucket.org/Henry00/pbhgen
I must apologize that it's a single file project but I hope it contains what you were looking for. When I update I will continue to use the repository from now on.
Thanks for the feedback, very nice to see people using it!
Also I have released the source code here as requested: https://bitbucket.org/Henry00/pbhgen
I must apologize that it's a single file project but I hope it contains what you were looking for. When I update I will continue to use the repository from now on.
Thanks for the feedback, very nice to see people using it!
Re: PBHGEN - PureBasic Header Generator
Hi @Henry00,
Tristano (Italy)
I've just downloaded it from BitBucket. I'll try out tomorrow and let you know!Henry00 wrote:... after reading up and doing some quick tests it doesn't seem like any syntax was changed that would break the parser. Please correct me if I am wrong.
Best regards,Henry00 wrote:Also I have released the source code here as requested: https://bitbucket.org/Henry00/pbhgen
Thanks, that was really kind of you. For me is a good way to learn PB, by looking into code (very new to PB, still), and it might open up to new ideas, future maintainance, ecc.
Tristano (Italy)
The PureBASIC Archives:
- GitHub Repo + Wiki + Website
- https://tajmone.github.io/purebasic-archives
- PB Sourcecode Highlighters for Websites and Documents
- Dräc OOP Tutorial reprint
- Pandoc2BBCode: Post on PB Forums from Markdown, ReST, Docx, and other formats…
Re: PBHGEN - PureBasic Header Generator
Version 5.42
Added SpiderBasic header generation support.
Added SpiderBasic header generation support.
Re: PBHGEN - PureBasic Header Generator
Very Nice program, and thanks for sharing it!
But I found that I needed to add this note to my code: Please correct me if it's wrong:
Again thank you, because it's very helpful.
yrreti
But I found that I needed to add this note to my code: Please correct me if it's wrong:
Code: Select all
;IMPORTANT:
;PBHGEN.exe eliminates the problem of Procedure placements in your program by creating
;a Declare list of all the Procedures in your program.
;(place PBHGEN.exe in PB's home directory)
;PBHGEN.exe must be added to your tools menu, and is run when ever you save your program.
;But after adding the next program line below,
;*** YOU MUST SAVE THIS CODE FIRST!***,
;in order for PBHGEN to first create the file. If you don't, then it will error out on this
;next program line, because the file hadn't been created yet.
;Another important note is, that if you add a new procedure or remove one, you need to save
;again first before running this code, so it enters in all the changes to the generated file.
;Also important, is that the created .pbi name is based on your programs name.
;So if you change the name, you will need to delete the older ones you don't need any more.
IncludeFile #PB_Compiler_File + "i" ;- PBHGEN
yrreti
Re: PBHGEN - PureBasic Header Generator
Dear @Henry00, thanks a lot for this great tool and for maintaining it.
I need to ask you some more info on how PBHGEN handles modules. From the documentation I haven't understood clearly how it goes about them: does it create separate files (with naming convention filename.modname.pbi)? And how does it handle modules public and private declarations?
Any chance in the future PBHGEN could also auto-magically add its inclusion lines into the source -- possibly, handling modules as well?
I need to ask you some more info on how PBHGEN handles modules. From the documentation I haven't understood clearly how it goes about them: does it create separate files (with naming convention filename.modname.pbi)? And how does it handle modules public and private declarations?
Any chance in the future PBHGEN could also auto-magically add its inclusion lines into the source -- possibly, handling modules as well?
The PureBASIC Archives:
- GitHub Repo + Wiki + Website
- https://tajmone.github.io/purebasic-archives
- PB Sourcecode Highlighters for Websites and Documents
- Dräc OOP Tutorial reprint
- Pandoc2BBCode: Post on PB Forums from Markdown, ReST, Docx, and other formats…