Java 类org.eclipse.xtext.UntilToken 实例源码

项目:xtext-extras    文件:TerminalRuleInterpreter.java   
@Override
public Boolean caseUntilToken(UntilToken object) {
    if (GrammarUtil.isOptionalCardinality(object) || GrammarUtil.isMultipleCardinality(object))
        throw new IllegalStateException("cardinality has to be default for until tokens");
    IMarker marker = markerFactory.mark();
    while (!eof()) {
        if (doSwitch(object.getTerminal())) {
            return true;
        }
        input.incOffset();
    }
    marker.rollback();
    return false;
}
项目:xtext-core    文件:XtextSemanticSequencer.java   
/**
 * Contexts:
 *     AbstractNegatedToken returns UntilToken
 *     UntilToken returns UntilToken
 *
 * Constraint:
 *     terminal=TerminalTokenElement
 */
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();
}
项目:xtext-extras    文件:TerminalRuleToLexerBody.java   
@Override
public String caseUntilToken(UntilToken object) {
    result.append("( options {greedy=false;} : . )*");
    doSwitch(object.getTerminal());
    return "";
}
项目:xtext-core    文件:TerminalRuleToLexerBody.java   
@Override
public String caseUntilToken(UntilToken object) {
    result.append("( options {greedy=false;} : . )*");
    doSwitch(object.getTerminal());
    return "";
}
项目:bts    文件:SLCommentPrefixCalculator.java   
@Override
public Boolean caseUntilToken(UntilToken object) {
    return false;
}
项目:xtext-core    文件:XtextSemanticSequencer.java   
/**
 * Contexts:
 *     TerminalAlternatives returns UntilToken
 *     TerminalAlternatives.Alternatives_1_0 returns UntilToken
 *     TerminalGroup returns UntilToken
 *     TerminalGroup.Group_1_0 returns UntilToken
 *     TerminalToken returns UntilToken
 *     TerminalTokenElement returns UntilToken
 *     ParenthesizedTerminalElement returns UntilToken
 *
 * Constraint:
 *     (terminal=TerminalTokenElement (cardinality='?' | cardinality='*' | cardinality='+')*)
 */
protected void sequence_TerminalToken_UntilToken(ISerializationContext context, UntilToken semanticObject) {
    genericSequencer.createSequence(context, semanticObject);
}