Well-Actually War Trall Khoth Posted August 18, 2004 Share Posted August 18, 2004 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 More sharing options...
Magnificent Ornk Kelandon Posted August 18, 2004 Share Posted August 18, 2004 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 More sharing options...
Kyshakk Koan Mortimer Posted August 19, 2004 Share Posted August 19, 2004 I think I may put my new knowledge of C++ to do a port to PC. If that's alright with you Khoth.(hopefully I'll be able to alter the source if you've used something different? not heard of flex or bison or lex and yacc, I'll look into it) Wish me luck. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Khoth Posted August 19, 2004 Author Share Posted August 19, 2004 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 More sharing options...
Rotghroth Rhapsody Overwhelming Posted August 19, 2004 Share Posted August 19, 2004 Sounds cool, but I'm on PC. I'll wait a couple more reply posts before adding it to my site (to be sure that it doesn't has nasty bugs in it ). Link to comment Share on other sites More sharing options...
Well-Actually War Trall Khoth Posted August 19, 2004 Author Share Posted August 19, 2004 PC version, courtesy of uranusalien: http://www.srcf.ucam.org/~eet23/alint/alint.exe.zip If you want documentation and the like, download the Mac version. It comes with a few helpful rtf files. Link to comment Share on other sites More sharing options...
Kyshakk Koan Mortimer Posted August 19, 2004 Share Posted August 19, 2004 heh, nevermind, I was bet to it. Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Overwhelming Posted August 19, 2004 Share Posted August 19, 2004 Nice. Added it to the site. Included the docs in the zip file too. Link to comment Share on other sites More sharing options...
Kyshakk Koan KernelKnowledge12 Posted August 20, 2004 Share Posted August 20, 2004 I added an extra semicolon to the "clear" statement at the beginning of scenario data script, and got about thousands of "structural errors" on almost every line. This has to be an error. I am using the Windows version. Link to comment Share on other sites More sharing options...
Unflappable Drayk Djur Revolutions Posted August 20, 2004 Share Posted August 20, 2004 Khoth: Code: lineend: ';' | lineend ';'; and replacing all instances of ';' with lineend in grammar.y should fix the 'structural error' issue. It'd help if I had some scripts in Unix format to test with. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Khoth Posted August 20, 2004 Author Share Posted August 20, 2004 Thanks, Djur. I'll try that. What do you mean, scripts in unix format? It doesn't care what sort of line endings you use, if that's the problem. Link to comment Share on other sites More sharing options...
Unflappable Drayk Djur Revolutions Posted August 22, 2004 Share Posted August 22, 2004 I get tons of syntax errors on every script I test it on. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Khoth Posted August 23, 2004 Author Share Posted August 23, 2004 Ick. Would you mind testing it on a very short script where it produces errors it shouldn't, with the -d option on, and sending me the script and results? Link to comment Share on other sites More sharing options...
Recommended Posts