Cynics Soapbox

Random thoughts...

re2c & lemon, fixing bugs

Chatting with Theo he suggested that rather than struggle with bison & flex I look at re2c and lemon. A quick web search and there they were! They do look like interesting apps to use and so I’ve installed them on my laptop in preperation for looking at moving butter over to using them for it’s parser while at AC US. Of course I’ve got a small list of other things to look at, but I should...

bison

After doing some work to make sure that we correctly rebuild when settings are changed, or could have been changed, I decided to try and add another piece of the puzzle that’s missing. Adding it requires making some changes to the flex/bison code I have, but as usual it wasn’t as easy as I thought it might be. I’m sure that there is a simple explanation of what needs doing somewhere, but I keep finding myself...

bison

After doing some work to make sure that we correctly rebuild when settings are changed, or could have been changed, I decided to try and add another piece of the puzzle that’s missing. Adding it requires making some changes to the flex/bison code I have, but as usual it wasn’t as easy as I thought it might be. I’m sure that there is a simple explanation of what needs doing somewhere, but I keep finding myself...

charging to 300...

Old projects never die, they just fade away…. Until someone asks you about it and shows a little interest. At that point they get dusted off and made to work again. In fact, often they get all spruced up and have majout portions rewritten to work better, fixing a lot of the annoyances that were there when work stopped. A fresh pair of eyes is often a good thing! Such is the case with butter. Will asked me about it...

Bugs fixed

In my usage of butter I’ve found a few small bugs that I’ve fixed today. Some were minor and more niggles, but the biggie was not installing after building when invoked as butter -install. The problem seems to be to do with the times on the files, but is now fixed and working correctly. I’ve also tidied up the output a little more, though more work is needed on that front....

Dependancies

Now that I’ve been using butter for building quite a large tree I’ve found that the automatic dependancy code needs a little more work before it’s quite doing what it needs to. Presently building a dependancy doesn’t trigger other builds, which it obviously should!...

FreeBSD

Butter now builds on FreeBSD and showed up a few minor problems (now fixed) and a couple of strange warnings… In file included from /usr/include/sys/time.h:291, from /usr/include/sys/stat.h:50, from File.cpp:6: /usr/include/time.h:144: warning: char * timezone(int, int)' hides constructor for struct timezone' In file included from File.cpp:6: /usr/include/sys/stat.h:246: warning: int stat(const char *, stat *)' hides constructor for...

flex & "

I’ve been trying to figure out how you get flex to treat things between quotes as a string, something that has a lot of potential uses. The recent changes to Run somehow demanded it so I tried again. The answer was found on my 3rd attempt, and goes like this “.*” … It really is that simple! All those hours I could have saved myself…...

Is it newer?

One of the aims of butter is to build only what needs building. Presently every source file is compared with the object that it should result in and the final binary for “up to dateness” and things built as required. I’m planning on also building if the Instructions file in the directory is newer or if the Recipes file it’s using is newer, but the question is how far do you go with building for updated files? I...

Names

I’ll admit it, I’m rubbish at naming things. I tyhink I hung out with Ryan too long and caught whatever he was infected with as neither of us can name things worth a damn. The present dilema is for butter’s templates. Presently you define a template that tells butter how to build a type of object, eg a shared library, static library, executable etc. Part of this definition is the ability to specify what happens you try...

Installing

Added a few more functions today to enable the main project using butter to be installable using “butter -install”. It now works, which is kind of cool. The uninstall feature isn’t yet working and the work has thrown up a few other problems that need to be fixed, but they’re not huge issues and so shouldn’t take long to figure out. Clean also seems to be slightly broken, but, again, I’m hopeful it’ll be solved...

Big progress

Well, butter is now capable of building a reasonably complex project and can handle a surprisingly large rnage of problems thrown against it. I’ve added the notion of named sections that can be run by either Rules or Templates presently. At present these are just the boring Before and After sections that allow you to play with the files before or after (see the names did make sense after all) their builds, whether into objects or as a final...