parser implementation - stage -1