June 6: Weekly meeting today. We discussed about the syntax:

  • Variable names can contain '-' and '/'. So, something like ${a+2} is not possible.
  • Decided we needed a formal document describing the syntax.

June 7: Spent today writing down a formal grammar. Discussed it with Stefan, who suggested some changes, which I put in.

June 8: Put in string support.

set resp y
echo $(${resp} == y)

works. This is in my git repository now. A few bugs remain, which I will work on.

June 9: Continued working on the string support. Removed the obvious bugs, and it seems to work properly now. I will also have to think about quoting.

June 10: Commit: 8e9d952f1a67b0c2e7a9f61605d589614e5e8a48

June 11: Worked on fixing memory leaks. Latest code here.

June 12: The arithmetic parser is almost done. I installed valgrind, to help with the dynamic allocation/deallocation checks. It uncovered a few cases I had not thought about. So, these have been fixed. Also, I have tried to modify my coding style according to the style used in gPXE. The latest commit is here.

June 13: Used gcov and valgrind together to test my code. I compile just the parser, like so:

 gcc -fprofile-arcs -ftest-coverage -D__ARITH_TEST__ arith.c -g

and then use valgrind to check for any memory leaks:

valgrind --leak-check=yes --leak-check=full --show-reachable=yes ./a.out

Then with gcov, I find the code coverage:

gcov arith.c

This then creates the file arith.c.gcov, which gives me a count of the times each line has been executed. Based on this, I can see whether all significant code is being tested, and whether I need some more test cases. Weekly meeting today. Discussed this week's progress and the plan for next week. Next week's goal is to implement string quoting. I'll be putting up the ideas on my notes page.

June 14: Today went mostly into packing for the journey home. Couldn't do any work today.


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