Use `append` and `pop` instead of `appendleft` and `popleft`.

For no reason in particular. The parser is a stack, so might as well make the code a bit shorter.