The file sexp-parse.c
is a minimal S-expression parser written in C. It also has a tree walker which walks the parsed constructs and prints out the values.
If you have worked with languages such as CommonLisp or Scheme, you know S-Expressions. These are syntactic consructs which are either 'atoms' or 'lists'. A program is a giant list, and each list is comprised of other lists, and atoms.
This is an atom, for example:
an-atom
This is a list of atoms:
(atom-1 atom-2 atom-3)
This is a list that has a list itself:
(atom-1 atom-2 (atom-3 atom-4 (atom-5 atom-6)))
Overal, if you are interested in learning about S-Expressions, Wikipedia is your friend.