====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
soc:2009:lynusvaz:journal:week4 [2009/06/19 20:24]
lynusvaz
soc:2009:lynusvaz:journal:week4 [2009/06/22 21:44] (current)
lynusvaz
Line 12: Line 12:
  
 June 19: Had a talk with Stefan about the work done so far. He mentioned that a table-based parser might be a good idea, since the expansion code works almost the same. I tried out that approach, first as a stand-alone expansion function. So it's back to valgrind, to test the memory allocation. It does look much better than the previous code, since there is not too much code duplication. Once I tested it, I integrated it into gPXE. Commit: [[http://​git.etherboot.org/?​p=people/​lynusvaz/​gpxe.git;​a=commit;​h=56c619c876c01b3a9bdcced39425e89030617fe8|Table-based]] June 19: Had a talk with Stefan about the work done so far. He mentioned that a table-based parser might be a good idea, since the expansion code works almost the same. I tried out that approach, first as a stand-alone expansion function. So it's back to valgrind, to test the memory allocation. It does look much better than the previous code, since there is not too much code duplication. Once I tested it, I integrated it into gPXE. Commit: [[http://​git.etherboot.org/?​p=people/​lynusvaz/​gpxe.git;​a=commit;​h=56c619c876c01b3a9bdcced39425e89030617fe8|Table-based]]
 +
 +June 20: Trying to decide the implementation of if-else branches (next week's task). This is what I've thought of:
 +  if <​cond>​
 +       <​statements>​
 +  else
 +       <​statements>​
 +  fi
 +I will also have a stack of boolean values, representing the evaluated conditions. Each time an if is encountered,​ the condition is evaluated and pushed on the stack. Similarly, when an else is encountered,​ the top of stack is negated, and when a fi is found, the top condition is pushed off. Statements should be executed only if the value on the top of the stack is true, or they can change the stack.
 +
 +
 +June 21: Did some last testing, and sent out my work to Etherboot-developers. [[http://​git.etherboot.org/?​p=people/​lynusvaz/​gpxe.git;​a=commit;​h=b56dbdab708f546bd8ff4eb71d3c9c7125a33255|Here it is.]]

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