/**
* consume current token (get next token).
* @return the consumed token (which was the current token when calling this method)
*/
protected final Token consumeToken() throws ScanException, ParseException {
Token result = token;
if (lookahead.isEmpty()) {
token = scanner.next();
position = scanner.getPosition();
} else {
LookaheadToken next = lookahead.remove(0);