basic S-expression pre-parser and parser