Jump to content
IGNORED

bblint


RevEng

Recommended Posts

I put together a small utility to double-check the syntax of a bB basic program. This version changes the bundled Linux binary to 32-bit for wider compatibility.

 

If there are issues, bblint reports them along with the line numbers, if possible. If no problems are found, bblint just silently exits.

 

bblint is a command-line utility, so you'll need to know how to run those, or call it from visual bB. If you run bB from a Batch or Make file, it would be a good idea to include this command there to double check your work.

 

Win32 and Linux x86 versions are included, along with source.

 

download from 8bitdev.org

  • Like 8
Link to comment
Share on other sites

How about something to analyze gosub and return commands or is that not doable?

gosub+return commands is more complicated. It's pretty much impossible to determine one subroutine's return from another, since there's no real way to check where a subroutine ends.

 

I can't even do gosub/return counts, since it's a valid technique to have multiple return points from a subroutine, and you could have multiple gosubs to the same sub.

 

I think I've hit a lot of the obvious checks, but I have a few other ideas on what could be added...

  • goto/gosub without real destination.
  • dimming a variable name that's a reserved keyword
  • setting up a constant that's a reserved keyword
...that said, I'm not rushing to update this right now, beyond bugfixes. I have too many projects right now as-is.
Link to comment
Share on other sites

Figured as such, but thought I'd mention it anyway. I wouldn't even know where to begin, because sometimes I find myself getting lost in my goto and gosub/returns.

 

How about something to analyze gosub and return commands or is that not doable?

gosub+return commands is more complicated. It's pretty much impossible to determine one subroutine's return from another, since there's no real way to check where a subroutine ends.

 

I can't even do gosub/return counts, since it's a valid technique to have multiple return points from a subroutine, and you could have multiple gosubs to the same sub.

 

I think I've hit a lot of the obvious checks, but I have a few other ideas on what could be added...

 

  • goto/gosub without real destination.
  • dimming a variable name that's a reserved keyword
  • setting up a constant that's a reserved keyword

...that said, I'm not rushing to update this right now, beyond bugfixes. I have too many projects right now as-is.

Link to comment
Share on other sites

  • 1 month later...

bblint v0.03 has been attached to the first post.

 

I updated bblint's internal keyword list to match the latest released bB 1.1 beta, and ; comments are now taken into account. (still need some work to support C style comments)

  • Like 1
Link to comment
Share on other sites

  • 9 months later...
  • 2 weeks later...

You have your wish - Jeff added integration into vbb a while back. :)

 

Great, next thing you'll tell me is parachute pants are out of style!

 

Okay, what about include support? You could allow insertion of seperate bB source files so peeps could have their own libraries.

 

INCLUDE BOPHADS.BAS

Edited by theloon
Link to comment
Share on other sites

  • 10 months later...

Hit another small problem, using all latest VbB bB 1.1d

DPC+

 

If I add

 

scorecolor:

$44

$44

$44

$44

$44

$44

$44

$44

end

 

bblint errors saying 25 "end" statements... That's the only new code.

It is in Bank 1 right after define variables here

I can choose the option and continue to compile, and it builds and runs just fine.

I can comment that out and there is no error, but the score is not visible.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...