Alint update

Recommended Posts

Okay, I fixed some of the minor errors in alint and uploaded new binaries here. I also put the source on github and created a makefile that works with the Microsoft compiler (this didn't take a lot of work).

I ran the four preset scenarios through it; they seem to give quite a few errors, but I'm not sure if these are a problem with alint or actually a problem with the scenarios.

Also, this version currently accepts both "set_flag" and "set_sdf" as correct, and also accepts both "print_big_str_num" and "print_big_str_color". I'm not quite sure if this is right/

Share this post

Link to post

Share on other sites

Also, this version currently accepts both "set_flag" and "set_sdf" as correct, and also accepts both "print_big_str_num" and "print_big_str_color". I'm not quite sure if this is right/

I'm reasonably sure that one of the two print_big_str calls doesn't work, but I forget which one. You should just create a quick experiment scenario and try it to find out. I also vaguely recall set_sdf() not working, but, again, you should just try it, because I may be remembering something else.

Share this post

Link to post

Share on other sites

I'm guessing in the thousands of lines of code, somewhere there is a call that it doesn't like. I'm yet to figure it out. So lately I've just been copying and pasting the lines of code I need checked and not the entire script.

(I think it's something in the INIT state or START state of scripts that clashes with certain calls. I'm thinking it may be my cutscenes. My scenario works fine, just not Alint)

Share this post

Link to post

Share on other sites

It was built on Windows 7, so being on XP still could be something of an issue. You should be able to build the code yourself though. If you have some version of Visual Studio (including an express version, which can be downloaded for free) you should be able to build it from the console by something like this:

The exact path on the first line depends on where Visual Studio is installed, so you'd need to check that. You also need to have flex and bison installed (probably from the sourceforge link you mentioned) and accessible in your %PATH%, with the executable files named flex.exe and bison.exe.

If on the other hand you're using MinGW, you should be able to just type "make" to build it. This should create an output file "alint" which you'd have to rename to "alint.exe". Again, you'll need flex and bixon install; I'm not sure if MinGW comes with versions of them, but if it doesn't, you'd need to install it, rename the executables, and put it in your %PATH%.

Share this post

Link to post

Share on other sites

Okay, I uploaded a version that should fix the non-working *.txt. The issue with commas will need more investigation, I think. I suppose it could also be an issue with the version of bison or flex being used.

Share this post

Link to post

Share on other sites

"Hm, curious, your example works correctly on my Mac but fails on my Windows, just as you say... I wonder why that could be..."

Have you accidentally put something Mac in your Windows code?

I haven't actually touched any code yet, just tweaked the lex.l file a little (to fix things like floor_shimmers), added a couple of lines to common.h (which were needed for it to compile with Visual Studio tools), and fiddled with makefiles.

"-a: Check all files, not just *.txt"

This sounds like another batch-check, rewriting the description might make it clearer:

"-a: Check any file, not just a file with the .txt extension"

I think what that actually does is, normally it skips any file without a .txt extension, but with -a it checks those files too (if they're passed on the arguments list at least). So yes, the description could be clearer.

Share this post

Link to post

Share on other sites

That was because cl.exe by default links in a very simplistic command parsing routine. I had to explicitly tell it to link a different one that supports globbing. I guess cmd.exe doesn't expand the globs before forking, so the program is responsible for doing it. Or something like that. Main thing is, I think I fixed the issue, and it does now work in cmd.exe, so your test might've been biased (but that said, I wouldn't be surprised if it would've worked in bash before changing that, as well as in powershell).

Share this post

Link to post

Share on other sites

I'll take a look at the mingw builds and see what's going on. Build 7 was supposed to have a fix but I guess the fix sucked. For now, I'd recommend using bash or powershell instead of cmd, as they do expansions properly (read: do expansions).

Share this post

Link to post

Share on other sites

No, as the owner of the repository it's my responsibility to make sure the pull request is handled. I already did that as of my last post, so if there's still an issue it's with Sylae's Jenkins, I'd guess.