@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; }
/** * 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(); }
@Override public String caseUntilToken(UntilToken object) { result.append("( options {greedy=false;} : . )*"); doSwitch(object.getTerminal()); return ""; }
@Override public Boolean caseUntilToken(UntilToken object) { return false; }
/** * 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); }