Search in sources :

Example 1 with SimpleTerm

use of org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.SimpleTerm in project xtext-core by eclipse.

the class AbstractBacktrackingBug325745TestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == BacktrackingBug325745TestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case BacktrackingBug325745TestLanguagePackage.DATA_TYPE:
                sequence_DataType(context, (DataType) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.EXPRESSION:
                sequence_Expression(context, (Expression) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.SIMPLE_TERM:
                sequence_SimpleTerm(context, (SimpleTerm) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) SimpleTerm(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.SimpleTerm) Expression(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Expression) Element(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Element) Model(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) DataType(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.DataType) EPackage(org.eclipse.emf.ecore.EPackage)

Example 2 with SimpleTerm

use of org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.SimpleTerm in project xtext-core by eclipse.

the class SimpleBacktrackingBug325745TestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == BacktrackingBug325745TestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case BacktrackingBug325745TestLanguagePackage.DATA_TYPE:
                sequence_DataType(context, (DataType) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.EXPRESSION:
                sequence_Expression(context, (Expression) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.SIMPLE_TERM:
                sequence_SimpleTerm(context, (SimpleTerm) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) SimpleTerm(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.SimpleTerm) Expression(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Expression) Element(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Element) Model(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) DataType(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.DataType) EPackage(org.eclipse.emf.ecore.EPackage)

Example 3 with SimpleTerm

use of org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.SimpleTerm in project xtext-core by eclipse.

the class ExBacktrackingBug325745TestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == BacktrackingBug325745TestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case BacktrackingBug325745TestLanguagePackage.DATA_TYPE:
                sequence_DataType(context, (DataType) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.EXPRESSION:
                sequence_Expression(context, (Expression) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case BacktrackingBug325745TestLanguagePackage.SIMPLE_TERM:
                sequence_SimpleTerm(context, (SimpleTerm) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) SimpleTerm(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.SimpleTerm) Expression(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Expression) Element(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Element) Model(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) DataType(org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.DataType) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

EPackage (org.eclipse.emf.ecore.EPackage)3 Action (org.eclipse.xtext.Action)3 Parameter (org.eclipse.xtext.Parameter)3 ParserRule (org.eclipse.xtext.ParserRule)3 DataType (org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.DataType)3 Element (org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Element)3 Expression (org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Expression)3 Model (org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.Model)3 SimpleTerm (org.eclipse.xtext.parser.unorderedGroups.backtrackingBug325745TestLanguage.SimpleTerm)3