Update parser.peg

Add implementation to chainInvocations function.