Update main.c

Added parser function
Merge pull request #2 from itgrufti/patch-1

Update main.c