Added a simple test suite for parser

Signed-off-by: Diwank Singh <diwank.singh@gmail.com>
Added printer and made minor refactors

Signed-off-by: Diwank Singh <diwank.singh@gmail.com>