Contexts:
AbstractNegatedToken returns UntilToken
UntilToken returns UntilToken

Constraint:
terminal=TerminalTokenElement
341718
protected void sequence_UntilToken(ISerializationContext context, UntilToken semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, XtextPackage.Literals.ABSTRACT_NEGATED_TOKEN__TERMINAL) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XtextPackage.Literals.ABSTRACT_NEGATED_TOKEN__TERMINAL));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getUntilTokenAccess().getTerminalTerminalTokenElementParserRuleCall_1_0(), semanticObject.getTerminal());
		feeder.finish();
	}
239507
function handleEscaping(tokens, token, index) {
	if (index === 0) {
		return [token];
	}

	const previousToken = tokens[index - 1];

	if (!previousToken.endsWith('\\')) {
		return [...tokens, token];
	}

	return [...tokens.slice(0, index - 1), `${previousToken.slice(0, -1)} ${token}`];
}
895061
private static PortablePosition navigateToPathTokenWithoutQuantifier(
            PortableNavigatorContext ctx, PortablePathCursor path) throws IOException {
        if (path.isLastToken()) {
            // if it's a token that's on the last position we calculate its direct access position and return it for
            // reading in the value reader.
            return createPositionForReadAccess(ctx, path);
        } else {
            // if it's not a token that's on the last position in the path we advance the position to the next token
            // we also adjust the context, since advancing means that we are in the context of other
            // (and possibly different) portable type.
            if (!navigateContextToNextPortableTokenFromPortableField(ctx)) {
                // we return null if we didn't manage to advance from the current token to the next one.
                // For example: it may happen if the current token points to a null object.
                return nilNotLeafPosition();
            }
        }
        return null;
    }
475351
function nextToken(tokens, idx) {
  if (++idx >= tokens.length - 2) {
    return idx;
  }
  if ((tokens[idx].type === 'paragraph_open' && tokens[idx].tight) &&
      (tokens[idx + 1].type === 'inline' && tokens[idx + 1].content.length === 0) &&
      (tokens[idx + 2].type === 'paragraph_close' && tokens[idx + 2].tight)) {
    return nextToken(tokens, idx + 2);
  }
  return idx;
}
676217
private Token consumeNextToken(Token.Type... expected) {
        try {
            return tokens.consume(expected);
        } catch (UnexpectedElementException e) {
            throw new UnexpectedTokenException(e);
        }
    }
923545
def collect_tokens_until(self, token_type):
        """"""
        self.next()
        if self.current_token.type == token_type:
            return

        while True:
            yield self.current_token

            self.next()
            if self.current_token.type == token_type:
                return

            if self.current_token.type != 'COMMA':
                raise self.error(f'Expected comma but got '
                                 f'{self.current_token.value!r}')
            self.next()
672678
function toExpr(value,line){
	var token=[];
	var ctoken=token;
	var newToken;
	var stacks=[];
	var c;
	var ss='';
	for(var i=0;i<value.length;i++){
		c=value[i];
		switch(c){
		case ' ':
		case "\t":
		case ",":
			if(ss!=""){
				ctoken.push(ss);
				ss="";
			}
			break;
		case '(':
			if(ss!=""){
				console.log("warning: no space before '(' in line "+line+" at "+(i+1));
				ctoken.push(ss);
				ss="";
			}
			stacks.push(ctoken);
			newToken=[];
			ctoken.push(newToken);
			ctoken=newToken;
			break;
		case ')':
			if(ss!=""){
				ctoken.push(ss);
				ss="";
			}
			if(stacks.length>0){
				ctoken=stacks.pop();
			}else{
				console.log("error: unmatched ')' in line "+line+" at "+(i+1));
				return null;
			}
			break;
		default:
			ss+=c;
			break;
		}
	}
	if(ss!=''){
		ctoken.push(ss);
	}

	// remove last '*/', '###'
	var ltoken=null;
	if(token&&(token.length>0)){
		ltoken=token[token.length-1];
		if((typeof ltoken=='string')&&((ltoken=='*/')||(ltoken=='###'))){
			ltoken.pop();
		}
	}

	return token;
}
681805
private Node parseContextTypeExpression(JsDocToken token) {
    if (token == JsDocToken.QMARK) {
      return newNode(Token.QMARK);
    } else {
      return parseBasicTypeExpression(token);
    }
  }
