Journal Week 2

May 30: Stefan pointed out a few bugs: mostly with detecting incorrect input. Fixed them. There's this bug that I've introduced: after a few (sometimes one, sometimes more) incorrect inputs, gPXE just locks up. I can't seem to isolate it. Well, there's no way I can pitch it as a feature, so I'll have to fix it.

May 31: Hunted down the bug and fixed it. Turns out it was a problem with the error code that I return. I thought I'd return a -1 on a parse error. Instead I fixed it to return a 0, as the length of an empty string, and it works properly now.

June 1: Stefan suggested I take a check and look at the big picture. As a result, I've filled in my Project Plan, with the details of the project. One of the first things to be done is to look at the syntax. Once that is decided, I will be able to move forward.

June 2-3: Reading through the bash source, to see how they do things. They seem to separate arithmetic and non-numeric expressions. I don't think that's really possible here.

June 5: Tried to see if I could unify evaluation and variable expansion, like ${a+2}. This would mean adding support for strings. There are two ways I thought of:

  • Each parsing function returns a string instead of a value. (I.e.: “11+23” will give “34” instead of 34).
  • Check if only a variable is present; if so, return that value, if not convert to an integer and continue as usual.

The first seems smaller. There are problems with this approach, anyway, since some operators such as '/' are valid in variable names.

QR Code
QR Code soc:2009:lynusvaz:journal:week2 (generated for current page)