Search in sources :

Example 81 with Parameter

use of org.eclipse.xtext.Parameter 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)

Example 82 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class SimpleUnorderedGroupsTestLanguageSemanticSequencer 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 == UnorderedGroupsTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case UnorderedGroupsTestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case UnorderedGroupsTestLanguagePackage.NESTED_MODEL:
                sequence_NestedModel(context, (NestedModel) semanticObject);
                return;
            case UnorderedGroupsTestLanguagePackage.UNORDERED_SERIALIZATION:
                sequence_UnorderedSerialization(context, (UnorderedSerialization) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Model(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) Parameter(org.eclipse.xtext.Parameter) UnorderedSerialization(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.UnorderedSerialization) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) EPackage(org.eclipse.emf.ecore.EPackage)

Example 83 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class UnorderedGroupsTestLanguageSemanticSequencer 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 == UnorderedGroupsTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case UnorderedGroupsTestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case UnorderedGroupsTestLanguagePackage.NESTED_MODEL:
                sequence_NestedModel(context, (NestedModel) semanticObject);
                return;
            case UnorderedGroupsTestLanguagePackage.UNORDERED_SERIALIZATION:
                sequence_UnorderedSerialization(context, (UnorderedSerialization) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Model(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) Parameter(org.eclipse.xtext.Parameter) UnorderedSerialization(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.UnorderedSerialization) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) EPackage(org.eclipse.emf.ecore.EPackage)

Example 84 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class Bug297105TestLanguageSemanticSequencer 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 == Bug297105TestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug297105TestLanguagePackage.EXPRESSION:
                sequence_Expression(context, (Expression) semanticObject);
                return;
            case Bug297105TestLanguagePackage.INT_LITERAL:
                sequence_IntLiteral(context, (IntLiteral) semanticObject);
                return;
            case Bug297105TestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case Bug297105TestLanguagePackage.REAL_LITERAL:
                sequence_RealLiteral(context, (RealLiteral) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) RealLiteral(org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.RealLiteral) Action(org.eclipse.xtext.Action) Expression(org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.Expression) Model(org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) IntLiteral(org.eclipse.xtext.parser.terminalrules.bug297105TestLanguage.IntLiteral) EPackage(org.eclipse.emf.ecore.EPackage)

Example 85 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class Bug317840TestLanguageSemanticSequencer 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 == Bug317840TestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug317840TestLanguagePackage.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case Bug317840TestLanguagePackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case Bug317840TestLanguagePackage.NAMED:
                sequence_Named(context, (Named) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Named(org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Named) Action(org.eclipse.xtext.Action) Element(org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element) Model(org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

Parameter (org.eclipse.xtext.Parameter)146 ParserRule (org.eclipse.xtext.ParserRule)137 Action (org.eclipse.xtext.Action)127 EPackage (org.eclipse.emf.ecore.EPackage)123 NamedArgument (org.eclipse.xtext.NamedArgument)7 EClass (org.eclipse.emf.ecore.EClass)6 ISerializationContext (org.eclipse.xtext.serializer.ISerializationContext)6 AbstractElement (org.eclipse.xtext.AbstractElement)5 AbstractRule (org.eclipse.xtext.AbstractRule)5 RuleCall (org.eclipse.xtext.RuleCall)5 EObject (org.eclipse.emf.ecore.EObject)4 ParserRuleParameters (org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters)4 Scenario (org.eclipse.xtext.parser.parameters.parametersTestLanguage.Scenario)4 ImmutableSet (com.google.common.collect.ImmutableSet)3 Group (org.eclipse.xtext.Group)3 ConditionEvaluator (org.eclipse.xtext.xtext.ConditionEvaluator)3 Set (java.util.Set)2 Assignment (org.eclipse.xtext.Assignment)2 EnumRule (org.eclipse.xtext.EnumRule)2 Grammar (org.eclipse.xtext.Grammar)2