org.eclipse.xtext.EOF Java Examples

The following examples show how to use org.eclipse.xtext.EOF. 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: TerminalRuleToLexerBody.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @since 2.0
 */
@Override
public String caseEOF(EOF object) {
	result.append("EOF");
	result.append(Strings.emptyIfNull(object.getCardinality()));
	return "";
}
 
Example #2
Source File: TerminalRuleInterpreter.java    From xtext-extras with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public Boolean caseEOF(EOF object) {
	if (eof())
		return Boolean.TRUE;
	return Boolean.FALSE;
}
 
Example #3
Source File: XtextLabelProvider.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
String text(EOF object) {
	return "EOF";
}
 
Example #4
Source File: XtextValidator.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Check
public void checkNegatedTokenNotEOF(NegatedToken token) {
	for (EOF eof : EcoreUtil2.getAllContentsOfType(token, EOF.class)) {
		error("It is not possible to negate EOF", eof, null);
	}
}
 
Example #5
Source File: TerminalRuleToLexerBody.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public String caseEOF(EOF object) {
	result.append("EOF");
	result.append(Strings.emptyIfNull(object.getCardinality()));
	return "";
}
 
Example #6
Source File: XtextSemanticSequencer.java    From xtext-core with Eclipse Public License 2.0 2 votes vote down vote up
/**
 * Contexts:
 *     EOF returns EOF
 *
 * Constraint:
 *     {EOF}
 */
protected void sequence_EOF(ISerializationContext context, EOF semanticObject) {
	genericSequencer.createSequence(context, semanticObject);
}
 
Example #7
Source File: XtextSemanticSequencer.java    From xtext-core with Eclipse Public License 2.0 2 votes vote down vote up
/**
 * Contexts:
 *     TerminalAlternatives returns EOF
 *     TerminalAlternatives.Alternatives_1_0 returns EOF
 *     TerminalGroup returns EOF
 *     TerminalGroup.Group_1_0 returns EOF
 *     TerminalToken returns EOF
 *     TerminalTokenElement returns EOF
 *     ParenthesizedTerminalElement returns EOF
 *
 * Constraint:
 *     (cardinality='?' | cardinality='*' | cardinality='+')*
 */
protected void sequence_EOF_TerminalToken(ISerializationContext context, EOF semanticObject) {
	genericSequencer.createSequence(context, semanticObject);
}
 
Example #8
Source File: EOFImpl.java    From xtext-core with Eclipse Public License 2.0 2 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected EClass eStaticClass() {
	return XtextPackage.Literals.EOF;
}