add Parser class

simple stateful parser objects based on the C one