Jump to content

Script checking program


Khoth

Recommended Posts

I've made a program to check BoA scripts for errors. It's not fully tested, but I think it works well enough for at least a beta type of release.

 

Get it here: alint

You need OS X to run it.

 

Source is here . Needs flex and bison to compile it. It should work with no modification on Unix-like OSes and possibly with not too much effort on Windows.

 

If you don't have flex and bison, you could try lex and yacc, although I'm not sure they work, or get the processed source here . This is not a form you want to modify things in, though.

 

Let me know if you use it, and whether it works.

Link to comment
Share on other sites

Wow. I just started using it, and it looks really impressive. I was thinking about mentioning the total lack of a separate compiler outside the BoA app itself and how useful such a thing would be, and BAM, here it is. Nice job, Khoth!

 

It has some small issues. It gives double errors, sometimes. For instance, these two lines:

 

Code:
while ((j <= 84) && (i == 0))      {if char_ok(j) 
It complained that they were both wrong, even though the second one is the only one with an error. It does this from time to time.

 

When a semicolon is missing, it consistently gives the next line, not line it's missing from. I don't know if this was intentional.

 

It also doesn't seem to recognize the special SANCTIFICATION_STATE in terrain scripts.

Link to comment
Share on other sites

I'll have to look into that while and if thing. I have no idea why it's doing that, or even how it can possibly be doing that. As for the semicolon thing, statements are allowed to have line breaks in them, so it doesn't know there's a mistake until it gets to the next line and finds that it doesn't follow on from what was there.

 

Flex and Bison are programs that generate C code to do what I want.

 

Flex: http://www.gnu.org/software/flex/

Bison: http://www.gnu.org/software/bison/bison.html

 

Alint is written in C, and you are allowed to compile, modify, reverse engineer and/or disassemble to your heart's content.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...