1053497
def _parse_next_token(self):
        """"""
        while self._position < self.limit:
            token = self._next_pattern()
            if token:
                return token

        return None
933335
function (startToken, endToken, types) {
            var is = true;
            var token = startToken;
            while (token.next && token.next !== endToken) {
                token = token.next;
                if (types.indexOf(token.type) === -1) {
                    is = false;
                    break;
                }
            }
            return is;
        }
1205218
public static Parser<Token> adjacent(Parser<List<Token>> parser, final Parser<?> otherwise) {
    return parser.next(tokens -> {
        if (tokens.isEmpty()) return Parsers.always();
        int offset = tokens.get(0).index();
        for (Token token : tokens) {
          if (token.index() != offset) {
            return otherwise;
          }
          offset += token.length();
        }
        return Parsers.always();
      }).atomic().source().token();
  }
778837
function tokenizeText(text, callback) {
    "use strict";
    processTokens(tokenizer.tokenize(text) || [], function (error, tokens) {
        process.nextTick(function () {
            callback(error, tokens);
        });
    });
}
365086
function getLastBlockToken(token) {
      let last = token;
      let next;

      do {
        next = last;
        last = sourceCode.getTokenBefore(last, { includeComments: true });
      } while (isComment(last) && last.loc.end.line === next.loc.start.line);

      return last;
    }
965483
public final void entryRuleAbstractNegatedToken() throws RecognitionException {
        try {
            // InternalXtext.g:1246:1: ( ruleAbstractNegatedToken EOF )
            // InternalXtext.g:1247:1: ruleAbstractNegatedToken EOF
            {
             before(grammarAccess.getAbstractNegatedTokenRule()); 
            pushFollow(FollowSets000.FOLLOW_1);
            ruleAbstractNegatedToken();

            state._fsp--;

             after(grammarAccess.getAbstractNegatedTokenRule()); 
            match(input,EOF,FollowSets000.FOLLOW_2); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
616033
function (tokens, entryParseFn) {
  var state = {
    tokens: tokens,
    token_i: 0,
    curr: void 0
  }

  advance(state)
  var s = entryParseFn(state)
  if (notOk(s)) {
    return s
  }
  if (state.curr.rule.id !== '(end)') {
    return Error(state.curr.token.loc, 'Expected `(end)`')
  }
  advance(state)

  return s
}
939424
private void getNextToken(StreamTokenizer tokenizer) throws IOException, ParseException {
        if (tokenizer.nextToken() == StreamTokenizer.TT_EOL) {
            throw new ParseException("premature end of line", tokenizer.lineno());
        }
        if (tokenizer.ttype == StreamTokenizer.TT_EOF) {
            throw new ParseException(PREMATURE_END_OF_FILE, tokenizer.lineno());
        } else if ((tokenizer.ttype == '\'') || (tokenizer.ttype == '"')) {
            tokenizer.ttype = StreamTokenizer.TT_WORD;
        } else if ((tokenizer.ttype == StreamTokenizer.TT_WORD) && (tokenizer.sval.equals("?"))) {
            tokenizer.ttype = '?';
        }
    }
1093217
function getTextBetween(node1, node2) {
            const allTokens = [node1].concat(sourceCode.getTokensBetween(node1, node2)).concat(node2);
            const sourceText = sourceCode.getText();

            return allTokens.slice(0, -1).reduce((accumulator, token, index) => accumulator + sourceText.slice(token.range[1], allTokens[index + 1].range[0]), "");
        }