org.eclipse.xtext.UntilToken Java Examples
The following examples show how to use
org.eclipse.xtext.UntilToken.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TerminalRuleInterpreter.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
@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; }
Example #2
Source File: XtextSemanticSequencer.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
/** * 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(); }
Example #3
Source File: TerminalRuleToLexerBody.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
@Override public String caseUntilToken(UntilToken object) { result.append("( options {greedy=false;} : . )*"); doSwitch(object.getTerminal()); return ""; }
Example #4
Source File: XtextLabelProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
String text(UntilToken object) { return "->"; }
Example #5
Source File: SLCommentPrefixCalculator.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
@Override public Boolean caseUntilToken(UntilToken object) { return false; }
Example #6
Source File: TerminalRuleToLexerBody.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public String caseUntilToken(UntilToken object) { result.append("( options {greedy=false;} : . )*"); doSwitch(object.getTerminal()); return ""; }
Example #7
Source File: XtextSemanticSequencer.java From xtext-core with Eclipse Public License 2.0 | 2 votes |
/** * 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); }