Parse the rest of a postfix expression.
(parse-postfix-expression-rest prev-expr prev-span parstate) → (mv erp expr span new-parstate)
This is called by parse-postfix-expression after parsing the primary expression that starts the postfix expression, passing that primary expression and its span to this function. This function is analogous to parse-expression-rest and similar functions: it handles, together with the initial parsing of the primary expression, the elimination of the left recursion in the grammar rule for postfix expressions.
We read and examine the next token. If it may start the rest of a postfix expression (see token-postfix-expression-rest-start-p), we parse the postfix construct started by that token. We combine that with the input expression and span, and we recursively call this function to see if there are further postfix constructs. Note that this recursion associates the postfix expression to the left, as implied by the grammar. The recursion ends when the next token is absent or cannot start a postfix construct.