initial pseudocode version of parser